quantenna-sdk-v37.4.8.62

import quantenna-sdk-v37.4.8.62, pruned to just the u-boot important
parts and re-formatted to fit into the original u-boot file layout.

instructions for import are in:
  HOW.GFIBER.quantenna.sdk.unpack

Change-Id: I2ee412b32f9a35aab334c3f3667973085f9e4dc8
diff --git a/HOW.GFIBER.quantenna.sdk.unpack b/HOW.GFIBER.quantenna.sdk.unpack
new file mode 100644
index 0000000..2d282f6
--- /dev/null
+++ b/HOW.GFIBER.quantenna.sdk.unpack
@@ -0,0 +1,30 @@
+# HOW.GFIBER.quantenna.sdk.unpack
+
+How to unpack and format a Quantenna QSR1000 CDK as a u-boot vendor_drop.
+Source filenames look like: quantenna-sdk-v37.4.8.62.tar.gz
+
+- initialize a repo with the default_unrestricted.xml manifest
+- check out the vendor_drops branch
+- remove the existing code
+- unpack the downloaded SDK, it will create a new quantenna-sdk-... directory
+
+  $ cd uboot/qsr1000
+  $ git checkout -b l-vendor gfiber-internal/vendor_drops
+    (use rm with -rf splat, but make sure you're in the right place)
+  $ tar xvzpf $DOWNLOADS/$SDK 
+
+The SDK includes both u-boot and linux, but we're only interested in the u-boot part.
+Prune the set of files/directories down to what we want
+
+  $ cd quantenna-sdk-*
+  $ rm -rf buildroot call_qcsapi_client_src.zip dbdc-quantenna-bin-*.tar drivers Kconfig libqcsapi_client_src.zip linux linux_2.6.35.12 pcie-host-quantenna-bin-*.tar pcie-quantenna-bin-*.tar post-process-configs.awk power_tables quantenna-bin-*.tar quantenna-hostapd-*.tar rfic6-quantenna-bin-*.tar
+
+Move the remaining files into a quantenna specific directory under u-boot
+  $ mkdir u-boot/quantenna
+  $ for ix in board_config.mk common configs host include Makefile Make.toolchain; do mv ${ix} u-boot/quantenna; done
+
+Then move everything up to where it really belongs
+  $ mv quantenna-sdk-v37.4.8.62/u-boot/* quantenna-sdk-v37.4.8.62/u-boot/.??* .
+  $ rm -rf quantenna-sdk-v37.4.8.62
+
+  $ git add ...
diff --git a/Makefile b/Makefile
index 538c07b..ea1709b 100644
--- a/Makefile
+++ b/Makefile
@@ -184,7 +184,7 @@
 CROSS_COMPILE = sparc-elf-
 endif	# sparc
 ifeq ($(ARCH),arc)
-CROSS_COMPILE = arc-elf32-
+CROSS_COMPILE = arc-linux-uclibc-
 endif
 endif	# HOSTARCH,ARCH
 endif	# CROSS_COMPILE
@@ -287,8 +287,9 @@
 
 # The "tools" are needed early, so put this first
 # Don't include stuff already done in $(LIBS)
-SUBDIRS	= tools 
-#examples api_examples
+SUBDIRS	= tools \
+	  examples \
+	  api_examples
 
 .PHONY : $(SUBDIRS)
 
@@ -308,45 +309,45 @@
 #########################################################################
 #########################################################################
 
-ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND) $(obj)u-boot.dis
+ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND)
 ifeq ($(ARCH),blackfin)
 ALL += $(obj)u-boot.ldr
 endif
 
 all:		$(ALL)
 
-$(obj)u-boot.hex:	$(obj)u-boot
+$(obj)%.hex:	$(obj)%
 		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@
 
-$(obj)u-boot.srec:	$(obj)u-boot
+$(obj)%.srec:	$(obj)%
 		$(OBJCOPY) -O srec $< $@
 
-$(obj)u-boot.bin:	$(obj)u-boot
+$(obj)%.bin:	$(obj)%
 		$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
 
-$(obj)u-boot.ldr:	$(obj)u-boot
+$(obj)%.ldr:	$(obj)%
 		$(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS)
 
-$(obj)u-boot.ldr.hex:	$(obj)u-boot.ldr
+$(obj)%.ldr.hex:	$(obj)%.ldr
 		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary
 
-$(obj)u-boot.ldr.srec:	$(obj)u-boot.ldr
+$(obj)%.ldr.srec:	$(obj)%.ldr
 		$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary
 
-$(obj)u-boot.img:	$(obj)u-boot.bin
+$(obj)%.img:	$(obj)%.bin
 		./tools/mkimage -A $(ARCH) -T firmware -C none \
 		-a $(TEXT_BASE) -e 0 \
 		-n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
 			sed -e 's/"[	 ]*$$/ for $(BOARD) board"/') \
 		-d $< $@
 
-$(obj)u-boot.sha1:	$(obj)u-boot.bin
-		$(obj)tools/ubsha1 $(obj)u-boot.bin
+$(obj)%.sha1:	$(obj)%.bin
+		$(obj)tools/ubsha1 $<
 
-$(obj)u-boot.dis:	$(obj)u-boot
+$(obj)%.dis:	$(obj)%
 		$(OBJDUMP) -d $< > $@
 
-$(obj)u-boot:		depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT)
+$(obj)u-boot:	depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT)
 		UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
 		sed  -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
 		cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
@@ -389,6 +390,8 @@
 $(TIMESTAMP_FILE):
 		@date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
 		@date +'#define U_BOOT_TIME "%T"' >> $@
+		@date +'#define U_BOOT_TIME_UTC "%s"' \
+		 --date=1970-01-01\ UTC\ `date '+%s'`\ seconds >> $@
 
 gdbtools:
 		$(MAKE) -C tools/gdb all || exit 1
@@ -2598,16 +2601,15 @@
 # ARC
 #========================================================================
 arcangel_arc700_ram_config  :   unconfig
-	@$(MKCONFIG) $(@:_config=) arc arc700 arcangel
+	@$(MKCONFIG) $(@:_config=) arc arc arcangel
 arcangel_arc5_ram_config        :   unconfig
 	@$(MKCONFIG) $(@:_config=) arc arc5 aa3 ram
 arcangel_arc700_flash_config    :   unconfig
 	@$(MKCONFIG) $(@:_config=) arc arc700 aa3 flash
 arcangel_arc5_flash_config  :   unconfig
 	@$(MKCONFIG) $(@:_config=) arc arc5 aa3 flash
-ml50x_arc600_config  :   unconfig
-	@$(MKCONFIG) $(@:_config=) arc arc ml50x
-
+ruby_config  :   unconfig
+	@$(MKCONFIG) $(@:_config=) arc arc ruby
 
 ppmc7xx_config: unconfig
 	@$(MKCONFIG) $(@:_config=) ppc 74xx_7xx ppmc7xx
@@ -2615,6 +2617,111 @@
 ZUMA_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) ppc 74xx_7xx evb64260
 
+ruby_mini_config:	unconfig
+	@$(MKCONFIG) $(@:_config=) arc arc ruby_mini
+
+RUBY_MINI_BUILD_DIR = build_mini
+RUBY_MINI_CFLAGS += -Wall -Werror
+
+ruby_mini:	$(TIMESTAMP_FILE) $(VERSION_FILE) u-boot-mini u-boot-mini.bin
+
+-include $(shell if [ -d ${RUBY_MINI_BUILD_DIR} ]; then \
+                     find ${RUBY_MINI_BUILD_DIR}/ -name \*.d; \
+                 fi)
+
+${RUBY_MINI_BUILD_DIR}/board/ruby/start.o: $(TIMESTAMP_FILE)
+${RUBY_MINI_BUILD_DIR}/board/ruby/topaz_pcie_ep.o: $(TIMESTAMP_FILE)
+${RUBY_MINI_BUILD_DIR}/board/ruby/ruby_mini.o: $(TIMESTAMP_FILE)
+
+${RUBY_MINI_BUILD_DIR}/%.o: %.c
+	@mkdir -p ${@D}
+	$(CC) $(RUBY_MINI_CFLAGS) $(CFLAGS) $< -c -o $@ -MP -MD -MF $@.d
+
+${RUBY_MINI_BUILD_DIR}/%.o: %.S
+	@mkdir -p ${@D}
+	$(CC) $(AFLAGS) $< -c -o $@ -MP -MD -MF $@.d
+
+${RUBY_MINI_BUILD_DIR}/%.s: %.S
+	@mkdir -p ${@D}
+	$(CPP) $(AFLAGS) $< -o $@ -MP -MD -MF $@.d
+
+RUBY_MINI_OBJS += board/ruby/start.o
+RUBY_MINI_OBJS += board/ruby/flip.o
+RUBY_MINI_OBJS += board/ruby/gpio.o
+RUBY_MINI_OBJS += board/ruby/timer.o
+RUBY_MINI_OBJS += board/ruby/serial.o
+RUBY_MINI_OBJS += board/ruby/reset.o
+RUBY_MINI_OBJS += common/cmd_nvedit.o
+RUBY_MINI_OBJS += cpu/arc/cache.o
+RUBY_MINI_OBJS += lib_generic/ctype.o
+RUBY_MINI_OBJS += lib_generic/vsprintf.o
+RUBY_MINI_OBJS += lib_generic/string.o
+RUBY_MINI_OBJS += board/ruby_mini/ruby_mini_common.o
+
+ifneq ($(filter topaz_amber_medium_config, $(board_config)),)
+RUBY_MINI_OBJS += board/ruby/amber.o
+endif
+
+TOPAZ_EP_MINI_UBOOT = 0
+ifeq ($(board_config),topaz_pcie_config)
+TOPAZ_EP_MINI_UBOOT = 1
+endif
+ifeq ($(board_config),topaz_pcie_realign_config)
+TOPAZ_EP_MINI_UBOOT = 1
+endif
+ifeq ($(board_config),topaz_vzn_config)
+CFLAGS += -DTOPAZ_VZN_MINI_UBOOT
+endif
+
+ifeq ($(TOPAZ_EP_MINI_UBOOT),1)
+CFLAGS += -DTOPAZ_EP_MINI_UBOOT
+RUBY_MINI_OBJS += board/ruby/pcie.o
+RUBY_MINI_OBJS += board/ruby/ddr.o
+RUBY_MINI_OBJS += board/ruby/ruby.o
+RUBY_MINI_OBJS += board/ruby/cmd_qtnboard.o
+RUBY_MINI_OBJS += board/ruby/spi_flash.o
+RUBY_MINI_OBJS += board/ruby/board_cfg.o
+RUBY_MINI_OBJS += board/ruby/newlib_io_copy.o
+RUBY_MINI_OBJS += board/ruby_mini/topaz_pcie_ep.o
+RUBY_MINI_OBJS += lib_generic/crc32.o
+RUBY_MINI_OBJS += common/env_common.o
+else
+RUBY_MINI_OBJS += board/ruby/arasan-emac-ahb.o
+RUBY_MINI_OBJS += common/cmd_net.o
+RUBY_MINI_OBJS += board/ruby/tftp_bootp_loop.o
+RUBY_MINI_OBJS += net/tftp.o
+RUBY_MINI_OBJS += net/rarp.o
+RUBY_MINI_OBJS += net/eth.o
+RUBY_MINI_OBJS += net/bootp.o
+RUBY_MINI_OBJS += net/net.o
+RUBY_MINI_OBJS += board/ruby_mini/ruby_mini.o
+endif
+
+RUBY_MINI_OBJS_ = ${RUBY_MINI_OBJS:%=${RUBY_MINI_BUILD_DIR}/%}
+
+RUBY_MINI_LDMAP = ${RUBY_MINI_BUILD_DIR}/board/ruby_mini/u-boot.lds
+
+.PHONY: FORCE
+include helper.mk
+${RUBY_MINI_LDMAP}: ${RUBY_MINI_LDMAP_SRC} FORCE
+	$(call build-mini-ldmap,$(RUBY_MINI_CFLAGS))
+
+RUBY_MINI_TEXT_BASE_OFFSET = 0x14000
+RUBY_MINI_CFLAGS += -DRUBY_MINI -Iboard/ruby/ -DTEXT_BASE_OFFSET=${RUBY_MINI_TEXT_BASE_OFFSET}
+
+$(obj)u-boot-mini: CFLAGS += ${RUBY_MINI_CFLAGS}
+$(obj)u-boot-mini: AFLAGS += ${RUBY_MINI_CFLAGS}
+$(obj)u-boot-mini: ${RUBY_MINI_OBJS_} ${RUBY_MINI_LDMAP}
+	$(LD) -Bstatic -T ${RUBY_MINI_LDMAP} ${RUBY_MINI_OBJS_} $(PLATFORM_LIBS) -Map $@.map -o $@
+
+DOXYGEN_INPUT_DIRS = ./board/ruby ./common ./cpu/arc ./disk ./lib_arc ./lib_generic ./lib_generic/lzma ./net ./tools
+
+Doxyfile: FORCE
+	perl ../common/doxygen/qtn_doxyfile.pl "Quantenna U-Boot" "uboot" $(DOXYGEN_INPUT_DIRS) > $@
+
+doxygen: Doxyfile
+	doxygen
+
 #========================================================================
 # ARM
 #========================================================================
@@ -3548,6 +3655,8 @@
 		\( -name 'core' -o -name '*.bak' -o -name '*~' \
 		-o -name '*.o'	-o -name '*.a' -o -name '*.exe'	\) -print \
 		| xargs rm -f
+	@rm -rf build_mini/ build_tiny/ build_mini_piggy/ u-boot*.build/
+	@rm -f `find . -name .depend`
 
 clobber:	clean
 	@find $(OBJTREE) -type f \( -name .depend \
diff --git a/arc_config.mk b/arc_config.mk
deleted file mode 100644
index 64e909f..0000000
--- a/arc_config.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-# this switches are valid only for ml50x_arc600 target
-CONFIG_ARC_CPU_BUS_WIDTH=24
-CONFIG_ARC_BOARD_TIMER=1
diff --git a/board/arcangel/arc_emac.c b/board/arcangel/arc_emac.c
index f1cb19d..0402de5 100644
--- a/board/arcangel/arc_emac.c
+++ b/board/arcangel/arc_emac.c
@@ -1,30 +1,16 @@
 /*
- * Copyright Synopsys 2011-2012
+ * Copyright Codito Technologies (www.codito.com)
+ *
+ *  board/aa3/arc_emac.c
+ *
+ *  Copyright (C) 
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  * 
- * Sandeep Patil (sandeep.patil@codito.com)
- * Pradeep Sawlani (pradeep.sawlani@codito.com)
- *  -Initial Version
- *
- * Vineet Gupta (vgupta@synopsys.com): May 2011
- *  -Fixed the networking flakiness (brain-dead Rx and Tx routines)
- *  -Rx fixes
- *      = No need to tinker with status regs (since no interrupts)
- *      = Instead of starting at BD 0, remember where a pkt is seen and in
- *        subseq Rx call, poll the next BD, where chance of seeing pkt
- *        is more likely.  @rxbd_cntr used to track that
- *      = Entire D$ was flushed thrice for one pkt Rx, only needed once.
- *  -Tx fixes
- *      = again useless tinkering with status reg, no need to touch it at all
- *      = old code would write out to BD-x, wait for emac to pick it up
- *        and then free it up in same flow. Now, we write to BD-x and simply
- *        move to next BD, giving emac all the time. More imp it prevents the
- *        need to poll the BD and/or status-reg.
- *      = Added a loop to scan for a free BD, in case one pointed to by
- *        @txbd_cntr is in use by emac.
+ * Authors : Sandeep Patil (sandeep.patil@codito.com)
+ * 			 Pradeep Sawlani (pradeep.sawlani@codito.com)
  */
 
 
@@ -38,50 +24,43 @@
 #include <common.h>
 #include <net.h>
 #include <linux/types.h>
-
-//#define RX_DBG
-#ifdef RX_DBG
-#define RX_PRINT(x)   do { x; } while(0)
-#else
-#define RX_PRINT(x)
-#endif
-
 /* rx buffer descriptor. We align descriptors to 32 so info and 
  * data lie on the same cache line. This also satisfies the 8 byte 
  * alignment required by the VMAC */
 volatile struct aa3_buffer_desc rxbd[RX_BDT_LEN] __attribute__((aligned(32)));
 
 /* tx buffer descriptor */
-volatile struct aa3_buffer_desc txbd[TX_BDT_LEN] __attribute__((aligned(32)));
+volatile struct aa3_buffer_desc txbd[RX_BDT_LEN] __attribute__((aligned(32)));
 
 /* transmit buffer counter */
 static int txbd_cntr;
-static int rxbd_cntr;
 
 char default_addr[10] = { 0x00 ,0x01 ,0x02 ,0x03 ,0x04 ,0x05  };
 int arc_eth_rx (struct eth_device * net_current)
 {
-	unsigned int i,len, loop;
-    unsigned int cnt=0;
+	unsigned int i,len;
     volatile unsigned char *recv_data;
 	volatile unsigned int *stat_reg,*reg_base_addr = VMAC_REG_BASEADDR;
 	stat_reg = reg_base_addr + STAT_OFFSET;
+    volatile unsigned char *p;
+    unsigned int z;
 
-    /* This is where pkt was found - last time */
-    i = rxbd_cntr;
+    if (*stat_reg & TXINT_MASK)
+    {
+        *stat_reg = TXINT_MASK;
+    }
 
-	for (loop=0 ; loop < RX_BDT_LEN;loop++) {
+//do_ping(1,2,3,4);
 
-        i = (i + 1) & (RX_BDT_LEN - 1); /* poll the next one */
-
-		if((rxbd[i].info & OWN_MASK) == 0) {
-
-            rxbd_cntr = i;  /* remember that we saw a pkt here */
-            RX_PRINT(cnt++);
-
-            /* Ckh if this BD has a new pkt */
+    if (!(*stat_reg & RXINT_MASK))
+        return;
+	*stat_reg = RXINT_MASK;
+    flush_cache(1,2);
+	
+	for (i=0 ; i < RX_BDT_LEN;i++) {
+		if( (rxbd[i].info & OWN_MASK) == 0) {
 			if( (rxbd[i].info & FRST_MASK) && (rxbd[i].info & LAST_MASK) ) {
-				recv_data = (volatile unsigned char *)rxbd[i].data;
+				recv_data = (unsigned int *)rxbd[i].data;
 				len = rxbd[i].info & LEN_MASK;
 
 				if( !(rxbd[i].data = malloc(ETH_MTU + VMAC_BUFFER_PAD))) {
@@ -91,10 +70,10 @@
 				else {
 					rxbd[i].info = OWN_MASK | (ETH_MTU + VMAC_BUFFER_PAD); 
                     flush_cache(1,2);
-                    RX_PRINT(printf("emac: Rx @ BD %d\n", i));
 					NetReceive((uchar *)recv_data,len);
-					free((void *)recv_data);
+					free(recv_data);
 				}					
+				
 			}
 			else {
 				printf("Rx chained, Packet bigger than device MTU\n");
@@ -103,18 +82,29 @@
 				
 		}	
 	}
-
-    //RX_PRINT(if(!cnt) printf("emac: BD Ring empty [%d..%d]\n",rxbd_cntr,i));
+    flush_cache(1,2);
 
 	return (0);
 }
-
 int arc_eth_send (struct eth_device *net_current, volatile void *packet, int length)
 {
 
 	volatile unsigned int *reg_base_addr = VMAC_REG_BASEADDR;
 	volatile unsigned int *stat_reg = reg_base_addr + STAT_OFFSET;
-    int cnt = 0;
+    volatile unsigned int *enable_reg = reg_base_addr + ENABLE_OFFSET;
+    volatile unsigned int *control_reg = reg_base_addr + CONTROL_OFFSET;
+    volatile unsigned int *tx_ring = reg_base_addr + TXRINGPTR_OFFSET;
+    unsigned int z;
+    unsigned char *p;
+
+#if 0
+printf("Eth_send\n");
+printf("ID REG : %x\n", *reg_base_addr);
+printf("Enable : %x\n", *enable_reg);
+printf("Control: %x\n", *control_reg);
+printf("TX Ring: %x\n", *tx_ring);
+printf("Packet : %x\n", packet);
+#endif 
 
 	if (length > ETH_MTU) {
 	     printf("eth_send:packet length greater than MTU\n");  		
@@ -123,25 +113,38 @@
 	if ( length < 64 )
 		length = 64;
 
-    do {
-	    if( (txbd[txbd_cntr].info & OWN_MASK) == 0) {
-            flush_cache(1,2);
-			txbd[txbd_cntr].data = (void *) packet;
+	if( (txbd[txbd_cntr].info & OWN_MASK) == 0) {
+			txbd[txbd_cntr].data = packet;
 			txbd[txbd_cntr].info = OWN_MASK | length | FRST_MASK | LAST_MASK;
+            flush_cache(1,2);
+//			arc_write_uncached_32(txbd[txbd_cntr].data, packet);
+//			arc_write_uncached_32(txbd[txbd_cntr].info, OWN_MASK | length | FRST_MASK | LAST_MASK);
+			*stat_reg = TXPL_MASK;		
 
-            /* Force emac to poll BDs */			
-			*stat_reg |= TXPL_MASK;
-	        txbd_cntr = (txbd_cntr + 1) & (TX_BDT_LEN-1);	
-            return 0;
-        }
-        else {
-	        txbd_cntr = (txbd_cntr + 1) & (TX_BDT_LEN-1);	
-        }
+#if 0
+            p = (char *) packet;
+            printf("Packet length %u\n", length);
+            printf("Packet : ");
+            for(z=0;z!=length;z++)
+                printf("%02x:",p[z]);
+            printf("\n");
+#endif 
+			
+	} else {
+		printf("Out of Tx Buffers\n");
+		return -ENOMEM;
 	}
-    while (++cnt < TX_BDT_LEN);
 
-    printf("Out of Tx Buffers\n");
-	return -ENOMEM;
+	
+	/* Poll for TXINT */
+//	while ( !(*(stat_reg) & TXINT_MASK))
+
+	
+	*stat_reg = TXINT_MASK;
+	txbd[txbd_cntr].data = 0;
+	txbd[txbd_cntr].info = 0;
+	txbd_cntr = (txbd_cntr + 1)%TX_BDT_LEN;	
+	return (0);
 }
 void arc_eth_halt(struct eth_device * net_current)
 {
@@ -286,9 +289,6 @@
 		txbd[i].info = 0;
 	}
 	
-    // seed with max value so it starts with 0 in rx loop
-    rxbd_cntr = RX_BDT_LEN - 1;
-
 	/* Set EMAC hardware address */
 	aa3_emac_set_address((void *)&default_addr);	
 
diff --git a/board/arcangel/serial.c b/board/arcangel/serial.c
index 354232e..bd5f40a 100644
--- a/board/arcangel/serial.c
+++ b/board/arcangel/serial.c
@@ -16,7 +16,7 @@
 #include <common.h>
 #include <asm/serial.h>
 
-volatile arc_uart *uart = (arc_uart *) UART_BASEADDR;
+volatile aa3_uart *uart = (aa3_uart *) UART_BASEADDR;
 
 /*
  * Sets baudarate
diff --git a/board/arcangel/u-boot.lds b/board/arcangel/u-boot.lds
index 1a506f2..d3be27d 100644
--- a/board/arcangel/u-boot.lds
+++ b/board/arcangel/u-boot.lds
@@ -6,48 +6,24 @@
 
 	. = ALIGN(4);
 
-	__vector_start = .;
+
 	.vector :
 	{
 		*(.vector);
 	}
-	__vector_end = .;
-	
 	. = ALIGN(4); 
 	.text      :
 	{
 
 	 __text_start = .;
-	  cpu/arc700/start.o	(.text) 
+	  cpu/arc/start.o	(.text) 
 	  *(.text)	
 	}
 	. = ALIGN(4);
 	__text_end = .;
 
-  .sdata          :
-  {
-    __SDATA_BEGIN__ = .;
-    *(.sdata .sdata.* .gnu.linkonce.s.*)
-  }
-
-	__bss_start = .;
-	.sbss : { 
-    PROVIDE (__sbss_start = .);
-    *(.sbss .sbss.* .gnu.linkonce.sb.*)
-    PROVIDE (__sbss_end = .);
-       }
-
-	.bss : { 
-    *(.bss) 
-       }
-
-	__bss_end = .;
-
 	__data_start = .;
-	.rodata : {
-        *(.rodata .rodata.*)
-
-    }
+	.rodata : { *(.rodata) }
 	
 	. = ALIGN(4);
 	
@@ -64,24 +40,7 @@
 	
 	__data_end = .;
 
-
-    /* following statement was added to be able to debug using mdb */
-    /* DWARF 1 */
-	.debug          0 : { *(.debug) }
-	.line           0 : { *(.line) }
-	/* GNU DWARF 1 extensions */
-	.debug_srcinfo  0 : { *(.debug_srcinfo) }
-	.debug_sfnames  0 : { *(.debug_sfnames) }
-	/* DWARF 1.1 and DWARF 2 */
-	.debug_aranges  0 : { *(.debug_aranges) }
-	.debug_pubnames 0 : { *(.debug_pubnames) }
-	/* DWARF 2 */
-	.debug_info     0 : { *(.debug_info) }
-	.debug_abbrev   0 : { *(.debug_abbrev) }
-	.debug_line     0 : { *(.debug_line) }
-	.debug_frame    0 : { *(.debug_frame) }
-	.debug_str      0 : { *(.debug_str) }
-	.debug_loc      0 : { *(.debug_loc) }
-	.debug_macinfo  0 : { *(.debug_macinfo) }
-
+	__bss_start = .;
+	.bss : { *(.bss) }
+	__bss_end = .;
 }
diff --git a/board/ml50x/u-boot.lds.flash b/board/arcangel/u-boot.lds.flash
similarity index 100%
rename from board/ml50x/u-boot.lds.flash
rename to board/arcangel/u-boot.lds.flash
diff --git a/board/ml50x/u-boot.lds.ram b/board/arcangel/u-boot.lds.ram
similarity index 100%
rename from board/ml50x/u-boot.lds.ram
rename to board/arcangel/u-boot.lds.ram
diff --git a/board/ml50x/Makefile b/board/ml50x/Makefile
deleted file mode 100644
index 99d56aa..0000000
--- a/board/ml50x/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright Codito Technologies (www.codito.com)
-#
-#  board/aa3/Makefile
-#
-#  Copyright (C) 
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-# 
-# Authors : Sandeep Patil (sandeep.patil@codito.com) 
-# 			Pradeep Sawlani (pradeep.sawlani@codito.com) 
-#
-
-
-include $(TOPDIR)/config.mk
-
-LIB	= lib$(BOARD).a
-
-OBJS	:= ml50x.o serial.o
-SOBJS	:= 
-
-$(LIB):	$(OBJS) $(SOBJS)
-	$(AR) crv $@ $(OBJS) $(SOBJS)
-
-clean:
-	rm -f $(SOBJS) $(OBJS)
-
-distclean:	clean
-	rm -f $(LIB) core *.bak .depend
-
-#########################################################################
-
-.depend:	Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
-		$(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
-
--include .depend
-
-#########################################################################
diff --git a/board/ml50x/config.mk b/board/ml50x/config.mk
deleted file mode 100644
index b7173a1..0000000
--- a/board/ml50x/config.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-PLATFORM_CPPFLAGS += -DARC_BOARD_TIMER=$(CONFIG_ARC_BOARD_TIMER)
-
-ifeq ($(CONFIG_ARC_CPU_BUS_WIDTH),32)
-# 0x200 bytes are reserved for bootrom
-TEXT_BASE=0x40000200
-PLATFORM_CPPFLAGS += -DCONFIG_LOADADDR=0x40650000
-endif
-
-ifeq ($(CONFIG_ARC_CPU_BUS_WIDTH),24)
-# 0x200 bytes are reserved for bootrom
-TEXT_BASE=0x400200
-PLATFORM_CPPFLAGS += -DCONFIG_LOADADDR=0x650000
-endif
diff --git a/board/ml50x/ml50x.c b/board/ml50x/ml50x.c
deleted file mode 100644
index 9f91772..0000000
--- a/board/ml50x/ml50x.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright Codito Technologies (www.codito.com)
- *
- *  board/aa3/aa3.c
- *
- *  Copyright (C)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Authors : Sandeep Patil (sandeep.patil@codito.com)
- *           Pradeep Sawlani (pradeep.sawlani@codito.com)
- */
-
-#include <asm/arcregs.h>
-
-#include <linux/types.h>
-#include <config.h>
-#include <asm/global_data.h>	/* For global data structre */
-#include <asm/sys_ctrl.h>
-
-#define TIMER_WRAP 0xffffffff         /* Maximum limit for timer      */
-
-#if ARC_BOARD_TIMER==0
-#define BOARD_REG_TIMER_LIMIT ARC_REG_TIMER0_LIMIT
-#define BOARD_REG_TIMER_CTRL  ARC_REG_TIMER0_CTRL
-#define BOARD_REG_TIMER_CNT   ARC_REG_TIMER0_CNT
-#else
-#define BOARD_REG_TIMER_LIMIT ARC_REG_TIMER1_LIMIT
-#define BOARD_REG_TIMER_CTRL  ARC_REG_TIMER1_CTRL
-#define BOARD_REG_TIMER_CNT   ARC_REG_TIMER1_CNT
-#endif
-
-static ulong timestamp;
-
-#ifdef CONFIG_ARC_SYS_CTRL_DEV
-static sys_ctrl_reg_t *sys_ctrl_dev = SYS_CTRL_DEVICE_ADDRESS;
-#endif
-
-/* Function to start timer from 'count' */
-void set_timer (ulong count)
-{
-        /* Set up the LIMIT , COUNT and CONTROL registers for timer without interrupt	*/
-        write_new_aux_reg(BOARD_REG_TIMER_CTRL, 0);
-        write_new_aux_reg(BOARD_REG_TIMER_LIMIT, TIMER_WRAP);
-        write_new_aux_reg(BOARD_REG_TIMER_CTRL, 2);
-        write_new_aux_reg(BOARD_REG_TIMER_CNT, count);
-}
-
-/* Function to get the current count value */
-ulong get_timer (ulong base)
-{
-        /* Read the count value from COUNT0     */
-        timestamp = read_new_aux_reg(BOARD_REG_TIMER_CNT);
-        return timestamp - base;
-}
-
-void reset_timer(void)
-{
-        set_timer(0);
-}
-
-void uninit_timer(void)
-{
-        write_new_aux_reg(BOARD_REG_TIMER_LIMIT, TIMER_WRAP);
-        write_new_aux_reg(BOARD_REG_TIMER_CNT, 0);
-        write_new_aux_reg(BOARD_REG_TIMER_CTRL, 0);
-}
-
-/* Delay function */
-void udelay (unsigned long usec)
-{
-        DECLARE_GLOBAL_DATA_PTR;
-        ulong uTicks;
-        set_timer(0);
-        uTicks = (gd->cpu_clk/1000000) * usec;
-        /* Continue looping till the timer count is more thean the required delay	*/
-        while(get_timer(0) < uTicks);
-}
-
-int board_init(void)
-{
-        DECLARE_GLOBAL_DATA_PTR;
-
-        gd->cpu_clk = CONFIG_ARC_CLK;
-        /* Intialise the timer */
-        reset_timer();
-
-        /* address of kernel parameters */
-        gd->bd->bi_boot_params = TEXT_BASE - CONFIG_SYS_MALLOC_LEN + CONFIG_SYS_ENV_SIZE;
-
-        return 0;
-}
diff --git a/board/ml50x/serial.c b/board/ml50x/serial.c
deleted file mode 100644
index c0af2be..0000000
--- a/board/ml50x/serial.c
+++ /dev/null
@@ -1,87 +0,0 @@
-
-/*
- * Copyright Codito Technologies (www.codito.com)
- *
- * cpu/arc/serial.c
- *
- *  Copyright (C)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Authors : Sandeep Patil (sandeep.patil@codito.com)
- *           Pradeep Sawlani (pradeep.sawlani@codito.com)
- */
-
-#include <common.h>
-#include <asm/serial.h>
-
-volatile arc_uart *uart = (arc_uart *) UART_BASEADDR;
-
-/*
- * Sets baudarate
- */
-void serial_setbrg (void)
-{
-	DECLARE_GLOBAL_DATA_PTR;
-
-	int arc_console_baud = gd->cpu_clk/(gd->baudrate*4) - 1;
-	uart->baudl = arc_console_baud & 0xff;
-	uart->baudh = (arc_console_baud & 0xff00) >> 8;
-}
-
-/*
- * Intialise the serial port with given baudrate
- */
-int serial_init (void)
-{
-	serial_setbrg ();
-	return 0;
-}
-
-/*
- * Output a single byte to the serial port.
- */
-void serial_putc (const char c)
-{
-	if (c == '\n')
-		serial_putc('\r');
-	/* Wait till dataTx register is empty */
-	while (!(uart->status & UART_TXEMPTY));
-	uart->data = c;
-}
-
-/*
- * Read a single byte from the serial port. Returns 1 on success, 0
- * otherwise 0.
- */
-int serial_tstc (void)
-{
-	return !(uart->status & UART_RXEMPTY);
-}
-
-/*
- * Read a single byte from the serial port.
- */
-int serial_getc (void)
-{
-	unsigned char ch;
-
-	/* Wait till character is placed in fifo */
-	while (uart->status & UART_RXEMPTY);
-
-	/* Also check for overflow errors */
-	if (uart->status & UART_OVERFLOW_ERR)
-		return 0;
-
-	ch = uart->data & 0x00ff;
-	return ((int)ch);
-}
-
-void serial_puts (const char *s)
-{
-	while (*s)
-		serial_putc (*s++);
-}
-
diff --git a/board/ml50x/u-boot.lds b/board/ml50x/u-boot.lds
deleted file mode 100644
index 2c5452c..0000000
--- a/board/ml50x/u-boot.lds
+++ /dev/null
@@ -1,68 +0,0 @@
-OUTPUT_FORMAT("elf32-littlearc", "elf32-bigarc", "elf32-littlearc")
-OUTPUT_ARCH(arc)
-ENTRY(_start)
-SECTIONS
-{
-	/* DWARF 1 */
-	.debug          0 : { *(.debug) }
-	.line           0 : { *(.line) }
-	/* GNU DWARF 1 extensions */
-	.debug_srcinfo  0 : { *(.debug_srcinfo) }
-	.debug_sfnames  0 : { *(.debug_sfnames) }
-	/* DWARF 1.1 and DWARF 2 */
-	.debug_aranges  0 : { *(.debug_aranges) }
-	.debug_pubnames 0 : { *(.debug_pubnames) }
-	/* DWARF 2 */
-	.debug_info     0 : { *(.debug_info) }
-	.debug_abbrev   0 : { *(.debug_abbrev) }
-	.debug_line     0 : { *(.debug_line) }
-	.debug_frame    0 : { *(.debug_frame) }
-	.debug_str      0 : { *(.debug_str) }
-	.debug_loc      0 : { *(.debug_loc) }
-	.debug_macinfo  0 : { *(.debug_macinfo) }
-
-	.text	:
-	{
-		__vector_start = .;	
-		cpu/arc/vector.o (.vector) 
-		*(.vector);
-		. = 0x200;
-		__vector_end = .;
-
-		__text_start = .;
-	  	cpu/arc/start.o	(.text) 
-	  	*(.text)	
-	}
-	. = ALIGN(4);
-	__text_end = .;
-
-	__data_start = .;
-
-	.rodata : { *(.rodata) }
-	
-	. = ALIGN(4);
-	
-	.data : { *(.data) }
-
-	. = ALIGN(4);
-
-	.got : { *(.got) }
-	
-	. = ALIGN(4);
-
-	__u_boot_cmd_start = .;
-
-	.u_boot_cmd : { *(.u_boot_cmd) }
-
-	__u_boot_cmd_end = .;
-
-	. = ALIGN(4);
-	
-	__data_end = .;
-
-	__bss_start = .;
-
-	.bss : { *(.bss) }
-
-	__bss_end = .;
-}
diff --git a/board/ruby/Makefile b/board/ruby/Makefile
new file mode 100644
index 0000000..977ad76
--- /dev/null
+++ b/board/ruby/Makefile
@@ -0,0 +1,94 @@
+#########################################################################
+
+include $(TOPDIR)/config.mk
+
+CFLAGS += -Wall -Werror
+
+RTL8367B_SRC=./rtl8367b
+
+LIB	= lib$(BOARD).a
+
+OBJS	:= \
+	ruby.o \
+	ddr.o \
+	board_cfg.o \
+	timer.o \
+	serial.o \
+	progress.o \
+	gpio.o \
+	reset.o \
+	intr.o \
+	arasan-emac-ahb.o \
+	pcie.o \
+	ar8236.o \
+	ar8237.o \
+	info.o \
+	spi_flash.o \
+	spi_api.o \
+	cmd_qtnboot.o \
+	cmd_qtnboard.o \
+	uc.o \
+	cmd_memtest.o \
+	tftp_bootp_loop.o \
+	pcie2.o \
+	$(RTL8367B_SRC)/rtl8367b_init.o \
+	$(RTL8367B_SRC)/rtl8367b_api.o \
+	$(RTL8367B_SRC)/rtl8367b_smi.o
+
+ifneq ($(filter topaz_amber_medium_config, $(board_config)),)
+OBJS += amber_uboot.o
+endif
+
+SOBJS	:= \
+	vectors.o \
+	flip.o \
+	start.o \
+	newlib_memcpy-700.o \
+	newlib_memcmp.o \
+	newlib_memset.o \
+	newlib_io_copy.o
+
+UC_OBJS	:= \
+	muc.o \
+	dsp.o \
+	uc_start.o \
+	muc_start.o \
+	dsp_start.o
+
+$(LIB):	$(OBJS) $(SOBJS) uc_objs
+	$(AR) crv $@ $(OBJS) $(SOBJS) $(UC_OBJS)
+
+clean:
+	rm -f $(SOBJS) $(OBJS) $(UC_OBJS)
+
+distclean:	clean
+	rm -f $(LIB) core *.bak .depend
+
+$(obj)u-boot.lds: u-boot.lds.S force
+	$(CPP) -I../../../ -I../../ $(CPPFLAGS) -D__ASSEMBLY__ -P $< > $@
+
+.PHONY: force
+
+#########################################################################
+
+# TODO: implement dependency to MuC/DSP code (now it is compiled each time make run)
+UC_C_FLAGS = $(PLATFORM_CPPFLAGS_PATH) -I$(TOPDIR)/../include/qtn -I$(TOPDIR)/include -fno-builtin -ffreestanding -nostdinc -isystem $(gccincdir) -D__KERNEL__ -Os -mno-volatile-cache -mno-sdata
+UC_ASM_FLAGS = $(UC_C_FLAGS) -D__ASSEMBLY__
+MUC_FLAGS = -mA7
+DSP_FLAGS = -mA6
+
+uc_objs:
+	$(CC) $(UC_ASM_FLAGS) $(DSP_FLAGS) -c dsp_start.S
+	$(CC) $(UC_ASM_FLAGS) $(MUC_FLAGS) -c muc_start.S
+	$(CC) $(UC_ASM_FLAGS) -c uc_start.S
+	$(CC) $(UC_C_FLAGS) $(DSP_FLAFS) -c dsp.c
+	$(CC) $(UC_C_FLAGS) $(MUC_FLAGS) -c muc.c
+
+#########################################################################
+
+.depend:	Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
+		$(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+
+-include .depend
+
+#########################################################################
diff --git a/board/ruby/amber_uboot.c b/board/ruby/amber_uboot.c
new file mode 100644
index 0000000..55bba6f
--- /dev/null
+++ b/board/ruby/amber_uboot.c
@@ -0,0 +1,48 @@
+/*
+ * (C) Copyright 2015 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <asm/arch/platform.h>
+#include <asm/io.h>
+#include <amber.h>
+#include "ruby.h"
+
+int amber_trigger_wifi2soc_interrupt(unsigned long interrupt_code)
+{
+	unsigned long interrupt_errors_mask = readl(TOPAZ_AMBER_WIFI2SOC_MASK_REG);
+
+	interrupt_code &= interrupt_errors_mask;
+
+	if (interrupt_code == 0) {
+		return 0;
+	}
+
+
+	while (readl(TOPAZ_AMBER_WIFI2SOC_ERROR_REG) & interrupt_errors_mask);
+
+	writel(interrupt_code, TOPAZ_AMBER_WIFI2SOC_ERROR_REG);
+	gpio_output(TOPAZ_AMBER_WIFI2SOC_INT_OUTPUT, 1);
+	udelay(1);
+	gpio_output(TOPAZ_AMBER_WIFI2SOC_INT_OUTPUT, 0);
+	return 0;
+}
+
diff --git a/board/ruby/ar8236.c b/board/ruby/ar8236.c
new file mode 100644
index 0000000..1c18a93
--- /dev/null
+++ b/board/ruby/ar8236.c
@@ -0,0 +1,348 @@
+/*
+ *  board/ums/ar8236.c
+ *
+ *  U-Boot driver for the Atheros 8236 switch.
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2009.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/********************************************************************
+    Atheros 8236 MDIO programming details
+    The Arasan MDIO IP on our chip uses two registers to program
+    MDIO.
+    
+    data[16:0]
+    control
+    1   1111   1    00000   00000   
+    5   4321   0    98765   43210
+    -   ----   --   -----   -----
+    st  xxxx   op   reg     phy
+    
+    st: 1 - start, poll for completion
+    op: 1 - read, 0 write
+    
+    
+    These are encoded into the serial MDIO protocol as follows
+    
+    IEEE MDIO frame
+    33 22   22222   22211   11  1111110000000000
+    10 98   76543   21098   76  5432109876543210
+    -- --   -----   -----   --  ----------------
+    ST OP   PHY     REG     TA  DATA[15:0]
+    
+    TA and ST are encoded automatically by Arasan IP.
+    
+    
+    This device uses 18 bits to specify register addresses.
+    These bits are programmed into the device by paging as follows.
+    
+    aaaaaaaaa   aaaaaaaa   aa
+    111111111   00000000   00
+    876543210   98765432   10
+    ---------   --------   ------
+    page addr   reg addr   ignore
+    
+    Since the registers are all 32-bit, the lower two address
+    bits are discarded.  The page is written first using the
+    following format.  Note PHY is limited to three bits.
+    
+    8213 Page program command
+    -----------------------------------------------
+    33  22  22   222  22211   11  111111 0000000000
+    10  98  76   543  21098   76  543210 9876543210
+    --  --  --   ---  -----   --  ------ ----------
+    ST  OP  CMD  PHY  xxxxx   TA  xxxxxx page addr      
+    
+    CMD: 11 - page address write
+    CMD: 10 - reg access
+    
+    The tricky part is the reg access step following page programming
+    Since the register format of arasan swaps the order of reg and
+    phy, and since our register address spans these two fields, we
+    have to swizzle the bits into place.
+
+    8213 Reg read/write command
+    ------------------------------------------------
+    33  22  22    2222221   1   11  1111110000000000
+    10  98  76    5432109   8   76  5432109876543210
+    --  --  --    -------   -   --  ----------------
+    ST  OP  CMD   reg adr   W   TA  DATA[15:0]      
+    
+    W: 0 - lower 16 bits, 1: upper 16 bits
+    
+    Programming this operation into Arasan requires
+    
+    phy = 'b10 << 3 | regAddr[9:7]
+    reg = regAddr[6:2]
+    
+    mdioCmd = phy | reg << 5 | op | start
+    
+    
+********************************************************************/
+////////////////////////////////////////////////////////////////////
+// NOTE - we do not check for valid base in mdio access routines
+// use must ensure device is initialized and valid prior
+// to using MDIO funtions
+///////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////
+//      Includes
+////////////////////////////////////////////////////////////////////
+#include "ruby.h"
+#include <common.h>
+#include <malloc.h>
+#include <net.h>
+#include <asm/io.h>
+#include <asm/arch/platform.h>
+#include <asm/arch/arasan_emac_ahb.h>
+#include "ar8236.h"
+
+////////////////////////////////////////////////////////////////////
+//      Defines
+////////////////////////////////////////////////////////////////////
+#define AR8236_MODE_CTRL            (0x04)
+#define AR8236_MODE_MII_PHY         (0x80000600)
+#define AR8236_MODE_MII_MAC         (0x80000004)
+#define AR8236_MASK_CTL             (0)
+#define AR8236_MASK_CTL_RESET       (0x80000000)
+#define AR8236_FLOOD_MASK           (0x2c)
+#define AR8236_FLOOD_MASK_DEF       (0xfe7f007f)
+#define AR8236_PORT0_CTRL           (0x100)
+#define AR8236_PORT0_CTRL_DEF       (0x7d)
+#define AR8236_FLOW_LINK_EN         (0x1000)
+
+#define AR8236_MDIO_START           (1 << 15)
+#define AR8236_MDIO_WRITE           (0 << 10)
+#define AR8236_MDIO_READ            (1 << 10)
+#define AR8236_MDIO_HIGH_WORD       (1 << 0)
+
+#define AR8236_MDIO_TIMEOUT         (0x1000)
+#define AR8236_MDIO_PAGE            (0x18)
+#define AR8236_MDIO_NORM            (0x10)
+
+#define AR8236_ARP_LEAKY_EN         (1 << 22)
+#define AR8236_LEARN_EN             (1 << 14)
+#define AR8236_FORWARD              (1 << 2)
+
+#define AR8236_MIN_PHY_NUM          (0)
+#define AR8236_MAX_PHY_NUM          (4)
+
+////////////////////////////////////////////////////////////////////
+//      Types
+////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////
+//      Data
+////////////////////////////////////////////////////////////////////
+static ts8236 g8236Dev;
+extern int mdc_clk_divisor;
+
+////////////////////////////////////////////////////////////////////
+//      Functions
+////////////////////////////////////////////////////////////////////
+
+inline u32 ar8236_emac_rdreg(int reg)
+{
+	return *(volatile u32 *)(g8236Dev.base + reg);
+}
+
+inline void ar8236_emac_wrreg(int reg, u32 val)
+{
+	*(volatile u32 *)(g8236Dev.base + reg) = val;
+}
+
+/*********************************************************************
+ Name:      ar8236_mdio_poll
+ Purpose:   mdio poll routine for AR8236 device
+ Notes:     Checks for mdio operation complete
+*********************************************************************/
+int ar8236_mdio_poll(void)
+{
+	u32 timeout = AR8236_MDIO_TIMEOUT;
+
+	// check for clear MDIO status
+	while (timeout--) {
+		int status = ar8236_emac_rdreg(EMAC_MAC_MDIO_CTRL);
+		if ((status & AR8236_MDIO_START) == 0) {
+			break;
+		}
+	}
+	if (timeout == 0) {
+		printf("ar8236 mdio timeout\n");
+		return -1;
+	}
+	return 0;
+}
+
+/*********************************************************************
+ Name:      ar8236_mdio_write
+ Purpose:   mdio write routine for AR8236 device
+ Notes:     This is a partial blocking call since we require
+            more than one cycle to complete the write.
+            checks for completion first
+*********************************************************************/
+int ar8236_mdio_write(u32 phyAddr, u32 regAddr, u32 data)
+{
+	u32 highAddr = regAddr >> 9;
+	// need to swizzle the bits into arasan's fields which are different          
+	u32 rg = (regAddr & 0x3c) >> 1;
+	u32 ph = (regAddr & 0x1c0) >> 6;
+
+	// check for clear MDIO status
+	if (ar8236_mdio_poll() != 0) {
+		return -1;
+	}
+
+	ar8236_emac_wrreg(EMAC_MAC_MDIO_DATA, highAddr);
+	ar8236_emac_wrreg(EMAC_MAC_MDIO_CTRL, (phyAddr & 0x1f) |
+			  ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			  AR8236_MDIO_START | AR8236_MDIO_PAGE);
+
+	// wait for completion
+	if (ar8236_mdio_poll() != 0) {
+		return -1;
+	}
+
+	ar8236_emac_wrreg(EMAC_MAC_MDIO_DATA, (data >> 16) & 0xffff);
+	ar8236_emac_wrreg(EMAC_MAC_MDIO_CTRL,
+			  ((rg | AR8236_MDIO_HIGH_WORD) << 5) | ph |
+			  ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			  AR8236_MDIO_START | AR8236_MDIO_NORM);
+	if (ar8236_mdio_poll() != 0) {
+		return -1;
+	}
+
+	ar8236_emac_wrreg(EMAC_MAC_MDIO_DATA, data & 0xffff);
+	ar8236_emac_wrreg(EMAC_MAC_MDIO_CTRL,
+			  (rg << 5) | ph | AR8236_MDIO_START |
+			  ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			  AR8236_MDIO_NORM);
+	if (ar8236_mdio_poll() != 0) {
+		return -1;
+	}
+
+	// return without waiting for final completion
+	return 0;
+}
+
+/*********************************************************************
+ Name:      ar8236_mdio_read
+ Purpose:   mdio read routine for AR8236 device
+ Notes:     This is a blocking call since we require
+            more than one cycle to complete the write.
+            checks for completion first
+*********************************************************************/
+int ar8236_mdio_read(u32 phyAddr, u32 regAddr, u32 * data)
+{
+	u32 highAddr = regAddr >> 9;
+	// need to swizzle the bits into arasan's fields which are different          
+	u32 rg = (regAddr & 0x3c) >> 1;
+	u32 ph = (regAddr & 0x1c0) >> 6;
+
+	if (ar8236_mdio_poll() != 0) {
+		return -1;
+	}
+
+	ar8236_emac_wrreg(EMAC_MAC_MDIO_DATA, highAddr);
+	ar8236_emac_wrreg(EMAC_MAC_MDIO_CTRL, phyAddr | AR8236_MDIO_START |
+			  ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			  AR8236_MDIO_PAGE);
+	if (ar8236_mdio_poll() != 0) {
+		return -1;
+	}
+
+	ar8236_emac_wrreg(EMAC_MAC_MDIO_CTRL, (rg << 5) | AR8236_MDIO_START |
+			  ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			  AR8236_MDIO_READ | ph | AR8236_MDIO_NORM);
+	if (ar8236_mdio_poll() != 0) {
+		return -1;
+	}
+
+	*data = ar8236_emac_rdreg(EMAC_MAC_MDIO_DATA);
+
+	ar8236_emac_wrreg(EMAC_MAC_MDIO_CTRL,
+			  ((rg | AR8236_MDIO_HIGH_WORD) << 5) |
+			  ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			  AR8236_MDIO_START | AR8236_MDIO_READ | ph |
+			  AR8236_MDIO_NORM);
+	if (ar8236_mdio_poll() != 0) {
+		return -1;
+	}
+
+	*data = *data | (ar8236_emac_rdreg(EMAC_MAC_MDIO_DATA) << 16);
+	return 0;
+}
+
+/*********************************************************************
+ Name:      ar8236_init
+ Purpose:   Check for Atheros 8236 switch, return pointer to device
+            if found, NULL otherwise 
+ Notes:     pass phy addr as -1 to scan for phy
+*********************************************************************/
+u32 ar8236_init(u32 baseAddr, u32 phy_addr)
+{
+	u32 addr;
+	u32 devID;
+	g8236Dev.base = baseAddr;
+
+	// need to scan?
+	if (phy_addr >=EMAC_PHY_ADDR_SCAN) {
+		addr = AR8236_MIN_PHY_NUM;
+	} else {
+		if (phy_addr >= AR8236_MAX_PHY_NUM) {
+			printf("config error: phy addr out of range\n");
+			return EMAC_PHY_ADDR_SCAN;
+		}
+		addr = phy_addr;
+	}
+
+	while (addr <  AR8236_MAX_PHY_NUM) {
+		uint32_t reset = AR8236_MASK_CTL_RESET;
+		ar8236_mdio_read(addr, AR8236_MASK_CTL, &devID);
+		if ((devID & 0xff00) == 0x300) {
+			printf("Detected AR8236 Switch %d:%x - set for MII, 100FD\n",addr,devID);
+
+			// do a softreset
+			ar8236_mdio_write(phy_addr, AR8236_MODE_CTRL,
+					  AR8236_MODE_MII_PHY);
+
+			// do a clean reset and wait for completion 
+			ar8236_mdio_write(phy_addr, AR8236_MASK_CTL,
+					  AR8236_MASK_CTL_RESET);
+			while (reset & AR8236_MASK_CTL_RESET) {
+				ar8236_mdio_read(addr, AR8236_MASK_CTL, &reset);
+			}
+			ar8236_mdio_write(phy_addr, AR8236_FLOOD_MASK,
+					  AR8236_FLOOD_MASK_DEF);
+			ar8236_mdio_write(phy_addr, AR8236_PORT0_CTRL,
+					  AR8236_PORT0_CTRL_DEF);
+			g8236Dev.phy = addr;
+
+			return addr;
+		}
+		if (phy_addr == MAX_PHY_ADDR) {
+			addr++;
+		} else {
+			// not found on passed addr
+			break;
+		}
+	}
+	printf("Error: AR8236 not found\n");
+	return EMAC_PHY_ADDR_SCAN;
+}
diff --git a/board/ruby/ar8236.h b/board/ruby/ar8236.h
new file mode 100644
index 0000000..ee9ca2e
--- /dev/null
+++ b/board/ruby/ar8236.h
@@ -0,0 +1,72 @@
+#ifndef __AR8236_h__
+#define __AR8236_h__
+/*
+ *  board/ums/ar8236.h
+ *
+ *  U-Boot driver for the Atheros 8236 switch.
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2009.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+////////////////////////////////////////////////////////////////////
+// NOTE - we do not check for valid base in mdio access routines
+// use must ensure device is initialized and valid prior
+// to using MDIO funtions
+///////////////////////////////////////////////////////////////////
+
+typedef struct {
+    u32 base;
+    u32 phy;
+}ts8236,*pts8236;
+
+#define MAX_PHY_ADDR 32
+/*********************************************************************
+ Name:      ar8236_init
+ Purpose:   Check for Atheros 8236 switch, return pointer to device
+            if found, NULL otherwise 
+ Notes:     pass phy addr as -1 to scan for phy
+*********************************************************************/
+u32 ar8236_init(u32 baseAddr, u32 phy_addr);
+
+/*********************************************************************
+ Name:      ar8236_mdio_read
+ Purpose:   mdio read routine for AR8236 device
+ Notes:     This is a blocking call since we require
+            more than one cycle to complete the write.
+            checks for completion first
+*********************************************************************/
+int ar8236_mdio_read(u32 phyAddr, u32 regAddr, u32 *data);
+
+/*********************************************************************
+ Name:      ar8236_mdio_write
+ Purpose:   mdio write routine for AR8236 device
+ Notes:     This is a partial blocking call since we require
+            more than one cycle to complete the write.
+            checks for completion first
+*********************************************************************/
+int ar8236_mdio_write(u32 phyAddr, u32 regAddr, u32 data);
+
+/*********************************************************************
+ Name:      ar8236_mdio_poll
+ Purpose:   mdio poll routine for AR8236 device
+ Notes:     Checks for mdio operation complete
+*********************************************************************/
+int ar8236_mdio_poll(void);
+
+#endif // __AR8236_h__
diff --git a/board/ruby/ar8237.c b/board/ruby/ar8237.c
new file mode 100755
index 0000000..08e39aa
--- /dev/null
+++ b/board/ruby/ar8237.c
@@ -0,0 +1,353 @@
+/*
+ *  board/ums/ar8237.c
+ *
+ *  U-Boot driver for the Atheros 8237 switch.
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2009.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/********************************************************************
+    Atheros 8237 MDIO programming details
+    The Arasan MDIO IP on our chip uses two registers to program
+    MDIO.
+    
+    data[16:0]
+    control
+    1   1111   1    00000   00000   
+    5   4321   0    98765   43210
+    -   ----   --   -----   -----
+    st  xxxx   op   reg     phy
+    
+    st: 1 - start, poll for completion
+    op: 1 - read, 0 write
+    
+    
+    These are encoded into the serial MDIO protocol as follows
+    
+    IEEE MDIO frame
+    33 22   22222   22211   11  1111110000000000
+    10 98   76543   21098   76  5432109876543210
+    -- --   -----   -----   --  ----------------
+    ST OP   PHY     REG     TA  DATA[15:0]
+    
+    TA and ST are encoded automatically by Arasan IP.
+    
+    
+    This device uses 18 bits to specify register addresses.
+    These bits are programmed into the device by paging as follows.
+    
+    aaaaaaaaa   aaaaaaaa   aa
+    111111111   00000000   00
+    876543210   98765432   10
+    ---------   --------   ------
+    page addr   reg addr   ignore
+    
+    Since the registers are all 32-bit, the lower two address
+    bits are discarded.  The page is written first using the
+    following format.  Note PHY is limited to three bits.
+    
+    8213 Page program command
+    -----------------------------------------------
+    33  22  22   222  22211   11  111111 0000000000
+    10  98  76   543  21098   76  543210 9876543210
+    --  --  --   ---  -----   --  ------ ----------
+    ST  OP  CMD  PHY  xxxxx   TA  xxxxxx page addr      
+    
+    CMD: 11 - page address write
+    CMD: 10 - reg access
+    
+    The tricky part is the reg access step following page programming
+    Since the register format of arasan swaps the order of reg and
+    phy, and since our register address spans these two fields, we
+    have to swizzle the bits into place.
+
+    8213 Reg read/write command
+    ------------------------------------------------
+    33  22  22    2222221   1   11  1111110000000000
+    10  98  76    5432109   8   76  5432109876543210
+    --  --  --    -------   -   --  ----------------
+    ST  OP  CMD   reg adr   W   TA  DATA[15:0]      
+    
+    W: 0 - lower 16 bits, 1: upper 16 bits
+    
+    Programming this operation into Arasan requires
+    
+    phy = 'b10 << 3 | regAddr[9:7]
+    reg = regAddr[6:2]
+    
+    mdioCmd = phy | reg << 5 | op | start
+    
+    
+********************************************************************/
+////////////////////////////////////////////////////////////////////
+// NOTE - we do not check for valid base in mdio access routines
+// use must ensure device is initialized and valid prior
+// to using MDIO funtions
+///////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////
+//      Includes
+////////////////////////////////////////////////////////////////////
+#include "ruby.h"
+#include <common.h>
+#include <malloc.h>
+#include <net.h>
+#include <asm/io.h>
+#include <asm/arch/platform.h>
+#include <asm/arch/arasan_emac_ahb.h>
+#include "ar8237.h"
+
+////////////////////////////////////////////////////////////////////
+//      Defines
+////////////////////////////////////////////////////////////////////
+#define AR8237_MASK_CTL             (0)
+#define AR8237_MASK_CTL_RESET       (0x80000000)
+#define AR8237_MASK_CLEAR_DEF       (0)
+#define AR8237_MODE_CTRL            (0x04)
+#define AR8237_MODE_RGMII_PHY     (0x07600000)
+//#define AR8237_MODE_RGMII_PHY       (0x07402000)
+#define AR8237_PWS_CTRL             (0x10)
+#define AR8237_PWS_CTRL_DEF         (0x40000000)
+#define AR8237_FWCTL_CTRL           (0x0624)
+#define AR8237_FWCTL_CTRL_DEF       (0x007f7f7f)
+#define AR8237_PORT6_CTRL           (0xc)
+#define AR8237_PORT6_CTRL_DEF       (0x01000000)
+#define AR8237_PORT0_CTRL           (0x7c)
+#define AR8237_PORT0_CTRL_DEF       (0x7e)
+
+#define AR8237_MDIO_START           (1 << 15)	
+#define AR8237_MDIO_WRITE           (0 << 10)
+#define AR8237_MDIO_READ            (1 << 10)
+#define AR8237_MDIO_HIGH_WORD       (1 << 0)
+
+#define AR8237_MDIO_TIMEOUT         (0x1000)
+#define AR8237_MDIO_PAGE            (0x18)
+#define AR8237_MDIO_NORM            (0x10)
+
+#define AR8237_MIN_PHY_NUM          (0)
+#define AR8237_MAX_PHY_NUM          (4)
+
+////////////////////////////////////////////////////////////////////
+//      Types
+////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////
+//      Data
+////////////////////////////////////////////////////////////////////
+static ts8237 g8237Dev;
+extern int mdc_clk_divisor;
+
+////////////////////////////////////////////////////////////////////
+//      Functions
+////////////////////////////////////////////////////////////////////
+
+inline u32 ar8237_emac_rdreg(int reg)
+{
+	return *(volatile u32 *)(g8237Dev.base + reg);
+}
+
+inline void ar8237_emac_wrreg(int reg, u32 val)
+{
+	*(volatile u32 *)(g8237Dev.base + reg) = val;
+}
+
+/*********************************************************************
+ Name:      ar8237_mdio_poll
+ Purpose:   mdio poll routine for AR8237 device
+ Notes:     Checks for mdio operation complete
+*********************************************************************/
+int ar8237_mdio_poll(void)
+{
+	u32 timeout = AR8237_MDIO_TIMEOUT;
+
+	// check for clear MDIO status
+	while (timeout--) {
+		int status = ar8237_emac_rdreg(EMAC_MAC_MDIO_CTRL);
+		if ((status & AR8237_MDIO_START) == 0) {
+			break;
+		}
+	}
+	if (timeout == 0) {
+		printf("ar8237 mdio timeout\n");
+		return -1;
+	}
+	return 0;
+}
+
+/*********************************************************************
+ Name:      ar8237_mdio_write
+ Purpose:   mdio write routine for AR8237 device
+ Notes:     This is a partial blocking call since we require
+            more than one cycle to complete the write.
+            checks for completion first
+*********************************************************************/
+int ar8237_mdio_write(u32 phyAddr, u32 regAddr, u32 data)
+{
+	u32 highAddr = regAddr >> 9;
+	// need to swizzle the bits into arasan's fields which are different          
+	u32 rg = (regAddr & 0x3c) >> 1;
+	u32 ph = (regAddr & 0x1c0) >> 6;
+
+	// check for clear MDIO status
+	if (ar8237_mdio_poll() != 0) {
+		return -1;
+	}
+
+	ar8237_emac_wrreg(EMAC_MAC_MDIO_DATA, highAddr);
+	ar8237_emac_wrreg(EMAC_MAC_MDIO_CTRL, (phyAddr & 0x1f) |
+			  ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			  AR8237_MDIO_START | AR8237_MDIO_PAGE);
+
+	// wait for completion
+	if (ar8237_mdio_poll() != 0) {
+		return -1;
+	}
+
+	ar8237_emac_wrreg(EMAC_MAC_MDIO_DATA, (data >> 16) & 0xffff);
+	ar8237_emac_wrreg(EMAC_MAC_MDIO_CTRL,
+			  ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			  ((rg | AR8237_MDIO_HIGH_WORD) << 5) | ph |
+			  AR8237_MDIO_START | AR8237_MDIO_NORM);
+	if (ar8237_mdio_poll() != 0) {
+		return -1;
+	}
+
+	ar8237_emac_wrreg(EMAC_MAC_MDIO_DATA, data & 0xffff);
+	ar8237_emac_wrreg(EMAC_MAC_MDIO_CTRL,
+			  ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			  (rg << 5) | ph | AR8237_MDIO_START |
+			  AR8237_MDIO_NORM);
+	if (ar8237_mdio_poll() != 0) {
+		return -1;
+	}
+
+	// return without waiting for final completion
+	return 0;
+}
+
+/*********************************************************************
+ Name:      ar8237_mdio_read
+ Purpose:   mdio read routine for AR8237 device
+ Notes:     This is a blocking call since we require
+            more than one cycle to complete the write.
+            checks for completion first
+*********************************************************************/
+int ar8237_mdio_read(u32 phyAddr, u32 regAddr, u32 * data)
+{
+	u32 highAddr = regAddr >> 9;
+	// need to swizzle the bits into arasan's fields which are different          
+	u32 rg = (regAddr & 0x3c) >> 1;
+	u32 ph = (regAddr & 0x1c0) >> 6;
+
+	if (ar8237_mdio_poll() != 0) {
+		return -1;
+	}
+
+	ar8237_emac_wrreg(EMAC_MAC_MDIO_DATA, highAddr);
+	ar8237_emac_wrreg(EMAC_MAC_MDIO_CTRL, phyAddr | AR8237_MDIO_START |
+			  ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			  AR8237_MDIO_PAGE);
+	if (ar8237_mdio_poll() != 0) {
+		return -1;
+	}
+
+	ar8237_emac_wrreg(EMAC_MAC_MDIO_CTRL, (rg << 5) | AR8237_MDIO_START |
+			  ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			  AR8237_MDIO_READ | ph | AR8237_MDIO_NORM);
+	if (ar8237_mdio_poll() != 0) {
+		return -1;
+	}
+
+	*data = ar8237_emac_rdreg(EMAC_MAC_MDIO_DATA);
+
+	ar8237_emac_wrreg(EMAC_MAC_MDIO_CTRL,
+			  ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			  ((rg | AR8237_MDIO_HIGH_WORD) << 5) |
+			  AR8237_MDIO_START | AR8237_MDIO_READ | ph |
+			  AR8237_MDIO_NORM);
+	if (ar8237_mdio_poll() != 0) {
+		return -1;
+	}
+
+	*data = *data | (ar8237_emac_rdreg(EMAC_MAC_MDIO_DATA) << 16);
+	return 0;
+}
+
+/*********************************************************************
+ Name:      ar8237_init
+ Purpose:   Check for Atheros 8237 switch, return pointer to device
+            if found, NULL otherwise 
+ Notes:     pass phy addr as -1 to scan for phy
+*********************************************************************/
+u32 ar8237_init(u32 baseAddr, u32 phy_addr)
+{
+	u32 addr;
+	u32 devID;
+	g8237Dev.base = baseAddr;
+
+	// need to scan?
+	if (phy_addr >=EMAC_PHY_ADDR_SCAN) {
+		addr = AR8237_MIN_PHY_NUM;
+	} else {
+		if (phy_addr >= AR8237_MAX_PHY_NUM) {
+			printf("config error: phy addr out of range\n");
+			return EMAC_PHY_ADDR_SCAN;
+		}
+		addr = phy_addr;
+	}
+
+	while (addr <  AR8237_MAX_PHY_NUM) {
+		uint32_t reset = AR8237_MASK_CTL_RESET;
+		ar8237_mdio_read(addr, AR8237_MASK_CTL, &devID);
+		if ((devID & 0xff00) == 0x1200) {
+			printf("Detected AR8237 Switch %d - set for RGMII, 1000FD\n",addr);
+
+			// do a softreset
+			ar8237_mdio_write(phy_addr, AR8237_MODE_CTRL,  AR8237_MODE_RGMII_PHY);
+
+			// do a clean reset and wait for completion 
+			ar8237_mdio_write(phy_addr, AR8237_MASK_CTL, AR8237_MASK_CTL_RESET);
+			while (reset & AR8237_MASK_CTL_RESET) {
+				ar8237_mdio_read(addr, AR8237_MASK_CTL, &reset);
+			}
+
+			ar8237_mdio_write(phy_addr, AR8237_MASK_CTL, AR8237_MASK_CLEAR_DEF);	
+
+
+			ar8237_mdio_write(phy_addr, AR8237_PWS_CTRL, AR8237_PWS_CTRL_DEF);
+			ar8237_mdio_write(phy_addr, AR8237_FWCTL_CTRL, AR8237_FWCTL_CTRL_DEF);
+			ar8237_mdio_write(phy_addr, AR8237_PORT6_CTRL, AR8237_PORT6_CTRL_DEF);
+			ar8237_mdio_write(phy_addr, AR8237_PORT0_CTRL, AR8237_PORT0_CTRL_DEF);
+			g8237Dev.phy = addr;
+
+			//set the register 0xe00000b4 for RGMII Dll control register
+			*(volatile u32 *)(0xe00000b4) = 0x86868f8f;
+
+			return addr;
+		}
+		if (phy_addr == MAX_PHY_ADDR) {
+			addr++;
+		} else {
+			// not found on passed addr
+			break;
+		}
+	}
+	printf("Error: AR8237 not found\n");
+	return EMAC_PHY_ADDR_SCAN;
+}
diff --git a/board/ruby/ar8237.h b/board/ruby/ar8237.h
new file mode 100755
index 0000000..571e6a3
--- /dev/null
+++ b/board/ruby/ar8237.h
@@ -0,0 +1,72 @@
+#ifndef __AR8237_h__
+#define __AR8237_h__
+/*
+ *  board/ums/ar8237.h
+ *
+ *  U-Boot driver for the Atheros 8237 switch.
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2009.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+////////////////////////////////////////////////////////////////////
+// NOTE - we do not check for valid base in mdio access routines
+// use must ensure device is initialized and valid prior
+// to using MDIO funtions
+///////////////////////////////////////////////////////////////////
+
+typedef struct {
+    u32 base;
+    u32 phy;
+}ts8237,*pts8237;
+
+#define MAX_PHY_ADDR 32
+/*********************************************************************
+ Name:      ar8237_init
+ Purpose:   Check for Atheros 8237 switch, return pointer to device
+            if found, NULL otherwise 
+ Notes:     pass phy addr as -1 to scan for phy
+*********************************************************************/
+u32 ar8237_init(u32 baseAddr, u32 phy_addr);
+
+/*********************************************************************
+ Name:      ar8237_mdio_read
+ Purpose:   mdio read routine for AR8237 device
+ Notes:     This is a blocking call since we require
+            more than one cycle to complete the write.
+            checks for completion first
+*********************************************************************/
+int ar8237_mdio_read(u32 phyAddr, u32 regAddr, u32 *data);
+
+/*********************************************************************
+ Name:      ar8237_mdio_write
+ Purpose:   mdio write routine for AR8237 device
+ Notes:     This is a partial blocking call since we require
+            more than one cycle to complete the write.
+            checks for completion first
+*********************************************************************/
+int ar8237_mdio_write(u32 phyAddr, u32 regAddr, u32 data);
+
+/*********************************************************************
+ Name:      ar8237_mdio_poll
+ Purpose:   mdio poll routine for AR8237 device
+ Notes:     Checks for mdio operation complete
+*********************************************************************/
+int ar8237_mdio_poll(void);
+
+#endif // __AR8237_h__
diff --git a/board/ruby/arasan-emac-ahb.c b/board/ruby/arasan-emac-ahb.c
new file mode 100644
index 0000000..d70bf7e
--- /dev/null
+++ b/board/ruby/arasan-emac-ahb.c
@@ -0,0 +1,1266 @@
+/*
+ *  board/ums/arasan-emac-ahb.c
+ *
+ *  U-Boot driver for the Arasan EMAC-AHB Gigabit Ethernet controller.
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2007.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <common.h>
+#include <malloc.h>
+#include <net.h>
+#include <asm/io.h>
+#include <command.h>
+
+#ifdef CONFIG_ARASAN_GBE
+
+#include "ruby.h"
+#include <asm/arch/platform.h>
+#include "ar8236.h"
+#include "ar8237.h"
+#include "rtl8367b/rtl8367b_init.h"
+#include "ruby_board_cfg.h"
+#include "board_cfg.h"
+#include <asm/arch/arasan_emac_ahb.h>
+
+#ifdef UBOOT_ENABLE_ETHERNET_DEBUG
+#define DPRINTF(x...) printf(x)
+#else
+#define DPRINTF(x...)
+#endif
+
+
+#define RTL8211DS_PAGSEL	0x1F	/* Page mode slelect */
+#define PAGSEL_PAGEXT		0x7		/* Switch to extension page */
+#define PAGSEL_PAG0			0x0     /* Switch to page 0 */
+
+#define RTL8211DS_PAGNO		0x1E	/* Page number */
+#define PAGNO_140			0x8c	/* Page 140 */
+
+#define RTL8211DS_RXCONFIG	0x18	/* Tx config ( phy -> mac) */
+#define RXCONFIG_LINK		0x8000
+#define RXCONFIG_DUPLEX		0x1000
+#define RXCONFIG_SPEED		0x0c00
+#define RXCONFIG_SPEED_BIT	10
+
+#define RTL8211DS_SDSR		0x16	/* SerDes register */
+#define SDSR_SPEED			0x3000	/* Rx speed */
+#define SDSR_1000			0x2000
+#define SDSR_100			0x1000
+#define SDSR_10				0x0000
+
+
+#define MAC_IS_MULTICAST(addr) ((addr)[0] & 0x1)
+
+#if (defined(EMAC_SWITCH)) && ((defined(EMAC_BOND_MASTER)))
+#error EMAC_SWITCH and EMAC_BOND_MASTER can not be defined the same time
+#endif
+int mdc_clk_divisor = 1;
+static int emac_phy_init(struct emac_private *priv);
+
+
+static inline unsigned long emac_align_begin(unsigned long addr)
+{
+	return (addr & (~(ARC_DCACHE_LINE_LEN - 1)));
+}
+
+static inline unsigned long emac_align_end(unsigned long addr)
+{
+	unsigned long aligned = (addr & (~(ARC_DCACHE_LINE_LEN - 1)));
+	if (aligned != addr) {
+		aligned += ARC_DCACHE_LINE_LEN;
+	}
+	return aligned;
+}
+
+static inline void emac_cache_inv(unsigned long begin, unsigned long end)
+{
+	invalidate_dcache_range(
+		emac_align_begin(begin),
+		emac_align_end(end));
+}
+
+static inline void emac_cache_flush(unsigned long begin, unsigned long end)
+{
+	flush_and_inv_dcache_range( /* flush _and_ invalidate to free few cache entries as we are not going to read them back */
+		emac_align_begin(begin),
+		emac_align_end(end));
+}
+
+
+/* 8 byte alignment required as DMA is operating in 64 bit mode.
+   ARC_DCACHE_LINE_LEN alignment used to have safe cache invalidate/flush.
+   As ARC_DCACHE_LINE_LEN is 32, both requirements are satisfied.
+*/
+static volatile struct emac_desc tx_ring_0[1] __attribute__ ((aligned (ARC_DCACHE_LINE_LEN)));
+static volatile struct emac_desc rx_ring_0[NUM_RX_BUFS] __attribute__ ((aligned (ARC_DCACHE_LINE_LEN)));
+static volatile u8 tx_buf_0[TX_BUF_SIZE] __attribute__ ((aligned (ARC_DCACHE_LINE_LEN)));
+static volatile u8 rx_bufs_0[NUM_RX_BUFS * RX_BUF_SIZE] __attribute__ ((aligned (ARC_DCACHE_LINE_LEN)));
+
+static volatile struct emac_desc tx_ring_1[1] __attribute__ ((aligned (ARC_DCACHE_LINE_LEN))) ;
+static volatile struct emac_desc rx_ring_1[NUM_RX_BUFS] __attribute__ ((aligned (ARC_DCACHE_LINE_LEN)));
+static volatile u8 tx_buf_1[TX_BUF_SIZE] __attribute__ ((aligned (ARC_DCACHE_LINE_LEN)));
+static volatile u8 rx_bufs_1[NUM_RX_BUFS * RX_BUF_SIZE] __attribute__ ((aligned (ARC_DCACHE_LINE_LEN)));
+
+static struct br_private __g_br_priv = {{0}};
+static struct eth_device __g_br_dev;
+static uint32_t emac_mdio_read(struct emac_private *priv, uint8_t reg);
+static int emac_mdio_write(struct emac_private *priv, uint8_t reg, uint16_t val);
+static struct emac_private_mdio __g_emac_mdio[2] = {
+	{
+		.base = ARASAN_MDIO_BASE,
+		.read = &emac_mdio_read,
+		.write = &emac_mdio_write,
+	},
+	{
+		.base = ARASAN_MDIO_BASE,
+		.read = &emac_mdio_read,
+		.write = &emac_mdio_write,
+	}
+};
+
+#undef ENABLE_LOOPBACK
+#ifdef ENABLE_LOOPBACK
+static uint32_t loopback = 0 ;
+#endif
+
+static struct emac_private __g_emac_priv[2] = {
+	{
+		.tx_bufs = (uintptr_t) &tx_buf_0[0],
+		.rx_bufs = (uintptr_t) &rx_bufs_0[0],
+		.tx_descs = &tx_ring_0[0],
+		.rx_descs = &rx_ring_0[0],
+		.tx_buf_size = TX_BUF_SIZE,
+		.rx_buf_size = RX_BUF_SIZE,
+		.tx_index = 0,
+		.rx_index = 0,
+		.ar8236dev = NULL,
+		.phy_addr = 0,
+		.phy_flags = 0,
+		.emac = 0,
+		.io_base= RUBY_ENET0_BASE_ADDR,
+		.mdio = &__g_emac_mdio[0],
+		.parent = &__g_br_dev,
+	},
+	{
+		.tx_bufs = (uintptr_t) &tx_buf_1[0],
+		.rx_bufs = (uintptr_t) &rx_bufs_1[0],
+		.tx_descs = &tx_ring_1[0],
+		.rx_descs = &rx_ring_1[0],
+		.tx_buf_size = TX_BUF_SIZE,
+		.rx_buf_size = RX_BUF_SIZE,
+		.tx_index = 0,
+		.rx_index = 0,
+		.ar8236dev = NULL,
+		.phy_addr = 0,
+		.phy_flags = 0,
+		.emac = 1,
+		.io_base = RUBY_ENET1_BASE_ADDR,
+		.mdio = &__g_emac_mdio[1],
+		.parent = &__g_br_dev,
+	}
+};
+
+/* Utility functions for reading/writing registers in the Ethernet MAC */
+
+static uint32_t emac_rdreg(uintptr_t base, int reg)
+{
+	return readl(base + reg);
+}
+
+static void emac_wrreg(uintptr_t base, int reg, uint32_t val)
+{
+	writel(val, base + reg);
+}
+
+static void emac_setbits(uintptr_t base, int reg, uint32_t val)
+{
+	emac_wrreg(base, reg, emac_rdreg(base, reg) | val);
+}
+
+static void emac_clrbits(uintptr_t base, int reg, uint32_t val)
+{
+	emac_wrreg(base, reg, emac_rdreg(base, reg) & ~val);
+}
+
+/* Utility functions for driving the MDIO interface to the PHY from the MAC */
+
+static int mdio_operation_complete(uintptr_t base)
+{
+	return !(emac_rdreg(base, EMAC_MAC_MDIO_CTRL) & 0x8000);
+}
+
+int mdio_poll_complete(uintptr_t base)
+{
+	int i = 0;
+
+	while (!mdio_operation_complete(base)) {
+		udelay(1000);
+		if (++i >= 2000) {
+			printf("mdio timeout\n");
+			return -1;
+		}
+	}
+
+	return 0;
+}
+
+void mdio_postrd_raw(uintptr_t base, int phy, int reg)
+{
+	if (mdio_poll_complete(base)) {
+		return;
+	}
+
+	emac_wrreg(base, EMAC_MAC_MDIO_CTRL, (phy & 31) |
+			((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			((reg & 31) << 5) | (1 << 10) | (1 << 15));
+}
+
+int mdio_postwr_raw(uintptr_t base, int phy, int reg, u16 val)
+{
+	if (mdio_poll_complete(base)) {
+		return -1;
+	}
+	emac_wrreg(base, EMAC_MAC_MDIO_DATA, val);
+	emac_wrreg(base, EMAC_MAC_MDIO_CTRL, (phy & 31) |
+			((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift) |
+			((reg & 31) << 5) | (1 << 15));
+	return 0;
+}
+
+/* Check to see if an MDIO posted read command (mdio_postrd) has completed.
+ * Returns the u16 data from the read, or MDIO_READ_FAIL if the data is not available.
+ * Setting "wait" to TRUE makes the command poll until the data is available
+ * or the command times-out.  Setting "wait" to FALSE stops the command
+ * from polling; it only checks if the data is available once.
+ */
+uint32_t mdio_rdval_raw(uintptr_t base, int wait)
+{
+	if (wait) {
+		mdio_poll_complete(base);
+	}
+	if (!mdio_operation_complete(base)) {
+		printf("GMII: MDIO read timed out (%08x)\n",
+				emac_rdreg(base, EMAC_MAC_MDIO_CTRL));
+		return MDIO_READ_FAIL;
+	}
+	return (uint32_t)emac_rdreg(base, EMAC_MAC_MDIO_DATA);
+}
+
+static uint32_t emac_mdio_read(struct emac_private *priv, uint8_t reg)
+{
+	uint32_t val;
+
+	mdio_postrd_raw(priv->mdio->base, priv->phy_addr, reg);
+	if ((val = mdio_rdval_raw(priv->mdio->base, 1)) == MDIO_READ_FAIL) {
+		return MDIO_READ_FAIL;
+	}
+
+	return val;
+}
+
+static int emac_mdio_write(struct emac_private *priv, uint8_t reg, uint16_t val)
+{
+	return mdio_postwr_raw(priv->mdio->base, priv->phy_addr, reg, val);
+}
+
+/* Taken from Linux MII support.  Return the link speed based on
+ * the IEEE register values from the Ethernet PHY.
+ */
+static inline unsigned int mii_nway_result(unsigned int negotiated)
+{
+	unsigned int ret;
+
+	if (negotiated & LPA_100FULL)
+		ret = LPA_100FULL;
+	else if (negotiated & LPA_100BASE4)
+		ret = LPA_100BASE4;
+	else if (negotiated & LPA_100HALF)
+		ret = LPA_100HALF;
+	else if (negotiated & LPA_10FULL)
+		ret = LPA_10FULL;
+	else
+		ret = LPA_10HALF;
+
+	return ret;
+}
+
+static void emac_stop_dma(uint32_t base)
+{
+	int i = 0;
+	uint32_t val;
+
+	/* Attempt to stop the DMA tx and rx in an orderly fashion */
+	emac_clrbits(base, EMAC_DMA_CTRL, DmaStartTx | DmaStartRx);
+	do {
+		udelay(10000);
+		val = emac_rdreg(base, EMAC_DMA_STATUS_IRQ);
+		if (++i >= 100) {
+			printf("GMII: Failed to stop DMA\n");
+			break;
+		}
+	} while (val & (DmaTxStateMask | DmaRxStateMask));
+}
+
+
+
+static void emac_reset_dma(uint32_t base)
+{
+	emac_stop_dma(base);
+
+	/* Don't read any registers whilst the block is reset (it hangs) */
+	emac_wrreg(base, EMAC_DMA_CONFIG, DmaSoftReset);
+	emac_wrreg(base, EMAC_DMA_CONFIG, 0);
+}
+
+#ifndef RUBY_MINI
+static int rx_stats[] = { 0, 1, 2, 3, 4, 5, 6 };
+#define NUM_RX_STATS (ARRAY_SIZE(rx_stats))
+
+static int tx_stats[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
+#define NUM_TX_STATS (ARRAY_SIZE(tx_stats))
+
+static void emac_stats(struct emac_private * priv)
+{
+	int i;
+	uint32_t val;
+	int base = priv->io_base;
+	int counter;
+	unsigned int n;
+
+	for (n = 0; n < NUM_RX_STATS; n++) {
+		counter = rx_stats[n];
+		emac_wrreg(base, EMAC_MAC_RXSTAT_CTRL, 0);
+		emac_wrreg(base, EMAC_MAC_RXSTAT_CTRL, RxStatReadBusy | counter);
+		i = 0;
+		do {
+			if (++i > 10000) {
+				printf("GMII: Rx Stat timeout for %d\n", counter);
+				return;
+			}
+		} while ((val = emac_rdreg(base, EMAC_MAC_RXSTAT_CTRL)) & RxStatReadBusy);
+		val = emac_rdreg(base, EMAC_MAC_RXSTAT_DATA_HIGH) << 16;
+		val |= (emac_rdreg(base, EMAC_MAC_RXSTAT_DATA_LOW) & 0xffff);
+		printf("%d: Rx Stat %d = 0x%08x\n", n, rx_stats[n], val);
+	}
+
+	for (n = 0; n < NUM_TX_STATS; n++) {
+		counter = tx_stats[n];
+		emac_wrreg(base, EMAC_MAC_TXSTAT_CTRL, 0);
+		emac_wrreg(base, EMAC_MAC_TXSTAT_CTRL, TxStatReadBusy | counter);
+		i = 0;
+		do {
+			if (++i > 10000) {
+				printf("GMII: Tx Stat timeout for %d 0x%08x\n", counter, val);
+				return;
+			}
+		} while ((val = emac_rdreg(base, EMAC_MAC_TXSTAT_CTRL)) & TxStatReadBusy);
+		val = emac_rdreg(base, EMAC_MAC_TXSTAT_DATA_HIGH) << 16;
+		val |= (emac_rdreg(base, EMAC_MAC_TXSTAT_DATA_LOW) & 0xffff);
+		printf("%d: Tx Stat %d = 0x%08x\n", n, tx_stats[n], val);
+	}
+}
+
+static void emacs_stats(void)
+{
+	struct br_private * br_priv = &__g_br_priv;
+	int i;
+
+	for (i = 0; i < br_priv->nemacs; i++) {
+		struct emac_private * emac_priv = br_priv->emacs[i];
+		if (emac_priv) {
+			emac_stats(emac_priv);
+		}
+	}
+}
+#endif
+
+
+static int emac_reset(struct emac_private * priv)
+{
+	unsigned int i;
+	uintptr_t base, mdio_base;
+	uint16_t macaddr16[3];
+	uint16_t rx_desc_size = 0;
+	uint16_t tx_ring_size = 0;
+	uint16_t rx_ring_size = 0;
+	struct eth_device * br = priv->parent;
+
+	base = priv->io_base;
+	mdio_base = priv->mdio->base;
+	memcpy(macaddr16, br->enetaddr, sizeof(macaddr16));
+	emac_reset_dma(base);
+
+	/* Initialise the buffer descriptors for Tx */
+	priv->tx_descs[0].status = 0;
+	priv->tx_descs[0].control = TxDescEndOfRing;
+	priv->tx_descs[0].bufaddr1 = virt_to_bus((void *)priv->tx_bufs);
+	priv->tx_descs[0].bufaddr2 = 0;
+
+	if (priv->emac){
+		rx_desc_size = ARRAY_SIZE(rx_ring_1);
+	} else {
+		rx_desc_size = ARRAY_SIZE(rx_ring_0);
+	}
+	/* Initialise the buffer descriptors for Rx */
+	for (i = 0; i < rx_desc_size; i++) {
+		priv->rx_descs[i].status = RxDescOwn;
+		priv->rx_descs[i].control = (RX_BUF_SIZE & RxDescBuf1SizeMask)
+			<< RxDescBuf1SizeShift;
+		priv->rx_descs[i].bufaddr1 = virt_to_bus((void *)((int)priv->rx_bufs + (i * RX_BUF_SIZE)));
+		priv->rx_descs[i].bufaddr2 = 0;
+	}
+	if (i > 0) {
+		priv->rx_descs[i - 1].control |= RxDescEndOfRing;
+	}
+
+	priv->rx_index = 0;
+	priv->tx_index = 0;
+
+	/* We assume that all registers are in their default states from
+	 * reset, so we only update those ones that are necessary.
+	 */
+	// !!! FIXME_UMS - do we need Robin+Wait flags here?  | DmaWait4Done
+	emac_wrreg(base, EMAC_DMA_CONFIG, Dma16WordBurst | Dma64BitMode |
+			DmaRoundRobin );
+	emac_wrreg(base, EMAC_DMA_TX_AUTO_POLL, 16);
+	emac_wrreg(base, EMAC_DMA_TX_BASE_ADDR, virt_to_bus((void *)(uintptr_t) priv->tx_descs));
+	emac_wrreg(base, EMAC_DMA_RX_BASE_ADDR, virt_to_bus((void *)(uintptr_t) priv->rx_descs));
+	emac_rdreg(base, EMAC_DMA_MISSED_FRAMES);
+	emac_rdreg(base, EMAC_DMA_STOP_FLUSHES);
+#ifdef EMAC_SWITCH
+	emac_wrreg(base, EMAC_MAC_ADDR_CTRL, MacAddr1Enable | MacPromiscuous);
+#else
+	emac_wrreg(base, EMAC_MAC_ADDR_CTRL, MacAddr1Enable);
+#endif
+	emac_wrreg(base, EMAC_MAC_ADDR1_HIGH, macaddr16[0]);
+	emac_wrreg(base, EMAC_MAC_FLOW_SA_HIGH, macaddr16[0]);
+	emac_wrreg(base, EMAC_MAC_ADDR1_MED, macaddr16[1]);
+	emac_wrreg(base, EMAC_MAC_FLOW_SA_MED, macaddr16[1]);
+	emac_wrreg(base, EMAC_MAC_ADDR1_LOW, macaddr16[2]);
+	emac_wrreg(base, EMAC_MAC_FLOW_SA_LOW, macaddr16[2]);
+
+	/* !!! FIXME_UMS - whether or not we need this depends on whether
+	 * the auto-pause generation uses it.  The auto function may just
+	 * use 0xffff val to stop sending & then 0 to restart it.
+	 */
+	//!!!FIXME_UMS emac_wrreg(base, EMAC_MAC_FLOW_PAUSE_TIMEVAL, 0xffff);
+	emac_wrreg(base, EMAC_MAC_FLOW_PAUSE_TIMEVAL, 0);
+
+	/* Required by the datasheet */
+	// emac_wrreg(base, EMAC_MAC_TX_ALMOST_FULL, 0x8);
+	emac_wrreg(base, EMAC_MAC_TX_ALMOST_FULL, 0x1f8);
+
+	/* Use safe store & forward value - valid for all speeds */
+	emac_wrreg(base, EMAC_MAC_TX_START_THRESHOLD, 1518);
+
+	emac_wrreg(base, EMAC_MAC_FLOW_CTRL, MacFlowDecodeEnable |
+			MacFlowGenerationEnable | MacAutoFlowGenerationEnable |
+			MacFlowMulticastMode | MacBlockPauseFrames);
+
+	if (priv->emac){
+		tx_ring_size = sizeof(tx_ring_1);
+		rx_ring_size = sizeof(rx_ring_1);
+	} else {
+		tx_ring_size = sizeof(tx_ring_0);
+		rx_ring_size = sizeof(rx_ring_0);
+	}
+
+	emac_cache_flush((uintptr_t) priv->tx_descs, (uintptr_t) priv->tx_descs + tx_ring_size);
+	emac_cache_flush((uintptr_t) priv->rx_descs, (uintptr_t) priv->rx_descs + rx_ring_size);
+
+	/* Setup speed and run! */
+	if (!emac_phy_init(priv)) {
+		return 0;
+	}
+
+	/* Setup speed and run! */
+	emac_wrreg(base, EMAC_MAC_TX_CTRL, MacTxEnable | MacTxAutoRetry);
+	emac_wrreg(base, EMAC_MAC_RX_CTRL, MacRxEnable | MacRxStoreAndForward);
+	emac_setbits(base, EMAC_DMA_CTRL, DmaStartTx | DmaStartRx);
+
+	return 1;
+}
+
+static void emac_halt(struct emac_private *priv)
+{
+	int base;
+
+	if (priv) {
+		base = priv->io_base;
+		emac_clrbits(base, EMAC_MAC_TX_CTRL, MacTxEnable);
+		emac_clrbits(base, EMAC_MAC_RX_CTRL, MacRxEnable);
+		emac_stop_dma(base);
+	}
+}
+
+static int emac_send(struct emac_private * priv, volatile void *packet, int length)
+{
+	volatile struct emac_desc *ptx_desc;
+	uint32_t base, now;
+
+	base = priv->io_base;
+
+	ptx_desc = priv->tx_descs;
+
+	if (readl(&ptx_desc->status) & TxDescOwn) {
+		printf("No buffers available\n");
+		return 0;
+	}
+
+	/* This is a simplification - only handle packets <= 2kB */
+	if (length > priv->tx_buf_size) {
+		printf("Packet too big\n");
+		return 0;
+	}
+
+	/* copy packet */
+	memcpy((void *)bus_to_virt(ptx_desc->bufaddr1), (void *)packet, length);
+	emac_cache_flush((ulong)bus_to_virt(ptx_desc->bufaddr1),
+			(ulong)bus_to_virt(ptx_desc->bufaddr1) + length);
+
+	/* do tx */
+	writel(TxDescFirstSeg | TxDescLastSeg | TxDescEndOfRing | (length & TxDescBuf1SizeMask) << TxDescBuf1SizeShift,
+			&ptx_desc->control);
+	writel(TxDescOwn, &ptx_desc->status); /* Hand-off frame to Ethernet DMA engines.. */
+	emac_wrreg(base, EMAC_DMA_TX_POLL_DEMAND, 1); /* restart TX */
+
+	/* ..and wait for it to go */
+	now = get_timer(0);
+	while(readl(&ptx_desc->status) & TxDescOwn) {
+		if (get_timer(now) > TX_TIMEOUT_IN_TICKS) {
+			printf("Transmit timeout\n");
+			writel(0, &ptx_desc->status);
+			return 0;
+		}
+	}
+
+	return length;
+}
+
+
+
+#ifdef EMAC_SWITCH
+extern int memcmp(const void *, const void *, __kernel_size_t);
+
+static int emac_forward(struct emac_private * priv, volatile unsigned char *packet, int length)
+{
+	int ret;
+	struct eth_device * br = priv->parent;
+	struct br_private * br_priv = br->priv;
+	if ((ret=memcmp((const void *)packet, br->enetaddr, 6))) {
+		int i;
+		if (MAC_IS_MULTICAST(packet))
+			ret = 0;
+		for (i = 0; i < br_priv->nemacs; i++){
+			struct emac_private * emac_priv = br_priv->emacs[i];
+			if ((emac_priv) && (priv->emac!=emac_priv->emac) && br_priv->dev_state & (1<<i)) {
+				emac_send(emac_priv, packet, length);
+			}
+		}
+	}
+	return ret;
+}
+#endif
+
+static int emac_recv(struct emac_private *priv)
+{
+	volatile struct emac_desc *prx_desc;
+	uint32_t base, length;
+	volatile uint32_t status;
+
+	if (priv == NULL)
+		return 0;
+
+	base = priv->io_base;
+	prx_desc = priv->rx_descs + priv->rx_index;
+	status = readl(&prx_desc->status);
+	if (status & RxDescOwn) {
+		return 0;
+	}
+
+
+	length = (status >> RxDescFrameLenShift) & RxDescFrameLenMask;
+	if (length >= RX_BUF_SIZE) {
+		board_reset("\n\n***** reset: emac_recv: oversize packet\n\n");
+	}
+	if (length > 0) {
+		emac_cache_inv((ulong)bus_to_virt(prx_desc->bufaddr1),
+			(ulong)bus_to_virt(prx_desc->bufaddr1) + length);
+#ifdef ENABLE_LOOPBACK
+		if (loopback) {
+			//printf("echo back %d\n",length);
+			emac_send(priv, ARC_SRAM_ADDRESS(prx_desc->bufaddr1), length);
+		} else {
+			NetReceive((unsigned char *)bus_to_virt(prx_desc->bufaddr1), length);
+		}
+#else
+#ifdef EMAC_SWITCH
+		if (emac_forward(priv, bus_to_virt(prx_desc->bufaddr1), length)==0)
+			NetReceive((unsigned char *)bus_to_virt(prx_desc->bufaddr1), length);
+#else
+		NetReceive((unsigned char *)bus_to_virt(prx_desc->bufaddr1), length);
+#endif
+#endif
+	}
+
+	priv->rx_index++;
+	if (priv->rx_index == NUM_RX_BUFS) {
+		priv->rx_index = 0;
+	}
+	/* Give descriptor back to the DMA engines */
+	writel(RxDescOwn, &prx_desc->status);
+	emac_wrreg(base, EMAC_DMA_RX_POLL_DEMAND, 1);
+
+	return 1;
+}
+
+#define PHY_CHECK_RETRY 10
+static int br_init(struct eth_device *dev, bd_t *bd)
+{
+	struct br_private *const priv = dev->priv;
+	int i, j;
+
+	priv->dev_state = 0;
+	priv->send_mask = 0;
+	for (j = 0; j < PHY_CHECK_RETRY; j++) {
+		for (i = 0; i < priv->nemacs; i++) {
+			if (emac_reset(priv->emacs[i])) {
+				priv->dev_state |= (1 << i);
+				priv->send_mask |= (1 << i);
+			}
+			if (had_ctrlc())
+				goto out;
+		}
+		if (priv->dev_state)
+			break;
+	}
+out:
+#ifdef EMAC_BOND_MASTER
+#if (EMAC_BOND_MASTER == 0)
+	priv->send_mask &= 1;
+#elif (EMAC_BOND_MASTER == 1)
+	priv->send_mask &= 2;
+#endif
+#endif
+	return !!priv->dev_state;
+}
+
+static void br_halt(struct eth_device *dev)
+{
+	struct br_private *const priv = dev->priv;
+	int i;
+
+	for (i = 0; i < priv->nemacs; i++) {
+		emac_halt(priv->emacs[i]);
+	}
+	priv->dev_state = 0;
+	priv->send_mask = 0;
+}
+
+static int br_send(struct eth_device *dev, volatile void *packet, int length)
+{
+	struct br_private *const priv = dev->priv;
+	int i;
+	int ret = 0;
+
+	for (i = 0; i < priv->nemacs; i++) {
+		if ((priv->dev_state & (1 << i)) && (priv->send_mask & (1 << i))) {
+			int rc;
+			struct emac_private *emac_priv = priv->emacs[i];
+			if (emac_priv) {
+				rc = emac_send(emac_priv, (void *) packet, length);
+				if (rc) {
+					ret = rc;
+				}
+			}
+		}
+	}
+
+	return ret;
+}
+
+static int br_recv(struct eth_device *dev)
+{
+	struct br_private *const priv = dev->priv;
+	int i;
+	int ret = 0;
+
+	for (i = 0; i < priv->nemacs; i++) {
+		if (priv->dev_state & (1 << i)) {
+			int rc = 0;
+			rc = emac_recv(priv->emacs[i]);
+			if (rc) {
+				ret = rc;
+			}
+		}
+	}
+
+	return ret;
+}
+uint32_t probe_phy(struct emac_private *priv)
+{
+	uint32_t val;
+
+	if ((val = priv->mdio->read(priv, PhyBMCR)) == MDIO_READ_FAIL) {
+		printf("Probe PHY Failed\n");
+		return -1;
+	}
+
+	return val;
+}
+
+static void arasan_initialize_gpio_reset_pin(int pin)
+{
+	printf("emac init GPIO pin %d reset seq\n", pin);
+	gpio_config(pin, GPIO_MODE_OUTPUT);
+	gpio_output(pin, 1);
+	udelay(100);
+	gpio_output(pin, 0);
+	udelay(100000);
+	gpio_output(pin, 1);
+}
+
+static void arasan_initialize_gpio_reset(uint32_t emac_cfg)
+{
+	if (emac_cfg & EMAC_PHY_GPIO1_RESET) {
+		arasan_initialize_gpio_reset_pin(RUBY_GPIO_PIN1);
+	}
+
+	if (emac_cfg & EMAC_PHY_GPIO13_RESET) {
+		arasan_initialize_gpio_reset_pin(RUBY_GPIO_PIN13);
+	}
+}
+
+#define RXTX_DELAY 0x1e0000
+static struct eth_device __g_br_dev = {
+	.priv = &__g_br_priv,
+	.init = br_init,
+	.halt = br_halt,
+	.send = br_send,
+	.recv = br_recv,
+
+};
+
+static uint32_t get_phy_id(struct emac_private *priv)
+{
+	int phy_reg;
+	uint32_t phy_id;
+
+	if ((phy_reg = priv->mdio->read(priv, PhyPhysID1)) == MDIO_READ_FAIL) {
+		printf("Read from MDIO failed.\n");
+		return -1;
+	}
+	phy_id = (phy_reg & 0xffff) << 16;
+
+	if ((phy_reg = priv->mdio->read(priv, PhyPhysID2)) == MDIO_READ_FAIL) {
+		printf("Read from MDIO failed.\n");
+		return -1;
+	}
+
+	phy_id |= (phy_reg & 0xffff);
+
+	return phy_id;
+}
+
+static int phy_init(struct emac_private *priv)
+{
+	unsigned long mdio_base;
+	uint32_t phy_id;
+	struct br_private * br_priv = priv->parent->priv;
+	mdio_base = priv->mdio->base;
+
+	if (!(priv->phy_flags & EMAC_PHY_NOT_IN_USE)) {
+		int found = 0;
+		int i = 0;
+		while (i++ < 100) {
+			if (priv->phy_addr >= PHY_MAX_ADDR) {
+				for (priv->phy_addr = 0; priv->phy_addr < PHY_MAX_ADDR; priv->phy_addr++) {
+					int id;
+					if (br_priv->phy_addr_mask & (1 << priv->phy_addr))
+						continue;
+					if ((id = probe_phy(priv)) != 0xffff) {
+						printf("PHY found on MDIO addr:%x %d\n", id, priv->phy_addr);
+						found = 1;
+						break;
+					}
+					udelay(200);
+				}
+			} else {
+				if (probe_phy(priv) != 0xffff) {
+					printf("PHY found on MDIO addr:%d\n", priv->phy_addr);
+					found = 1;
+					break;
+				}
+				udelay(200);
+			}
+		}
+		if (!found) {
+			printf("No PHY found on MDIO addr:%d\n", priv->phy_addr);
+			return 0;
+		}
+
+		/* Reset the PHY which then kick-offs the autonegotiation */
+#if TOPAZ_FPGA_PLATFORM
+		/* Must reset PHYs in the order listed below - PHY ADDR=(4, 1, 2, 3)
+		   Only FPGA-B will bring-up the PHYs and configure them since FPGA-A
+		   doesn't have a physical MDIO bus to configure the PHYs */
+		mdio_postwr_raw(mdio_base, TOPAZ_FPGAB_PHY0_ADDR, PhyBMCR, PhySoftReset | PhyAutoNegEnable);
+		mdio_postwr_raw(mdio_base, TOPAZ_FPGAB_PHY1_ADDR, PhyBMCR, PhySoftReset | PhyAutoNegEnable);
+		mdio_postwr_raw(mdio_base, TOPAZ_FPGAA_PHY0_ADDR, PhyBMCR, PhySoftReset | PhyAutoNegEnable);
+		mdio_postwr_raw(mdio_base, TOPAZ_FPGAA_PHY1_ADDR, PhyBMCR, PhySoftReset | PhyAutoNegEnable);
+#else
+		priv->mdio->write(priv, PhyBMCR, PhySoftReset | PhyAutoNegEnable);
+#endif /*  #if TOPAZ_FPGA_PLATFORM */
+
+		//Turn off 125MHz and enable SSC for Realtek(RTL8211E) VB
+		phy_id = get_phy_id(priv);
+		printf("PHY 0x%x found on MDIO addr:%d\n", phy_id, priv->phy_addr);
+		if (phy_id == 0x1cc915) {
+			uint32_t val;
+			priv->mdio->write(priv, 31, 0);
+			priv->mdio->write(priv, 16, 0x17E);
+			priv->mdio->write(priv, 31, 7);
+			priv->mdio->write(priv, 30, 0xA0);
+			if ((val = priv->mdio->read(priv, 26)) == MDIO_READ_FAIL) {
+				printf("u-boot: Failed to read phy reg#26\n");
+				return 0;
+			}
+			priv->mdio->write(priv, 26, val & ~4);
+			priv->mdio->write(priv, 31, 0);
+			printf("Enable phy SSC\n");
+		}
+
+		/* This is a dummy read that ensures the write has happened */
+		if (mdio_rdval_raw(priv->mdio->base, 1) == MDIO_READ_FAIL) {
+			return 0;
+		}
+	} else if (priv->phy_flags & EMAC_PHY_AR8236) {
+		priv->phy_addr = ar8236_init(mdio_base, priv->phy_addr);
+	} else if (priv->phy_flags & EMAC_PHY_AR8327) {
+		priv->phy_addr = ar8237_init(mdio_base, priv->phy_addr);
+	}
+
+	if (priv->phy_addr<PHY_MAX_ADDR)
+		br_priv->phy_addr_mask |= (1 << priv->phy_addr);
+	return 1;
+}
+static void emac_probe_phy(struct emac_private * priv, uint32_t cfg, uint32_t phy_addr)
+{
+	struct br_private * br_priv = priv->parent->priv;
+
+	priv->phy_flags = cfg;
+	priv->phy_addr = phy_addr;
+
+	if (phy_init(priv)){
+		emac_halt(priv);
+		br_priv->emacs[br_priv->nemacs++] = priv;
+	}
+}
+
+int board_eth_init(bd_t *bis)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+	struct eth_device *br_dev;
+	struct br_private *br_priv;
+	struct emac_private *emac_priv = &__g_emac_priv[0];
+	uint32_t rgmii_timing = board_config(gd->bd->bi_board_id, BOARD_CFG_RGMII_TIMING);
+	uint32_t emac0_cfg = board_config(gd->bd->bi_board_id, BOARD_CFG_EMAC0);
+	uint32_t emac1_cfg = board_config(gd->bd->bi_board_id, BOARD_CFG_EMAC1);
+	uint32_t emac_cfg = emac0_cfg | emac1_cfg;
+	const char *dbg_bus = getenv("debug_bus");
+	int i;
+
+	if (!((emac0_cfg & EMAC_IN_USE) || (emac1_cfg & EMAC_IN_USE))) {
+		printf("error: no emac enabled\n");
+		return -1;
+	}
+
+	br_dev = &__g_br_dev;
+	br_priv = &__g_br_priv;
+	br_dev->priv = br_priv;
+	for (i = 0; i < 6; i++) {
+		br_dev->enetaddr[i] = gd->bd->bi_enetaddr[i];
+	}
+
+	sprintf(br_dev->name, "br");
+
+	arasan_initialize_gpio_reset(emac_cfg);
+	arasan_initialize_release_reset(emac0_cfg, emac1_cfg, rgmii_timing, 1);
+
+	if (emac_cfg & (EMAC_PHY_RTL8363SB_P0 | EMAC_PHY_RTL8363SB_P1 | EMAC_PHY_RTL8365MB)) {
+		rtl8367b_init(emac_priv, emac_cfg);
+	}
+
+	br_priv->nemacs = 0;
+	br_priv->phy_addr_mask = 0;
+
+	if (dbg_bus != NULL) {
+		/* clear any other forced speeds possibly set */
+		emac0_cfg &= ~(EMAC_PHY_FORCE_1000MB | EMAC_PHY_FORCE_100MB | EMAC_PHY_FORCE_10MB);
+		emac1_cfg &= ~(EMAC_PHY_FORCE_1000MB | EMAC_PHY_FORCE_100MB | EMAC_PHY_FORCE_10MB);
+		emac0_cfg |= EMAC_PHY_FORCE_1000MB;
+		emac1_cfg |= EMAC_PHY_FORCE_1000MB;
+	}
+	if (emac0_cfg & EMAC_IN_USE) {
+		emac_priv = &__g_emac_priv[0];
+
+		emac_probe_phy(emac_priv, emac0_cfg, board_config(gd->bd->bi_board_id, BOARD_CFG_PHY0_ADDR));
+	}
+	if (emac1_cfg & EMAC_IN_USE) {
+		emac_priv = &__g_emac_priv[1];
+		emac_probe_phy(emac_priv, emac1_cfg, board_config(gd->bd->bi_board_id, BOARD_CFG_PHY1_ADDR));
+	}
+	/*
+	 * if debug bus is set in hardware, then mdio is disabled so auto-negotiation
+	 * will be set to 10Mbs. default speed will be 1Gbs if debug_bus=1.
+	 */
+
+	eth_register(br_dev);
+
+	return 1;
+}
+
+
+#ifndef RUBY_MINI
+int do_mdio(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	unsigned long base = ARASAN_MDIO_BASE;
+	if (argc < 4) {
+		cmd_usage(cmdtp);
+		return 1;
+	}
+	if (strcmp(argv[1],"read") == 0) {
+		uint32_t a1,a2,val;
+		a1 = simple_strtoul (argv[2], NULL, 10);
+		a2 = simple_strtoul (argv[3], NULL, 16);
+		mdio_postrd_raw(base, a1, a2);
+		val = mdio_rdval_raw(base, 1);
+		printf("phy:%d reg:%d=0x%x\n",a1,a2,val);
+	} else if (strcmp(argv[1],"write") == 0) {
+		uint32_t a1, a2, a3;
+		a1 = simple_strtoul (argv[2], NULL, 10);
+		a2 = simple_strtoul (argv[3], NULL, 10);
+		a3 = simple_strtoul (argv[4], NULL, 16);
+		mdio_postwr_raw(base, a1, a2, a3);
+		/* This is a dummy read that ensures the write has happened */
+		if (mdio_rdval_raw(base, 1) == MDIO_READ_FAIL) {
+			return -1;
+		}
+	} else {
+		return -1;
+	}
+
+	return 0;
+}
+#endif
+
+#if defined(CONFIG_CMD_ETHLOOP)
+int mdio_write(int reg, u16 val)
+{
+	uint32_t base = ARASAN_MDIO_BASE;
+	int ret = -1;
+	ret = mdio_postwr(base, priv.phy_addr, reg, val);
+	/* This is a dummy read that ensures the write has happened */
+	if (mdio_rdval(base, 1) == (uint32_t)-1)
+		return -1;
+
+	return ret;
+}
+
+int mdio_read(int reg)
+{
+	uint32_t val, base = ARASAN_MDIO_BASE;
+	mdio_postrd(base, priv.phy_addr, reg);
+	val = mdio_rdval(base, 1);
+	return val;
+}
+
+void enable_phy_loopback(void)
+{
+	uint32_t val;
+	val = mdio_read(PhyBMCR);
+	val |= PhyLoopback;  /* set loopback bit */
+	mdio_write(PhyBMCR, val);
+}
+
+void disable_phy_loopback(void)
+{
+	uint32_t val;
+	val = mdio_read(PhyBMCR);
+	val &= ~PhyLoopback; /* reset loopback bit */
+	mdio_write(PhyBMCR, val);
+}
+#endif
+#ifndef RUBY_MINI
+#ifdef ENABLE_LOOPBACK
+int do_emaclb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	int a1;
+	a1 = simple_strtoul (argv[1], NULL, 16);
+	if (a1 == 0) {
+		loopback = 0;
+	} else {
+		loopback = 1;
+	}
+	while (1) {
+		NetLoop (NETCONS);	/* kind of poll */
+	}
+	return 0;
+}
+
+U_BOOT_CMD(
+		emaclb, CFG_MAXARGS, 2, do_emaclb,
+		"emaclb - set emac loopback (0 or 1) \n",
+		NULL
+	  );
+#endif
+#define CFG_MAXARGS 5
+U_BOOT_CMD(
+		mdio, CFG_MAXARGS, 5, do_mdio,
+		"read/write mdio",
+		"mdio <read|write> <phy> <reg> <hex value>"
+	  );
+
+int do_emac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	emacs_stats();
+	return 0;
+}
+U_BOOT_CMD(
+		emac, CFG_MAXARGS, 3, do_emac,
+		"emac read stats",
+		NULL
+	  );
+#endif
+
+static int emac_phy_init(struct emac_private *priv)
+{
+	const uintptr_t base = priv->io_base;
+	const uintptr_t mdio_base = priv->mdio->base;
+	const int emac = priv->emac;
+	int i;
+	uint32_t val, x;
+	uint32_t advertise;
+	uint32_t lpa = 0;
+	uint32_t lpa2 = 0;
+	uint32_t media = 0;
+	uint32_t duplex = 0;
+
+	if (!(priv->phy_flags & EMAC_PHY_NOT_IN_USE)) {
+		if (priv->phy_flags & EMAC_PHY_RESET) {
+			udelay(4);
+		}
+		if (priv->phy_flags & EMAC_PHY_RTL8211DS) {
+			int link_status = 0;
+			int speed_sel = 0;
+			duplex = 0;
+			lpa2 = 0;
+			media = 0;
+			priv->mdio->write(priv, RTL8211DS_PAGSEL, PAGSEL_PAGEXT);
+			priv->mdio->write(priv, RTL8211DS_PAGNO, PAGNO_140);
+			link_status = priv->mdio->read(priv, RTL8211DS_RXCONFIG);
+			if (link_status & RXCONFIG_LINK) {
+				speed_sel = priv->mdio->read(priv, RTL8211DS_SDSR);
+				speed_sel &= ~SDSR_SPEED;
+				switch ((link_status & RXCONFIG_SPEED) >> RXCONFIG_SPEED_BIT) {
+					case 0:
+						//printf(": 0x%x, 10-", speed_sel);
+						speed_sel |= SDSR_10;
+						break;
+					case 1:
+						//printf(": 0x%x, 100-", speed_sel);
+						media = ADVERTISE_100FULL;
+						speed_sel |= SDSR_100;
+						break;
+					case 2:
+						//printf(": 0x%x, 1000-", speed_sel);
+						lpa2 = LPA_1000FULL;
+						speed_sel |= SDSR_1000;
+						break;
+					default:
+						return 0;
+				}
+				if (link_status & RXCONFIG_DUPLEX) {
+					//printf("Full: 0x%x\n",speed_sel);
+					duplex = 1;
+				}
+				priv->mdio->write(priv, RTL8211DS_SDSR, speed_sel);
+				priv->mdio->write(priv, RTL8211DS_PAGSEL, PAGSEL_PAG0);
+			}
+			else {
+				printf("SGMIILinkDown\n");
+				priv->mdio->write(priv, RTL8211DS_PAGSEL, PAGSEL_PAG0);
+				return 0;
+			}
+		} else if ((priv->phy_flags & EMAC_PHY_AUTO_MASK) == 0) {
+			/* Vitesse VSC8641 has a bug regarding writes to register 4 or 9
+			 * after a soft reset unless an MDIO access occurs in between.
+			 * We avoid this bug implicitly by the polling loop here.
+			 */
+			printf("AutoNegoEMAC%d\n",priv->emac);
+
+			i = 0;
+			do {
+				/* Wait for autonegotiation to complete */
+				udelay(500);
+				if ((val = priv->mdio->read(priv, PhyBMSR)) == MDIO_READ_FAIL) {
+					return 0;
+				}
+				i++;
+
+				if (i >= 30000) {
+					printf("AutoNegoTimeout\n");
+					return 0;
+				}
+				if (!(val & PhyLinkIsUp) && (i >= 5000)) {
+					printf("LinkDown\n");
+					return 0;
+				}
+				if (ctrlc()) {
+					printf("Ctrl+C detected\n");
+					return 0;
+				}
+			} while (!(val & PhyAutoNegComplete));
+
+			printf("Autonegotiation Done (BMSR=%08x)\n", val);
+
+			/* Work out autonegotiation result using only IEEE registers */
+			if ((advertise = priv->mdio->read(priv, PhyAdvertise)) == MDIO_READ_FAIL) {
+				printf("GMII: Failed to read Advertise reg\n");
+				return 0;
+			}
+
+			if ((lpa = priv->mdio->read(priv, PhyLpa)) == MDIO_READ_FAIL) {
+				printf("GMII: Failed to read Lpa reg\n");
+				return 0;
+			}
+
+			if ((lpa2 = priv->mdio->read(priv, PhyStat1000)) == MDIO_READ_FAIL) {
+				printf("GMII: Failed to read Lpa2 reg\n");
+				return 0;
+			}
+
+			printf("Autoneg status: Advertise=%08x, Lpa=%08x, Lpa2=%08x\n",
+					advertise, lpa, lpa2);
+
+			media = mii_nway_result(lpa & advertise);
+			duplex = (media & ADVERTISE_FULL) ? 1 : 0;
+			if (lpa2 & LPA_1000FULL) {
+				duplex = 1;
+			}
+
+		} else {
+			if (priv->phy_flags & EMAC_PHY_FORCE_1000MB) {
+				i = 0x0040; /* Force 1G */
+				lpa2 = LPA_1000FULL;
+			} else if (priv->phy_flags & EMAC_PHY_FORCE_100MB) {
+				i = 0x2000; /* Force 100M */
+				media = ADVERTISE_100FULL;
+			} else {
+				i = 0x0000; /* Force 10M */
+				if (priv->phy_flags & EMAC_PHY_FORCE_10MB ) {
+					printf("GMII: ethlink not 10, 100 or 1000 - forcing 10Mbps\n");
+				}
+			}
+			if (!(priv->phy_flags & EMAC_PHY_FORCE_HDX)) {
+				i |= 0x100; /* Full duplex */
+				duplex = 1;
+			}
+
+			/* Force link speed & duplex */
+#if defined(TOPAZ_FPGA_PLATFORM)
+			/*
+			 *  Must reset PHYs in the order listed below - PHY ADDR=(4, 1, 2, 3)
+			 *  Only FPGA-B will bring-up the PHYs and configure them since FPGA-A
+			 *  doesn't have a physical MDIO bus to configure the PHYs
+			 */
+			mdio_postwr_raw(mdio_base, TOPAZ_FPGAB_PHY0_ADDR, PhyBMCR, i);
+			mdio_postwr_raw(mdio_base, TOPAZ_FPGAB_PHY1_ADDR, PhyBMCR, i);
+			mdio_postwr_raw(mdio_base, TOPAZ_FPGAA_PHY0_ADDR, PhyBMCR, i);
+			mdio_postwr_raw(mdio_base, TOPAZ_FPGAA_PHY1_ADDR, PhyBMCR, i);
+#else
+			priv->mdio->write(priv, PhyBMCR, i);
+#endif
+
+			printf("GMII: Forced link speed is ");
+		}
+	} else {  // no phy
+		if (priv->phy_flags & EMAC_PHY_FORCE_1000MB) {
+			i = 0x0040; /* Force 1G */
+			lpa2 = LPA_1000FULL;
+		} else if (priv->phy_flags & EMAC_PHY_FORCE_100MB) {
+			i = 0x2000; /* Force 100M */
+			media = ADVERTISE_100FULL;
+		} else {
+			i = 0x0000; /* Force 10M */
+			if (priv->phy_flags & EMAC_PHY_FORCE_10MB ) {
+				printf("GMII: ethlink not 10, 100 or 1000 - forcing 10Mbps\n");
+			}
+		}
+		if (!(priv->phy_flags & EMAC_PHY_FORCE_HDX)) {
+			i |= 0x100; /* Full duplex */
+			duplex = 1;
+		}
+	}
+	x = 0;
+
+	emac_wrreg(RUBY_SYS_CTL_BASE_ADDR, SYSCTRL_CTRL_MASK,
+			emac ? RUBY_SYS_CTL_MASK_GMII1_TXCLK : RUBY_SYS_CTL_MASK_GMII0_TXCLK);
+
+	if (lpa2 & (LPA_1000FULL | LPA_1000HALF)) {
+		x |= MacSpeed1G;
+		printf("1G");
+		emac_wrreg(RUBY_SYS_CTL_BASE_ADDR, SYSCTRL_CTRL,
+				emac ? RUBY_SYS_CTL_MASK_GMII1_1000M : RUBY_SYS_CTL_MASK_GMII0_1000M);
+
+	}
+	else if (media & (ADVERTISE_100FULL | ADVERTISE_100HALF)) {
+		x |= MacSpeed100M;
+		printf("100M");
+		emac_wrreg(RUBY_SYS_CTL_BASE_ADDR, SYSCTRL_CTRL,
+				emac ? RUBY_SYS_CTL_MASK_GMII1_100M : RUBY_SYS_CTL_MASK_GMII0_100M);
+	}
+	else {
+		x |= MacSpeed10M;
+		printf("10M");
+		emac_wrreg(RUBY_SYS_CTL_BASE_ADDR, SYSCTRL_CTRL,
+				emac ? RUBY_SYS_CTL_MASK_GMII1_10M : RUBY_SYS_CTL_MASK_GMII0_10M);
+	}
+	emac_wrreg(RUBY_SYS_CTL_BASE_ADDR, SYSCTRL_CTRL_MASK, 0);
+
+	if (duplex) {
+		x |= MacFullDuplex;
+		printf("-FD\n");
+	} else {
+		printf("-HD\n");
+	}
+
+	/* for certain switches, poll waiting for a link up before returning */
+	if (priv->phy_flags & EMAC_PHY_NOT_IN_USE) {
+		if (priv->phy_flags & (EMAC_PHY_RTL8363SB_P0 | EMAC_PHY_RTL8363SB_P1)) {
+			rtl8367b_poll_linkup(priv);
+		}
+	}
+
+	emac_wrreg(base, EMAC_MAC_GLOBAL_CTRL, x);
+
+	return 1;
+}
+#endif
diff --git a/board/ruby/board_cfg.c b/board/ruby/board_cfg.c
new file mode 100644
index 0000000..09a6bf9
--- /dev/null
+++ b/board/ruby/board_cfg.c
@@ -0,0 +1,285 @@
+/*
+ * Copyright (c) 2010 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ *  file purpose
+ *    Map board_id to coard configuration definitions
+ */
+
+////////////////////////////////////////////////////////////////////////////
+// Includes
+////////////////////////////////////////////////////////////////////////////
+#include "ruby.h"
+#include "board_cfg.h"
+#include "ddr.h"
+#include "malloc.h"
+#include <shared_defs_common.h>
+
+/* Enable auto configured board ID based on uboot environment vars */
+#define UBOOT_BOARD_AUTOCONFIG
+
+#include "ruby_board_cfg.h"
+#include "ruby_board_db.h"
+#include "spi_flash.h"
+
+#define FLASH_SIZE_INTERPRET_MB_THRESHOLD	1024
+
+static const board_cfg_t	g_board_cfg_table[] = QTN_BOARD_DB;
+static board_cfg_t		*custom_board = NULL;
+extern uint32_t			flash_size;
+static char			board_name[RUBY_BDA_NAMELEN];
+
+const char * const board_cfg_field_names[] = BOARD_CFG_FIELD_NAMES;
+
+extern board_cfg_t board_hw_config;
+
+extern int mdc_clk_divisor;
+
+/***************************************************************************
+   Function:
+   Purpose:
+   Returns:
+   Note: Code assumes parameter is within range
+ **************************************************************************/
+
+const board_cfg_t *board_locate(int board_id)
+{
+	int i;
+
+	if (board_id == QTN_RUBY_UNIVERSAL_BOARD_ID) {
+		return &board_hw_config;
+	}
+
+	if (board_id == QTN_RUBY_AUTOCONFIG_ID) {
+		return custom_board;
+	}
+
+	for (i = 0; i < ARRAY_SIZE(g_board_cfg_table); i++) {
+		if (board_id == g_board_cfg_table[i].bc_board_id){
+			return &g_board_cfg_table[i];
+		}
+	}
+
+	return NULL;
+}
+
+
+int board_config(int board_id, int parameter)
+{
+
+	const int *ptr;
+	const board_cfg_t *board = board_locate(board_id);
+
+	if (board) {
+		ptr = (int *)board;
+		return ptr[parameter];
+	}
+
+	return -1;
+}
+
+static int board_parse_tag_value(const struct ruby_cfgstr_map *map, const char *token, int *val)
+{
+	while (map && map->name) {
+		if (!strcmp(map->name, token)) {
+			*val = map->val;
+			return 0;
+		}
+		map++;
+	}
+
+	return -1;
+}
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+static const char *board_find_tag_name(const struct ruby_board_param *params, uint32_t index, int val)
+{
+	while (params) {
+		if (params->p_index == index) {
+			const struct ruby_cfgstr_map *map = params->p_map;
+			while (map) {
+				if (map->val == val) {
+					return map->name;
+				}
+				map++;
+			}
+			return NULL;
+		}
+		params++;
+	}
+	return NULL;
+}
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
+int board_parse_tag(const char *bc_param, const char *valstr, int *val)
+{
+	const struct ruby_board_param *params = g_custom_board_params;
+
+	while (params && params->p_map) {
+		if (strcmp(bc_param, board_cfg_field_names[params->p_index]) == 0 &&
+				board_parse_tag_value(params->p_map, valstr, val) == 0) {
+			return 0;
+		}
+		params++;
+	}
+
+	return -1;
+}
+
+int board_parse_custom_cfg(void)
+{
+	const struct ruby_board_param *params = g_custom_board_params;
+	int *ptr;
+	char *token = NULL;
+	int val = 0;
+
+	custom_board = &g_custom_board_cfg;
+	ptr = (int *) custom_board;
+
+	while (params && params->p_map) {
+		val = 0;
+		token = getenv(board_cfg_field_names[params->p_index]);
+		if (!token) {
+			continue;
+		}
+
+		if (params->p_index == BOARD_CFG_NAME) {
+			uint32_t len = strlen(token);
+
+			/* Copy the boardname string as we don't know if the buffer space from getenv() will be reused */
+			memset(board_name, 0, RUBY_BDA_NAMELEN);
+			memcpy(board_name, token, min(len, RUBY_BDA_NAMELEN - 1));
+		} else if (!board_parse_tag_value(params->p_map, token, &val)) {
+			if (params->p_index == BOARD_CFG_FLASH_SIZE) {
+				flash_size = val;
+			} else if (params->p_index < BOARD_CFG_STRUCT_NUM_FIELDS) {
+				ptr[params->p_index] = val;
+			}
+		} else {
+			printf("%s: token '%s' invalid\n", __FUNCTION__, token);
+		}
+		params++;
+	}
+	return 0;
+}
+
+void board_setup_bda(void *addr, int board_id)
+{
+	ruby_bda_t *bda = (ruby_bda_t *)addr;
+	const board_cfg_t *board = board_locate(board_id);
+	char *name = (board_id == QTN_RUBY_AUTOCONFIG_ID) ? board_name : board->bc_name;
+
+	uint32_t len = strlen(name);
+
+	bda->bda_len = sizeof(ruby_bda_t);
+	bda->bda_version = RUBY_BDA_VERSION;
+
+	printf("BDA at 0x%x\n", (int)addr);
+
+	memcpy(&bda->bda_boardcfg, board, sizeof(board_cfg_t));
+	memset(bda->bda_boardname, 0 , RUBY_BDA_NAMELEN);
+	memcpy(bda->bda_boardname, name, (len > (RUBY_BDA_NAMELEN-1)) ? (RUBY_BDA_NAMELEN -1) : len);
+
+	if (flash_size == 0) {
+		bda->bda_flashsz = spi_flash_size();
+	} else if (flash_size < FLASH_SIZE_INTERPRET_MB_THRESHOLD) {
+		/*
+		 * Older Universal hw_config_id implementations
+		 * specify flash size in megabytes. Assume very small
+		 * values were intended as megabytes
+		 */
+		bda->bda_flashsz = flash_size << 20;
+	} else {
+		bda->bda_flashsz = flash_size;
+	}
+}
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+int do_list_board_options(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+{
+	const struct ruby_board_param *params = g_custom_board_params;
+
+	printf("HW config Board options:\n");
+	while (params && params->p_map) {
+		const struct ruby_cfgstr_map *map = params->p_map;
+
+		printf("%s=(", board_cfg_field_names[params->p_index]);
+		while(map && map->name) {
+			printf("%s,",  map->name);
+			map++;
+		}
+
+		printf(")\n");
+		params++;
+	}
+	return 0;
+
+}
+
+int do_list_board_cfg(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+{
+	const struct ruby_board_param *params = g_custom_board_params;
+	const board_cfg_t *board = NULL;
+	int board_id = 0;
+	char *token = (argc == 2) ? argv[1] : getenv("hw_config_id");;
+
+	if(!token) {
+		printf("\"hw_config_id\" not set\n");
+		return -1;
+	}
+
+	board_id = simple_strtoul (token, NULL, 10);
+	if (board_id < 0) {
+		printf("\"Invalid board: %s\n", token);
+		return -1;
+	}
+	board = board_locate(board_id);
+
+	if(!board) {
+		printf("Board ID:%d not valid.\n", board_id);
+		return -1;
+	}
+	if (argc == 2) {
+		printf("Board config for ID:%d\n", board_id);
+	} else {
+		printf("Current board config:\n");
+	}
+	printf("\tID:\t%d\n", board->bc_board_id);
+	printf("\tName:\t%s\n", board->bc_name);
+	printf("\tDDR:\t%s %dMHz %dM\n",
+		board_find_tag_name(params, BOARD_CFG_DDR_TYPE, board->bc_ddr_type), 
+						board->bc_ddr_speed, board->bc_ddr_size >> 20);
+	printf("\tEMAC0:\t%s\n", board_find_tag_name(params, BOARD_CFG_EMAC0, board->bc_emac0));	
+	printf("\tEMAC1:\t%s\n", board_find_tag_name(params, BOARD_CFG_EMAC1, board->bc_emac1));
+	printf("\tRFPA:\t%s\n", board_find_tag_name(params, BOARD_CFG_WIFI_HW, board->bc_wifi_hw));
+	printf("\tRGMII:\t0x%x\n", board->bc_rgmii_timing);
+
+	printf("\tSPI1:\t%s\n", board->bc_spi1 ? "Enabled" : "Disabled");
+	printf("\tUART1:\t%s\n", board->bc_uart1 ? "Enabled" : "Disabled");
+	printf("\tPCIe:\t%s\n", board->bc_pcie ? "Enabled" : "Disabled");
+
+	return 0;
+
+}
+
+int do_list_board(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+{
+	int i;
+	printf("HW config  Board Name\n");
+	printf("--------  ------------------------------\n");
+	for (i=0;i<sizeof(g_board_cfg_table)/sizeof(board_cfg_t);i++) {
+		printf("%8d  %s\n",g_board_cfg_table[i].bc_board_id,
+			g_board_cfg_table[i].bc_name);
+	}
+	printf("\n");
+
+	return 0;
+}
+
+U_BOOT_CMD(boardcfg, 2, 0, do_list_board_cfg,"list current board config",NULL);
+
+U_BOOT_CMD(boardopts, 1, 0, do_list_board_options,"list board config options",NULL);
+
+U_BOOT_CMD(lsid, 1, 0, do_list_board,"list board IDs",NULL);
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
diff --git a/board/ruby/board_cfg.h b/board/ruby/board_cfg.h
new file mode 100644
index 0000000..44f1682
--- /dev/null
+++ b/board/ruby/board_cfg.h
@@ -0,0 +1,19 @@
+#ifndef __FILE__H__
+#define __FILE__H__
+/*
+ * Copyright (c) 2010 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ *  Board configuration definitions that only apply to the boot loader.
+ *
+ *  Most definitions have been moved to common/ruby_config.h
+ *
+ */
+
+int board_config(int board_id, int parameter);
+int board_parse_custom_cfg(void);
+void board_setup_bda(void *addr, int board_id);
+int board_parse_tag(const char *bc_param, const char *valstr, int *val);
+
+#endif // __BOARD_CFG_H__
+
diff --git a/board/ruby/clock.inl b/board/ruby/clock.inl
new file mode 100644
index 0000000..5a817cd
--- /dev/null
+++ b/board/ruby/clock.inl
@@ -0,0 +1,96 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __CLOCK_INL
+#define __CLOCK_INL
+
+#ifdef __ASSEMBLY__
+
+#include <config.h>
+#include <asm/arcregs.h>
+#include <asm/arch/platform.h>
+
+
+/**********************************************************/
+
+/* Please make sure that these registers are not touched by other startup code! */
+#define RUBY_BUS_CLOCK_REG r23
+#define RUBY_CPU_CLOCK_REG r24
+
+.macro M_CLKSEL_ENTRY value constant
+	cmp_s      RUBY_BUS_CLOCK_REG, RUBY_SYS_CTL_CLKSEL(\value)
+	mov.z      RUBY_BUS_CLOCK_REG, \constant
+	bz         read_done
+.endm
+
+.macro M_CLOCK_VAR name
+	.align 4
+	\name:
+	.word 0
+	.globl \name
+.endm
+
+.macro M_CLOCK_VARS
+	/* Asm as well as C-code can use this variables to get bus and cpu freq */
+	M_CLOCK_VAR ruby_bus_clk
+	M_CLOCK_VAR ruby_cpu_clk
+.endm
+
+.macro M_CLOCK_SAVE
+	/* Store bus freq */
+	st         RUBY_BUS_CLOCK_REG, [ruby_bus_clk]
+	/* Store cpu freq */
+	st         RUBY_CPU_CLOCK_REG, [ruby_cpu_clk]
+.endm
+
+.macro M_CLOCK_READ
+#if defined(RUBY_FIXED_CLK)
+	/* Hard-coded value */
+	mov        RUBY_BUS_CLOCK_REG, RUBY_FIXED_BUS_CLK
+	mov        RUBY_CPU_CLOCK_REG, RUBY_FIXED_CPU_CLK
+#elif defined(RUBY_READ_CLK)
+	/* Load clock select bits */
+	ld.di      RUBY_BUS_CLOCK_REG, [RUBY_SYS_CTL_CTRL]
+	and        RUBY_BUS_CLOCK_REG, RUBY_BUS_CLOCK_REG, RUBY_SYS_CTL_MASK_CLKSEL
+
+	/* Check clock select bits and choose bus freq */
+	M_CLKSEL_ENTRY 0 RUBY_SYS_CTL_CLKSEL_00_BUS_FREQ
+	M_CLKSEL_ENTRY 1 RUBY_SYS_CTL_CLKSEL_01_BUS_FREQ
+	M_CLKSEL_ENTRY 2 RUBY_SYS_CTL_CLKSEL_10_BUS_FREQ
+	M_CLKSEL_ENTRY 3 RUBY_SYS_CTL_CLKSEL_11_BUS_FREQ
+
+	/* Ok, let's assign something */
+	mov_s      RUBY_BUS_CLOCK_REG, 0
+
+read_done:
+	/* ASIC cpu freq is x2 bus freq */
+	asl        RUBY_CPU_CLOCK_REG, RUBY_BUS_CLOCK_REG, 1
+#else
+	#error "Not supported"
+#endif // #if defined(RUBY_FIXED_CLK)
+
+.endm
+
+#endif // #ifdef __ASSEMBLY__
+
+#endif // #ifndef __CLOCK_INL
+
diff --git a/board/ruby/cmd_memtest.c b/board/ruby/cmd_memtest.c
new file mode 100644
index 0000000..4982135
--- /dev/null
+++ b/board/ruby/cmd_memtest.c
@@ -0,0 +1,397 @@
+/*
+ * (C) Copyright 2015
+ *
+ *  Quantenna Communications Inc.
+ *
+ *  SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include "ruby.h"
+
+#ifdef CONFIG_CMD_QMEMTEST
+
+#include <linux/types.h>
+#include <command.h>
+#include <asm/cache.h>
+#include <asm/string.h>
+#include "ruby_board_cfg.h"
+#include "board_cfg.h"
+#include "common.h"
+
+#define QMEMTEST_STRESS_ITER_NUM	1000000	/* randomly chosen */
+
+static inline void qmtest_checkerboard_print_error(vu_long *addr, ulong must_be, ulong actual)
+{
+	printf("\nERROR at 0x%p: must be 0x%lx real 0x%lx (0x%lx)\n", addr, must_be, actual, *addr);
+}
+
+static inline int do_single_checkerboard_test(vu_long *start, vu_long *end, const ulong pattern)
+{
+	vu_long *cur_p = start;
+	const ulong rev_pattern = ~pattern;
+	/*
+	 * We need to do reads into temporary variable. In this case, should any
+	 * read operation fail during the test, we can print unexpected read value on the
+	 * screen.
+	 */
+	register ulong tmp1;
+	register ulong tmp2;
+
+	printf("0x%08lx ~ 0x%08lx.. ", pattern, rev_pattern);
+
+	while (cur_p < end) {
+		*cur_p++ = pattern;
+		*cur_p++ = rev_pattern;
+	};
+
+	cur_p = start;
+	while (cur_p < end) {
+		tmp1 = *cur_p;
+		*cur_p++ = rev_pattern;
+		tmp2 = *cur_p;
+		*cur_p++ = pattern;
+
+		if (tmp1 != pattern) {
+			qmtest_checkerboard_print_error(cur_p - 2, pattern, tmp1);
+			return -1;
+		}
+
+		if (tmp2 != rev_pattern) {
+			qmtest_checkerboard_print_error(cur_p - 1, rev_pattern, tmp2);
+			return -1;
+		}
+	};
+
+	printf("2nd pass.. ");
+
+	cur_p = start;
+	while (cur_p < end) {
+		tmp1 = *cur_p++;
+		tmp2 = *cur_p++;
+
+		if (tmp1 != rev_pattern) {
+			qmtest_checkerboard_print_error(cur_p - 2, rev_pattern, tmp1);
+			return -1;
+		}
+
+		if (tmp2 != pattern) {
+			qmtest_checkerboard_print_error(cur_p - 1, pattern, tmp2);
+			return -1;
+		}
+	};
+
+	printf("OK\n");
+	return 0;
+}
+
+/*
+ * Checkerboard test:
+ * - fill entire memory with alternating patterns, reversing every other memory
+ * address location
+ * - verify that content of memory locations are as expected and immediately write
+ * an inverse of previously used pattern for each location;
+ * - again verify that content of memory locations are as expected;
+ * Try several check patterns that stress the data bus the most.
+ */
+static int do_checkerboard_test(ulong start, ulong end)
+{
+	const ulong check_patterns[] = {
+			0xAAAAAAAA,
+			0x0000ffff,
+			0xAAAA5555,
+	};
+	int i = 0;
+
+	puts("CHECKERBOARD:\n");
+
+	for (i = 0; i < ARRAY_SIZE(check_patterns); ++i) {
+		if (do_single_checkerboard_test((vu_long *)start, (vu_long *)end, check_patterns[i]))
+			return -1;
+	}
+
+	return 0;
+}
+
+static inline int do_single_stress_test(vu_long *addr1, vu_long *addr2, ulong pattern)
+{
+	unsigned int i;
+	register ulong tmp1;
+	register ulong tmp2;
+
+	printf("addr 0x%p & 0x%p patt 0x%lx: ", addr1, addr2, pattern);
+
+	for (i = 0; i < QMEMTEST_STRESS_ITER_NUM; ++i) {
+		*addr1 = pattern;
+		*addr2 = pattern;
+		tmp1 = *addr1;
+		tmp2 = *addr2;
+		if (tmp1 != tmp2) {
+			goto error;
+		}
+
+		*addr1 = ~pattern;
+		*addr2 = ~pattern;
+		tmp1 = *addr1;
+		tmp2 = *addr2;
+		if (tmp1 != tmp2) {
+			goto error;
+		}
+	}
+
+	puts("OK\n");
+
+	return 0;
+
+error:
+	printf("ERROR i=%u: addr 0x%p (0x%lx - 0x%lx) != 0x%p (0x%lx - 0x%lx)\n",
+			i, addr1, tmp1, *addr1, addr2, tmp2, *addr2);
+	return -1;
+}
+
+/*
+ * Stress test for DRAM.
+ *
+ * The purpose is to stress system the most by driving DRAM address and data lines massively
+ * up and down as fast as possible. As a simple example, we would want to write test data at
+ * address 0x0 and then immediately at address 0xFFFFFFFF, then do a readback test.
+ *
+ * But things are a little more complicated for the types of DRAM generally used on embedded
+ * platform:
+ * - DRAM chips used with Quantenna platforms usually have only 16 physical data lines, and
+ * each 32-bit word is transfered with two bus operations rather then one. Therefore, in case
+ * of 16-bit data line, the most stressful would be transfers of values like 0xFFFF0000.
+ * - address lines usually include separate BankSelect lines and multiplexed Row/Column
+ * selection lines.
+ *
+ * As an example, we can look at Winbond memory chip organization.
+ * Winnbond memory has  8388608 words x 8banks x 16bit organization, 128 Mbyte, it has
+ * 13 physical address lines. Address lines are multiplexed for row and column selection,
+ * meaning that for any memory access Memory Controller first sends row number on address
+ * lines, and then immediately sends column number.
+ * Here's the mapping scheme used to map 32-bit physical address to DDR controller signals:
+ * |b31...b27|b26...b14|b13...b11|b10...b1|bit0    |  <--- 32bit physical address bits
+ * | unused  |  row #  | bank ID | col #  | unused |  <--- mapping to DDR interface signals
+ *
+ * From this example it's obvious that to stress address lines the most we have to access
+ * addresses which will generate inverse electrical signals for Row and Column parts of address.
+ * But because memory chips organization can vary a lot, there is no best solution for a
+ * general case. That's why to generate a test location address, we simply divide address
+ * in half based on memory size, and make first half an inverse of another half.
+ */
+static inline int do_stress_test(ulong start, ulong end)
+{
+	ulong size = end - start;
+	ulong mask = size - 1;
+	ulong half_mask;
+	ulong test_addr1;
+	ulong test_addr2;
+	unsigned i = 0;
+	unsigned j;
+	ulong stress_addr_pattern[] = {
+		0xAAAAAAAA,
+		0xFFFFFFFF
+	};
+	ulong stress_data_pattern[] = {
+		0xFFFF0000,
+		0x5555AAAA
+	};
+
+	if (size == 0 || (size & (size - 1))) {
+		printf("Bad size 0x%lx\n", size);
+		return -1;
+	}
+
+	while (mask) {
+		++i;
+		mask >>= 1;
+	}
+
+	/* Addresses must always be 4-byte aligned */
+	mask = (size - 1) & ~0x3;
+	half_mask = mask >> (i / 2);
+
+	printf("STRESS: mask=0x%08lx half_mask=0x%08lx\n", mask, half_mask);
+
+	for (i = 0; i < ARRAY_SIZE(stress_addr_pattern); ++i) {
+		test_addr1 = start + (((stress_addr_pattern[i] & half_mask) |
+				(~stress_addr_pattern[i] & ~half_mask)) & mask);
+		test_addr2 = start + (((stress_addr_pattern[i] & ~half_mask) |
+				(~stress_addr_pattern[i] & half_mask)) & mask);
+
+		for (j = 0; j < ARRAY_SIZE(stress_data_pattern); ++j) {
+			if (do_single_stress_test((vu_long *)test_addr1, (vu_long *)test_addr2,
+					stress_data_pattern[j])) {
+				return -1;
+			}
+		}
+	}
+
+	return 0;
+}
+
+/*
+ * One-To-Many Linear Feedback Shift Register implementation based on equation:
+ * x^15 + x^13 + x^12 + x^10 + 1
+ * It will generate 65535 distinct 16-bit values before it repeats itself.
+ * This length of random number sequence feats us well since integer number of
+ * 65535 values sequence will not fit into RAM array, meaning that every new iteration
+ * of this Prand generator will start at different low-order address bits.
+ */
+static uint16_t qmtest_rand_gen(uint16_t seed)
+{
+	int need_toggle = !!(seed & 0x1);
+
+	seed >>= 1;
+	if (need_toggle) {
+		seed ^= 0xB400;
+	}
+
+	return seed;
+}
+
+/*
+ * Random test:
+ * Use a pseudo-random generator to fill entire RAM array. Then use the same generator
+ * again to do a readback test.
+ */
+static int do_random_test(uint16_t *start, uint16_t *end, const uint16_t seed)
+{
+	uint16_t pattern = seed;
+	uint16_t *cur_p = start;
+
+	printf("RANDOM test: seed 0x%04x.. ", seed);
+
+	/* Seed value for our LFSR can not be 0 or 0xffff, otherwise it will lockup */
+	if (seed == 0 || seed == 0xFFFF) {
+		puts("Bab seed value\n");
+		return -1;
+	}
+
+	while (cur_p < end) {
+		pattern = qmtest_rand_gen(pattern);
+		*cur_p++ = pattern;
+	}
+
+	pattern = seed;
+	cur_p = start;
+	while (cur_p < end) {
+		pattern = qmtest_rand_gen(pattern);
+		if (*cur_p != pattern) {
+			printf("\nERROR at 0x%p: must be 0x%04x actual 0x%04x\n", cur_p, *cur_p, pattern);
+			return -1;
+		}
+		++cur_p;
+	}
+
+	puts("OK\n");
+	return 0;
+}
+
+/*
+ * Iterate through all 16-bit values using each as a seed for random test.
+ * It will take forever to complete by itself.
+ * Can be interrupted with ctrl+C.
+ */
+static inline int do_long_random_test(uint16_t *start, uint16_t *end)
+{
+	unsigned int curr_seed = 1;
+
+	printf("Long STRESS test: ctrl-C to abort\n");
+
+	while (curr_seed < 0xffff) {
+		if (do_random_test(start, end, curr_seed)) {
+			return -1;
+		}
+		curr_seed += 0xD;
+
+		if (ctrlc()) {
+			puts("Abort\n");
+			break;
+		}
+	}
+
+	return 0;
+}
+
+enum {
+	QTEST_CHECKERBOARD = (1 << 0),
+	QTEST_STRESS = (1 << 1),
+	QTEST_RANDOM = (1 << 2),
+	QTEST_RANDOM_LONG = (1 << 3),
+};
+
+int do_qmemtest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+
+	ulong start_addr = CONFIG_SYS_MEMTEST_START;
+	ulong end_addr;
+	int dcache_was_en = dcache_status();
+	int ret = 1;
+	uint16_t seed = 0xD31B;
+	DECLARE_GLOBAL_DATA_PTR;
+	int ddr_size = board_config(gd->bd->bi_board_id, BOARD_CFG_DDR_SIZE);
+	unsigned int test_bitm = 0;
+
+	if (argc > 3) {
+		cmd_usage(cmdtp);
+		return 1;
+	} else if (argc > 1) {
+		if (strcmp(argv[1], "checkerboard") == 0) {
+			test_bitm |= QTEST_CHECKERBOARD;
+		} else if (strcmp(argv[1], "stress") == 0) {
+			test_bitm |= QTEST_STRESS;
+		} else if (strcmp(argv[1], "random") == 0) {
+			test_bitm |= QTEST_RANDOM;
+			if (argc == 3) {
+				seed = (uint16_t)simple_strtoul(argv[2], NULL, 16);
+			}
+		} else if (strcmp(argv[1], "random_long") == 0) {
+			test_bitm |= QTEST_RANDOM_LONG;
+		} else {
+			cmd_usage(cmdtp);
+			return 1;
+		}
+	} else {
+		test_bitm |= QTEST_CHECKERBOARD | QTEST_STRESS | QTEST_RANDOM;
+	}
+
+	if (ddr_size > 0) {
+		end_addr = start_addr + ddr_size;
+	} else {
+		end_addr = CONFIG_SYS_MEMTEST_END;
+		printf("Couldn't get real DDR size\n");
+	}
+
+	printf("DRAM test, range [0x%08lx, 0x%08lx) %lu MB\n",
+		start_addr, end_addr, (end_addr - start_addr) / 1024 / 1024);
+
+	dcache_disable();
+
+	if ((test_bitm & QTEST_CHECKERBOARD) && do_checkerboard_test(start_addr, end_addr))
+		goto finished;
+
+	if ((test_bitm & QTEST_STRESS) && do_stress_test(start_addr, end_addr))
+		goto finished;
+
+	if ((test_bitm & QTEST_RANDOM) &&
+			do_random_test((uint16_t *)start_addr, (uint16_t *)end_addr, seed))
+		goto finished;
+
+	if ((test_bitm & QTEST_RANDOM_LONG) &&
+			do_long_random_test((uint16_t *)start_addr, (uint16_t *)end_addr))
+		goto finished;
+
+	ret = 0;
+finished:
+	if (dcache_was_en)
+		dcache_enable();
+
+	return ret;
+}
+
+U_BOOT_CMD(qmemtest, 3, 0, do_qmemtest,
+	"qmemtest [checkerboard, stress, random [16bit seed], random_long]",
+	"Run all or a single specified testcase\n"
+);
+
+#endif
diff --git a/board/ruby/cmd_qtnboard.c b/board/ruby/cmd_qtnboard.c
new file mode 100644
index 0000000..2e5381a
--- /dev/null
+++ b/board/ruby/cmd_qtnboard.c
@@ -0,0 +1,834 @@
+/*
+ * Quantenna Board Provision configuraion file upload/update/show support
+ */
+#include <common.h>
+#include <command.h>
+#include <environment.h>
+#include <malloc.h>
+#include <net.h>
+#include <stdbool.h>
+
+#include "ruby.h"
+#include "spi_flash.h"
+#include "board_cfg.h"
+#include "ruby_config.h"
+#include "ruby_board_cfg.h"
+#include "ruby_board_db.h"
+#include "shared_defs_common.h"
+
+#define FAIL			(-1)
+#define SUCCESS			(0)
+#define CMD_BUFSIZE		256
+#define TMP_BUFSIZE		256
+#define QTN_HW_BOARD_CFG_BIN		"qtn_hw_board_config.bin"
+#define QTN_HW_BOARD_DB_BIN		"qtn_hw_board_db.bin"
+#ifdef TOPAZ_EP_MINI_UBOOT
+#undef RUN
+#define RUN(fmt,args...)
+#endif
+
+#define QTN_FILES_DEBUG 0
+
+#if QTN_FILES_DEBUG
+#define DBG_PRINTF(fmt, args...) printf(fmt ,##args)
+#else
+#define DBG_PRINTF(fmt, args...)
+#endif
+
+char board_config_name[32];
+board_cfg_t board_hw_config;
+uint32_t flash_size = 0;
+
+static const char * const type2name[] = BOARD_CFG_FIELD_NAMES;
+
+static board_cfg_t	g_default_board_cfg = {
+	.bc_board_id	= QTN_RUBY_UNIVERSAL_BOARD_ID,
+	.bc_name	= "default board",
+	.bc_ddr_type	= DEFAULT_DDR_CFG,
+	.bc_ddr_speed	= DEFAULT_DDR_SPEED,
+	.bc_ddr_size	= DDR_AUTO,
+	.bc_emac0	= EMAC_NOT_IN_USE,
+	.bc_emac1	= EMAC_NOT_IN_USE,
+	.bc_phy0_addr = EMAC_PHY_ADDR_SCAN,
+	.bc_phy1_addr = EMAC_PHY_ADDR_SCAN,
+	.bc_spi1	= SPI1_IN_USE,
+	.bc_wifi_hw	= QTN_RUBY_WIFI_NONE,
+	.bc_uart1	= UART1_NOT_IN_USE,
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,
+	};
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+static uint32_t qtn_board_get_end(void)
+{
+	char tmpBuf[TMP_BUFSIZE];
+	uint32_t addr;
+	int i;
+	if ((i = getenv_r("config_data_end", tmpBuf, sizeof(tmpBuf))) <= 0) {
+		/* the new bootcfg data will be first entry in system */
+		addr = BOOT_CFG_DEF_START;
+	} else {
+		tmpBuf[i]='\0';
+		addr = simple_strtoul(tmpBuf, NULL, 16);
+	}
+	return addr;
+}
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
+static long qtn_board_get_env_val(char *env)
+{
+	char tmpBuf[TMP_BUFSIZE];
+	long val = 0;
+	int i;
+	if ((i = getenv_r(env, tmpBuf, sizeof(tmpBuf))) <= 0) {
+		val = -1;
+	} else {
+		tmpBuf[i]='\0';
+		val = simple_strtol(tmpBuf, NULL, 0);
+	}
+
+	return val;
+}
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+static uint32_t qtn_board_get_load_addr(void)
+{
+	char tmpBuf[TMP_BUFSIZE];
+	uint32_t addr;
+	int i;
+	if ((i = getenv_r("loadaddr", tmpBuf, sizeof(tmpBuf))) <= 0) {
+		/* the new bootcfg data will be first entry in system */
+		addr = CONFIG_SYS_LOAD_ADDR;
+	} else {
+		tmpBuf[i]='\0';
+		addr = simple_strtoul(tmpBuf, NULL, 16);
+	}
+	return addr;
+}
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
+static uint8_t *qtn_get_file_env_ptr(char *filename, uint16_t *size)
+{
+	int retval;
+	uint32_t offset;
+	char tmp[64], *ch;
+
+	retval = getenv_r(filename, tmp, sizeof(tmp));
+	if (retval < 0) {
+		printf("File %s doesn't exist\n", filename);
+		return NULL;
+	}
+
+	if(strstr(tmp, "cfg") == NULL) {
+		printf("wrong file description. correct format is 'cfg 0xXXX 0xYYY'.\n");
+		printf("use printenv for debugging\n");
+		return NULL;
+	}
+
+	/* skip the string "cfg " */
+	ch = tmp;
+	while (*ch != '0') ch++;
+
+	offset = simple_strtoul(ch, NULL, 16);
+
+	/* skip offset to find size */
+	if (size) {
+		while (*ch != ' ') ch++;
+		while (*ch != '0') ch++;
+		*size = simple_strtoul(ch, NULL, 16);
+	}
+	return env_get_file_body(offset);
+}
+
+static int qtn_get_emac_set(void)
+{
+	char *emac_set_str = NULL;
+	char *emac_index = NULL;
+	uint32_t emac_set = 0;
+	int retval = 0;
+
+	emac_index = getenv("emac_index");
+	emac_set_str = getenv("emac_set");
+
+	if (emac_index != NULL && emac_set_str != NULL) {
+		if (simple_strtoul(emac_index, NULL, 0) == 0) {
+
+			emac_set = simple_strtoul(emac_set_str, NULL, 0);
+			g_default_board_cfg.bc_emac0 = (int)emac_set;
+		}else if (simple_strtoul(emac_index, NULL, 0) == 1) {
+
+			emac_set = simple_strtoul(emac_set_str, NULL, 0);
+			g_default_board_cfg.bc_emac1 = (int)emac_set;
+		}
+	} else {
+		printf("Please setup emac setting correctly for tftp load file\n");
+		retval = FAIL;
+	}
+
+	return retval;
+}
+
+static int qtn_get_ddr_set(void)
+{
+	char ddr_set_str[TMP_BUFSIZE];
+	char *ddr_set_type = NULL;
+	char *ddr_set_speed = NULL;
+	char *ddr_set_size = NULL;
+	int retval = 0;
+	int i;
+
+	i = getenv_r("ddr_set", ddr_set_str, sizeof(ddr_set_str));
+
+	if (i > 0) {
+		ddr_set_str[i] = '\0';
+		ddr_set_type = strtok(ddr_set_str, ",");
+		ddr_set_speed = strtok(NULL, ",");
+		ddr_set_size = strtok(NULL, ",");
+
+		if (ddr_set_type == NULL || ddr_set_speed == NULL || ddr_set_size == NULL) {
+			goto INVALID_DDR_SET;
+		}
+		g_default_board_cfg.bc_ddr_type = (int)simple_strtoul(ddr_set_type, NULL, 0);
+		g_default_board_cfg.bc_ddr_speed = (int)simple_strtoul(ddr_set_speed, NULL, 0);
+		g_default_board_cfg.bc_ddr_size = (int)simple_strtoul(ddr_set_size, NULL, 0);
+
+		return retval;
+	}
+
+INVALID_DDR_SET:
+	printf("Please setup ddr setting correctly for tftp load file\n");
+	retval = FAIL;
+
+	return retval;
+}
+
+static int board_hw_config_apply(uint16_t type,
+		int data, uint8_t datalen,
+		const char *str, uint8_t strlen)
+{
+	int need_save = 0;
+	int lna_gain = 0;
+	int antenna_number = 0;
+	int antenna_gain = 0;
+	int lna_gain_5db = 0;
+	int tx_power_cal = 0;
+
+	if (type == BOARD_CFG_NAME) {
+		memcpy(board_config_name, str, min(strlen, sizeof(board_config_name) - 1));
+		board_hw_config.bc_name = board_config_name;
+	} else if (type < BOARD_CFG_STRUCT_NUM_FIELDS) {
+		int *p = (int *) &board_hw_config;
+		p[type] = data;
+	} else {
+		switch (type) {
+		case BOARD_CFG_FLASH_SIZE:
+			flash_size = data;
+			if (flash_size <= 1024)
+				flash_size <<= 20;
+			break;
+		case BOARD_CFG_EXT_LNA_GAIN:
+			lna_gain = data;
+			if (qtn_board_get_env_val("ext_lna_gain") != lna_gain) {
+				RUN("setenv ext_lna_gain %d", lna_gain);
+				need_save = 1;
+			}
+			break;
+		case BOARD_CFG_TX_ANTENNA_NUM:
+			antenna_number = data;
+			if (qtn_board_get_env_val("antenna_num") != antenna_number) {
+				RUN("setenv antenna_num %d", antenna_number);
+				need_save = 1;
+			}
+			break;
+		case BOARD_CFG_TX_ANTENNA_GAIN:
+			antenna_gain = data;
+			if (qtn_board_get_env_val("antenna_gain") != antenna_gain) {
+				RUN("setenv antenna_gain %d", antenna_gain);
+				need_save = 1;
+			}
+			break;
+		case BOARD_CFG_EXT_LNA_BYPASS_GAIN:
+			lna_gain_5db = data;
+			if ((int8_t)(qtn_board_get_env_val("ext_lna_bypass_gain") - 256 ) != (int8_t)(lna_gain_5db - 256)) {
+				RUN("setenv ext_lna_bypass_gain %d", (int8_t)(lna_gain_5db - 256));
+				need_save = 1;
+			}
+			break;
+		case BOARD_CFG_CALSTATE_VPD:
+			tx_power_cal = data;
+			if (qtn_board_get_env_val("tx_power_cal") != tx_power_cal) {
+				RUN("setenv tx_power_cal %d", tx_power_cal);
+				need_save = 1;
+			}
+			break;
+		default:
+			break;
+		}
+	}
+
+	return need_save;
+}
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+static int board_hw_config_display(uint16_t type,
+		int data, uint8_t datalen,
+		const char *str, uint8_t strlen)
+{
+	if (type >= ARRAY_SIZE(type2name)) {
+		return 0;
+	}
+
+	printf("%d: %s:\n", type+1, type2name[type]);
+	if (type == BOARD_CFG_NAME) {
+		printf(" %s\n", str);
+	} else if (datalen == 0) {
+		int db_data = 0;
+		if (board_parse_tag(type2name[type], str, &db_data) == 0) {
+			printf(" %s, 0x%08x\n", str, db_data);
+		} else {
+			printf(" %s\n", str);
+		}
+	} else {
+		printf(" %s, 0x%08x\n", str, data);
+	}
+
+	return 0;
+}
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
+static int board_hw_config_no_resolve(int bc_index)
+{
+	return bc_index == BOARD_CFG_ID ||
+		bc_index == BOARD_CFG_NAME ||
+		bc_index == BOARD_CFG_EMAC0 ||
+		bc_index == BOARD_CFG_EMAC1 ||
+		bc_index == BOARD_CFG_RGMII_TIMING ||
+		bc_index >= ARRAY_SIZE(type2name);
+}
+
+static int board_hw_config_iterate(int (*apply)(uint16_t, int, uint8_t, const char *, uint8_t),
+		const uint8_t * const board_config,
+		uint16_t board_config_size)
+{
+	int ret = 0;
+	const uint8_t *cfg_p = board_config;
+
+	while (1) {
+		uint16_t config_index;
+		uint16_t bc_index;
+		uint8_t data_len = 0;
+		uint8_t str_len = 0;
+		char str[64] = {0};
+		int data = 0;
+		int uboot_data = 0;
+		uint16_t bytes_read;
+
+		/*
+		 * Config index from the file is
+		 * board config index + 1
+		 */
+		memcpy(&config_index, cfg_p, sizeof(config_index));
+		cfg_p += sizeof(config_index);
+		if (config_index > ARRAY_SIZE(type2name)) {
+			printf("%s: invalid config_index: %u\n", __FUNCTION__, config_index);
+			break;
+		}
+
+		str_len = *cfg_p;
+		cfg_p += sizeof(str_len);
+		if (str_len > sizeof(str) - 1) {
+			printf("%s: invalid strlen: %u\n", __FUNCTION__, str_len);
+			break;
+		}
+		memcpy(str, cfg_p, str_len);
+		cfg_p += str_len;
+
+		data_len = *cfg_p;
+		cfg_p += sizeof(data_len);
+		if (data_len > 4) {
+			printf("%s: invalid data len: %u\n", __FUNCTION__, data_len);
+			break;
+		}
+		/* file is always little endian */
+		memcpy(&data, cfg_p, data_len);
+		cfg_p += data_len;
+
+		bc_index = config_index - 1;
+		/* lookup string in the compiled in database */
+		if (board_hw_config_no_resolve(bc_index)) {
+			/* Don't attempt to resolve */
+		} else if (data_len > 0 &&
+				!board_parse_tag(type2name[bc_index], str, &uboot_data) &&
+				data != uboot_data) {
+			printf("%s: %s value from config %d doesn't match expected value %d\n",
+					__FUNCTION__, type2name[bc_index], data, uboot_data);
+		}
+
+		if (0 && bc_index < ARRAY_SIZE(type2name)) {
+			printf("%s: cfg %u %s <- 0x%08lx %s\n",
+					__FUNCTION__,
+					bc_index, type2name[bc_index],
+					(unsigned long) data, str);
+		}
+
+		if (bc_index < ARRAY_SIZE(type2name))
+			ret |= apply(bc_index, data, data_len, str, str_len);
+
+		bytes_read = cfg_p - ((const uint8_t *) board_config);
+		if (bytes_read >= board_config_size) {
+			break;
+		}
+	}
+
+	return ret;
+}
+
+int board_hw_config_read(void)
+{
+	int need_save = 0;
+	uint16_t board_config_size = 0;
+	const uint8_t * const board_config = qtn_get_file_env_ptr(QTN_HW_BOARD_CFG_BIN, &board_config_size);
+
+	if (board_config == NULL) {
+
+		if (qtn_get_emac_set() < 0) {
+			return FAIL;
+		}
+
+		if (qtn_get_ddr_set() < 0) {
+			return FAIL;
+		}
+
+		memcpy(&board_hw_config, &g_default_board_cfg, sizeof(board_cfg_t));
+		return SUCCESS;
+	}
+
+	board_hw_config.bc_board_id = QTN_RUBY_UNIVERSAL_BOARD_ID;
+	need_save = board_hw_config_iterate(&board_hw_config_apply,
+			board_config, board_config_size);
+	if (need_save == 1) {
+		saveenv();
+	}
+
+	return 0;
+}
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+int do_qtn_show_board_hw_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	uint16_t board_config_size;
+	const uint8_t * const board_config = qtn_get_file_env_ptr(QTN_HW_BOARD_CFG_BIN, &board_config_size);
+
+	if (board_config == NULL) {
+		return 0;
+	}
+
+	printf("##############current board Hardware configuration########################\n");
+
+	board_hw_config_iterate(&board_hw_config_display,
+			board_config, board_config_size);
+
+	return 0;
+}
+
+int do_qtn_show_board_hw_db(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	uint16_t board_database_size;
+	const uint8_t * const board_database = qtn_get_file_env_ptr(QTN_HW_BOARD_DB_BIN, &board_database_size);
+	const uint8_t *cfg_p = board_database;
+
+	uint16_t tlv_cnt;
+	int i;
+
+	if (board_database == NULL) {
+		return 0;
+	}
+
+	memcpy(&tlv_cnt, cfg_p, sizeof(tlv_cnt));
+	cfg_p += sizeof(tlv_cnt);
+
+	printf("##############current board Hardware database########################\n");
+	printf("Total %d configuration types\n", tlv_cnt-1);
+	for (i = 0; i < tlv_cnt; i++) {
+		int j;
+		uint16_t type;
+		uint16_t v_cnt;
+		memcpy(&type, cfg_p, sizeof(type));
+		cfg_p += sizeof(type);
+		memcpy(&v_cnt, cfg_p, sizeof(v_cnt));
+		cfg_p += sizeof(v_cnt);
+
+		if (type > ARRAY_SIZE(type2name)) {
+			printf("%u: %s, %u options\n", type, "unknown", v_cnt);
+		}else if (type > 0)
+			printf("%u: %s, %u options\n", type, type2name[type-1], v_cnt);
+
+		for (j = 0; j < v_cnt; j++) {
+			const char *str_sep = j == (v_cnt - 1) ? "" : ";";
+			uint8_t datalen;
+			uint8_t strlen;
+			char str[64] = {0};
+			int data = 0;
+
+			strlen = *cfg_p;
+			cfg_p += sizeof(strlen);
+			if (strlen > sizeof(str) - 1) {
+				printf("%s: invalid strlen: %u\n", __FUNCTION__, strlen);
+				break;
+			}
+			memcpy(str, cfg_p, strlen);
+			cfg_p += strlen;
+
+			datalen = *cfg_p;
+			cfg_p += sizeof(datalen);
+			if (datalen > 4) {
+				printf("%s: invalid datalen: %u\n", __FUNCTION__, datalen);
+				break;
+			}
+			memcpy(&data, cfg_p, datalen);	// little endian
+			cfg_p += datalen;
+
+			if (type > 0) {
+				if (datalen == 0) {
+					printf(" %s%s\n", str, str_sep);
+				} else {
+					printf(" %s, 0x%08x%s\n", str, data, str_sep);
+				}
+			}
+		}
+	}
+
+	return 0;
+}
+
+int qtn_upload_update_file_to_flash(char *file_name, int transfer_len)
+{
+	int retval = 0;
+	uint32_t mem_addr = qtn_board_get_load_addr();
+	uchar *data = NULL;
+
+	if ( qtn_get_file_env_ptr(file_name, NULL) ) {
+		printf("file %s already exist. use qtn_erase_file to delete it first\n", file_name);
+		return FAIL;
+	}
+
+	if ((qtn_board_get_end() + transfer_len) > BOOT_CFG_DATA_SIZE) {
+                printf("error - len out of range, transfer len = %d, end_of_present = 0x%08x, border = 0x%08x\n", transfer_len, qtn_board_get_end(), (int)BOOT_CFG_DATA_SIZE);
+                return 0;
+        }
+
+	if (transfer_len > 0) {
+                retval = RUN("setenv %s cfg 0x%08x 0x%08x", file_name, (qtn_board_get_end()), transfer_len);
+                if (retval >= 0) {
+                        retval = RUN("setenv config_data_end 0x%08x", (qtn_board_get_end() + transfer_len));
+                        if (retval < 0) {
+                                printf("setenv config_data_end error\n");
+                                return 0;
+                        }
+                } else {
+                        printf("setenv %s error\n", file_name);
+                        return 0;
+                }
+        } else {
+                printf("File size of %s error, please try again\n", file_name);
+                return 0;
+        }
+
+	data = qtn_get_file_env_ptr(file_name, NULL);
+	if (data != NULL) {
+		memcpy(data, (void *) mem_addr, transfer_len);
+                printf("0x%x bytes data copied from 0x%.8x to 0x%.8x\n", transfer_len, (size_t)mem_addr, (size_t)data);
+	} else {
+		printf("unable to write file\n");
+		return 0;
+	}
+
+	env_crc_update();
+	saveenv();
+	return 0;
+}
+
+int do_qtn_upload_file(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	char *file_name = NULL;
+	int retval = 0;
+
+	if (argc < 2) {
+		printf("Help:\n");
+		printf("qtn_upload_file <file_name>\n");
+		return 0;
+	}
+	file_name = argv[1];
+
+	retval = RUN("tftpboot %s", file_name);
+	if (retval < 0)
+		return retval;
+
+	return qtn_upload_update_file_to_flash(file_name, NetBootFileXferSize);
+}
+
+int do_qtn_upload_file_serial(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	char tmpBuf[TMP_BUFSIZE];
+	char *file_name;
+	int retval = 0;
+	uint32_t file_size;
+
+	if (argc < 2) {
+		printf("Help:\n");
+		printf("qtn_upload_file_serial <file_name>\n");
+		return 0;
+	}
+	file_name = argv[1];
+
+	retval = RUN("loadb");
+	if (retval < 0)
+		return retval;
+
+	getenv_r("filesize", tmpBuf, sizeof(tmpBuf));
+	file_size = simple_strtoul(tmpBuf, NULL, 16);
+
+	return qtn_upload_update_file_to_flash(file_name, file_size);
+}
+
+bool qtn_envvar_get_next
+(
+		int* offset,            /* for first var just put 0 */
+		char* name,             /* name typically ends by '=' in environment database. better just to copy it to outer buffer*/
+		int name_buffer_length, /* to be safe about buffer overflows */
+		char** value            /* as the value is zero-terminated it is safe not to copy it*/
+)
+{
+	bool result = false;
+
+	char* name_and_value = (char*)env_get_addr(*offset);
+
+	char* value_part = strchr(name_and_value, '=');
+
+	if (value_part) {
+		int name_len = value_part - name_and_value;
+		result = true; /* OK, we've found something like name=value\0 */
+		*value = value_part + 1; /* skip the '=' itself */
+		if (name_len > (name_buffer_length -1))	{
+			name_len = name_buffer_length -1;
+			printf("environment variable name length exceeds %d, truncated\n", name_buffer_length);
+		}
+		strncpy(name, name_and_value, name_len);
+		name[name_len] = 0;
+	}
+
+	*offset += strlen(name_and_value) + 1; /* +1 to skip trailing zero */
+
+	return result;
+}
+
+/*returns TRUE if the variable looks like file description*/
+bool qtn_get_file_location(char* value, uint8_t** p_data, uint16_t* size)
+{
+#define FILE_ID_TRAIT "cfg "
+#define	FILE_ID_TRAIT_LEN (sizeof(FILE_ID_TRAIT)-1)
+	int result = false;
+	if (0 == strncmp(value, FILE_ID_TRAIT, FILE_ID_TRAIT_LEN)) {
+		char* current = value + FILE_ID_TRAIT_LEN;
+		while (*current != '0') current++; /* skip blanks */
+		if (p_data) {
+			*p_data = env_get_file_body(simple_strtoul(current, &current, 16));
+		}
+		while (*current != '0') current++; /* skip blanks */
+		if (size) {
+			*size = (uint16_t)simple_strtoul(current, NULL, 16);
+		}
+		result = true;
+	}
+	return result;
+}
+
+void qtn_set_file_location(char* value, uint8_t* p_data, uint16_t size)
+{
+#define FILE_DESCRIPTOR_FORMAT_STR "cfg 0x%08x 0x%08x"
+	/*it is safe to do modification in place because of fixed data format*/
+	sprintf
+	(
+		value,
+		FILE_DESCRIPTOR_FORMAT_STR,
+		(uint32_t)(p_data - (uint8_t*)env_get_file_body(0)), // an offset
+		(uint32_t)size
+	);
+}
+
+int do_qtn_erase_file(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	char *file_name           = NULL;
+	int offset                = 0;
+	char  name[TMP_BUFSIZE];
+	char* value               = NULL;
+	uint8_t* erase_ptr        = NULL;
+	uint16_t erase_size       = 0;
+	int bytes_to_move         = 0;
+	uint32_t current_data_end = qtn_board_get_end();
+
+	if (argc < 2) {
+		printf("Help:\n");
+		printf("qtn_erase_file <file_name>\n");
+		return FAIL;
+	}
+	file_name = argv[1];
+
+	erase_ptr = qtn_get_file_env_ptr(file_name, &erase_size);
+	DBG_PRINTF("erase_ptr = %p, size to be erased = %d\n", erase_ptr, erase_size);
+
+	if ( NULL == erase_ptr ) {
+		DBG_PRINTF("file does not exist\n");
+		return FAIL;
+	}
+
+	while ( qtn_envvar_get_next( &offset, name, sizeof(name), &value) ) {
+		uint8_t* dataptr = NULL;
+		uint16_t size;
+		DBG_PRINTF("checking variable %s\n", name);
+		if (qtn_get_file_location(value, &dataptr, &size)) {
+			DBG_PRINTF("file with size %d is at %p\n", size, dataptr);
+			if ((erase_ptr + erase_size) <= dataptr) {
+				qtn_set_file_location(value, dataptr - erase_size, size);
+				DBG_PRINTF("shifted left from %p to %p\n", dataptr, dataptr - erase_size);
+			} else {
+				DBG_PRINTF("no need to move\n");
+			}
+		} else {
+			DBG_PRINTF("not a file, skipped\n");
+		}
+	}
+	RUN("setenv config_data_end 0x%08x", current_data_end - erase_size );
+	RUN("setenv %s", file_name);
+
+	/*file descriptors updated, now is the time to shift the actual content*/
+	/*we are dealing with overlapped regions so memmove is our choice*/
+	bytes_to_move = (uint8_t*)env_get_file_body(current_data_end) - ( erase_ptr + erase_size );
+	DBG_PRINTF("%d byte(s) needs to be moved from %p to %p\n", bytes_to_move, erase_ptr + erase_size, erase_ptr);
+	memmove(erase_ptr, erase_ptr + erase_size, bytes_to_move);
+	DBG_PRINTF("done\n");
+
+	env_crc_update();
+	DBG_PRINTF("environment CRC updated\n");
+
+	saveenv();
+	DBG_PRINTF("environment saved\n");
+
+	return SUCCESS;
+}
+
+int do_qtn_rename_file(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	char* old_file_name      = NULL;
+	char* new_file_name      = NULL;
+	char tmpBuf[TMP_BUFSIZE] = {0};
+
+	if (argc < 3) {
+		printf("Help:\n");
+		printf("qtn_rename_file <oldname> <newname>\n");
+		return FAIL;
+	}
+	old_file_name = argv[1];
+	new_file_name = argv[2];
+
+	if ( getenv_r(old_file_name, tmpBuf, sizeof(tmpBuf)) <= 0) {
+		printf("unable to get value from environment. use printenv for debugging\n");
+		return FAIL;
+	}
+	if ( !qtn_get_file_location(tmpBuf, NULL, NULL) ) {
+		printf("wrong file descriptor. unable to rename\n");
+		return FAIL;
+	}
+
+	setenv(old_file_name, NULL);
+	setenv(new_file_name, tmpBuf);
+
+	env_crc_update();
+	saveenv();
+
+	return SUCCESS;
+}
+
+int do_qtn_dump_file(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	char *file_name      = NULL;
+	uint8_t* ptr         = NULL;
+	uint16_t size        = 0;
+
+	if (argc < 2) {
+		printf("Help:\n");
+		printf("qtn_dump_file <file_name>\n");
+		return FAIL;
+	}
+	file_name = argv[1];
+
+	ptr = qtn_get_file_env_ptr(file_name, &size);
+
+	if ( !ptr ) {
+		printf("Unable to read file %s\n", file_name);
+		return FAIL;
+	}
+
+	RUN("md.b 0x%x 0x%x", (uint32_t)ptr, (uint32_t)size);
+
+	return SUCCESS;
+}
+
+int do_qtn_list_files(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	int offset                = 0;
+	char  name[TMP_BUFSIZE];
+	char* value               = NULL;
+
+	while (qtn_envvar_get_next( &offset, name, sizeof(name), &value)) {
+		uint8_t* dataptr = NULL;
+		uint16_t size;
+		if (qtn_get_file_location(value, &dataptr, &size)) {
+			printf("file %s with size %d is at %p\n", name, size, dataptr);
+		}
+	}
+
+	return SUCCESS;
+}
+
+U_BOOT_CMD(qtn_upload_file, CONFIG_SYS_MAXARGS, 0, do_qtn_upload_file,
+		"Upload file from memory to flash via ethernet port",
+		"Quantenna universal board config. Attempts to upload file into flash\n"
+	  );
+
+U_BOOT_CMD(qtn_upload_file_serial, CONFIG_SYS_MAXARGS, 0, do_qtn_upload_file_serial,
+		"Upload file from memory to flash via serial port",
+		"Quantenna universal board config. Attempts to upload file into flash\n"
+	  );
+
+U_BOOT_CMD(qtn_show_board_config, CONFIG_SYS_MAXARGS, 0, do_qtn_show_board_hw_config,
+		"Show board hw configuration",
+		"Quantenna universal board config.\n"
+	  );
+
+U_BOOT_CMD(qtn_show_board_database, CONFIG_SYS_MAXARGS, 0, do_qtn_show_board_hw_db,
+		"Show board hw configuration database content",
+		"Quantenna universal board config.\n"
+	  );
+
+U_BOOT_CMD(qtn_erase_file, 2, 0, do_qtn_erase_file,
+		"Erases file from flash <filename>",
+		"Quantenna universal board config. Erases file from flash\n"
+	  );
+
+U_BOOT_CMD(qtn_rename_file, 3, 0, do_qtn_rename_file,
+		"Renames file from <oldname> to <newname>",
+		"Quantenna universal board config. Renames file\n"
+	  );
+
+U_BOOT_CMD(qtn_dump_file, 2, 0, do_qtn_dump_file,
+		"Dumps file from config data space <filename>",
+		"Quantenna universal board config. Dumps file\n"
+	  );
+
+U_BOOT_CMD(qtn_list_files, 1, 0, do_qtn_list_files,
+		"list files from config data space",
+		"Quantenna universal board config.\n"
+	  );
+
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
diff --git a/board/ruby/cmd_qtnboot.c b/board/ruby/cmd_qtnboot.c
new file mode 100644
index 0000000..4b63a4c
--- /dev/null
+++ b/board/ruby/cmd_qtnboot.c
@@ -0,0 +1,312 @@
+/*
+ * Quantenna boot support
+ */
+#include <common.h>
+#include <command.h>
+#include <environment.h>
+
+#include "ruby.h"
+#include "spi_flash.h"
+
+#define BUFSIZE 256
+
+static int qtnboot_check(char *buf,
+		unsigned long flash_size, unsigned long sector_size,
+		unsigned long safety_addr, unsigned long safety_size,
+		unsigned long live_addr, unsigned long live_size)
+{
+	/* check partition sizes */
+	if ((safety_size == 0) || (live_size == 0)) {
+		sprintf(buf, "linux partition sizes must be non-zero");
+		return -1;
+	}
+
+	/* check that partition addresses and sizes are sector aligned */
+	if ((safety_addr % sector_size) ||
+			(live_addr % sector_size) ||
+			(safety_size % sector_size) ||
+			(live_size % sector_size)) {
+		sprintf(buf, "all values must fit sector alignment: 0x%lx", sector_size);
+		return -1;
+	}
+
+	/* check that safety partition start clears the u-boot partitions */
+	if (safety_addr < IMAGES_START_ADDR) {
+		sprintf(buf, "%s 0x%lx overlaps u-boot partitions (ending 0x%x)",
+				SAFETY_IMG_ADDR_ARG, safety_addr, IMAGES_START_ADDR);
+		return -1;
+	}
+
+	/* check that live is at least as large as safety, so safety can be copied over live */
+	if (live_size < safety_size) {
+		sprintf(buf, "safety image size exceeds live image size");
+		return -1;
+	}
+
+	/* check that safety end doesn't overlap live start */
+	if (live_addr < safety_addr + safety_size) {
+		sprintf(buf, "live_addr 0x%lx not after safety end 0x%lx",
+				live_addr, safety_addr + safety_size);
+		return -1;
+	}
+
+	/* check that live end doesn't overrun flash end */
+	if (live_addr + live_size > flash_size) {
+		sprintf(buf, "live end 0x%lx exceeds flash size 0x%lx",
+				live_addr + live_size, flash_size);
+		return -1;
+	}
+
+	return 0;
+}
+
+/* get all of the pointers, vaguely validate them, 1 on failure, 0 on success */
+static int get_qtnboot_envvars(unsigned long *safety_addr, unsigned long *live_addr,
+		unsigned long *safety_size, unsigned long *live_size)
+{
+	const unsigned long sector_size = spi_flash_sector_size();
+	const unsigned long flash_size = spi_flash_size();
+
+	const char *safety_addr_str = getenv(SAFETY_IMG_ADDR_ARG);
+	const char *safety_size_str = getenv(SAFETY_IMG_SIZE_ARG);
+	const char *live_addr_str = getenv(LIVE_IMG_ADDR_ARG);
+	const char *live_size_str = getenv(LIVE_IMG_SIZE_ARG);
+	char errbuf[BUFSIZE] = {0};
+	int error;
+
+	*safety_addr = 0;
+	*safety_size = 0;
+	*live_addr = 0;
+	*live_size = 0;
+
+	/*
+	 * Look for environment variables for each parameter,
+	 * or provide sensible defaults based on flash size.
+	 * No defaults for 8MB, which isn't officially supported
+	 */
+	if (safety_addr_str) {
+		*safety_addr = simple_strtoul(safety_addr_str, NULL, 0);
+	} else {
+		*safety_addr = IMAGES_START_ADDR;
+	}
+
+	if (safety_size_str) {
+		*safety_size = simple_strtoul(safety_size_str, NULL, 0);
+	} else if (flash_size == FLASH_16MB) {
+		*safety_size = IMG_SIZE_16M_FLASH_2_IMG;
+	}
+
+	if (live_addr_str) {
+		*live_addr = simple_strtoul(live_addr_str, NULL, 0);
+	} else {
+		*live_addr = *safety_addr + *safety_size;
+	}
+
+	if (live_size_str) {
+		*live_size = simple_strtoul(live_size_str, NULL, 0);
+	} else {
+		*live_size = *safety_size;
+	}
+
+	error = qtnboot_check(errbuf, flash_size, sector_size,
+			*safety_addr, *safety_size, *live_addr, *live_size);
+
+	printf("%s: vars: %s 0x%lx %s 0x%lx %s 0x%lx %s 0x%lx\n",
+			__FUNCTION__,
+			SAFETY_IMG_ADDR_ARG, *safety_addr,
+			SAFETY_IMG_SIZE_ARG, *safety_size,
+			LIVE_IMG_ADDR_ARG, *live_addr,
+			LIVE_IMG_SIZE_ARG, *live_size);
+	if (error) {
+		printf("%s: vars invalid: %s\n", __FUNCTION__, errbuf);
+	}
+
+	return error;
+}
+
+/* setup the mtdargs parameter to pass a partition table into linux */
+static void set_mtdparts(unsigned long safety_size, unsigned long live_size)
+{
+	char mtdparts[BUFSIZE];
+
+	sprintf(mtdparts, "spi_flash:"
+			"%dk(" MTD_PARTNAME_UBOOT_BIN "),"
+			"%dk(" MTD_PARTNAME_UBOOT_ENV "),"
+			"%dk(" MTD_PARTNAME_UBOOT_ENV_BAK "),"
+			"%luk(" MTD_PARTNAME_LINUX_SAFETY "),"
+			"%luk(" MTD_PARTNAME_LINUX_LIVE "),"
+			"-(" MTD_PARTNAME_DATA ")",
+			UBOOT_TEXT_PARTITION_SIZE / 1024,
+			UBOOT_ENV_PARTITION_SIZE / 1024,
+			UBOOT_ENV_PARTITION_SIZE / 1024,
+			safety_size / 1024,
+			live_size / 1024
+	       );
+
+	setenv("mtdparts", mtdparts);
+}
+
+int do_qtn_setmtdparts (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	unsigned long safety_addr = 0;
+	unsigned long safety_size = 0;
+	unsigned long live_addr = 0;
+	unsigned long live_size = 0;
+
+	if (get_qtnboot_envvars(&safety_addr, &live_addr, &safety_size, &live_size))
+		return -1;
+	set_mtdparts(safety_size, live_size);
+	return 0;
+}
+
+U_BOOT_CMD(qtn_setmtdparts, CONFIG_SYS_MAXARGS, 0, do_qtn_setmtdparts,
+           "set the environment variable 'mtdparts'",
+           "sets mtdparts to a string appropriate for the mtdparts kernel \n"
+           "command line argument. Partitions are derived from the environment\n"
+           "variables: ${" LIVE_IMG_ADDR_ARG "}, ${" SAFETY_IMG_ADDR_ARG "},\n"
+           "${" SAFETY_IMG_SIZE_ARG "} and ${" LIVE_IMG_SIZE_ARG "}\n"
+          );
+
+int _run(const char *function_name, const char *fmt, ...)
+{
+	va_list args;
+	char cmdbuf[BUFSIZE];
+
+	va_start(args, fmt);
+	vsprintf(cmdbuf, fmt, args);
+	va_end(args);
+
+	printf("%s: %s\n", function_name, cmdbuf);
+
+	return run_command(cmdbuf, 0);
+}
+
+int do_qtnboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	unsigned long safety_addr = 0;
+	unsigned long safety_size = 0;
+	unsigned long live_addr = 0;
+	unsigned long live_size = 0;
+	const unsigned long mem_addr = QTNBOOT_COPY_DRAM_ADDR;
+
+	if (get_qtnboot_envvars(&safety_addr, &live_addr, &safety_size, &live_size)) {
+		return -1;
+	}
+
+	set_mtdparts(safety_size, live_size);
+	RUN("setenv bootargs ${bootargs} mtdparts=${mtdparts}");
+
+	// attempt to load the live image into memory and boot it.
+	RUN("spi_flash read 0x%08lx 0x%08lx 0x%08lx", live_addr, mem_addr, live_size);
+	RUN("bootm 0x%08lx", mem_addr);
+
+	// if control returns, it failed
+	// load the safety image into memory, copy it over the live image, then boot/reset
+	RUN("spi_flash read 0x%08lx 0x%08lx 0x%08lx", safety_addr, mem_addr, safety_size);
+
+	// run_command returns -1 for errors, or repeatability, rather than return codes
+	if (RUN("imi 0x%08lx", mem_addr) < 0) {
+		printf("FATAL: safety image at 0x%08lx appears corrupt\n", safety_addr);
+		return -1;
+	}
+
+	RUN("spi_flash unlock");
+	RUN("spi_flash erase 0x%08lx 0x%08lx", live_addr, live_size);
+	RUN("spi_flash write 0x%08lx 0x%08lx 0x%08lx", live_addr, mem_addr, safety_size);
+	RUN("sleep 2");
+	RUN("reset");
+
+	// never gets to here
+	return 0;
+}
+
+U_BOOT_CMD(qtnboot, CONFIG_SYS_MAXARGS, 0, do_qtnboot,
+		"boot from live image, recover safety image if necessary",
+		"Quantenna dual boot with recovery. Attempts to boot the live image\n"
+		"found at address ${" LIVE_IMG_ADDR_ARG "}. If the checksum fails, \n"
+		"the safety image at ${" SAFETY_IMG_ADDR_ARG "} is copied over the \n"
+		"live image, then booted.\n"
+	  );
+
+int do_bootselect(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	unsigned long safety_addr = 0;
+	unsigned long safety_size = 0;
+	unsigned long live_addr = 0;
+	unsigned long live_size = 0;
+	unsigned long addr;
+	unsigned long size;
+	const unsigned long mem_addr = QTNBOOT_COPY_DRAM_ADDR;
+	unsigned long bootsel_val = 0;
+	const char* bootsel_str = NULL;
+	int num_of_image = 2;
+
+	if (get_qtnboot_envvars(&safety_addr, &live_addr, &safety_size, &live_size)) {
+		return -1;
+	}
+
+	bootsel_str = getenv("bootselect");
+	if (bootsel_str) {
+		bootsel_val = simple_strtoul(bootsel_str, NULL, 0);
+	}
+
+	while (num_of_image--) {
+		if (bootsel_val) {
+			addr = safety_addr;
+			size = safety_size;
+		} else {
+			addr = live_addr;
+			size = live_size;
+		}
+
+		RUN("spi_flash read 0x%08lx 0x%08lx 0x%08lx", addr, mem_addr, size);
+		RUN("bootm 0x%08lx", mem_addr);
+
+		//if control return,switch to boot another image
+		bootsel_val = !bootsel_val;
+		RUN("setenv bootselect %d", bootsel_val);
+		saveenv();
+	}
+
+	return -1;
+}
+
+U_BOOT_CMD(bootselect, CONFIG_SYS_MAXARGS, 0, do_bootselect,
+		"boot live/safety depending on value of 'bootselect'",
+		"If env variable 'bootselect' is 1, boot from image at safety address;\n"
+		"Otherwise boot from image at live address\n"
+	  );
+
+
+int do_setgpio(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	unsigned long ngpio;
+	unsigned long value;
+
+	if (argc < 2) {
+		cmd_usage(cmdtp);
+		return 1;
+	}
+
+	ngpio = simple_strtoul(argv[1], NULL, 10);
+	if (ngpio >= RUBY_GPIO_MAX)
+		return 1;
+
+	if (argc > 2) {
+		value = simple_strtoul(argv[2], NULL, 10);
+		value = !!value;
+	} else
+		value = 1;
+
+	gpio_output(ngpio, value);
+	gpio_config(ngpio, RUBY_GPIO_MODE_OUTPUT);
+
+	return 0;
+}
+
+U_BOOT_CMD(setgpio, CONFIG_SYS_MAXARGS, 2, do_setgpio,
+	"Configure gpio as output and set the output value",
+	"ngpio [value], drive the ngpio to 'value'\n"
+	"drive the ngpio to 1 if value is absent\n"
+);
+
diff --git a/board/ruby/config.mk b/board/ruby/config.mk
new file mode 100644
index 0000000..9aa7644
--- /dev/null
+++ b/board/ruby/config.mk
@@ -0,0 +1,2 @@
+CONFIG_LZMA = y
+
diff --git a/board/ruby/ddr.c b/board/ruby/ddr.c
new file mode 100644
index 0000000..a3c06dc
--- /dev/null
+++ b/board/ruby/ddr.c
@@ -0,0 +1,1983 @@
+/*
+ * Copyright (c) 2009 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ *  Initialize DDR
+ */
+
+#include <shared_defs_common.h>
+#include "ruby.h"
+#include "ddr.h"
+
+#define lhost_ahb_read_data(x,y) (y=REG_READ(x))
+#define lhost_ahb_write(x,y) (REG_WRITE(x,y))
+
+u32 ddr_size(void)
+{
+	unsigned long i = 0, val = 0, size = 0;
+	const unsigned long test_pattern = 0x12345678;
+	volatile unsigned long *pmarker = (volatile unsigned long *) 0;
+
+	*pmarker = ~test_pattern;
+        udelay(1);
+
+	/* Probe SDRAM to find out how much we have */
+        val = *pmarker;
+	if (*pmarker != ~test_pattern) {
+		printf("No DDR detected\n");
+		/* If running in SRAM do not flag no SDRAM as a fatal error */
+		return 0;
+	}
+
+	for (i = 0x200000; i < 512 * 1024 * 1024; i <<= 1) {
+		if (i < (unsigned long)pmarker) {
+			/* Only start testing for memory address wraps
+			 * above our current location.
+			 */
+			continue;
+		}
+		val = *(volatile unsigned long *)(i + (unsigned long)pmarker);
+		*(volatile unsigned long *)(i + (unsigned long)pmarker) = test_pattern;
+		if (*pmarker == test_pattern) {
+			/* Writes have wrapped */
+			size	 = i;
+			break;
+		}
+		*(volatile unsigned long *)(i + (unsigned long)pmarker) = val;
+	}
+
+	if (size == 0) {
+		printf("Cannot autodetect DDR size\n");
+	} else {
+		printf("DDR size %d MB\n",(int)size/(1024*1024));
+	}
+
+	return size;
+}
+
+#if TOPAZ_FPGA_PLATFORM
+int ddr_init (u32 type, u32 speed, u32 size)
+{
+        uint32_t rdata;
+	printf("Topaz FPGA - DDR3 UMCTL-2\n");
+	udelay(1000);
+
+	REG_WRITE(SYS_RST_MASK, SYS_RST_DRAM);
+	REG_WRITE(SYS_RST_VEC, 0);
+
+        /* SYNOP step 1 - program umctl2 registers */
+        rdata = 0x00040001; //x32
+        REG_WRITE(DDR_MSTR, rdata);
+        rdata = REG_READ(DDR_STAT);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.MRCTRL0 -- 4 bytes @'h0000000000000010
+           mr_rank[4-4] = 1'h1
+           mr_addr[14-12] = 3'h0
+           mr_wr[31-31] = 1'h0 */
+        rdata = 0x00000010;
+        REG_WRITE(DDR_MRCTRL0, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.MRCTRL1 -- 2 bytes @'h0000000000000014
+           mr_data[15-0] = 16'hcdb8 */
+        rdata = 0x0000cdb8;
+        REG_WRITE(DDR_MRCTRL1, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.MRSTAT -- 1 bytes @'h0000000000000018
+           mr_wr_busy[0-0] = 1'h0 */
+        rdata = REG_READ(DDR_MRSTAT);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.PWRCTL -- 1 bytes @'h0000000000000030
+           selfref_en[0-0] = 1'h0
+           powerdown_en[1-1] = 1'h0
+           en_dfi_dram_clk_disable[3-3] = 1'h0 */
+        rdata = 0x00000000;
+        REG_WRITE(DDR_PWRCTL, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.PWRTMG -- 1 bytes @'h0000000000000034
+           powerdown_to_x32[4-0] = 5'h03 */
+        rdata = 0x00000003;
+        REG_WRITE(DDR_PWRTMG, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.RFSHCTL0 -- 3 bytes @'h0000000000000050
+           refresh_burst[10-8] = 3'h1
+           refresh_to_x32[16-12] = 5'h1f
+           refresh_margin[23-20] = 4'h2 */
+        rdata = 0x0021f100;
+        REG_WRITE(DDR_RFSHCTL0, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.RFSHTMG -- 4 bytes @'h0000000000000064
+           t_rfc_min[8-0] = 9'h015
+           t_rfc_nom_x32[27-16] = 12'h00a */
+        rdata = 0x000a0015;
+        REG_WRITE(DDR_RFSHTMG, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.RFSHCTL3 -- 1 bytes @'h0000000000000060
+           dis_auto_refresh[0-0] = 1'h1
+           refresh_update_level[1-1] = 1'h1 */
+        rdata = 0x00000003;
+        REG_WRITE(DDR_RFSHCTL3, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.PARCTL -- 1 bytes @'h00000000000000c0
+           dfi_parity_err_int_en[0-0] = 1'h0
+           dfi_parity_err_int_clr[1-1] = 1'h0
+           dfi_parity_err_cnt_clr[2-2] = 1'h0 */
+        rdata = 0x00000000;
+        REG_WRITE(DDR_PARCTL, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.PARSTAT -- 3 bytes @'h00000000000000c4
+           dfi_parity_err_cnt[15-0] = 16'h0000
+           dfi_parity_err_int[16-16] = 1'h0 */
+        rdata = REG_READ(DDR_PARSTAT);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.INIT0 -- 4 bytes @'h00000000000000d0
+           pre_cke_x1024[9-0] = 10'h001
+           post_cke_x1024[25-16] = 10'h008 */
+        rdata = 0x00080001;
+        REG_WRITE(DDR_INIT0, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.INIT1 -- 3 bytes @'h00000000000000d4
+           pre_ocd_x32[3-0] = 4'h0
+           final_wait_x32[14-8] = 7'h00
+           dram_rstn_x1024[23-16] = 8'h01 */
+        rdata = 0x00010000;
+        REG_WRITE(DDR_INIT1, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.INIT3 -- 4 bytes @'h00000000000000dc
+           emr[15-0] = 16'h000b
+           mr[31-16] = 16'h0420 */
+        rdata = 0x0420000b;
+        REG_WRITE(DDR_INIT3, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.INIT4 -- 4 bytes @'h00000000000000e0
+           emr3[15-0] = 16'h0000
+           emr2[31-16] = 16'h0008 */
+        rdata = 0x00080000;
+        REG_WRITE(DDR_INIT4, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.INIT5 -- 3 bytes @'h00000000000000e4
+           dev_zqinit_x32[23-16] = 8'h10 */
+        rdata = 0x00100000;
+        REG_WRITE(DDR_INIT5, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DIMMCTL -- 1 bytes @'h00000000000000f0
+           dimm_stagger_cs_en[0-0] = 1'h0
+           dimm_addr_mirr_en[1-1] = 1'h0 */
+        rdata = 0x00000000;
+        REG_WRITE(DDR_DIMMCTL, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG0 -- 4 bytes @'h0000000000000100
+           t_ras_min[5-0] = 6'h0c
+           t_ras_max[13-8] = 6'h2
+           t_faw[21-16] = 6'h04
+           wr2pre[29-24] = 6'h0a */
+        rdata = 0x0a04020c;
+        REG_WRITE(DDR_DRAMTMG0, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG1 -- 3 bytes @'h0000000000000104
+           t_rc[5-0] = 6'h0f
+           rd2pre[12-8] = 5'h04
+           t_xp[20-16] = 5'h02 */
+        rdata = 0x0002040f;
+        REG_WRITE(DDR_DRAMTMG1, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG2 -- 2 bytes @'h0000000000000108
+           wr2rd[5-0] = 6'h0a
+           rd2wr[12-8] = 5'h03 */
+        rdata = 0x0000030a;
+        REG_WRITE(DDR_DRAMTMG2, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG3 -- 2 bytes @'h000000000000010c
+           t_mod[9-0] = 10'h006
+           t_mrd[14-12] = 3'h2 */
+        rdata = 0x00002006;
+        REG_WRITE(DDR_DRAMTMG3, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG4 -- 4 bytes @'h0000000000000110
+           t_rp[3-0] = 4'h3
+           t_rrd[10-8] = 3'h2
+           t_ccd[18-16] = 3'h2
+           t_rcd[27-24] = 4'h1 */
+        rdata = 0x01020203;
+        REG_WRITE(DDR_DRAMTMG4, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG5 -- 4 bytes @'h0000000000000114
+           t_cke[3-0] = 4'h2
+           t_ckesr[13-8] = 6'h03
+           t_cksre[19-16] = 4'h4
+           t_cksrx[27-24] = 4'h4 */
+        rdata = 0x04040302;
+        REG_WRITE(DDR_DRAMTMG5, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG8 -- 1 bytes @'h0000000000000120
+           post_selfref_gap_x32[6-0] = 7'h10 */
+        rdata = 0x00000010;
+        REG_WRITE(DDR_DRAMTMG8, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.ZQCTL0 -- 4 bytes @'h0000000000000180
+           t_zq_short_nop[9-0] = 10'h020
+           t_zq_long_nop[25-16] = 10'h080
+           dis_srx_zqcl[30-30] = 1'h0
+           dis_auto_zq[31-31] = 1'h0 */
+         rdata = 0x00800020;
+         REG_WRITE(DDR_ZQCTL0, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.ZQCTL1 -- 3 bytes @'h0000000000000184
+            t_zq_short_interval_x1024[19-0] = 20'h00070 */
+         rdata = 0x00000070;
+         REG_WRITE(DDR_ZQCTL1, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFITMG0 -- 4 bytes @'h0000000000000190
+            write_latency[4-0] = 5'h04
+            dfi_tphy_wrdata[12-8] = 5'h01
+            dfi_t_rddata_en[20-16] = 5'h04
+            dfi_t_ctrl_delay[27-24] = 4'h2 */
+         rdata = 0x02040104;
+         REG_WRITE(DDR_DFITMG0, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFITMG1 -- 2 bytes @'h0000000000000194
+            dfi_t_dram_clk_enable[3-0] = 4'h2
+            dfi_t_dram_clk_disable[11-8] = 4'h2 */
+         rdata = 0x00000202;
+         REG_WRITE(DDR_DFITMG1, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFIUPD0 -- 4 bytes @'h00000000000001a0
+            dfi_t_ctrlup_min[9-0] = 10'h003
+            dfi_t_ctrlup_max[25-16] = 10'h040
+            dis_dll_calib[31-31] = 1'h1 */
+         rdata = 0x80400003;
+         REG_WRITE(DDR_DFIUPD0, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFIUPD1 -- 3 bytes @'h00000000000001a4
+            dfi_t_ctrlupd_interval_max_x1024[7-0] = 8'h26
+            dfi_t_ctrlupd_interval_min_x1024[23-16] = 8'h22 */
+         rdata = 0x00220026;
+         REG_WRITE(DDR_DFIUPD1, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFIUPD2 -- 4 bytes @'h00000000000001a8
+            dfi_phyupd_type0[11-0] = 12'h94f
+            dfi_phyupd_type1[27-16] = 12'hfff
+            dfi_phyupd_en[31-31] = 1'h0 */
+         rdata = 0x0fff094f;
+         REG_WRITE(DDR_DFIUPD2, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFIUPD3 -- 4 bytes @'h00000000000001ac
+            dfi_phyupd_type2[11-0] = 12'h4d6
+            dfi_phyupd_type3[27-16] = 12'h954 */
+         rdata = 0x095404d6;
+         REG_WRITE(DDR_DFIUPD3, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFIMISC -- 1 bytes @'h00000000000001b0
+            dfi_init_complete_en[0-0] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_DFIMISC, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.ADDRMAP1 -- 3 bytes @'h0000000000000204
+	    for x32
+		    addrmap_bank_b0[3-0] = 4'h7
+		    addrmap_bank_b1[11-8] = 4'h7
+		    addrmap_bank_b2[19-16] = 4'h7
+	    for x16
+		    addrmap_bank_b0[3-0] = 4'h6
+		    addrmap_bank_b1[11-8] = 4'h6
+		    addrmap_bank_b2[19-16] = 4'h6 */
+         rdata = 0x00070707;
+         REG_WRITE(DDR_ADDRMAP1, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.ADDRMAP2 -- 4 bytes @'h0000000000000208
+            addrmap_col_b2[3-0] = 4'h0
+            addrmap_col_b3[11-8] = 4'h0
+            addrmap_col_b4[19-16] = 4'h0
+            addrmap_col_b5[27-24] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_ADDRMAP2, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.ADDRMAP3 -- 4 bytes @'h000000000000020c
+            addrmap_col_b6[3-0] = 4'h0
+            addrmap_col_b7[11-8] = 4'h0
+	    addrmap_col_b8[19-16] = 4'hf for x16
+            addrmap_col_b8[19-16] = 4'h0 for x32
+            addrmap_col_b9[27-24] = 4'hf */
+         rdata = 0x0f000000;
+         REG_WRITE(DDR_ADDRMAP3, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.ADDRMAP4 -- 2 bytes @'h0000000000000210
+            addrmap_col_b10[3-0] = 4'hf
+            addrmap_col_b11[11-8] = 4'hf */
+         rdata = 0x00000f0f;
+         REG_WRITE(DDR_ADDRMAP4, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.ADDRMAP5 -- 4 bytes @'h0000000000000214
+	    for x32
+		    addrmap_row_b0[3-0] = 4'h6
+		    addrmap_row_b1[11-8] = 4'h6
+		    addrmap_row_b2_10[19-16] = 4'h6
+		    addrmap_row_b11[27-24] = 4'h6
+	    for x16
+		    addrmap_row_b0[3-0] = 4'h5
+		    addrmap_row_b1[11-8] = 4'h5
+		    addrmap_row_b2_10[19-16] = 4'h5
+		    addrmap_row_b11[27-24] = 4'h5 */
+         rdata = 0x06060606;
+         REG_WRITE(DDR_ADDRMAP5, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.ADDRMAP6 -- 4 bytes @'h0000000000000218
+	    for x32
+		addrmap_row_b12[3-0] = 4'h6
+		addrmap_row_b13[11-8] = 4'hf
+	    for x16
+		addrmap_row_b12[3-0] = 4'h5
+		addrmap_row_b13[11-8] = 4'h5
+		addrmap_row_b14[19-16] = 4'hf
+		addrmap_row_b15[27-24] = 4'hf */
+         rdata = 0x0f0f0f06;
+         REG_WRITE(DDR_ADDRMAP6, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.ODTCFG -- 4 bytes @'h0000000000000240
+            wr_odt_delay[19-16] = 4'h0
+            wr_odt_hold[27-24] = 4'h2 */
+         rdata = 0x02000000;
+         REG_WRITE(DDR_ODTCFG, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.ODTMAP -- 1 bytes @'h0000000000000244
+            rank0_wr_odt[0-0] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_ODTMAP, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.SCHED -- 4 bytes @'h0000000000000250
+            force_low_pri_n[0-0] = 1'h1
+            prefer_write[1-1] = 1'h0
+            pageclose[2-2] = 1'h1
+            lpr_num_entries[11-8] = 4'hc
+            go2critical_hysteresis[23-16] = 8'h1d
+            rdwr_idle_gap[30-24] = 7'h10 */
+         rdata = 0x101d0c05;
+         REG_WRITE(DDR_SCHED, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.PERFHPR0 -- 2 bytes @'h0000000000000258
+            hpr_min_non_critical[15-0] = 16'hda6f
+            rdata = 0x0000da6f;
+            REG_WRITE(DDR_PERFHPR0, rdata);
+            Register DWC_ddr_umctl2_map_UMCTL2_REGS.PERFHPR1 -- 4 bytes @'h000000000000025c
+            hpr_max_starve[15-0] = 16'h1a0c
+            hpr_xact_run_length[31-24] = 8'hd5
+            rdata = 0xd5001a0c;
+            REG_WRITE(DDR_PERFHPR1, rdata);
+            Register DWC_ddr_umctl2_map_UMCTL2_REGS.PERFLPR0 -- 2 bytes @'h0000000000000260
+            lpr_min_non_critical[15-0] = 16'hd248
+            rdata = 0x0000d248;
+            REG_WRITE(DDR_PERFLPR0, rdata);
+            Register DWC_ddr_umctl2_map_UMCTL2_REGS.PERFLPR1 -- 4 bytes @'h0000000000000264
+            lpr_max_starve[15-0] = 16'h49fa
+            lpr_xact_run_length[31-24] = 8'h25
+            rdata = 0x250049fa;
+            REG_WRITE(DDR_PERFLPR1, rdata);
+            Register DWC_ddr_umctl2_map_UMCTL2_REGS.PERFWR0 -- 2 bytes @'h0000000000000268
+            w_min_non_critical[15-0] = 16'h7390
+            rdata = 0x00007390;
+            REG_WRITE(DDR_PERFWR0, rdata);
+            Register DWC_ddr_umctl2_map_UMCTL2_REGS.PERFWR1 -- 4 bytes @'h000000000000026c
+            w_max_starve[15-0] = 16'hcafe
+            w_xact_run_length[31-24] = 8'h97
+            rdata = 0x9700cafe;
+            REG_WRITE(DDR_PERFWR1, rdata);
+            Register DWC_ddr_umctl2_map_UMCTL2_REGS.DBG0 -- 1 bytes @'h0000000000000300
+            dis_wc[0-0] = 1'h1
+            dis_rd_bypass[1-1] = 1'h0
+            dis_act_bypass[2-2] = 1'h0
+            dis_collision_page_opt[4-4] = 1'h1 */
+         rdata = 0x00000011;
+         REG_WRITE(DDR_DBG0, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DBG1 -- 1 bytes @'h0000000000000304
+            dis_dq[0-0] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_DBG1, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.DBGCAM -- 4 bytes @'h0000000000000308
+            dbg_hpr_q_depth[4-0] = 5'h00
+            dbg_lpr_q_depth[12-8] = 5'h00
+            dbg_w_q_depth[20-16] = 5'h00
+            dbg_stall[24-24] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_DBGCAM, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCCFG -- 1 bytes @'h0000000000000400
+            go2critical_en[0-0] = 1'h0
+            pagematch_limit[4-4] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCCFG, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_0 -- 2 bytes @'h0000000000000404
+            rd_port_priority[9-0] = 10'h000
+            read_reorder_bypass_en[11-11] = 1'h0
+            rd_port_aging_en[12-12] = 1'h0
+            rd_port_urgent_en[13-13] = 1'h0
+            rd_port_pagematch_en[14-14] = 1'h0
+            rd_port_hpr_en[15-15] = 1'h0
+	    rdwr_ordered_en[16-16] = 1 */
+         rdata = 0x00010000;
+         REG_WRITE(DDR_PCFGR_0, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_0 -- 2 bytes @'h0000000000000408
+            wr_port_priority[9-0] = 10'h000
+            wr_port_aging_en[12-12] = 1'h0
+            wr_port_urgent_en[13-13] = 1'h0
+            wr_port_pagematch_en[14-14] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGW_0, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_0 -- 1 bytes @'h000000000000040c
+            id_mask[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDMASKCH0_0, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_0 -- 1 bytes @'h0000000000000410
+            id_value[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDVALUECH0_0, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_1 -- 2 bytes @'h00000000000004b4
+            rd_port_priority[9-0] = 10'h000
+            read_reorder_bypass_en[11-11] = 1'h0
+            rd_port_aging_en[12-12] = 1'h0
+            rd_port_urgent_en[13-13] = 1'h0
+            rd_port_pagematch_en[14-14] = 1'h0
+            rd_port_hpr_en[15-15] = 1'h0
+	    rdwr_ordered_en[16-16] = 1 */
+         rdata = 0x00010000;
+         REG_WRITE(DDR_PCFGR_1, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_1 -- 2 bytes @'h00000000000004b8
+            wr_port_priority[9-0] = 10'h000
+            wr_port_aging_en[12-12] = 1'h0
+            wr_port_urgent_en[13-13] = 1'h0
+            wr_port_pagematch_en[14-14] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGW_1, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_1 -- 1 bytes @'h00000000000004bc
+            id_mask[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDMASKCH0_1, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_1 -- 1 bytes @'h00000000000004c0
+            id_value[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDVALUECH0_1, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_2 -- 2 bytes @'h0000000000000564
+            rd_port_priority[9-0] = 10'h000
+            read_reorder_bypass_en[11-11] = 1'h0
+            rd_port_aging_en[12-12] = 1'h0
+            rd_port_urgent_en[13-13] = 1'h0
+            rd_port_pagematch_en[14-14] = 1'h0
+            rd_port_hpr_en[15-15] = 1'h0
+	    rdwr_ordered_en[16-16] = 1 */
+         rdata = 0x00010000;
+         REG_WRITE(DDR_PCFGR_2, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_2 -- 2 bytes @'h0000000000000568
+            wr_port_priority[9-0] = 10'h000
+            wr_port_aging_en[12-12] = 1'h0
+            wr_port_urgent_en[13-13] = 1'h0
+            wr_port_pagematch_en[14-14] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGW_2, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_2 -- 1 bytes @'h000000000000056c
+            id_mask[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDMASKCH0_2, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_2 -- 1 bytes @'h0000000000000570
+            id_value[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDVALUECH0_2, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_3 -- 2 bytes @'h0000000000000614
+            rd_port_priority[9-0] = 10'h000
+            read_reorder_bypass_en[11-11] = 1'h0
+            rd_port_aging_en[12-12] = 1'h0
+            rd_port_urgent_en[13-13] = 1'h0
+            rd_port_pagematch_en[14-14] = 1'h0
+            rd_port_hpr_en[15-15] = 1'h0
+	    rdwr_ordered_en[16-16] = 1 */
+         rdata = 0x00010000;
+         REG_WRITE(DDR_PCFGR_3, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_3 -- 2 bytes @'h0000000000000618
+            wr_port_priority[9-0] = 10'h000
+            wr_port_aging_en[12-12] = 1'h0
+            wr_port_urgent_en[13-13] = 1'h0
+            wr_port_pagematch_en[14-14] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGW_3, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_3 -- 1 bytes @'h000000000000061c
+            id_mask[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDMASKCH0_3, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_3 -- 1 bytes @'h0000000000000620
+            id_value[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDVALUECH0_3, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_4 -- 2 bytes @'h00000000000006c4
+            rd_port_priority[9-0] = 10'h000
+            read_reorder_bypass_en[11-11] = 1'h0
+            rd_port_aging_en[12-12] = 1'h0
+            rd_port_urgent_en[13-13] = 1'h0
+            rd_port_pagematch_en[14-14] = 1'h0
+            rd_port_hpr_en[15-15] = 1'h0
+	    rdwr_ordered_en[16-16] = 1 */
+         rdata = 0x00010000;
+         REG_WRITE(DDR_PCFGR_4, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_4 -- 2 bytes @'h00000000000006c8
+            wr_port_priority[9-0] = 10'h000
+            wr_port_aging_en[12-12] = 1'h0
+            wr_port_urgent_en[13-13] = 1'h0
+            wr_port_pagematch_en[14-14] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGW_4, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_4 -- 1 bytes @'h00000000000006cc
+            id_mask[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDMASKCH0_4, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_4 -- 1 bytes @'h00000000000006d0
+            id_value[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDVALUECH0_4, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_5 -- 2 bytes @'h0000000000000774
+            rd_port_priority[9-0] = 10'h000
+            read_reorder_bypass_en[11-11] = 1'h0
+            rd_port_aging_en[12-12] = 1'h0
+            rd_port_urgent_en[13-13] = 1'h0
+            rd_port_pagematch_en[14-14] = 1'h0
+            rd_port_hpr_en[15-15] = 1'h0
+	    rdwr_ordered_en[16-16] = 1 */
+         rdata = 0x00010000;
+         REG_WRITE(DDR_PCFGR_5, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_5 -- 2 bytes @'h0000000000000778
+            wr_port_priority[9-0] = 10'h000
+            wr_port_aging_en[12-12] = 1'h0
+            wr_port_urgent_en[13-13] = 1'h0
+            wr_port_pagematch_en[14-14] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGW_5, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_5 -- 1 bytes @'h000000000000077c
+            id_mask[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDMASKCH0_5, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_5 -- 1 bytes @'h0000000000000780
+            id_value[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDVALUECH0_5, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_6 -- 2 bytes @'h0000000000000824
+            rd_port_priority[9-0] = 10'h000
+            read_reorder_bypass_en[11-11] = 1'h0
+            rd_port_aging_en[12-12] = 1'h0
+            rd_port_urgent_en[13-13] = 1'h0
+            rd_port_pagematch_en[14-14] = 1'h0
+            rd_port_hpr_en[15-15] = 1'h0
+	    rdwr_ordered_en[16-16] = 1 */
+         rdata = 0x00010000;
+         REG_WRITE(DDR_PCFGR_6, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_6 -- 2 bytes @'h0000000000000828
+            wr_port_priority[9-0] = 10'h000
+            wr_port_aging_en[12-12] = 1'h0
+            wr_port_urgent_en[13-13] = 1'h0
+            wr_port_pagematch_en[14-14] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGW_6, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_6 -- 1 bytes @'h000000000000082c
+            id_mask[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDMASKCH0_6, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_6 -- 1 bytes @'h0000000000000830
+            id_value[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDVALUECH0_6, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_7 -- 2 bytes @'h00000000000008d4
+            rd_port_priority[9-0] = 10'h000
+            read_reorder_bypass_en[11-11] = 1'h0
+            rd_port_aging_en[12-12] = 1'h0
+            rd_port_urgent_en[13-13] = 1'h0
+            rd_port_pagematch_en[14-14] = 1'h0
+            rd_port_hpr_en[15-15] = 1'h0
+	    rdwr_ordered_en[16-16] = 1 */
+         rdata = 0x00010000;
+         REG_WRITE(DDR_PCFGR_7, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_7 -- 2 bytes @'h00000000000008d8
+            wr_port_priority[9-0] = 10'h000
+            wr_port_aging_en[12-12] = 1'h0
+            wr_port_urgent_en[13-13] = 1'h0
+            wr_port_pagematch_en[14-14] = 1'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGW_7, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_7 -- 1 bytes @'h00000000000008dc
+            id_mask[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDMASKCH0_7, rdata);
+
+         /* Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_7 -- 1 bytes @'h00000000000008e0
+            id_value[3-0] = 4'h0 */
+         rdata = 0x00000000;
+         REG_WRITE(DDR_PCFGIDVALUECH0_7, rdata);
+
+        /* SYNOP step2 - deassert soft reset reg */
+	REG_WRITE(SYS_RST_MASK, SYS_RST_DRAM);
+	REG_WRITE(SYS_RST_VEC, SYS_RST_DRAM);
+        udelay(1);
+
+	/* SYNOP step3 */
+	/* Following programming is for DDR Phy Utility Block(PUB). */
+
+	/* Read DRAM Control Register */
+	rdata = REG_READ(DDR_PUB_DCR);
+	printf("DDR_INIT: PUB_DCR = %x\n", rdata);
+
+	/* Enable it for DDR3 */
+	rdata = 0x0000040b;
+	REG_WRITE(DDR_PUB_DCR, rdata);
+        rdata = 0xf000641d;
+	REG_WRITE(DDR_PUB_DSGCR, rdata);
+	rdata = REG_READ(DDR_PUB_DSGCR);
+	printf("DDR_INIT: PUB_DSGCR = %x\n", rdata);
+        rdata = 0;
+        REG_WRITE(DDR_PUB_ODTCR, rdata);
+
+	/* Configure Mode Register 0 of PUB */
+	rdata = 0x00000420; /* DLL disable, CL=6, tWR=6 */
+	REG_WRITE(DDR_PUB_MR0, rdata);
+	rdata = 0x000b; /* DLL disable */
+	REG_WRITE(DDR_PUB_MR1, rdata);
+	rdata = 0x0008; /* DLL disable, CWL=6 */
+	REG_WRITE(DDR_PUB_MR2, rdata);
+	rdata = 0x0000;
+	REG_WRITE(DDR_PUB_MR3, rdata);
+
+	/* Configure Timing parameter registers */
+	rdata = 0x79186664; /* DLL disable - tRTP 4, tWTR 6, tRP 6, tRCD 6, tRAS 24, tRRD 4, tRC 30 */
+	REG_WRITE(DDR_PUB_DTPR0, rdata);
+	rdata = 0x3e80a880; /* DLL disable - tMRD 4, tMOD 12, tFAW 4, tRFC 21, tWLMRD 40, tWLO 15, tAOND 0 */
+	REG_WRITE(DDR_PUB_DTPR1, rdata);
+	rdata = 0x10018c16; /* DLL disable - tXS 22, tXP 3, tCKE 3, tDLLK 512, tRTODT 0, tRTW 0, tCCD 0 */
+	REG_WRITE(DDR_PUB_DTPR2, rdata);
+
+	/* 1.4.2.2 PHY databook for synopsys */
+	/* REG_WRITE(DDR_PUB_DTCR,0xa00); */
+
+	/* Configure PHY general configuration registers.
+           rdata = 0x00f015f0;
+           REG_WRITE(DDR_PUB_PGCR2, rdata); */
+	/* Configure PHY Timing registers. */
+	rdata = 0x10000010;
+	REG_WRITE(DDR_PUB_PTR0, rdata);
+	rdata = 0x01000100;
+	REG_WRITE(DDR_PUB_PTR1, rdata);
+
+        /* rdata = 0x000083cef;
+        REG_WRITE(DDR_PUB_PTR2, rdata); */
+        rdata = 0x01e09c40;
+        REG_WRITE(DDR_PUB_PTR3, rdata);
+        rdata = 0x00d03e80;
+        REG_WRITE(DDR_PUB_PTR4, rdata);
+
+        /* rdata = 0x44000f01;
+        REG_WRITE(DDR_PUB_DX0GCR, rdata);
+        REG_WRITE(DDR_PUB_DX1GCR, rdata);
+        REG_WRITE(DDR_PUB_DX2GCR, rdata);
+        REG_WRITE(DDR_PUB_DX3GCR, rdata); */
+
+        rdata = REG_READ(DDR_PUB_DX0GCR);
+	printf("DDR_INIT: DDR_PUB_DX0GCR = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1GCR);
+	printf("DDR_INIT: DDR_PUB_DX1GCR = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2GCR);
+	printf("DDR_INIT: DDR_PUB_DX2GCR = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3GCR);
+	printf("DDR_INIT: DDR_PUB_DX3GCR = %x\n", rdata);
+
+	/* SYNOP step5 */
+	/* Now wait till PHY initialization done. */
+	rdata = 0x0;
+	while ((rdata&1) != 1) {
+		rdata = REG_READ(DDR_PUB_PGSR0);
+	        printf("DDR_INIT: DDR_PUB_PGSR0 = %x\n", rdata);
+	}
+	printf("DDR_INIT: finish step5\n");
+
+	/* Start Phy Initialization Register through controller */
+        /*
+	rdata = REG_READ(DDR_PUB_PLLCR);
+	printf("DDR_INIT: DDR_PUB_PLLCR = %x\n", rdata);
+        rdata = 0x80000000 | rdata;
+	REG_WRITE(DDR_PUB_PLLCR, rdata);
+        */
+	rdata = 0x00040001;
+	REG_WRITE(DDR_PUB_PIR, rdata);
+        udelay(1);
+
+	/* Now wait till PHY initialization done after local line register changes. */
+	rdata = 0x0;
+	while ((rdata&0x1f) != 0x1f) {
+	    rdata = REG_READ(DDR_PUB_PGSR0);
+	    printf("DDR_INIT: DDR_PUB_PGSR0 = %x\n", rdata);
+	}
+	printf("DDR_INIT: finish step5\n");
+
+        /* SYNOP step6 - set DFIMISC.dfi_init_complete_en to 1 */
+        rdata = 0x00000001;
+        REG_WRITE(DDR_DFIMISC, rdata);
+
+	printf("DDR_INIT: finish step6\n");
+
+	/* SYNOP step7 - wait for DWC_ddr_umctl2 to move to "normal" by monitoring STAT.operating_mode signal */
+        rdata = 0;
+        while ((rdata&0x3) != 0x1) {
+            rdata = REG_READ(DDR_STAT);
+	    printf("DDR_INIT: DDR_STAT = %x\n", rdata);
+        }
+        printf("DDR_INIT: finish step7\n");
+
+        /* SYNOP step6 - set DFIMISC.dfi_init_complete_en to 0 */
+        rdata = 0;
+        REG_WRITE(DDR_DFIMISC, rdata);
+
+        /* disable auto-refresh and powerdown
+           Register DWC_ddr_umctl2_map_UMCTL2_REGS.RFSHCTL3 -- 1 bytes @'h0000000000000060
+           dis_auto_refresh[0-0] = 1'h1
+           refresh_update_level[1-1] = 1'h0 */
+        rdata = 0x00000001;
+        REG_WRITE(DDR_RFSHCTL3, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.PWRCTL -- 1 bytes @'h0000000000000030
+           selfref_en[0-0] = 1'h0
+           powerdown_en[1-1] = 1'h0
+           en_dfi_dram_clk_disable[3-3] = 1'h0 */
+        rdata = 0x00000000;
+        REG_WRITE(DDR_PWRCTL, rdata);
+        printf("DDR_INIT: finish step8\n");
+
+	/* SYNOP step9 */
+	/* Use PUB to do training */
+	REG_WRITE(DDR_PUB_MR1, 0x0000000b); /* DLL disable */
+        REG_WRITE(DDR_PUB_DTCR, 0x01003583);
+
+        /*  rdata = REG_READ(DDR_PUB_DTAR0);
+            printf("DDR_INIT: DDR_PUB_DTAR0 = %x\n", rdata);
+            write leveling routine */
+	rdata = 0x00000201;
+	REG_WRITE(DDR_PUB_PIR, rdata);
+        udelay(1);
+	rdata = 0x0;
+	while ((rdata&0x21) != 0x21) {
+	    rdata = REG_READ(DDR_PUB_PGSR0);
+	    printf("DDR_INIT: DDR_PUB_PGSR0 = %x\n", rdata);
+	}
+
+        rdata = REG_READ(DDR_PUB_DX0GSR0);
+	printf("DDR_INIT: DDR_PUB_DX0GSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1GSR0);
+	printf("DDR_INIT: DDR_PUB_DX1GSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2GSR0);
+	printf("DDR_INIT: DDR_PUB_DX2GSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3GSR0);
+	printf("DDR_INIT: DDR_PUB_DX3GSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_PGSR0);
+	printf("DDR_INIT: DDR_PUB_PGSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0LCDLR0);
+	printf("DDR_INIT: DDR_PUB_DX0LCDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1LCDLR0);
+	printf("DDR_INIT: DDR_PUB_DX1LCDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2LCDLR0);
+	printf("DDR_INIT: DDR_PUB_DX2LCDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3LCDLR0);
+	printf("DDR_INIT: DDR_PUB_DX3LCDLR0 = %x\n", rdata);
+	printf("DDR_INIT: finish write leveling\n");
+
+        /* dqs training */
+	rdata = 0x00000401;
+	REG_WRITE(DDR_PUB_PIR, rdata);
+        udelay(1);
+	rdata = 0x0;
+	while ((rdata&0x41) != 0x41) {
+	    rdata = REG_READ(DDR_PUB_PGSR0);
+	    printf("DDR_INIT: DDR_PUB_PGSR0 = %x\n", rdata);
+	}
+
+        rdata = REG_READ(DDR_PUB_DX0BDLR0);
+	printf("DDR_INIT: DDR_PUB_DX0BDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0BDLR1);
+	printf("DDR_INIT: DDR_PUB_DX0BDLR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0BDLR2);
+	printf("DDR_INIT: DDR_PUB_DX0BDLR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1BDLR0);
+	printf("DDR_INIT: DDR_PUB_DX1BDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1BDLR1);
+	printf("DDR_INIT: DDR_PUB_DX1BDLR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1BDLR2);
+	printf("DDR_INIT: DDR_PUB_DX1BDLR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2BDLR0);
+	printf("DDR_INIT: DDR_PUB_DX2BDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2BDLR1);
+	printf("DDR_INIT: DDR_PUB_DX2BDLR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2BDLR2);
+	printf("DDR_INIT: DDR_PUB_DX2BDLR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3BDLR0);
+	printf("DDR_INIT: DDR_PUB_DX3BDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3BDLR1);
+	printf("DDR_INIT: DDR_PUB_DX3BDLR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3BDLR2);
+	printf("DDR_INIT: DDR_PUB_DX3BDLR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0GSR0);
+	printf("DDR_INIT: DDR_PUB_DX0GSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1GSR0);
+	printf("DDR_INIT: DDR_PUB_DX1GSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2GSR0);
+	printf("DDR_INIT: DDR_PUB_DX2GSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3GSR0);
+	printf("DDR_INIT: DDR_PUB_DX3GSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_PGSR0);
+	printf("DDR_INIT: DDR_PUB_PGSR0 = %x\n", rdata);
+	printf("DDR_INIT: finish dqs training\n");
+
+        /*
+	REG_WRITE(DDR_PUB_DX0LCDLR0 ,0x3);
+	REG_WRITE(DDR_PUB_DX1LCDLR0 ,0x2);
+	REG_WRITE(DDR_PUB_DX2LCDLR0 ,0x4);
+	REG_WRITE(DDR_PUB_DX3LCDLR0 ,0x4);
+	REG_WRITE(DDR_PUB_DX0BDLR0  ,0xf);
+	REG_WRITE(DDR_PUB_DX0BDLR1  ,0x36);
+	REG_WRITE(DDR_PUB_DX0BDLR2  ,0x5);
+	REG_WRITE(DDR_PUB_DX1BDLR0  ,0xe);
+	REG_WRITE(DDR_PUB_DX1BDLR1  ,0x36);
+	REG_WRITE(DDR_PUB_DX1BDLR2  ,0x5);
+	REG_WRITE(DDR_PUB_DX2BDLR0  ,0xe);
+	REG_WRITE(DDR_PUB_DX2BDLR1  ,0x36);
+	REG_WRITE(DDR_PUB_DX2BDLR2  ,0x5);
+	REG_WRITE(DDR_PUB_DX3BDLR0  ,0xe);
+	REG_WRITE(DDR_PUB_DX3BDLR1  ,0x36);
+	REG_WRITE(DDR_PUB_DX3BDLR2  ,0x5);
+        */
+
+        /* enable auto-refresh and powerdown
+           Register DWC_ddr_umctl2_map_UMCTL2_REGS.RFSHCTL3 -- 1 bytes @'h0000000000000060
+           dis_auto_refresh[0-0] = 1'h0
+           refresh_update_level[1-1] = 1'h1 */
+        rdata = 0x00000002;
+        REG_WRITE(DDR_RFSHCTL3, rdata);
+
+        /* Register DWC_ddr_umctl2_map_UMCTL2_REGS.PWRCTL -- 1 bytes @'h0000000000000030
+           selfref_en[0-0] = 1'h0
+           powerdown_en[1-1] = 1'h0
+           en_dfi_dram_clk_disable[3-3] = 1'h0 */
+        rdata = 0x00000000;
+        REG_WRITE(DDR_PWRCTL, rdata);
+        rdata = 1;
+        REG_WRITE(DDR_DFIMISC, rdata);
+        printf("DDR_INIT: ddr_init finishes\n");
+
+	return 0;
+
+}
+#else /* ENDof TOPAZ_FPGA_PLATFORM */
+/* Start of TOPAZ_ASIC_PLATFORM */
+
+#define SYS_CPU_CTRL_MASK	RUBY_SYS_CTL_MASK
+#define SYS_CPU_CTRL		RUBY_SYS_CTL_CTRL
+#define SYS_DDR_CTRL		RUBY_SYS_CTL_DDR_CTRL
+
+/* BEGIN COPY-PASTE FROM ARCSHELL */
+
+#define lhost_ahb_read_data(x,y) (y=REG_READ(x))
+#define lhost_ahb_write(x,y) (REG_WRITE(x,y))
+/******************************************
+ * type = 0 for 16-bit, 1 for 32-bit
+ * speed = 1=640, 2=500, 3=400MHz DRAM clock
+ */
+
+int ddr3_init(u32 type, u32 speed, u32 size)
+{
+	u32 rdata;
+
+	printf("DDR_INIT: type = %u, speed = %u, size = %u\n", type, speed, size);
+
+    // speed related DDR controller programming
+	REG_WRITE(SYS_CPU_CTRL_MASK,7<<22);
+	REG_WRITE(SYS_CPU_CTRL,speed<<22);
+	REG_WRITE(SYS_DDR_CTRL,0x04243333);
+
+    switch (speed) {
+    case 0: //800MHz
+	printf("800MHz\n");
+//	rdata = 0x0061002C; //1Gb
+	rdata = 0x00610040; //2Gb
+	lhost_ahb_write(DDR_RFSHTMG, rdata);
+	rdata = 0x00D000C4;
+	lhost_ahb_write(DDR_INIT0, rdata);
+	rdata = 0x004F0000;
+	lhost_ahb_write(DDR_INIT1, rdata);
+	rdata = 0x1D70000E;
+	lhost_ahb_write(DDR_INIT3, rdata);
+	rdata = 0x00180000;
+	lhost_ahb_write(DDR_INIT4, rdata);
+	rdata = 0x11101B0E;
+	lhost_ahb_write(DDR_DRAMTMG0, rdata);
+	rdata = 0x000A0814;
+	lhost_ahb_write(DDR_DRAMTMG1, rdata);
+	rdata = 0x0000050E;
+	lhost_ahb_write(DDR_DRAMTMG2, rdata);
+	rdata = 0x00002006;
+	lhost_ahb_write(DDR_DRAMTMG3, rdata);
+//	rdata = 0x01030306;
+	rdata = 0x01020306; //tCCD=4
+	lhost_ahb_write(DDR_DRAMTMG4, rdata);
+	rdata = 0x04040302;
+	lhost_ahb_write(DDR_DRAMTMG5, rdata);
+	rdata = 0x00000010;
+	lhost_ahb_write(DDR_DRAMTMG8, rdata);
+	rdata = 0x03090107;
+	lhost_ahb_write(DDR_DFITMG0, rdata);
+        break;
+    case 1: //640MHz
+	printf("640MHz\n");
+//	rdata = 0x004E0024; //1Gb
+	rdata = 0x004E0034; //2Gb
+	lhost_ahb_write(DDR_RFSHTMG, rdata);
+	rdata = 0x0100009D;
+	lhost_ahb_write(DDR_INIT0, rdata);
+	rdata = 0x003F0000;
+	lhost_ahb_write(DDR_INIT1, rdata);
+	rdata = 0x1B60000E;
+	lhost_ahb_write(DDR_INIT3, rdata);
+	rdata = 0x00100000;
+	lhost_ahb_write(DDR_INIT4, rdata);
+	rdata = 0x0F0D150C;
+	lhost_ahb_write(DDR_DRAMTMG0, rdata);
+	rdata = 0x00080710;
+	lhost_ahb_write(DDR_DRAMTMG1, rdata);
+	rdata = 0x0000050D;
+	lhost_ahb_write(DDR_DRAMTMG2, rdata);
+	rdata = 0x00002006;
+	lhost_ahb_write(DDR_DRAMTMG3, rdata);
+//	rdata = 0x01030305;
+	rdata = 0x01020305; //tCCD=4
+	lhost_ahb_write(DDR_DRAMTMG4, rdata);
+	rdata = 0x04040302;
+	lhost_ahb_write(DDR_DRAMTMG5, rdata);
+	rdata = 0x00000010;
+	lhost_ahb_write(DDR_DRAMTMG8, rdata);
+	rdata = 0x03080106;
+	lhost_ahb_write(DDR_DFITMG0, rdata);
+        break;
+    case 3: //400MHz
+	printf("400MHz\n");
+//	rdata = 0x00300016; //1Gb
+	rdata = 0x00300020; //2Gb
+	lhost_ahb_write(DDR_RFSHTMG, rdata);
+	rdata = 0x00670062;
+	lhost_ahb_write(DDR_INIT0, rdata);
+	rdata = 0x00280000;
+	lhost_ahb_write(DDR_INIT1, rdata);
+	rdata = 0x1520000E;
+	lhost_ahb_write(DDR_INIT3, rdata);
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_INIT4, rdata);
+	rdata = 0x0A080D07;
+	lhost_ahb_write(DDR_DRAMTMG0, rdata);
+	rdata = 0x0005040A;
+	lhost_ahb_write(DDR_DRAMTMG1, rdata);
+	rdata = 0x00000409;
+	lhost_ahb_write(DDR_DRAMTMG2, rdata);
+	rdata = 0x00002006;
+	lhost_ahb_write(DDR_DRAMTMG3, rdata);
+//	rdata = 0x01030204;
+	rdata = 0x01020204; //tCCD=4
+	lhost_ahb_write(DDR_DRAMTMG4, rdata);
+	rdata = 0x03030202;
+	lhost_ahb_write(DDR_DRAMTMG5, rdata);
+	rdata = 0x00000010;
+	lhost_ahb_write(DDR_DRAMTMG8, rdata);
+	rdata = 0x03040103;
+	lhost_ahb_write(DDR_DFITMG0, rdata);
+        break;
+    case 4: //320MHz
+	printf("320MHz\n");
+//	rdata = 0x00270012; //1Gb
+	rdata = 0x0027001A; //2Gb
+	lhost_ahb_write(DDR_RFSHTMG, rdata);
+	rdata = 0x0052004F;
+	lhost_ahb_write(DDR_INIT0, rdata);
+	rdata = 0x00200000;
+	lhost_ahb_write(DDR_INIT1, rdata);
+	rdata = 0x1320000E;
+	lhost_ahb_write(DDR_INIT3, rdata);
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_INIT4, rdata);
+	rdata = 0x09070A06;
+	lhost_ahb_write(DDR_DRAMTMG0, rdata);
+	rdata = 0x00050408;
+	lhost_ahb_write(DDR_DRAMTMG1, rdata);
+	rdata = 0x00000409;
+	lhost_ahb_write(DDR_DRAMTMG2, rdata);
+	rdata = 0x00002006;
+	lhost_ahb_write(DDR_DRAMTMG3, rdata);
+//	rdata = 0x01030203;
+	rdata = 0x01020203; //tCCD=4
+	lhost_ahb_write(DDR_DRAMTMG4, rdata);
+	rdata = 0x03030202;
+	lhost_ahb_write(DDR_DRAMTMG5, rdata);
+	rdata = 0x00000010;
+	lhost_ahb_write(DDR_DRAMTMG8, rdata);
+	rdata = 0x03040103;
+	lhost_ahb_write(DDR_DFITMG0, rdata);
+        break;
+    default:
+	printf("500MHz\n");
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.RFSHTMG -- 4 bytes @'h0000000000000064
+//   t_rfc_min[8-0] = 9'h028
+//   t_rfc_nom_x32[27-16] = 12'h03c
+	if (size == DDR_256MB) {
+		rdata = 0x001e0028;
+	} else {
+		rdata = 0x001e001c;
+	}
+//	rdata = 0x003c001c; //new
+	lhost_ahb_write(DDR_RFSHTMG, rdata);
+	//SYNOP step 1 - program umctl2 registers
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.INIT0 -- 4 bytes @'h00000000000000d0
+//   pre_cke_x1024[9-0] = 10'h001
+//   post_cke_x1024[25-16] = 10'h001
+//	rdata = 0x00280062;
+	rdata = 0x0080007B; //new
+	lhost_ahb_write(DDR_INIT0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.INIT1 -- 3 bytes @'h00000000000000d4
+//   pre_ocd_x32[3-0] = 4'h0
+//   final_wait_x32[14-8] = 7'h00
+//   dram_rstn_x1024[23-16] = 8'h01
+	rdata = 0x00310000;
+	lhost_ahb_write(DDR_INIT1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.INIT3 -- 4 bytes @'h00000000000000dc
+//   emr[15-0] = 16'h000e
+//   mr[31-16] = 16'h1930
+	rdata = 0x1940000E; //AL=CL-1
+//	rdata = 0x19400006; //AL=0
+	lhost_ahb_write(DDR_INIT3, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.INIT4 -- 4 bytes @'h00000000000000e0
+//   emr3[15-0] = 16'h0000
+//   emr2[31-16] = 16'h0008
+	rdata = 0x00080000;
+	lhost_ahb_write(DDR_INIT4, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG0 -- 4 bytes @'h0000000000000100
+//   t_ras_min[5-0] = 6'h0a
+//   t_ras_max[13-8] = 6'h11
+//   t_faw[21-16] = 6'h0a
+//   wr2pre[29-24] = 6'h0c
+	rdata = 0x0d0a1109; //AL=CL-1
+//	rdata = 0x090a1109; //AL=0
+	lhost_ahb_write(DDR_DRAMTMG0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG1 -- 3 bytes @'h0000000000000104
+//   t_rc[5-0] = 6'h1b
+//   rd2pre[12-8] = 5'h0b
+//   t_xp[20-16] = 5'h04
+//	rdata = 0x00040b1b;
+	rdata = 0x0006050d; //AL=CL-1
+//	rdata = 0x0006020d; //AL=0
+	lhost_ahb_write(DDR_DRAMTMG1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG2 -- 2 bytes @'h0000000000000108
+//   wr2rd[5-0] = 6'h0a
+//   rd2wr[12-8] = 5'h04
+	rdata = 0x0000040b; //AL=CL-1
+//	rdata = 0x00000408; //AL=0
+	lhost_ahb_write(DDR_DRAMTMG2, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG3 -- 2 bytes @'h000000000000010c
+//   t_mod[9-0] = 10'h006
+//   t_mrd[14-12] = 3'h2
+	rdata = 0x00002006;
+	lhost_ahb_write(DDR_DRAMTMG3, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG4 -- 4 bytes @'h0000000000000110
+//   t_rp[3-0] = 4'h4
+//   t_rrd[10-8] = 3'h2
+//   t_ccd[18-16] = 3'h2
+//   t_rcd[27-24] = 4'h1
+//	rdata = 0x01030204; //AL=CL-1
+	rdata = 0x01020204; //tCCD=4
+//	rdata = 0x04010204; //AL=0
+	lhost_ahb_write(DDR_DRAMTMG4, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG5 -- 4 bytes @'h0000000000000114
+//   t_cke[3-0] = 4'h2
+//   t_ckesr[13-8] = 6'h02
+//   t_cksre[19-16] = 4'h3
+//   t_cksrx[27-24] = 4'h3
+	rdata = 0x03030202;
+	lhost_ahb_write(DDR_DRAMTMG5, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DRAMTMG8 -- 1 bytes @'h0000000000000120
+//   post_selfref_gap_x32[6-0] = 7'h62
+	rdata = 0x00000062;
+	lhost_ahb_write(DDR_DRAMTMG8, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFITMG0 -- 4 bytes @'h0000000000000190
+//   write_latency[4-0] = 5'h04
+//   dfi_tphy_wrdata[12-8] = 5'h01
+//   dfi_t_rddata_en[20-16] = 5'h05
+//   dfi_t_ctrl_delay[27-24] = 4'h3
+	rdata = 0x03060105; //AL=CL-1
+//	rdata = 0x03020102; //AL=0
+	lhost_ahb_write(DDR_DFITMG0, rdata);
+        break;
+    }
+
+    // width related programming
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.MSTR -- 3 bytes @'h0000000000000000
+//   ddr3[0-0] = 1'h1
+//   burst_mode[8-8] = 1'h0
+//   burstchop[9-9] = 1'h0
+//   en_2t_timing_mode[10-10] = 1'h0
+//   data_bus_width[13-12] = 2'h1
+//   burst_rdwr[19-16] = 4'h4
+	rdata = (type==32)?0x00040001:0x00041001;
+	lhost_ahb_write(DDR_MSTR, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.ADDRMAP1 -- 3 bytes @'h0000000000000204
+//   addrmap_bank_b0[3-0] = 4'h6
+//   addrmap_bank_b1[11-8] = 4'h6
+//   addrmap_bank_b2[19-16] = 4'h6
+	rdata = (type==32)?0x00070707:0x00060606;
+	//rdata = 0x0;
+	//rdata[19:16] = ddr_conf.addrmap_bank_b2;
+	//rdata[11:8]  = ddr_conf.addrmap_bank_b1;
+	//rdata[3:0]   = ddr_conf.addrmap_bank_b0;
+	lhost_ahb_write(DDR_ADDRMAP1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.ADDRMAP2 -- 4 bytes @'h0000000000000208
+//   addrmap_col_b2[3-0] = 4'h0
+//   addrmap_col_b3[11-8] = 4'h0
+//   addrmap_col_b4[19-16] = 4'h0
+//   addrmap_col_b5[27-24] = 4'h0
+	rdata = 0x00000000;
+	//rdata[27:24] = ddr_conf.addrmap_col_b5;
+	//rdata[19:16] = ddr_conf.addrmap_col_b4;
+	//rdata[11:8]  = ddr_conf.addrmap_col_b3;
+	//rdata[3:0]   = ddr_conf.addrmap_col_b2;
+	lhost_ahb_write(DDR_ADDRMAP2, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.ADDRMAP3 -- 4 bytes @'h000000000000020c
+//   addrmap_col_b6[3-0] = 4'h0
+//   addrmap_col_b7[11-8] = 4'h0
+//   addrmap_col_b8[19-16] = 4'hf
+//   addrmap_col_b9[27-24] = 4'hf
+	rdata = (type==32)?0x0f000000:0x0f0f0000;
+	//rdata = 0x0;
+//              rdata[27:24] = ddr_conf.addrmap_col_b9;
+//              rdata[19:16] = ddr_conf.addrmap_col_b8;
+//              rdata[11:8]  = ddr_conf.addrmap_col_b7;
+//              rdata[3:0]   = ddr_conf.addrmap_col_b6;
+	lhost_ahb_write(DDR_ADDRMAP3, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.ADDRMAP4 -- 2 bytes @'h0000000000000210
+//   addrmap_col_b10[3-0] = 4'hf
+//   addrmap_col_b11[11-8] = 4'hf
+	rdata = 0x00000f0f;
+//    rdata = 0x0;
+//              rdata[11:8]  = ddr_conf.addrmap_col_b11;
+//              rdata[3:0]   = ddr_conf.addrmap_col_b10;
+	lhost_ahb_write(DDR_ADDRMAP4, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.ADDRMAP5 -- 4 bytes @'h0000000000000214
+//   addrmap_row_b0[3-0] = 4'h5
+//   addrmap_row_b1[11-8] = 4'h5
+//   addrmap_row_b2_10[19-16] = 4'h5
+//   addrmap_row_b11[27-24] = 4'hf
+	rdata = (type==32)?0x06060606:0x05050505;
+//    rdata = 0x0;
+//              rdata[27:24] = ddr_conf.addrmap_row_b11;
+//              rdata[19:16] = ddr_conf.addrmap_row_b2_10;
+//              rdata[11:8]  = ddr_conf.addrmap_row_b1;
+//              rdata[3:0]   = ddr_conf.addrmap_row_b0;
+	lhost_ahb_write(DDR_ADDRMAP5, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.ADDRMAP6 -- 4 bytes @'h0000000000000218
+//   addrmap_row_b12[3-0] = 4'hf
+//   addrmap_row_b13[11-8] = 4'hf
+//   addrmap_row_b14[19-16] = 4'hf
+//   addrmap_row_b15[27-24] = 4'hf
+
+	if (size == DDR_256MB) {
+		rdata = (type==32) ? 0x0f060606 : 0x0f0f0505; //2Gb                ;
+	} else {
+		rdata = (type==32) ? 0x0f0f0606 : 0x0f0f0f05; //1Gb
+	}
+//	rdata = (type==32)?0x0f0f0606:0x0f0f0505; //2Gb
+//    rdata = 0x0;
+//              rdata[27:24] = ddr_conf.addrmap_row_b15;
+//              rdata[19:16] = ddr_conf.addrmap_row_b14;
+//              rdata[11:8]  = ddr_conf.addrmap_row_b13;
+//              rdata[3:0]   = ddr_conf.addrmap_row_b12;
+	lhost_ahb_write(DDR_ADDRMAP6, rdata);
+
+        // non-speed-width related programming
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.STAT -- 1 bytes @'h0000000000000004
+//   operating_mode[1-0] = 2'h0
+	lhost_ahb_read_data(DDR_STAT, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.MRCTRL0 -- 4 bytes @'h0000000000000010
+//   mr_rank[4-4] = 1'h1
+//   mr_addr[14-12] = 3'h0
+//   mr_wr[31-31] = 1'h0
+//	rdata = 0x00000010;
+//	lhost_ahb_write(DDR_MRCTRL0, rdata);
+////Register DWC_ddr_umctl2_map_UMCTL2_REGS.MRCTRL1 -- 2 bytes @'h0000000000000014
+////   mr_data[15-0] = 16'hcdb8
+//	rdata = 0x0000cdb8;
+//	lhost_ahb_write(DDR_MRCTRL1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.MRSTAT -- 1 bytes @'h0000000000000018
+//   mr_wr_busy[0-0] = 1'h0
+	lhost_ahb_read_data(DDR_MRSTAT, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.PWRCTL -- 1 bytes @'h0000000000000030
+//   selfref_en[0-0] = 1'h0
+//   powerdown_en[1-1] = 1'h0
+//   en_dfi_dram_clk_disable[3-3] = 1'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PWRCTL, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.PWRTMG -- 1 bytes @'h0000000000000034
+//   powerdown_to_x32[4-0] = 5'h03
+	rdata = 0x00000020;
+	lhost_ahb_write(DDR_PWRTMG, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.RFSHCTL0 -- 3 bytes @'h0000000000000050
+//   refresh_burst[10-8] = 3'h0
+//   refresh_to_x32[16-12] = 5'h1f
+//   refresh_margin[23-20] = 4'h2
+	rdata = 0x0021f200;
+	lhost_ahb_write(DDR_RFSHCTL0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.RFSHCTL3 -- 1 bytes @'h0000000000000060
+//   dis_auto_refresh[0-0] = 1'h0
+//   refresh_update_level[1-1] = 1'h0
+	rdata = 0x00000001;
+	lhost_ahb_write(DDR_RFSHCTL3, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.PARCTL -- 1 bytes @'h00000000000000c0
+//   dfi_parity_err_int_en[0-0] = 1'h0
+//   dfi_parity_err_int_clr[1-1] = 1'h0
+//   dfi_parity_err_cnt_clr[2-2] = 1'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PARCTL, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.PARSTAT -- 3 bytes @'h00000000000000c4
+//   dfi_parity_err_cnt[15-0] = 16'h0000
+//   dfi_parity_err_int[16-16] = 1'h0
+	lhost_ahb_read_data(DDR_PARSTAT, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.INIT5 -- 3 bytes @'h00000000000000e4
+//   dev_zqinit_x32[23-16] = 8'h10
+	rdata = 0x00100000;
+	lhost_ahb_write(DDR_INIT5, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DIMMCTL -- 1 bytes @'h00000000000000f0
+//   dimm_stagger_cs_en[0-0] = 1'h0
+//   dimm_addr_mirr_en[1-1] = 1'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_DIMMCTL, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.ZQCTL0 -- 4 bytes @'h0000000000000180
+//   t_zq_short_nop[9-0] = 10'h020
+//   t_zq_long_nop[25-16] = 10'h080
+//   dis_srx_zqcl[30-30] = 1'h0
+//   dis_auto_zq[31-31] = 1'h0
+	rdata = 0x00800020;
+	lhost_ahb_write(DDR_ZQCTL0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.ZQCTL1 -- 3 bytes @'h0000000000000184
+//   t_zq_short_interval_x1024[19-0] = 20'h00070
+	rdata = 0x00000070;
+	lhost_ahb_write(DDR_ZQCTL1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFITMG1 -- 2 bytes @'h0000000000000194
+//   dfi_t_dram_clk_enable[3-0] = 4'h2
+//   dfi_t_dram_clk_disable[11-8] = 4'h2
+	rdata = 0x00000202;
+	lhost_ahb_write(DDR_DFITMG1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFIUPD0 -- 4 bytes @'h00000000000001a0
+//   dfi_t_ctrlup_min[9-0] = 10'h003
+//   dfi_t_ctrlup_max[25-16] = 10'h040
+//   dis_dll_calib[31-31] = 1'h0
+	rdata = 0x00400003;
+	lhost_ahb_write(DDR_DFIUPD0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFIUPD1 -- 3 bytes @'h00000000000001a4
+//   dfi_t_ctrlupd_interval_max_x1024[7-0] = 8'h26
+//   dfi_t_ctrlupd_interval_min_x1024[23-16] = 8'h22
+	rdata = 0x00220026;
+	lhost_ahb_write(DDR_DFIUPD1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFIUPD2 -- 4 bytes @'h00000000000001a8
+//   dfi_phyupd_type0[11-0] = 12'h94f
+//   dfi_phyupd_type1[27-16] = 12'hfff
+//   dfi_phyupd_en[31-31] = 1'h0
+	rdata = 0x0fff094f;
+	lhost_ahb_write(DDR_DFIUPD2, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFIUPD3 -- 4 bytes @'h00000000000001ac
+//   dfi_phyupd_type2[11-0] = 12'h4d6
+//   dfi_phyupd_type3[27-16] = 12'h954
+	rdata = 0x095404d6;
+	lhost_ahb_write(DDR_DFIUPD3, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DFIMISC -- 1 bytes @'h00000000000001b0
+//   dfi_init_complete_en[0-0] = 1'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_DFIMISC, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.ODTCFG -- 4 bytes @'h0000000000000240
+//   wr_odt_delay[19-16] = 4'h0
+//   wr_odt_hold[27-24] = 4'h2
+	rdata = (speed>=3)?0x02000200:0x02000204;
+	lhost_ahb_write(DDR_ODTCFG, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.ODTMAP -- 1 bytes @'h0000000000000244
+//   rank0_wr_odt[0-0] = 1'h1
+	rdata = 0x00000001;
+	lhost_ahb_write(DDR_ODTMAP, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.SCHED -- 4 bytes @'h0000000000000250
+//   force_low_pri_n[0-0] = 1'h1
+//   prefer_write[1-1] = 1'h0
+//   pageclose[2-2] = 1'h1
+//   lpr_num_entries[11-8] = 4'hc
+//   go2critical_hysteresis[23-16] = 8'h1d
+//   rdwr_idle_gap[30-24] = 7'h10
+        rdata = 0x081d0c01;
+	lhost_ahb_write(DDR_SCHED, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.PERFHPR0 -- 2 bytes @'h0000000000000258
+//   hpr_min_non_critical[15-0] = 16'hda6f
+	rdata = 0x0000006f;
+	lhost_ahb_write(DDR_PERFHPR0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.PERFHPR1 -- 4 bytes @'h000000000000025c
+//   hpr_max_starve[15-0] = 16'h1a0c
+//   hpr_xact_run_length[31-24] = 8'hd5
+	rdata = 0x05000001;
+	lhost_ahb_write(DDR_PERFHPR1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.PERFLPR0 -- 2 bytes @'h0000000000000260
+//   lpr_min_non_critical[15-0] = 16'hd248
+	rdata = 0x00000048;
+	lhost_ahb_write(DDR_PERFLPR0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.PERFLPR1 -- 4 bytes @'h0000000000000264
+//   lpr_max_starve[15-0] = 16'h49fa
+//   lpr_xact_run_length[31-24] = 8'h25
+	rdata = 0x050000fa;
+	lhost_ahb_write(DDR_PERFLPR1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.PERFWR0 -- 2 bytes @'h0000000000000268
+//   w_min_non_critical[15-0] = 16'h7390
+	rdata = 0x00000090;
+	lhost_ahb_write(DDR_PERFWR0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.PERFWR1 -- 4 bytes @'h000000000000026c
+//   w_max_starve[15-0] = 16'hcafe
+//   w_xact_run_length[31-24] = 8'h97
+	rdata = 0x040000fe;
+	lhost_ahb_write(DDR_PERFWR1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DBG0 -- 1 bytes @'h0000000000000300
+//   dis_wc[0-0] = 1'h0
+//   dis_rd_bypass[1-1] = 1'h0
+//   dis_act_bypass[2-2] = 1'h0
+//   dis_collision_page_opt[4-4] = 1'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_DBG0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DBG1 -- 1 bytes @'h0000000000000304
+//   dis_dq[0-0] = 1'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_DBG1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.DBGCAM -- 4 bytes @'h0000000000000308
+//   dbg_hpr_q_depth[4-0] = 5'h00
+//   dbg_lpr_q_depth[12-8] = 5'h00
+//   dbg_w_q_depth[20-16] = 5'h00
+//   dbg_stall[24-24] = 1'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_DBGCAM, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCCFG -- 1 bytes @'h0000000000000400
+//   go2critical_en[0-0] = 1'h0
+//   pagematch_limit[4-4] = 1'h1
+	rdata = 0x00000010;
+	lhost_ahb_write(DDR_PCCFG, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_0 -- 2 bytes @'h0000000000000404
+//   rd_port_priority[9-0] = 10'h000
+//   read_reorder_bypass_en[11-11] = 1'h1
+//   rd_port_aging_en[12-12] = 1'h0
+//   rd_port_urgent_en[13-13] = 1'h0
+//   rd_port_pagematch_en[14-14] = 1'h0
+//   rd_port_hpr_en[15-15] = 1'h0
+//   rdwr_ordered_en[16-16] = 1'h1
+	rdata = 0x00014000;
+	lhost_ahb_write(DDR_PCFGR_0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_0 -- 2 bytes @'h0000000000000408
+//   wr_port_priority[9-0] = 10'h000
+//   wr_port_aging_en[12-12] = 1'h0
+//   wr_port_urgent_en[13-13] = 1'h0
+//   wr_port_pagematch_en[14-14] = 1'h0
+
+	rdata = 0x00004000;
+	lhost_ahb_write(DDR_PCFGW_0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_0 -- 1 bytes @'h000000000000040c
+//   id_mask[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDMASKCH0_0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_0 -- 1 bytes @'h0000000000000410
+//   id_value[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDVALUECH0_0, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_1 -- 2 bytes @'h00000000000004b4
+//   rd_port_priority[9-0] = 10'h000
+//   read_reorder_bypass_en[11-11] = 1'h0
+//   rd_port_aging_en[12-12] = 1'h0
+//   rd_port_urgent_en[13-13] = 1'h0
+//   rd_port_pagematch_en[14-14] = 1'h0
+//   rd_port_hpr_en[15-15] = 1'h0
+	rdata = 0x0001c000;
+	lhost_ahb_write(DDR_PCFGR_1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_1 -- 2 bytes @'h00000000000004b8
+//   wr_port_priority[9-0] = 10'h000
+//   wr_port_aging_en[12-12] = 1'h0
+//   wr_port_urgent_en[13-13] = 1'h0
+//   wr_port_pagematch_en[14-14] = 1'h0
+	rdata = 0x00004000;
+	lhost_ahb_write(DDR_PCFGW_1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_1 -- 1 bytes @'h00000000000004bc
+//   id_mask[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDMASKCH0_1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_1 -- 1 bytes @'h00000000000004c0
+//   id_value[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDVALUECH0_1, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_2 -- 2 bytes @'h0000000000000564
+//   rd_port_priority[9-0] = 10'h000
+//   read_reorder_bypass_en[11-11] = 1'h0
+//   rd_port_aging_en[12-12] = 1'h0
+//   rd_port_urgent_en[13-13] = 1'h0
+//   rd_port_pagematch_en[14-14] = 1'h0
+//   rd_port_hpr_en[15-15] = 1'h0
+	rdata = 0x0001c000;
+	lhost_ahb_write(DDR_PCFGR_2, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_2 -- 2 bytes @'h0000000000000568
+//   wr_port_priority[9-0] = 10'h000
+//   wr_port_aging_en[12-12] = 1'h0
+//   wr_port_urgent_en[13-13] = 1'h0
+//   wr_port_pagematch_en[14-14] = 1'h0
+	rdata = 0x00004000;
+	lhost_ahb_write(DDR_PCFGW_2, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_2 -- 1 bytes @'h000000000000056c
+//   id_mask[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDMASKCH0_2, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_2 -- 1 bytes @'h0000000000000570
+//   id_value[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDVALUECH0_2, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_3 -- 2 bytes @'h0000000000000614
+//   rd_port_priority[9-0] = 10'h000
+//   read_reorder_bypass_en[11-11] = 1'h0
+//   rd_port_aging_en[12-12] = 1'h0
+//   rd_port_urgent_en[13-13] = 1'h0
+//   rd_port_pagematch_en[14-14] = 1'h1
+//   rd_port_hpr_en[15-15] = 1'h1
+	rdata = 0x0001c000;
+	lhost_ahb_write(DDR_PCFGR_3, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_3 -- 2 bytes @'h0000000000000618
+//   wr_port_priority[9-0] = 10'h000
+//   wr_port_aging_en[12-12] = 1'h1
+//   wr_port_urgent_en[13-13] = 1'h0
+//   wr_port_pagematch_en[14-14] = 1'h0
+	rdata = 0x00004000;
+	lhost_ahb_write(DDR_PCFGW_3, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_3 -- 1 bytes @'h000000000000061c
+//   id_mask[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDMASKCH0_3, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_3 -- 1 bytes @'h0000000000000620
+//   id_value[3-0] = 4'h0
+
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDVALUECH0_3, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_4 -- 2 bytes @'h00000000000006c4
+//   rd_port_priority[9-0] = 10'h000
+//   read_reorder_bypass_en[11-11] = 1'h0
+//   rd_port_aging_en[12-12] = 1'h0
+//   rd_port_urgent_en[13-13] = 1'h0
+//   rd_port_pagematch_en[14-14] = 1'h0
+//   rd_port_hpr_en[15-15] = 1'h0
+	rdata = 0x00014000;
+	lhost_ahb_write(DDR_PCFGR_4, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_4 -- 2 bytes @'h00000000000006c8
+//   wr_port_priority[9-0] = 10'h000
+//   wr_port_aging_en[12-12] = 1'h0
+//   wr_port_urgent_en[13-13] = 1'h0
+//   wr_port_pagematch_en[14-14] = 1'h0
+	rdata = 0x00004000;
+	lhost_ahb_write(DDR_PCFGW_4, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_4 -- 1 bytes @'h00000000000006cc
+//   id_mask[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDMASKCH0_4, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_4 -- 1 bytes @'h00000000000006d0
+
+//   id_value[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDVALUECH0_4, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_5 -- 2 bytes @'h0000000000000774
+//   rd_port_priority[9-0] = 10'h000
+//   read_reorder_bypass_en[11-11] = 1'h0
+//   rd_port_aging_en[12-12] = 1'h0
+//   rd_port_urgent_en[13-13] = 1'h0
+//   rd_port_pagematch_en[14-14] = 1'h0
+//   rd_port_hpr_en[15-15] = 1'h0
+	rdata = 0x00014000;
+	lhost_ahb_write(DDR_PCFGR_5, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_5 -- 2 bytes @'h0000000000000778
+//   wr_port_priority[9-0] = 10'h000
+//   wr_port_aging_en[12-12] = 1'h0
+//   wr_port_urgent_en[13-13] = 1'h0
+//   wr_port_pagematch_en[14-14] = 1'h0
+	rdata = 0x00004000;
+	lhost_ahb_write(DDR_PCFGW_5, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_5 -- 1 bytes @'h000000000000077c
+//   id_mask[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDMASKCH0_5, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_5 -- 1 bytes @'h0000000000000780
+//   id_value[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDVALUECH0_5, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_6 -- 2 bytes @'h0000000000000824
+//   rd_port_priority[9-0] = 10'h000
+//   read_reorder_bypass_en[11-11] = 1'h0
+//   rd_port_aging_en[12-12] = 1'h0
+//   rd_port_urgent_en[13-13] = 1'h0
+//   rd_port_pagematch_en[14-14] = 1'h0
+//   rd_port_hpr_en[15-15] = 1'h0
+	rdata = 0x00014000;
+	lhost_ahb_write(DDR_PCFGR_6, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_6 -- 2 bytes @'h0000000000000828
+//   wr_port_priority[9-0] = 10'h000
+//   wr_port_aging_en[12-12] = 1'h0
+//   wr_port_urgent_en[13-13] = 1'h0
+//   wr_port_pagematch_en[14-14] = 1'h0
+	rdata = 0x00004000;
+	lhost_ahb_write(DDR_PCFGW_6, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_6 -- 1 bytes @'h000000000000082c
+//   id_mask[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDMASKCH0_6, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_6 -- 1 bytes @'h0000000000000830
+//   id_value[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDVALUECH0_6, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGR_7 -- 2 bytes @'h00000000000008d4
+//   rd_port_priority[9-0] = 10'h000
+//   read_reorder_bypass_en[11-11] = 1'h0
+//   rd_port_aging_en[12-12] = 1'h0
+//   rd_port_urgent_en[13-13] = 1'h0
+//   rd_port_pagematch_en[14-14] = 1'h0
+//   rd_port_hpr_en[15-15] = 1'h0
+	rdata = 0x00014000;
+	lhost_ahb_write(DDR_PCFGR_7, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGW_7 -- 2 bytes @'h00000000000008d8
+//   wr_port_priority[9-0] = 10'h000
+//   wr_port_aging_en[12-12] = 1'h0
+//   wr_port_urgent_en[13-13] = 1'h0
+//   wr_port_pagematch_en[14-14] = 1'h0
+	rdata = 0x00004000;
+	lhost_ahb_write(DDR_PCFGW_7, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDMASKCH0_7 -- 1 bytes @'h00000000000008dc
+//   id_mask[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDMASKCH0_7, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_MP.PCFGIDVALUECH0_7 -- 1 bytes @'h00000000000008e0
+//   id_value[3-0] = 4'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PCFGIDVALUECH0_7, rdata);
+
+	//SYNOP step2 - deassert soft reset reg
+	udelay(1);
+	lhost_ahb_write(0xe0000000, 0x00000004);
+	lhost_ahb_write(0xe0000004, 0x00000004);
+	udelay(1);
+
+	//SYNOP step3 - start PHY init
+	//Following programming is for DDR Phy Utility Block(PUB).
+
+        // speed related PUB programming
+    switch (speed) {
+    case 0: //800MHz
+//	rdata = 0xA19CCB66; //1Gb
+	rdata = 0x9D9CCB66; //2Gb
+	lhost_ahb_write(DDR_PUB_DTPR0, rdata);
+//	rdata = 0x2282C400; //1Gb
+	rdata = 0x22840400; //2Gb
+	lhost_ahb_write(DDR_PUB_DTPR1, rdata);
+//	rdata = 0x9002D200;
+	rdata = 0x1002D200; //tCCD=4
+	lhost_ahb_write(DDR_PUB_DTPR2, rdata);
+	rdata = 0x00001D70;
+	lhost_ahb_write(DDR_PUB_MR0, rdata);
+	rdata = 0x00000018;
+	lhost_ahb_write(DDR_PUB_MR2, rdata);
+	rdata = 0x00f00AA0;
+	lhost_ahb_write(DDR_PUB_PGCR2, rdata);
+        break;
+    case 1: //640MHz
+	rdata = 0x8157B955;
+	lhost_ahb_write(DDR_PUB_DTPR0, rdata);
+//	rdata = 0x1E823B40; //1Gb
+	rdata = 0x1E833B40; //2Gb
+	lhost_ahb_write(DDR_PUB_DTPR1, rdata);
+//	rdata = 0x9002C200;
+	rdata = 0x1002C200; //tCCD=4
+	lhost_ahb_write(DDR_PUB_DTPR2, rdata);
+	rdata = 0x00001B60;
+	lhost_ahb_write(DDR_PUB_MR0, rdata);
+	rdata = 0x00000010;
+	lhost_ahb_write(DDR_PUB_MR2, rdata);
+	rdata = 0x00f00830;
+	lhost_ahb_write(DDR_PUB_PGCR2, rdata);
+        break;
+    case 3: //400MHz
+	rdata = 0x510E7644;
+	lhost_ahb_write(DDR_PUB_DTPR0, rdata);
+//	rdata = 0x16816200; //1Gb
+	rdata = 0x16820200; //2Gb
+	lhost_ahb_write(DDR_PUB_DTPR1, rdata);
+//	rdata = 0x90022A00;
+	rdata = 0x10022A00; //tCCD=4
+	lhost_ahb_write(DDR_PUB_DTPR2, rdata);
+	rdata = 0x00001520;
+	lhost_ahb_write(DDR_PUB_MR0, rdata);
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PUB_MR2, rdata);
+	rdata = 0x00f00488;
+	lhost_ahb_write(DDR_PUB_PGCR2, rdata);
+        break;
+    case 4: //320MHz
+	rdata = 0x410C7544;
+	lhost_ahb_write(DDR_PUB_DTPR0, rdata);
+//	rdata = 0x168121A0; //1Gb
+	rdata = 0x1681A1A0; //2Gb
+	lhost_ahb_write(DDR_PUB_DTPR1, rdata);
+//	rdata = 0x90022A00;
+	rdata = 0x10022A00; //tCCD=4
+	lhost_ahb_write(DDR_PUB_DTPR2, rdata);
+	rdata = 0x00001320;
+	lhost_ahb_write(DDR_PUB_MR0, rdata);
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PUB_MR2, rdata);
+	rdata = 0x00F00350;
+	lhost_ahb_write(DDR_PUB_PGCR2, rdata);
+        break;
+    default:
+	//Configure Timing parameter registers
+	rdata = 0x65129744; //AL=CL-1
+//	rdata = 0x65127744; //AL=0
+	lhost_ahb_write(DDR_PUB_DTPR0, rdata);
+//	rdata = 0x1A81BA80; //1Gb
+
+	if (size == DDR_256MB){
+		rdata = 0x1A828280; //2Gb
+	} else {
+		rdata = 0x1A81BA80; //1Gb
+	}
+
+	lhost_ahb_write(DDR_PUB_DTPR1, rdata);
+//	rdata = 0x90023200;
+	rdata = 0x10023200; //tCCD=4
+	lhost_ahb_write(DDR_PUB_DTPR2, rdata);
+	rdata = 0x1940; //CL8
+	lhost_ahb_write(DDR_PUB_MR0, rdata);
+	rdata = 0x0008;
+	lhost_ahb_write(DDR_PUB_MR2, rdata);
+	//Configure PHY general configuration registers.
+	rdata = 0x00f0023f;
+	lhost_ahb_write(DDR_PUB_PGCR2, rdata);
+        break;
+    }
+
+	rdata = (type==32)?0x7c000e81:0x7c000e80;
+	lhost_ahb_write(DDR_PUB_DX2GCR, rdata);
+	lhost_ahb_write(DDR_PUB_DX3GCR, rdata);
+        // non-speed related PUB programming
+	//Read DRAM Control Register
+	lhost_ahb_read_data(DDR_PUB_DCR, rdata);
+	//Enable it for DDR3
+	rdata = 0x0000040b;
+	lhost_ahb_write(DDR_PUB_DCR, rdata);
+	//Configure Mode Register 0 of PUB
+	rdata = 0x000E; // Rtt_Nom 60 ohms, AL=CL-1
+//	rdata = 0x0006; // Rtt_Nom 60 ohms, AL=0
+	lhost_ahb_write(DDR_PUB_MR1, rdata);
+	rdata = 0x0000;
+	lhost_ahb_write(DDR_PUB_MR3, rdata);
+
+	//Configure PHY Timing registers.
+	rdata = 0x0fa0fa10;
+	lhost_ahb_write(DDR_PUB_PTR0, rdata);
+//	rdata = 0x00800080;
+	rdata = 0x61a808ca;
+	lhost_ahb_write(DDR_PUB_PTR1, rdata);
+//      rdata = 0x00080421;
+//    lhost_ahb_write(DDR_PUB_PTR2, rdata); // for simulation only, should not need to be written
+
+	//SYNOP step4 - monitor PHY init status
+	//Now wait till PHY initialization done.
+	rdata = 0x0;
+#ifdef ENABLE_DDR_VERBOSE
+        printf("DDR_INIT: in step 4\n");
+#endif
+	while ((rdata & 1) != 1) {
+		lhost_ahb_read_data(DDR_PUB_PGSR0, rdata);
+	}
+	//Calibralte local line registers.
+//	rdata = 0x0000006E;
+//	lhost_ahb_write(DDR_PUB_DX0LCDLR2, rdata);
+//	lhost_ahb_write(DDR_PUB_DX1LCDLR2, rdata);
+//	lhost_ahb_write(DDR_PUB_DX2LCDLR2, rdata);
+//	lhost_ahb_write(DDR_PUB_DX3LCDLR2, rdata);
+
+	//SYNOP step5 - Start Phy Initialization Register through controller
+	rdata = 0x00040001;
+	lhost_ahb_write(DDR_PUB_PIR, rdata);
+	udelay(1);
+
+	//Now wait till PHY initialization done after local line register changes.
+	rdata = 0x0;
+#ifdef ENABLE_DDR_VERBOSE
+        printf("DDR_INIT: wait for PHY init\n");
+#endif
+	while ((rdata & 0x1f) != 0x1f) {
+		lhost_ahb_read_data(DDR_PUB_PGSR0, rdata);
+	}
+
+	//SYNOP step6 - set DFIMISC.dfi_init_complete_en to 1
+	rdata = 0x00000001;
+	lhost_ahb_write(DDR_DFIMISC, rdata);
+
+	//SYNOP step7 - wait for DWC_ddr_umctl2 to move to "normal" by monitoring STAT.operating_mode signal
+	rdata = 0x0;
+#ifdef ENABLE_DDR_VERBOSE
+        printf("DDR_INIT: in step7\n");
+#endif
+	while ((rdata & 3) != 1) {
+		lhost_ahb_read_data(DDR_STAT, rdata);
+	}
+
+	//SYNOP step8 - disable auto-refreshes and powerdown
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.RFSHCTL3 -- 1 bytes @'h0000000000000060
+//   dis_auto_refresh[0-0] = 1'h1
+//   refresh_update_level[1-1] = 1'h0
+	rdata = 0x00000001;
+	lhost_ahb_write(DDR_RFSHCTL3, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.PWRCTL -- 1 bytes @'h0000000000000030
+//   selfref_en[0-0] = 1'h0
+//   powerdown_en[1-1] = 1'h0
+//   en_dfi_dram_clk_disable[3-3] = 1'h0
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_PWRCTL, rdata);
+	rdata = 0x00000000;
+	lhost_ahb_write(DDR_DFIMISC, rdata);
+	rdata = 0x44181ee4;
+	lhost_ahb_write(DDR_PUB_DXCCR, rdata);
+
+// Zo of 34 ohms (0xd) or 40 ohms (0xb) and ODT of 60ohms (5), 120 ohms (1), 40ohms (8)
+	rdata = 0x101d;
+	lhost_ahb_write(DDR_PUB_ZQ0CR1, rdata);
+
+	//SYNOP step9 - user MPR for training
+//	rdata = 0x9f003587;//default
+	rdata = 0x9f0035c7;
+	lhost_ahb_write(DDR_PUB_DTCR, rdata);
+
+	//SYNOP step10a - configure PUB PIR register for write leveling
+//	rdata = 0x00005601;
+	rdata = 0x0000FE01;
+	lhost_ahb_write(DDR_PUB_PIR, rdata);
+	udelay(1);
+	rdata = 0x0;
+	//SYNOP step11a - monitor PGSR0.IDONE
+#ifdef ENABLE_DDR_VERBOSE
+        printf("DDR_INIT: in step11a\n");
+#endif
+	while ((rdata & 0xFE1) != 0xFE1) {
+//	while ((rdata & 0x561) != 0x561) {
+		lhost_ahb_read_data(DDR_PUB_PGSR0, rdata);
+#ifdef ENABLE_DDR_VERBOSE
+//		printf("DDR_INIT: DDR_PUB_PGSR0 = %x\n", rdata);
+#endif
+	}
+	if((rdata & 0x0FE00000) != 0x0) {
+		printf("DDR_INIT: ERROR : DDR training fails");
+	}
+
+	//SYNOP step9 - program PUB DTCR back to default
+	rdata = 0x9f003587;//default
+	lhost_ahb_write(DDR_PUB_DTCR, rdata);
+
+	//SYNOP step10a - configure PUB PIR register for write leveling
+//	rdata = 0x00005601;
+	rdata = 0x0000FC01;
+	lhost_ahb_write(DDR_PUB_PIR, rdata);
+	udelay(1);
+	rdata = 0x0;
+	//SYNOP step11a - monitor PGSR0.IDONE
+#ifdef ENABLE_DDR_VERBOSE
+        printf("DDR_INIT: in step11a\n");
+#endif
+	while ((rdata & 0xFC1) != 0xFC1) {
+//	while ((rdata & 0x561) != 0x561) {
+		lhost_ahb_read_data(DDR_PUB_PGSR0, rdata);
+#ifdef ENABLE_DDR_VERBOSE
+//		printf("DDR_INIT: DDR_PUB_PGSR0 = %x\n", rdata);
+#endif
+	}
+	if((rdata & 0x0FC00000) != 0x0) {
+		printf("DDR_INIT: ERROR : DDR training fails");
+	}
+#ifdef ENABLE_DDR_VERBOSE
+        rdata = REG_READ(DDR_PUB_ZQ0SR0);
+        printf("DDR_INIT: DDR_PUB_ZQ0SR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_ZQ0SR1);
+        printf("DDR_INIT: DDR_PUB_ZQ0SR1 = %x\n", rdata);
+
+        rdata = REG_READ(DDR_PUB_DX0GSR0);
+        printf("DDR_INIT: DDR_PUB_DX0GSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0GSR1);
+        printf("DDR_INIT: DDR_PUB_DX0GSR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0GSR2);
+        printf("DDR_INIT: DDR_PUB_DX0GSR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0BDLR0);
+        printf("DDR_INIT: DDR_PUB_DX0BDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0BDLR1);
+        printf("DDR_INIT: DDR_PUB_DX0BDLR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0BDLR2);
+        printf("DDR_INIT: DDR_PUB_DX0BDLR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0BDLR3);
+        printf("DDR_INIT: DDR_PUB_DX0BDLR3 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0BDLR4);
+        printf("DDR_INIT: DDR_PUB_DX0BDLR4 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0LCDLR0);
+        printf("DDR_INIT: DDR_PUB_DX0LCDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0LCDLR1);
+        printf("DDR_INIT: DDR_PUB_DX0LCDLR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0LCDLR2);
+        printf("DDR_INIT: DDR_PUB_DX0LCDLR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX0MDLR);
+        printf("DDR_INIT: DDR_PUB_DX0MDLR = %x\n", rdata);
+
+        rdata = REG_READ(DDR_PUB_DX1GSR0);
+        printf("DDR_INIT: DDR_PUB_DX1GSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1GSR1);
+        printf("DDR_INIT: DDR_PUB_DX1GSR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1GSR2);
+        printf("DDR_INIT: DDR_PUB_DX1GSR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1BDLR0);
+        printf("DDR_INIT: DDR_PUB_DX1BDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1BDLR1);
+        printf("DDR_INIT: DDR_PUB_DX1BDLR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1BDLR2);
+        printf("DDR_INIT: DDR_PUB_DX1BDLR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1BDLR3);
+        printf("DDR_INIT: DDR_PUB_DX1BDLR3 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1BDLR4);
+        printf("DDR_INIT: DDR_PUB_DX1BDLR4 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1LCDLR0);
+        printf("DDR_INIT: DDR_PUB_DX1LCDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1LCDLR1);
+        printf("DDR_INIT: DDR_PUB_DX1LCDLR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1LCDLR2);
+        printf("DDR_INIT: DDR_PUB_DX1LCDLR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX1MDLR);
+        printf("DDR_INIT: DDR_PUB_DX1MDLR = %x\n", rdata);
+
+        rdata = REG_READ(DDR_PUB_DX2GSR0);
+        printf("DDR_INIT: DDR_PUB_DX2GSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2GSR1);
+        printf("DDR_INIT: DDR_PUB_DX2GSR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2GSR2);
+        printf("DDR_INIT: DDR_PUB_DX2GSR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2BDLR0);
+        printf("DDR_INIT: DDR_PUB_DX2BDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2BDLR1);
+        printf("DDR_INIT: DDR_PUB_DX2BDLR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2BDLR2);
+        printf("DDR_INIT: DDR_PUB_DX2BDLR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2BDLR3);
+        printf("DDR_INIT: DDR_PUB_DX2BDLR3 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2BDLR4);
+        printf("DDR_INIT: DDR_PUB_DX2BDLR4 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2LCDLR0);
+        printf("DDR_INIT: DDR_PUB_DX2LCDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2LCDLR1);
+        printf("DDR_INIT: DDR_PUB_DX2LCDLR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2LCDLR2);
+        printf("DDR_INIT: DDR_PUB_DX2LCDLR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX2MDLR);
+        printf("DDR_INIT: DDR_PUB_DX2MDLR = %x\n", rdata);
+
+        rdata = REG_READ(DDR_PUB_DX3GSR0);
+        printf("DDR_INIT: DDR_PUB_DX3GSR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3GSR1);
+        printf("DDR_INIT: DDR_PUB_DX3GSR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3GSR2);
+        printf("DDR_INIT: DDR_PUB_DX3GSR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3BDLR0);
+        printf("DDR_INIT: DDR_PUB_DX3BDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3BDLR1);
+        printf("DDR_INIT: DDR_PUB_DX3BDLR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3BDLR2);
+        printf("DDR_INIT: DDR_PUB_DX3BDLR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3BDLR3);
+        printf("DDR_INIT: DDR_PUB_DX3BDLR3 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3BDLR4);
+        printf("DDR_INIT: DDR_PUB_DX3BDLR4 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3LCDLR0);
+        printf("DDR_INIT: DDR_PUB_DX3LCDLR0 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3LCDLR1);
+        printf("DDR_INIT: DDR_PUB_DX3LCDLR1 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3LCDLR2);
+        printf("DDR_INIT: DDR_PUB_DX3LCDLR2 = %x\n", rdata);
+        rdata = REG_READ(DDR_PUB_DX3MDLR);
+        printf("DDR_INIT: DDR_PUB_DX3MDLR = %x\n", rdata);
+#endif
+	//lhost_ahb_write(DDR_PUB_DTCR, 0x00003583);    // disable data training
+	//enable auto-refresh and powerdown
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.RFSHCTL3 -- 1 bytes @'h0000000000000060
+//   dis_auto_refresh[0-0] = 1'h0
+//   refresh_update_level[1-1] = 1'h0
+        rdata = 0x0;
+	lhost_ahb_write(DDR_RFSHCTL3, rdata);
+//Register DWC_ddr_umctl2_map_UMCTL2_REGS.PWRCTL -- 1 bytes @'h0000000000000030
+//   selfref_en[0-0] = 1'h0
+//   powerdown_en[1-1] = 1'h0
+//   en_dfi_dram_clk_disable[3-3] = 1'h0
+        rdata = 0x0;
+        lhost_ahb_write(DDR_PWRCTL, rdata);
+	        //dqs training
+	//rdata = (0x14<<0) | (0x14<<6) | (0x14<<12) | (0x14<<18);
+	//REG_WRITE(DDR_PUB_DX0BDLR3, rdata);
+	//REG_WRITE(DDR_PUB_DX0BDLR4, rdata);
+	//
+#ifdef ENABLE_DDR_VERBOSE
+	rdata = REG_READ(DDR_PUB_DX0LCDLR2);
+	printf("DDR_INIT: DDR_PUB_DX0LCDLR2 = %x\n", rdata);
+#endif
+	return 0;
+}
+
+/* END COPY-PASTE FROM ARCSHELL */
+
+int ddr_init(u32 type, u32 speed, u32 size)
+{
+	u32 ddr_speed[] = {DDR3_800MHz, DDR3_640MHz, DDR3_500MHz, DDR3_400MHz, DDR3_320MHz};
+	u32 idx;
+
+	for (idx = 0; idx < (sizeof(ddr_speed) / sizeof(ddr_speed[0])); idx++)
+		if (ddr_speed[idx] == speed) break;
+
+	if (type == DDR3_16_WINBOND) {
+		return ddr3_init(16, idx, size);
+	} else if (type == DDR3_32_WINBOND) {
+		return ddr3_init(32, idx, size);
+	} else {
+		return -1;
+	}
+}
+#endif /* TOPAZ_ASIC_PLATFORM */
+
diff --git a/board/ruby/ddr.h b/board/ruby/ddr.h
new file mode 100644
index 0000000..14dbea8
--- /dev/null
+++ b/board/ruby/ddr.h
@@ -0,0 +1,372 @@
+#ifndef __DDR_H__
+#define __DDR_H__
+/*
+ * Copyright (c) 2010 Quantenna Communications, Inc.
+ * All rights reserved.SYS_CTL_ODT_OFF
+ *
+ *  IRQ driver
+ */
+
+#include "ruby_platform.h"
+
+#undef	ENABLE_DDR_VERBOSE
+#define DDR_BASE_ADDR               (0xf6000000)
+#define DDR_BASE                    (0xf6000000)
+
+
+///////////////////////////////////////////////////////////////////////////////
+//             DDR3 Includes
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+//             DDR3 Defines
+///////////////////////////////////////////////////////////////////////////////
+
+#ifdef TOPAZ_FPGA_UMCTL1
+
+#define DDR3_TWR                    (6)
+#define DDR3_MR_TWR                 (BIT(10))
+
+#define DDR_SCFG                    (DDR_BASE + 0x00)
+#define DDR_SCTL                    (DDR_BASE + 0x04)
+#define DDR_STAT                    (DDR_BASE + 0x08)
+#define DDR_MCMD                    (DDR_BASE + 0x40)
+#define DDR_POWCTL                  (DDR_BASE + 0x44)
+#define DDR_POWSTAT                 (DDR_BASE + 0x48)
+#define DDR_MRRSTAT0                (DDR_BASE + 0x64)
+#define DDR_MRRSTAT1                (DDR_BASE + 0x68)
+#define DDR_MCFG1                   (DDR_BASE + 0x7C)
+#define DDR_MCFG                    (DDR_BASE + 0x80)
+#define DDR_PPCFG                   (DDR_BASE + 0x84)
+#define DDR_TOGCNT1U                (DDR_BASE + 0xC0)
+#define DDR_TINIT                   (DDR_BASE + 0xC4)
+#define DDR_TRSTH                   (DDR_BASE + 0xC8)
+#define DDR_TOGCNT100N              (DDR_BASE + 0xCC)
+#define DDR_TREFI                   (DDR_BASE + 0xD0)
+#define DDR_TMRD                    (DDR_BASE + 0xD4)
+#define DDR_TRFC                    (DDR_BASE + 0xD8)
+#define DDR_TRP                     (DDR_BASE + 0xDC)
+#define DDR_TRTW                    (DDR_BASE + 0xE0)
+#define DDR_TAL                     (DDR_BASE + 0xE4)
+#define DDR_TCL                     (DDR_BASE + 0xE8)
+#define DDR_TCWL                    (DDR_BASE + 0xEC)
+#define DDR_TRAS                    (DDR_BASE + 0xF0)
+#define DDR_TRC                     (DDR_BASE + 0xF4)
+#define DDR_TRCD                    (DDR_BASE + 0xF8)
+#define DDR_TRRD                    (DDR_BASE + 0xFC)
+#define DDR_TRTP                    (DDR_BASE + 0x100)
+#define DDR_TWR                     (DDR_BASE + 0x104)
+#define DDR_TWTR                    (DDR_BASE + 0x108)
+#define DDR_TEXSR                   (DDR_BASE + 0x10C)
+#define DDR_TXP                     (DDR_BASE + 0x110)
+#define DDR_TXPDLL                  (DDR_BASE + 0x114)
+#define DDR_TZQCS                   (DDR_BASE + 0x118)
+#define DDR_TZQCSI                  (DDR_BASE + 0x11C)
+#define DDR_TDQS                    (DDR_BASE + 0x120)
+#define DDR_TCKSRE                  (DDR_BASE + 0x124)
+#define DDR_TCKSRX                  (DDR_BASE + 0x128)
+#define DDR_TCKE                    (DDR_BASE + 0x12C)
+#define DDR_TMOD                    (DDR_BASE + 0x130)
+#define DDR_TRSTL                   (DDR_BASE + 0x134)
+#define DDR_TZQCL                   (DDR_BASE + 0x138)
+#define DDR_TCKESR                  (DDR_BASE + 0x140)
+#define DDR_TDPD                    (DDR_BASE + 0x144)
+#define DDR_ECCCFG                  (DDR_BASE + 0x180)
+#define DDR_FITCTRLDELAY            (DDR_BASE + 0x240)
+#define DDR_FITPHYWRDATA            (DDR_BASE + 0x250)
+#define DDR_DFITPHYWRLAT            (DDR_BASE + 0x254)
+#define DDR_DFITRDDATAEN            (DDR_BASE + 0x260)
+#define DDR_DFITPHYRDLAT            (DDR_BASE + 0x264)
+#define DDR_DFISTSTAT0              (DDR_BASE + 0x2C0)
+#define DDR_DFISTCFG0               (DDR_BASE + 0x2C4)
+#define DDR_DFISTCFG1               (DDR_BASE + 0x2C8)
+#define DDR_FITDRAMCLKEN            (DDR_BASE + 0x2D0)
+#define DDR_ITDRAMCLKDIS            (DDR_BASE + 0x2D4)
+#define DDR_DFISTCFG2               (DDR_BASE + 0x2D8)
+#define DDR_DFILPCFG0               (DDR_BASE + 0x2F0)
+#define DDR_PCFG_0                  (DDR_BASE + 0x400)
+#define DDR_PCFG_1                  (DDR_BASE + 0x404)
+#define DDR_PCFG_2                  (DDR_BASE + 0x408)
+#define DDR_PCFG_3                  (DDR_BASE + 0x40c)
+#define DDR_PCFG_4                  (DDR_BASE + 0x410)
+#define DDR_PCFG_5                  (DDR_BASE + 0x414)
+#define DDR_PCFG_6                  (DDR_BASE + 0x418)
+#define DDR_PCFG_7                  (DDR_BASE + 0x41c)
+#define DDR_CCFG                    (DDR_BASE + 0x480)
+#define DDR_DCFG                    (DDR_BASE + 0x484)
+
+#define DDR_PUB_BASE                (0xf6002000)
+#define DDR_PUB_PIR                 (DDR_PUB_BASE + 0x04)
+#define DDR_PUB_PGCR0               (DDR_PUB_BASE + 0x08)
+#define DDR_PUB_PGSR0               (DDR_PUB_BASE + 0x10)
+#define DDR_PUB_PLLCR               (DDR_PUB_BASE + 0x18)
+#define DDR_PUB_PTR0                (DDR_PUB_BASE + 0x1C)
+#define DDR_PUB_PTR1                (DDR_PUB_BASE + 0x20)
+#define DDR_PUB_PTR2                (DDR_PUB_BASE + 0x24)
+#define DDR_PUB_PTR3                (DDR_PUB_BASE + 0x28)
+#define DDR_PUB_PTR4                (DDR_PUB_BASE + 0x2c)
+#define DDR_PUB_DSGCR               (DDR_PUB_BASE + 0x40)
+#define DDR_PUB_DCR                 (DDR_PUB_BASE + 0x44)
+#define DDR_PUB_DTPR0               (DDR_PUB_BASE + 0x48)
+#define DDR_PUB_DTPR1               (DDR_PUB_BASE + 0x4C)
+#define DDR_PUB_DTPR2               (DDR_PUB_BASE + 0x50)
+#define DDR_PUB_MR0                 (DDR_PUB_BASE + 0x54)
+#define DDR_PUB_MR1                 (DDR_PUB_BASE + 0x58)
+#define DDR_PUB_MR2                 (DDR_PUB_BASE + 0x5C)
+#define DDR_PUB_MR3                 (DDR_PUB_BASE + 0x60)
+#define DDR_PUB_DTCR                (DDR_PUB_BASE + 0x68)
+#define DDR_PUB_DTAR0               (DDR_PUB_BASE + 0x6c)
+#define DDR_PUB_DTAR1               (DDR_PUB_BASE + 0x70)
+#define DDR_PUB_DTAR2               (DDR_PUB_BASE + 0x74)
+#define DDR_PUB_DTAR3               (DDR_PUB_BASE + 0x78)
+#define DDR_PUB_DTDR0               (DDR_PUB_BASE + 0x7c)
+#define DDR_PUB_DTDR1               (DDR_PUB_BASE + 0x80)
+#define DDR_PUB_DTEDR1              (DDR_PUB_BASE + 0x84)
+#define DDR_PUB_DTEDR0              (DDR_PUB_BASE + 0x88)
+#define DDR_PUB_PGCR2               (DDR_PUB_BASE + 0x8C)
+#define DDR_PUB_DX0GCR              (DDR_PUB_BASE + 0x1C0)
+#define DDR_PUB_DX0GSR0             (DDR_PUB_BASE + 0x1C4)
+#define DDR_PUB_DX0LCDLR0           (DDR_PUB_BASE + 0x1E0)
+#define DDR_PUB_DX0LCDLR2           (DDR_PUB_BASE + 0x1E8)
+#define DDR_PUB_DX1GCR              (DDR_PUB_BASE + 0x200)
+#define DDR_PUB_DX1GSR0             (DDR_PUB_BASE + 0x204)
+#define DDR_PUB_DX1LCDLR0           (DDR_PUB_BASE + 0x220)
+#define DDR_PUB_DX1LCDLR2           (DDR_PUB_BASE + 0x228)
+#define DDR_PUB_DX2GCR              (DDR_PUB_BASE + 0x240)
+#define DDR_PUB_DX2GSR0             (DDR_PUB_BASE + 0x244)
+#define DDR_PUB_DX2LCDLR0           (DDR_PUB_BASE + 0x260)
+#define DDR_PUB_DX2LCDLR2           (DDR_PUB_BASE + 0x268)
+#define DDR_PUB_DX3GCR              (DDR_PUB_BASE + 0x280)
+#define DDR_PUB_DX3GSR0             (DDR_PUB_BASE + 0x284)
+#define DDR_PUB_DX3LCDLR0           (DDR_PUB_BASE + 0x2a0)
+#define DDR_PUB_DX3LCDLR2           (DDR_PUB_BASE + 0x2a8)
+#define DDR_PUB_DX0BDLR0            (DDR_PUB_BASE + 0x1cc)
+#define DDR_PUB_DX0BDLR1            (DDR_PUB_BASE + 0x1d0)
+#define DDR_PUB_DX0BDLR2            (DDR_PUB_BASE + 0x1d4)
+#define DDR_PUB_DX1BDLR0            (DDR_PUB_BASE + 0x20c)
+#define DDR_PUB_DX1BDLR1            (DDR_PUB_BASE + 0x210)
+#define DDR_PUB_DX1BDLR2            (DDR_PUB_BASE + 0x214)
+#define DDR_PUB_DX2BDLR0            (DDR_PUB_BASE + 0x24c)
+#define DDR_PUB_DX2BDLR1            (DDR_PUB_BASE + 0x250)
+#define DDR_PUB_DX2BDLR2            (DDR_PUB_BASE + 0x254)
+#define DDR_PUB_DX3BDLR0            (DDR_PUB_BASE + 0x28c)
+#define DDR_PUB_DX3BDLR1            (DDR_PUB_BASE + 0x290)
+#define DDR_PUB_DX3BDLR2            (DDR_PUB_BASE + 0x294)
+
+#else /* Topaz UMCTL-2 */
+
+#define DDR3_TWR		(6)
+#define DDR3_MR_TWR		(BIT(10))
+#define DDR_BASE_ADDR           (0xf6000000)
+
+#define DDR_BASE                (0xf6000000)
+#define DDR_MSTR                (DDR_BASE + 0x000)
+#define DDR_STAT                (DDR_BASE + 0x004)
+#define DDR_MRCTRL0             (DDR_BASE + 0x010)
+#define DDR_MRCTRL1             (DDR_BASE + 0x014)
+#define DDR_MRSTAT              (DDR_BASE + 0x018)
+#define DDR_PWRCTL              (DDR_BASE + 0x030)
+#define DDR_PWRTMG              (DDR_BASE + 0x034)
+#define DDR_RFSHCTL0            (DDR_BASE + 0x050)
+#define DDR_RFSHCTL3            (DDR_BASE + 0x060)
+#define DDR_RFSHTMG             (DDR_BASE + 0x064)
+#define DDR_PARCTL              (DDR_BASE + 0x0c0)
+#define DDR_PARSTAT             (DDR_BASE + 0x0c4)
+#define DDR_INIT0               (DDR_BASE + 0x0d0)
+#define DDR_INIT1               (DDR_BASE + 0x0d4)
+#define DDR_INIT3               (DDR_BASE + 0x0dc)
+#define DDR_INIT4               (DDR_BASE + 0x0e0)
+#define DDR_INIT5               (DDR_BASE + 0x0e4)
+#define DDR_DIMMCTL             (DDR_BASE + 0x0f0)
+#define DDR_DRAMTMG0            (DDR_BASE + 0x100)
+#define DDR_DRAMTMG1            (DDR_BASE + 0x104)
+#define DDR_DRAMTMG2            (DDR_BASE + 0x108)
+#define DDR_DRAMTMG3            (DDR_BASE + 0x10c)
+#define DDR_DRAMTMG4            (DDR_BASE + 0x110)
+#define DDR_DRAMTMG5            (DDR_BASE + 0x114)
+#define DDR_DRAMTMG8            (DDR_BASE + 0x120)
+#define DDR_ZQCTL0              (DDR_BASE + 0x180)
+#define DDR_ZQCTL1              (DDR_BASE + 0x184)
+#define DDR_DFITMG0             (DDR_BASE + 0x190)
+#define DDR_DFITMG1             (DDR_BASE + 0x194)
+#define DDR_DFIUPD0             (DDR_BASE + 0x1a0)
+#define DDR_DFIUPD1             (DDR_BASE + 0x1a4)
+#define DDR_DFIUPD2             (DDR_BASE + 0x1a8)
+#define DDR_DFIUPD3             (DDR_BASE + 0x1ac)
+#define DDR_DFIMISC             (DDR_BASE + 0x1b0)
+#define DDR_ADDRMAP1            (DDR_BASE + 0x204)
+#define DDR_ADDRMAP2            (DDR_BASE + 0x208)
+#define DDR_ADDRMAP3            (DDR_BASE + 0x20c)
+#define DDR_ADDRMAP4            (DDR_BASE + 0x210)
+#define DDR_ADDRMAP5            (DDR_BASE + 0x214)
+#define DDR_ADDRMAP6            (DDR_BASE + 0x218)
+#define DDR_ODTCFG              (DDR_BASE + 0x240)
+#define DDR_ODTMAP              (DDR_BASE + 0x244)
+#define DDR_SCHED               (DDR_BASE + 0x250)
+#define DDR_PERFHPR0            (DDR_BASE + 0x258)
+#define DDR_PERFHPR1            (DDR_BASE + 0x25c)
+#define DDR_PERFLPR0            (DDR_BASE + 0x260)
+#define DDR_PERFLPR1            (DDR_BASE + 0x264)
+#define DDR_PERFWR0             (DDR_BASE + 0x268)
+#define DDR_PERFWR1             (DDR_BASE + 0x26c)
+#define DDR_DBG0                (DDR_BASE + 0x300)
+#define DDR_DBG1                (DDR_BASE + 0x304)
+#define DDR_DBGCAM              (DDR_BASE + 0x308)
+#define DDR_PCCFG               (DDR_BASE + 0x400)
+#define DDR_PCFGR_0             (DDR_BASE + 0x404)
+#define DDR_PCFGW_0             (DDR_BASE + 0x408)
+#define DDR_PCFGIDMASKCH0_0     (DDR_BASE + 0x40c)
+#define DDR_PCFGIDVALUECH0_0    (DDR_BASE + 0x410)
+#define DDR_PCFGR_1             (DDR_BASE + 0x4b4)
+#define DDR_PCFGW_1             (DDR_BASE + 0x4b8)
+#define DDR_PCFGIDMASKCH0_1     (DDR_BASE + 0x4bc)
+#define DDR_PCFGIDVALUECH0_1    (DDR_BASE + 0x4c0)
+#define DDR_PCFGR_2             (DDR_BASE + 0x564)
+#define DDR_PCFGW_2             (DDR_BASE + 0x568)
+#define DDR_PCFGIDMASKCH0_2     (DDR_BASE + 0x56c)
+#define DDR_PCFGIDVALUECH0_2    (DDR_BASE + 0x570)
+#define DDR_PCFGR_3             (DDR_BASE + 0x614)
+#define DDR_PCFGW_3             (DDR_BASE + 0x618)
+#define DDR_PCFGIDMASKCH0_3     (DDR_BASE + 0x61c)
+#define DDR_PCFGIDVALUECH0_3    (DDR_BASE + 0x620)
+#define DDR_PCFGR_4             (DDR_BASE + 0x6c4)
+#define DDR_PCFGW_4             (DDR_BASE + 0x6c8)
+#define DDR_PCFGIDMASKCH0_4     (DDR_BASE + 0x6cc)
+#define DDR_PCFGIDVALUECH0_4    (DDR_BASE + 0x6d0)
+#define DDR_PCFGR_5             (DDR_BASE + 0x774)
+#define DDR_PCFGW_5             (DDR_BASE + 0x778)
+#define DDR_PCFGIDMASKCH0_5     (DDR_BASE + 0x77c)
+#define DDR_PCFGIDVALUECH0_5    (DDR_BASE + 0x780)
+#define DDR_PCFGR_6             (DDR_BASE + 0x824)
+#define DDR_PCFGW_6             (DDR_BASE + 0x828)
+#define DDR_PCFGIDMASKCH0_6     (DDR_BASE + 0x82c)
+#define DDR_PCFGIDVALUECH0_6    (DDR_BASE + 0x830)
+#define DDR_PCFGR_7             (DDR_BASE + 0x8d4)
+#define DDR_PCFGW_7             (DDR_BASE + 0x8d8)
+#define DDR_PCFGIDMASKCH0_7     (DDR_BASE + 0x8dc)
+#define DDR_PCFGIDVALUECH0_7    (DDR_BASE + 0x8e0)
+
+#define DDR_PUB_BASE            (0xf6002000)
+#define DDR_PUB_PIR             (DDR_PUB_BASE + 0x04)
+#define DDR_PUB_PGCR0           (DDR_PUB_BASE + 0x08)
+#define DDR_PUB_PGCR1           (DDR_PUB_BASE + 0x0c)
+#define DDR_PUB_PGSR0           (DDR_PUB_BASE + 0x10)
+#define DDR_PUB_PLLCR           (DDR_PUB_BASE + 0x18)
+#define DDR_PUB_PTR0            (DDR_PUB_BASE + 0x1C)
+#define DDR_PUB_PTR1            (DDR_PUB_BASE + 0x20)
+#define DDR_PUB_PTR2            (DDR_PUB_BASE + 0x24)
+#define DDR_PUB_PTR3            (DDR_PUB_BASE + 0x28)
+#define DDR_PUB_PTR4            (DDR_PUB_BASE + 0x2c)
+#define DDR_PUB_DXCCR		(DDR_PUB_BASE + 0x3c)
+#define DDR_PUB_DSGCR           (DDR_PUB_BASE + 0x40)
+#define DDR_PUB_DCR             (DDR_PUB_BASE + 0x44)
+#define DDR_PUB_DTPR0           (DDR_PUB_BASE + 0x48)
+#define DDR_PUB_DTPR1           (DDR_PUB_BASE + 0x4C)
+#define DDR_PUB_DTPR2           (DDR_PUB_BASE + 0x50)
+#define DDR_PUB_MR0             (DDR_PUB_BASE + 0x54)
+#define DDR_PUB_MR1             (DDR_PUB_BASE + 0x58)
+#define DDR_PUB_MR2             (DDR_PUB_BASE + 0x5C)
+#define DDR_PUB_MR3             (DDR_PUB_BASE + 0x60)
+#define DDR_PUB_ODTCR           (DDR_PUB_BASE + 0x64)
+#define DDR_PUB_DTCR            (DDR_PUB_BASE + 0x68)
+#define DDR_PUB_DTAR0           (DDR_PUB_BASE + 0x6c)
+#define DDR_PUB_DTAR1           (DDR_PUB_BASE + 0x70)
+#define DDR_PUB_DTAR2           (DDR_PUB_BASE + 0x74)
+#define DDR_PUB_DTAR3           (DDR_PUB_BASE + 0x78)
+#define DDR_PUB_DTDR0           (DDR_PUB_BASE + 0x7c)
+#define DDR_PUB_DTDR1           (DDR_PUB_BASE + 0x80)
+#define DDR_PUB_DTEDR1          (DDR_PUB_BASE + 0x84)
+#define DDR_PUB_DTEDR0          (DDR_PUB_BASE + 0x88)
+#define DDR_PUB_PGCR2           (DDR_PUB_BASE + 0x8C)
+#define DDR_PUB_ZQ0CR0		(DDR_PUB_BASE + 0x180)
+#define DDR_PUB_ZQ0CR1		(DDR_PUB_BASE + 0x184)
+#define DDR_PUB_ZQ0SR0		(DDR_PUB_BASE + 0x188)
+#define DDR_PUB_ZQ0SR1		(DDR_PUB_BASE + 0x18C)
+#define DDR_PUB_DX0GCR          (DDR_PUB_BASE + 0x1C0)
+#define DDR_PUB_DX0GSR0         (DDR_PUB_BASE + 0x1C4)
+#define DDR_PUB_DX0GSR1		(DDR_PUB_BASE + 0x1C8)
+#define DDR_PUB_DX0BDLR0        (DDR_PUB_BASE + 0x1cc)
+#define DDR_PUB_DX0BDLR1        (DDR_PUB_BASE + 0x1d0)
+#define DDR_PUB_DX0BDLR2        (DDR_PUB_BASE + 0x1d4)
+#define DDR_PUB_DX0LCDLR0       (DDR_PUB_BASE + 0x1E0)
+#define DDR_PUB_DX0LCDLR1       (DDR_PUB_BASE + 0x1E4)
+#define DDR_PUB_DX0LCDLR2       (DDR_PUB_BASE + 0x1E8)
+#define DDR_PUB_DX1GCR          (DDR_PUB_BASE + 0x200)
+#define DDR_PUB_DX1GSR0         (DDR_PUB_BASE + 0x204)
+#define DDR_PUB_DX1BDLR0	(DDR_PUB_BASE + 0x20C)
+#define DDR_PUB_DX1BDLR1	(DDR_PUB_BASE + 0x210)
+#define DDR_PUB_DX1BDLR2	(DDR_PUB_BASE + 0x214)
+#define DDR_PUB_DX1LCDLR0       (DDR_PUB_BASE + 0x220)
+#define DDR_PUB_DX1LCDLR2       (DDR_PUB_BASE + 0x228)
+#define DDR_PUB_DX2GCR          (DDR_PUB_BASE + 0x240)
+#define DDR_PUB_DX2GSR0         (DDR_PUB_BASE + 0x244)
+#define DDR_PUB_DX2BDLR0        (DDR_PUB_BASE + 0x24c)
+#define DDR_PUB_DX2BDLR1        (DDR_PUB_BASE + 0x250)
+#define DDR_PUB_DX2BDLR2        (DDR_PUB_BASE + 0x254)
+#define DDR_PUB_DX2LCDLR0       (DDR_PUB_BASE + 0x260)
+#define DDR_PUB_DX2LCDLR1	(DDR_PUB_BASE + 0x264)
+#define DDR_PUB_DX2LCDLR2       (DDR_PUB_BASE + 0x268)
+#define DDR_PUB_DX3GCR          (DDR_PUB_BASE + 0x280)
+#define DDR_PUB_DX3GSR0         (DDR_PUB_BASE + 0x284)
+#define DDR_PUB_DX3BDLR0        (DDR_PUB_BASE + 0x28c)
+#define DDR_PUB_DX3BDLR1        (DDR_PUB_BASE + 0x290)
+#define DDR_PUB_DX3BDLR2        (DDR_PUB_BASE + 0x294)
+#define DDR_PUB_DX3BDLR3	(DDR_PUB_BASE + 0x298)
+#define DDR_PUB_DX3BDLR4	(DDR_PUB_BASE + 0x29C)
+#define DDR_PUB_DX3LCDLR0	(DDR_PUB_BASE + 0x2a0)
+#define DDR_PUB_DX3LCDLR1	(DDR_PUB_BASE + 0x2a4)
+#define DDR_PUB_DX3LCDLR2	(DDR_PUB_BASE + 0x2a8)
+
+/*
+ * Only for debug and need to have a define around these
+ * since adding these cause u-boot.bin addresses to be out
+ * of the address range of the .bss section in SRAM.
+ */
+#ifdef ENABLE_DDR_VERBOSE
+#define DDR_PUB_DX0BDLR3	(DDR_PUB_BASE + 0x1D8)
+#define DDR_PUB_DX0BDLR4	(DDR_PUB_BASE + 0x1DC)
+#define DDR_PUB_DX0GSR2		(DDR_PUB_BASE + 0x1F4)
+#define DDR_PUB_DX0MDLR		(DDR_PUB_BASE + 0x1EC)
+#define DDR_PUB_DX1GSR1		(DDR_PUB_BASE + 0x208)
+#define DDR_PUB_DX1BDLR3	(DDR_PUB_BASE + 0x218)
+#define DDR_PUB_DX1BDLR4	(DDR_PUB_BASE + 0x21C)
+#define DDR_PUB_DX1LCDLR1	(DDR_PUB_BASE + 0x224)
+#define DDR_PUB_DX1MDLR		(DDR_PUB_BASE + 0x22C)
+#define DDR_PUB_DX1GSR2		(DDR_PUB_BASE + 0x234)
+#define DDR_PUB_DX2GSR1		(DDR_PUB_BASE + 0x248)
+#define DDR_PUB_DX2BDLR3	(DDR_PUB_BASE + 0x258)
+#define DDR_PUB_DX2BDLR4	(DDR_PUB_BASE + 0x25C)
+#define DDR_PUB_DX2MDLR		(DDR_PUB_BASE + 0x26C)
+#define DDR_PUB_DX2GSR2		(DDR_PUB_BASE + 0x274)
+#define DDR_PUB_DX3GSR1		(DDR_PUB_BASE + 0x288)
+#define DDR_PUB_DX3MDLR		(DDR_PUB_BASE + 0x2aC)
+#define DDR_PUB_DX3GSR2		(DDR_PUB_BASE + 0x2b4)
+#endif
+
+#endif /* #ifdef TOPAZ_FPGA_UMCTL1 */
+
+#define SYS_CTL_ADDR                (0xe0000000)
+#define SYS_RST_MASK                (SYS_CTL_ADDR + 0x00)
+#define SYS_RST_VEC                 (SYS_CTL_ADDR + 0x04)
+#define SYS_CTL_MASK                (SYS_CTL_ADDR + 0x08)
+#define SYS_CTL_VEC                 (SYS_CTL_ADDR + 0x0c)
+#define SYS_RST_LH                  (0x00000001)
+#define SYS_RST_EBI                 (0x00000002)
+#define SYS_RST_DRAM                (0x00000004)
+#define SYS_RST_SRAM                (0x00000008)
+#define SYS_CTL_ODT_MASK            (0x3 << 8)
+#define SYS_CTL_ODT_OFF             (0x0 << 8)
+#define SYS_CTL_ODT_75_OHM          (0x1 << 8)
+#define SYS_CTL_ODT_150_OHM         (0x2 << 8)
+#define SYS_CTL_DDR_DRIVE_MASK      (BIT(7))
+#define SYS_CTL_DDR_DRIVE_HALF      (BIT(7))
+#define SYS_CTL_DDR_DRIVE_FULL      (0)
+#define REG_WRITE(x,y)              (*(volatile u32 *)(x) = (u32)(y))
+#define REG_READ(x)                 (*(volatile u32 *)(x))
+
+///////////////////////////////////////////////////////////////////////////////
+//             Function Declarations 
+///////////////////////////////////////////////////////////////////////////////
+int ddr_init(u32 mode,u32 speed,u32 size);
+u32 ddr_size(void);
+
+#endif //__DDR_H__
diff --git a/board/ruby/ddr_asic.h b/board/ruby/ddr_asic.h
new file mode 100644
index 0000000..2b5d37f
--- /dev/null
+++ b/board/ruby/ddr_asic.h
@@ -0,0 +1,57 @@
+/* DDR system configuration  */
+M_DDR_REG 0xe0000000 0x00000004
+M_DDR_REG 0xe0000004 0x00000004
+
+/* make sure we are in soft reset */
+M_DDR_REG 0xf6000000 0x00000200
+
+/* DDR speed */
+M_DDR_REG 0xe0000008 0x01c00180
+#if (RUBY_DDR_SPEED == 160)
+M_DDR_REG 0xe000000c 0x01000080
+M_DDR_REG 0xf6000004 0x00081027
+#elif (RUBY_DDR_SPEED == 200)
+M_DDR_REG 0xe000000c 0x00c00080
+M_DDR_REG 0xf6000004 0x00081030
+#elif (RUBY_DDR_SPEED == 250)
+M_DDR_REG 0xe000000c 0x00800080
+M_DDR_REG 0xf6000004 0x0008103c
+#elif (RUBY_DDR_SPEED == 320)
+M_DDR_REG 0xe000000c 0x00400080
+M_DDR_REG 0xf6000004 0x0008104e
+#elif (RUBY_DDR_SPEED == 400)
+M_DDR_REG 0xe000000c 0x00000080
+M_DDR_REG 0xf6000004 0x00081061
+#else
+#error RUBY_DDR_SPEED not supported
+#endif
+
+/* timing setup */
+M_DDR_REG 0xf6000048 0x00000000
+M_DDR_REG 0xf600002c 0x00000000
+M_DDR_REG 0xf6000030 0x00020b42
+M_DDR_REG 0xf6000058 0x0001ffff
+M_DDR_REG 0xf60000a4 0x10300800
+
+/* memory organization */
+#if RUBY_DDR_MICRON
+M_DDR_REG 0xf6000078 0x00004444
+M_DDR_REG 0xf600007c 0x3c3c3c3c
+M_DDR_REG 0xf600003c 0x00000777
+M_DDR_REG 0xf6000040 0xfff00000
+M_DDR_REG 0xf6000044 0x0fff3333
+#elif RUBY_DDR_ETRON
+M_DDR_REG 0xf6000078 0x00004343
+M_DDR_REG 0xf600007c 0x20202020
+M_DDR_REG 0xf600003c 0x00000f77
+M_DDR_REG 0xf6000040 0xfff00000
+M_DDR_REG 0xf6000044 0x0fff2222
+#else 
+#error no memory organization defined
+#endif
+
+#if RUBY_DDR_16BIT
+M_DDR_REG 0xf6000000 0x00000205
+#else
+M_DDR_REG 0xf6000000 0x00000201
+#endif
diff --git a/board/ruby/ddr_fpga.h b/board/ruby/ddr_fpga.h
new file mode 100644
index 0000000..df6bd5c
--- /dev/null
+++ b/board/ruby/ddr_fpga.h
@@ -0,0 +1,6 @@
+M_DDR_REG 0xf6000004 0x000c3009
+M_DDR_REG 0xf600003c 0x00000f88
+M_DDR_REG 0xf6000040 0xff000000
+M_DDR_REG 0xf6000044 0x0fff3333
+M_DDR_REG 0xf6000000 0x00000201
+
diff --git a/board/ruby/dsp.c b/board/ruby/dsp.c
new file mode 100644
index 0000000..adcf589
--- /dev/null
+++ b/board/ruby/dsp.c
@@ -0,0 +1,32 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "ruby.h"
+
+#ifdef CONFIG_CMD_UC
+
+#define UC_NAME(name)	dsp##name
+#define UC_PROMPT	"DSP"
+#include "uc.inl"
+
+#endif // #ifdef CONFIG_CMD_UC
+
diff --git a/board/ruby/dsp_start.S b/board/ruby/dsp_start.S
new file mode 100644
index 0000000..680303b
--- /dev/null
+++ b/board/ruby/dsp_start.S
@@ -0,0 +1,46 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "uc_start.inl"
+
+#ifdef CONFIG_CMD_UC
+
+	/* DSP code entry point. Code will be moved and so must be position-independent! */
+	.section .text
+	.align 4
+__dsp_start_begin:
+.globl __dsp_start_begin
+	/* Vectors */
+	j	1f
+.rept 15
+	j	2f
+.endr
+1:
+	UC_ENABLE_INTRS_DSP
+	UC_CODE dsp_entry_func
+2:
+	UC_EXCEPTIONS_ARC6 RUBY_SYS_CTL_L2D_INT
+__dsp_start_end:
+.globl __dsp_start_end
+
+#endif
+
diff --git a/board/ruby/flip.S b/board/ruby/flip.S
new file mode 100644
index 0000000..3b160aa
--- /dev/null
+++ b/board/ruby/flip.S
@@ -0,0 +1,94 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <config.h>
+#include <asm/arcregs.h>
+#include <asm/arch/platform.h>
+#include "start.inl"
+
+
+#if ((RUBY_MMAP_FLIP || TOPAZ_MMAP_UNIFIED)) && \
+		(defined(PIGGY_BUILD) || !defined(RUBY_MINI))
+
+ruby_flip_mmap:
+	.globl ruby_flip_mmap
+	/* Code must be position-independent! */
+
+	/*
+	* Flush and invalidate data cache.
+	* Please make sure that instructions which touch
+	* d-cache are NOT used until flipping is done.
+	*/
+	/* Set flush mode for invalidate operation */
+	lr      r1, [ARC_REG_DC_CTRL]
+	bset    r1, r1, 0x6
+	sr      r1, [ARC_REG_DC_CTRL]
+	/* Start invalidate operation */
+	mov     r1, 0x1
+	sr      r1, [ARC_REG_DC_IVDC]
+	/* Check while cache invalidating will be finished */
+dcache_flush_continue:
+	lr      r1, [ARC_REG_DC_CTRL]
+	and     r1, r1, ARC_DC_FLUSH_STATUS_BIT
+	brne    r1, 0x0, dcache_flush_continue
+
+	/* Prepare flipping.
+	 * After code is finished, memory maps will change as follows:
+	 *     Flip map:
+	 *         SRAM 0x8000_0000 -> 0x8800_0000
+	 *         DRAM 0x0         -> 0x8000_0000
+	 *     Unified map:
+	 *         SRAM 0x8000_0000 -> 0x9800_0000
+	 *         DRAM 0x0         -> 0x8000_0000
+	 */
+	mov     r1, RUBY_SYS_CTL_BASE_ADDR_NOMAP
+	mov     r2, FLIPBIT | RUBY_SYS_CTL_REMAP(0x3)
+	st.di   r2, [r1, RUBY_SYS_CTL_MASK - RUBY_SYS_CTL_BASE_ADDR]
+	mov     r2, FLIPBIT
+
+.align ARC_ICACHE_LINE_LEN
+	/* Do flipping.
+	* Align to cache line to ensure we don't hit memory during following instructions.
+	* Code must fit into 1 cache line (32 bytes).
+	*/
+	st.di   r2, [r1, RUBY_SYS_CTL_CTRL - RUBY_SYS_CTL_BASE_ADDR]
+	ld.di   r2, [r1, RUBY_SYS_CTL_CTRL - RUBY_SYS_CTL_BASE_ADDR] /* read back to clear pipeline */
+	sync
+	j       boot_continue		/* jump to absolute addr in sram */
+	/* Align to cache line so code occupy strictly 1 cache line. */
+.align ARC_ICACHE_LINE_LEN
+
+boot_continue:
+	/* Finalize flipping. */
+	mov     r2, 0x0
+	st.di   r2, [r1, RUBY_SYS_CTL_MASK - RUBY_SYS_CTL_BASE_ADDR]
+
+	/* Let's discard instruction cache.
+	*/
+	mov     r2, 0x1
+	sr      r2, [ARC_REG_IC_IVIC] /* invalidate i-cache */
+	lr      r2, [ARC_REG_IC_CTRL] /* read will be not completed until i-cache is invalidated */
+
+	/* Done. We are now sitting in different addresses. */
+	b	ruby_boot
+#endif /* RUBY_MMAP_FLIP  TOPAZ_MMAP_UNIFIED  PIGGY_BUILD RUBY_MINI*/
+
diff --git a/board/ruby/gpio.c b/board/ruby/gpio.c
new file mode 100644
index 0000000..3696b0c
--- /dev/null
+++ b/board/ruby/gpio.c
@@ -0,0 +1,66 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "ruby.h"
+
+#define writel_or(b, addr) writel(readl(addr) | (b), (addr))
+#define writel_and(b, addr) writel(readl(addr) & (b), (addr))
+
+inline static void gpio_set_mode(u32 reg, u32 offset, u32 cfg)
+{
+	u32 tmp = readl(reg);
+	tmp &= ~(0x3 << offset);
+	tmp |= (cfg << offset);
+	writel(tmp, reg);
+}
+
+inline static void gpio_config_pin(u32 pin, u32 cfg)
+{
+	if(pin < RUBY_GPIO_MODE1_MAX) {
+		gpio_set_mode(RUBY_GPIO_MODE1, pin * 2, cfg);
+	} else {
+		gpio_set_mode(RUBY_GPIO_MODE2, (pin - RUBY_GPIO_MODE1_MAX) * 2, cfg);
+	}
+}
+
+void gpio_config(u32 pin, u32 cfg)
+{
+	if(cfg >= RUBY_GPIO_ALT_INPUT) {
+		writel_or(RUBY_BIT(pin), RUBY_GPIO_AFSEL);
+	} else {
+		writel_and(~RUBY_BIT(pin), RUBY_GPIO_AFSEL);
+	}
+	gpio_config_pin(pin, cfg & 0x3);
+}
+
+void gpio_output(u32 pin, u32 state)
+{
+	writel(RUBY_BIT(pin), RUBY_GPIO_OMASK);
+	writel(state << pin, RUBY_GPIO_OUTPUT);
+	writel(0, RUBY_GPIO_OMASK);
+}
+
+u32 gpio_input(u32 pin)
+{
+	return ((readl(RUBY_GPIO_INPUT) >> pin) & 0x1);
+}
+
diff --git a/board/ruby/info.c b/board/ruby/info.c
new file mode 100644
index 0000000..08b2fc4
--- /dev/null
+++ b/board/ruby/info.c
@@ -0,0 +1,79 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "ruby.h"
+#include <ruby_version.h>
+#include <timestamp.h>
+
+static inline void board_dump_info(void)
+{
+#ifdef CONFIG_SHOW_BOOT_PROGRESS
+	unsigned tmp  = read_new_aux_reg(ARC_REG_DATA_UNCACHED);
+	printf("\nInfo: data uncached: addr=0x%x size=%uMB\n",
+		(tmp & 0xFF000000),
+		16U << ((tmp >> 8) & 0xFF));
+
+	printf("Info: text at 0x%x, stack at 0x%x(%u), heap at 0x%x(%u), uboot size %u\n",
+		(unsigned)TEXT_BASE,
+		(unsigned)CONFIG_ARC_STACK_BEGIN,
+		(unsigned)CONFIG_ARC_STACK_SIZE,
+		(unsigned)CONFIG_ARC_HEAP_BEGIN,
+		(unsigned)CONFIG_ARC_HEAP_SIZE,
+		(unsigned)(&__uboot_end - &__uboot_begin));
+
+	printf("Info: i-cache is %sabled\n", icache_status() ? "en" : "dis");
+	printf("Info: d-cache is %sabled\n", dcache_status() ? "en" : "dis");
+
+	printf("Info: CPU freq is %u, dev freq is %u\n",
+		(unsigned)RUBY_FIXED_CPU_CLK,
+		(unsigned)RUBY_FIXED_DEV_CLK);
+#endif // #ifdef CONFIG_SHOW_BOOT_PROGRESS
+	printf("\nInfo: Quantenna U-Boot version:%s\n",RUBY_UBOOT_VERSION);
+	printf("Info: build date '%s', time '%s'\n\n", U_BOOT_DATE, U_BOOT_TIME);
+}
+
+void board_check_build(void)
+{
+	/* Check that uboot is compiled with correct linker script. */
+	if(&__uboot_begin != (char*)CONFIG_ARC_TEXT_BEGIN) {
+		printf("\n*** ERROR: please modify linker script to place __uboot_begin at 0x%x ***\n\n",
+			(unsigned)CONFIG_ARC_TEXT_BEGIN);
+	}
+
+	/* Check that uboot is compiled with correct start address. */
+	if (TEXT_BASE != CONFIG_ARC_TEXT_BEGIN) {
+		printf("\n*** ERROR: please modify config.mk TEXT_BASE variable to be 0x%x ***\n\n",
+			(unsigned)CONFIG_ARC_TEXT_BEGIN);
+	}
+
+	/* Check that uboot text will be not overwritten by heap or stack. */
+	if(&__uboot_end > (char*)CONFIG_ARC_TEXT_END) {
+		printf("\n*** ERROR: uboot sections size is too big! ***\n\n");
+	}
+}
+
+void board_info_init(void)
+{
+	board_progress_init();
+	board_dump_info();
+}
+
diff --git a/board/ruby/intr.c b/board/ruby/intr.c
new file mode 100644
index 0000000..30dee44
--- /dev/null
+++ b/board/ruby/intr.c
@@ -0,0 +1,148 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
+#include "ruby.h"
+
+#ifndef CONFIG_CMD_INTR
+
+void board_intr_init(void)
+{
+}
+
+#else
+
+void board_intr_init(void)
+{
+	/* Symbol defined in linker script */
+	extern unsigned long __vectors_start;
+
+	/* Instruct CPU where vectors are placed */
+	write_new_aux_reg(ARC_REG_INTR_VEC_BASE, &__vectors_start);
+
+	/* Disable all interrupts */
+	write_new_aux_reg(ARC_REG_INTR_ENABLE, 0);
+}
+
+//-------------------------------------------------------
+
+#define read_ilink1() \
+	({ unsigned int __ret; \
+		__asm__ __volatile__("mov %0, ilink1" : "=r"(__ret));\
+		__ret; \
+	 })
+
+#define read_ilink2() \
+	({ unsigned int __ret; \
+		__asm__ __volatile__("mov %0, ilink2" : "=r"(__ret));\
+		__ret; \
+	})
+
+#define read_eret() \
+	({ unsigned int __ret; \
+		__asm__ __volatile__("lr %0, [eret]" : "=r"(__ret));\
+		__ret;\
+	})
+
+//-------------------------------------------------------
+
+static void intr_EV_do_reset(const char *descr)
+{
+	char s[128]; /* unfortunately uboot does not have snprintf(), so make sure buffer is big enough */
+	sprintf(s, "%s: ilink1=0x%x ilink2=0x%x eret=0x%x", descr, read_ilink1(), read_ilink2(), read_eret());
+	s[sizeof(s) - 1] = '\0';
+
+	board_reset(s);
+}
+
+void intr_EV_NotImpl(void)
+{
+	intr_EV_do_reset("EV_NotImpl");
+}
+
+void intr_EV_Reset(void)
+{
+	intr_EV_do_reset("EV_Reset");
+}
+
+void intr_EV_MemErr(void)
+{
+	intr_EV_do_reset("EV_MemErr");
+}
+
+void intr_EV_InstrErr(void)
+{
+	intr_EV_do_reset("EV_InstrErr");
+}
+
+void intr_EV_MachineCheck(void)
+{
+	intr_EV_do_reset("EV_MachineCheck");
+}
+
+void intr_EV_TLBMissI(void)
+{
+	intr_EV_do_reset("EV_TLBMissI");
+}
+
+void intr_EV_TLBMissD(void)
+{
+	intr_EV_do_reset("EV_TLBMissD");
+}
+
+void intr_EV_TLBProtV(void)
+{
+	intr_EV_do_reset("EV_TLBProtV");
+}
+
+void intr_EV_PrivilegeV(void)
+{
+	intr_EV_do_reset("EV_PrivilegeV");
+}
+
+void intr_EV_Trap(void)
+{
+	intr_EV_do_reset("EV_Trap");
+}
+
+void intr_EV_Extension(void)
+{
+	intr_EV_do_reset("EV_Extension");
+}
+
+static int do_xr_test(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+{
+	extern unsigned long read_xr(unsigned long reg);
+	unsigned long reg = simple_strtoul(argv[1], NULL, 0);
+	printf("Extended reg %lu 0x%lx = ", reg, reg);
+	printf("0x%lx\n", read_xr(reg));
+	return 0;
+}
+
+U_BOOT_CMD(xr, 2, 0, do_xr_test,
+		"Extended reg test",
+		"xr <reg> - get ext reg value and print. This will fault for non existant regsisters\n"
+);
+
+
+#endif // #ifndef CONFIG_CMD_INTR
+
diff --git a/board/ruby/muc.c b/board/ruby/muc.c
new file mode 100644
index 0000000..71d98e2
--- /dev/null
+++ b/board/ruby/muc.c
@@ -0,0 +1,32 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "ruby.h"
+
+#ifdef CONFIG_CMD_UC
+
+#define UC_NAME(name)	muc##name
+#define UC_PROMPT	"MuC"
+#include "uc.inl"
+
+#endif // #ifdef CONFIG_CMD_UC
+
diff --git a/board/ruby/muc_start.S b/board/ruby/muc_start.S
new file mode 100644
index 0000000..1a9faef
--- /dev/null
+++ b/board/ruby/muc_start.S
@@ -0,0 +1,46 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "uc_start.inl"
+
+#ifdef CONFIG_CMD_UC
+
+	/* MuC code entry point. Code will be moved and so must be position-independent! */
+	.section .text
+	.align 4
+__muc_start_begin:
+.globl __muc_start_begin
+	/* Vectors */
+	j	1f
+.rept 31
+	j	2f
+.endr
+1:
+	UC_ENABLE_INTRS_MUC
+	UC_CODE muc_entry_func
+2:
+	UC_EXCEPTIONS_ARC7 RUBY_SYS_CTL_L2M_INT
+__muc_start_end:
+.globl __muc_start_end
+
+#endif
+
diff --git a/board/ruby/newlib_asm.h b/board/ruby/newlib_asm.h
new file mode 100644
index 0000000..e1f5c23
--- /dev/null
+++ b/board/ruby/newlib_asm.h
@@ -0,0 +1,33 @@
+#ifndef ARC_NEWLIB_ASM_H
+#define ARC_NEWLIB_ASM_H
+
+/* Copyright (C) 2007, 2008 ARC International (UK) LTD */
+
+/* Code was copied from ARC GCC toolchain, ucLibc packet (GPL) */
+
+#define _ENTRY(name) \
+	.text ` .balign 4 ` .globl name ` name:
+#define FUNC(name)         .type name,@function
+#define ENDFUNC0(name) .Lfe_##X##name: .size name,.Lfe_##name-name
+#define ENDFUNC(name) ENDFUNC0(name)
+#define ENTRY(name) _ENTRY(name) ` FUNC(name)
+
+#define add_l	add
+#define bcc_l	bcc
+#define beq_l	beq
+#define bic_l	bic
+#define b_l	b
+#define bne_l	bne
+#define breq_l	breq
+#define brne_l	brne
+#define j_l	j
+#define ldb_l	ldb
+#define ld_l	ld
+#define mov_l	mov
+#define or_l	or
+#define sub_l	sub
+#define tst_l	tst
+
+#define bcc_s	bhs_s
+
+#endif /* ARC_NEWLIB_ASM_H */
diff --git a/board/ruby/newlib_io_copy.S b/board/ruby/newlib_io_copy.S
new file mode 100644
index 0000000..e795aa8
--- /dev/null
+++ b/board/ruby/newlib_io_copy.S
@@ -0,0 +1,177 @@
+/* Code was copied from ARC GCC toolchain, ucLibc packet (GPL), memcpy.S.
+ * The only changes done - access to h/w bypass cache.
+ * Why memcpy-700.S was not used - it looks can load same memory address twice,
+ * which is bad for me.
+ */
+
+#include "newlib_asm.h"
+
+/*
+ * void* io_copy_from(void *dest, const void *src, size_t n);
+ * Access to 'src' bypass cache.
+ * Function is suitable for copy data from IO-mapped device.
+ * Function:
+ *    - use byte,word-length operations to load/store data
+ *    - use subsequent addresses when copy (do not walk back)
+ *    - only load operations used for 'src'
+ *    - only store operations used for 'dst'
+ */
+ENTRY(io_copy_from)
+	
+;;;  if count of copies is zero
+	mov.f  lp_count,r2
+	jz.d   [blink]
+	or	r4,r0,r1
+
+	and.f   0,r4,3 		;  check if 4 byte aligned
+#ifndef __A4__ 
+	bnz.d	@copy_bytewise_from
+	lsr	r4,r2,3		;  calculate length in words
+#else
+	bnz.d	@copy_bytewise_from
+	lsr	r4,r2
+	lsr	r4,r4
+	lsr	r4,r4
+#endif	
+
+	;;  Now both pointers are
+	;;  4 bytes aligned.
+	;;
+	lsr.f	lp_count,r4
+	
+	sub	r1,r1,4
+	sub	r3,r0,4
+	lpnz	@copy16bytes_from
+	ld.a.di	r4,[r1,4]
+	ld.a.di	r5,[r1,4]
+	ld.a.di	r6,[r1,4]
+	ld.a.di	r7,[r1,4]
+	st.a	r4,[r3,4]
+	st.a	r5,[r3,4]
+	st.a	r6,[r3,4]
+	st.a	r7,[r3,4]
+copy16bytes_from:		
+	
+	bcs.d	@remainder8bytes_from
+	and.f	0,r2,4
+#ifdef __A4__
+	nop
+#endif
+	bnz.d	@copy4bytes_from
+	
+memcpytill1_from:
+	and.f	lp_count, r2, 3
+memcpy1_from:		
+	add	r1,r1,3
+	jz	[blink]
+	add	r3,r3,3
+	lp	@end_loop_from
+	ldb.a.di	r4,[r1,1]
+	stb.a	r4,[r3,1]
+end_loop_from:	
+	j	[blink]	
+			
+remainder8bytes_from:
+	ld.a.di	r4,[r1,4]
+	ld.a.di	r5,[r1,4]
+	st.a	r4,[r3,4]
+	bz.d	@memcpytill1_from
+	st.a	r5,[r3,4]
+	and.f	lp_count,r2,3
+	
+copy4bytes_from:	
+	ld.a.di	r4,[r1,4]
+	b.d	@memcpy1_from
+	st.a	r4,[r3,4]
+
+copy_bytewise_from:
+	sub	r1,r1,1
+	sub	r3,r0,1
+	lp	@.end_bytes_from
+	ldb.a.di	r4,[r1,1]
+	stb.a	r4,[r3,1]
+.end_bytes_from:
+	j	[blink]
+ENDFUNC(io_copy_from)
+
+/*
+ * void* io_copy_to(void *dest, const void *src, size_t n);
+ * Similar to io_copy_from, but here access to 'dest' bypass cache.
+ */
+ENTRY(io_copy_to)
+	
+;;;  if count of copies is zero
+	mov.f  lp_count,r2
+	jz.d   [blink]
+	or	r4,r0,r1
+
+	and.f   0,r4,3 		;  check if 4 byte aligned
+#ifndef __A4__ 
+	bnz.d	@copy_bytewise_to
+	lsr	r4,r2,3		;  calculate length in words
+#else
+	bnz.d	@copy_bytewise_to
+	lsr	r4,r2
+	lsr	r4,r4
+	lsr	r4,r4
+#endif	
+
+	;;  Now both pointers are
+	;;  4 bytes aligned.
+	;;
+	lsr.f	lp_count,r4
+	
+	sub	r1,r1,4
+	sub	r3,r0,4
+	lpnz	@copy16bytes_to
+	ld.a	r4,[r1,4]
+	ld.a	r5,[r1,4]
+	ld.a	r6,[r1,4]
+	ld.a	r7,[r1,4]
+	st.a.di	r4,[r3,4]
+	st.a.di	r5,[r3,4]
+	st.a.di	r6,[r3,4]
+	st.a.di	r7,[r3,4]
+copy16bytes_to:		
+	
+	bcs.d	@remainder8bytes_to
+	and.f	0,r2,4
+#ifdef __A4__
+	nop
+#endif
+	bnz.d	@copy4bytes_to
+	
+memcpytill1_to:
+	and.f	lp_count, r2, 3
+memcpy1_to:		
+	add	r1,r1,3
+	jz	[blink]
+	add	r3,r3,3
+	lp	@end_loop_to
+	ldb.a	r4,[r1,1]
+	stb.a.di	r4,[r3,1]
+end_loop_to:	
+	j	[blink]	
+			
+remainder8bytes_to:
+	ld.a	r4,[r1,4]
+	ld.a	r5,[r1,4]
+	st.a.di	r4,[r3,4]
+	bz.d	@memcpytill1_to
+	st.a.di	r5,[r3,4]
+	and.f	lp_count,r2,3
+	
+copy4bytes_to:	
+	ld.a	r4,[r1,4]
+	b.d	@memcpy1_to
+	st.a.di	r4,[r3,4]
+
+copy_bytewise_to:
+	sub	r1,r1,1
+	sub	r3,r0,1
+	lp	@.end_bytes_to
+	ldb.a	r4,[r1,1]
+	stb.a.di	r4,[r3,1]
+.end_bytes_to:
+	j	[blink]
+ENDFUNC(io_copy_to)
diff --git a/board/ruby/newlib_memcmp.S b/board/ruby/newlib_memcmp.S
new file mode 100644
index 0000000..6effc43
--- /dev/null
+++ b/board/ruby/newlib_memcmp.S
@@ -0,0 +1,156 @@
+/* Copyright (C) 2007 ARC International (UK) LTD */
+
+/* Code was copied from ARC GCC toolchain, ucLibc packet (GPL) */
+
+#include "newlib_asm.h"
+
+#ifdef __LITTLE_ENDIAN__
+#define WORD2 r2
+#define SHIFT r3
+#else /* BIG ENDIAN */
+#define WORD2 r3
+#define SHIFT r2
+#endif
+
+ENTRY(memcmp)
+	or	r12,r0,r1
+	asl_s	r12,r12,30
+#ifdef __ARC700__
+	sub_l	r3,r2,1
+	brls	r2,r12,.Lbytewise
+#else
+	brls.d	r2,r12,.Lbytewise
+	sub_s	r3,r2,1
+#endif
+	ld	r4,[r0,0]
+	ld	r5,[r1,0]
+	lsr.f	lp_count,r3,3
+	lpne	.Loop_end
+	ld_s	WORD2,[r0,4]
+	ld_s	r12,[r1,4]
+	brne	r4,r5,.Leven
+	ld.a	r4,[r0,8]
+	ld.a	r5,[r1,8]
+	brne	WORD2,r12,.Lodd
+.Loop_end:
+	asl_s	SHIFT,SHIFT,3
+	bcc_s	.Last_cmp
+	brne	r4,r5,.Leven
+	ld	r4,[r0,4]
+	ld	r5,[r1,4]
+#ifdef __LITTLE_ENDIAN__
+#ifdef __ARC700__
+	nop_s
+	; one more load latency cycle
+.Last_cmp:
+	xor	r0,r4,r5
+	bset	r0,r0,SHIFT
+	sub_s	r1,r0,1
+	bic_s	r1,r1,r0
+	norm	r1,r1
+	b.d	.Leven_cmp
+	and	r1,r1,24
+.Leven:
+	xor	r0,r4,r5
+	sub_s	r1,r0,1
+	bic_s	r1,r1,r0
+	norm	r1,r1
+	; slow track insn
+	and	r1,r1,24
+.Leven_cmp:
+	asl	r2,r4,r1
+	asl	r12,r5,r1
+	lsr_s	r2,r2,1
+	lsr_s	r12,r12,1
+	j_s.d	[blink]
+	sub	r0,r2,r12
+	.balign	4
+.Lodd:
+	xor	r0,WORD2,r12
+	sub_s	r1,r0,1
+	bic_s	r1,r1,r0
+	norm	r1,r1
+	; slow track insn
+	and	r1,r1,24
+	asl_s	r2,r2,r1
+	asl_s	r12,r12,r1
+	lsr_s	r2,r2,1
+	lsr_s	r12,r12,1
+	j_s.d	[blink]
+	sub	r0,r2,r12
+#else /* !__ARC700__ */
+	.balign	4
+.Last_cmp:
+	xor	r0,r4,r5
+	b.d	.Leven_cmp
+	bset	r0,r0,SHIFT
+.Lodd:
+	mov_s	r4,WORD2
+	mov_s	r5,r12
+.Leven:
+	xor	r0,r4,r5
+.Leven_cmp:
+	mov_s	r1,0x80808080
+	; uses long immediate
+	sub_s	r12,r0,1
+	bic_s	r0,r0,r12
+	sub	r0,r1,r0
+	xor_s	r0,r0,r1
+	and	r1,r5,r0
+	and	r0,r4,r0
+	xor.f	0,r0,r1
+	sub_s	r0,r0,r1
+	j_s.d	[blink]
+	mov.mi	r0,r1
+#endif /* !__ARC700__ */
+#else /* BIG ENDIAN */
+.Last_cmp:
+	neg_s	SHIFT,SHIFT
+	lsr	r4,r4,SHIFT
+	lsr	r5,r5,SHIFT
+	; slow track insn
+.Leven:
+	sub.f	r0,r4,r5
+	mov.ne	r0,1
+	j_s.d	[blink]
+	bset.cs	r0,r0,31
+.Lodd:
+	cmp_s	WORD2,r12
+#ifdef __ARC700__
+	mov_s	r0,1
+	j_s.d	[blink]
+	bset.cs	r0,r0,31
+#else /* !__ARC700__ */
+	j_s.d	[blink]
+	rrc	r0,2
+#endif /* !__ARC700__ */
+#endif /* ENDIAN */
+	.balign	4
+.Lbytewise:
+	breq	r2,0,.Lnil
+	ldb	r4,[r0,0]
+	ldb	r5,[r1,0]
+	lsr.f	lp_count,r3
+	lpne	.Lbyte_end
+	ldb_s	r3,[r0,1]
+	ldb_l	r12,[r1,1]
+	brne	r4,r5,.Lbyte_even
+	ldb.a	r4,[r0,2]
+	ldb.a	r5,[r1,2]
+	brne	r3,r12,.Lbyte_odd
+.Lbyte_end:
+	bcc_l	.Lbyte_even
+	brne	r4,r5,.Lbyte_even
+	ldb_s	r3,[r0,1]
+	ldb_s	r12,[r1,1]
+.Lbyte_odd:
+	j_s.d	[blink]
+	sub	r0,r3,r12
+.Lbyte_even:
+	j_s.d	[blink]
+	sub	r0,r4,r5
+.Lnil:
+	j_s.d	[blink]
+	mov_l	r0,0
+ENDFUNC(memcmp)
+
diff --git a/board/ruby/newlib_memcpy-700.S b/board/ruby/newlib_memcpy-700.S
new file mode 100644
index 0000000..18c80b4
--- /dev/null
+++ b/board/ruby/newlib_memcpy-700.S
@@ -0,0 +1,70 @@
+/* Copyright (C) 2007 ARC International (UK) LTD */
+
+/* Code was copied from ARC GCC toolchain, ucLibc packet (GPL) */
+
+#include "newlib_asm.h"
+
+#ifndef __A4__ /* Mostly optimized for ARC700,
+		  but not bad for ARC600 either.  */
+/* This memcpy implementation does not support objects of 1GB or larger -
+   the check for alignment does not work then.  */
+/* We assume that most sources and destinations are aligned, and
+   that also lengths are mostly a multiple of four, although to a lesser
+   extent.  */
+ENTRY(memcpy)
+	or	r3,r0,r1
+	asl_s	r3,r3,30
+	mov_s	r5,r0
+	brls.d	r2,r3,.Lcopy_bytewise
+	sub.f	r3,r2,1
+	ld_s	r12,[r1,0]
+	asr.f	lp_count,r3,3
+	bbit0.d	r3,2,.Lnox4
+	bmsk_s	r2,r2,1
+	st.ab	r12,[r5,4]
+	ld.a	r12,[r1,4]
+.Lnox4:
+	lppnz	.Lendloop
+	ld_s	r3,[r1,4]
+	st.ab	r12,[r5,4]
+	ld.a	r12,[r1,8]
+	st.ab	r3,[r5,4]
+.Lendloop:
+	breq_l	r2,0,.Last_store
+	ld	r3,[r5,0]
+#ifdef __LITTLE_ENDIAN__
+	add3	r2,-1,r2
+	; uses long immediate
+	xor_s	r12,r12,r3
+	bmsk	r12,r12,r2
+        xor_s	r12,r12,r3
+#else /* BIG ENDIAN */
+	sub3	r2,31,r2
+	; uses long immediate
+        xor_s	r3,r3,r12
+        bmsk	r3,r3,r2
+        xor_s	r12,r12,r3
+#endif /* ENDIAN */
+.Last_store:
+	j_s.d	[blink]
+	st	r12,[r5,0]
+
+	.balign	4
+.Lcopy_bytewise:
+	jcs	[blink]
+	ldb_s	r12,[r1,0]
+	lsr.f	lp_count,r3
+	bcc_s	.Lnox1
+	stb.ab	r12,[r5,1]
+	ldb.a	r12,[r1,1]
+.Lnox1:
+	lppnz	.Lendbloop
+	ldb_s	r3,[r1,1]
+	stb.ab	r12,[r5,1]
+	ldb.a	r12,[r1,2]
+	stb.ab	r3,[r5,1]
+.Lendbloop:
+	j_s.d	[blink]
+	stb	r12,[r5,0]
+ENDFUNC(memcpy)
+#endif /* !__A4__ */
diff --git a/board/ruby/newlib_memset.S b/board/ruby/newlib_memset.S
new file mode 100644
index 0000000..2c49f35
--- /dev/null
+++ b/board/ruby/newlib_memset.S
@@ -0,0 +1,88 @@
+/* Copyright (C) 2007 ARC International (UK) LTD */
+
+/* Code was copied from ARC GCC toolchain, ucLibc packet (GPL) */
+
+#include "newlib_asm.h"
+
+#ifndef __A4__
+
+#define SMALL	7 /* Must be at least 6 to deal with alignment/loop issues.  */
+
+ENTRY(memset)
+#ifndef	__ARC700__
+#undef SMALL
+#define SMALL 8 /* Even faster if aligned.  */
+	brls.d	r2,SMALL,.Ltiny
+#endif
+	mov_s	r4,r0
+	or	r12,r0,r2
+	bmsk.f	r12,r12,1
+	extb_s	r1,r1
+	asl	r3,r1,8
+	beq.d	.Laligned
+	or_s	r1,r1,r3
+#ifdef __ARC700__
+	brls	r2,SMALL,.Ltiny
+#endif
+	add	r3,r2,r0
+	stb	r1,[r3,-1]
+	bclr_s	r3,r3,0
+	stw	r1,[r3,-2]
+	bmsk.f	r12,r0,1
+	add_s	r2,r2,r12
+	sub.ne	r2,r2,4
+	stb.ab	r1,[r4,1]
+	and	r4,r4,-2
+	stw.ab	r1,[r4,2]
+	and	r4,r4,-4
+.Laligned:	; This code address should be aligned for speed.
+#ifdef __ARC700__
+	asl	r3,r1,16
+	lsr.f	lp_count,r2,2
+	or_s	r1,r1,r3
+	lpne	.Loop_end
+	st.ab	r1,[r4,4]
+.Loop_end:
+	j_s	[blink]
+#else /* !__ARC700 */
+	lsr.f	lp_count,r2,3
+	asl	r3,r1,16
+	or_s	r1,r1,r3
+	lpne	.Loop_end
+	st.ab	r1,[r4,4]
+	st.ab	r1,[r4,4]
+.Loop_end:
+	sub.cc	r4,r4,4
+	j_s.d	[blink]
+	st	r1,[r4]
+#endif /* !__ARC700 */
+
+#ifdef __ARC700__
+	.balign	4
+.Ltiny:
+	mov.f	lp_count,r2
+	lpne	.Ltiny_end
+	stb.ab	r1,[r4,1]
+.Ltiny_end:
+	j_s	[blink]
+#else /* !__ARC700__ */
+#if SMALL > 8
+FIXME
+#endif
+	.balign	4
+	stb_s	r1,[r0,7]
+	stb_s	r1,[r0,6]
+	stb_s	r1,[r0,5]
+	stb_s	r1,[r0,4]
+	stb_s	r1,[r0,3]
+	stb_s	r1,[r0,2]
+	stb_s	r1,[r0,1]
+	stb_s	r1,[r0]
+	.endr
+	j_s	[blink]
+.Ltiny:	; must be misaligned - so that we hit the j_s [blink] for zero bytes!
+	sub1	r3,pcl,r2
+	j_s	[r3]
+#endif /* !__ARC700 */
+ENDFUNC(memset)
+#endif /* !__A4__ */
diff --git a/board/ruby/pcie.c b/board/ruby/pcie.c
new file mode 100755
index 0000000..c128d38
--- /dev/null
+++ b/board/ruby/pcie.c
@@ -0,0 +1,993 @@
+/*
+ * (C) Copyright 2011 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * Header file which describes Ruby PCI Express specific functions.
+ */
+
+
+#include <common.h>
+#include <command.h>
+#include <asm/arch/platform.h>
+#include <environment.h>
+#include "ruby.h"
+#include "ruby_pcie_bda.h"
+#include "pcie.h"
+#include "ddr.h"
+#include "malloc.h"
+#include "spi_flash.h"
+
+#define BUFSIZE 256
+#define ENV_STAGE2	"stage2"
+
+/*
+ * for End Point mode
+ * Allocate and setup BAR mapping for shared memory
+ */
+static int32_t setup_atu_shmem(void)
+{
+	uint32_t val = 0x0;
+
+	/* Select shared mem region */
+	writel(PCIE_SHMEM_REGION, RUBY_PCIE_ATU_VIEW);
+
+	/* Bar mapped area in EP */
+	writel(PCIE_BAR_SHMEM_LO, RUBY_PCIE_ATU_TARGET_LO);
+	writel(PCIE_BAR_SHMEM_HI, RUBY_PCIE_ATU_TARGET_HI);
+
+	/* Set BAR size to EP memory */
+	writel(PCIE_BAR_SHMEM_LEN, RUBY_PCIE_ATU_BASE_LIMIT);
+
+	/* Define region of type memory */
+	writel(PCIE_ATU_MEMREGION, RUBY_PCIE_ATU_CTL1);
+
+	/* Enable BAR mapped region */
+	writel(PCIE_SHMEM_ENABLE, RUBY_PCIE_ATU_CTL2);
+	val = readl(RUBY_PCIE_ATU_CTL2);
+	printf("PCIe Shmem BAR%u=0x%x Len:%uk\n", PCIE_BAR_SHMEM,
+		(unsigned int)PCIE_BAR_SHMEM_LO, (PCIE_BAR_SHMEM_LEN >> 10) + 1);
+
+	return 0;
+}
+
+/*
+ * for End Point mode
+ * Allocate and setup BAR mapping for syscontrol
+ */
+static int32_t setup_atu_sysctl(void)
+{
+	uint32_t val = 0x0;
+
+	/* Select shared mem region */
+	writel(PCIE_SYSCTL_REGION, RUBY_PCIE_ATU_VIEW);
+
+	/* Bar mapped area in EP */
+	writel(PCIE_BAR_SYSCTL_LO, RUBY_PCIE_ATU_TARGET_LO);
+	writel(PCIE_BAR_SYSCTL_HI, RUBY_PCIE_ATU_TARGET_HI);
+
+	/* Set size */
+	writel(PCIE_BAR_SYSCTL_LEN, RUBY_PCIE_ATU_BASE_LIMIT);
+
+	/* Define region of type memory */
+	writel(PCIE_ATU_MEMREGION, RUBY_PCIE_ATU_CTL1);
+
+	/* Enable BAR mapped region */
+	writel(PCIE_SYSCTL_ENABLE, RUBY_PCIE_ATU_CTL2);
+	val = readl(RUBY_PCIE_ATU_CTL2);
+
+	printf("PCIe Sysctl BAR%u=0x%x Len:%uk\n", PCIE_BAR_SYSCTL,
+		PCIE_BAR_SYSCTL_LO, ( PCIE_BAR_SYSCTL_LEN >> 10) + 1);
+
+	return 0;
+}
+
+/*
+ * for End Point mode
+ * Allocate and setup BAR mapping for PCIe DMA registers
+ */
+static int32_t setup_atu_dma(void)
+{
+	uint32_t val = 0x0;
+
+	/* Select dma register region */
+	writel(PCIE_DMAREG_REGION, RUBY_PCIE_ATU_VIEW);
+
+	/* Bar mapped area in EP */
+	writel(PCIE_BAR_DMAREG_LO, RUBY_PCIE_ATU_TARGET_LO);
+	writel(PCIE_BAR_DMAREG_HI, RUBY_PCIE_ATU_TARGET_HI);
+
+	/* Set size */
+	writel(PCIE_BAR_DMAREG_LEN, RUBY_PCIE_ATU_BASE_LIMIT);
+
+	/* Define region of type memory */
+	writel(PCIE_ATU_MEMREGION, RUBY_PCIE_ATU_CTL1);
+
+	/* Enable BAR mapped region */
+	writel(PCIE_DMAREG_ENABLE, RUBY_PCIE_ATU_CTL2);
+	val = readl(RUBY_PCIE_ATU_CTL2);
+
+	printf("PCIe DMA BAR%u=0x%x Len:%uk\n", PCIE_BAR_DMAREG,
+		PCIE_BAR_DMAREG_LO, ( PCIE_BAR_DMAREG_LEN >> 10) + 1);
+
+	return 0;
+}
+
+/*
+ * for End Point mode *
+ * map the host memory to target
+ */
+static int32_t setup_atu_host(volatile qdpc_pcie_bda_t *bda)
+{
+	uint32_t host_mem_start = PCIE_HOSTMEM_EP_START_LO - readl(&bda->bda_dma_offset);
+	uint32_t val = 0x0;
+
+	/* Select shared mem region */
+	writel(PCIE_HOSTMEM_REGION, RUBY_PCIE_ATU_VIEW);
+
+	/* Memory mapped area in EP )*/
+	writel(PCIE_HOSTMEM_EP_START_LO, RUBY_PCIE_ATU_BASE_LO);
+	writel(PCIE_HOSTMEM_EP_START_HI, RUBY_PCIE_ATU_BASE_HI);
+
+	/* Memory mapped area in Host*/
+	writel(host_mem_start, RUBY_PCIE_ATU_TARGET_LO);
+	writel(PCIE_HOSTMEM_START_HI, RUBY_PCIE_ATU_TARGET_HI);
+
+	/* Set size */
+	writel(PCIE_HOSTMEM_EP_END, RUBY_PCIE_ATU_BASE_LIMIT);
+
+	/* Define region of type memory */
+	writel(PCIE_ATU_MEMREGION, RUBY_PCIE_ATU_CTL1);
+
+	/* Enable BAR mapped region */
+	writel(PCIE_HOSTMEM_REGION_ENABLE, RUBY_PCIE_ATU_CTL2);
+	val = readl(RUBY_PCIE_ATU_CTL2);
+	printf("%u:Mem: EP(0x%x->0x%x) Host(0x%x->0x%x)\n", PCIE_HOSTMEM_REGION,
+		PCIE_HOSTMEM_EP_START, PCIE_HOSTMEM_EP_END,
+		host_mem_start, host_mem_start + PCIE_HOSTMEM_DMA_MASK);
+
+	return 0;
+}
+
+/*
+ * for End Point mode *
+ * map the host buffer descriptor to target
+ * need to finish the mapping after linux bootup
+ */
+static int32_t setup_atu_hostbd_early(void)
+{
+	/* Select shared mem region */
+	writel(PCIE_HOSTBD_REGION, RUBY_PCIE_ATU_VIEW);
+
+	/* Memory mapped area in EP )*/
+	writel(PCIE_HOSTBD_EP_START_LO, RUBY_PCIE_ATU_BASE_LO);
+	writel(PCIE_HOSTBD_EP_START_HI, RUBY_PCIE_ATU_BASE_HI);
+
+	/* Set size */
+	writel(PCIE_HOSTBD_EP_END, RUBY_PCIE_ATU_BASE_LIMIT);
+
+	/* Define region of type memory */
+	writel(PCIE_ATU_MEMREGION, RUBY_PCIE_ATU_CTL1);
+
+	printf("%u:BD: EP(0x%x->0x%x) Host(dynamic alloc in RC)\n", PCIE_HOSTBD_REGION,
+		PCIE_HOSTBD_EP_START_LO,PCIE_HOSTBD_EP_END);
+
+	return 0;
+}
+
+/*
+ * for End Point mode
+ * Setup 64KB region ATU for target to access host msi register
+ */
+static int setup_atu_msi(volatile qdpc_pcie_bda_t *bda)
+{
+	uint16_t flag = 0;
+	uint32_t msi_addr = 0x0;
+	uint32_t msi_addr_up = 0x0;
+	uint32_t val = 0x0;
+	uint32_t msi64 = 0;
+
+	flag = readl(PCIE_MSI_CAP) >> 16;
+	msi_addr = readl(PCIE_MSI_LOW_ADDR);
+	msi64 = (flag & MSI_64_EN);
+
+	/* Exit if MSI is not enabled */
+	if (!(flag & MSI_EN)) {
+		printf("PCIe Legacy Interrupt Support\n");
+		return 1;
+	}
+
+	printf("PCIe MSI Interrupt Support\n");
+	printf("%s: msi_addr=%08x\n", __func__, msi_addr);
+
+	arc_write_uncached_32(&bda->bda_flags,PCIE_BDA_MSI| arc_read_uncached_32(&bda->bda_flags));
+
+	/* Enable ATU viewport */
+	writel(PCIE_MSI_REGION, RUBY_PCIE_ATU_VIEW);
+
+	/* mapped region area in EP */
+	writel(PCIE_MSI_EP_START_LO, RUBY_PCIE_ATU_BASE_LO);
+	writel(PCIE_MSI_EP_START_HI, RUBY_PCIE_ATU_BASE_HI);
+
+	writel(PCIE_MSI_EP_END, RUBY_PCIE_ATU_BASE_LIMIT);
+
+	/* Set host side msi addr */
+	writel(PCIE_MSI_ADDR_ALIGN(msi_addr), RUBY_PCIE_ATU_TARGET_LO);
+	if (msi64) {
+		msi_addr_up = readl(PCIE_MSI_HIG_ADDR);
+		writel(msi_addr_up, RUBY_PCIE_ATU_TARGET_HI);
+	} else {
+		writel(0x00000000, RUBY_PCIE_ATU_TARGET_HI);
+	}
+
+	/* Setup EP MSI address */
+	arc_write_uncached_32(&bda->bda_msi_addr,PCIE_MSI_EP_START_LO + PCIE_MSI_ADDR_OFFSET(msi_addr));
+
+	/* Define region of type memory */
+	writel(PCIE_ATU_MEMREGION, RUBY_PCIE_ATU_CTL1);
+
+	/* Enable region */
+	writel(PCIE_MSI_REGION_ENABLE, RUBY_PCIE_ATU_CTL2);
+	val = readl(RUBY_PCIE_ATU_CTL2);
+
+	printf("%u:MSI%s: Host:0x%x%x EP:0x%x\n",PCIE_MSI_REGION, (msi64) ? "64" : "",
+		msi_addr_up, msi_addr, bda->bda_msi_addr);
+
+	return 0;
+}
+
+/*
+ * for End Point mode
+ */
+void setup_atu_outbound(volatile qdpc_pcie_bda_t *bda)
+{
+	setup_atu_msi(bda);
+	setup_atu_host(bda);
+	setup_atu_hostbd_early();
+
+	arc_write_uncached_32(&bda->bda_dma_mask, PCIE_HOSTMEM_DMA_MASK);
+}
+
+/*
+ * for End Point mode
+ */
+static void setup_atu_inbound(void)
+{
+	setup_atu_shmem();
+	setup_atu_sysctl();
+	setup_atu_dma();
+}
+
+static void setup_pcie_capability(void)
+{
+	uint32_t *prev_cap = (uint32_t *)PCIE_CAP_PTR;
+	uint32_t *curr_cap = NULL;
+	uint32_t prev_val, curr_val;
+	uint8_t prev_shift = 0, curr_shift;
+	uint8_t prev_cap_offset;
+	uint8_t curr_cap_offset;
+	uint8_t curr_cap_id;
+	const char *val;
+
+	val = getenv("msi");
+	if ( val == NULL || val[0] != '0')
+		return;
+
+	do {
+		prev_val = readl(prev_cap);
+		prev_cap_offset = ((prev_val >> prev_shift) & 0xff);
+
+		curr_shift = 8;
+		curr_cap = (uint32_t *)(PCIE_BASE_ADDRESS + prev_cap_offset);
+		curr_val = readl(curr_cap);
+		curr_cap_id = (uint8_t)(curr_val & 0xff);
+		curr_cap_offset = (uint8_t)((curr_val >> curr_shift) & 0xff);
+
+		if (curr_cap_id == 0x05) {
+			writel((curr_cap_offset << prev_shift), prev_cap);
+			printf("PCIe disabling MSI capability\n");
+			break;
+		}
+
+		prev_cap = curr_cap;
+		prev_shift = curr_shift;
+	} while (curr_cap_offset != 0);
+}
+
+static int bootpoll(volatile qdpc_pcie_bda_t *bda, uint32_t state)
+{
+	while (arc_read_uncached_32(&bda->bda_bootstate) != state)
+	{
+		if (arc_read_uncached_32(&bda->bda_flags) & PCIE_BDA_ERROR_MASK)
+			return -1;
+		udelay(1000);
+	}
+	return 0;
+}
+
+static void set_bootstate(volatile qdpc_pcie_bda_t *bda, uint32_t state)
+{
+	arc_write_uncached_32(&bda->bda_bootstate, state);
+}
+
+static void booterror(volatile qdpc_pcie_bda_t *bda)
+{
+	if (PCIE_BDA_HOST_NOFW_ERR & arc_read_uncached_32(&bda->bda_flags))
+		printf("There is no firmware in host file system!\n");
+	else if (PCIE_BDA_HOST_MEMALLOC_ERR & arc_read_uncached_32(&bda->bda_flags))
+		printf("Host alloc memory block for firmware download failed!\n");
+	else if (PCIE_BDA_HOST_MEMMAP_ERR & arc_read_uncached_32(&bda->bda_flags))
+		printf("Host do dma map for share memory block failed!\n");
+	else
+		printf("Other error found in host side , bda flag: 0x%x!\n", bda->bda_flags);
+}
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+static void set_tiny_mtdparts(unsigned long linux_safety_size, unsigned long linux_live_size)
+{
+	char mtdparts[BUFSIZE];
+
+	sprintf(mtdparts, "spi_flash:"
+		"%dk(" MTD_PARTNAME_UBOOT_TINY_BIN "),"
+		"%dk(" MTD_PARTNAME_UBOOT_ENV "),"
+		"%dk(" MTD_PARTNAME_UBOOT_ENV_BAK "),"
+		"%luk(" MTD_PARTNAME_LINUX_SAFETY "),"
+		"%luk(" MTD_PARTNAME_LINUX_LIVE "),"
+		"%dk(" MTD_PARTNAME_UBOOT_SAFETY "),"
+		"%dk(" MTD_PARTNAME_UBOOT_LIVE "),"
+		"-(" MTD_PARTNAME_DATA ")",
+
+		UBOOT_TINY_TEXT_PARTITION_SIZE / 1024,
+		UBOOT_ENV_PARTITION_SIZE / 1024,
+		UBOOT_ENV_PARTITION_SIZE / 1024,
+		linux_safety_size / 1024,
+		linux_live_size / 1024,
+		UBOOT_TEXT_PARTITION_SIZE / 1024,
+		UBOOT_TEXT_PARTITION_SIZE / 1024
+		);
+
+	setenv("mtdparts", mtdparts);
+}
+
+static int prepare_tiny_bootargs(void)
+{
+	set_tiny_mtdparts(TINY_CFG_SIZE_16M_FLASH_1_IMG / 2, TINY_CFG_SIZE_16M_FLASH_1_IMG / 2);
+
+	return 0;
+}
+
+static void set_tiny_bootargs(void)
+{
+	RUN("setenv bootargs ${bootargs} mtdparts=${mtdparts}");
+}
+
+/*
+ * for End Point mode
+ */
+int do_flash_boot (volatile qdpc_pcie_bda_t *bda)
+{
+	unsigned long live_addr = 0;
+	unsigned long live_size = 0;
+	const unsigned long mem_addr = QTNBOOT_COPY_DRAM_ADDR;
+	char *live_addr_str = getenv (LIVE_IMG_ADDR_ARG);
+	char *live_size_str = getenv (LIVE_IMG_SIZE_ARG);
+	char *stage2_str = getenv(ENV_STAGE2);
+	unsigned long is_stage2 = stage2_str ? simple_strtoul(stage2_str, NULL, 10) : 0;
+
+	if (is_stage2 && prepare_tiny_bootargs())
+		return -1;
+
+	printf("do flash boot\n");
+	set_bootstate(bda, QDPC_BDA_FW_FLASH_BOOT);
+	if (live_addr_str && live_size_str) {
+		live_addr = simple_strtoul(live_addr_str, NULL, 0);
+		live_size = simple_strtoul(live_size_str, NULL, 0);
+	} else {
+		printf("Variables: %s %s must be set\n",
+		       LIVE_IMG_ADDR_ARG,
+		       LIVE_IMG_SIZE_ARG);
+		arc_write_uncached_32(&bda->bda_flags, PCIE_BDA_TARGET_FBOOT_ERR | arc_read_uncached_32(&bda->bda_flags));
+		return 1;
+	}
+
+	if (is_stage2)
+		set_tiny_bootargs();
+
+	/* attempt to load the live image into memory and boot it. */
+	RUN("spi_flash read 0x%08lx 0x%08lx 0x%08lx", live_addr, mem_addr, live_size);
+	RUN("bootm 0x%08lx", mem_addr);
+
+	/* never gets to here */
+	arc_write_uncached_32(&bda->bda_flags, PCIE_BDA_TARGET_FBOOT_ERR | arc_read_uncached_32(&bda->bda_flags));
+	printf("flash boot error!\n");
+	return 0;
+}
+#endif
+
+/*
+ * for End Point mode
+ */
+
+static int pci_endian_detect(volatile qdpc_pcie_bda_t *bda)
+{
+	uint32_t pci_endian;
+
+	while (readl(&bda->bda_pci_pre_status) != QDPC_PCI_ENDIAN_VALID_STATUS)
+		udelay(1000);
+
+	pci_endian = readl(&bda->bda_pci_endian);
+	if (pci_endian == QDPC_PCI_ENDIAN_DETECT_DATA) {
+		printf("PCI memory region is little endian\n");
+		writel(QDPC_PCI_LITTLE_ENDIAN, &bda->bda_pci_endian);
+	} else if (pci_endian == QDPC_PCI_ENDIAN_REVERSE_DATA) {
+		printf("PCI memory region is big endian\n");
+		writel(QDPC_PCI_BIG_ENDIAN, &bda->bda_pci_endian);
+	} else {
+		printf("PCI memory endian value:%08x is invalid - using little endian\n", pci_endian);
+		writel(QDPC_PCI_LITTLE_ENDIAN, &bda->bda_pci_endian);
+	}
+	writel(QDPC_PCI_ENDIAN_VALID_STATUS, &bda->bda_pci_post_status);
+
+	return 0;
+}
+
+static int host_mem_start_address_detect(volatile qdpc_pcie_bda_t *bda)
+{
+	while ((readl(&bda->bda_dma_offset) & PCIE_DMA_OFFSET_ERROR_MASK) == PCIE_DMA_OFFSET_ERROR)
+		udelay(1000);
+
+	printf("Host memory start address is 0x%08x\n",
+		PCIE_HOSTMEM_EP_START_LO - readl(&bda->bda_dma_offset));
+
+	return 0;
+}
+
+static void pcie_dma_read(void *dar, void *sar, u32 size, u8 ch)
+{
+#define EDMA_TIMEOUT	100000
+	uint32_t tmp = 0;
+	int i;
+
+	writel(0x00000001, PCIE_DMA_RD_ENABLE);
+	writel(0x00000000, PCIE_DMA_RD_INTMASK);
+	writel(0x80000000, PCIE_DMA_CHNL_CONTEXT);
+	writel(0x04000008, PCIE_DMA_CHNL_CNTRL);
+	writel(size, PCIE_DMA_XFR_SIZE);
+	writel(sar, PCIE_DMA_SAR_LOW);
+	writel(0x00000000, PCIE_DMA_SAR_HIGH);
+	writel(dar, PCIE_DMA_DAR_LOW);
+	writel(0x00000000, PCIE_DMA_DAR_HIGH);
+	writel(0x00000000, PCIE_DMA_RD_DOORBELL);
+
+	for (i = 0; i < EDMA_TIMEOUT; i++) {
+		udelay(1);
+		tmp = readl(PCIE_DMA_RD_INTSTS);
+		if (tmp & PCIE_DMA_RD_DONE_STS(ch)) {
+			printf("done\n");
+			break;
+		}
+
+		if (tmp & PCIE_DMA_RD_ABORT_STS(ch)) {
+			printf("Error: eDMA abort\n");
+			break;
+		}
+
+	}
+
+	if (i == EDMA_TIMEOUT)
+		printf("Error: eDMA timeout\n");
+
+	writel(PCIE_DMA_RD_DONE_STS_CLR(ch), PCIE_DMA_RD_INTCLER);
+}
+
+int do_pcieboot(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	volatile qdpc_pcie_bda_t *bda = (qdpc_pcie_bda_t *)(RUBY_PCIE_BDA_ADDR);
+	uint32_t size, i=0;
+	void  *srcaddr;
+#ifdef TOPAZ_EP_MINI_UBOOT
+	extern unsigned long load_addr;
+	void *start = (void *)load_addr;
+#else
+	void *start = (void *)PCIE_FW_LZMA_LOAD;
+	char *s = NULL;
+	char *local_args[2];
+	char load_addr[16];
+	char *stage2_str = getenv(ENV_STAGE2);
+	unsigned long is_stage2 = stage2_str ? simple_strtoul(stage2_str, NULL, 10) : 0;
+#endif
+	void *dstaddr = start;
+	unsigned int tmp;
+	uint8_t ch = 0;
+	extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+	if (is_stage2 && prepare_tiny_bootargs())
+		return -1;
+#endif
+	set_bootstate(bda, QDPC_BDA_PCIE_RDY);
+
+	printf("Waiting for handshake start\n");
+	if (pci_endian_detect(bda)) {
+		printf("PCI memory endian detect failed\n");
+	}
+
+	/*
+	 * workaround to fix tag clock issue by switching from Gen1 to Gen2
+	 *  two dummy read
+	 */
+	tmp = readl(0xcfff0000);
+	tmp = readl(0xcfff0000);
+
+	if (host_mem_start_address_detect(bda)) {
+		printf("Host memory start address detect failed\n");
+	}
+
+#ifdef TOPAZ_EP_MINI_UBOOT
+	tmp = arc_read_uncached_32(&bda->bda_flags);
+	arc_write_uncached_32(&bda->bda_flags, PCIE_BDA_XMIT_UBOOT | tmp);
+#else
+	/* set the flash_present flag if env indicate we have firmware in flash */
+	s = getenv("flash_img");
+	if (s && (*s == '1')) {
+		tmp = arc_read_uncached_32(&bda->bda_flags);
+		arc_write_uncached_32(&bda->bda_flags, PCIE_BDA_FLASH_PRESENT | tmp);
+	}
+
+	/*
+	 * workaround to fix tag clock issue by switching from Gen1 to Gen2
+	 * switch Gen2 from Gen1 here in full u-boot.bin for revB
+	 */
+	writel(PCIE_LINK_GEN2, PCIE_LINK_CTL2);
+
+#endif
+	/* Wait for host ready */
+	bootpoll(bda, QDPC_BDA_FW_HOST_RDY);
+
+	setup_atu_outbound(bda);
+	set_bootstate(bda,QDPC_BDA_FW_TARGET_RDY);
+	bootpoll(bda, QDPC_BDA_FW_TARGET_BOOT);
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+	/* boot from flash */
+	if (PCIE_BDA_FLASH_BOOT & arc_read_uncached_32((void *)&bda->bda_flags)) {
+		do_flash_boot(bda);
+		return 0;
+	}
+#endif
+	set_bootstate(bda,QDPC_BDA_FW_LOAD_RDY);
+
+	printf("Ready to load firmware....\n");
+	if (bootpoll(bda, QDPC_BDA_FW_HOST_LOAD)) {
+		booterror(bda);
+		return -1;
+	}
+	set_bootstate(bda, QDPC_BDA_FW_EP_RDY);
+
+	bootpoll(bda, QDPC_BDA_FW_BLOCK_RDY);
+
+	srcaddr = (void *)arc_read_uncached_32(&bda->bda_img);
+	size = arc_read_uncached_32(&bda->bda_img_size);
+
+	dcache_disable();
+
+	/* Keep loading until we see a zero sized block */
+	i = 0;
+	while (srcaddr && size) {
+		printf("PCIe Load FW[%u] 0x%x->0x%x Sz:%u...\n", i++, (uint32_t)srcaddr, (uint32_t)dstaddr, size);
+
+		pcie_dma_read((void *)virt_to_bus(dstaddr), srcaddr, size, ch);
+		/* Block done, inform host */
+		set_bootstate(bda, QDPC_BDA_FW_BLOCK_DONE);
+
+		/* Wait for next block */
+		bootpoll(bda, QDPC_BDA_FW_BLOCK_RDY);
+		srcaddr = (void *)arc_read_uncached_32(&bda->bda_img);
+		dstaddr += size;
+		size = arc_read_uncached_32(&bda->bda_img_size);
+	}
+
+	printf("PCIe Gen: %x\n", PCIE_LINK_MODE(readl(PCIE_LINK_STAT)));
+
+	/* Invalidate i-cache */
+	invalidate_icache_range((int)start, (int)(dstaddr - 1));
+
+	/* Acknowledge the last zero sized block */
+	set_bootstate(bda, QDPC_BDA_FW_BLOCK_DONE);
+
+	/* Wait for bootload end message */
+	bootpoll(bda, QDPC_BDA_FW_BLOCK_END);
+
+	/* Tell host we are done */
+	set_bootstate(bda, QDPC_BDA_FW_LOAD_DONE);
+
+#ifdef TOPAZ_EP_MINI_UBOOT
+	extern char warm_boot;
+	extern char _start;
+	tmp = arc_read_uncached_32(&bda->bda_flags);
+	tmp &= ~(PCIE_BDA_XMIT_UBOOT);
+	arc_write_uncached_32(&bda->bda_flags, tmp);
+	/* warm boot up the full u-boot */
+	start += (&warm_boot - &_start);
+	printf("Go to address %p\n", start);
+	((void (*)(void))start)();
+#else
+	dcache_enable();
+	sprintf(load_addr,"0x%08lx", (unsigned long)start);
+	local_args[0] = argv[0];
+	local_args[1] = load_addr;
+
+	if (is_stage2)
+		set_tiny_bootargs();
+
+	printf("PCIe Loadaddr:%s\n",load_addr);
+	do_bootm(cmdtp, 0 , 2 ,local_args);
+#endif
+	/*
+	 * it never reaches this pointer if boot successfully, otherwise it fails to run img
+	 */
+	set_bootstate(bda, QDPC_BDA_FW_LOAD_FAIL);
+	tmp = arc_read_uncached_32(&bda->bda_flags);
+	arc_write_uncached_32(&bda->bda_flags, PCIE_BDA_TARGET_FWLOAD_ERR | tmp);
+
+	return 1;
+}
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+static int on_off (const char *s)
+{
+	if (strcmp(s, "on") == 0) {
+		return (1);
+	} else if (strcmp(s, "off") == 0) {
+		return (0);
+	}
+	return (-1);
+};
+
+static void msi_enable(void)
+{
+	ulong var=0;
+	var = readl(PCIE_MSI_CAP);
+	writel(var|RUBY_PCIE_MSI_ENABLE, PCIE_MSI_CAP);
+	printf("msi enabled\n");
+}
+
+static void msi_disable(void)
+{
+	ulong var=0;
+	var = readl(PCIE_MSI_CAP);
+	writel(var&~RUBY_PCIE_MSI_ENABLE, PCIE_MSI_CAP);
+	printf("msi disabled\n");
+}
+
+/*
+ * for End Point mode
+ */
+static int msi_config (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	switch (argc) {
+	case 2:			/* on / off	*/
+		switch (on_off(argv[1])) {
+		case 1:
+			msi_enable();
+			break;
+		case 0:
+			msi_disable();
+			break;
+		default: cmd_usage(cmdtp);
+			return 1;
+		}
+		break;
+	case 1:			/* default on	*/
+		msi_enable();
+		break;
+	default: cmd_usage(cmdtp);
+		return 1;
+	}
+	return 0;
+}
+
+
+/*
+ * Exported functions - visible outside of this module
+ */
+
+/* enable or disable MSI */
+U_BOOT_CMD(
+	msi_cfg,   2,   1,     msi_config,
+	"enable or disable msi",
+	"[on, off]\n"
+	"    - enable or disable msi with cmd msi_cfg [on, off]\n"
+);
+
+/* pcieboot */
+U_BOOT_CMD(pcieboot,CONFIG_SYS_MAXARGS, 0, do_pcieboot,
+		"boot from pcie.  Waits for host to load memory and then calls bootm",
+		NULL);
+#endif
+
+/*
+ * maybe move this later, for now we just need to remove pcie reset and set link
+ * flags will be used to do any back door init we might require
+ */
+void pcie_ep_init(size_t memsz, uint32_t flags)
+{
+	volatile qdpc_pcie_bda_t *bda = (qdpc_pcie_bda_t *)(RUBY_PCIE_BDA_ADDR);
+
+	/* Zero out boot data area */
+	memset((void *)bda, 0, RUBY_PCIE_BDA_SIZE);
+	/*
+	 * Flush BDA zero to concret memory before any
+	 * update to it
+	 */
+	flush_and_inv_dcache_range((unsigned long)bda,
+			(unsigned long)bda + RUBY_PCIE_BDA_SIZE);
+	arc_write_uncached_32(&bda->bda_flags, QDPC_PCIE_BDA_VERSION << 4);
+
+	/*
+	 * Set dma offset to PCIE_HOSTMEM_EP_START_LO, and mask to a invalid value.
+	 * The dma offset will be reset by root complex.
+	 */
+	arc_write_uncached_32(&bda->bda_dma_offset, PCIE_HOSTMEM_EP_START_LO | PCIE_DMA_OFFSET_ERROR);
+
+	set_bootstate(bda, QDPC_BDA_PCIE_INIT);
+
+	/* Setup ATU Inbound BAR mappings*/
+	setup_atu_inbound();
+}
+
+void pcie_ep_early_config(void)
+{
+	uint32_t i = 0;
+	uint32_t bar64 = PCIE_CFG_BAR64;
+
+	/* Enable DMA Read Channel */
+	REG_WRITE(PCIE_DMA_RD_ENABLE, 0x00000001);
+	REG_WRITE(PCIE_DMA_RD_CHWTLOW,0x000001FF);
+	REG_WRITE(PCIE_DMA_RD_CHWTHIG,0x00000000);
+
+	/* Enable DMA write channel */
+	REG_WRITE(PCIE_DMA_WR_ENABLE, 0x00000001);
+	REG_WRITE(PCIE_DMA_WR_CHWTLOW,0x000001FF);
+	REG_WRITE(PCIE_DMA_WR_CHWTHIG,0x00000000);
+
+	/* Disable all BARs */
+	for (i = 0 ; i < RUBY_PCIE_BAR_NUM; i++)
+	{
+		writel(1, RUBY_PCIE_BAR_MASK(i));
+		writel(0x0, RUBY_PCIE_BAR_MASK(i));
+	}
+
+	/* Disable expansion ROM */
+	writel(1, PCIE_ROM_MASK_ADDR);
+	writel(0x0, PCIE_ROM_MASK_ADDR);
+
+	/* Setup Sysctl BAR */
+	writel(1, RUBY_PCIE_BAR_MASK(PCIE_BAR_SYSCTL));
+	writel(PCIE_BAR_SYSCTL_LEN, RUBY_PCIE_BAR_MASK(PCIE_BAR_SYSCTL));
+	writel(PCIE_BAR_CFG(bar64), RUBY_PCIE_BAR(PCIE_BAR_SYSCTL));
+
+	/* Setup Shared memory BAR  */
+	writel(1, RUBY_PCIE_BAR_MASK(PCIE_BAR_SHMEM));
+	writel(PCIE_BAR_SHMEM_LEN, RUBY_PCIE_BAR_MASK(PCIE_BAR_SHMEM));
+	writel(PCIE_BAR_CFG(bar64), RUBY_PCIE_BAR(PCIE_BAR_SHMEM));
+
+	/* Setup PCIE DMA register BAR  */
+	writel(1, RUBY_PCIE_BAR_MASK(PCIE_BAR_DMAREG));
+	writel(PCIE_BAR_DMAREG_LEN, RUBY_PCIE_BAR_MASK(PCIE_BAR_DMAREG));
+	writel(PCIE_BAR_CFG(bar64), RUBY_PCIE_BAR(PCIE_BAR_DMAREG));
+
+	/* Setup PCIe capability structures */
+	setup_pcie_capability();
+
+	/*
+	 * workaround to fix tag clock issue by switching from Gen1 to Gen2
+	 * Init PCIe link as Gen1 mode
+	 */
+	if ((readl(RUBY_SYS_CTL_CSR) & 0xff) == TOPAZ_BOARD_REVB)
+		writel(PCIE_LINK_GEN1, PCIE_LINK_CTL2);
+
+	writel(0x00010020, PCIE_PORT_LINK_CTL);
+	writel(PCIE_CFG0_DEFAULT_VALUE, RUBY_SYS_CTL_PCIE_CFG0);
+	writel(0x00000001, RUBY_SYS_CTL_PCIE_CFG1);
+	writel(0x00000000, RUBY_SYS_CTL_PCIE_CFG2);
+	writel(0x45220000, RUBY_SYS_CTL_PCIE_CFG3);
+	writel(0x00100007, PCIE_CMDSTS);
+
+	writel(0xf << 22, RUBY_SYS_CTL_PCIE_SLV_REQ_MISC_INFO);
+}
+
+int pcie_linkup_check(void)
+{
+	uint32_t loop_timeout = 0;
+	char *loop_timeout_str = NULL;
+	int i;
+#define PCIE_LINK_TIMEOUT	(65536)
+	printf("Polling for PCIe link up: ");
+
+	/*
+	 * Set uboot environment variable max_link_poll to a large value
+	 * if you want to skip timeout mechanism
+	 */
+	loop_timeout_str = getenv("max_link_poll");
+	if (loop_timeout_str)
+		loop_timeout = simple_strtoul(loop_timeout_str, NULL, 16);
+	else
+		loop_timeout = PCIE_LINK_TIMEOUT;
+
+	for (i = 0; i < loop_timeout; i++) {
+		if ((readl(TOPAZ_PCIE_STAT) & TOPAZ_PCIE_LINKUP) == TOPAZ_PCIE_LINKUP)
+			break;
+
+		udelay(10); /* Delay. */
+	}
+
+	if (i >= loop_timeout) {
+		printf("Timeout. Polling threshold: %d\n", loop_timeout);
+		printf("Fails to establish PCIe link: link stat: addr: 0x%08x val: 0x%08x\n",\
+			 TOPAZ_PCIE_STAT, readl(TOPAZ_PCIE_STAT));
+		return -1;
+	} else {
+		printf("Established\n");
+		return 0;
+	}
+}
+
+void pcie_reset(void)
+{
+	printf("Reset PCIe link\n");
+
+	writel(RUBY_SYS_CTL_RESET_IOSS|RUBY_SYS_CTL_RESET_PCIE,RUBY_SYS_CTL_CPU_VEC_MASK);
+	writel(0,RUBY_SYS_CTL_CPU_VEC);
+	udelay(10);
+	writel(RUBY_SYS_CTL_RESET_IOSS|RUBY_SYS_CTL_RESET_PCIE,RUBY_SYS_CTL_CPU_VEC);
+}
+
+void pcie_ep_early_init(uint32_t flags)
+{
+	char *val;
+	int force_pcie_reset = 1;
+	int i = 0;
+#define PCIE_RELINK_TIMES	(5)
+
+	val = getenv("disable_pcie");
+	if ((val != NULL) && (val[0] != '0')) {
+		return;
+	}
+
+	if (flags & PCIE_RC_MODE) {
+		return;
+	}
+
+	val = getenv("bypass_first_pcie_reset");
+	if ((val != NULL) && (val[0] == '1'))
+		force_pcie_reset = 0;
+
+	do {
+		if (i != 0 || (i == 0 && force_pcie_reset == 1))
+			pcie_reset();
+
+		pcie_ep_early_config();
+
+		if (pcie_linkup_check() == 0)
+			break;
+
+		i++;
+	} while (i < PCIE_RELINK_TIMES);
+
+	if (i == PCIE_RELINK_TIMES)
+		printf("Error: Failed to establish PCIE link after %d retries\n", i - 1);
+}
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+void pci_rc_reset_ep(void)
+{
+	/* Set GPIO 13 to output mode   */
+	gpio_config(13, GPIO_MODE_OUTPUT);
+	gpio_output(13, 1);
+	udelay(10);
+	/* Reset EP by write 0 to data register */
+	gpio_output(13, 0);
+	/* Keep Reset signal 10 ms */
+	udelay(10000);
+	gpio_output(13, 1);
+}
+#endif
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+/*
+ * init for root complex mode
+ */
+void pcie_rc_init(void)
+{
+
+	pci_rc_reset_ep();
+
+	/* set as RC mode */
+	writel(SYS_RST_PCIE|SYS_RST_IOSS, RUBY_SYS_CTL_CPU_VEC_MASK);
+	writel(SYS_RST_PCIE|SYS_RST_IOSS, RUBY_SYS_CTL_CPU_VEC);
+
+	writel(0x00010020, PCIE_PORT_LINK_CTL);
+	writel(PCIE_CFG0_DEFAULT_VALUE | PCIE_CFG_RC_MODE, RUBY_SYS_CTL_PCIE_CFG0);
+	writel(0x00000001, RUBY_SYS_CTL_PCIE_CFG1);
+	writel(0x00000000, RUBY_SYS_CTL_PCIE_CFG2);
+	writel(0x45220000, RUBY_SYS_CTL_PCIE_CFG3);
+	writel(0x00100007, PCIE_CMDSTS);
+	writel(0xf << 22, RUBY_SYS_CTL_PCIE_SLV_REQ_MISC_INFO);
+
+	/* Enable DMA Read Channel */
+	REG_WRITE(PCIE_DMA_RD_ENABLE, 0x00000001);
+	REG_WRITE(PCIE_DMA_RD_CHWTLOW, 0x000001FF);
+	REG_WRITE(PCIE_DMA_RD_CHWTHIG, 0x00000000);
+
+	/* Enable DMA write channel */
+	REG_WRITE(PCIE_DMA_WR_ENABLE, 0x00000001);
+	REG_WRITE(PCIE_DMA_WR_CHWTLOW, 0x000001FF);
+	REG_WRITE(PCIE_DMA_WR_CHWTHIG, 0x00000000);
+
+	/* pci config space map: Define outbound region-0 that maps PCIE slave region to PCI config space */
+	writel(RUBY_PCIE_ATU_OB_REGION(0), RUBY_PCIE_ATU_VIEW);
+	writel(RUBY_PCIE_CONFIG_REGION, RUBY_PCIE_ATU_BASE_LO);
+	writel(0x00000000, RUBY_PCIE_ATU_BASE_HI);
+	writel(RUBY_PCIE_CONFIG_REGION + (RUBY_PCI_RC_CFG_SIZE - 1), RUBY_PCIE_ATU_BASE_LIMIT );
+	writel(0x00000000, RUBY_PCIE_ATU_TARGET_LO);
+	writel(0, RUBY_PCIE_ATU_TARGET_HI);
+	writel(4, RUBY_PCIE_ATU_CTL1);
+	writel(RUBY_PCIE_ATU_OB_ENABLE|RUBY_PCIE_ATU_CFG_SHIFT, RUBY_PCIE_ATU_CTL2);
+
+	/* pci memory space map: Define outbound region-1 that maps PCIE slave region to PCI mem space */
+	writel(RUBY_PCIE_ATU_OB_REGION(1), RUBY_PCIE_ATU_VIEW);
+	writel(RUBY_PCI_RC_MEM_START, RUBY_PCIE_ATU_BASE_LO);
+	writel(0x00000000, RUBY_PCIE_ATU_BASE_HI);
+	writel(RUBY_PCI_RC_MEM_START + (RUBY_PCI_RC_MEM_WINDOW - 1), RUBY_PCIE_ATU_BASE_LIMIT );
+	writel(0xc0000000, RUBY_PCIE_ATU_TARGET_LO);
+	writel(0, RUBY_PCIE_ATU_TARGET_HI);
+	writel(0, RUBY_PCIE_ATU_CTL1);
+	writel(RUBY_PCIE_ATU_OB_ENABLE, RUBY_PCIE_ATU_CTL2);
+
+	/* pci access enable */
+	//writel(RUBY_PCI_RC_MEM_START, RUBY_PCIE_BAR(0));
+	writel(PCIE_MEM_EN | PCIE_IO_EN | PCIE_BUS_MASTER_EN, RUBY_PCIE_CMD_REG);
+}
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
+void board_pcie_init(size_t memsz, uint32_t flags )
+{
+	char *val;
+
+	if (flags & PCIE_RC_MODE) {
+#ifdef TOPAZ_EP_MINI_UBOOT
+		printf("Doesn't support RC mode in mini u-boot\n");
+#else
+		printf("init board as PCIe Root Complex mode\n");
+		pcie_rc_init();
+#endif
+
+	} else {
+		val = getenv("disable_pcie");
+
+		if (val == NULL || val[0] == '0') {
+			printf("init board as PCIe End Point mode\n");
+			pcie_ep_init(memsz, 0);
+		}
+	}
+}
+
diff --git a/board/ruby/pcie.h b/board/ruby/pcie.h
new file mode 100755
index 0000000..ed7ca87
--- /dev/null
+++ b/board/ruby/pcie.h
@@ -0,0 +1,198 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#define PCIE_REGION_BASE		0x00000000
+#define PCIE_REGION_END			0xCFFFFFFF
+
+#define PCIE_CFG_MSI			1
+#define PCIE_CFG_BAR64			0
+
+#define PCIE_ROM_MASK_ADDR		0xE9001030
+
+#define	PCIE_BAR_32			0
+#define	PCIE_BAR_64			(RUBY_BIT(2))
+#define	PCIE_BAR_PREFETCH		(RUBY_BIT(3))
+#define	PCIE_BAR_CFG(bar64)		(PCIE_BAR_PREFETCH | ((bar64) ? PCIE_BAR_64 : PCIE_BAR_32))
+#define PCIE_BAR_ATU_MIN_SIZE		(0x10000)
+
+#define	PCIE_BAR_SYSCTL			0
+#define	PCIE_BAR_SYSCTL_LEN		0xFFFF
+#define	PCIE_BAR_SYSCTL_LO		0xE0000000
+#define	PCIE_BAR_SYSCTL_HI		0x00000000
+
+#define	PCIE_BAR_SHMEM			2
+#define	PCIE_BAR_SHMEM_LEN		(PCIE_BAR_ATU_MIN_SIZE - 1)
+#define	PCIE_BAR_SHMEM_LO		(virt_to_bus((void *)RUBY_PCIE_BDA_ADDR))
+#define	PCIE_BAR_SHMEM_HI		0x00000000
+
+#define	PCIE_BAR_DMAREG			3
+#define	PCIE_BAR_DMAREG_LEN		0xFFFF
+#define	PCIE_BAR_DMAREG_LO		0xE9000000
+#define	PCIE_BAR_DMAREG_HI		0x00000000
+
+#define PCIE_QUANTENNA_BBIC3		(0x00081bb5)
+#define PCIE_BASE_ADDRESS		(0xe9000000)
+#define PCIE_CMDSTS			(PCIE_BASE_ADDRESS + 0x04)
+#define PCIE_CAP_PTR			(PCIE_BASE_ADDRESS + 0x34)
+#define PCIE_GEN2_CTL			(PCIE_BASE_ADDRESS + 0x80C)
+#define PCIE_ATU_VIEWPORT		(PCIE_BASE_ADDRESS + 0x900)
+#define PCIE_ATU_CTRL1			(PCIE_ATU_VIEWPORT + 0x04)
+#define PCIE_ATU_CTRL2			(PCIE_ATU_VIEWPORT + 0x08)
+#define PCIE_ATU_BASE_LOW		(PCIE_ATU_VIEWPORT + 0x0C)
+#define PCIE_ATU_BASE_HIGH		(PCIE_ATU_VIEWPORT + 0x10)
+#define PCIE_ATU_BASE_LIMIT		(PCIE_ATU_VIEWPORT + 0x14)
+#define PCIE_ATU_TGT_LOW		(PCIE_ATU_VIEWPORT + 0x18)
+#define PCIE_ATU_TGT_HIGH		(PCIE_ATU_VIEWPORT + 0x1C)
+
+#define PCIE_DMA_BASE			(PCIE_BASE_ADDRESS + 0x970)
+#define PCIE_DMA_WR_ENABLE		(PCIE_BASE_ADDRESS + 0x97C)
+#define PCIE_DMA_WR_DOORBELL		(PCIE_BASE_ADDRESS + 0x980)
+#define PCIE_DMA_WR_CHWTLOW		(PCIE_BASE_ADDRESS + 0x988)
+#define PCIE_DMA_WR_CHWTHIG		(PCIE_BASE_ADDRESS + 0x98C)
+#define PCIE_DMA_RD_ENABLE		(PCIE_BASE_ADDRESS + 0x99C)
+#define PCIE_DMA_RD_DOORBELL		(PCIE_BASE_ADDRESS + 0x9A0)
+#define PCIE_DMA_RD_CHWTLOW		(PCIE_BASE_ADDRESS + 0x9A8)
+#define PCIE_DMA_RD_CHWTHIG		(PCIE_BASE_ADDRESS + 0x9AC)
+#define PCIE_DMA_WR_INTSTS		(PCIE_BASE_ADDRESS + 0x9BC)
+#define PCIE_DMA_WR_INTMASK		(PCIE_BASE_ADDRESS + 0x9C4)
+#define PCIE_DMA_WR_INTCLER		(PCIE_BASE_ADDRESS + 0x9C8)
+#define PCIE_DMA_RD_INTSTS		(PCIE_BASE_ADDRESS + 0xA10)
+#define PCIE_DMA_RD_INTMASK		(PCIE_BASE_ADDRESS + 0xA18)
+#define PCIE_DMA_RD_INTCLER		(PCIE_BASE_ADDRESS + 0xA1C)
+#define	PCIE_DMA_RD_INT_ERR_STS_LO	(PCIE_BASE_ADDRESS + 0xA24)
+#define	PCIE_DMA_RD_INT_ERR_STS_HI	(PCIE_BASE_ADDRESS + 0xA28)
+#define	PCIE_DMA_CHNL_CONTEXT		(PCIE_BASE_ADDRESS + 0xA6C)
+#define PCIE_DMA_CHNL_CNTRL		(PCIE_BASE_ADDRESS + 0xA70)
+#define PCIE_DMA_XFR_SIZE		(PCIE_BASE_ADDRESS + 0xA78)
+#define PCIE_DMA_SAR_LOW		(PCIE_BASE_ADDRESS + 0xA7C)
+#define PCIE_DMA_SAR_HIGH		(PCIE_BASE_ADDRESS + 0xA80)
+#define PCIE_DMA_DAR_LOW		(PCIE_BASE_ADDRESS + 0xA84)
+#define PCIE_DMA_DAR_HIGH		(PCIE_BASE_ADDRESS + 0xA88)
+#define PCIE_DMA_LLPTR_LOW		(PCIE_BASE_ADDRESS + 0xA8C)
+#define PCIE_DMA_LLPTR_HIGH		(PCIE_BASE_ADDRESS + 0xA90)
+
+#define	PCIE_DMA_RD_DONE_STS(ch)	(1 << (ch))
+#define	PCIE_DMA_RD_ABORT_STS(ch)	((PCIE_DMA_RD_DONE_STS(ch)) << 16)
+#define	PCIE_DMA_RD_DONE_STS_CLR(ch)	(1 << (ch))
+#define	PCIE_DMA_RD_ABORT_STS_CLR(ch)	((PCIE_DMA_RD_DONE_STS_CLR(ch)) << 16)
+#define	PCIE_DMA_RD_INT_WRITE_ERR_STS(err, ch)	(((err) & (1 << (ch))) & 0x000000FF)
+#define	PCIE_DMA_RD_INT_LLE_ERR_STS(err, ch)	((((err) >> 16) & 0x000000FF) & (1 << (ch)))
+
+#define	PCIE_LINKUP		(RUBY_BIT(8)|RUBY_BIT(9))
+
+#if !TOPAZ_FPGA_PLATFORM
+#define PCIE_DEFAULT_CFG0       (0x7fe06410)
+#else
+#define PCIE_DEFAULT_CFG0       (0xff3c9410)
+#endif
+
+/* ATU defines */
+
+#define PCIE_ATU_MEMREGION		0x00000000
+#define PCIE_ATU_BAR_MATCH		0xC0000000
+#define PCIE_ATU_BAR_MIN_SIZE		0x00010000 /* 64k */
+
+
+#define	PCIE_ATU_BAR_EN(n)		(((n) << 8) | PCIE_ATU_BAR_MATCH)
+
+/* Shared memory ATU BAR setup */
+#define PCIE_SHMEM_REGION		RUBY_PCIE_ATU_IB_REGION(0)
+#define PCIE_SHMEM_ENABLE		(PCIE_ATU_BAR_EN(PCIE_BAR_SHMEM))
+
+/* Syscfg ATU BAR setup */
+#define PCIE_SYSCTL_REGION		RUBY_PCIE_ATU_IB_REGION(1)
+#define PCIE_SYSCTL_ENABLE		(PCIE_ATU_BAR_EN(PCIE_BAR_SYSCTL))
+
+/* PCIe DMA register setup */
+#define PCIE_DMAREG_REGION		RUBY_PCIE_ATU_IB_REGION(2)
+#define PCIE_DMAREG_ENABLE		(PCIE_ATU_BAR_EN(PCIE_BAR_DMAREG))
+
+/* Size of MSI region */
+#define PCIE_MSIMEM_SIZE		PCIE_ATU_BAR_MIN_SIZE
+#define PCIE_MSIMEM_SIZE_MASK		(PCIE_ATU_BAR_MIN_SIZE - 1)
+
+/* Size of Shared memory in Host */
+#define PCIE_HOSTBD_SIZE                (2 * PCIE_ATU_BAR_MIN_SIZE)
+#define PCIE_HOSTBD_SIZE_MASK           (PCIE_HOSTBD_SIZE - 1)
+
+/* Outbound Host Memory translation setup */
+#define PCIE_HOSTMEM_EP_START		PCIE_REGION_BASE
+#define PCIE_HOSTMEM_EP_END		0xBFFFFFFF
+#define PCIE_HOSTMEM_DMA_MASK		(PCIE_HOSTMEM_EP_END - PCIE_HOSTMEM_EP_START)
+#define PCIE_HOSTMEM_REGION		(RUBY_PCIE_ATU_OB_REGION(1))
+#define PCIE_HOSTMEM_EP_START_LO	PCIE_HOSTMEM_EP_START
+#define PCIE_HOSTMEM_EP_START_HI	0x00000000
+#define PCIE_HOSTMEM_START_LO		0x00000000
+#define PCIE_HOSTMEM_START_HI		0x00000000
+#define PCIE_HOSTMEM_REGION_ENABLE	RUBY_PCIE_ATU_OB_ENABLE
+
+#define PCIE_HOSTMEM_ADDR_ALIGN_MASK	(0xffff0000)
+
+
+/* Outbound MSI ATU setup */
+/* MSI region is the upper 64kbytes of the PCIE slave area */
+
+#define PCIE_MSI_BASE			0xE9000050
+#define PCIE_MSI_CAP			(PCIE_MSI_BASE + 0x0)
+#define PCIE_MSI_LOW_ADDR		(PCIE_MSI_BASE + 0x4)
+#define PCIE_MSI_HIG_ADDR		(PCIE_MSI_BASE + 0x8)
+#define PCIE_MSI_REGION			(RUBY_PCIE_ATU_OB_REGION(0))
+#define PCIE_MSI_REGION_ENABLE		RUBY_PCIE_ATU_OB_ENABLE
+#define MSI_EN				RUBY_BIT(0)
+#define MSI_64_EN			RUBY_BIT(7)
+#define PCIE_MSI_EP_END			PCIE_REGION_END
+#define PCIE_MSI_EP_START_LO		(PCIE_REGION_END - PCIE_MSIMEM_SIZE_MASK)
+#define PCIE_MSI_EP_START_HI		0x00000000
+#define PCIE_MSI_ADDR_OFFSET(a)		((a) & 0xFFFF)
+#define PCIE_MSI_ADDR_ALIGN(a)		((a) & (~0xFFFF))
+
+/* Outbound Host buffer descriptor ATU setup */
+/* Host BD region is the 128kbytes area just below MSI region */
+#define PCIE_HOSTBD_EP_END		(PCIE_REGION_END - PCIE_MSIMEM_SIZE)
+#define PCIE_HOSTBD_EP_START_LO		(PCIE_HOSTBD_EP_END - PCIE_HOSTBD_SIZE_MASK)
+#define PCIE_HOSTBD_EP_START_HI		0x00000000
+#define PCIE_HOSTBD_REGION		(RUBY_PCIE_ATU_OB_REGION(2))
+
+/* Default pcie lzma load addr */
+#define PCIE_FW_LZMA_LOAD		QTNBOOT_COPY_DRAM_ADDR
+
+/* pcie Root Complex defines */
+#define SYS_RST_PCIE			(0x00002000)
+#define SYS_RST_IOSS			(0x00000020)
+
+#if !TOPAZ_FPGA_PLATFORM
+#define PCIE_CFG0_DEFAULT_VALUE		(0x7fe06410)
+#define PCIE_CFG_RC_MODE		(0x4)
+#else
+#define PCIE_CFG0_DEFAULT_VALUE		(0xff3c9400)
+#define PCIE_CFG_RC_MODE		(0x14)
+#endif
+
+#define PCIE_IO_EN			RUBY_BIT(0)
+#define PCIE_MEM_EN			RUBY_BIT(1)
+#define PCIE_BUS_MASTER_EN		RUBY_BIT(2)
+#define BUS_SCAN_TRY_MAX		1000
+#define PCIE_DEV_LINKUP_MASK		0x700
+
+void pcie_ep_early_init(uint32_t flags);
+void board_pcie_init(size_t memsz, uint32_t flags );
+
diff --git a/board/ruby/pcie2.c b/board/ruby/pcie2.c
new file mode 100644
index 0000000..9d1aa42
--- /dev/null
+++ b/board/ruby/pcie2.c
@@ -0,0 +1,841 @@
+/*
+ * Copyright (c) 2010 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ *  SPI driver
+ */
+
+
+///////////////////////////////////////////////////////////////////////////////
+//             Includes
+///////////////////////////////////////////////////////////////////////////////
+#include <common.h>
+#include <command.h>
+#include <asm/arch/platform.h>
+#include <environment.h>
+#include "ruby.h"
+#include "pcie.h"
+#include "pcie2.h"
+#include "ruby_pcie_bda.h"
+
+///////////////////////////////////////////////////////////////////////////////
+//              Defines
+///////////////////////////////////////////////////////////////////////////////
+#define REG_READ(reg) readl(reg)
+#ifdef REG_ACCESS_PRINT
+#define REG_WRITE(reg, val)   do {\
+		printf("\nwrite reg=%08x,val=%08x", reg, val);\
+		writel((val), (reg));\
+		printf(" read back val %08x", REG_READ(reg));} while(0)
+#endif
+
+#define REG_WRITE(reg, val)  writel((val), (reg))
+#define MAX_ELE_NUM	16
+
+#define PKT_CTRL_VAL	 (DMA_CTL_DST_M2 | DMA_CTL_SRC_M2 |\
+				DMA_CTL_LLP_SRC_EN | DMA_CTL_LLP_DST_EN |\
+				DMA_CTL_DST_WIDTH16 | DMA_CTL_SRC_WIDTH64 |\
+				DMA_CTL_DST_BURST16 | DMA_CTL_SRC_BURST16)
+#define DMA_BLOCK_LEN	0x600
+#define CHANNEL		0
+
+
+///////////////////////////////////////////////////////////////////////////////
+//             Prototypes
+///////////////////////////////////////////////////////////////////////////////
+extern void setup_atu_outbound(volatile qdpc_pcie_bda_t *bda);
+extern int memcmp(const void*, const void *, int);
+
+void pcie_msi_map(u32 base);
+void pcie_dma_rd(u32 sar, u32 dar, u32 size);
+void pcie_dma_wr(u32 sar,u32 dar, u32 size);
+void pcie_map_dump(void);
+void topaz_ep_mmap(u32);
+void pcie_mem_map(u32 base,u32 target,u32 size,u32 ch,u32 dir);
+static int pcie_dma_ll(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+unsigned int hdma_move(unsigned long src, unsigned long dst, int len);
+unsigned int hdma_ll_mv(unsigned long src, unsigned long dst, int len);
+
+///////////////////////////////////////////////////////////////////////////////
+//             Globals
+///////////////////////////////////////////////////////////////////////////////
+int atu_is_init = 0;
+
+/***************************************************************************
+   Function:
+   Purpose:
+   Returns:
+   Note:    // todo - pci irqs have been combined on bbic4
+ **************************************************************************/
+void pcie_msi(void)
+{
+        REG_WRITE(PCIE_MSI_STATUS,BIT(0));
+        printf("msi recieved\n");
+}
+
+void fill8_inc(u8 *dst, u32 len)
+{
+        u8 pattern = 0;
+        while (len--)
+                *dst++ = pattern++;
+}
+
+ulong inline get_time_val(void)
+{
+        return readl(RUBY_TIMER_VALUE(0));
+}
+
+void show_bandwidth(unsigned int prev_time, unsigned int cur_time, int len)
+{
+	unsigned int intval;
+	unsigned int nsec;
+	unsigned int tmp;
+
+        intval = prev_time - cur_time;
+        tmp = RUBY_FIXED_DEV_CLK/1000000;
+        nsec = 1000/tmp;
+        tmp *= len;
+        tmp *= 8;
+        tmp = (tmp + intval/2)/intval;
+        nsec *= intval;
+
+        printf("%dnS elapsed, bandwidth is %dMbps\n", nsec, tmp);
+
+}
+
+/* typpe
+ * 0 ep
+ * 1 rc
+ */
+int pcie_init(u32 type)
+{
+#define ARCSHELL_MMAP
+
+	u32 rdata;
+
+	REG_WRITE(RUBY_SYS_CTL_CPU_VEC_MASK,
+		RUBY_SYS_CTL_RESET_IOSS | RUBY_SYS_CTL_RESET_PCIE);
+	REG_WRITE(RUBY_SYS_CTL_CPU_VEC,
+		RUBY_SYS_CTL_RESET_IOSS | RUBY_SYS_CTL_RESET_PCIE);
+
+	rdata = 0;
+	rdata = 1 << 16;
+	rdata = rdata + 0xa2;
+	REG_WRITE(PCIE_PORT_LINK_CTL, rdata);
+
+	rdata = type * 4;
+	rdata += (0x7fe0641 << 4);
+
+	REG_WRITE(RUBY_SYS_CTL_PCIE_CFG0, rdata);
+	REG_WRITE(RUBY_SYS_CTL_PCIE_CFG1, 0x00000001);
+	REG_WRITE(RUBY_SYS_CTL_PCIE_CFG2, 0x0);
+	REG_WRITE(RUBY_SYS_CTL_PCIE_CFG3, 0x45220000);
+	REG_WRITE(PCIE_CMDSTS, 0x00100007);
+
+	// set byte enables for cfg transactions
+	REG_WRITE(RUBY_SYS_CTL_PCIE_SLV_REQ_MISC_INFO, 0xf << 22);
+	return 0;
+}
+
+static int do_pcie_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	u32 type;
+	int dma_access_dir = 1;
+
+	if (strcmp(argv[1], "init") == 0) {
+		if (argc < 3) {
+			printf("pcie init type, type=rc or ep\n");
+			return -1;
+		}
+
+		if (strcmp(argv[2], "rc") == 0) {
+			type = 1;
+		 } else if (strcmp(argv[2], "ep") == 0) {
+			type = 0;
+		 } else {
+			 return -1;
+		 }
+		pcie_init(type);
+
+	} else if (strcmp(argv[1], "mem_map") == 0) {
+		u32 base, target, size, chan, dir;
+
+		if (argc < 7) {
+			printf("pcie mem_map base target size chan dir.\n");
+			return -1;
+		}
+		base = simple_strtoul(argv[2], NULL, 16);
+		target = simple_strtoul(argv[3], NULL, 16);
+		size = simple_strtoul(argv[4], NULL, 16);
+		chan = simple_strtoul(argv[5], NULL, 16);
+		dir = simple_strtoul(argv[6], NULL, 16);
+		pcie_mem_map(base, target, size, chan, dir);
+
+	} else if (strcmp(argv[1], "cfg_map") == 0) {
+
+	} else if ((strcmp(argv[1], "dma_wr") == 0) ||
+			((dma_access_dir = strcmp(argv[1], "dma_rd")) == 0)) {
+		u32 sar,dar,dma_size;
+		if (argc < 5) {
+			printf("pcie dma_wr sar dar dma_size.\n");
+			return -1;
+		}
+		sar			= simple_strtoul(argv[2], NULL, 16);
+		dar			= simple_strtoul(argv[3], NULL, 16);
+		dma_size	= simple_strtoul(argv[4], NULL, 16);
+		dcache_disable();
+		topaz_ep_mmap(0);
+		if(dma_access_dir)
+			pcie_dma_wr(sar, dar, dma_size);
+		else
+			pcie_dma_rd(sar, dar, dma_size);
+
+	} else if (strcmp(argv[1], "bar_map") == 0) {
+		printf("\nbar_map hasn't implemented");
+	} else if (strcmp(argv[1], "bar") == 0) {
+		printf("\nbar hasn't implemented");
+	} else if (strcmp(argv[1], "dump") == 0) {
+		pcie_map_dump();
+	} else if (strcmp(argv[1], "epmap") == 0) {
+		u32 target;
+		if (argc < 3)
+			target = 0;
+		else
+			target = simple_strtoul(argv[2], NULL, 16);
+		topaz_ep_mmap(target);
+	} else if (strcmp(argv[1], "enmsi") == 0) {
+		pcie_msi_map(0xce000000);
+	} else if (!pcie_dma_ll(cmdtp, flag, argc, argv)){
+		return 0;
+	} else {
+		printf("unknown command\n");
+		return -1;
+	}
+
+	return 0;
+}
+
+/******************************************************************************
+   Function:	pcie_cfg_map
+   Purpose:		Set up ATU channel to generate config cycle
+   Returns:
+   Note:		RC only
+ *****************************************************************************/
+void pcie_cfg_map(u32 base,u32 size, u32 ch)
+{
+	u32 tmp = 0;
+
+	REG_WRITE(PCIE_ATU_VIEW, ch);
+	REG_WRITE(PCIE_ATU_LBAR, base);
+	REG_WRITE(PCIE_ATU_UBAR, 0x00000000);
+	REG_WRITE(PCIE_ATU_LAR, base + size);
+	REG_WRITE(PCIE_ATU_LTAR, 0);
+	REG_WRITE(PCIE_ATU_UTAR, 0);
+	REG_WRITE(PCIE_ATU_CTL1, 4);
+	REG_WRITE(PCIE_ATU_CTL2, PCIE_ATU_EN_REGION);
+	tmp = REG_READ(PCIE_ATU_CTL2);
+	printf("map config base:%x size:%x ch:%x\n", base,size, ch);
+}
+
+/******************************************************************************
+   Function:	pcie_cfg_write
+   Purpose:		Write EP config register
+   Returns:
+   Note:		RC only
+ *****************************************************************************/
+void pcie_cfg_write(u32 reg, u32 value)
+{
+
+	REG_WRITE(reg, value);
+
+	#if 0
+	pcie_cfg_map(PCIE_OB_REG_REGION,PCIE_CONFIG_SIZE);
+	if (reg & 4) {
+		u32 temp = REG_READ(PCIE_OB_REG_REGION + 0x10);
+		REG_WRITE(PCIE_OB_REG_REGION + 0x10,value);
+		REG_WRITE(PCIE_OB_REG_REGION + reg,value);
+		REG_WRITE(PCIE_OB_REG_REGION + 0x10,temp);
+	} else {
+		REG_WRITE(PCIE_OB_REG_REGION + reg,value);
+	}
+	#endif
+	printf("cfg write %x:%x\n",reg,value);
+}
+
+/******************************************************************************
+   Function:	pcie_cfg_read
+   Purpose:		Read EP config register
+   Returns:
+   Note:		RC only
+ *****************************************************************************/
+u32 pcie_cfg_read(u32 reg)
+{
+	//pcie_cfg_map(PCIE_OB_REG_REGION,PCIE_CONFIG_SIZE);
+	//return REG_READ(PCIE_OB_REG_REGION + reg);
+	return REG_READ(reg);
+}
+
+/**************************************************************************
+    Function:	pcie_reg_write
+    Purpose:	Write EP register
+    Returns:
+    Note:
+ *************************************************************************/
+void pcie_reg_write( u32 reg, u32 value)
+{
+
+	pcie_mem_map(PCIE_OB_REG_REGION,reg & 0xf0000000,PCIE_CONFIG_SIZE,PCIE_CONFIG_CH,PCIE_ATU_OB_REGION);
+	REG_WRITE(PCIE_OB_REG_REGION + (reg & 0xffff),value);
+}
+/**************************************************************************
+    Function:	pcie_reg_read
+    Purpose:	read EP register
+    Returns:
+    Note:
+ *************************************************************************/
+u32 pcie_reg_read( u32 reg)
+{
+
+	pcie_mem_map(PCIE_OB_REG_REGION,reg & 0xf0000000,PCIE_CONFIG_SIZE,PCIE_CONFIG_CH,PCIE_ATU_OB_REGION);
+	return REG_READ(PCIE_OB_REG_REGION + (reg & 0xffff));
+}
+
+void pcie_bar_map(u32 bar, u32 target, u32 size, u32 atu_chan)
+{
+	u32 tmp;
+	REG_WRITE(PCIE_ATU_VIEW, atu_chan | PCIE_ATU_VIEW_INBOUND);
+	REG_WRITE(PCIE_ATU_LAR, size);
+	REG_WRITE(PCIE_ATU_LTAR, target);
+	REG_WRITE(PCIE_ATU_UTAR, 0);
+	REG_WRITE(PCIE_ATU_CTL1, 0);
+
+	// inbound
+	REG_WRITE(PCIE_ATU_LBAR, 0);
+	REG_WRITE(PCIE_ATU_UBAR, 0);
+
+	// base for inbound specifies BAR numbers
+	REG_WRITE(PCIE_ATU_CTL2,
+		((bar & 7) << 8) | PCIE_ATU_EN_REGION | PCIE_ATU_EN_MATCH);
+
+	tmp = REG_READ(PCIE_ATU_CTL2);
+	printf("map bar:%x target:%x size:%x, ch:%x\n",
+		bar, target, size, atu_chan);
+}
+
+/******************************************************************************
+   Function:	pcie_map
+   Purpose:		Setup mapping backdoor from rc
+   Returns:
+   Note:		dir =  PCIE_ATU_VIEW_INBOUND or PCIE_ATU_VIEW_OUTBOUND
+ *****************************************************************************/
+void pcie_mem_map(u32 base,u32 target,u32 size,u32 ch,u32 dir)
+{
+	u32 tmp;
+
+	REG_WRITE(PCIE_ATU_VIEW,ch|dir);
+	REG_WRITE(PCIE_ATU_LBAR,base);
+	REG_WRITE(PCIE_ATU_UBAR,0);
+	REG_WRITE(PCIE_ATU_LAR,base + size-1);
+	REG_WRITE(PCIE_ATU_LTAR,target);
+	REG_WRITE(PCIE_ATU_UTAR,0);
+	REG_WRITE(PCIE_ATU_CTL1,0);
+	REG_WRITE(PCIE_ATU_CTL2,PCIE_ATU_EN_REGION);
+	tmp = REG_READ(PCIE_ATU_CTL2);
+	printf("map memory base:%x target:%x size:%x, ch:%x dir:%s\n",
+		base,target,size,ch,dir==0 ? "out": "in");
+}
+
+/******************************************************************************
+   Function:	pcie_msi_map
+   Purpose:		Set up msi generation
+   Returns:
+   Note:
+ *****************************************************************************/
+void pcie_msi_map(u32 base)
+{
+	u32 tmp;
+	REG_WRITE(PCIE_MSI_ADDR,base);
+	REG_WRITE(PCIE_MSI_ADDR_UPPER,0);
+	REG_WRITE(PCIE_MSI_ENABLE,BIT(0));
+	REG_WRITE(PCIE_MSI_MASK,0);
+
+	tmp = REG_READ(PCIE_MSI_STATUS);
+}
+
+/******************************************************************************
+   Function:	pcie_int_map
+   Purpose:		Setup intA ... mapping
+   Returns:
+   Note:
+ *****************************************************************************/
+void pcie_int_map(u32 base,u32 channel)
+{
+}
+
+/******************************************************************************
+   Function:	pcie_map
+   Purpose:		Setup mapping backdoor from rc
+   Returns:
+   Note:
+ *****************************************************************************/
+void pcie_bar(u32 base,u32 bar)
+{
+	printf("set bar %x, addr:%x\n",bar,base);
+	switch (bar) {
+		case 0:
+		REG_WRITE(PCIE_BAR0,base);
+		break;
+
+		case 1:
+		REG_WRITE(PCIE_BAR1,base);
+		break;
+
+		case 2:
+		REG_WRITE(PCIE_BAR2,base);
+		break;
+
+		case 3:
+		REG_WRITE(PCIE_BAR3,base);
+		break;
+
+		case 4:
+		REG_WRITE(PCIE_BAR4,base);
+		break;
+	}
+	REG_WRITE(PCIE_CMD,6);
+}
+
+void pcie_map_dump(void)
+{
+	int i;
+	int j;
+	uint32_t tmp;
+	/* read the inband */
+	for (i = 0, j = 0; i < 4; i++) {
+		REG_WRITE(PCIE_ATU_VIEW, PCIE_ATU_VIEW_INBOUND | i);
+		tmp = REG_READ(PCIE_ATU_CTL2);
+		if ((tmp & PCIE_ATU_EN_REGION) != PCIE_ATU_EN_REGION) {
+			continue;
+		}
+		j++;
+		if (tmp & PCIE_ATU_EN_MATCH) {
+			tmp = (tmp >> 8) & 7;
+			printf("i=%d, in barmatch: barno=%d, baraddr=%08x,"
+				"target=%08x, size=%08x\n",i, tmp,
+				REG_READ(RUBY_PCIE_BAR(tmp)),
+				REG_READ(PCIE_ATU_LTAR),
+					REG_READ(PCIE_ATU_LAR));
+		} else {
+			printf("i=%d, in: base=%08x, target=%08x, size=%08x\n", i,
+				REG_READ(PCIE_ATU_LBAR), REG_READ(PCIE_ATU_LTAR),
+				REG_READ(PCIE_ATU_LAR));
+		}
+	}
+	if (j)
+		printf("\n");
+	else
+		printf("No inATU enabled\n");
+
+	for (i = 0, j = 0; i < 4; i++) {
+		REG_WRITE(PCIE_ATU_VIEW, PCIE_ATU_VIEW_OUTBOUND | i);
+		tmp = REG_READ(PCIE_ATU_CTL2);
+		if ((tmp & PCIE_ATU_EN_REGION) != PCIE_ATU_EN_REGION) {
+			continue;
+		}
+		j++;
+		printf("i=%d,out: base=%08x, target=%08x, size=%08x\n", i,
+			REG_READ(PCIE_ATU_LBAR), REG_READ(PCIE_ATU_LTAR),
+			REG_READ(PCIE_ATU_LAR));
+	}
+	if (!j)
+		printf("No outATU enabled\n");
+}
+
+/******************************************************************************
+   Function:	pcie_dma_wr
+   Purpose:	Use pcie dma to transfer from local mem to remote mem (write channel).
+   Returns:
+   Note:
+ *****************************************************************************/
+
+void pcie_dma_wr(u32 sar,u32 dar, u32 size)
+{
+	u32 tmp = 0;
+	unsigned int prev_time = 0, cur_time = 0;
+	sar = (sar >= PCIE_BASE_REGION) ? sar : virt_to_bus((void *)sar);
+	dar = (dar >= PCIE_BASE_REGION) ? dar : virt_to_bus((void *)dar);
+
+	REG_WRITE(PCIE_DMA_WR_ENABLE, 0x00000001);
+	REG_WRITE(PCIE_DMA_WR_INTMASK, 0x00000000);
+	REG_WRITE(PCIE_DMA_CHNL_CONTEXT, 0x00000000);
+	REG_WRITE(PCIE_DMA_CHNL_CNTRL, 0x04000008);
+	REG_WRITE(PCIE_DMA_XFR_SIZE,size);
+	REG_WRITE(PCIE_DMA_SAR_LOW, sar);
+	REG_WRITE(PCIE_DMA_SAR_HIGH, 0x00000000);
+	REG_WRITE(PCIE_DMA_DAR_LOW, dar);
+	REG_WRITE(PCIE_DMA_DAR_HIGH,0x00000000);
+	prev_time = get_time_val();
+	REG_WRITE(PCIE_DMA_WR_DOORBELL, 0x00000000);
+
+	while((tmp & 1) == 0) {
+		tmp = REG_READ(PCIE_DMA_WR_INTSTS);
+	}
+	cur_time = get_time_val();
+
+	//Clear status bit so can be used for next transfer
+	tmp |= 1;
+	REG_WRITE(PCIE_DMA_WR_INTCLER, tmp);
+
+	show_bandwidth(prev_time, cur_time, size);
+}
+
+/******************************************************************************
+   Function:	pcie_dma_rd
+   Purpose:	Use pcie dma to transfer from remote mem to local mem(Read channel).
+   Returns:
+   Note:
+ *****************************************************************************/
+void pcie_dma_rd(u32 sar, u32 dar, u32 size)
+{
+	u32 tmp;
+	unsigned int prev_time, cur_time;
+	tmp = 0;
+
+	sar = (sar >= PCIE_BASE_REGION) ? sar : virt_to_bus((void *)sar);
+	dar = (dar >= PCIE_BASE_REGION) ? dar : virt_to_bus((void *)dar);
+
+	//printf(" INFO : Start PCIE-DMA programming RD Channel");
+	REG_WRITE(PCIE_DMA_RD_ENABLE, 0x00000001);
+	REG_WRITE(PCIE_DMA_RD_INTMASK, 0x00000000);
+	REG_WRITE(PCIE_DMA_CHNL_CONTEXT, 0x80000000);
+	REG_WRITE(PCIE_DMA_CHNL_CNTRL, 0x04000008);
+	REG_WRITE(PCIE_DMA_XFR_SIZE,size);
+	REG_WRITE(PCIE_DMA_SAR_LOW, sar);
+	REG_WRITE(PCIE_DMA_SAR_HIGH,0x00000000);
+	REG_WRITE(PCIE_DMA_DAR_LOW, dar);
+	REG_WRITE(PCIE_DMA_DAR_HIGH,0x00000000);
+	REG_WRITE(PCIE_DMA_RD_DOORBELL, 0x00000000);
+	prev_time = get_time_val();
+	//Now check if DMA transfer is done
+	while((tmp & 1) == 0) {
+		tmp = REG_READ(PCIE_DMA_RD_INTSTS);
+	}
+	cur_time = get_time_val();
+	//DMA transfer is done. Check packet in SRAM.
+	//Clear status bit so can be used for next transfer
+	tmp = tmp | 1;
+	REG_WRITE(PCIE_DMA_RD_INTCLER, tmp);
+
+	show_bandwidth(prev_time, cur_time, size);
+}
+
+ /*linked list element structure*/
+struct pcie_dma_ll_data {
+	uint32_t ll_cb : 1;	/* cycle bit of the element*/
+	uint32_t rsvd : 1;	/* reserved for data element */
+	uint32_t ll_llp : 1;	/* load link pointer, 0 for data element*/
+	uint32_t ll_lie : 1;	/* local interrupt enable, used only for data element*/
+	uint32_t ll_rie : 1;	/* remote interrupt enable, only used for data element*/
+	uint32_t ll_trans_size;	/* transfer size for the data block pointed by the sar */
+	uint32_t ll_sar_low;	/* low source address in local memory for data element; */
+	uint32_t ll_sar_high;	/* high source address in local memory for data element*/
+	uint32_t ll_dar_low;	/* low source address in the remote memory for data element */
+	uint32_t ll_dar_high;	/* high source address in the remote memory for data element */
+};
+
+struct pcie_dma_ll_desc {
+	uint32_t ll_cb : 1;	/* cycle bit of the element*/
+	uint32_t ll_tcb : 1;	/* toggle cycle bit, used only for descriptor element */
+	uint32_t ll_llp : 1;	/* load link pointer, 1 for descriptor element*/
+	uint32_t rsvd1;			/* reserved for descriptor element */
+	uint32_t ll_elem_ptr_low;	/* low  pointer value for the LL element */
+	uint32_t ll_elem_ptr_high;	/* high pointer value for the LL element */
+	uint32_t rsvd2[2];
+};
+
+
+static int pcie_dma_ll(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	struct pcie_dma_ll_data dma_param[MAX_ELE_NUM + 1];
+	struct pcie_dma_ll_desc *dma_llp;
+	unsigned int prev_time = 0;
+	unsigned int cur_time = 0;
+	int i;
+	u32 tmp = 0;
+	u32 sar;
+	u32 dar;
+	int sumsz = 0;
+	u32 bsar;
+	u32 bdar;
+	int size;
+
+	if (argc < 1) {
+		printf("pcie llr/llw src dst sumsz\n");
+		return -1;
+	}
+
+	dcache_disable();
+	topaz_ep_mmap(0);
+
+	memset(dma_param, 0, sizeof(dma_param));
+
+	sar = simple_strtoul(argv[2], NULL, 16);
+	dar = simple_strtoul(argv[3], NULL, 16);
+	sumsz = simple_strtoul(argv[4], NULL, 16);
+	if ((sumsz + DMA_BLOCK_LEN - 1) / DMA_BLOCK_LEN > MAX_ELE_NUM) {
+		printf("dma desc isn't enough\n");
+		sumsz = DMA_BLOCK_LEN * MAX_ELE_NUM;
+	}
+
+	size = sumsz;
+	bsar = (sar >= PCIE_BASE_REGION) ? sar : virt_to_bus((void *)sar);
+	bdar = (dar >= PCIE_BASE_REGION) ? dar : virt_to_bus((void *)dar);
+	printf("bsar\t\tbdar\t\tsize\n");
+	for (i = 0; i < MAX_ELE_NUM; i++) {
+		dma_param[i].ll_cb = 1;
+		dma_param[i].ll_trans_size = (size > DMA_BLOCK_LEN) ? DMA_BLOCK_LEN : size;
+		dma_param[i].ll_sar_low = bsar;
+		dma_param[i].ll_dar_low = bdar;
+		printf("%08x\t%08x\t%08x\n", bsar, bdar, dma_param[i].ll_trans_size);
+
+		bsar += DMA_BLOCK_LEN;
+		bdar += DMA_BLOCK_LEN;
+		size -= DMA_BLOCK_LEN;
+		if (size <= 0)
+			break;
+	}
+	dma_param[i].ll_lie = 1;
+
+	memset((void *)dar, 0, sumsz);
+	/* Don't memset sar address, it may crash linux kernel if RC run with linux */
+
+	dma_llp = (struct pcie_dma_ll_desc *)&dma_param[i + 1];
+	dma_llp->ll_llp = 1;
+
+	dcache_enable();
+
+	if (!strcmp(argv[1], "llr")) {
+#if 0
+		memset((void *)0x83000000, 0x58, 0x4000);
+		memset((void *)0xb3000000, 0, 0x4000);
+		//hdma_move(0x88004000, 0xb3000000, 0x4000, 16);
+		hdma_ll_mv(0x88040000, 0xb3000000, 0x4000);
+#endif
+		REG_WRITE(PCIE_DMA_RD_ENABLE, 0x00000001);
+		REG_WRITE(PCIE_DMA_RD_INTMASK, 0x00000000);
+		REG_WRITE(PCIE_DMA_CHNL_CONTEXT, 0x80000000);
+		REG_WRITE(PCIE_DMA_CHNL_CNTRL, 0x04000308);
+
+		REG_WRITE(PCIE_DMA_LLPTR_LOW, virt_to_bus(dma_param));
+		REG_WRITE(PCIE_DMA_LLPTR_HIGH, 0);
+
+		REG_WRITE(PCIE_DMA_RD_DOORBELL, 0x00000000);
+		prev_time = get_time_val();
+
+
+		for (i = 0; i < 0x1000000; i++) {
+			tmp = REG_READ(PCIE_DMA_RD_INTSTS);
+			if (tmp & 1) {
+				cur_time = get_time_val();
+				break;
+			}
+		}
+		REG_WRITE(PCIE_DMA_RD_INTCLER, tmp);
+
+	} else if (!strcmp(argv[1], "llw")) {
+		REG_WRITE(PCIE_DMA_WR_ENABLE, 0x00000001);
+		REG_WRITE(PCIE_DMA_WR_INTMASK, 0x00000000);
+		REG_WRITE(PCIE_DMA_CHNL_CONTEXT, 0x00000000);
+		REG_WRITE(PCIE_DMA_CHNL_CNTRL, 0x04000308);
+
+		REG_WRITE(PCIE_DMA_LLPTR_LOW, virt_to_bus(dma_param));
+		REG_WRITE(PCIE_DMA_LLPTR_HIGH, 0);
+
+		REG_WRITE(PCIE_DMA_WR_DOORBELL, 0x00000000);
+		prev_time = get_time_val();
+
+		for (i = 0; i < 0x1000000; i++) {
+			tmp = REG_READ(PCIE_DMA_WR_INTSTS);
+			if (tmp & 1) {
+				cur_time = get_time_val();
+				break;
+			}
+		}
+		REG_WRITE(PCIE_DMA_WR_INTCLER, tmp);
+	} else {
+		return -1;
+	}
+
+	show_bandwidth(prev_time, cur_time, sumsz);
+
+	if (memcmp((void *)dar, (void *)sar, sumsz) != 0)
+		printf("DMA failed\n");
+
+	return 0;
+}
+
+void topaz_ep_mmap(u32 target)
+{
+	volatile qdpc_pcie_bda_t *bda = (qdpc_pcie_bda_t *)(RUBY_PCIE_BDA_ADDR);
+	u32 tmp;
+
+	if (atu_is_init)
+		return;
+	printf("Waiting for the pcie link up, ctl + c to break\n");
+	while (1) {
+		if ((readl(TOPAZ_PCIE_STAT) & TOPAZ_PCIE_LINKUP) == TOPAZ_PCIE_LINKUP)
+		break;
+		if (ctrlc()) {
+			printf("fail to link to host, break.\n");
+			break;
+		}
+		udelay(10);
+	}
+
+	writel(0xce000000, PCIE_MSI_LOW_ADDR);
+	writel(readl(PCIE_MSI_CAP) & ~RUBY_PCIE_MSI_ENABLE, PCIE_MSI_CAP); /* Enabled by RC if need to */
+	setup_atu_outbound(bda);
+	pcie_bar_map(PCIE_BAR_DMAREG, PCIE_BAR_DMAREG_LO, PCIE_BAR_DMAREG_LEN,
+			PCIE_DMAREG_REGION);
+	pcie_mem_map(PCIE_BASE_REGION, target, 0xff70000, 1,
+			PCIE_ATU_VIEW_OUTBOUND);
+	pcie_mem_map(0xbff70000, 0x80000000, 0x80000, 2, PCIE_ATU_VIEW_OUTBOUND);
+	writel(PCIE_BAR_CFG(0) | 0xc0000008, RUBY_PCIE_BAR(PCIE_BAR_SYSCTL));
+	writel(PCIE_BAR_CFG(0) | 0xc0010008, RUBY_PCIE_BAR(PCIE_BAR_SHMEM));
+	writel(PCIE_BAR_CFG(0) | 0xc0020008, RUBY_PCIE_BAR(PCIE_BAR_DMAREG));
+	writel(PCIE_MEM_EN | PCIE_BUS_MASTER_EN, RUBY_PCIE_CMD_REG);
+	atu_is_init = 1;
+
+	tmp = readl(0xb0000000);
+	tmp = readl(0xb0000000);
+	writel(PCIE_LINK_GEN2, PCIE_LINK_CTL2);
+	udelay(10000);
+	printf("PCIe Gen: %x\n", PCIE_LINK_MODE(readl(PCIE_LINK_STAT)));
+}
+
+unsigned int hdma_move(unsigned long src, unsigned long dst, int len)
+{
+	dst = (dst >= PCIE_BASE_REGION) ? dst : virt_to_bus((void *)dst);
+	src = (src >= PCIE_BASE_REGION) ? src : virt_to_bus((void *)src);
+	printf("dst=%x, src=%x, len = %x\n", (unsigned int)dst, (unsigned int)src, len);
+
+	REG_WRITE(DMA_DMA_CFG, DMA_CFG_ENABLE);
+	REG_WRITE(DMA_MSK_TFR, 0xf0f);
+	REG_WRITE(DMA_CH_EN, BIT(CHANNEL) << 8);
+	REG_WRITE(DMA_SAR(CHANNEL), src);
+	REG_WRITE(DMA_DAR(CHANNEL), dst);
+	REG_WRITE(DMA_LLP(CHANNEL), 0);
+	REG_WRITE(DMA_CTL(CHANNEL), PKT_CTRL_VAL);
+	REG_WRITE(DMA_SIZE(CHANNEL), (len + 7) / 8);
+	REG_WRITE(DMA_CH_EN,(BIT(CHANNEL) <<8) | BIT(CHANNEL));
+
+	return get_time_val();
+}
+
+typedef struct dma_desc {
+	u32		sar;
+	u32		dar;
+	struct dma_desc *llp;
+	u32		ctl;
+	u32		size;
+} dma_desc_t;
+
+unsigned int hdma_ll_mv(unsigned long src, unsigned long dst, int len)
+{
+	struct dma_desc hdma_dsc[MAX_ELE_NUM];
+	struct dma_desc *dsc = hdma_dsc;
+	int i;
+
+	if (((len + DMA_BLOCK_LEN - 1) / DMA_BLOCK_LEN) > MAX_ELE_NUM) {
+		printf("chain isn't engough\n");
+		len = MAX_ELE_NUM * DMA_BLOCK_LEN;
+	}
+
+	dst = (dst >= PCIE_BASE_REGION) ? dst : virt_to_bus((void *)dst);
+	src = (src >= PCIE_BASE_REGION) ? src : virt_to_bus((void *)src);
+	printf("ctl\t\tsrc\t\tdar\t\tllp\t\tsize\n");
+	for (i = 0; i < MAX_ELE_NUM; i++) {
+		dsc->ctl = PKT_CTRL_VAL;
+		dsc->sar = src;
+		dsc->dar = dst;
+		dsc->llp = (void *)virt_to_bus(dsc + 1);
+		dsc->size = ((len > DMA_BLOCK_LEN) ? DMA_BLOCK_LEN : len) / 8;
+		printf("0x%08x\t0x%08x\t0x%08x\t0x%p\t0x%08x\n",
+			dsc->ctl, dsc->sar, dsc->dar, dsc->llp, dsc->size);
+		dst += DMA_BLOCK_LEN;
+		src += DMA_BLOCK_LEN;
+		len -= DMA_BLOCK_LEN;
+		if (len <= 0) {
+			dsc->llp = NULL;
+			break;
+		}
+		dsc++;
+	}
+
+	dcache_disable();
+
+	REG_WRITE(DMA_DMA_CFG, DMA_CFG_ENABLE);
+	REG_WRITE(DMA_MSK_TFR, 0xf0f);
+	REG_WRITE(DMA_CTL(CHANNEL), PKT_CTRL_VAL);
+	REG_WRITE(DMA_LLP(CHANNEL), virt_to_bus(hdma_dsc));
+	REG_WRITE(DMA_CH_EN,(BIT(CHANNEL) << 8) | BIT(CHANNEL));
+	return get_time_val();
+}
+
+static int do_hdmaw(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	unsigned long dst;
+	unsigned long src;
+	int len;
+	int mode;
+	unsigned int prev_time;
+	unsigned int cur_time;
+
+	src = simple_strtoul(argv[1], NULL, 16);
+	dst = simple_strtoul(argv[2], NULL, 16);
+	len = simple_strtoul(argv[3], NULL, 16);
+
+	dcache_disable();
+	topaz_ep_mmap(0);
+
+	fill8_inc((void *)src, len);
+
+	memset((void *)dst, 0, len);
+
+	if (argc >= 5)
+		mode = simple_strtoul(argv[4], NULL, 16);
+	else
+		mode = 0;
+
+	if (mode) {
+		printf("ll mode\n");
+		prev_time = hdma_ll_mv(src, dst, len);
+	} else {
+		printf("non-ll mode\n");
+		prev_time = hdma_move(src, dst, len);
+	}
+
+	while (REG_READ(DMA_CH_EN) & BIT(CHANNEL));
+
+	cur_time = get_time_val();
+
+	show_bandwidth(prev_time, cur_time, len);
+
+	return 0;
+}
+
+/* pcie test command */
+U_BOOT_CMD(pcie,CONFIG_SYS_MAXARGS, 0, do_pcie_cmd,
+	"pcie operation sub-system",
+	"pcie init rc/ep                        - initialize the pcie as rc/ep\n"
+	"pcie mem_map base target size chan dir - configure the inbout(dir=1) and outbound(dir=0)\n"
+	"pcie dma_wr sar dar size               - Use pcie dma to transfer from local mem to remote mem\n"
+	"pcie dma_rd sar dar size               - Use pcie dma to transfer from remote mem to local mem\n"
+	NULL);
+
+/* pcie test command */
+U_BOOT_CMD(hdmaw, CONFIG_SYS_MAXARGS, 0, do_hdmaw,
+		"Hdma debug",
+                "dst, src, len, mode\n"
+                NULL);
+
diff --git a/board/ruby/pcie2.h b/board/ruby/pcie2.h
new file mode 100644
index 0000000..e7559e9
--- /dev/null
+++ b/board/ruby/pcie2.h
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2010 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ *  PCI driver
+ */
+
+#ifndef __PCI_H__
+#define __PCI_H__
+#include <net.h>
+#include "pcie.h"
+
+#define PCIE_MSI_CAP_ENABLED                   (BIT(16))
+
+#define PCIE_CONFIG_ID			(0)
+#define PCIE_CONFIG_BAR0		(0x10)
+#define PCIE_CONFIG_BAR1		(0x14)
+#define PCIE_CONFIG_BAR2		(0x18)
+#define PCIE_CONFIG_BAR3		(0x1c)
+#define PCIE_CONFIG_BAR4		(0x20)
+#define PCIE_CONFIG_BAR5		(0x24)
+
+#define PCIE_CMD			(PCIE_BASE_ADDRESS + 0x0004)
+#define PCIE_BAR0			(PCIE_BASE_ADDRESS + 0x0010)
+#define PCIE_BAR1			(PCIE_BASE_ADDRESS + 0x0014)
+#define PCIE_BAR2			(PCIE_BASE_ADDRESS + 0x0018)
+#define PCIE_BAR3			(PCIE_BASE_ADDRESS + 0x001c)
+#define PCIE_BAR4			(PCIE_BASE_ADDRESS + 0x0020)
+#define PCIE_BAR5			(PCIE_BASE_ADDRESS + 0x0024)
+
+#define PCIE_BAR0_MASK			(PCIE_BASE_ADDRESS + 0x1010)
+#define PCIE_BAR1_MASK			(PCIE_BASE_ADDRESS + 0x1014)
+#define PCIE_BAR2_MASK			(PCIE_BASE_ADDRESS + 0x1018)
+#define PCIE_BAR3_MASK			(PCIE_BASE_ADDRESS + 0x101c)
+#define PCIE_BAR4_MASK			(PCIE_BASE_ADDRESS + 0x1020)
+#define PCIE_BAR5_MASK			(PCIE_BASE_ADDRESS + 0x1024)
+
+
+#define PCIE_ATU_VIEW			(PCIE_BASE_ADDRESS + 0x0900)
+#define PCIE_ATU_VIEW_OUTBOUND		(0)
+#define PCIE_ATU_VIEW_INBOUND		(BIT(31))
+
+#define PCIE_ATU_CTL1			(PCIE_BASE_ADDRESS + 0x0904)
+#define PCIE_ATU_CTL2			(PCIE_BASE_ADDRESS + 0x0908)
+#define PCIE_ATU_LBAR			(PCIE_BASE_ADDRESS + 0x090c)
+#define PCIE_ATU_UBAR			(PCIE_BASE_ADDRESS + 0x0910)
+#define PCIE_ATU_LAR			(PCIE_BASE_ADDRESS + 0x0914)
+#define PCIE_ATU_LTAR			(PCIE_BASE_ADDRESS + 0x0918)
+#define PCIE_ATU_UTAR			(PCIE_BASE_ADDRESS + 0x091c)
+
+// MSI registers (RC)
+#define PCIE_MSI_ADDR			(PCIE_BASE_ADDRESS + 0x0820)
+#define PCIE_MSI_ADDR_UPPER		(PCIE_BASE_ADDRESS + 0x0824)
+#define PCIE_MSI_ENABLE			(PCIE_BASE_ADDRESS + 0x0828)
+#define PCIE_MSI_MASK			(PCIE_BASE_ADDRESS + 0x082c)
+#define PCIE_MSI_STATUS			(PCIE_BASE_ADDRESS + 0x0830)
+#define PCIE_MSI_GPIO			(PCIE_BASE_ADDRESS + 0x0888)
+#define	PCIE_MSI_LBAR			(PCIE_BASE_ADDRESS + 0x0054)
+
+#define USE_BAR_MATCH_MODE
+#define PCIE_ATU_OB_REGION		(BIT(0))
+#define PCIE_ATU_EN_REGION		(BIT(31))
+#define PCIE_ATU_EN_MATCH		(BIT(30))
+#define PCIE_BASE_REGION		(0xb0000000)
+#define PCIE_MEM_MAP_SIZE		(512*1024)
+
+#define PCIE_OB_REG_REGION	(0xcf000000)
+#define PCIE_CONFIG_REGION	(0xcf000000)
+#define PCIE_CONFIG_SIZE	(4096)
+#define PCIE_CONFIG_CH		(1)
+
+// inbound mapping
+#define PCIE_IB_BAR0		(0x00000000)	// ddr
+#define PCIE_IB_BAR0_CH		(0)
+#define PCIE_IB_BAR3		(0xe0000000)	// sys_reg
+#define PCIE_IB_BAR3_CH		(1)
+
+
+// outbound mapping
+#define PCIE_MEM_CH		(0)
+#define PCIE_REG_CH		(1)
+#define PCIE_MEM_REGION		(0xc0000000)
+#define	PCIE_MEM_SIZE		(0x000fffff)
+#if 1
+#define PCIE_MEM_TAR		(0x80000000)
+#else
+#define PCIE_MEM_TAR		(0x00000000)
+#endif
+
+
+#define PCIE_MSI_SIZE		(KBYTE(4)-1)
+#define PCIE_MSI_CH		(1)
+
+
+#define DMA_FLAG_LOOP		(BIT(31))
+#define DMA_FLAG_SIZE(x)	((x) & 0xf)
+#define DMA_FLAG_CHANNEL(x)	(((x) >> 4) & 0xf)
+
+
+///////////////////////////////////////////////////////////////////////////////
+//             Defines
+///////////////////////////////////////////////////////////////////////////////
+#define DMA_BASE_ADDR RUBY_DMA_BASE_ADDR
+#define DMA_NUM_CHANNELS		(4)
+#define	DMA_SAR(x)			(DMA_BASE_ADDR + 0x00 + (x)*0x58)
+#define	DMA_DAR(x)			(DMA_BASE_ADDR + 0x08 + (x)*0x58)
+#define	DMA_LLP(x)			(DMA_BASE_ADDR + 0x10 + (x)*0x58)
+#define	DMA_CTL(x)			(DMA_BASE_ADDR + 0x18 + (x)*0x58)
+#define	DMA_SIZE(x)			(DMA_BASE_ADDR + 0x1c + (x)*0x58)
+#define	DMA_SSTAT(x)			(DMA_BASE_ADDR + 0x20 + (x)*0x58)
+#define	DMA_DSTAT(x)			(DMA_BASE_ADDR + 0x28 + (x)*0x58)
+#define	DMA_SSTATAR(x)			(DMA_BASE_ADDR + 0x30 + (x)*0x58)
+#define	DMA_DSTATAR(x)			(DMA_BASE_ADDR + 0x38 + (x)*0x58)
+#define	DMA_CFG(x)			(DMA_BASE_ADDR + 0x40 + (x)*0x58)
+#define	DMA_SGR(x)			(DMA_BASE_ADDR + 0x48 + (x)*0x58)
+#define	DMA_DSR(x)			(DMA_BASE_ADDR + 0x50 + (x)*0x58)
+
+#define	DMA_STATUS			(DMA_BASE_ADDR + 0x360)
+#define DMA_STATUS_ERR			(BIT(4))
+#define DMA_STATUS_DSTT			(BIT(3))
+#define DMA_STATUS_SRCT			(BIT(2))
+#define DMA_STATUS_BLOCK		(BIT(1))
+#define DMA_STATUS_TFR			(BIT(0))
+
+#define DMA_RAW_TFR			(DMA_BASE_ADDR + 0x2c0)
+#define DMA_RAW_BLK			(DMA_BASE_ADDR + 0x2c8)
+#define DMA_RAW_SRC			(DMA_BASE_ADDR + 0x2d0)
+#define DMA_RAW_DST			(DMA_BASE_ADDR + 0x2d8)
+#define DMA_RAW_ERR			(DMA_BASE_ADDR + 0x2e0)
+#define DMA_STS_TFR			(DMA_BASE_ADDR + 0x2e8)
+#define DMA_STS_BLK			(DMA_BASE_ADDR + 0x2f0)
+#define DMA_STS_SRC			(DMA_BASE_ADDR + 0x2f8)
+#define DMA_STS_DST			(DMA_BASE_ADDR + 0x300)
+#define DMA_STS_ERR			(DMA_BASE_ADDR + 0x308)
+#define DMA_MSK_TFR			(DMA_BASE_ADDR + 0x310)
+#define DMA_MSK_BLK			(DMA_BASE_ADDR + 0x318)
+#define DMA_MSK_SRC			(DMA_BASE_ADDR + 0x320)
+#define DMA_MSK_DST			(DMA_BASE_ADDR + 0x328)
+#define DMA_MSK_ERR			(DMA_BASE_ADDR + 0x330)
+#define DMA_TFR_CLR			(DMA_BASE_ADDR + 0x338)
+#define DMA_BLK_CLR			(DMA_BASE_ADDR + 0x340)
+#define DMA_SRC_CLR			(DMA_BASE_ADDR + 0x348)
+#define DMA_DST_CLR			(DMA_BASE_ADDR + 0x350)
+#define DMA_ERR_CLR			(DMA_BASE_ADDR + 0x358)
+#define DMA_STS_INT			(DMA_BASE_ADDR + 0x360)
+#define DMA_REQ_SRC			(DMA_BASE_ADDR + 0x368)
+#define DMA_REQ_DST			(DMA_BASE_ADDR + 0x370)
+#define DMA_SGL_REQ_SRC			(DMA_BASE_ADDR + 0x378)
+#define DMA_SGL_REQ_DST			(DMA_BASE_ADDR + 0x380)
+#define DMA_LST_SRC			(DMA_BASE_ADDR + 0x388)
+#define DMA_LST_DST			(DMA_BASE_ADDR + 0x390)
+#define DMA_DMA_CFG			(DMA_BASE_ADDR + 0x398)
+#define DMA_CH_EN			(DMA_BASE_ADDR + 0x3a0)
+#define DMA_ID				(DMA_BASE_ADDR + 0x3a8)
+#define DMA_TEST			(DMA_BASE_ADDR + 0x3b0)
+
+#define DMA_CFG_ENABLE			(BIT(0))
+#define DMA_CH_EN_WEN			(0xf<<8)
+#define DMA_CTL_LLP_SRC_EN		(BIT(28))
+#define DMA_CTL_LLP_DST_EN		(BIT(27))
+#define DMA_CTL_SRC_M1			(0)
+#define DMA_CTL_SRC_M2			(BIT(25))
+#define DMA_CTL_DST_M1			(0)
+#define DMA_CTL_DST_M2			(BIT(23))
+#define DMA_CTL_MEM2MEM			(0)
+#define DMA_CTL_DST_SCATTER		(BIT(18))
+#define DMA_CTL_SRC_SCATTER		(BIT(17))
+
+#define DMA_CTL_SRC_BURST4		(0)
+#define DMA_CTL_SRC_BURST8		(1<<14)
+#define DMA_CTL_SRC_BURST16		(2<<14)
+#define DMA_CTL_SRC_BURST32		(3<<14)
+#define DMA_CTL_SRC_BURST64		(4<<14)
+
+#define DMA_CTL_DST_BURST4		(0)
+#define DMA_CTL_DST_BURST8		(1<<11)
+#define DMA_CTL_DST_BURST16		(2<<11)
+#define DMA_CTL_DST_BURST32		(3<<11)
+#define DMA_CTL_DST_BURST64		(4<<11)
+
+#define DMA_CTL_SRC_WIDTH8		(0<<4)
+#define DMA_CTL_SRC_WIDTH16		(1<<4)
+#define DMA_CTL_SRC_WIDTH32		(2<<4)
+#define DMA_CTL_SRC_WIDTH64		(3<<4)
+#define DMA_CTL_DST_WIDTH8		(0<<1)
+#define DMA_CTL_DST_WIDTH16		(1<<1)
+#define DMA_CTL_DST_WIDTH32		(2<<1)
+#define DMA_CTL_DST_WIDTH64		(3<<1)
+#define DMA_INT_EN			(BIT(0))
+
+#define DMA_CTL_SRC_SCATTER		(BIT(17))
+
+#endif // __PCI_H__
+
diff --git a/board/ruby/progress.c b/board/ruby/progress.c
new file mode 100644
index 0000000..f34182e
--- /dev/null
+++ b/board/ruby/progress.c
@@ -0,0 +1,47 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
+#include <config.h>
+
+#ifdef CONFIG_SHOW_BOOT_PROGRESS
+void printf(const char *fmt, ...);
+/* Keep function in separated translation module and
+ * include as little header files as possible.
+ * The reason for it - I need this function
+ * to has "strong" reference, while this function
+ * is marked as "weak" in uboot header file
+ * (as result which function comes to resulted
+ * binary depends on linker command line -
+ * which is too error prone).
+ */
+void show_boot_progress(int status)
+{
+	printf("Boot reached stage %d\n", status);
+}
+#endif
+
+/* Need for module linking. Keep and call it even if it is empty. */
+void board_progress_init(void)
+{
+}
+
diff --git a/board/ruby/reset.c b/board/ruby/reset.c
new file mode 100644
index 0000000..bb353c2
--- /dev/null
+++ b/board/ruby/reset.c
@@ -0,0 +1,74 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "ruby.h"
+
+#ifdef TOPAZ_AMBER_IP
+#include <amber.h>
+#include <asm/arcregs.h>
+#endif
+
+static inline void board_reset_watchdog(unsigned long delay)
+{
+	writel(RUBY_WDT_ENABLE, RUBY_WDT_CTL);
+	writel(delay, RUBY_WDT_TIMEOUT_RANGE);
+	writel(RUBY_WDT_MAGIC_NUMBER, RUBY_WDT_COUNTER_RESTART);
+}
+
+static inline void board_reset_sysctrl(unsigned long mask)
+{
+	writel(mask, RUBY_SYS_CTL_CPU_VEC_MASK);
+	writel(0x0, RUBY_SYS_CTL_CPU_VEC);
+	writel(0x0, RUBY_SYS_CTL_CPU_VEC_MASK);
+}
+
+void board_reset(const char *reason)
+{
+#ifndef TOPAZ_AMBER_IP
+	/* Postponed reset using watchdog - make sure that serial output will take place and be finished. */
+	board_reset_watchdog(RUBY_WDT_RESET_TIMEOUT);
+#endif
+
+	/* Serial output. */
+	puts(reason);
+	while(!serial_tx_done());
+
+#ifndef TOPAZ_AMBER_IP
+	/* Force reset. */
+	board_reset_sysctrl(RUBY_SYS_CTL_RESET_ALL);
+#else
+	/* Tell ST HOST to reset Amber */
+	amber_trigger_wifi2soc_interrupt(TOPAZ_AMBER_WIFI2SOC_EMERGENCY);
+	/* Halt the processor */
+	__asm__ __volatile__("flag  %0"::"i"(STATUS_H_SET));
+#endif
+
+	/* Board must be resetted before this point! */
+	while(1);
+}
+
+int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	board_reset("reset command\n");
+	return 0;
+}
+
diff --git a/board/ruby/rtl8367b/rtl8367b_api.c b/board/ruby/rtl8367b/rtl8367b_api.c
new file mode 100644
index 0000000..5e2a091
--- /dev/null
+++ b/board/ruby/rtl8367b/rtl8367b_api.c
@@ -0,0 +1,1249 @@
+/*
+ * Copyright (C) 2010 Realtek Semiconductor Corp.
+ * All Rights Reserved.
+ *
+ * This program is the proprietary software of Realtek Semiconductor
+ * Corporation and/or its licensors, and only be used, duplicated,
+ * modified or distributed under the authorized license from Realtek.
+ *
+ * ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER
+ * THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
+ *
+ * $Revision: 33266 $
+ * $Date: 2012-10-08 14:33:47 +0800 (星期一, 08 十月 2012) $
+ *
+ * Purpose : RTK switch high-level API for RTL8367/RTL8367B
+ * Feature : Here is a list of all functions and variables in this module.
+ *
+ */
+
+#include "rtl8367b_init.h"
+#include "rtl8367b_smi.h"
+
+#define DELAY_800MS_FOR_CHIP_STATABLE() {  }
+
+uint16_t	(*init_para)[2];
+uint16_t	init_size;
+
+#if defined(CHIP_RTL8363SB)
+uint16_t ChipData00[][2]= {
+/*Code of Func*/
+{0x1B03, 0x0876}, {0x1200, 0x7FC4}, {0x0301, 0x0026}, {0x1722, 0x0E14},
+{0x205F, 0x0002}, {0x2059, 0x1A00}, {0x205F, 0x0000}, {0x207F, 0x0002},
+{0x2077, 0x0000}, {0x2078, 0x0000}, {0x2079, 0x0000}, {0x207A, 0x0000},
+{0x207B, 0x0000}, {0x207F, 0x0000}, {0x205F, 0x0002}, {0x2053, 0x0000},
+{0x2054, 0x0000}, {0x2055, 0x0000}, {0x2056, 0x0000}, {0x2057, 0x0000},
+{0x205F, 0x0000}, {0x12A4, 0x110A}, {0x12A6, 0x150A}, {0x13F1, 0x0013},
+{0x13F4, 0x0010}, {0x13F5, 0x0000}, {0x0018, 0x0F00}, {0x0038, 0x0F00},
+{0x0058, 0x0F00}, {0x0078, 0x0F00}, {0x0098, 0x0F00}, {0x12B6, 0x0C02},
+{0x12B7, 0x030F}, {0x12B8, 0x11FF}, {0x12BC, 0x0004}, {0x1362, 0x0115},
+{0x1363, 0x0002}, {0x1363, 0x0000}, {0x133F, 0x0030}, {0x133E, 0x000E},
+{0x221F, 0x0007}, {0x221E, 0x002D}, {0x2218, 0xF030}, {0x221F, 0x0007},
+{0x221E, 0x0023}, {0x2216, 0x0005}, {0x2215, 0x00B9}, {0x2219, 0x0044},
+{0x2215, 0x00BA}, {0x2219, 0x0020}, {0x2215, 0x00BB}, {0x2219, 0x00C1},
+{0x2215, 0x0148}, {0x2219, 0x0096}, {0x2215, 0x016E}, {0x2219, 0x0026},
+{0x2216, 0x0000}, {0x2216, 0x0000}, {0x221E, 0x002D}, {0x2218, 0xF010},
+{0x221F, 0x0007}, {0x221E, 0x0020}, {0x2215, 0x0D00}, {0x221F, 0x0000},
+{0x221F, 0x0000}, {0x2217, 0x2160}, {0x221F, 0x0001}, {0x2210, 0xF25E},
+{0x221F, 0x0007}, {0x221E, 0x0042}, {0x2215, 0x0F00}, {0x2215, 0x0F00},
+{0x2216, 0x7408}, {0x2215, 0x0E00}, {0x2215, 0x0F00}, {0x2215, 0x0F01},
+{0x2216, 0x4000}, {0x2215, 0x0E01}, {0x2215, 0x0F01}, {0x2215, 0x0F02},
+{0x2216, 0x9400}, {0x2215, 0x0E02}, {0x2215, 0x0F02}, {0x2215, 0x0F03},
+{0x2216, 0x7408}, {0x2215, 0x0E03}, {0x2215, 0x0F03}, {0x2215, 0x0F04},
+{0x2216, 0x4008}, {0x2215, 0x0E04}, {0x2215, 0x0F04}, {0x2215, 0x0F05},
+{0x2216, 0x9400}, {0x2215, 0x0E05}, {0x2215, 0x0F05}, {0x2215, 0x0F06},
+{0x2216, 0x0803}, {0x2215, 0x0E06}, {0x2215, 0x0F06}, {0x2215, 0x0D00},
+{0x2215, 0x0100}, {0x221F, 0x0001}, {0x2210, 0xF05E}, {0x221F, 0x0000},
+{0x2217, 0x2100}, {0x221F, 0x0000}, {0x220D, 0x0003}, {0x220E, 0x0015},
+{0x220D, 0x4003}, {0x220E, 0x0006}, {0x221F, 0x0000}, {0x2200, 0x1340},
+{0x133F, 0x0010}, {0x12A0, 0x0058}, {0x12A1, 0x0058}, {0x133E, 0x000E},
+{0x133F, 0x0030}, {0x221F, 0x0000}, {0x2210, 0x0166}, {0x221F, 0x0000},
+{0x133E, 0x000E}, {0x133F, 0x0010}, {0x133F, 0x0030}, {0x133E, 0x000E},
+{0x221F, 0x0005}, {0x2205, 0xFFF6}, {0x2206, 0x0080}, {0x2205, 0x8B6E},
+{0x2206, 0x0000}, {0x220F, 0x0100}, {0x2205, 0x8000}, {0x2206, 0x0280},
+{0x2206, 0x28F7}, {0x2206, 0x00E0}, {0x2206, 0xFFF7}, {0x2206, 0xA080},
+{0x2206, 0x02AE}, {0x2206, 0xF602}, {0x2206, 0x0153}, {0x2206, 0x0201},
+{0x2206, 0x6602}, {0x2206, 0x80B9}, {0x2206, 0xE08B}, {0x2206, 0x8CE1},
+{0x2206, 0x8B8D}, {0x2206, 0x1E01}, {0x2206, 0xE18B}, {0x2206, 0x8E1E},
+{0x2206, 0x01A0}, {0x2206, 0x00E7}, {0x2206, 0xAEDB}, {0x2206, 0xEEE0},
+{0x2206, 0x120E}, {0x2206, 0xEEE0}, {0x2206, 0x1300}, {0x2206, 0xEEE0},
+{0x2206, 0x2001}, {0x2206, 0xEEE0}, {0x2206, 0x2166}, {0x2206, 0xEEE0},
+{0x2206, 0xC463}, {0x2206, 0xEEE0}, {0x2206, 0xC5E8}, {0x2206, 0xEEE0},
+{0x2206, 0xC699}, {0x2206, 0xEEE0}, {0x2206, 0xC7C2}, {0x2206, 0xEEE0},
+{0x2206, 0xC801}, {0x2206, 0xEEE0}, {0x2206, 0xC913}, {0x2206, 0xEEE0},
+{0x2206, 0xCA30}, {0x2206, 0xEEE0}, {0x2206, 0xCB3E}, {0x2206, 0xEEE0},
+{0x2206, 0xDCE1}, {0x2206, 0xEEE0}, {0x2206, 0xDD00}, {0x2206, 0xEEE2},
+{0x2206, 0x0001}, {0x2206, 0xEEE2}, {0x2206, 0x0100}, {0x2206, 0xEEE4},
+{0x2206, 0x8860}, {0x2206, 0xEEE4}, {0x2206, 0x8902}, {0x2206, 0xEEE4},
+{0x2206, 0x8C00}, {0x2206, 0xEEE4}, {0x2206, 0x8D30}, {0x2206, 0xEEEA},
+{0x2206, 0x1480}, {0x2206, 0xEEEA}, {0x2206, 0x1503}, {0x2206, 0xEEEA},
+{0x2206, 0xC600}, {0x2206, 0xEEEA}, {0x2206, 0xC706}, {0x2206, 0xEE85},
+{0x2206, 0xEE00}, {0x2206, 0xEE85}, {0x2206, 0xEF00}, {0x2206, 0xEE8B},
+{0x2206, 0x6750}, {0x2206, 0xEE8B}, {0x2206, 0x6632}, {0x2206, 0xEE8A},
+{0x2206, 0xD448}, {0x2206, 0xEE8A}, {0x2206, 0xD548}, {0x2206, 0xEE8A},
+{0x2206, 0xD649}, {0x2206, 0xEE8A}, {0x2206, 0xD7F8}, {0x2206, 0xEE8B},
+{0x2206, 0x85E2}, {0x2206, 0xEE8B}, {0x2206, 0x8700}, {0x2206, 0xEEFF},
+{0x2206, 0xF600}, {0x2206, 0xEEFF}, {0x2206, 0xF7FC}, {0x2206, 0x04F8},
+{0x2206, 0xE08B}, {0x2206, 0x8EAD}, {0x2206, 0x2023}, {0x2206, 0xF620},
+{0x2206, 0xE48B}, {0x2206, 0x8E02}, {0x2206, 0x2877}, {0x2206, 0x0225},
+{0x2206, 0xC702}, {0x2206, 0x26A1}, {0x2206, 0x0281}, {0x2206, 0xB302},
+{0x2206, 0x8496}, {0x2206, 0x0202}, {0x2206, 0xA102}, {0x2206, 0x27F1},
+{0x2206, 0x0228}, {0x2206, 0xF902}, {0x2206, 0x2AA0}, {0x2206, 0x0282},
+{0x2206, 0xB8E0}, {0x2206, 0x8B8E}, {0x2206, 0xAD21}, {0x2206, 0x08F6},
+{0x2206, 0x21E4}, {0x2206, 0x8B8E}, {0x2206, 0x0202}, {0x2206, 0x80E0},
+{0x2206, 0x8B8E}, {0x2206, 0xAD22}, {0x2206, 0x05F6}, {0x2206, 0x22E4},
+{0x2206, 0x8B8E}, {0x2206, 0xE08B}, {0x2206, 0x8EAD}, {0x2206, 0x2305},
+{0x2206, 0xF623}, {0x2206, 0xE48B}, {0x2206, 0x8EE0}, {0x2206, 0x8B8E},
+{0x2206, 0xAD24}, {0x2206, 0x08F6}, {0x2206, 0x24E4}, {0x2206, 0x8B8E},
+{0x2206, 0x0227}, {0x2206, 0x6AE0}, {0x2206, 0x8B8E}, {0x2206, 0xAD25},
+{0x2206, 0x05F6}, {0x2206, 0x25E4}, {0x2206, 0x8B8E}, {0x2206, 0xE08B},
+{0x2206, 0x8EAD}, {0x2206, 0x260B}, {0x2206, 0xF626}, {0x2206, 0xE48B},
+{0x2206, 0x8E02}, {0x2206, 0x830D}, {0x2206, 0x021D}, {0x2206, 0x6BE0},
+{0x2206, 0x8B8E}, {0x2206, 0xAD27}, {0x2206, 0x05F6}, {0x2206, 0x27E4},
+{0x2206, 0x8B8E}, {0x2206, 0x0281}, {0x2206, 0x4402}, {0x2206, 0x045C},
+{0x2206, 0xFC04}, {0x2206, 0xF8E0}, {0x2206, 0x8B83}, {0x2206, 0xAD23},
+{0x2206, 0x30E0}, {0x2206, 0xE022}, {0x2206, 0xE1E0}, {0x2206, 0x2359},
+{0x2206, 0x02E0}, {0x2206, 0x85EF}, {0x2206, 0xE585}, {0x2206, 0xEFAC},
+{0x2206, 0x2907}, {0x2206, 0x1F01}, {0x2206, 0x9E51}, {0x2206, 0xAD29},
+{0x2206, 0x20E0}, {0x2206, 0x8B83}, {0x2206, 0xAD21}, {0x2206, 0x06E1},
+{0x2206, 0x8B84}, {0x2206, 0xAD28}, {0x2206, 0x42E0}, {0x2206, 0x8B85},
+{0x2206, 0xAD21}, {0x2206, 0x06E1}, {0x2206, 0x8B84}, {0x2206, 0xAD29},
+{0x2206, 0x36BF}, {0x2206, 0x34BF}, {0x2206, 0x022C}, {0x2206, 0x31AE},
+{0x2206, 0x2EE0}, {0x2206, 0x8B83}, {0x2206, 0xAD21}, {0x2206, 0x10E0},
+{0x2206, 0x8B84}, {0x2206, 0xF620}, {0x2206, 0xE48B}, {0x2206, 0x84EE},
+{0x2206, 0x8ADA}, {0x2206, 0x00EE}, {0x2206, 0x8ADB}, {0x2206, 0x00E0},
+{0x2206, 0x8B85}, {0x2206, 0xAD21}, {0x2206, 0x0CE0}, {0x2206, 0x8B84},
+{0x2206, 0xF621}, {0x2206, 0xE48B}, {0x2206, 0x84EE}, {0x2206, 0x8B72},
+{0x2206, 0xFFBF}, {0x2206, 0x34C2}, {0x2206, 0x022C}, {0x2206, 0x31FC},
+{0x2206, 0x04F8}, {0x2206, 0xFAEF}, {0x2206, 0x69E0}, {0x2206, 0x8B85},
+{0x2206, 0xAD21}, {0x2206, 0x42E0}, {0x2206, 0xE022}, {0x2206, 0xE1E0},
+{0x2206, 0x2358}, {0x2206, 0xC059}, {0x2206, 0x021E}, {0x2206, 0x01E1},
+{0x2206, 0x8B72}, {0x2206, 0x1F10}, {0x2206, 0x9E2F}, {0x2206, 0xE48B},
+{0x2206, 0x72AD}, {0x2206, 0x2123}, {0x2206, 0xE18B}, {0x2206, 0x84F7},
+{0x2206, 0x29E5}, {0x2206, 0x8B84}, {0x2206, 0xAC27}, {0x2206, 0x10AC},
+{0x2206, 0x2605}, {0x2206, 0x0205}, {0x2206, 0x23AE}, {0x2206, 0x1602},
+{0x2206, 0x0535}, {0x2206, 0x0282}, {0x2206, 0x30AE}, {0x2206, 0x0E02},
+{0x2206, 0x056A}, {0x2206, 0x0282}, {0x2206, 0x75AE}, {0x2206, 0x0602},
+{0x2206, 0x04DC}, {0x2206, 0x0282}, {0x2206, 0x04EF}, {0x2206, 0x96FE},
+{0x2206, 0xFC04}, {0x2206, 0xF8F9}, {0x2206, 0xE08B}, {0x2206, 0x87AD},
+{0x2206, 0x2321}, {0x2206, 0xE0EA}, {0x2206, 0x14E1}, {0x2206, 0xEA15},
+{0x2206, 0xAD26}, {0x2206, 0x18F6}, {0x2206, 0x27E4}, {0x2206, 0xEA14},
+{0x2206, 0xE5EA}, {0x2206, 0x15F6}, {0x2206, 0x26E4}, {0x2206, 0xEA14},
+{0x2206, 0xE5EA}, {0x2206, 0x15F7}, {0x2206, 0x27E4}, {0x2206, 0xEA14},
+{0x2206, 0xE5EA}, {0x2206, 0x15FD}, {0x2206, 0xFC04}, {0x2206, 0xF8F9},
+{0x2206, 0xE08B}, {0x2206, 0x87AD}, {0x2206, 0x233A}, {0x2206, 0xAD22},
+{0x2206, 0x37E0}, {0x2206, 0xE020}, {0x2206, 0xE1E0}, {0x2206, 0x21AC},
+{0x2206, 0x212E}, {0x2206, 0xE0EA}, {0x2206, 0x14E1}, {0x2206, 0xEA15},
+{0x2206, 0xF627}, {0x2206, 0xE4EA}, {0x2206, 0x14E5}, {0x2206, 0xEA15},
+{0x2206, 0xE2EA}, {0x2206, 0x12E3}, {0x2206, 0xEA13}, {0x2206, 0x5A8F},
+{0x2206, 0x6A20}, {0x2206, 0xE6EA}, {0x2206, 0x12E7}, {0x2206, 0xEA13},
+{0x2206, 0xF726}, {0x2206, 0xE4EA}, {0x2206, 0x14E5}, {0x2206, 0xEA15},
+{0x2206, 0xF727}, {0x2206, 0xE4EA}, {0x2206, 0x14E5}, {0x2206, 0xEA15},
+{0x2206, 0xFDFC}, {0x2206, 0x04F8}, {0x2206, 0xF9E0}, {0x2206, 0x8B87},
+{0x2206, 0xAD23}, {0x2206, 0x38AD}, {0x2206, 0x2135}, {0x2206, 0xE0E0},
+{0x2206, 0x20E1}, {0x2206, 0xE021}, {0x2206, 0xAC21}, {0x2206, 0x2CE0},
+{0x2206, 0xEA14}, {0x2206, 0xE1EA}, {0x2206, 0x15F6}, {0x2206, 0x27E4},
+{0x2206, 0xEA14}, {0x2206, 0xE5EA}, {0x2206, 0x15E2}, {0x2206, 0xEA12},
+{0x2206, 0xE3EA}, {0x2206, 0x135A}, {0x2206, 0x8FE6}, {0x2206, 0xEA12},
+{0x2206, 0xE7EA}, {0x2206, 0x13F7}, {0x2206, 0x26E4}, {0x2206, 0xEA14},
+{0x2206, 0xE5EA}, {0x2206, 0x15F7}, {0x2206, 0x27E4}, {0x2206, 0xEA14},
+{0x2206, 0xE5EA}, {0x2206, 0x15FD}, {0x2206, 0xFC04}, {0x2206, 0xF8FA},
+{0x2206, 0xEF69}, {0x2206, 0xE08B}, {0x2206, 0x86AD}, {0x2206, 0x2146},
+{0x2206, 0xE0E0}, {0x2206, 0x22E1}, {0x2206, 0xE023}, {0x2206, 0x58C0},
+{0x2206, 0x5902}, {0x2206, 0x1E01}, {0x2206, 0xE18B}, {0x2206, 0x651F},
+{0x2206, 0x109E}, {0x2206, 0x33E4}, {0x2206, 0x8B65}, {0x2206, 0xAD21},
+{0x2206, 0x22AD}, {0x2206, 0x272A}, {0x2206, 0xD400}, {0x2206, 0x01BF},
+{0x2206, 0x34F2}, {0x2206, 0x022C}, {0x2206, 0xA2BF}, {0x2206, 0x34F5},
+{0x2206, 0x022C}, {0x2206, 0xE0E0}, {0x2206, 0x8B67}, {0x2206, 0x1B10},
+{0x2206, 0xAA14}, {0x2206, 0xE18B}, {0x2206, 0x660D}, {0x2206, 0x1459},
+{0x2206, 0x0FAE}, {0x2206, 0x05E1}, {0x2206, 0x8B66}, {0x2206, 0x590F},
+{0x2206, 0xBF85}, {0x2206, 0x6102}, {0x2206, 0x2CA2}, {0x2206, 0xEF96},
+{0x2206, 0xFEFC}, {0x2206, 0x04F8}, {0x2206, 0xF9FA}, {0x2206, 0xFBEF},
+{0x2206, 0x79E2}, {0x2206, 0x8AD2}, {0x2206, 0xAC19}, {0x2206, 0x2DE0},
+{0x2206, 0xE036}, {0x2206, 0xE1E0}, {0x2206, 0x37EF}, {0x2206, 0x311F},
+{0x2206, 0x325B}, {0x2206, 0x019E}, {0x2206, 0x1F7A}, {0x2206, 0x0159},
+{0x2206, 0x019F}, {0x2206, 0x0ABF}, {0x2206, 0x348E}, {0x2206, 0x022C},
+{0x2206, 0x31F6}, {0x2206, 0x06AE}, {0x2206, 0x0FF6}, {0x2206, 0x0302},
+{0x2206, 0x0470}, {0x2206, 0xF703}, {0x2206, 0xF706}, {0x2206, 0xBF34},
+{0x2206, 0x9302}, {0x2206, 0x2C31}, {0x2206, 0xAC1A}, {0x2206, 0x25E0},
+{0x2206, 0xE022}, {0x2206, 0xE1E0}, {0x2206, 0x23EF}, {0x2206, 0x300D},
+{0x2206, 0x311F}, {0x2206, 0x325B}, {0x2206, 0x029E}, {0x2206, 0x157A},
+{0x2206, 0x0258}, {0x2206, 0xC4A0}, {0x2206, 0x0408}, {0x2206, 0xBF34},
+{0x2206, 0x9E02}, {0x2206, 0x2C31}, {0x2206, 0xAE06}, {0x2206, 0xBF34},
+{0x2206, 0x9C02}, {0x2206, 0x2C31}, {0x2206, 0xAC1B}, {0x2206, 0x4AE0},
+{0x2206, 0xE012}, {0x2206, 0xE1E0}, {0x2206, 0x13EF}, {0x2206, 0x300D},
+{0x2206, 0x331F}, {0x2206, 0x325B}, {0x2206, 0x1C9E}, {0x2206, 0x3AEF},
+{0x2206, 0x325B}, {0x2206, 0x1C9F}, {0x2206, 0x09BF}, {0x2206, 0x3498},
+{0x2206, 0x022C}, {0x2206, 0x3102}, {0x2206, 0x83C5}, {0x2206, 0x5A03},
+{0x2206, 0x0D03}, {0x2206, 0x581C}, {0x2206, 0x1E20}, {0x2206, 0x0207},
+{0x2206, 0xA0A0}, {0x2206, 0x000E}, {0x2206, 0x0284}, {0x2206, 0x17AD},
+{0x2206, 0x1817}, {0x2206, 0xBF34}, {0x2206, 0x9A02}, {0x2206, 0x2C31},
+{0x2206, 0xAE0F}, {0x2206, 0xBF34}, {0x2206, 0xC802}, {0x2206, 0x2C31},
+{0x2206, 0xBF34}, {0x2206, 0xC502}, {0x2206, 0x2C31}, {0x2206, 0x0284},
+{0x2206, 0x52E6}, {0x2206, 0x8AD2}, {0x2206, 0xEF97}, {0x2206, 0xFFFE},
+{0x2206, 0xFDFC}, {0x2206, 0x04F8}, {0x2206, 0xBF34}, {0x2206, 0xDA02},
+{0x2206, 0x2CE0}, {0x2206, 0xE58A}, {0x2206, 0xD3BF}, {0x2206, 0x34D4},
+{0x2206, 0x022C}, {0x2206, 0xE00C}, {0x2206, 0x1159}, {0x2206, 0x02E0},
+{0x2206, 0x8AD3}, {0x2206, 0x1E01}, {0x2206, 0xE48A}, {0x2206, 0xD3D1},
+{0x2206, 0x00BF}, {0x2206, 0x34DA}, {0x2206, 0x022C}, {0x2206, 0xA2D1},
+{0x2206, 0x01BF}, {0x2206, 0x34D4}, {0x2206, 0x022C}, {0x2206, 0xA2BF},
+{0x2206, 0x34CB}, {0x2206, 0x022C}, {0x2206, 0xE0E5}, {0x2206, 0x8ACE},
+{0x2206, 0xBF85}, {0x2206, 0x6702}, {0x2206, 0x2CE0}, {0x2206, 0xE58A},
+{0x2206, 0xCFBF}, {0x2206, 0x8564}, {0x2206, 0x022C}, {0x2206, 0xE0E5},
+{0x2206, 0x8AD0}, {0x2206, 0xBF85}, {0x2206, 0x6A02}, {0x2206, 0x2CE0},
+{0x2206, 0xE58A}, {0x2206, 0xD1FC}, {0x2206, 0x04F8}, {0x2206, 0xE18A},
+{0x2206, 0xD1BF}, {0x2206, 0x856A}, {0x2206, 0x022C}, {0x2206, 0xA2E1},
+{0x2206, 0x8AD0}, {0x2206, 0xBF85}, {0x2206, 0x6402}, {0x2206, 0x2CA2},
+{0x2206, 0xE18A}, {0x2206, 0xCFBF}, {0x2206, 0x8567}, {0x2206, 0x022C},
+{0x2206, 0xA2E1}, {0x2206, 0x8ACE}, {0x2206, 0xBF34}, {0x2206, 0xCB02},
+{0x2206, 0x2CA2}, {0x2206, 0xE18A}, {0x2206, 0xD3BF}, {0x2206, 0x34DA},
+{0x2206, 0x022C}, {0x2206, 0xA2E1}, {0x2206, 0x8AD3}, {0x2206, 0x0D11},
+{0x2206, 0xBF34}, {0x2206, 0xD402}, {0x2206, 0x2CA2}, {0x2206, 0xFC04},
+{0x2206, 0xF9A0}, {0x2206, 0x0405}, {0x2206, 0xE38A}, {0x2206, 0xD4AE},
+{0x2206, 0x13A0}, {0x2206, 0x0805}, {0x2206, 0xE38A}, {0x2206, 0xD5AE},
+{0x2206, 0x0BA0}, {0x2206, 0x0C05}, {0x2206, 0xE38A}, {0x2206, 0xD6AE},
+{0x2206, 0x03E3}, {0x2206, 0x8AD7}, {0x2206, 0xEF13}, {0x2206, 0xBF34},
+{0x2206, 0xCB02}, {0x2206, 0x2CA2}, {0x2206, 0xEF13}, {0x2206, 0x0D11},
+{0x2206, 0xBF85}, {0x2206, 0x6702}, {0x2206, 0x2CA2}, {0x2206, 0xEF13},
+{0x2206, 0x0D14}, {0x2206, 0xBF85}, {0x2206, 0x6402}, {0x2206, 0x2CA2},
+{0x2206, 0xEF13}, {0x2206, 0x0D17}, {0x2206, 0xBF85}, {0x2206, 0x6A02},
+{0x2206, 0x2CA2}, {0x2206, 0xFD04}, {0x2206, 0xF8E0}, {0x2206, 0x8B85},
+{0x2206, 0xAD27}, {0x2206, 0x2DE0}, {0x2206, 0xE036}, {0x2206, 0xE1E0},
+{0x2206, 0x37E1}, {0x2206, 0x8B73}, {0x2206, 0x1F10}, {0x2206, 0x9E20},
+{0x2206, 0xE48B}, {0x2206, 0x73AC}, {0x2206, 0x200B}, {0x2206, 0xAC21},
+{0x2206, 0x0DAC}, {0x2206, 0x250F}, {0x2206, 0xAC27}, {0x2206, 0x0EAE},
+{0x2206, 0x0F02}, {0x2206, 0x84CC}, {0x2206, 0xAE0A}, {0x2206, 0x0284},
+{0x2206, 0xD1AE}, {0x2206, 0x05AE}, {0x2206, 0x0302}, {0x2206, 0x84D8},
+{0x2206, 0xFC04}, {0x2206, 0xEE8B}, {0x2206, 0x6800}, {0x2206, 0x0402},
+{0x2206, 0x84E5}, {0x2206, 0x0285}, {0x2206, 0x2804}, {0x2206, 0x0285},
+{0x2206, 0x4904}, {0x2206, 0xEE8B}, {0x2206, 0x6800}, {0x2206, 0xEE8B},
+{0x2206, 0x6902}, {0x2206, 0x04F8}, {0x2206, 0xF9E0}, {0x2206, 0x8B85},
+{0x2206, 0xAD26}, {0x2206, 0x38D0}, {0x2206, 0x0B02}, {0x2206, 0x2B4D},
+{0x2206, 0x5882}, {0x2206, 0x7882}, {0x2206, 0x9F2D}, {0x2206, 0xE08B},
+{0x2206, 0x68E1}, {0x2206, 0x8B69}, {0x2206, 0x1F10}, {0x2206, 0x9EC8},
+{0x2206, 0x10E4}, {0x2206, 0x8B68}, {0x2206, 0xE0E0}, {0x2206, 0x00E1},
+{0x2206, 0xE001}, {0x2206, 0xF727}, {0x2206, 0xE4E0}, {0x2206, 0x00E5},
+{0x2206, 0xE001}, {0x2206, 0xE2E0}, {0x2206, 0x20E3}, {0x2206, 0xE021},
+{0x2206, 0xAD30}, {0x2206, 0xF7F6}, {0x2206, 0x27E4}, {0x2206, 0xE000},
+{0x2206, 0xE5E0}, {0x2206, 0x01FD}, {0x2206, 0xFC04}, {0x2206, 0xF8FA},
+{0x2206, 0xEF69}, {0x2206, 0xE08B}, {0x2206, 0x86AD}, {0x2206, 0x2212},
+{0x2206, 0xE0E0}, {0x2206, 0x14E1}, {0x2206, 0xE015}, {0x2206, 0xAD26},
+{0x2206, 0x9CE1}, {0x2206, 0x85E0}, {0x2206, 0xBF85}, {0x2206, 0x6D02},
+{0x2206, 0x2CA2}, {0x2206, 0xEF96}, {0x2206, 0xFEFC}, {0x2206, 0x04F8},
+{0x2206, 0xFAEF}, {0x2206, 0x69E0}, {0x2206, 0x8B86}, {0x2206, 0xAD22},
+{0x2206, 0x09E1}, {0x2206, 0x85E1}, {0x2206, 0xBF85}, {0x2206, 0x6D02},
+{0x2206, 0x2CA2}, {0x2206, 0xEF96}, {0x2206, 0xFEFC}, {0x2206, 0x0464},
+{0x2206, 0xE48C}, {0x2206, 0xFDE4}, {0x2206, 0x80CA}, {0x2206, 0xE480},
+{0x2206, 0x66E0}, {0x2206, 0x8E70}, {0x2206, 0xE076}, {0x2205, 0xE142},
+{0x2206, 0x0701}, {0x2205, 0xE140}, {0x2206, 0x0405}, {0x220F, 0x0000},
+{0x221F, 0x0000}, {0x2200, 0x1340}, {0x133E, 0x000E}, {0x133F, 0x0010},
+{0x13EB, 0x11BB}, {0x2017, 0xA11F}, {0x2077, 0xA11F}, {0x2097, 0xA11F}
+ };
+/*End of ChipData00[][2]*/
+
+uint16_t ChipData01[][2]= {
+/*Code of Func*/
+{0x1303, 0x0778}, {0x1304, 0x7777}, {0x13E2, 0x01FE}, {0x1310, 0x1075},
+{0x1305, 0x0003}, {0x1B03, 0x0876}, {0x1200, 0x7FC4}, {0x1305, 0xC000},
+{0x121E, 0x03CA}, {0x1233, 0x0352}, {0x1234, 0x0064}, {0x1237, 0x0096},
+{0x1238, 0x0078}, {0x1239, 0x0084}, {0x123A, 0x0030}, {0x205F, 0x0002},
+{0x2059, 0x1A00}, {0x205F, 0x0000}, {0x207F, 0x0002}, {0x2077, 0x0000},
+{0x2078, 0x0000}, {0x2079, 0x0000}, {0x207A, 0x0000}, {0x207B, 0x0000},
+{0x207F, 0x0000}, {0x205F, 0x0002}, {0x2053, 0x0000}, {0x2054, 0x0000},
+{0x2055, 0x0000}, {0x2056, 0x0000}, {0x2057, 0x0000}, {0x205F, 0x0000},
+{0x133F, 0x0030}, {0x133E, 0x000E}, {0x221F, 0x0005}, {0x2205, 0x8B86},
+{0x2206, 0x800E}, {0x221F, 0x0000}, {0x133F, 0x0010}, {0x12A3, 0x2200},
+{0x6107, 0xE58B}, {0x6103, 0xA970}, {0x0018, 0x0F00}, {0x0038, 0x0F00},
+{0x0058, 0x0F00}, {0x0078, 0x0F00}, {0x0098, 0x0F00}, {0x133F, 0x0030},
+{0x133E, 0x000E}, {0x221F, 0x0005}, {0x2205, 0x8B6E}, {0x2206, 0x0000},
+{0x220F, 0x0100}, {0x2205, 0xFFF6}, {0x2206, 0x0080}, {0x2205, 0x8000},
+{0x2206, 0x0280}, {0x2206, 0x2BF7}, {0x2206, 0x00E0}, {0x2206, 0xFFF7},
+{0x2206, 0xA080}, {0x2206, 0x02AE}, {0x2206, 0xF602}, {0x2206, 0x0153},
+{0x2206, 0x0201}, {0x2206, 0x6602}, {0x2206, 0x8044}, {0x2206, 0x0201},
+{0x2206, 0x7CE0}, {0x2206, 0x8B8C}, {0x2206, 0xE18B}, {0x2206, 0x8D1E},
+{0x2206, 0x01E1}, {0x2206, 0x8B8E}, {0x2206, 0x1E01}, {0x2206, 0xA000},
+{0x2206, 0xE4AE}, {0x2206, 0xD8EE}, {0x2206, 0x85C0}, {0x2206, 0x00EE},
+{0x2206, 0x85C1}, {0x2206, 0x00EE}, {0x2206, 0x8AFC}, {0x2206, 0x07EE},
+{0x2206, 0x8AFD}, {0x2206, 0x73EE}, {0x2206, 0xFFF6}, {0x2206, 0x00EE},
+{0x2206, 0xFFF7}, {0x2206, 0xFC04}, {0x2206, 0xF8E0}, {0x2206, 0x8B8E},
+{0x2206, 0xAD20}, {0x2206, 0x0302}, {0x2206, 0x8050}, {0x2206, 0xFC04},
+{0x2206, 0xF8F9}, {0x2206, 0xE08B}, {0x2206, 0x85AD}, {0x2206, 0x2548},
+{0x2206, 0xE08A}, {0x2206, 0xE4E1}, {0x2206, 0x8AE5}, {0x2206, 0x7C00},
+{0x2206, 0x009E}, {0x2206, 0x35EE}, {0x2206, 0x8AE4}, {0x2206, 0x00EE},
+{0x2206, 0x8AE5}, {0x2206, 0x00E0}, {0x2206, 0x8AFC}, {0x2206, 0xE18A},
+{0x2206, 0xFDE2}, {0x2206, 0x85C0}, {0x2206, 0xE385}, {0x2206, 0xC102},
+{0x2206, 0x2DAC}, {0x2206, 0xAD20}, {0x2206, 0x12EE}, {0x2206, 0x8AE4},
+{0x2206, 0x03EE}, {0x2206, 0x8AE5}, {0x2206, 0xB7EE}, {0x2206, 0x85C0},
+{0x2206, 0x00EE}, {0x2206, 0x85C1}, {0x2206, 0x00AE}, {0x2206, 0x1115},
+{0x2206, 0xE685}, {0x2206, 0xC0E7}, {0x2206, 0x85C1}, {0x2206, 0xAE08},
+{0x2206, 0xEE85}, {0x2206, 0xC000}, {0x2206, 0xEE85}, {0x2206, 0xC100},
+{0x2206, 0xFDFC}, {0x2206, 0x0400}, {0x2205, 0xE142}, {0x2206, 0x0701},
+{0x2205, 0xE140}, {0x2206, 0x0405}, {0x220F, 0x0000}, {0x221F, 0x0000},
+{0x133E, 0x000E}, {0x133F, 0x0010}, {0x13EB, 0x11BB}, {0x207F, 0x0002},
+{0x2073, 0x1D22}, {0x207F, 0x0000}, {0x133F, 0x0030}, {0x133E, 0x000E},
+{0x2200, 0x1340}, {0x133E, 0x000E}, {0x133F, 0x0010}, {0x2000, 0x1940},
+{0x2060, 0x1940}, {0x2080, 0x1940}, {0x2017, 0xA100}, {0x2077, 0xA100},
+{0x2097, 0xA100}, };
+/*End of ChipData01[][2]*/
+#endif
+
+#if defined(CHIP_RTL8365MB)
+uint16_t ChipData10[][2]= {
+/*Code of Func*/
+{0x1B03, 0x0876}, {0x1200, 0x7FC4}, {0x0301, 0x0026}, {0x1722, 0x0E14},
+{0x205F, 0x0002}, {0x2059, 0x1A00}, {0x205F, 0x0000}, {0x207F, 0x0002},
+{0x2077, 0x0000}, {0x2078, 0x0000}, {0x2079, 0x0000}, {0x207A, 0x0000},
+{0x207B, 0x0000}, {0x207F, 0x0000}, {0x205F, 0x0002}, {0x2053, 0x0000},
+{0x2054, 0x0000}, {0x2055, 0x0000}, {0x2056, 0x0000}, {0x2057, 0x0000},
+{0x205F, 0x0000}, {0x12A4, 0x110A}, {0x12A6, 0x150A}, {0x13F1, 0x0013},
+{0x13F4, 0x0010}, {0x13F5, 0x0000}, {0x0018, 0x0F00}, {0x0038, 0x0F00},
+{0x0058, 0x0F00}, {0x0078, 0x0F00}, {0x0098, 0x0F00}, {0x12B6, 0x0C02},
+{0x12B7, 0x030F}, {0x12B8, 0x11FF}, {0x12BC, 0x0004}, {0x1362, 0x0115},
+{0x1363, 0x0002}, {0x1363, 0x0000}, {0x133F, 0x0030}, {0x133E, 0x000E},
+{0x221F, 0x0007}, {0x221E, 0x002D}, {0x2218, 0xF030}, {0x221F, 0x0007},
+{0x221E, 0x0023}, {0x2216, 0x0005}, {0x2215, 0x00B9}, {0x2219, 0x0044},
+{0x2215, 0x00BA}, {0x2219, 0x0020}, {0x2215, 0x00BB}, {0x2219, 0x00C1},
+{0x2215, 0x0148}, {0x2219, 0x0096}, {0x2215, 0x016E}, {0x2219, 0x0026},
+{0x2216, 0x0000}, {0x2216, 0x0000}, {0x221E, 0x002D}, {0x2218, 0xF010},
+{0x221F, 0x0007}, {0x221E, 0x0020}, {0x2215, 0x0D00}, {0x221F, 0x0000},
+{0x221F, 0x0000}, {0x2217, 0x2160}, {0x221F, 0x0001}, {0x2210, 0xF25E},
+{0x221F, 0x0007}, {0x221E, 0x0042}, {0x2215, 0x0F00}, {0x2215, 0x0F00},
+{0x2216, 0x7408}, {0x2215, 0x0E00}, {0x2215, 0x0F00}, {0x2215, 0x0F01},
+{0x2216, 0x4000}, {0x2215, 0x0E01}, {0x2215, 0x0F01}, {0x2215, 0x0F02},
+{0x2216, 0x9400}, {0x2215, 0x0E02}, {0x2215, 0x0F02}, {0x2215, 0x0F03},
+{0x2216, 0x7408}, {0x2215, 0x0E03}, {0x2215, 0x0F03}, {0x2215, 0x0F04},
+{0x2216, 0x4008}, {0x2215, 0x0E04}, {0x2215, 0x0F04}, {0x2215, 0x0F05},
+{0x2216, 0x9400}, {0x2215, 0x0E05}, {0x2215, 0x0F05}, {0x2215, 0x0F06},
+{0x2216, 0x0803}, {0x2215, 0x0E06}, {0x2215, 0x0F06}, {0x2215, 0x0D00},
+{0x2215, 0x0100}, {0x221F, 0x0001}, {0x2210, 0xF05E}, {0x221F, 0x0000},
+{0x2217, 0x2100}, {0x221F, 0x0000}, {0x220D, 0x0003}, {0x220E, 0x0015},
+{0x220D, 0x4003}, {0x220E, 0x0006}, {0x221F, 0x0000}, {0x2200, 0x1340},
+{0x133F, 0x0010}, {0x12A0, 0x0058}, {0x12A1, 0x0058}, {0x133E, 0x000E},
+{0x133F, 0x0030}, {0x221F, 0x0000}, {0x2210, 0x0166}, {0x221F, 0x0000},
+{0x133E, 0x000E}, {0x133F, 0x0010}, {0x133F, 0x0030}, {0x133E, 0x000E},
+{0x221F, 0x0005}, {0x2205, 0xFFF6}, {0x2206, 0x0080}, {0x2205, 0x8B6E},
+{0x2206, 0x0000}, {0x220F, 0x0100}, {0x2205, 0x8000}, {0x2206, 0x0280},
+{0x2206, 0x28F7}, {0x2206, 0x00E0}, {0x2206, 0xFFF7}, {0x2206, 0xA080},
+{0x2206, 0x02AE}, {0x2206, 0xF602}, {0x2206, 0x0153}, {0x2206, 0x0201},
+{0x2206, 0x6602}, {0x2206, 0x80B9}, {0x2206, 0xE08B}, {0x2206, 0x8CE1},
+{0x2206, 0x8B8D}, {0x2206, 0x1E01}, {0x2206, 0xE18B}, {0x2206, 0x8E1E},
+{0x2206, 0x01A0}, {0x2206, 0x00E7}, {0x2206, 0xAEDB}, {0x2206, 0xEEE0},
+{0x2206, 0x120E}, {0x2206, 0xEEE0}, {0x2206, 0x1300}, {0x2206, 0xEEE0},
+{0x2206, 0x2001}, {0x2206, 0xEEE0}, {0x2206, 0x2166}, {0x2206, 0xEEE0},
+{0x2206, 0xC463}, {0x2206, 0xEEE0}, {0x2206, 0xC5E8}, {0x2206, 0xEEE0},
+{0x2206, 0xC699}, {0x2206, 0xEEE0}, {0x2206, 0xC7C2}, {0x2206, 0xEEE0},
+{0x2206, 0xC801}, {0x2206, 0xEEE0}, {0x2206, 0xC913}, {0x2206, 0xEEE0},
+{0x2206, 0xCA30}, {0x2206, 0xEEE0}, {0x2206, 0xCB3E}, {0x2206, 0xEEE0},
+{0x2206, 0xDCE1}, {0x2206, 0xEEE0}, {0x2206, 0xDD00}, {0x2206, 0xEEE2},
+{0x2206, 0x0001}, {0x2206, 0xEEE2}, {0x2206, 0x0100}, {0x2206, 0xEEE4},
+{0x2206, 0x8860}, {0x2206, 0xEEE4}, {0x2206, 0x8902}, {0x2206, 0xEEE4},
+{0x2206, 0x8C00}, {0x2206, 0xEEE4}, {0x2206, 0x8D30}, {0x2206, 0xEEEA},
+{0x2206, 0x1480}, {0x2206, 0xEEEA}, {0x2206, 0x1503}, {0x2206, 0xEEEA},
+{0x2206, 0xC600}, {0x2206, 0xEEEA}, {0x2206, 0xC706}, {0x2206, 0xEE85},
+{0x2206, 0xEE00}, {0x2206, 0xEE85}, {0x2206, 0xEF00}, {0x2206, 0xEE8B},
+{0x2206, 0x6750}, {0x2206, 0xEE8B}, {0x2206, 0x6632}, {0x2206, 0xEE8A},
+{0x2206, 0xD448}, {0x2206, 0xEE8A}, {0x2206, 0xD548}, {0x2206, 0xEE8A},
+{0x2206, 0xD649}, {0x2206, 0xEE8A}, {0x2206, 0xD7F8}, {0x2206, 0xEE8B},
+{0x2206, 0x85E2}, {0x2206, 0xEE8B}, {0x2206, 0x8700}, {0x2206, 0xEEFF},
+{0x2206, 0xF600}, {0x2206, 0xEEFF}, {0x2206, 0xF7FC}, {0x2206, 0x04F8},
+{0x2206, 0xE08B}, {0x2206, 0x8EAD}, {0x2206, 0x2023}, {0x2206, 0xF620},
+{0x2206, 0xE48B}, {0x2206, 0x8E02}, {0x2206, 0x2877}, {0x2206, 0x0225},
+{0x2206, 0xC702}, {0x2206, 0x26A1}, {0x2206, 0x0281}, {0x2206, 0xB302},
+{0x2206, 0x8496}, {0x2206, 0x0202}, {0x2206, 0xA102}, {0x2206, 0x27F1},
+{0x2206, 0x0228}, {0x2206, 0xF902}, {0x2206, 0x2AA0}, {0x2206, 0x0282},
+{0x2206, 0xB8E0}, {0x2206, 0x8B8E}, {0x2206, 0xAD21}, {0x2206, 0x08F6},
+{0x2206, 0x21E4}, {0x2206, 0x8B8E}, {0x2206, 0x0202}, {0x2206, 0x80E0},
+{0x2206, 0x8B8E}, {0x2206, 0xAD22}, {0x2206, 0x05F6}, {0x2206, 0x22E4},
+{0x2206, 0x8B8E}, {0x2206, 0xE08B}, {0x2206, 0x8EAD}, {0x2206, 0x2305},
+{0x2206, 0xF623}, {0x2206, 0xE48B}, {0x2206, 0x8EE0}, {0x2206, 0x8B8E},
+{0x2206, 0xAD24}, {0x2206, 0x08F6}, {0x2206, 0x24E4}, {0x2206, 0x8B8E},
+{0x2206, 0x0227}, {0x2206, 0x6AE0}, {0x2206, 0x8B8E}, {0x2206, 0xAD25},
+{0x2206, 0x05F6}, {0x2206, 0x25E4}, {0x2206, 0x8B8E}, {0x2206, 0xE08B},
+{0x2206, 0x8EAD}, {0x2206, 0x260B}, {0x2206, 0xF626}, {0x2206, 0xE48B},
+{0x2206, 0x8E02}, {0x2206, 0x830D}, {0x2206, 0x021D}, {0x2206, 0x6BE0},
+{0x2206, 0x8B8E}, {0x2206, 0xAD27}, {0x2206, 0x05F6}, {0x2206, 0x27E4},
+{0x2206, 0x8B8E}, {0x2206, 0x0281}, {0x2206, 0x4402}, {0x2206, 0x045C},
+{0x2206, 0xFC04}, {0x2206, 0xF8E0}, {0x2206, 0x8B83}, {0x2206, 0xAD23},
+{0x2206, 0x30E0}, {0x2206, 0xE022}, {0x2206, 0xE1E0}, {0x2206, 0x2359},
+{0x2206, 0x02E0}, {0x2206, 0x85EF}, {0x2206, 0xE585}, {0x2206, 0xEFAC},
+{0x2206, 0x2907}, {0x2206, 0x1F01}, {0x2206, 0x9E51}, {0x2206, 0xAD29},
+{0x2206, 0x20E0}, {0x2206, 0x8B83}, {0x2206, 0xAD21}, {0x2206, 0x06E1},
+{0x2206, 0x8B84}, {0x2206, 0xAD28}, {0x2206, 0x42E0}, {0x2206, 0x8B85},
+{0x2206, 0xAD21}, {0x2206, 0x06E1}, {0x2206, 0x8B84}, {0x2206, 0xAD29},
+{0x2206, 0x36BF}, {0x2206, 0x34BF}, {0x2206, 0x022C}, {0x2206, 0x31AE},
+{0x2206, 0x2EE0}, {0x2206, 0x8B83}, {0x2206, 0xAD21}, {0x2206, 0x10E0},
+{0x2206, 0x8B84}, {0x2206, 0xF620}, {0x2206, 0xE48B}, {0x2206, 0x84EE},
+{0x2206, 0x8ADA}, {0x2206, 0x00EE}, {0x2206, 0x8ADB}, {0x2206, 0x00E0},
+{0x2206, 0x8B85}, {0x2206, 0xAD21}, {0x2206, 0x0CE0}, {0x2206, 0x8B84},
+{0x2206, 0xF621}, {0x2206, 0xE48B}, {0x2206, 0x84EE}, {0x2206, 0x8B72},
+{0x2206, 0xFFBF}, {0x2206, 0x34C2}, {0x2206, 0x022C}, {0x2206, 0x31FC},
+{0x2206, 0x04F8}, {0x2206, 0xFAEF}, {0x2206, 0x69E0}, {0x2206, 0x8B85},
+{0x2206, 0xAD21}, {0x2206, 0x42E0}, {0x2206, 0xE022}, {0x2206, 0xE1E0},
+{0x2206, 0x2358}, {0x2206, 0xC059}, {0x2206, 0x021E}, {0x2206, 0x01E1},
+{0x2206, 0x8B72}, {0x2206, 0x1F10}, {0x2206, 0x9E2F}, {0x2206, 0xE48B},
+{0x2206, 0x72AD}, {0x2206, 0x2123}, {0x2206, 0xE18B}, {0x2206, 0x84F7},
+{0x2206, 0x29E5}, {0x2206, 0x8B84}, {0x2206, 0xAC27}, {0x2206, 0x10AC},
+{0x2206, 0x2605}, {0x2206, 0x0205}, {0x2206, 0x23AE}, {0x2206, 0x1602},
+{0x2206, 0x0535}, {0x2206, 0x0282}, {0x2206, 0x30AE}, {0x2206, 0x0E02},
+{0x2206, 0x056A}, {0x2206, 0x0282}, {0x2206, 0x75AE}, {0x2206, 0x0602},
+{0x2206, 0x04DC}, {0x2206, 0x0282}, {0x2206, 0x04EF}, {0x2206, 0x96FE},
+{0x2206, 0xFC04}, {0x2206, 0xF8F9}, {0x2206, 0xE08B}, {0x2206, 0x87AD},
+{0x2206, 0x2321}, {0x2206, 0xE0EA}, {0x2206, 0x14E1}, {0x2206, 0xEA15},
+{0x2206, 0xAD26}, {0x2206, 0x18F6}, {0x2206, 0x27E4}, {0x2206, 0xEA14},
+{0x2206, 0xE5EA}, {0x2206, 0x15F6}, {0x2206, 0x26E4}, {0x2206, 0xEA14},
+{0x2206, 0xE5EA}, {0x2206, 0x15F7}, {0x2206, 0x27E4}, {0x2206, 0xEA14},
+{0x2206, 0xE5EA}, {0x2206, 0x15FD}, {0x2206, 0xFC04}, {0x2206, 0xF8F9},
+{0x2206, 0xE08B}, {0x2206, 0x87AD}, {0x2206, 0x233A}, {0x2206, 0xAD22},
+{0x2206, 0x37E0}, {0x2206, 0xE020}, {0x2206, 0xE1E0}, {0x2206, 0x21AC},
+{0x2206, 0x212E}, {0x2206, 0xE0EA}, {0x2206, 0x14E1}, {0x2206, 0xEA15},
+{0x2206, 0xF627}, {0x2206, 0xE4EA}, {0x2206, 0x14E5}, {0x2206, 0xEA15},
+{0x2206, 0xE2EA}, {0x2206, 0x12E3}, {0x2206, 0xEA13}, {0x2206, 0x5A8F},
+{0x2206, 0x6A20}, {0x2206, 0xE6EA}, {0x2206, 0x12E7}, {0x2206, 0xEA13},
+{0x2206, 0xF726}, {0x2206, 0xE4EA}, {0x2206, 0x14E5}, {0x2206, 0xEA15},
+{0x2206, 0xF727}, {0x2206, 0xE4EA}, {0x2206, 0x14E5}, {0x2206, 0xEA15},
+{0x2206, 0xFDFC}, {0x2206, 0x04F8}, {0x2206, 0xF9E0}, {0x2206, 0x8B87},
+{0x2206, 0xAD23}, {0x2206, 0x38AD}, {0x2206, 0x2135}, {0x2206, 0xE0E0},
+{0x2206, 0x20E1}, {0x2206, 0xE021}, {0x2206, 0xAC21}, {0x2206, 0x2CE0},
+{0x2206, 0xEA14}, {0x2206, 0xE1EA}, {0x2206, 0x15F6}, {0x2206, 0x27E4},
+{0x2206, 0xEA14}, {0x2206, 0xE5EA}, {0x2206, 0x15E2}, {0x2206, 0xEA12},
+{0x2206, 0xE3EA}, {0x2206, 0x135A}, {0x2206, 0x8FE6}, {0x2206, 0xEA12},
+{0x2206, 0xE7EA}, {0x2206, 0x13F7}, {0x2206, 0x26E4}, {0x2206, 0xEA14},
+{0x2206, 0xE5EA}, {0x2206, 0x15F7}, {0x2206, 0x27E4}, {0x2206, 0xEA14},
+{0x2206, 0xE5EA}, {0x2206, 0x15FD}, {0x2206, 0xFC04}, {0x2206, 0xF8FA},
+{0x2206, 0xEF69}, {0x2206, 0xE08B}, {0x2206, 0x86AD}, {0x2206, 0x2146},
+{0x2206, 0xE0E0}, {0x2206, 0x22E1}, {0x2206, 0xE023}, {0x2206, 0x58C0},
+{0x2206, 0x5902}, {0x2206, 0x1E01}, {0x2206, 0xE18B}, {0x2206, 0x651F},
+{0x2206, 0x109E}, {0x2206, 0x33E4}, {0x2206, 0x8B65}, {0x2206, 0xAD21},
+{0x2206, 0x22AD}, {0x2206, 0x272A}, {0x2206, 0xD400}, {0x2206, 0x01BF},
+{0x2206, 0x34F2}, {0x2206, 0x022C}, {0x2206, 0xA2BF}, {0x2206, 0x34F5},
+{0x2206, 0x022C}, {0x2206, 0xE0E0}, {0x2206, 0x8B67}, {0x2206, 0x1B10},
+{0x2206, 0xAA14}, {0x2206, 0xE18B}, {0x2206, 0x660D}, {0x2206, 0x1459},
+{0x2206, 0x0FAE}, {0x2206, 0x05E1}, {0x2206, 0x8B66}, {0x2206, 0x590F},
+{0x2206, 0xBF85}, {0x2206, 0x6102}, {0x2206, 0x2CA2}, {0x2206, 0xEF96},
+{0x2206, 0xFEFC}, {0x2206, 0x04F8}, {0x2206, 0xF9FA}, {0x2206, 0xFBEF},
+{0x2206, 0x79E2}, {0x2206, 0x8AD2}, {0x2206, 0xAC19}, {0x2206, 0x2DE0},
+{0x2206, 0xE036}, {0x2206, 0xE1E0}, {0x2206, 0x37EF}, {0x2206, 0x311F},
+{0x2206, 0x325B}, {0x2206, 0x019E}, {0x2206, 0x1F7A}, {0x2206, 0x0159},
+{0x2206, 0x019F}, {0x2206, 0x0ABF}, {0x2206, 0x348E}, {0x2206, 0x022C},
+{0x2206, 0x31F6}, {0x2206, 0x06AE}, {0x2206, 0x0FF6}, {0x2206, 0x0302},
+{0x2206, 0x0470}, {0x2206, 0xF703}, {0x2206, 0xF706}, {0x2206, 0xBF34},
+{0x2206, 0x9302}, {0x2206, 0x2C31}, {0x2206, 0xAC1A}, {0x2206, 0x25E0},
+{0x2206, 0xE022}, {0x2206, 0xE1E0}, {0x2206, 0x23EF}, {0x2206, 0x300D},
+{0x2206, 0x311F}, {0x2206, 0x325B}, {0x2206, 0x029E}, {0x2206, 0x157A},
+{0x2206, 0x0258}, {0x2206, 0xC4A0}, {0x2206, 0x0408}, {0x2206, 0xBF34},
+{0x2206, 0x9E02}, {0x2206, 0x2C31}, {0x2206, 0xAE06}, {0x2206, 0xBF34},
+{0x2206, 0x9C02}, {0x2206, 0x2C31}, {0x2206, 0xAC1B}, {0x2206, 0x4AE0},
+{0x2206, 0xE012}, {0x2206, 0xE1E0}, {0x2206, 0x13EF}, {0x2206, 0x300D},
+{0x2206, 0x331F}, {0x2206, 0x325B}, {0x2206, 0x1C9E}, {0x2206, 0x3AEF},
+{0x2206, 0x325B}, {0x2206, 0x1C9F}, {0x2206, 0x09BF}, {0x2206, 0x3498},
+{0x2206, 0x022C}, {0x2206, 0x3102}, {0x2206, 0x83C5}, {0x2206, 0x5A03},
+{0x2206, 0x0D03}, {0x2206, 0x581C}, {0x2206, 0x1E20}, {0x2206, 0x0207},
+{0x2206, 0xA0A0}, {0x2206, 0x000E}, {0x2206, 0x0284}, {0x2206, 0x17AD},
+{0x2206, 0x1817}, {0x2206, 0xBF34}, {0x2206, 0x9A02}, {0x2206, 0x2C31},
+{0x2206, 0xAE0F}, {0x2206, 0xBF34}, {0x2206, 0xC802}, {0x2206, 0x2C31},
+{0x2206, 0xBF34}, {0x2206, 0xC502}, {0x2206, 0x2C31}, {0x2206, 0x0284},
+{0x2206, 0x52E6}, {0x2206, 0x8AD2}, {0x2206, 0xEF97}, {0x2206, 0xFFFE},
+{0x2206, 0xFDFC}, {0x2206, 0x04F8}, {0x2206, 0xBF34}, {0x2206, 0xDA02},
+{0x2206, 0x2CE0}, {0x2206, 0xE58A}, {0x2206, 0xD3BF}, {0x2206, 0x34D4},
+{0x2206, 0x022C}, {0x2206, 0xE00C}, {0x2206, 0x1159}, {0x2206, 0x02E0},
+{0x2206, 0x8AD3}, {0x2206, 0x1E01}, {0x2206, 0xE48A}, {0x2206, 0xD3D1},
+{0x2206, 0x00BF}, {0x2206, 0x34DA}, {0x2206, 0x022C}, {0x2206, 0xA2D1},
+{0x2206, 0x01BF}, {0x2206, 0x34D4}, {0x2206, 0x022C}, {0x2206, 0xA2BF},
+{0x2206, 0x34CB}, {0x2206, 0x022C}, {0x2206, 0xE0E5}, {0x2206, 0x8ACE},
+{0x2206, 0xBF85}, {0x2206, 0x6702}, {0x2206, 0x2CE0}, {0x2206, 0xE58A},
+{0x2206, 0xCFBF}, {0x2206, 0x8564}, {0x2206, 0x022C}, {0x2206, 0xE0E5},
+{0x2206, 0x8AD0}, {0x2206, 0xBF85}, {0x2206, 0x6A02}, {0x2206, 0x2CE0},
+{0x2206, 0xE58A}, {0x2206, 0xD1FC}, {0x2206, 0x04F8}, {0x2206, 0xE18A},
+{0x2206, 0xD1BF}, {0x2206, 0x856A}, {0x2206, 0x022C}, {0x2206, 0xA2E1},
+{0x2206, 0x8AD0}, {0x2206, 0xBF85}, {0x2206, 0x6402}, {0x2206, 0x2CA2},
+{0x2206, 0xE18A}, {0x2206, 0xCFBF}, {0x2206, 0x8567}, {0x2206, 0x022C},
+{0x2206, 0xA2E1}, {0x2206, 0x8ACE}, {0x2206, 0xBF34}, {0x2206, 0xCB02},
+{0x2206, 0x2CA2}, {0x2206, 0xE18A}, {0x2206, 0xD3BF}, {0x2206, 0x34DA},
+{0x2206, 0x022C}, {0x2206, 0xA2E1}, {0x2206, 0x8AD3}, {0x2206, 0x0D11},
+{0x2206, 0xBF34}, {0x2206, 0xD402}, {0x2206, 0x2CA2}, {0x2206, 0xFC04},
+{0x2206, 0xF9A0}, {0x2206, 0x0405}, {0x2206, 0xE38A}, {0x2206, 0xD4AE},
+{0x2206, 0x13A0}, {0x2206, 0x0805}, {0x2206, 0xE38A}, {0x2206, 0xD5AE},
+{0x2206, 0x0BA0}, {0x2206, 0x0C05}, {0x2206, 0xE38A}, {0x2206, 0xD6AE},
+{0x2206, 0x03E3}, {0x2206, 0x8AD7}, {0x2206, 0xEF13}, {0x2206, 0xBF34},
+{0x2206, 0xCB02}, {0x2206, 0x2CA2}, {0x2206, 0xEF13}, {0x2206, 0x0D11},
+{0x2206, 0xBF85}, {0x2206, 0x6702}, {0x2206, 0x2CA2}, {0x2206, 0xEF13},
+{0x2206, 0x0D14}, {0x2206, 0xBF85}, {0x2206, 0x6402}, {0x2206, 0x2CA2},
+{0x2206, 0xEF13}, {0x2206, 0x0D17}, {0x2206, 0xBF85}, {0x2206, 0x6A02},
+{0x2206, 0x2CA2}, {0x2206, 0xFD04}, {0x2206, 0xF8E0}, {0x2206, 0x8B85},
+{0x2206, 0xAD27}, {0x2206, 0x2DE0}, {0x2206, 0xE036}, {0x2206, 0xE1E0},
+{0x2206, 0x37E1}, {0x2206, 0x8B73}, {0x2206, 0x1F10}, {0x2206, 0x9E20},
+{0x2206, 0xE48B}, {0x2206, 0x73AC}, {0x2206, 0x200B}, {0x2206, 0xAC21},
+{0x2206, 0x0DAC}, {0x2206, 0x250F}, {0x2206, 0xAC27}, {0x2206, 0x0EAE},
+{0x2206, 0x0F02}, {0x2206, 0x84CC}, {0x2206, 0xAE0A}, {0x2206, 0x0284},
+{0x2206, 0xD1AE}, {0x2206, 0x05AE}, {0x2206, 0x0302}, {0x2206, 0x84D8},
+{0x2206, 0xFC04}, {0x2206, 0xEE8B}, {0x2206, 0x6800}, {0x2206, 0x0402},
+{0x2206, 0x84E5}, {0x2206, 0x0285}, {0x2206, 0x2804}, {0x2206, 0x0285},
+{0x2206, 0x4904}, {0x2206, 0xEE8B}, {0x2206, 0x6800}, {0x2206, 0xEE8B},
+{0x2206, 0x6902}, {0x2206, 0x04F8}, {0x2206, 0xF9E0}, {0x2206, 0x8B85},
+{0x2206, 0xAD26}, {0x2206, 0x38D0}, {0x2206, 0x0B02}, {0x2206, 0x2B4D},
+{0x2206, 0x5882}, {0x2206, 0x7882}, {0x2206, 0x9F2D}, {0x2206, 0xE08B},
+{0x2206, 0x68E1}, {0x2206, 0x8B69}, {0x2206, 0x1F10}, {0x2206, 0x9EC8},
+{0x2206, 0x10E4}, {0x2206, 0x8B68}, {0x2206, 0xE0E0}, {0x2206, 0x00E1},
+{0x2206, 0xE001}, {0x2206, 0xF727}, {0x2206, 0xE4E0}, {0x2206, 0x00E5},
+{0x2206, 0xE001}, {0x2206, 0xE2E0}, {0x2206, 0x20E3}, {0x2206, 0xE021},
+{0x2206, 0xAD30}, {0x2206, 0xF7F6}, {0x2206, 0x27E4}, {0x2206, 0xE000},
+{0x2206, 0xE5E0}, {0x2206, 0x01FD}, {0x2206, 0xFC04}, {0x2206, 0xF8FA},
+{0x2206, 0xEF69}, {0x2206, 0xE08B}, {0x2206, 0x86AD}, {0x2206, 0x2212},
+{0x2206, 0xE0E0}, {0x2206, 0x14E1}, {0x2206, 0xE015}, {0x2206, 0xAD26},
+{0x2206, 0x9CE1}, {0x2206, 0x85E0}, {0x2206, 0xBF85}, {0x2206, 0x6D02},
+{0x2206, 0x2CA2}, {0x2206, 0xEF96}, {0x2206, 0xFEFC}, {0x2206, 0x04F8},
+{0x2206, 0xFAEF}, {0x2206, 0x69E0}, {0x2206, 0x8B86}, {0x2206, 0xAD22},
+{0x2206, 0x09E1}, {0x2206, 0x85E1}, {0x2206, 0xBF85}, {0x2206, 0x6D02},
+{0x2206, 0x2CA2}, {0x2206, 0xEF96}, {0x2206, 0xFEFC}, {0x2206, 0x0464},
+{0x2206, 0xE48C}, {0x2206, 0xFDE4}, {0x2206, 0x80CA}, {0x2206, 0xE480},
+{0x2206, 0x66E0}, {0x2206, 0x8E70}, {0x2206, 0xE076}, {0x2205, 0xE142},
+{0x2206, 0x0701}, {0x2205, 0xE140}, {0x2206, 0x0405}, {0x220F, 0x0000},
+{0x221F, 0x0000}, {0x2200, 0x1340}, {0x133E, 0x000E}, {0x133F, 0x0010},
+{0x13EB, 0x11BB}, {0x2097, 0xA11F}
+ };
+/*End of ChipData10[][2]*/
+
+uint16_t ChipData11[][2]= {
+/*Code of Func*/
+{0x1B03, 0x0876}, {0x1200, 0x7FC4}, {0x1305, 0xC000}, {0x121E, 0x03CA},
+{0x1233, 0x0352}, {0x1234, 0x0064}, {0x1237, 0x0096}, {0x1238, 0x0078},
+{0x1239, 0x0084}, {0x123A, 0x0030}, {0x205F, 0x0002}, {0x2059, 0x1A00},
+{0x205F, 0x0000}, {0x207F, 0x0002}, {0x2077, 0x0000}, {0x2078, 0x0000},
+{0x2079, 0x0000}, {0x207A, 0x0000}, {0x207B, 0x0000}, {0x207F, 0x0000},
+{0x205F, 0x0002}, {0x2053, 0x0000}, {0x2054, 0x0000}, {0x2055, 0x0000},
+{0x2056, 0x0000}, {0x2057, 0x0000}, {0x205F, 0x0000}, {0x133F, 0x0030},
+{0x133E, 0x000E}, {0x221F, 0x0005}, {0x2205, 0x8B86}, {0x2206, 0x800E},
+{0x221F, 0x0000}, {0x133F, 0x0010}, {0x12A3, 0x2200}, {0x6107, 0xE58B},
+{0x6103, 0xA970}, {0x0018, 0x0F00}, {0x0038, 0x0F00}, {0x0058, 0x0F00},
+{0x0078, 0x0F00}, {0x0098, 0x0F00}, {0x133F, 0x0030}, {0x133E, 0x000E},
+{0x221F, 0x0005}, {0x2205, 0x8B6E}, {0x2206, 0x0000}, {0x220F, 0x0100},
+{0x2205, 0xFFF6}, {0x2206, 0x0080}, {0x2205, 0x8000}, {0x2206, 0x0280},
+{0x2206, 0x2BF7}, {0x2206, 0x00E0}, {0x2206, 0xFFF7}, {0x2206, 0xA080},
+{0x2206, 0x02AE}, {0x2206, 0xF602}, {0x2206, 0x0153}, {0x2206, 0x0201},
+{0x2206, 0x6602}, {0x2206, 0x8044}, {0x2206, 0x0201}, {0x2206, 0x7CE0},
+{0x2206, 0x8B8C}, {0x2206, 0xE18B}, {0x2206, 0x8D1E}, {0x2206, 0x01E1},
+{0x2206, 0x8B8E}, {0x2206, 0x1E01}, {0x2206, 0xA000}, {0x2206, 0xE4AE},
+{0x2206, 0xD8EE}, {0x2206, 0x85C0}, {0x2206, 0x00EE}, {0x2206, 0x85C1},
+{0x2206, 0x00EE}, {0x2206, 0x8AFC}, {0x2206, 0x07EE}, {0x2206, 0x8AFD},
+{0x2206, 0x73EE}, {0x2206, 0xFFF6}, {0x2206, 0x00EE}, {0x2206, 0xFFF7},
+{0x2206, 0xFC04}, {0x2206, 0xF8E0}, {0x2206, 0x8B8E}, {0x2206, 0xAD20},
+{0x2206, 0x0302}, {0x2206, 0x8050}, {0x2206, 0xFC04}, {0x2206, 0xF8F9},
+{0x2206, 0xE08B}, {0x2206, 0x85AD}, {0x2206, 0x2548}, {0x2206, 0xE08A},
+{0x2206, 0xE4E1}, {0x2206, 0x8AE5}, {0x2206, 0x7C00}, {0x2206, 0x009E},
+{0x2206, 0x35EE}, {0x2206, 0x8AE4}, {0x2206, 0x00EE}, {0x2206, 0x8AE5},
+{0x2206, 0x00E0}, {0x2206, 0x8AFC}, {0x2206, 0xE18A}, {0x2206, 0xFDE2},
+{0x2206, 0x85C0}, {0x2206, 0xE385}, {0x2206, 0xC102}, {0x2206, 0x2DAC},
+{0x2206, 0xAD20}, {0x2206, 0x12EE}, {0x2206, 0x8AE4}, {0x2206, 0x03EE},
+{0x2206, 0x8AE5}, {0x2206, 0xB7EE}, {0x2206, 0x85C0}, {0x2206, 0x00EE},
+{0x2206, 0x85C1}, {0x2206, 0x00AE}, {0x2206, 0x1115}, {0x2206, 0xE685},
+{0x2206, 0xC0E7}, {0x2206, 0x85C1}, {0x2206, 0xAE08}, {0x2206, 0xEE85},
+{0x2206, 0xC000}, {0x2206, 0xEE85}, {0x2206, 0xC100}, {0x2206, 0xFDFC},
+{0x2206, 0x0400}, {0x2205, 0xE142}, {0x2206, 0x0701}, {0x2205, 0xE140},
+{0x2206, 0x0405}, {0x220F, 0x0000}, {0x221F, 0x0000}, {0x133E, 0x000E},
+{0x133F, 0x0010}, {0x13EB, 0x11BB}, {0x207F, 0x0002}, {0x2073, 0x1D22},
+{0x207F, 0x0000}, {0x133F, 0x0030}, {0x133E, 0x000E}, {0x2200, 0x1340},
+{0x133E, 0x000E}, {0x133F, 0x0010}, {0x2080, 0x1940}, {0x2097, 0xA100},
+};
+/*End of ChipData11[][2]*/
+
+#endif
+
+static rtk_api_ret_t _rtk_switch_init_setreg(uint32_t reg, uint32_t data);
+
+/* Function Name:
+ *      rtk_port_macForceLinkExt_set
+ * Description:
+ *      Set external interface force linking configuration.
+ * Input:
+ *      port            - external port ID
+ *      mode            - external interface mode
+ *      pPortability    - port ability configuration
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK           - OK
+ *      RT_ERR_FAILED       - Failed
+ *      RT_ERR_SMI          - SMI access error
+ *      RT_ERR_INPUT		- Invalid input parameters.
+ * Note:
+ *      This API can set external interface force mode properties.
+ *      The external interface can be set to:
+ *      - MODE_EXT_DISABLE,
+ *      - MODE_EXT_RGMII,
+ *      - MODE_EXT_MII_MAC,
+ *      - MODE_EXT_MII_PHY,
+ *      - MODE_EXT_TMII_MAC,
+ *      - MODE_EXT_TMII_PHY,
+ *      - MODE_EXT_GMII,
+ *      - MODE_EXT_RMII_MAC,
+ *      - MODE_EXT_RMII_PHY,
+ */
+rtk_api_ret_t
+rtk_port_macForceLinkExt_set(rtk_ext_port_t port, rtk_mode_ext_t mode, rtk_port_mac_ability_t *pPortability)
+{
+    rtk_api_ret_t retVal;
+    rtl8367b_port_ability_t ability;
+    uint32_t  reg, mask;
+
+    if (port >= EXT_PORT_END)
+        return RT_ERR_INPUT;
+
+    if (mode >=MODE_EXT_END)
+        return RT_ERR_INPUT;
+
+    if (mode == MODE_EXT_RGMII_33V)
+        return RT_ERR_INPUT;
+
+    if (pPortability->forcemode > 1 || pPortability->speed > 2 || pPortability->duplex > 1 ||
+       pPortability->link > 1 || pPortability->nway > 1 || pPortability->txpause > 1 || pPortability->rxpause > 1)
+        return RT_ERR_INPUT;
+
+    if(port == EXT_PORT_0)
+    {
+        reg = RTL8367B_REG_DIGITAL_INTERFACE_SELECT;
+        mask = RTL8367B_SELECT_GMII_0_MASK;
+    }
+    else if(port == EXT_PORT_1)
+    {
+        reg = RTL8367B_REG_DIGITAL_INTERFACE_SELECT;
+        mask = RTL8367B_SELECT_GMII_1_MASK;
+    }
+    else if(port == EXT_PORT_2)
+    {
+        reg = RTL8367B_REG_DIGITAL_INTERFACE_SELECT_1;
+        mask = RTL8367B_SELECT_RGMII_2_MASK;
+    }
+    else
+        return RT_ERR_INPUT;
+
+    if ((retVal = rtl8367b_setAsicPortExtMode(port, mode)) != RT_ERR_OK)
+        return retVal;
+
+    if ((retVal = rtl8367b_getAsicPortForceLinkExt( (uint32_t)port, &ability)) != RT_ERR_OK)
+        return retVal;
+
+    ability.forcemode = pPortability->forcemode;
+    ability.speed     = pPortability->speed;
+    ability.duplex    = pPortability->duplex;
+    ability.link      = pPortability->link;
+    ability.nway      = pPortability->nway;
+    ability.txpause   = pPortability->txpause;
+    ability.rxpause   = pPortability->rxpause;
+
+    if ((retVal = rtl8367b_setAsicPortForceLinkExt( (uint32_t)port, &ability)) != RT_ERR_OK)
+        return retVal;
+
+    return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      rtk_port_rgmiiDelayExt_set
+ * Description:
+ *      Set RGMII interface delay value for TX and RX.
+ * Input:
+ *      txDelay - TX delay value, 1 for delay 2ns and 0 for no-delay
+ *      rxDelay - RX delay value, 0~7 for delay setup.
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK           - OK
+ *      RT_ERR_FAILED       - Failed
+ *      RT_ERR_SMI          - SMI access error
+ *      RT_ERR_INPUT		- Invalid input parameters.
+ * Note:
+ *      This API can set external interface 2 RGMII delay.
+ *      In TX delay, there are 2 selection: no-delay and 2ns delay.
+ *      In RX dekay, there are 8 steps for delay tunning. 0 for no-delay, and 7 for maximum delay.
+ */
+rtk_api_ret_t
+rtk_port_rgmiiDelayExt_set(rtk_ext_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay)
+{
+	rtk_api_ret_t retVal;
+	uint32_t regAddr = 0;
+	uint32_t regData = 0;
+
+	if ((txDelay > 1) || (rxDelay > 7))
+		return RT_ERR_INPUT;
+
+	if (port >= EXT_PORT_END)
+		return RT_ERR_INPUT;
+
+	if(port == EXT_PORT_0)
+		regAddr = RTL8367B_REG_EXT0_RGMXF;
+	else if(port == EXT_PORT_1)
+		regAddr = RTL8367B_REG_EXT1_RGMXF;
+	else if(port == EXT_PORT_2)
+		regAddr = RTL8367B_REG_EXT2_RGMXF;
+	else
+		return RT_ERR_INPUT;
+
+	if ((retVal = rtl8367b_getAsicReg(regAddr, &regData)) != RT_ERR_OK)
+		return retVal;
+
+	if (RGMII_TIMING_DEBUG) {
+		printf("%s: pre regData 0x%x\n", __FUNCTION__, regData);
+	}
+
+	regData = (regData & 0xFFF0) | ((txDelay << 3) & 0x0008) | (rxDelay & 0x0007);
+	if (RGMII_TIMING_DEBUG) {
+		printf("%s: pst regData 0x%x\n", __FUNCTION__, regData);
+	}
+
+	if ((retVal = rtl8367b_setAsicReg(regAddr, regData)) != RT_ERR_OK)
+		return retVal;
+
+	return RT_ERR_OK;
+}
+
+static
+rtk_api_ret_t
+_rtk_switch_init_setreg(uint32_t reg, uint32_t data)
+{
+    rtk_api_ret_t   retVal;
+
+    if((retVal = rtl8367b_setAsicReg(reg, data) != RT_ERR_OK))
+            return retVal;
+
+    return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      rtk_switch_init
+ * Description:
+ *      Set chip to default configuration enviroment
+ * Input:
+ *      None
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK           - OK
+ *      RT_ERR_FAILED       - Failed
+ *      RT_ERR_SMI          - SMI access error
+ * Note:
+ *      The API can set chip registers to default configuration for different release chip model.
+ */
+rtk_api_ret_t
+rtk_switch_init(void)
+{
+    uint16_t	i = 0;
+    uint32_t	data = 0;
+    rtk_api_ret_t	retVal = 0;
+    uint32_t	phy;
+#if defined(CHIP_AUTO_DETECT)
+    uint32_t	polling_time;
+    uint32_t	chip_idx = 0;
+#endif
+
+    if((retVal = rtl8367b_setAsicReg(0x13C2, 0x0249)) != RT_ERR_OK)
+        return retVal;
+
+    if((retVal = rtl8367b_getAsicReg(0x1301, &data)) != RT_ERR_OK)
+        return retVal;
+
+#if defined(CHIP_RTL8363SB)
+    if(data & 0xF000)
+    {
+        init_para = ChipData01;
+        init_size = (sizeof(ChipData01) / ((sizeof(uint16_t))*2));
+    }
+    else
+    {
+        init_para = ChipData00;
+        init_size = (sizeof(ChipData00) / ((sizeof(uint16_t))*2));
+    }
+#elif defined(CHIP_RTL8365MB)
+    if(data & 0xF000)
+    {
+        init_para = ChipData11;
+        init_size = (sizeof(ChipData11) / ((sizeof(uint16_t))*2));
+    }
+    else
+    {
+        init_para = ChipData10;
+        init_size = (sizeof(ChipData10) / ((sizeof(uint16_t))*2));
+    }
+#else
+    /* Not define CHIP, Error */
+    init_para = NULL;
+#endif
+
+    if(init_para == NULL)
+        return RT_ERR_CHIP_NOT_SUPPORTED;
+
+    /* Analog parameter update. ID:0001 */
+    for(phy = 0; phy <= RTK_PHY_ID_MAX; phy++)
+    {
+        if((retVal = rtl8367b_setAsicPHYReg(phy, 31, 0x7)) != RT_ERR_OK)
+            return retVal;
+
+        if((retVal = rtl8367b_setAsicPHYReg(phy, 30, 0x2c)) != RT_ERR_OK)
+            return retVal;
+
+        if((retVal = rtl8367b_setAsicPHYReg(phy, 25, 0x0504)) != RT_ERR_OK)
+            return retVal;
+
+        if((retVal = rtl8367b_setAsicPHYReg(phy, 31, 0x0)) != RT_ERR_OK)
+            return retVal;
+    }
+
+    for(i = 0; i < init_size; i++)
+    {
+        if((retVal = _rtk_switch_init_setreg((uint32_t)init_para[i][0], (uint32_t)init_para[i][1])) != RT_ERR_OK)
+            return retVal;
+    }
+
+    /* Analog parameter update. ID:0002 */
+    if((retVal = rtl8367b_setAsicPHYReg(1, 31, 0x2)) != RT_ERR_OK)
+        return retVal;
+
+    if((retVal = rtl8367b_getAsicPHYReg(1, 17, &data)) != RT_ERR_OK)
+        return retVal;
+
+    data |= 0x01E0;
+
+    if((retVal = rtl8367b_setAsicPHYReg(1, 17, data)) != RT_ERR_OK)
+        return retVal;
+
+    if((retVal = rtl8367b_setAsicPHYReg(1, 31, 0x0)) != RT_ERR_OK)
+        return retVal;
+
+
+    if((retVal = rtl8367b_setAsicRegBit(0x18e0, 0, 0)) != RT_ERR_OK)
+        return retVal;
+
+    if((retVal = rtl8367b_setAsicReg(0x1303, 0x0778)) != RT_ERR_OK)
+        return retVal;
+    if((retVal = rtl8367b_setAsicReg(0x1304, 0x7777)) != RT_ERR_OK)
+        return retVal;
+    if((retVal = rtl8367b_setAsicReg(0x13E2, 0x01FE)) != RT_ERR_OK)
+        return retVal;
+
+    return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      rtl8367b_setAsicRegBit
+ * Description:
+ *      Set a bit value of a specified register
+ * Input:
+ *      reg     - register's address
+ *      bit     - bit location
+ *      value   - value to set. It can be value 0 or 1.
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK       - Success
+ *      RT_ERR_SMI      - SMI access error
+ *      RT_ERR_INPUT    - Invalid input parameter
+ * Note:
+ *      Set a bit of a specified register to 1 or 0.
+ */
+ret_t
+rtl8367b_setAsicRegBit(uint32_t reg, uint32_t bit, uint32_t value)
+{
+
+    uint32_t regData = 0;
+    ret_t retVal = 0;
+
+    if(bit >= RTL8367B_REGBITLENGTH)
+        return RT_ERR_INPUT;
+
+    retVal = smi_read(reg, &regData);
+    if(retVal != RT_ERR_OK)
+        return RT_ERR_SMI;
+
+    if(value)
+        regData = regData | (1 << bit);
+    else
+        regData = regData & (~(1 << bit));
+
+    retVal = smi_write(reg, regData);
+    if(retVal != RT_ERR_OK)
+        return RT_ERR_SMI;
+
+    return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      rtl8367b_getAsicRegBit
+ * Description:
+ *      Get a bit value of a specified register
+ * Input:
+ *      reg     - register's address
+ *      bit     - bit location
+ *      value   - value to get.
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK       - Success
+ *      RT_ERR_SMI      - SMI access error
+ *      RT_ERR_INPUT    - Invalid input parameter
+ * Note:
+ *      None
+ */
+ret_t
+rtl8367b_getAsicRegBit(uint32_t reg, uint32_t bit, uint32_t *pValue)
+{
+    uint32_t regData = 0;
+    ret_t retVal = 0;
+
+    retVal = smi_read(reg, &regData);
+    if(retVal != RT_ERR_OK)
+        return RT_ERR_SMI;
+
+    *pValue = (regData & (0x1 << bit)) >> bit;
+
+    return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      rtl8367b_setAsicRegBits
+ * Description:
+ *      Set bits value of a specified register
+ * Input:
+ *      reg     - register's address
+ *      bits    - bits mask for setting
+ *      value   - bits value for setting
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK       - Success
+ *      RT_ERR_SMI      - SMI access error
+ *      RT_ERR_INPUT    - Invalid input parameter
+ * Note:
+ *      Set bits of a specified register to value. Both bits and value are be treated as bit-mask
+ */
+ret_t
+rtl8367b_setAsicRegBits(uint32_t reg, uint32_t bits, uint32_t value)
+{
+    uint32_t regData = 0;
+    ret_t retVal = 0;
+    uint32_t bitsShift = 0;
+    uint32_t valueShifted = 0;
+
+    if(bits >= (1 << RTL8367B_REGBITLENGTH) )
+        return RT_ERR_INPUT;
+
+    bitsShift = 0;
+    while(!(bits & (1 << bitsShift)))
+    {
+        bitsShift++;
+        if(bitsShift >= RTL8367B_REGBITLENGTH)
+            return RT_ERR_INPUT;
+    }
+    valueShifted = value << bitsShift;
+
+    if(valueShifted > RTL8367B_REGDATAMAX)
+        return RT_ERR_INPUT;
+
+    retVal = smi_read(reg, &regData);
+    if(retVal != RT_ERR_OK)
+        return RT_ERR_SMI;
+
+    regData = regData & (~bits);
+    regData = regData | (valueShifted & bits);
+
+    retVal = smi_write(reg, regData);
+    if(retVal != RT_ERR_OK)
+        return RT_ERR_SMI;
+    return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      rtl8367b_getAsicRegBits
+ * Description:
+ *      Get bits value of a specified register
+ * Input:
+ *      reg     - register's address
+ *      bits    - bits mask for setting
+ *      value   - bits value for setting
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK       - Success
+ *      RT_ERR_SMI      - SMI access error
+ *      RT_ERR_INPUT    - Invalid input parameter
+ * Note:
+ *      None
+ */
+ret_t
+rtl8367b_getAsicRegBits(uint32_t reg, uint32_t bits, uint32_t *pValue)
+{
+    uint32_t regData = 0;
+    ret_t retVal = 0;
+    uint32_t bitsShift = 0;
+
+    if(bits>= (1<<RTL8367B_REGBITLENGTH) )
+        return RT_ERR_INPUT;
+
+    bitsShift = 0;
+    while(!(bits & (1 << bitsShift)))
+    {
+        bitsShift++;
+        if(bitsShift >= RTL8367B_REGBITLENGTH)
+            return RT_ERR_INPUT;
+    }
+
+    retVal = smi_read(reg, &regData);
+    if(retVal != RT_ERR_OK) return RT_ERR_SMI;
+
+    *pValue = (regData & bits) >> bitsShift;
+    return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      rtl8367b_setAsicReg
+ * Description:
+ *      Set content of asic register
+ * Input:
+ *      reg     - register's address
+ *      value   - Value setting to register
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK       - Success
+ *      RT_ERR_SMI      - SMI access error
+ * Note:
+ *      The value will be set to ASIC mapping address only and it is always return RT_ERR_OK while setting un-mapping address registers
+ */
+ret_t
+rtl8367b_setAsicReg(uint32_t reg, uint32_t value)
+{
+    ret_t retVal = 0;
+
+    retVal = smi_write(reg, value);
+    if(retVal != RT_ERR_OK)
+        return RT_ERR_SMI;
+    return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      rtl8367b_getAsicReg
+ * Description:
+ *      Get content of asic register
+ * Input:
+ *      reg     - register's address
+ *      value   - Value setting to register
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK       - Success
+ *      RT_ERR_SMI      - SMI access error
+ * Note:
+ *      Value 0x0000 will be returned for ASIC un-mapping address
+ */
+ret_t
+rtl8367b_getAsicReg(uint32_t reg, uint32_t *pValue)
+{
+    uint32_t regData = 0;
+    ret_t retVal = 0;
+
+    retVal = smi_read(reg, &regData);
+    if(retVal != RT_ERR_OK)
+        return RT_ERR_SMI;
+
+    *pValue = regData;
+    return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      rtl8367b_setAsicPortExtMode
+ * Description:
+ *      Set external interface mode configuration
+ * Input:
+ *      id      - external interface id (0~2)
+ *      mode    - external interface mode
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK           - Success
+ *      RT_ERR_SMI          - SMI access error
+ *      RT_ERR_OUT_OF_RANGE - input parameter out of range
+ * Note:
+ *      None
+ */
+ret_t
+rtl8367b_setAsicPortExtMode(uint32_t id, uint32_t mode)
+{
+    ret_t   retVal = 0;
+
+    if(id >= RTL8367B_EXTNO)
+        return RT_ERR_OUT_OF_RANGE;
+
+    if(mode >= EXT_END)
+        return RT_ERR_OUT_OF_RANGE;
+
+    if(mode == EXT_GMII)
+    {
+        if( (retVal = rtl8367b_setAsicRegBit(RTL8367B_REG_EXT0_RGMXF, RTL8367B_EXT0_RGTX_INV_OFFSET, 1)) != RT_ERR_OK)
+            return retVal;
+
+        if( (retVal = rtl8367b_setAsicRegBit(RTL8367B_REG_EXT1_RGMXF, RTL8367B_EXT1_RGTX_INV_OFFSET, 1)) != RT_ERR_OK)
+            return retVal;
+
+        if( (retVal = rtl8367b_setAsicRegBits(RTL8367B_REG_EXT_TXC_DLY, RTL8367B_EXT1_GMII_TX_DELAY_MASK, 5)) != RT_ERR_OK)
+            return retVal;
+
+        if( (retVal = rtl8367b_setAsicRegBits(RTL8367B_REG_EXT_TXC_DLY, RTL8367B_EXT0_GMII_TX_DELAY_MASK, 6)) != RT_ERR_OK)
+            return retVal;
+    }
+
+    if( (mode == EXT_TMII_MAC) || (mode == EXT_TMII_PHY) )
+    {
+        if( (retVal = rtl8367b_setAsicRegBit(RTL8367B_REG_BYPASS_LINE_RATE, id, 1)) != RT_ERR_OK)
+            return retVal;
+    }
+    else
+    {
+        if( (retVal = rtl8367b_setAsicRegBit(RTL8367B_REG_BYPASS_LINE_RATE, id, 0)) != RT_ERR_OK)
+            return retVal;
+    }
+
+    if(0 == id || 1 == id)
+        return rtl8367b_setAsicRegBits(RTL8367B_REG_DIGITAL_INTERFACE_SELECT, RTL8367B_SELECT_GMII_0_MASK << (id * RTL8367B_SELECT_GMII_1_OFFSET), mode);
+    else
+        return rtl8367b_setAsicRegBits(RTL8367B_REG_DIGITAL_INTERFACE_SELECT_1, RTL8367B_SELECT_RGMII_2_MASK, mode);
+}
+
+/* Function Name:
+ *      rtl8367b_getAsicPortForceLinkExt
+ * Description:
+ *      Get external interface force linking configuration
+ * Input:
+ *      id          - external interface id (0~1)
+ *      pPortAbility - port ability configuration
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK           - Success
+ *      RT_ERR_SMI          - SMI access error
+ *      RT_ERR_OUT_OF_RANGE - input parameter out of range
+ * Note:
+ *      None
+ */
+ret_t
+rtl8367b_getAsicPortForceLinkExt(uint32_t id, rtl8367b_port_ability_t *pPortAbility)
+{
+    uint32_t  reg_data = 0;
+    uint16_t  ability_data = 0;
+    ret_t	retVal = 0;
+
+    /* Invalid input parameter */
+    if(id >= RTL8367B_EXTNO)
+        return RT_ERR_OUT_OF_RANGE;
+
+    if(0 == id || 1 == id)
+        retVal = rtl8367b_getAsicReg(RTL8367B_REG_DIGITAL_INTERFACE0_FORCE+id, &reg_data);
+    else
+        retVal = rtl8367b_getAsicReg(RTL8367B_REG_DIGITAL_INTERFACE2_FORCE, &reg_data);
+
+    if(retVal != RT_ERR_OK)
+        return retVal;
+
+    ability_data = (uint16_t)reg_data;
+    memcpy(pPortAbility, &ability_data, sizeof(rtl8367b_port_ability_t));
+    return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      rtl8367b_setAsicPortForceLinkExt
+ * Description:
+ *      Set external interface force linking configuration
+ * Input:
+ *      id          - external interface id (0~2)
+ *      portAbility - port ability configuration
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK           - Success
+ *      RT_ERR_SMI          - SMI access error
+ *      RT_ERR_OUT_OF_RANGE - input parameter out of range
+ * Note:
+ *      None
+ */
+ret_t
+rtl8367b_setAsicPortForceLinkExt(uint32_t id, rtl8367b_port_ability_t *pPortAbility)
+{
+    uint32_t  reg_data = 0;
+
+    /* Invalid input parameter */
+    if(id >= RTL8367B_EXTNO)
+        return RT_ERR_OUT_OF_RANGE;
+
+    reg_data = (uint32_t)(*(uint16_t *)pPortAbility);
+
+    if(0 == id || 1 == id)
+        return rtl8367b_setAsicReg(RTL8367B_REG_DIGITAL_INTERFACE0_FORCE + id, reg_data);
+    else
+        return rtl8367b_setAsicReg(RTL8367B_REG_DIGITAL_INTERFACE2_FORCE, reg_data);
+}
+
+/* Function Name:
+ *      rtl8367b_setAsicPHYReg
+ * Description:
+ *      Set PHY registers
+ * Input:
+ *      phyNo	- Physical port number (0~4)
+ *      phyAddr - PHY address (0~31)
+ *      phyData - Writing data
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK				- Success
+ *      RT_ERR_SMI				- SMI access error
+ *      RT_ERR_PHY_REG_ID		- invalid PHY address
+ *      RT_ERR_PHY_ID			- invalid PHY no
+ *      RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy
+ * Note:
+ *      None
+ */
+ret_t
+rtl8367b_setAsicPHYReg( uint32_t phyNo, uint32_t phyAddr, uint32_t value)
+{
+	uint32_t regAddr;
+
+    if(phyNo > RTL8367B_PHY_INTERNALNOMAX)
+        return RT_ERR_PORT_ID;
+
+    if(phyAddr > RTL8367B_PHY_REGNOMAX)
+        return RT_ERR_PHY_REG_ID;
+
+    regAddr = 0x2000 + (phyNo << 5) + phyAddr;
+
+    return rtl8367b_setAsicReg(regAddr, value);
+}
+
+/* Function Name:
+ *      rtl8367b_getAsicPHYReg
+ * Description:
+ *      Get PHY registers
+ * Input:
+ *      phyNo	- Physical port number (0~4)
+ *      phyAddr - PHY address (0~31)
+ *      pRegData - Writing data
+ * Output:
+ *      None
+ * Return:
+ *      RT_ERR_OK				- Success
+ *      RT_ERR_SMI				- SMI access error
+ *      RT_ERR_PHY_REG_ID		- invalid PHY address
+ *      RT_ERR_PHY_ID			- invalid PHY no
+ *      RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy
+ * Note:
+ *      None
+ */
+ret_t
+rtl8367b_getAsicPHYReg( uint32_t phyNo, uint32_t phyAddr, uint32_t *value)
+{
+	uint32_t regAddr;
+
+    if(phyNo > RTL8367B_PHY_INTERNALNOMAX)
+        return RT_ERR_PORT_ID;
+
+    if(phyAddr > RTL8367B_PHY_REGNOMAX)
+        return RT_ERR_PHY_REG_ID;
+
+    regAddr = 0x2000 + (phyNo << 5) + phyAddr;
+
+    return rtl8367b_getAsicReg(regAddr, value);
+}
diff --git a/board/ruby/rtl8367b/rtl8367b_init.c b/board/ruby/rtl8367b/rtl8367b_init.c
new file mode 100644
index 0000000..5e99cb3
--- /dev/null
+++ b/board/ruby/rtl8367b/rtl8367b_init.c
@@ -0,0 +1,178 @@
+/*
+ * Copyright (C) 2012 Realtek Semiconductor Corp.
+ * All Rights Reserved.
+ *
+ * This program is the proprietary software of Realtek Semiconductor
+ * Corporation and/or its licensors, and only be used, duplicated,
+ * modified or distributed under the authorized license from Realtek.
+ *
+ * ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER
+ * THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
+ *
+ * $Revision: $
+ * $Date: $
+ *
+ * Purpose : RTK switch driver module init for RTL8367/RTL8367B
+ * Feature : Init switch and configure it for operation
+ *
+ */
+
+#include "rtl8367b_init.h"
+#include "rtl8367b_smi.h"
+#include <asm/arch/arasan_emac_ahb.h>
+
+ret_t rtl8367b_poll_linkup(struct emac_private *priv)
+{
+	/* either PHY1 or PHY2 should have link established */
+	const uint32_t delay_us = 1000;
+	const int poll_secs = 2;
+	const uint32_t mask = PhyLinkIsUp | PhyAutoNegComplete;
+	const unsigned long start = get_timer(0);
+
+	printf("%s: polling for link up...\n", __FUNCTION__);
+
+	while (1) {
+		int phy;
+
+		for (phy = RTL8367B_QTN_EXT_PHY_ADDR_MIN; phy <= RTL8367B_QTN_EXT_PHY_ADDR_MAX; phy++) {
+			uint32_t val;
+
+			if (rtl8367b_getAsicPHYReg(phy, PhyBMSR, &val) != RT_ERR_OK) {
+				return -1;
+			}
+
+			if ((val & mask) == mask) {
+				printf("%s: link found, phy %d\n",
+						__FUNCTION__, phy);
+				return 0;
+			}
+		}
+
+		if (ctrlc() || (get_timer(start) > (poll_secs * CONFIG_SYS_HZ))) {
+			break;
+		}
+
+		udelay(delay_us);
+	}
+
+	printf("%s: no link found\n", __FUNCTION__);
+
+	return -1;
+}
+
+static void rtl8367b_ext_reset(void)
+{
+	const int delay_us = 20000;
+	uint32_t mask = RUBY_SYS_CTL_RESET_EXT;
+
+	writel(mask, RUBY_SYS_CTL_CPU_VEC_MASK);
+
+	writel(0, RUBY_SYS_CTL_CPU_VEC);
+	udelay(delay_us);
+	writel(mask, RUBY_SYS_CTL_CPU_VEC);
+	udelay(delay_us);
+	writel(0, RUBY_SYS_CTL_CPU_VEC);
+	udelay(delay_us);
+
+	writel(0, RUBY_SYS_CTL_CPU_VEC_MASK);
+}
+
+static uint32_t smi_mdio_read_adapter(struct emac_private *priv, uint8_t reg)
+{
+	uint32_t val;
+
+	if (rtl8367b_getAsicPHYReg(priv->phy_addr, reg, &val) != RT_ERR_OK) {
+		return MDIO_READ_FAIL;
+	}
+
+	return val;
+}
+
+static int smi_mdio_write_adapter(struct emac_private *priv, uint8_t reg, uint16_t value)
+{
+	return rtl8367b_setAsicPHYReg(priv->phy_addr, reg, value);
+}
+
+static ret_t rtl8367b_init_port(rtk_port_mac_ability_t *mac_cfg, rtk_mode_ext_t mode, rtk_ext_port_t port)
+{
+	ret_t ret;
+	rtk_data_t rgmii_tx_delay = 0;
+	rtk_data_t rgmii_rx_delay = 4;
+
+	ret = rtk_port_macForceLinkExt_set(port, mode, mac_cfg);
+	if (RT_ERR_OK != ret) {
+		printf("rtk_port_macForceLinkExt_set failed, port %d (%d)\n", port, ret);
+		return ret;
+	}
+
+	ret = rtk_port_rgmiiDelayExt_set(port, rgmii_tx_delay, rgmii_rx_delay);
+	if (RT_ERR_OK != ret) {
+		printf("rtk_port_rgmiiDelayExt_set failed, port %d (%d)\n", port, ret);
+		return ret;
+	}
+
+	return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      rtl8367b_init
+ * Description:
+ *      Initialize RTL8367B Chipsets
+ * Return:
+ *      RT_ERR_OK	   - Success
+ *      RT_ERR_FAILED  - Failure
+ * Note:
+ *      None
+ */
+ret_t rtl8367b_init(struct emac_private *priv, uint32_t emac_cfg)
+{
+	ret_t ret = RT_ERR_OK;
+	rtk_port_mac_ability_t mac_cfg;
+	rtk_mode_ext_t mode;
+
+	printf("%s...\n", __FUNCTION__);
+
+	priv->mdio->read = &smi_mdio_read_adapter;
+	priv->mdio->write = &smi_mdio_write_adapter;
+
+	rtl8367b_ext_reset();
+
+	smi_mdio_base_set(priv->mdio->base);
+	ret = rtk_switch_init();
+	if (RT_ERR_OK != ret) {
+		printf("rtl8635MB switch init failed!!! (%d)\n", ret);
+		return ret;
+	}
+
+	/*
+	 * Set external interface 0 to RGMII with Force mode, 1000M, Full-duplex,
+	 * enable TX&RX pause
+	 */
+	mode = MODE_EXT_RGMII;
+	mac_cfg.forcemode = MAC_FORCE;
+	mac_cfg.speed = SPD_1000M;
+	mac_cfg.duplex = FULL_DUPLEX;
+	mac_cfg.link = PORT_LINKUP;
+	mac_cfg.nway = DISABLED;
+	mac_cfg.txpause = ENABLED;
+	mac_cfg.rxpause = ENABLED;
+
+	if (emac_cfg & EMAC_PHY_RTL8363SB_P0) {
+		ret = rtl8367b_init_port(&mac_cfg, mode, EXT_PORT_0);
+		if (RT_ERR_OK != ret) {
+			return ret;
+		}
+	}
+
+	if (emac_cfg & EMAC_PHY_RTL8363SB_P1) {
+		ret = rtl8367b_init_port(&mac_cfg, mode, EXT_PORT_1);
+		if (RT_ERR_OK != ret) {
+			return ret;
+		}
+	}
+
+	printf("%s completed successfully\n", __FUNCTION__);
+
+	return ret;
+}
+
diff --git a/board/ruby/rtl8367b/rtl8367b_init.h b/board/ruby/rtl8367b/rtl8367b_init.h
new file mode 100644
index 0000000..d48d854
--- /dev/null
+++ b/board/ruby/rtl8367b/rtl8367b_init.h
@@ -0,0 +1,329 @@
+/*
+ * Copyright(c) Realtek Semiconductor Corporation, 2008
+ * All rights reserved.
+ *
+ * $Revision: 28599 $
+ * $Date: 2012-05-07 09:41:37 +0800 (星期一, 07 五月 2012) $
+ *
+ * Purpose : Definition function prototype of RTK API.
+ *
+ * Feature : Function prototype definition
+ *
+ */
+
+#ifndef __RTL8367B_INIT_H__
+#define __RTL8367B_INIT_H__
+
+#include "../ruby.h"
+#include "malloc.h"
+
+#define	_LITTLE_ENDIAN
+#undef	CHIP_RTL8365MB
+#define	CHIP_RTL8363SB
+
+#define	RTL8367B_REG_DIGITAL_INTERFACE_SELECT    0x1305
+#define	RTL8367B_SELECT_GMII_1_OFFSET            4
+#define	RTL8367B_SELECT_GMII_1_MASK              0xF0
+#define	RTL8367B_SELECT_GMII_0_OFFSET            0
+#define	RTL8367B_SELECT_GMII_0_MASK              0xF
+#define	RTL8367B_REG_DIGITAL_INTERFACE_SELECT_1  0x13c3
+#define	RTL8367B_SKIP_MII_2_RXER_OFFSET          4
+#define	RTL8367B_SKIP_MII_2_RXER_MASK            0x10
+#define	RTL8367B_SELECT_RGMII_2_OFFSET           0
+#define	RTL8367B_SELECT_RGMII_2_MASK             0xF
+#define	RTL8367B_REG_EXT0_RGMXF                  0x1306
+#define	RTL8367B_REG_EXT1_RGMXF                  0x1307
+#define	RTL8367B_REG_EXT2_RGMXF                  0x13c5
+#define	RTL8367B_REGBITLENGTH                    16
+#define	RTL8367B_REGDATAMAX                      0xFFFF
+#define	RTL8367B_MAC7                            7
+#define	RTL8367B_EXTNO                           3
+#define	RTL8367B_EXT0_RGTX_INV_OFFSET            6
+#define	RTL8367B_EXT0_RGTX_INV_MASK              0x40
+#define	RTL8367B_EXT0_RGRX_INV_OFFSET            5
+#define	RTL8367B_EXT0_RGRX_INV_MASK              0x20
+#define	RTL8367B_EXT0_RGMXF_OFFSET               0
+#define	RTL8367B_EXT0_RGMXF_MASK                 0x1F
+#define	RTL8367B_EXT1_RGTX_INV_OFFSET            6
+#define	RTL8367B_EXT1_RGTX_INV_MASK              0x40
+#define	RTL8367B_EXT1_RGRX_INV_OFFSET            5
+#define	RTL8367B_EXT1_RGRX_INV_MASK              0x20
+#define	RTL8367B_EXT1_RGMXF_OFFSET               0
+#define	RTL8367B_EXT1_RGMXF_MASK                 0x1F
+#define	RTL8367B_REG_EXT_TXC_DLY                 0x13f9
+#define	RTL8367B_EXT1_GMII_TX_DELAY_OFFSET       12
+#define	RTL8367B_EXT1_GMII_TX_DELAY_MASK         0x7000
+#define	RTL8367B_EXT0_GMII_TX_DELAY_OFFSET       9
+#define	RTL8367B_EXT0_GMII_TX_DELAY_MASK         0xE00
+#define	RTL8367B_EXT2_RGMII_TX_DELAY_OFFSET      6
+#define	RTL8367B_EXT2_RGMII_TX_DELAY_MASK        0x1C0
+#define	RTL8367B_EXT1_RGMII_TX_DELAY_OFFSET      3
+#define	RTL8367B_EXT1_RGMII_TX_DELAY_MASK        0x38
+#define	RTL8367B_EXT0_RGMII_TX_DELAY_OFFSET      0
+#define	RTL8367B_EXT0_RGMII_TX_DELAY_MASK        0x7
+#define	RTL8367B_REG_BYPASS_LINE_RATE            0x03f7
+#define	RTL8367B_REG_DIGITAL_INTERFACE0_FORCE    0x1310
+#define	RTL8367B_GMII_0_FORCE_OFFSET             12
+#define	RTL8367B_GMII_0_FORCE_MASK               0x1000
+#define	RTL8367B_RGMII_0_FORCE_OFFSET            0
+#define	RTL8367B_RGMII_0_FORCE_MASK              0xFFF
+#define	RTL8367B_REG_DIGITAL_INTERFACE1_FORCE    0x1311
+#define	RTL8367B_GMII_1_FORCE_OFFSET             12
+#define	RTL8367B_GMII_1_FORCE_MASK               0x1000
+#define	RTL8367B_RGMII_1_FORCE_OFFSET            0
+#define	RTL8367B_RGMII_1_FORCE_MASK              0xFFF
+#define	RTL8367B_REG_DIGITAL_INTERFACE2_FORCE    0x13c4
+#define	RTL8367B_GMII_2_FORCE_OFFSET             12
+#define	RTL8367B_GMII_2_FORCE_MASK               0x1000
+#define	RTL8367B_RGMII_2_FORCE_OFFSET            0
+#define	RTL8367B_RGMII_2_FORCE_MASK              0xFFF
+#define	RTK_INDRECT_ACCESS_CRTL                  0x1f00
+#define	RTK_INDRECT_ACCESS_STATUS                0x1f01
+#define	RTK_INDRECT_ACCESS_ADDRESS               0x1f02
+#define	RTK_INDRECT_ACCESS_WRITE_DATA            0x1f03
+#define	RTK_INDRECT_ACCESS_READ_DATA             0x1f04
+#define	RTK_INDRECT_ACCESS_DELAY                 0x1f80
+#define	RTK_INDRECT_ACCESS_BURST                 0x1f81
+#define	RTK_RW_MASK                              0x2
+#define	RTK_CMD_MASK                             0x1
+#define	RTK_PHY_BUSY_OFFSET                      2
+#define	RTK_IVL_MODE_FID                         0xFFFF
+#define	RTL8367B_REG_INDRECT_ACCESS_CTRL         0x1f00
+#define	RTL8367B_RW_OFFSET                       1
+#define	RTL8367B_RW_MASK                         0x2
+#define	RTL8367B_CMD_OFFSET                      0
+#define	RTL8367B_CMD_MASK                        0x1
+#define	RTL8367B_REG_INDRECT_ACCESS_STATUS       0x1f01
+#define	RTL8367B_INDRECT_ACCESS_STATUS_OFFSET    2
+#define	RTL8367B_INDRECT_ACCESS_STATUS_MASK      0x4
+#define	RTL8367B_REG_INDRECT_ACCESS_ADDRESS      0x1f02
+#define	RTL8367B_REG_INDRECT_ACCESS_WRITE_DATA   0x1f03
+#define	RTL8367B_REG_INDRECT_ACCESS_READ_DATA    0x1f04
+
+typedef	uint32_t	rtk_api_ret_t;
+typedef	uint32_t	ret_t;
+typedef	uint64_t	rtk_u_long_t;
+typedef	uint32_t	rtk_data_t;
+
+#define HERE	do { if (0) printf("%s:%d:%s\n", __FILE__, __LINE__, __FUNCTION__); } while(0)
+#define MDIO_DEBUG		0
+#define RGMII_TIMING_DEBUG	0
+#define SMI_SWEEP_MAX		0x8000
+
+/*
+ * Data Type Declaration
+ */
+typedef enum rt_error_code_e
+{
+	RT_ERR_FAILED = -1,                         /* General Error																	*/
+
+	/* 0x0000xxxx for common error code */
+	RT_ERR_OK = 0,                              /* 0x00000000, OK                                                                   */
+	RT_ERR_INPUT,                               /* 0x00000001, invalid input parameter                                              */
+	RT_ERR_UNIT_ID,                             /* 0x00000002, invalid unit id                                                      */
+	RT_ERR_PORT_ID,                             /* 0x00000003, invalid port id                                                      */
+	RT_ERR_PORT_MASK,                           /* 0x00000004, invalid port mask                                                    */
+	RT_ERR_PORT_LINKDOWN,                       /* 0x00000005, link down port status                                                */
+	RT_ERR_ENTRY_INDEX,                         /* 0x00000006, invalid entry index                                                  */
+	RT_ERR_NULL_POINTER,                        /* 0x00000007, input parameter is null pointer                                      */
+	RT_ERR_QUEUE_ID,                            /* 0x00000008, invalid queue id                                                     */
+	RT_ERR_QUEUE_NUM,                           /* 0x00000009, invalid queue number                                                 */
+	RT_ERR_BUSYWAIT_TIMEOUT,                    /* 0x0000000a, busy watting time out                                                */
+	RT_ERR_MAC,                                 /* 0x0000000b, invalid mac address                                                  */
+	RT_ERR_OUT_OF_RANGE,                        /* 0x0000000c, input parameter out of range                                         */
+	RT_ERR_CHIP_NOT_SUPPORTED,                  /* 0x0000000d, functions not supported by this chip model                           */
+	RT_ERR_SMI,                                 /* 0x0000000e, SMI error                                                            */
+	RT_ERR_NOT_INIT,                            /* 0x0000000f, The module is not initial                                            */
+	RT_ERR_CHIP_NOT_FOUND,                      /* 0x00000010, The chip can not found                                               */
+	RT_ERR_NOT_ALLOWED,                         /* 0x00000011, actions not allowed by the function                                  */
+	RT_ERR_DRIVER_NOT_FOUND,                    /* 0x00000012, The driver can not found                                             */
+	RT_ERR_SEM_LOCK_FAILED,                     /* 0x00000013, Failed to lock semaphore                                             */
+	RT_ERR_SEM_UNLOCK_FAILED,                   /* 0x00000014, Failed to unlock semaphore                                           */
+	RT_ERR_ENABLE,                              /* 0x00000015, invalid enable parameter                                             */
+	RT_ERR_TBL_FULL,                            /* 0x00000016, input table full														*/
+
+	/* 0x000exxxx for port ability */
+	RT_ERR_PHY_PAGE_ID = 0x000e0000,            /* 0x000e0000, invalid PHY page id                                                  */
+	RT_ERR_PHY_REG_ID,                          /* 0x000e0001, invalid PHY reg id                                                   */
+	RT_ERR_PHY_DATAMASK,                        /* 0x000e0002, invalid PHY data mask                                                */
+	RT_ERR_PHY_AUTO_NEGO_MODE,                  /* 0x000e0003, invalid PHY auto-negotiation mode*/
+	RT_ERR_PHY_SPEED,                           /* 0x000e0004, invalid PHY speed setting                                            */
+	RT_ERR_PHY_DUPLEX,                          /* 0x000e0005, invalid PHY duplex setting                                           */
+	RT_ERR_PHY_FORCE_ABILITY,                   /* 0x000e0006, invalid PHY force mode ability parameter                             */
+	RT_ERR_PHY_FORCE_1000,                      /* 0x000e0007, invalid PHY force mode 1G speed setting                              */
+	RT_ERR_PHY_TXRX,                            /* 0x000e0008, invalid PHY tx/rx                                                    */
+	RT_ERR_PHY_ID,                              /* 0x000e0009, invalid PHY id                                                       */
+	RT_ERR_PHY_RTCT_NOT_FINISH,                 /* 0x000e000a, PHY RTCT in progress                                                 */
+} rt_error_code_t;
+
+typedef enum rtk_enable_e
+{
+    DISABLED = 0,
+    ENABLED,
+    RTK_ENABLE_END
+} rtk_enable_t;
+
+typedef enum rtk_port_linkStatus_e
+{
+    PORT_LINKDOWN = 0,
+    PORT_LINKUP,
+    PORT_LINKSTATUS_END
+} rtk_port_linkStatus_t;
+
+/* enum for port current link speed */
+enum SPEEDMODE
+{
+	SPD_10M = 0,
+	SPD_100M,
+	SPD_1000M
+};
+
+/* enum for mac link mode */
+enum LINKMODE
+{
+	MAC_NORMAL = 0,
+	MAC_FORCE,
+};
+
+/* enum for port current link duplex mode */
+enum DUPLEXMODE
+{
+	HALF_DUPLEX = 0,
+	FULL_DUPLEX
+};
+
+/* enum for port current MST mode */
+enum MSTMODE
+{
+	SLAVE_MODE= 0,
+	MASTER_MODE
+};
+
+enum EXTMODE
+{
+    EXT_DISABLE = 0,
+    EXT_RGMII,
+    EXT_MII_MAC,
+    EXT_MII_PHY,
+    EXT_TMII_MAC,
+    EXT_TMII_PHY,
+    EXT_GMII,
+    EXT_RMII_MAC,
+    EXT_RMII_PHY,
+    EXT_END
+};
+
+typedef struct  rtk_port_mac_ability_s
+{
+    uint32_t forcemode;
+    uint32_t speed;
+    uint32_t duplex;
+    uint32_t link;
+    uint32_t nway;
+    uint32_t txpause;
+    uint32_t rxpause;
+} rtk_port_mac_ability_t;
+
+typedef enum rtk_mode_ext_e
+{
+    MODE_EXT_DISABLE = 0,
+    MODE_EXT_RGMII,
+    MODE_EXT_MII_MAC,
+    MODE_EXT_MII_PHY,
+    MODE_EXT_TMII_MAC,
+    MODE_EXT_TMII_PHY,
+    MODE_EXT_GMII,
+    MODE_EXT_RMII_MAC,
+    MODE_EXT_RMII_PHY,
+    MODE_EXT_RGMII_33V,
+    MODE_EXT_END
+} rtk_mode_ext_t;
+
+typedef enum rtk_ext_port_e
+{
+    EXT_PORT_0 = 0,
+    EXT_PORT_1,
+    EXT_PORT_2,
+    EXT_PORT_END
+} rtk_ext_port_t;
+
+typedef struct  rtl8367b_port_ability_s {
+#ifdef _LITTLE_ENDIAN
+uint16_t speed:2;
+uint16_t duplex:1;
+uint16_t reserve1:1;
+uint16_t link:1;
+uint16_t rxpause:1;
+uint16_t txpause:1;
+uint16_t nway:1;
+uint16_t mstmode:1;
+uint16_t mstfault:1;
+uint16_t reserve2:2;
+uint16_t forcemode:1;
+uint16_t reserve3:3;
+#else
+uint16_t reserve3:3;
+uint16_t forcemode:1;
+uint16_t reserve2:2;
+uint16_t mstfault:1;
+uint16_t mstmode:1;
+uint16_t nway:1;
+uint16_t txpause:1;
+uint16_t rxpause:1;
+uint16_t link:1;
+uint16_t reserve1:1;
+uint16_t duplex:1;
+uint16_t speed:2;
+#endif
+} rtl8367b_port_ability_t;
+
+#define RTK_MAX_NUM_OF_INTERRUPT_TYPE               2
+#define RTK_TOTAL_NUM_OF_WORD_FOR_1BIT_PORT_LIST    1
+#define RTK_MAX_NUM_OF_PRIORITY                     8
+#define RTK_MAX_NUM_OF_QUEUE                        8
+#define RTK_MAX_NUM_OF_TRUNK_HASH_VAL               1
+#define RTK_MAX_NUM_OF_PORT                         8
+#define RTK_PORT_ID_MAX                             (RTK_MAX_NUM_OF_PORT-1)
+#define RTK_PHY_ID_MAX                              (RTK_MAX_NUM_OF_PORT-4)
+#define RTK_PORT_COMBO_ID                           4
+#define RTK_MAX_NUM_OF_PROTO_TYPE                   0xFFFF
+#define RTK_MAX_NUM_OF_MSTI                         0xF
+#define RTK_MAX_NUM_OF_LEARN_LIMIT                  0x840
+#define RTK_MAX_PORT_MASK                           0xFF
+#define RTK_EFID_MAX                                0x7
+#define RTK_FID_MAX                                 0xF
+#define RTK_MAX_NUM_OF_FILTER_TYPE                  5
+#define RTK_MAX_NUM_OF_FILTER_FIELD                 8
+#define RTL8367B_PHY_INTERNALNOMAX                  0x4
+#define RTL8367B_PHY_REGNOMAX                       0x1F
+#define RTL8367B_PHY_EXTERNALMAX                    0x7
+#define RTL8367B_PHY_BASE                           0x2000
+#define RTL8367B_PHY_EXT_BASE                       0xA000
+#define RTL8367B_PHY_OFFSET                         5
+#define RTL8367B_PHY_EXT_OFFSET                     9
+#define RTL8367B_PHY_PAGE_ADDRESS                   31
+
+#define RTL8367B_QTN_EXT_PHY_ADDR_MIN	1
+#define RTL8367B_QTN_EXT_PHY_ADDR_MAX	2
+
+rtk_api_ret_t rtk_port_macForceLinkExt_set(rtk_ext_port_t port, rtk_mode_ext_t mode, rtk_port_mac_ability_t *pPortability);
+rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_ext_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay);
+rtk_api_ret_t rtk_switch_init(void);
+
+struct emac_private;
+ret_t rtl8367b_poll_linkup(struct emac_private *priv);
+ret_t rtl8367b_init(struct emac_private *priv, uint32_t emac_cfg);
+ret_t rtl8367b_setAsicRegBit(uint32_t reg, uint32_t bit, uint32_t value);
+ret_t rtl8367b_getAsicRegBit(uint32_t reg, uint32_t bit, uint32_t *pValue);
+ret_t rtl8367b_setAsicRegBits(uint32_t reg, uint32_t bits, uint32_t value);
+ret_t rtl8367b_getAsicRegBits(uint32_t reg, uint32_t bits, uint32_t *pValue);
+ret_t rtl8367b_setAsicReg(uint32_t reg, uint32_t value);
+ret_t rtl8367b_getAsicReg(uint32_t reg, uint32_t *pValue);
+ret_t rtl8367b_setAsicPortExtMode(uint32_t id, uint32_t mode);
+ret_t rtl8367b_getAsicPortForceLinkExt(uint32_t id, rtl8367b_port_ability_t *pPortAbility);
+ret_t rtl8367b_setAsicPortForceLinkExt(uint32_t id, rtl8367b_port_ability_t *pPortAbility);
+ret_t rtl8367b_setAsicPHYReg(uint32_t phyNo, uint32_t phyAddr, uint32_t regData);
+ret_t rtl8367b_getAsicPHYReg(uint32_t phyNo, uint32_t phyAddr, uint32_t* pRegData);
+void mdio_base_set(unsigned int mdio_base);
+
+#endif /* __RTL8367B_INIT_H__ */
diff --git a/board/ruby/rtl8367b/rtl8367b_smi.c b/board/ruby/rtl8367b/rtl8367b_smi.c
new file mode 100644
index 0000000..3ca2708
--- /dev/null
+++ b/board/ruby/rtl8367b/rtl8367b_smi.c
@@ -0,0 +1,271 @@
+/*
+* Copyright c                  Realtek Semiconductor Corporation, 2006
+* All rights reserved.
+*
+* Program : Control  smi connected RTL8366
+* Abstract :
+* Author : Yu-Mei Pan (ympan@realtek.com.cn)
+*  $Id: smi.c 28599 2012-05-07 01:41:37Z kobe_wu $
+*/
+
+#include <common.h>
+#include <malloc.h>
+#include <net.h>
+#include <asm/io.h>
+#include "rtl8367b_smi.h"
+#include "rtl8367b_init.h"
+#include <asm/arch/platform.h>
+#include <asm/arch/arasan_emac_ahb.h>
+
+#define MDC_MDIO_DUMMY_ID		0
+#define MDC_MDIO_CTRL0_REG		31
+#define MDC_MDIO_START_REG		29
+#define MDC_MDIO_CTRL1_REG		21
+#define MDC_MDIO_ADDRESS_REG		23
+#define MDC_MDIO_DATA_WRITE_REG		24
+#define MDC_MDIO_DATA_READ_REG		25
+#define MDC_MDIO_PREAMBLE_LEN		32
+
+#define MDC_MDIO_START_OP		0xFFFF
+#define MDC_MDIO_ADDR_OP		0x000E
+#define MDC_MDIO_READ_OP		0x0001
+#define MDC_MDIO_WRITE_OP		0x0003
+
+#define MDC_MDIO_READ(len, phyId, regId, pData)	mdio_read(len, phyId, regId, pData)
+#define MDC_MDIO_WRITE(len, phyId, regId, data)	mdio_write(len, phyId, regId, data)
+
+static unsigned long cur_mdio_base = RUBY_ERROR_ADDR;
+
+/* Function Name:
+ *      mdio_read
+ * Description:
+ *      MDIO read request
+ * Input:
+ *      len     - Data length read
+ *      phyId   - Physical PHY (0-7)
+ *      regId   - Physical register to write data
+ *      data    - Data read from device
+ * Return:
+ *      void
+ * Note:
+ *      None
+ */
+static void mdio_read(unsigned int len, unsigned int phyId, unsigned int regId, unsigned int *pData)
+{
+	mdio_postrd_raw(cur_mdio_base, phyId, regId);
+	*pData = mdio_rdval_raw(cur_mdio_base, 1);
+	if (MDIO_DEBUG) {
+		printf("%s: phy %u reg %u data %u\n",
+				__FUNCTION__, phyId, regId, *pData);
+	}
+}
+
+/* Function Name:
+ *      mdio_write
+ * Description:
+ *      MDIO write request
+ * Input:
+ *		len		- Data length
+ *		phyId	- Physical PHY (0-7)
+ *		regId	- Physical register to write data
+ *		data	- Data to be written
+ * Return:
+ *      void
+ * Note:
+ *      None
+ */
+static void mdio_write(unsigned int len, unsigned int phyId, unsigned int regId, unsigned int data)
+{
+	mdio_postwr_raw(cur_mdio_base, phyId, regId, data);
+	if (MDIO_DEBUG) {
+		printf("%s: phy %u reg %u data %u\n",
+				__FUNCTION__, phyId, regId, data);
+	}
+}
+
+/* Function Name:
+ *      mdio_base_set
+ * Description:
+ *      Store mdio base address
+ * Input:
+ *      mdio_base  - mdio base address
+ * Return:
+ *      void
+ * Note:
+ *      None
+ */
+void smi_mdio_base_set(unsigned long mdio_base)
+{
+	cur_mdio_base = mdio_base;
+}
+
+/* Function Name:
+ *      smi_reset
+ * Description:
+ *      SMI reset control
+ * Input:
+ *      port     - Physical port number (0-7)
+ *      pinRST   - RST pin
+ * Return:
+ *      RT_ERR_OK               - Success
+ *      RT_ERR_FAILED           - SMI access error
+ * Note:
+ *      None
+ */
+uint32_t smi_reset(uint32_t port, uint32_t pinRST)
+{
+	return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      smi_init
+ * Description:
+ *      SMI init control
+ * Input:
+ *      port     - Physical port number (0-7)
+ *      pinSCK   - SCK pin
+ *      pinSDA   - SDA pin
+ * Return:
+ *      RT_ERR_OK               - Success
+ *      RT_ERR_FAILED           - SMI access error
+ * Note:
+ *      None
+ */
+uint32_t smi_init(uint32_t port, uint32_t pinSCK, uint32_t pinSDA)
+{
+	return RT_ERR_OK;
+}
+
+/* Function Name:
+ *      smi_read
+ * Description:
+ *      SMI read control
+ * Input:
+ *      mAddrs   - SMI 32-bit address
+ *      rData    - Data read from device
+ * Return:
+ *      RT_ERR_OK               - Success
+ *      RT_ERR_FAILED           - SMI access error
+ * Note:
+ *      None
+ */
+uint32_t smi_read(uint32_t mAddrs, uint32_t *rData)
+{
+	/* Write Start command to register 29 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_START_REG, MDC_MDIO_START_OP);
+
+	/* Write address control code to register 31 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_CTRL0_REG, MDC_MDIO_ADDR_OP);
+
+	/* Write Start command to register 29 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_START_REG, MDC_MDIO_START_OP);
+
+	/* Write address to register 23 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_ADDRESS_REG, mAddrs);
+
+	/* Write Start command to register 29 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_START_REG, MDC_MDIO_START_OP);
+
+	/* Write read control code to register 21 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_CTRL1_REG, MDC_MDIO_READ_OP);
+
+	/* Write Start command to register 29 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_START_REG, MDC_MDIO_START_OP);
+
+	/* Read data from register 25 */
+	MDC_MDIO_READ(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_DATA_READ_REG, rData);
+
+	return RT_ERR_OK;
+}
+
+/* Function Name:
+ *		smi_write
+ * Description:
+ *		SMI write control
+ * Input:
+ *      mAddrs   - SMI 32-bit address
+ *      rData    - Data to be written
+ * Return:
+ *      RT_ERR_OK               - Success
+ *      RT_ERR_FAILED           - SMI access error
+ * Note:
+ *      None
+ */
+uint32_t smi_write(uint32_t mAddrs, uint32_t rData)
+{
+	/* Write Start command to register 29 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_START_REG, MDC_MDIO_START_OP);
+
+	/* Write address control code to register 31 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_CTRL0_REG, MDC_MDIO_ADDR_OP);
+
+	/* Write Start command to register 29 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_START_REG, MDC_MDIO_START_OP);
+
+	/* Write address to register 23 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_ADDRESS_REG, mAddrs);
+
+	/* Write Start command to register 29 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_START_REG, MDC_MDIO_START_OP);
+
+	/* Write data to register 24 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_DATA_WRITE_REG, rData);
+
+	/* Write Start command to register 29 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_START_REG, MDC_MDIO_START_OP);
+
+	/* Write data control code to register 21 */
+	MDC_MDIO_WRITE(MDC_MDIO_PREAMBLE_LEN, MDC_MDIO_DUMMY_ID, MDC_MDIO_CTRL1_REG, MDC_MDIO_WRITE_OP);
+
+	return RT_ERR_OK;
+}
+
+int do_smi_read(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	uint32_t addr;
+	uint32_t data;
+
+	addr = simple_strtoul (argv[1], NULL, 16);
+	smi_read(addr, &data);
+	printf("smi_read: 0x%x = 0x%x\n", addr, data);
+
+	return 0;
+}
+
+int do_smi_sweep(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	int i;
+	uint32_t addr;
+	uint32_t data;
+
+	for (i = 0; i < SMI_SWEEP_MAX; i++) {
+		if (ctrlc()) {
+			break;
+		}
+		addr = i;
+		smi_read(addr, &data);
+		if ((data) && (data != 0xffff)) {
+			printf("smi_sweep: 0x%x = 0x%x\n", addr, data);
+		}
+	}
+
+	return 0;
+}
+
+int do_smi_write(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	uint32_t addr;
+	uint32_t data;
+
+	addr = simple_strtoul (argv[1], NULL, 16);
+	data = simple_strtoul (argv[2], NULL, 16);
+	printf("smi_write: 0x%x <- 0x%x\n", addr, data);
+	smi_write(addr, data);
+
+	return 0;
+}
+
+U_BOOT_CMD(smi_read, 6, 1, do_smi_read, "RTL8363EB smi read <reg>", "");
+U_BOOT_CMD(smi_write, 6, 2, do_smi_write, "RTL8363EB smi write <reg> <val>", "");
+U_BOOT_CMD(smi_sweep, 6, 1, do_smi_sweep, "RTL8363EB smi sweep", "");
+
diff --git a/board/ruby/rtl8367b/rtl8367b_smi.h b/board/ruby/rtl8367b/rtl8367b_smi.h
new file mode 100644
index 0000000..9b1e359
--- /dev/null
+++ b/board/ruby/rtl8367b/rtl8367b_smi.h
@@ -0,0 +1,12 @@
+#ifndef __RTL8367B_SMI_H__
+#define __RTL8367B_SMI_H__
+
+#include "rtl8367b_init.h"
+
+uint32_t smi_reset(uint32_t port, uint32_t pinRST);
+uint32_t smi_init(uint32_t port, uint32_t pinSCK, uint32_t pinSDA);
+uint32_t smi_read(uint32_t mAddrs, uint32_t *rData);
+uint32_t smi_write(uint32_t mAddrs, uint32_t rData);
+void smi_mdio_base_set(unsigned long addr);
+
+#endif /* __RTL8367B_SMI_H__ */
diff --git a/board/ruby/ruby.c b/board/ruby/ruby.c
new file mode 100644
index 0000000..a4ecd69
--- /dev/null
+++ b/board/ruby/ruby.c
@@ -0,0 +1,319 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "ruby.h"
+#include "malloc.h"
+#include "ddr.h"
+#include <shared_defs_common.h>
+#include "ruby_board_cfg.h"
+#include "ruby_board_db.h"
+#include "board_cfg.h"
+#include "pcie.h"
+#include "ruby_spi_api.h"
+#include "spi_api.h"
+
+extern int board_hw_config_read(void);
+extern int mdc_clk_divisor;
+
+#ifndef TOPAZ_EP_MINI_UBOOT
+void qtn_mini_hw_init(int board_id);
+int board_cfg_init(int *p_board_id);
+void board_pmu_init(void);
+
+/* use spare register for saving gd pointer - used for EXPORT_FUNC() */
+static void board_global_data_init(void)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+	gd->cpu_clk = RUBY_FIXED_CPU_CLK;
+	gd->bus_clk = RUBY_FIXED_DEV_CLK;
+	gd->baudrate = RUBY_SERIAL_BAUD;
+	gd->bd->bi_memsize = RUBY_MIN_DRAM_SIZE;
+	gd->bd->bi_boot_params = 0x0;
+	writel((int)gd,0xe00000bc);
+}
+
+int board_init(void)
+{
+	dcache_enable();
+	board_pmu_init();
+	board_global_data_init();
+	board_serial_init();
+	board_check_build();
+	board_intr_init();
+	board_timer_init();
+	board_spi_flash_init();
+	return 0;
+}
+
+static void dump_muc_stack(const struct ruby_crumbs *crumbs)
+{
+	uint32_t sp_muc;
+	const uint32_t *sp_virt;
+	const uint32_t * const sp_virt_end = (void*)CONFIG_ARC_MUC_STACK_INIT_UBOOT;
+
+	printf("\tMuC stack candidates:\n");
+	printf("\t\tdram text: 0x%08lx - 0x%08lx\n",
+			crumbs->muc_dram.start,
+			crumbs->muc_dram.end);
+	printf("\t\tsram text: 0x%08lx - 0x%08lx\n",
+			crumbs->muc_sram.start,
+			crumbs->muc_sram.end);
+
+	sp_muc = crumbs->muc.sp;
+	if (!sp_muc) {
+		/*
+		 * if the MuC isn't recording prolog crumbs,
+		 * use the lowest part of the MuC stack
+		 */
+		sp_muc = virt_to_bus((void*)CONFIG_ARC_STACK_BEGIN);
+	}
+	sp_virt = (void*)bus_to_virt(sp_muc);
+	if (sp_virt == RUBY_BAD_VIRT_ADDR) {
+		printf("%s: could not get sp_virt, sp_muc = 0x%08x\n", __FUNCTION__, sp_muc);
+		return;
+	}
+	if (sp_muc % 4 != 0 || ((uint32_t)sp_virt) % 4 != 0) {
+		printf("%s: misaligned stack pointer muc 0x%08x\n", __FUNCTION__, sp_muc);
+		return;
+	}
+
+	while (sp_virt <= sp_virt_end) {
+		/*
+		 * read muc stack contents at *sp, compare value with muc text sections
+		 */
+		uint32_t val = *sp_virt;
+		int in_sram = val >= crumbs->muc_sram.start && val <= crumbs->muc_sram.end;
+		int in_dram = val >= crumbs->muc_dram.start && val <= crumbs->muc_dram.end;
+		if (val && (in_sram || in_dram)) {
+			printf("\t\tsp 0x%08x\tfn 0x%08x\n", sp_muc, val);
+		}
+		sp_muc += 4;
+		sp_virt++;
+	}
+}
+
+static void dump_core_crumbs(const char* core, const struct ruby_crumbs_percore *core_crumbs)
+{
+	printf("\t%s:\tblink 0x%lx status32 0x%lx sp 0x%lx\n",
+			core,
+			core_crumbs->blink,
+			core_crumbs->status32,
+			core_crumbs->sp);
+}
+
+static void dump_ruby_crumbs(const struct ruby_crumbs *crumbs)
+{
+	dump_core_crumbs("lhost", &crumbs->lhost);
+	dump_core_crumbs("DSP", &crumbs->dsp);
+	dump_core_crumbs("MuC", &crumbs->muc);
+}
+
+static void init_ruby_crumbs(void)
+{
+	struct ruby_crumbs *crumbs = (struct ruby_crumbs*)RUBY_CRUMBS_ADDR_UBOOT;
+	char *crumb_env;
+	int show_crumbs = 0;
+	int magic_valid =  crumbs->magic == RUBY_CRUMBS_MAGIC;
+
+	crumb_env = getenv("dump_crumbs");
+	if (crumb_env != NULL) {
+		show_crumbs = simple_strtoul(crumb_env, NULL, 10);
+	}
+
+	if (show_crumbs) {
+		printf("Info: last core activity: \n");
+		if (magic_valid) {
+			dump_ruby_crumbs(crumbs);
+			dump_muc_stack(crumbs);
+		} else {
+			printf("***Crumbs magic token is incorrect, values are probably invalid\n");
+			dump_ruby_crumbs(crumbs);
+		}
+		printf("\n");
+	}
+
+	/* clear the crumbs structure */
+	memset(crumbs, 0, sizeof(*crumbs));
+}
+
+int board_late_init(void)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+	u32 ddr_size = DEFAULT_DDR_SIZE;
+	int board_id;
+	char *p;
+
+	init_ruby_crumbs();
+
+	if (board_cfg_init(&board_id) != 0) {
+		printf("error: board configuration not found\n");
+		return -1;
+	}
+
+	p = getenv("mdc_clk_div");
+	if (p != NULL)
+		mdc_clk_divisor = 3 & simple_strtoul(p, NULL, 10);
+
+	gd->bd->bi_board_id = board_id;
+	ddr_size = board_config(board_id,BOARD_CFG_DDR_SIZE);
+	gd->bd->bi_memsize = ddr_size;
+
+	if (read_new_aux_reg(SCRATCH_DATA0)) {
+		printf("Warm boot\n");
+	} else  {
+		printf("Cold boot\n");
+		qtn_mini_hw_init(board_id);
+	}
+
+	board_setup_bda((void *) CONFIG_ARC_CONF_BASE, board_id);
+
+	qtn_parse_early_flash_config(0);
+
+	/* Here we check the env to see if user want to Enable SPI Flash Protect
+	 * Mode
+	 */
+	if ((p = getenv(SPI_PROTECT_MODE)) != NULL) {
+		if (strcmp (p, SPI_PROTECT_MODE_ENABLE) == 0){
+			spi_protect_mode_on();
+		} else {
+			spi_protect_mode_off();
+		}
+	}
+	return 0;
+}
+
+int protect_env_get(void)
+{
+	char *p;
+
+	if ((p = getenv(SPI_PROTECT_MODE)) != NULL) {
+		if (strcmp (p, SPI_PROTECT_MODE_ENABLE) == 0){
+			return 0;
+		}
+	}
+	return -1;
+}
+
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
+void board_pmu_init(void)
+{
+#define TOPAZ_PMU_CONFIG_1	0xe00000f0
+#define TOPAZ_PMU_CONFIG_2	0xe00000f4
+	u32 rdata;
+
+	rdata = 0xc00002f0;
+	REG_WRITE(TOPAZ_PMU_CONFIG_1,rdata);
+
+	rdata = 0xb7000027;
+	REG_WRITE(TOPAZ_PMU_CONFIG_2,rdata);
+}
+
+/*
+ * Figure out our board type from
+ * env and configure properly
+ */
+int board_cfg_init(int *p_board_id)
+{
+	int board_id = DEFAULT_BOARD_ID;
+#ifndef RUBY_MINI
+	int uart1 = 0;
+#endif
+	int retval = 0;
+	char *s;
+
+	s = getenv("hw_config_id");
+	if (s == NULL)
+		printf("\"hw_config_id\" not set, using default value of %d\n", board_id);
+	else
+		board_id = simple_strtoul(s, NULL, 10);
+
+	if (board_id == QTN_RUBY_AUTOCONFIG_ID)
+		board_parse_custom_cfg();
+
+	if (board_id == QTN_RUBY_UNIVERSAL_BOARD_ID) {
+		retval = board_hw_config_read();
+		if (retval < 0)
+			return -1;
+	}
+
+	if (board_config(board_id, BOARD_CFG_ID) != board_id)
+		return -1;
+
+	s = (char *) board_config(board_id, BOARD_CFG_NAME);
+	if (s != NULL)
+		printf("hw_config_id %u: '%s'\n", board_id, s);
+
+	*p_board_id = board_id;
+
+#ifndef RUBY_MINI
+	/* Setup UART1 */
+	s = getenv("uart1");
+	if (s)
+		uart1 = simple_strtoul(s, NULL, 1);
+
+	/* Check for u-boot env. or board configuration */
+	if (uart1 || (board_config(board_id, BOARD_CFG_UART1) == UART1_IN_USE)) {
+		printf("UART1 enabled: GPIO_PIN1 (input) Rx, GPIO_PIN9 (output) Tx\n");
+		gpio_config(GPIO_PIN(1), RUBY_GPIO_ALT_INPUT);
+		gpio_config(GPIO_PIN(9), RUBY_GPIO_ALT_OUTPUT);
+	}
+#endif
+
+	return 0;
+}
+
+/*
+ * Quantenna minimal hardware initailization, which depends on board config.
+ * Include DDR and PCIe.
+ */
+void qtn_mini_hw_init(int board_id)
+{
+	u32 ddr_speed = DEFAULT_DDR_SPEED;
+	u32 ddr_size = DEFAULT_DDR_SIZE;
+	u32 ddr_type = DEFAULT_DDR_CFG;
+	int pcie_flags;
+
+	printf("Reset status: 0x%08x\n",
+			arc_read_uncached_32(RUBY_SYS_CTL_RESET_CAUSE));
+	pcie_flags = board_config(board_id, BOARD_CFG_PCIE);
+	if (pcie_flags & PCIE_IN_USE) {
+		uint32_t time;
+		pcie_ep_early_init(pcie_flags);
+		time = read_new_aux_reg(ARC_REG_TIMER1_CNT);
+		time /= (RUBY_FIXED_CPU_CLK / 1000);
+		printf("PCIe early init, done@%dms\n", time);
+	}
+#ifndef TOPAZ_EP_MINI_UBOOT
+	board_info_init();
+	spi_flash_info();
+#endif
+
+	ddr_type = board_config(board_id, BOARD_CFG_DDR_TYPE);
+	ddr_speed = board_config(board_id, BOARD_CFG_DDR_SPEED);
+	ddr_size = board_config(board_id,BOARD_CFG_DDR_SIZE);
+	ddr_init(ddr_type, ddr_speed, ddr_size);
+
+	if (pcie_flags & PCIE_IN_USE) {
+		board_pcie_init(ddr_size, pcie_flags);
+	}
+}
diff --git a/board/ruby/ruby.h b/board/ruby/ruby.h
new file mode 100644
index 0000000..73b9a3d
--- /dev/null
+++ b/board/ruby/ruby.h
@@ -0,0 +1,141 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
+#ifndef __RUBY_H
+#define __RUBY_H
+
+/* MuC/DSP section names */
+#define UC_TEXT_SECTION_NAME	".text.uc"
+#define UC_DATA_SECTION_NAME	".data.uc"
+#define UC_BSS_SECTION_NAME	".bss.uc"
+
+
+#ifndef __ASSEMBLY__
+
+/***************************************************************************/
+
+#include <linux/types.h>
+#include <config.h>
+#include <common.h>
+
+#include <asm/io.h>
+#include <asm/global_data.h>
+#include <asm/uboot-arc.h>
+#include <asm/arcregs.h>
+#include <asm/arch/platform.h>
+
+/***************************************************************************/
+
+void board_timer_init(void);
+void board_ddr_init(void);
+void board_serial_init(void);
+void board_intr_init(void);
+void board_progress_init(void);
+void board_spi_flash_init(void);
+void board_info_init(void);
+void board_check_build(void);
+int spi_flash_info(void);
+
+/***************************************************************************/
+
+void gpio_config(u32 pin, u32 cfg);
+void gpio_output(u32 pin, u32 state);
+u32 gpio_input(u32 pin);
+
+/***************************************************************************/
+
+void __attribute__ ((noreturn)) board_reset(const char *reason);
+
+/***************************************************************************/
+
+int get_stage2_image(uint32_t method_req, uint32_t *method_used);
+void qtn_parse_early_flash_config(int overwrite);
+
+/***************************************************************************/
+
+int serial_tx_done(void);
+
+/***************************************************************************/
+
+#define RUN(fmt, ...) _run(__FUNCTION__, (fmt), ##__VA_ARGS__)
+int _run(const char *function_name, const char *fmt, ...);
+
+/***************************************************************************/
+
+/* Defined in linker script */
+extern char __uboot_begin;
+extern char __bss_start;
+extern char __uboot_end;
+/* Defined in assembler - MuC code entry point */
+extern char __muc_start_begin;
+extern char __muc_start_end;
+/* Defined in assembler - DSP code entry point */
+extern char __dsp_start_begin;
+extern char __dsp_start_end;
+/* Defined in assembler - MuC/DSP BSS section */
+extern char __uc_bss_begin;
+extern char __uc_bss_end;
+
+static inline struct early_flash_config *get_early_flash_config(unsigned long text_base)
+{
+	extern char early_flash_config_start;
+	return (void*)(&early_flash_config_start - &__uboot_begin + text_base);
+}
+
+#define BIT(x)	(1 << (x))
+
+/***************************************************************************/
+
+#endif // #ifndef __ASSEMBLY__
+
+/***************************************************************************/
+
+#ifdef __ASSEMBLY__
+	#define UC_ENTRY_SLOT	__uboot_begin
+#else
+	#define UC_ENTRY_SLOT	(&__uboot_begin)
+#endif
+
+/***************************************************************************/
+
+#define UC_TEXT_SECTION		__attribute__((section(UC_TEXT_SECTION_NAME)))
+#define UC_DATA_SECTION		__attribute__((section(UC_DATA_SECTION_NAME)))
+#define UC_BSS_SECTION		__attribute__((section(UC_BSS_SECTION_NAME)))
+
+/***************************************************************************/
+
+#define arc_read_uncached_32(ptr)                   \
+({                                  \
+    unsigned int __ret;                     \
+    __asm__ __volatile__ ("ld.di %0, [%1]":"=r"(__ret):"r"(ptr));   \
+    __ret;                              \
+})
+
+#define arc_write_uncached_32(ptr, data)                \
+({                                  \
+    __asm__ __volatile__ ("st.di %0, [%1]"::"r"(data), "r"(ptr));   \
+})
+
+#endif // #ifndef __RUBY_H
+
+
diff --git a/board/ruby/serial.c b/board/ruby/serial.c
new file mode 100644
index 0000000..2a31d14
--- /dev/null
+++ b/board/ruby/serial.c
@@ -0,0 +1,132 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "ruby.h"
+
+/*****************************************************************************/
+/* Ruby UART is compatible with NS16550, but provide extra functionality.    */
+/* Let's have our own implementation, not uboot's generic NS16550.           */
+/*****************************************************************************/
+
+static int initialized = 0;
+
+inline static int serial_tx_ready(void)
+{
+	return (readb(RUBY_UART0_LSR) & RUBY_LSR_TX_Empty);
+}
+
+inline static int serial_rx_ready(void)
+{
+	return (readb(RUBY_UART0_LSR) & RUBY_LSR_RX_Ready);
+}
+
+inline static void serial_wait_tx(void)
+{
+	while (!serial_tx_ready());
+}
+
+inline static void serial_wait_rx(void)
+{
+	while (!serial_rx_ready());
+}
+
+inline static void serial_putc_simple(const char c)
+{
+	serial_wait_tx();
+	writeb(c, RUBY_UART0_RBR_THR_DLL);
+}
+
+void serial_putc(const char c)
+{
+	if (initialized) {
+		if (c == '\n') {
+			serial_putc_simple('\r');
+		}
+		serial_putc_simple(c);
+	}
+}
+
+int serial_getc(void)
+{
+	int ret = 'X';
+	if (initialized) {
+		serial_wait_rx();
+		ret = readb(RUBY_UART0_RBR_THR_DLL);
+	}
+	return ret;
+}
+
+int serial_tstc(void)
+{
+	return initialized ? serial_rx_ready() : 0;
+}
+
+void serial_puts(const char *s)
+{
+	while (*s) {
+		serial_putc(*s++);
+	}
+}
+
+int serial_tx_done(void)
+{
+	return initialized ? (readb(RUBY_UART0_LSR) & RUBY_LSR_TX_Empty) : 1;
+}
+
+void serial_setbrg(void)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+
+	u32 baud_val = (gd->baudrate * 16);
+	u32 div_val = (gd->bus_clk + baud_val / 2) / baud_val;
+	u8 lcr_val =
+		RUBY_LCR_Data_Word_Length_8 |
+		RUBY_LCR_Stop_Bit_1 |
+		RUBY_LCR_No_Parity |
+		RUBY_LCR_Break_Disable;
+
+	if (!(readb(RUBY_UART0_USR) & RUBY_USR_Busy)) {
+		writeb(lcr_val | RUBY_LCR_DLAB, RUBY_UART0_LCR);
+		writeb((div_val & 0xff), RUBY_UART0_RBR_THR_DLL);
+		writeb((div_val >> 8) & 0xff, RUBY_UART0_DLH_IER);
+		writeb(lcr_val, RUBY_UART0_LCR);
+	}
+}
+
+int serial_init(void)
+{
+	return 0;
+}
+
+void board_serial_init(void)
+{
+	/* configure GPIOs */
+	gpio_config(RUBY_GPIO_UART0_SO, RUBY_GPIO_ALT_OUTPUT);
+	gpio_config(RUBY_GPIO_UART0_SI, RUBY_GPIO_ALT_INPUT);
+
+	/* configure baud-rate */
+	serial_setbrg();
+
+	/* done */
+	initialized = 1;
+}
+
diff --git a/board/ruby/spi_api.c b/board/ruby/spi_api.c
new file mode 100644
index 0000000..06ee697
--- /dev/null
+++ b/board/ruby/spi_api.c
@@ -0,0 +1,507 @@
+/*
+ * Copyright (c) 2010 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ *  SPI driver
+ */
+
+
+///////////////////////////////////////////////////////////////////////////////
+//             Includes
+///////////////////////////////////////////////////////////////////////////////
+//
+
+
+#include "ruby.h"
+#include "ruby_spi_api.h"
+#include <asm/errno.h>
+#include "spi_api.h"
+
+
+///////////////////////////////////////////////////////////////////////////////
+//              Types
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+//             Globals
+///////////////////////////////////////////////////////////////////////////////
+
+/******************************************************************************
+Function:spi_protect_mode
+Purpose:check device ID,and see if the
+device support protect/unprotect mode
+Returns:0 or < 0
+Note:
+ *****************************************************************************/
+int spi_protect_mode(struct flash_info *device)
+{
+	uint32_t spi_ctrl_val;
+	int status = EOPNOTSUPP;
+
+	printf("SPI:%0x\n",device->jedec_id);
+	switch(device->single_unprotect_mode){
+		case MACRONIX:
+			spi_ctrl_val = readl(RUBY_SPI_CONTROL);
+			if (spi_read_status() & SPI_SR_QUAD_MODE) {
+				printf("SPI Quad\n");
+				writel((SPI_SR_QUAD_MODE_MASK(spi_ctrl_val)), RUBY_SPI_CONTROL);
+			} else {
+				writel(SPI_SR_SINGLE_MODE_MASK(spi_ctrl_val), RUBY_SPI_CONTROL);
+			}
+			/*
+			 * This is the place where we check if Device
+			 * support individual unprotect sector
+			 */
+			if (spi_read_scur() & SPI_SCUR_WPSEL) {
+				printf("SPI PM ON\n");
+				status = 0;
+			} else {
+				printf("Set SPI PM \n");
+				spi_write_prot_select(device);
+				if (spi_read_scur() & SPI_SCUR_WPSEL) {
+					printf("SPI PM ON\n");
+					status = 0;
+				} else {
+					printf("SPI PM OFF\n");
+					status = EOPNOTSUPP;
+				}
+			}
+			break;
+		case WINBOND:
+                        if (((spi_read_wps()) & SPI_WPS_SELECT)){
+				printf("SPI PM\n");
+				status = 0;
+                        } else {
+                                spi_write_prot_select(device);
+				if ((spi_read_wps() & SPI_WPS_SELECT)) {
+					printf("SPI PM ON\n");
+					status = 0;
+				} else {
+					printf("SPI PM OFF\n");
+					status = EOPNOTSUPP;
+				}
+			}
+
+			break;
+		default:
+			printf("SPI PM OFF\n");
+			status =  EOPNOTSUPP;
+	}
+
+	return status;
+}
+
+/******************************************************************************
+* Function:spi_read_scur
+* Purpose:Read security register
+* Returns:status of the security register
+* Note:
+******************************************************************************/
+uint32_t spi_read_scur(void)
+{
+	uint32_t spi_ctrl_val;
+
+	spi_ctrl_val = readl(RUBY_SPI_CONTROL);
+	writel(RUBY_SPI_READ_SCUR_MASK(spi_ctrl_val), RUBY_SPI_CONTROL);
+	writel(0, RUBY_SPI_READ_SCUR);
+	writel(spi_ctrl_val, RUBY_SPI_CONTROL);
+	return (SWAP32(readl(RUBY_SPI_COMMIT))&RUBY_SPI_READ_STATUS_MASK);
+}
+
+/******************************************************************************
+* Function:spi_read_dpb_reg
+* Purpose:read individual sector
+* Returns: status of the dynamic register
+* Note:
+*********************************************************************************/
+uint32_t spi_read_dpb_reg(uint32_t addr)
+{
+	uint32_t spi_ctrl_val;
+	uint32_t log_addr, sector_addr;
+
+	spi_ctrl_val = readl(RUBY_SPI_CONTROL);
+	log_addr = addr & ADDRESS_MASK;
+	sector_addr = log_addr & SECTOR_MASK;
+	writel(RUBY_SPI_READ_DPB_MASK(spi_ctrl_val), RUBY_SPI_CONTROL);
+	writel(sector_addr, RUBY_SPI_READ_DPB);
+	writel(spi_ctrl_val, RUBY_SPI_CONTROL);
+	return (SWAP32(readl(RUBY_SPI_COMMIT))&RUBY_SPI_READ_STATUS_MASK);
+}
+
+/******************************************************************************
+* Function:spi_gang_block_lock
+* Purpose:Block/protect the entire chip sectors
+* Returns:0 or < 0
+* Note:
+**********************************************************************************/
+int spi_gang_block_lock(void)
+{
+	uint32_t spi_ctrl_val;
+
+	spi_unlock();
+	spi_ctrl_val = readl(RUBY_SPI_CONTROL);
+	writel(RUBY_SPI_GBLOCK_LOCK_MASK(spi_ctrl_val), RUBY_SPI_CONTROL);
+	writel(0, RUBY_SPI_GBLOCK_LOCK);
+	writel(spi_ctrl_val, RUBY_SPI_CONTROL);
+	if ((spi_flash_wait_ready(SPI_WRITE_DELAY)) == -1){
+		printf("ERROR:WR Failed\n");
+		spi_lock();
+		return  ETIME;
+	}
+	spi_lock();
+	return 0;
+}
+
+/******************************************************************************
+* Function:spi_gang_block_unlock
+* Purpose:issue a unlock before any write to flash
+* Returns: 0 or < 0
+* Note:
+**********************************************************************************/
+int spi_gang_block_unlock(void)
+{
+	uint32_t spi_ctrl_val;
+
+	spi_unlock();
+	spi_ctrl_val = readl(RUBY_SPI_CONTROL);
+	writel(RUBY_SPI_GBLOCK_UNLOCK_MASK(spi_ctrl_val), RUBY_SPI_CONTROL);
+	writel(0, RUBY_SPI_GBLOCK_UNLOCK);
+	writel(spi_ctrl_val, RUBY_SPI_CONTROL);
+	if ((spi_flash_wait_ready(SPI_WRITE_DELAY)) == -1){
+		printf("ERROR:WR Failed\n");
+		spi_lock();
+		return ETIME;
+	}
+	spi_lock();
+	return 0;
+}
+
+/******************************************************************************
+* Function:spi_write_prot_select
+* Purpose:Check if the device support individual unprotect mode
+* Returns: 0 or < 0
+* Note:
+**********************************************************************************/
+int spi_write_prot_select(struct flash_info *device)
+{
+	uint32_t spi_ctrl_val;
+
+	switch(device->single_unprotect_mode){
+	case MACRONIX:
+		spi_unlock();
+		if (spi_read_scur() & SPI_SCUR_WPSEL) {
+			spi_lock();
+			printf("Individual Unprotedted Mode Is Enabled \n");
+			return 0;
+		}
+		spi_ctrl_val = readl(RUBY_SPI_CONTROL);
+		writel(RUBY_SPI_WRITE_PRO_SEL_MASK(spi_ctrl_val), RUBY_SPI_CONTROL);
+		writel(0, RUBY_SPI_WRITE_PRO_SEL);
+		writel(spi_ctrl_val, RUBY_SPI_CONTROL);
+		if ((spi_flash_wait_ready(SPI_WRITE_DELAY)) == -1){
+			printf("ERROR:Write Failed\n");
+			spi_lock();
+			return ETIME;
+		}
+
+		spi_lock();
+		if (spi_read_scur() & SPI_SCUR_WPSEL) {
+			printf("Individual Unprotected Mode Is Enabled\n");
+			return 0;
+		} else {
+			printf("Individual Unprotected Mode Is Disabled \n");
+			return EOPNOTSUPP;
+		}
+		break;
+	case WINBOND:
+		spi_unlock();
+		spi_ctrl_val = readl(RUBY_SPI_CONTROL);
+		writel(RUBY_SPI_WRITE_WPS_SEL_MASK(spi_ctrl_val), RUBY_SPI_CONTROL);
+		writel(SPI_WPS_ENABLE, RUBY_SPI_WRITE_REG3);
+		writel(spi_ctrl_val, RUBY_SPI_CONTROL);
+		spi_lock();
+		return 0;
+
+	default:
+		return EOPNOTSUPP;
+	}
+
+	return EOPNOTSUPP;
+}
+
+/******************************************************************************
+* Function:spi_clear_dpb_reg
+* Purpose:unproctect individual sector
+* Returns:0 or < 0
+* Note:
+**********************************************************************************/
+int spi_clear_dpb_reg(uint32_t addr)
+{
+	uint32_t spi_ctrl_val;
+	uint32_t log_addr, sector_addr;
+
+	spi_unlock();
+	spi_ctrl_val = readl(RUBY_SPI_CONTROL);
+	log_addr = addr & ADDRESS_MASK;
+	sector_addr = log_addr & SECTOR_MASK;
+	writel(RUBY_SPI_WRITE_DPB_MASK(spi_ctrl_val), RUBY_SPI_CONTROL);
+	writel(sector_addr, RUBY_SPI_WRITE_DPB);
+	writel(spi_ctrl_val, RUBY_SPI_CONTROL);
+	if ((spi_flash_wait_ready(SPI_WRITE_DELAY)) == -1){
+		printf("ERROR:Wr\n");
+		spi_lock();
+		return ETIME;
+	}
+	spi_lock();
+	return 0;
+}
+
+/******************************************************************************
+ * * Function:spi_clear_ibup_reg
+ * * Purpose:unproctect individual sector
+ * * Returns:0 or < 0
+ * * Note:
+ * **********************************************************************************/
+int spi_clear_ibup_reg(uint32_t addr)
+{
+        uint32_t spi_ctrl_val;
+        uint32_t log_addr, sector_addr;
+
+        spi_unlock();
+        spi_ctrl_val = readl(RUBY_SPI_CONTROL);
+        log_addr = addr & ADDRESS_MASK;
+        sector_addr = log_addr & SECTOR_MASK;
+        writel(RUBY_SPI_WRITE_IBUP_MASK(spi_ctrl_val), RUBY_SPI_CONTROL);
+        writel(sector_addr, RUBY_SPI_WRITE_IBUP);
+        writel(spi_ctrl_val, RUBY_SPI_CONTROL);
+        if ((spi_flash_wait_ready(SPI_WRITE_DELAY)) == -1){
+                printf("ERROR:Wr\n");
+                spi_lock();
+                return ETIME;
+        }
+        spi_lock();
+        return 0;
+}
+
+
+/******************************************************************************
+* Function:spi_lock
+* Purpose:issue a lock after write is complete
+* Returns:0
+* Note:
+**********************************************************************************/
+int spi_lock(void)
+{
+	writel(0, RUBY_SPI_WRITE_DIS);
+	return 0;
+}
+
+/******************************************************************************
+* Function:spi_unlock
+* Purpose:issue a unlock before any write to flash
+* Returns: 0
+* Note:
+**********************************************************************************/
+int spi_unlock(void)
+{
+	writel(0, RUBY_SPI_WRITE_EN);
+	return 0;
+}
+
+/******************************************************************************
+Function:spi_read_id
+Purpose:Reads spi device ID
+Returns: ID of a device
+Note:
+ *****************************************************************************/
+uint32_t spi_read_id(void)
+{
+	return SWAP32(readl(RUBY_SPI_READ_ID))&(RUBY_SPI_READ_ID_MASK);
+}
+
+/******************************************************************************
+Function:spi_read_status
+Purpose:Reads spi status reg
+Returns:Status
+Note:
+ *****************************************************************************/
+uint32_t spi_read_status(void)
+{
+	return SWAP32(readl(RUBY_SPI_READ_STATUS))&(RUBY_SPI_READ_STATUS_MASK);
+}
+
+/******************************************************************************
+Function:spi_write_status
+Purpose:write spi status reg
+Returns:0
+Note:
+ *****************************************************************************/
+int spi_write_status(uint32_t status)
+{
+	writel(status, RUBY_SPI_WRITE_STATUS);
+	return 0;
+}
+
+/******************************************************************************
+* Function:spi_unprotect_all
+* Purpose:unprotect the whole flash device
+* Returns:0 or < 0
+* Note:
+******************************************************************************/
+int spi_unprotect_all(struct flash_info *device)
+{
+	int ret = EOPNOTSUPP;
+
+	switch(device->single_unprotect_mode){
+	case MACRONIX:
+	case WINBOND:
+		ret = spi_gang_block_unlock();
+		break;
+	default:
+		ret = 0;
+	}
+
+	return ret;
+}
+
+/******************************************************************************
+* Function:spi_unprotect_sector
+* Purpose:unprotect the a individual sector
+* Returns:0 or < 0
+* Note:
+******************************************************************************/
+int spi_unprotect_sector(struct flash_info *device, uint32_t flash_addr)
+{
+	int ret = EOPNOTSUPP;
+
+	switch(device->single_unprotect_mode){
+	case MACRONIX:
+		ret = spi_clear_dpb_reg(flash_addr) ;
+		break;
+	case WINBOND:
+		ret = spi_clear_ibup_reg(flash_addr) ;
+		break;
+	default:
+		ret = 0;
+	}
+
+	return ret;
+}
+
+/******************************************************************************
+* Function:spi_protect_all
+* Purpose:protect whole chipset device
+* Returns:0 or < 0
+* Note:
+******************************************************************************/
+int spi_protect_all(struct flash_info *device)
+{
+	int ret = EOPNOTSUPP;
+
+	switch(device->single_unprotect_mode){
+	case MACRONIX:
+	case WINBOND:
+		spi_flash_wait_ready(SPI_ERASE_TIMEOUT);
+		ret = spi_gang_block_lock();
+		break;
+	default:
+		ret = 0;
+	}
+
+	return ret;
+}
+
+/******************************************************************************
+* Function:spi_read_wps
+* Purpose:Read security register
+* Returns: SPI Status Bits
+* Note:
+******************************************************************************/
+uint32_t spi_read_wps(void)
+{
+        uint32_t spi_ctrl_val;
+        uint32_t spi_status = 0;
+
+        spi_ctrl_val = readl(RUBY_SPI_CONTROL);
+        writel(RUBY_SPI_READ_SCUR_MASK(spi_ctrl_val), RUBY_SPI_CONTROL);
+        writel(0, RUBY_SPI_READ_REG3);
+        writel(spi_ctrl_val, RUBY_SPI_CONTROL);
+	spi_status = SWAP32(readl(RUBY_SPI_COMMIT)) & (RUBY_SPI_READ_STATUS_MASK);
+        return (spi_status);
+}
+
+int spi_device_erase(struct flash_info *device, u32 flash_addr)
+{
+	int ret = 0;
+	int i;
+	int n_of_64k;
+
+	switch(device->single_unprotect_mode){
+	case MACRONIX:
+	case WINBOND:
+		/* check if the address is below the first lower 64K or upper end 64K,
+		 * Flash specs for unproctect mode is lower 64K you can unprotect
+		 * 4K chuncks and anywhere is 64K
+		 */
+		n_of_64k = flash_addr / SPI_SECTOR_64K;
+		if ((n_of_64k == 0) || (n_of_64k == device->n_sectors - 1)) {
+			for (i = 0; i < SPI_SECTOR_INDEX; i++) {
+				/* Per Sector Unprotect */
+				ret = spi_unprotect_sector(device, flash_addr) ;
+				if (ret)
+					return -1;
+				/* Per-sector erase */
+				spi_flash_write_enable();
+				if ( device->sector_size * device->n_sectors > RUBY_SPI_BOUNDARY_4B ){
+					writel(SPI_MEM_ADDR_4B(flash_addr), RUBY_SPI_SECTOR_ERASE_20_4B);
+				} else {
+					writel(SPI_MEM_ADDR(flash_addr), RUBY_SPI_SECTOR_ERASE_20);
+				}
+				ret = spi_flash_wait_ready(SPI_ERASE_TIMEOUT);
+				if (ret)
+					return -1;
+				if (device->sector_size == SPI_SECTOR_4K)
+					break;
+				flash_addr += SPI_SECTOR_4K;
+			}
+
+		} else {
+			/*
+			 * Do 64K chunck at a time
+			 * Per Sector Unprotect
+			 */
+			ret = spi_unprotect_sector(device, flash_addr) ;
+			if (ret){
+				return -1;
+			}
+			/* Per-sector erase */
+			spi_flash_write_enable();
+			if ( device->sector_size * device->n_sectors > RUBY_SPI_BOUNDARY_4B ){
+				writel(SPI_MEM_ADDR_4B(flash_addr), RUBY_SPI_SECTOR_ERASE_D8_4B);
+			} else {
+				writel(SPI_MEM_ADDR(flash_addr), RUBY_SPI_SECTOR_ERASE_D8);
+			}
+		}
+		break;
+
+	default:
+		/* Per-sector erase */
+		spi_flash_write_enable();
+		if ( device->sector_size * device->n_sectors > RUBY_SPI_BOUNDARY_4B ){
+			if (device->flags & SECTOR_ERASE_OP20) {
+				writel(SPI_MEM_ADDR_4B(flash_addr), RUBY_SPI_SECTOR_ERASE_20_4B);
+			} else {
+				writel(SPI_MEM_ADDR_4B(flash_addr), RUBY_SPI_SECTOR_ERASE_D8_4B);
+			}
+		} else {
+			if (device->flags & SECTOR_ERASE_OP20) {
+				writel(SPI_MEM_ADDR(flash_addr), RUBY_SPI_SECTOR_ERASE_20);
+			} else {
+				writel(SPI_MEM_ADDR(flash_addr), RUBY_SPI_SECTOR_ERASE_D8);
+			}
+		}
+	}
+
+	return ret;
+}
+
diff --git a/board/ruby/spi_api.h b/board/ruby/spi_api.h
new file mode 100644
index 0000000..ddbc7c1
--- /dev/null
+++ b/board/ruby/spi_api.h
@@ -0,0 +1,173 @@
+#ifndef __SPI_H__
+#define __SPI_H__
+///////////////////////////////////////////////////////////////////////////////
+//             Includes
+///////////////////////////////////////////////////////////////////////////////
+//
+
+///////////////////////////////////////////////////////////////////////////////
+//              Types
+///////////////////////////////////////////////////////////////////////////////
+
+/******************************************************************************
+* Function:spi_protect_mode
+* Purpose:Check device ID, and probe if the device support protect mode
+* pointer to device information structure
+* Returns:0 or < 0 if error
+* Note:
+*  *****************************************************************************/
+int spi_protect_mode(struct flash_info *device);
+
+/******************************************************************************
+* Function:spi_read_id
+* Purpose:Reads spi device ID
+* Returns: ID of a device
+* Note:
+*  *****************************************************************************/
+uint32_t spi_read_id(void);
+
+/******************************************************************************
+* Function:spi_read_status
+* Purpose:Reads spi status reg
+* Returns: status
+* Note:
+*  *****************************************************************************/
+uint32_t spi_read_status(void);
+
+/******************************************************************************
+* Function:spi_write_status
+* Purpose:write spi status reg
+* Returns: NONE
+* Note:
+*  *****************************************************************************/
+int spi_write_status(uint32_t status);
+
+/******************************************************************************
+* Function:spi_lock
+* Purpose:locks spi device
+* Returns:0 or < 0
+* Note:
+*  *****************************************************************************/
+int spi_lock(void);
+
+/******************************************************************************
+* Function:spi_unlock
+* Purpose:unlocks spi device
+* Returns: 0 or < 0
+* Note:
+*  *****************************************************************************/
+int spi_unlock(void);
+
+/******************************************************************************
+* Function:spi_write_prot_select
+* Purpose:Select write protection
+* Returns: 0 or < 0
+* Note:
+*  *****************************************************************************/
+int spi_write_prot_select(struct flash_info *device);
+
+/******************************************************************************
+* Function:spi_read_scur
+* Purpose:Read security register
+* Returns:status of the secutiry register
+* Note:
+*  *****************************************************************************/
+uint32_t spi_read_scur(void);
+
+/******************************************************************************
+* Function:spi_gang_block_lock
+* Purpose:Lock all DPB
+* Returns:0 < 0
+* Note:
+*  *****************************************************************************/
+int spi_gang_block_lock(void);
+
+/******************************************************************************
+* Function:spi_gang_block_unlock
+* Purpose:Lock all DPB
+* Returns: 0 or < 0
+* Note:
+*  *****************************************************************************/
+int spi_gang_block_unlock(void);
+
+/******************************************************************************
+* Function:spi_clear_dpb_reg
+* Purpose:unproctect individual sector
+* Returns:0 or < 0
+* Note:
+***********************************************************************************/
+int spi_clear_dpb_reg(uint32_t addr);
+
+/******************************************************************************
+* Function:spi_read_dpb_reg
+* Purpose:read individual sector
+* Returns: status of the dynamic register
+* Note:
+**********************************************************************************/
+uint32_t spi_read_dpb_reg(uint32_t addr);
+
+/******************************************************************************
+* Function:spi_api_flash_status
+* Purpose: read statu of te Flash
+* Returns: status
+* Note:
+* ***********************************************************************************/
+int spi_api_flash_status(void);
+
+/******************************************************************************
+* Function:spi_unprotect_all
+* Purpose:unprotect the whole flash device
+* Returns:0 or < 0
+* Note:
+*******************************************************************************/
+int spi_unprotect_all(struct flash_info *device);
+
+/******************************************************************************
+* Function:spi_unprotect_sector
+* Purpose:unprotect the a individual sector
+* Returns:0 or < 0
+* Note:
+*******************************************************************************/
+int spi_unprotect_sector(struct flash_info *device, uint32_t address);
+
+/******************************************************************************
+* Function:spi_protect_all
+* Purpose:protect whole chipset device
+* Returns:0 or < 0
+* Note:
+******************************************************************************/
+int spi_protect_all(struct flash_info *device);
+
+/******************************************************************************
+* Function:spi_flash_wait_ready
+* Purpose:delay number of seconds
+* Returns:0 or < 0
+* Note:
+*******************************************************************************/
+int spi_flash_wait_ready(int sec);
+
+/******************************************************************************
+* Function:spi_read_wps
+* Purpose:Read register 3
+* Returns: SPI Status Bits
+* Note:
+*******************************************************************************/
+uint32_t spi_read_wps(void);
+
+/******************************************************************************
+* Function:spi_write_wps
+* Purpose:Read register 3
+* Returns: 0
+* Note:
+******************************************************************************/
+uint32_t spi_write_wps(void);
+
+int spi_device_erase(struct flash_info *device, u32 flash_addr);
+
+void spi_flash_write_enable(void);
+
+void spi_protect_mode_on(void);
+
+void spi_protect_mode_off(void);
+
+#endif // __SPI_H__
diff --git a/board/ruby/spi_flash.c b/board/ruby/spi_flash.c
new file mode 100644
index 0000000..618e346
--- /dev/null
+++ b/board/ruby/spi_flash.c
@@ -0,0 +1,1139 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "ruby.h"
+#include "ruby_spi_api.h"
+#include "ruby_spi_flash_data.h"
+#include "spi_api.h"
+
+#include <environment.h>
+#include <malloc.h>
+#include <asm/errno.h>
+
+#define SPI_PAGE_SIZE		256
+#define ENV_BASE_SIZE (CONFIG_ENV_BASE_SIZE - ENV_HEADER_SIZE)
+
+
+#define SPI_FLASH_UBOOT_ADDR	0
+
+#define SPI_FLASH_FULL_UBOOT_SIZE	(128*1024)	/* Normal Ruby u-boot partition is just under 128k */
+#define SPI_FLASH_MINI_UBOOT_SIZE	(20*1024)	/* Ruby mini u-boot is 20k */
+
+#define SPI_FLASH_TEST		1
+
+#define SPI_FLASH_READ_BYPASS	0	/* if set to 1, then d-cache will be bypassed when reading from flash */
+
+#if SPI_FLASH_READ_BYPASS
+	#define SPI_FLASH_COPY_FROM(mem_addr, flash_addr, size) \
+		io_copy_from(mem_addr, RUBY_SPI_FLASH_ADDR + flash_addr, size)
+	#define SPI_FLASH_COPY_TO(flash_addr, mem_addr, size) \
+		io_copy_to(RUBY_SPI_FLASH_ADDR + flash_addr, mem_addr, size)
+	#define SPI_FLASH_WRITE_PREPARE(start, stop)
+#else
+	#define SPI_FLASH_COPY_FROM(mem_addr, flash_addr, size) \
+		memcpy(mem_addr, (void*)(RUBY_SPI_FLASH_ADDR + flash_addr), size)
+	#define SPI_FLASH_COPY_TO(flash_addr, mem_addr, size) \
+		io_copy_to(RUBY_SPI_FLASH_ADDR + flash_addr, mem_addr, size)
+	#define SPI_FLASH_WRITE_PREPARE(start, stop) \
+		spi_flash_cache_inv(RUBY_SPI_FLASH_ADDR + start, RUBY_SPI_FLASH_ADDR + stop)
+#endif
+
+/* Global data. Only 1 flash can exist. */
+static struct flash_info *g_spi_flash = NULL;
+static u8 *g_spi_lock = NULL;
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* references to names in env_common.c */
+extern uchar default_environment[];
+extern int default_environment_size;
+
+char * env_name_spec = "SPI Flash";
+env_t *env_ptr = NULL;
+#if 0
+// this is for SPI1
+static void spi_gpio_config(void)
+{
+	gpio_config(RUBY_GPIO_SPI_MISO, RUBY_GPIO_ALT_OUTPUT);
+	gpio_config(RUBY_GPIO_SPI_MOSI, RUBY_GPIO_ALT_INPUT);
+	gpio_config(RUBY_GPIO_SPI_SCK, RUBY_GPIO_ALT_OUTPUT);
+	gpio_config(RUBY_GPIO_SPI_nCS, RUBY_GPIO_ALT_OUTPUT);
+}
+#endif
+static void spi_ctrl_clock_config(u32 val)
+{
+	writel(RUBY_SYS_CTL_MASK_SPICLK, RUBY_SYS_CTL_MASK);
+	writel(RUBY_SYS_CTL_SPICLK(val), RUBY_SYS_CTL_CTRL);
+	writel(0x0, RUBY_SYS_CTL_MASK);
+}
+
+static void spi_clock_config(unsigned freq)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+
+	if (freq >= (gd->bus_clk / 2)) {
+		spi_ctrl_clock_config(0x0);
+	} else if (freq >= (gd->bus_clk / 4)) {
+		spi_ctrl_clock_config(0x1);
+	} else if(freq >= (gd->bus_clk / 8)) {
+		spi_ctrl_clock_config(0x2);
+	} else {
+		spi_ctrl_clock_config(0x3);
+	}
+}
+
+static inline unsigned long spi_flash_align_begin(unsigned long addr, unsigned long step)
+{
+	return (addr & (~(step - 1)));
+}
+
+static inline unsigned long spi_flash_align_end(unsigned long addr, unsigned long step)
+{
+	return ((addr + step - 1) & (~(step - 1)));
+}
+
+static inline void spi_flash_cache_inv(unsigned long begin, unsigned long end)
+{
+	invalidate_dcache_range(
+		spi_flash_align_begin(begin, ARC_DCACHE_LINE_LEN),
+		spi_flash_align_end(end, ARC_DCACHE_LINE_LEN));
+}
+
+unsigned spi_flash_size(void)
+{
+	unsigned ret = 0;
+
+	if (g_spi_flash) {
+		ret = g_spi_flash->sector_size * g_spi_flash->n_sectors;
+	}
+
+	return ret;
+}
+
+unsigned spi_flash_sector_size(void) 
+{
+	unsigned ret = 0;
+
+	if (g_spi_flash) {
+		ret = g_spi_flash->sector_size;
+	}
+
+	return ret;
+}
+
+#if !defined(TOPAZ_TINY_UBOOT)
+static unsigned long spi_flash_sector_roundup(unsigned long size)
+{
+	unsigned long sector_size = spi_flash_sector_size();
+
+	if (!sector_size) {
+		return 0;
+	}
+
+	size = size + (sector_size - 1);
+	size = size - (size % sector_size);
+
+	return size;
+}
+
+static unsigned long spi_flash_uboot_size(void)
+{
+	unsigned long flash_size = spi_flash_size();
+
+	if (!flash_size) {
+		return 0;
+	}
+
+	/*
+	 * Bit of a hack. We don't have partition tables in uboot;
+	 * Use flash size as a heuristic to determine how big
+	 * u-boot is in flash. If the flash is smaller than u-boot,
+	 * we can't be using a full size u-boot.
+	 */
+	if (flash_size < SPI_FLASH_FULL_UBOOT_SIZE) {
+		return SPI_FLASH_MINI_UBOOT_SIZE;
+	}
+
+	return SPI_FLASH_FULL_UBOOT_SIZE;
+}
+
+static unsigned long spi_flash_env_addr(int index)
+{
+	return SPI_FLASH_UBOOT_ADDR + spi_flash_uboot_size() + index * spi_flash_sector_roundup(CONFIG_ENV_SIZE);
+}
+#endif
+
+static inline u32 spi_flash_id(void)
+{
+	return (SWAP32(readl(RUBY_SPI_READ_ID)) & 0xFFFFFF);
+}
+
+static inline void spi_flash_deassert_cs(void)
+{
+	spi_flash_id();
+}
+
+void spi_flash_write_enable(void)
+{
+	writel(0, RUBY_SPI_WRITE_EN);
+}
+
+static inline void spi_flash_write_disable(void)
+{
+	writel(0, RUBY_SPI_WRITE_DIS);
+}
+
+static inline u32 spi_flash_status(void)
+{
+	return (SWAP32(readl(RUBY_SPI_READ_STATUS)) & 0xFF);
+}
+
+static inline int spi_flash_ready(void)
+{
+	return !(spi_flash_status() & RUBY_SPI_WR_IN_PROGRESS);
+}
+
+#if !defined(TOPAZ_EP_MINI_UBOOT)
+int spi_flash_wait_ready(int sec)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+
+	int ret = -1;
+	int i;
+
+	for(i = 0; i < sec; ++i) {
+		ulong stamp = get_timer(0);
+		while(1) {
+			if(spi_flash_ready()) {
+				ret = 0;
+				goto done;
+			} else if (get_timer(stamp) > CONFIG_SYS_HZ) {
+				break;
+			}
+		}
+	}
+
+done:
+	return ret;
+}
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
+static inline u32 spi_flash_lock_begin_sector(u32 begin)
+{
+	return begin / g_spi_flash->sector_size + (!!(begin % g_spi_flash->sector_size));
+}
+
+static inline u32 spi_flash_lock_end_sector(u32 end)
+{
+	return min(end, spi_flash_size()) / g_spi_flash->sector_size;
+}
+
+#if !defined(TOPAZ_EP_MINI_UBOOT)
+static int spi_flash_locked(u32 flash_begin, u32 size)
+{
+#if defined(TOPAZ_TINY_UBOOT)
+	return 0;
+#else
+	int ret = 0;
+
+	if (g_spi_flash && g_spi_lock) {
+
+		const u32 i_begin = spi_flash_lock_begin_sector(flash_begin);
+		const u32 i_end = spi_flash_lock_end_sector(flash_begin + size);
+
+		u32 i;
+		for (i = i_begin; i < i_end; ++i) {
+			if (g_spi_lock[i]) {
+				ret = 1;
+				break;
+			}
+		}
+	}
+
+	return ret;
+#endif
+}
+#endif
+
+#if !defined(TOPAZ_EP_MINI_UBOOT) && !defined(TOPAZ_TINY_UBOOT)
+static void spi_flash_lock_fill(u32 flash_begin, u32 size, u8 val)
+{
+	if (g_spi_flash && g_spi_lock) {
+
+		const u32 i_begin = spi_flash_lock_begin_sector(flash_begin);
+		const u32 i_end = spi_flash_lock_end_sector(flash_begin + size);
+
+		u32 i;
+		for (i = i_begin; i < i_end; ++i) {
+			g_spi_lock[i] = val;
+		}
+	}
+}
+
+static inline void spi_flash_lock(u32 flash_addr, u32 size)
+{
+	spi_flash_lock_fill(flash_addr, size, 1);
+}
+
+static inline void spi_flash_unlock(u32 flash_addr, u32 size)
+{
+	spi_flash_lock_fill(flash_addr, size, 0);
+}
+
+static void spi_flash_lock_prepare(void)
+{
+	if (!g_spi_lock && g_spi_flash) {
+
+		/* Heap is allocated after board is inited.
+		 * So this snippet must be called later.
+		 */
+
+		g_spi_lock = malloc(g_spi_flash->n_sectors);
+
+		spi_flash_unlock(0, spi_flash_size());
+		spi_flash_lock(SPI_FLASH_UBOOT_ADDR, spi_flash_uboot_size());
+	}
+}
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
+void spi_flash_probe(void)
+{
+	int i;
+	u32 jedec_id;
+
+	if (g_spi_lock) {
+		free(g_spi_lock);
+		g_spi_lock = NULL;
+	}
+	g_spi_flash = NULL;
+
+	spi_clock_config(FREQ_UNKNOWN);
+
+	jedec_id = spi_flash_id();
+
+	for(i = 0; i < ARRAY_SIZE(flash_data); ++i) {
+		if(jedec_id == flash_data[i].jedec_id) {
+			g_spi_flash = flash_data + i;
+			spi_clock_config(g_spi_flash->freq);
+			break;
+		}
+	}
+	if(!g_spi_flash) {
+		printf("JEDEC unknown: 0x%x\n", (unsigned)jedec_id);
+		return;
+	}
+}
+
+#if !defined(TOPAZ_EP_MINI_UBOOT) && !defined(TOPAZ_TINY_UBOOT)
+void spi_protect_mode_on(void)
+{
+	if (g_spi_flash){
+		if (spi_protect_mode(g_spi_flash) == EOPNOTSUPP){
+			g_spi_flash->single_unprotect_mode = NOT_SUPPORTED;
+		}
+	}
+}
+
+void spi_protect_mode_off(void)
+{
+	if (g_spi_flash){
+		g_spi_flash->single_unprotect_mode = NOT_SUPPORTED;
+	}
+}
+
+void spi_unprotect_global(void)
+{
+	if (g_spi_flash){
+		spi_unprotect_all(g_spi_flash);
+	}
+}
+
+#endif
+
+static int spi_flash_read_op_check(u32 flash_addr, u32 size)
+{
+	int ret = 0;
+
+	if (!g_spi_flash) {
+		/* No flash chip detected during probe. */
+		ret = -1;
+	} else if(flash_addr >= spi_flash_size()) {
+		/* Adress beyond flash address space. */
+		ret = -2;
+	} else if(!spi_flash_ready()) {
+		/* Flash is not ready. Why? */
+		ret = -3;
+	}
+
+	return ret;
+}
+
+#if !defined(TOPAZ_EP_MINI_UBOOT)
+static int spi_flash_erase_op_check(u32 flash_addr, u32 size)
+{
+	int ret = spi_flash_read_op_check(flash_addr, size);
+
+	if (ret) {
+		/* Already error. */
+	} else if (flash_addr % g_spi_flash->sector_size) {
+		/* Although it is legal to have erase address
+		 * inside sector, it is not very safe.
+		 * Simple mistake - and neighbour sector erased.
+		 */
+		ret = -4;
+	} else if (size % g_spi_flash->sector_size) {
+		/* Same as previous case - legal but not safe. */
+		ret = -5;
+	} else if(spi_flash_locked(flash_addr, size)) {
+		printf("Erase within locked area is not permitted. Unlock first !\n");
+		ret = -6;
+	}
+
+	return ret;
+}
+
+static int spi_flash_write_op_check(u32 flash_addr, u32 size)
+{
+	int ret = spi_flash_read_op_check(flash_addr, size);
+
+	if (ret) {
+		/* Already error. */
+	} else if(spi_flash_locked(flash_addr, size)) {
+		printf("Write within locked area is not permitted. Unlock first !\n");
+		ret = -4;
+	}
+
+	return ret;
+}
+
+#if !defined(TOPAZ_TINY_UBOOT)
+static
+#endif
+int spi_flash_erase(u32 flash_addr, u32 size)
+{
+	int ret = spi_flash_erase_op_check(flash_addr, size);
+
+	if (!ret) {
+
+		u32 flash_end = min(flash_addr + size, spi_flash_size());
+
+		SPI_FLASH_WRITE_PREPARE(flash_addr, flash_end);
+
+		if ((flash_addr == 0) && (size >= spi_flash_size())) {
+
+			/* Unprotec All Regions */
+
+			ret = spi_unprotect_all(g_spi_flash);
+			if (ret){
+				printf("ERROR: unprot all\n");
+				return (ret);
+			}
+
+			/* Bulk erase */
+			spi_flash_write_enable();
+			writel(0, RUBY_SPI_BULK_ERASE);
+
+			ret = spi_flash_wait_ready(SPI_ERASE_TIMEOUT * g_spi_flash->n_sectors);
+			if (ret) {
+				return (ret);
+			}
+
+		} else {
+			while (flash_addr < flash_end) {
+				/* Per Sector Unprotect/erase */
+				if (spi_device_erase(g_spi_flash, flash_addr) < 0){
+					break;
+				}
+
+				flash_addr += g_spi_flash->sector_size;
+
+				ret = spi_flash_wait_ready(SPI_ERASE_TIMEOUT);
+				if (ret) {
+					break;
+				}
+			}
+		}
+	}
+
+	spi_flash_deassert_cs();
+	/* Global Protect */
+	spi_flash_wait_ready(SPI_ERASE_TIMEOUT);
+	ret = spi_protect_all(g_spi_flash);
+
+	if (ret) {
+		printf("ERROR: Failed to protect all regions of the Flash \n");
+	}
+
+	return ret;
+}
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
+int spi_flash_read(u32 flash_addr, u8 *mem_addr, u32 size, u32 *ret_size)
+{
+	int ret = spi_flash_read_op_check(flash_addr, size);
+
+	if (!ret) {
+		*ret_size = min(size, spi_flash_size() - flash_addr);
+		SPI_FLASH_COPY_FROM(mem_addr, flash_addr, *ret_size);
+	}
+
+	spi_flash_deassert_cs();
+
+	return ret;
+}
+
+#if !defined(TOPAZ_EP_MINI_UBOOT)
+int spi_flash_write(u32 flash_addr, u8 *mem_addr, u32 size, u32 *ret_size)
+{
+	int ret = spi_flash_write_op_check(flash_addr, size);
+
+	if (!ret) {
+
+		u32 flash_end = min(flash_addr + size, spi_flash_size());
+
+		SPI_FLASH_WRITE_PREPARE(flash_addr, flash_end);
+
+		*ret_size = flash_end - flash_addr;
+
+		while (flash_addr < flash_end) {
+
+			/* Per-page programming */
+
+			u32 write_sz = min(
+					SPI_PAGE_SIZE - (flash_addr % SPI_PAGE_SIZE), /* do not exceed page boundary */
+					flash_end - flash_addr); /* do not exceed requested range */
+			/* Unprotect Sector */
+			ret = spi_unprotect_sector(g_spi_flash,flash_addr);
+			if (ret) {
+				printf("ERROR: Failed to unprotect Sector %x \n", flash_addr);
+				break;
+			}
+
+			spi_flash_write_enable();
+			if ( spi_flash_size() > RUBY_SPI_BOUNDARY_4B ){
+				writel(SPI_MEM_ADDR_4B(flash_addr), RUBY_SPI_PAGE_PROGRAM_4B);
+			}
+			else {
+				writel(SPI_MEM_ADDR(flash_addr), RUBY_SPI_PAGE_PROGRAM);
+			}
+			SPI_FLASH_COPY_TO((void*)flash_addr, mem_addr, write_sz);
+			writel(0, RUBY_SPI_COMMIT);
+
+			flash_addr += write_sz;
+			mem_addr += write_sz;
+
+			ret = spi_flash_wait_ready(SPI_WRITE_TIMEOUT);
+			if (ret) {
+				break;
+			}
+		}
+	}
+
+	spi_flash_deassert_cs();
+	/* Global Protect */
+	spi_flash_wait_ready(SPI_WRITE_TIMEOUT);
+	ret = spi_protect_all(g_spi_flash);
+
+	if (ret){
+		printf("ERROR: Failed to protect all regions of the Flash \n");
+	}
+	return ret;
+}
+#endif
+
+#if !defined(TOPAZ_EP_MINI_UBOOT) && !defined(TOPAZ_TINY_UBOOT)
+int spi_flash_info(void)
+{
+#ifdef CONFIG_SHOW_BOOT_PROGRESS
+	if (!g_spi_flash) {
+		printf("No SPI flash.\n");
+	} else {
+		int i;
+		printf("SPI flash info:\n");
+		printf("\tname             : %s\n", g_spi_flash->name);
+		printf("\tjedec_id         : 0x%x\n", (unsigned)g_spi_flash->jedec_id);
+		printf("\tsector size      : %u\n", (unsigned)g_spi_flash->sector_size);
+		printf("\tnumber of sector : %u\n", (unsigned)g_spi_flash->n_sectors);
+		printf("\tfrequency        : %u\n", (unsigned)g_spi_flash->freq);
+		printf("\tflags            : 0x%x\n", (unsigned)g_spi_flash->flags);
+		printf("\tlock             : ");
+		if (g_spi_lock) {
+			for (i = 0; i < g_spi_flash->n_sectors; ++i) {
+				putc(g_spi_lock[i] ? '1' : '0');
+			}
+		}
+		putc('\n');
+	}
+#endif
+	return 0;
+}
+
+#if SPI_FLASH_TEST
+
+static int spi_flash_test_cmp(u32 flash_addr, u32 size, u8 val)
+{
+	int ret = 0;
+
+	u32 i = 0;
+	u8 read_buf[64];
+	int check_latch = 1;
+
+	for (i = flash_addr; i < size; i += sizeof(read_buf)) {
+
+		int j;
+		u32 ret_size;
+		int read_ret;
+
+		u32 read_size = min(sizeof(read_buf), size - i);
+
+		memset(read_buf, ~val, sizeof(read_buf));
+
+		read_ret = spi_flash_read(i, read_buf, read_size, &ret_size);
+
+		if (read_ret) {
+			ret = -1;
+			printf("Read failed: %d\n", read_ret);
+			goto done;
+		}
+
+		if (ret_size != read_size) {
+			ret = -2;
+			printf("Read failed: ret_size=%u, read_size=%u\n",
+					(unsigned)ret_size, (unsigned)read_size);
+			goto done;
+		}
+
+		for (j = 0; j < ret_size; ++j) {
+			if (read_buf[j] != val) {
+				ret = -3;
+				if (check_latch) {
+					printf("Byte %u value is wrong: 0x%x (must be 0x%x) (%u cache-line)\n",
+							(unsigned)(i + j), (unsigned)read_buf[j],
+							(unsigned)val, (unsigned)((i + j) / ARC_DCACHE_LINE_LEN));
+					check_latch = 0;
+				}
+			} else if (!check_latch) {
+				printf("Byte %u value is correct: 0x%x (%u cache-line)\n",
+						(unsigned)(i + j), (unsigned)val,
+						(unsigned)((i + j) / ARC_DCACHE_LINE_LEN));
+				check_latch = 1;
+			}
+		}
+	}
+
+done:
+	return ret;
+}
+
+static int spi_flash_test_set(u32 flash_addr, u32 size, u8 val)
+{
+	int ret = 0;
+
+	u32 i = 0;
+	u8 *page_buf = malloc(SPI_PAGE_SIZE);
+
+	for (i = flash_addr; i < size; i += SPI_PAGE_SIZE) {
+
+		u32 ret_size;
+		int write_ret;
+
+		memset(page_buf, val, SPI_PAGE_SIZE);
+
+		write_ret = spi_flash_write(i, page_buf, SPI_PAGE_SIZE, &ret_size);
+
+		if (write_ret) {
+			printf("Write failed: %d\n", write_ret);
+			ret = -1;
+			goto done;
+		}
+
+		if (ret_size != SPI_PAGE_SIZE) {
+			printf("Write failed: ret_size=%u\n", (unsigned)ret_size);
+			ret = -2;
+			goto done;
+		}
+	}
+
+done:
+	free(page_buf);
+	return ret;
+}
+
+static int spi_flash_test_speed(void)
+{
+	int ret = 0;
+	u32 size = spi_flash_size();
+	u8 *read_buf = malloc(SPI_PAGE_SIZE);
+	unsigned long long time = 0;
+	unsigned timestamp = get_timer(0);
+	int i;
+
+	for (i = 0; i < size; i += SPI_PAGE_SIZE) {
+
+		u32 ret_size = 0;
+		u32 read_size = min(SPI_PAGE_SIZE, size - i);
+
+		ret = spi_flash_read(i, read_buf, read_size, &ret_size);
+		if (ret) {
+			printf("Read failed: %d\n", ret);
+			goto done;
+		}
+
+		time += get_timer(timestamp);
+		timestamp = get_timer(0);
+	}
+
+done:
+	printf("Ticks: %llu\n", time);
+	free(read_buf);
+	return ret;
+}
+
+#endif // #if SPI_FLASH_TEST
+
+static int spi_flash_test(void)
+{
+	int ret = 0;
+
+#if SPI_FLASH_TEST
+
+	int i;
+
+	if (!g_spi_flash) {
+		printf("No SPI flash.\n");
+		ret = -1;
+		goto done;
+	}
+
+	printf("TEST POINT 1\n");
+
+	ret = spi_flash_erase(0x0, spi_flash_size());
+	if (ret) {
+		printf("Bulk erase is failed: %d\n", ret);
+		ret = -2;
+		goto done;
+	}
+
+	printf("TEST POINT 2\n");
+
+	ret = spi_flash_test_cmp(0x0, spi_flash_size(), 0xFF);
+	if (ret) {
+		printf("Check after bulk erase is failed: %d\n", ret);
+		ret = -3;
+		goto done;
+	}
+
+	printf("TEST POINT 3\n");
+
+	ret = spi_flash_test_set(0x0, spi_flash_size(), 0xAA);
+	if (ret) {
+		printf("Fill with constant is failed: %d\n", ret);
+		ret = -4;
+		goto done;
+	}
+
+	printf("TEST POINT 4\n");
+
+	ret = spi_flash_test_cmp(0x0, spi_flash_size(), 0xAA);
+	if (ret) {
+		printf("Check constant filling is failed: %d\n", ret);
+		ret = -5;
+		goto done;
+	}
+
+	printf("TEST POINT 5\n");
+
+	i = 0;
+	while(i < g_spi_flash->n_sectors) {
+		int num = min(i + 1, g_spi_flash->n_sectors - i);
+		ret = spi_flash_erase(i * g_spi_flash->sector_size, num * g_spi_flash->sector_size);
+		if (ret) {
+			printf("Per-sector erase is failed (%d:%d): %d\n", (int)i, (int)num, ret);
+			ret = -6;
+			goto done;
+		}
+		i += num;
+	}
+
+	printf("TEST POINT 6\n");
+
+	ret = spi_flash_test_cmp(0x0, spi_flash_size(), 0xFF);
+	if (ret) {
+		printf("Check after per-sector erase is failed: %d\n", ret);
+		ret = -7;
+		goto done;
+	}
+
+	printf("TEST POINT 7\n");
+
+	for (i = 0; i < 20; ++i) {
+		u32 addr = get_timer(0) % (spi_flash_size() - g_spi_flash->sector_size);
+		u32 sector_addr = addr / g_spi_flash->sector_size * g_spi_flash->sector_size;
+		u32 size = 2 * (sector_addr + g_spi_flash->sector_size - addr);
+		if (size) {
+
+			printf("Random test: addr=0x%x size=%u : ", (unsigned)addr, (unsigned)size);
+
+			ret = spi_flash_erase(sector_addr, 2 * g_spi_flash->sector_size);
+			if (ret) {
+				printf("2 sector erase is failed 0x%x: %d\n", (unsigned)sector_addr, ret);
+				ret = -7;
+				goto done;
+			}
+
+			ret = spi_flash_test_set(addr, size, 0x55);
+			if (ret) {
+				printf("Fill with constant is failed: %d\n", ret);
+				ret = -8;
+				goto done;
+			}
+
+			ret = spi_flash_test_cmp(addr, size, 0x55);
+			if (ret) {
+				printf("Check constant filling is failed: %d\n", ret);
+				ret = -8;
+				goto done;
+			}
+
+			ret = spi_flash_test_cmp(sector_addr, addr - sector_addr, 0xFF);
+			if (ret) {
+				printf("Check that constant filling is not out-of-boundary failed: %d\n", ret);
+				ret = -9;
+				goto done;
+			}
+
+			ret = spi_flash_test_cmp(addr + size,
+					sector_addr + 2 * g_spi_flash->sector_size - addr - size, 0xFF);
+			if (ret) {
+				printf("Check that constant filling is not out-of-boundary failed: %d\n", ret);
+				ret = -10;
+				goto done;
+			}
+
+			printf("OK\n");
+		}
+	}
+
+	printf("TEST POINT 8\n");
+
+	ret = spi_flash_test_speed();
+	if (ret) {
+		printf("Speed test failed: %d\n", ret);
+		ret = -11;
+		goto done;
+	}
+
+	printf("TEST POINT 9\n");
+
+done:
+	if (ret) {
+		printf("Failure: ret=%d\n", ret);
+	} else {
+		printf("Success!\n");
+	}
+#endif // #if SPI_FLASH_TEST
+
+	return ret;
+}
+
+#if !defined(TOPAZ_TINY_UBOOT)
+int do_spi_flash(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+{
+	int ret = 0;
+
+	if (argc < 2) {
+		printf("At least one argument to command please.\n");
+		ret = -1;
+	} else {
+
+		char *cmd = argv[1];
+
+		spi_flash_lock_prepare();
+
+		if (strcmp(cmd, "test") == 0) {
+
+			ret = spi_flash_test();
+
+		} else if (strcmp(cmd, "info") == 0) {
+
+			ret = spi_flash_info();
+
+		} else if (strcmp(cmd, "erase") == 0) {
+
+			u32 flash_addr = (argc >= 3) ? simple_strtoul(argv[2], NULL, 0) : 0;
+			u32 size = (argc >= 4) ? simple_strtoul(argv[3], NULL, 0) : spi_flash_size();
+
+			printf("Erase: flash=0x%x size=%u\n", (unsigned)flash_addr, (unsigned)size);
+
+			ret = spi_flash_erase(flash_addr, size);
+
+		} else if (strcmp(cmd, "lock") == 0) {
+
+			u32 flash_addr = (argc >= 3) ? simple_strtoul(argv[2], NULL, 0) : 0;
+			u32 size = (argc >= 4) ? simple_strtoul(argv[3], NULL, 0) : spi_flash_size();
+
+			printf("Lock: flash=0x%x size=%u\n", (unsigned)flash_addr, (unsigned)size);
+
+			spi_flash_lock(flash_addr, size);
+
+		} else if (strcmp(cmd, "unlock") == 0) {
+
+			u32 flash_addr = (argc >= 3) ? simple_strtoul(argv[2], NULL, 0) : 0;
+			u32 size = (argc >= 4) ? simple_strtoul(argv[3], NULL, 0) : spi_flash_size();
+
+			printf("Unlock: flash=0x%x size=%u\n", (unsigned)flash_addr, (unsigned)size);
+
+			spi_flash_unlock(flash_addr, size);
+
+		} else if (strcmp(cmd, "unlock_hw") == 0) {
+			uint32_t spi_ctrl_val;
+			spi_flash_write_enable();
+			spi_ctrl_val = readl(RUBY_SPI_CONTROL);
+			writel((spi_ctrl_val & 0xffffff00) | 0x1, RUBY_SPI_CONTROL);
+			writel(0, TOPAZ_SPI_GBLOCK_UNLOCK);
+			writel(spi_ctrl_val, RUBY_SPI_CONTROL);
+			spi_flash_wait_ready(SPI_UNLOCK_TIMEOUT);
+			spi_flash_write_disable();
+		} else if (argc != 5) {
+			printf("Not enough arguments.\n");
+			ret = -2;
+		} else {
+			u32 ret_size = 0;
+			u32 flash_addr = simple_strtoul(argv[2], NULL, 0);
+			u8 *mem_addr = (u8*)simple_strtoul(argv[3], NULL, 0);
+			u32 size = simple_strtoul(argv[4], NULL, 0);
+
+			if (strcmp(cmd, "read") == 0) {
+				printf("Read: ");
+				ret = spi_flash_read(flash_addr, mem_addr, size, &ret_size);
+			} else if (strcmp(cmd, "write") == 0) {
+				printf("Write: ");
+				ret = spi_flash_write(flash_addr, mem_addr, size, &ret_size);
+			} else {
+				printf("Unsupported '%s' command: ", cmd);
+				ret = -3;
+			}
+
+			if (!ret) {
+				printf("flash=0x%x mem=0x%x size=%u ret_size=%u\n",
+						(unsigned)flash_addr, (unsigned)mem_addr, (unsigned)size, (unsigned)ret_size);
+			}
+		}
+
+		if (ret) {
+			printf("'%s' : failed : ret=%d\n", cmd, (int)ret);
+		}
+	}
+
+	return ret;
+}
+
+U_BOOT_CMD(spi_flash, 5, 0, do_spi_flash,
+		"SPI flash sub-system",
+		"spi_flash info                           - show available SPI flash\n"
+		"spi_flash test                           - test flash (DESTROY ALL DATA ON FLASH!)\n"
+		"spi_flash read flash_addr mem_addr size  - read data from flash to memory\n"
+		"spi_flash write flash_addr mem_addr size - write data from memory to flash\n"
+		"spi_flash erase [flash_addr len]         - erase flash\n"
+		"spi_flash lock [flash_addr len]          - lock flash (granularity is sector size)\n"
+		"spi_flash unlock [flash_addr len]        - unlock flash (granularity is sector size)\n"
+		"spi_flash unlock_hw                      - unlock flash hardware protection\n"
+	  );
+#endif
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
+void board_spi_flash_init(void)
+{
+#ifndef PLATFORM_NOSPI
+	spi_flash_probe();
+	if ( spi_flash_size() > RUBY_SPI_BOUNDARY_4B ){
+		writel(RUBY_SPI_ADDRESS_MODE_4B, RUBY_SPI_CONTROL);
+	}
+#else /* flash-less build */
+	printf("Use default environment on flash-less build\n");
+	gd->env_addr  = (ulong) &default_environment[0];
+	gd->env_valid = 0;
+#endif
+}
+#if defined(TOPAZ_EP_MINI_UBOOT) || defined(TOPAZ_TINY_UBOOT)
+int saveenv(void)
+{
+	return 0;
+}
+#else
+int saveenv(void)
+{
+	u32 size, flash_addr, ret_size;
+	int ret;
+
+	if ((gd->env_valid == 0) || (env_ptr == NULL)) {
+		puts("Environment SPI flash not initialized properly!!!\n");
+		return 1;
+	}
+
+	flash_addr = spi_flash_env_addr(0);
+	size = spi_flash_sector_roundup(CONFIG_ENV_SIZE);
+
+	printf("Erasing SPI flash env, %u bytes at 0x%x...\n", size, flash_addr);
+	ret = spi_flash_erase( flash_addr, size );
+	if ( ret ) {
+		printf("Error along the way #1 - %d\n", ret);
+		goto done;
+	}
+	size = CONFIG_ENV_SIZE;
+	printf("Writing to SPI flash...");
+	ret = spi_flash_write( flash_addr, (u8 *)env_ptr, size, &ret_size );
+	if ( ret ) {
+		printf("Error along the way #2 - %d\n", ret);
+		goto done;
+	}
+	ret = 0;
+	puts("done\n");
+done:
+	return ret;
+}
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
+#if !defined(TOPAZ_TINY_UBOOT)
+void env_relocate_spec (int index)
+{
+	u32 len, flash_addr = spi_flash_env_addr(index);
+
+	spi_flash_read( flash_addr, (u8 *)env_ptr, CONFIG_ENV_SIZE, &len);
+}
+
+uchar env_get_char_spec (int index)
+{
+	return ( *((uchar *)(gd->env_addr + index)) );
+}
+
+int env_verify (u32 env_addr)
+{
+	u32 crc, len, ret_len, new, addr;
+	uchar buf[64];
+	u32 env_size[] = {ENV_SIZE, F64K_ENV_PARTITION_SIZE - ENV_HEADER_SIZE, ENV_BASE_SIZE};
+	u32 idx = 0;
+
+	len = sizeof(crc);
+	addr = env_addr + offsetof(env_t, crc);
+	/* read old CRC */
+	spi_flash_read(addr, (u8 *)&crc, len, &ret_len);
+	if (ret_len != len) {
+		return -1;
+	}
+
+	do {
+		new = 0;
+		ret_len = 0;
+		len = env_size[idx++];
+		addr = env_addr + offsetof(env_t, data);
+		while (len > 0) {
+			int n = min(len, sizeof(buf));
+			spi_flash_read(addr, buf, n, &ret_len);
+
+			if (ret_len != n) {
+				return -1;
+			}
+
+			new = crc32(new, buf, n);
+			len -= n;
+			addr += n;
+		}
+	} while ((crc != new) && (idx < ARRAY_SIZE(env_size)));
+
+	return (crc != new);
+}
+
+/************************************************************************
+ * Initialize Environment use
+ *
+ * We are still running from ROM, so data use is limited
+ */
+int env_init(void)
+{
+	u32 env_addr;
+	u32 env_addr_backup, env_end;
+
+	if (gd->env_valid == 0) {
+		env_addr = spi_flash_env_addr(0);
+#if defined(FLASH_SUPPORT_256KB)
+		env_addr_backup = spi_flash_env_addr(2);
+		env_end = spi_flash_env_addr(4);
+#else
+		env_addr_backup = spi_flash_env_addr(1);
+                env_end = spi_flash_env_addr(2);
+#endif
+
+		if (env_verify(env_addr) == 0) {
+			printf("Valid CRC found in flash restoring env...\n");
+			// gd->env_addr  = offsetof(env_t,data); - malloced later...
+			gd->env_valid = 1;
+		} else if (env_end <= IMAGES_START_ADDR
+			&& env_end < spi_flash_size()
+			&& env_verify(env_addr_backup) == 0) {
+			printf("Valid CRC found in flash - restoring backup...\n");
+			// gd->env_addr  = offsetof(env_t,data); - malloced later...
+			gd->env_valid = 2;
+		} else {
+			printf("Invalid CRC in flash using default env...\n");
+			gd->env_addr  = (ulong) &default_environment[0];
+			gd->env_valid = 0;
+		}
+	}
+
+	return (0);
+}
+#endif
+
+#if !defined(TOPAZ_EP_MINI_UBOOT) && !defined(TOPAZ_TINY_UBOOT)
+// one-time env upgrade code
+int do_updateenv(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	env_relocate_spec(0);
+	env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE);
+	gd->env_valid = 1;
+	printf ("Upgrading Environment ...\n");
+	saveenv();
+
+	return 0;
+}
+
+U_BOOT_CMD(
+	upgradeenv, 1, 0,	do_updateenv,
+	"upgrade environment",
+	NULL
+);
+
+int do_updatecrc(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	env_crc_update();
+	gd->env_valid = 1;
+
+	return 0;
+}
+
+U_BOOT_CMD(
+	updatecrc, 1, 0, do_updatecrc,
+	"update CRC",
+	NULL
+);
+#endif /* TOPAZ_EP_MINI_UBOOT */
diff --git a/board/ruby/spi_flash.h b/board/ruby/spi_flash.h
new file mode 100644
index 0000000..513fa78
--- /dev/null
+++ b/board/ruby/spi_flash.h
@@ -0,0 +1,36 @@
+#ifndef __SPI_FLASH_H
+#define __SPI_FLASH_H
+
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+extern unsigned spi_flash_size(void);
+extern unsigned spi_flash_sector_size(void);
+
+#if defined(TOPAZ_TINY_UBOOT)
+extern int spi_flash_read(u32 flash_addr, u8 *mem_addr, u32 size, u32 *ret_size);
+extern int spi_flash_erase(u32 flash_addr, u32 size);
+extern int spi_flash_write(u32 flash_addr, u8 *mem_addr, u32 size, u32 *ret_size);
+#endif
+
+#endif // #ifndef __SPI_FLASH_H
+
diff --git a/board/ruby/start.S b/board/ruby/start.S
new file mode 100644
index 0000000..7c1f26a
--- /dev/null
+++ b/board/ruby/start.S
@@ -0,0 +1,176 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*****************************************************************************
+ * This module provides several critical functions for a couple of scenarios:
+ *	1) For the case of uboot in flash, copy code to target
+ *	2) For the case of uboot loaded via serial, make clean copy for subsequent flash ops
+ *	3) Initialize ddr
+ *	4) Clear BSS
+ *****************************************************************************/
+
+#include <config.h>
+#include <asm/arcregs.h>
+#include <asm/arch/platform.h>
+#include <ruby_version.h>
+#include <topaz_config.h>
+#include <uboot_header.h>
+#include "timestamp_autogenerated.h"
+
+/*****MACROS**********************************************************************************/
+
+#include "start.inl"
+
+/*****TEXT SECTION****************************************************************************/
+
+	.section .text
+	.align 4
+_start:
+.globl _start
+	/*
+	 * DON'T put any code before .ascii "U-BOOT ...",
+	 * bootcfg driver will check "U-BOOT" string.
+	 */
+#if defined(PIGGY_BUILD) || !defined(RUBY_MINI)
+	b	cold_boot
+#else
+	b	run_c
+#endif
+	/* need easily identifiable tag at beginning of file with version */
+	.ascii "U-BOOT " RUBY_UBOOT_VERSION "\0"
+
+	.align	32
+early_flash_config_start:
+	.globl early_flash_config_start
+	/* Early board config metadata can go here */
+	/* Space reserved for first three fields of early_flash_config structure */
+#ifdef RUBY_BOOT_METHOD
+	.word RUBY_BOOT_METHOD
+#else
+	.word RUBY_BOOT_METHOD_TRYLOOP
+#endif
+	.skip	8
+	/* This is required for backward compatibility when U-Boot Mini
+	 * runs U-Boot code with offset 0x30 */
+	.align 16
+	b	warm_boot
+
+	.ascii U_BOOT_TIME_UTC "\0"
+#ifdef U_BOOT_TINY
+	.ascii U_BOOT_TYPE_TINY
+#elif defined(U_BOOT_MINI)
+	.ascii U_BOOT_TYPE_MINI
+#else
+	.ascii U_BOOT_TYPE_LARGE
+#endif
+	.align 32
+
+early_flash_config_end:
+	.globl early_flash_config_end
+
+warm_boot:
+	.globl warm_boot
+	mov	r0, warm_boot
+	sub	r0, r0, _start
+	b       1f
+cold_boot:
+#if defined(PIGGY_BUILD) 
+	/* Init CPU timer to get the boot up time */
+	mov_s	r0, 0xFFFFFFFF
+	sr	r0, [ARC_REG_TIMER1_LIMIT]
+	mov_s	r0, 0
+	sr	r0, [ARC_REG_TIMER1_CNT]
+	mov_s	r0, TIMER_CTRL_NH
+	sr	r0, [ARC_REG_TIMER1_CTRL]
+#endif
+	mov_s	r0, 0
+1:
+	/* SCRATCH_DATA0 is stored with the offset of warm boot */
+	sr	r0, [SCRATCH_DATA0]
+
+#if defined(PIGGY_BUILD) || !defined(RUBY_MINI)
+; By default, disable i-cache/d-cache in bootloader start file
+; and re-enable in board specific settings in U-boot
+disable_dcache:
+	lr	r0, [0x48]	; dc_ctrl register
+	or	r0, r0, 0x1
+	sr	r0, [0x48]
+
+#ifdef TOPAZ_ICACHE_WORKAROUND
+disable_icache:
+	; Disable i-cache
+	lr	r0, [0x11]	; ic_ctrl register
+	or	r0, r0, 0x1
+	sr	r0, [0x11]
+#endif
+
+#if defined(PIGGY_BUILD)
+        /* reset bus monitors */
+        mov     r0, 0
+        mov     r1, 0xe0000200
+        st.di	r0,[r1, 0x00]
+        st.di	r0,[r1, 0x40]
+        st.di	r0,[r1, 0x80]
+        st.di	r0,[r1, 0xc0]
+        st.di	r0,[r1, 0x100]
+        st.di	r0,[r1, 0x140]
+        st.di	r0,[r1, 0x180]
+        st.di	r0,[r1, 0x1c0]
+        ld.di	r0,[r1, 0x00]
+        ld.di	r0,[r1, 0x40]
+        ld.di	r0,[r1, 0x80]
+        ld.di	r0,[r1, 0xc0]
+        ld.di	r0,[r1, 0x100]
+        ld.di	r0,[r1, 0x140]
+        ld.di	r0,[r1, 0x180]
+        ld.di	r0,[r1, 0x1c0]
+#endif
+
+	M_REMOVE_FROM_RESET
+	M_GOTO_IF_EXEC_REMAPPED_SRAM run_c
+#ifdef FLIPBIT
+	M_IF_BOOT_FROM_FLASH
+	bne	ruby_flip_mmap /* if we are running not from flash call the flip routine to
+				* flip the bit in place; will return to ruby_boot label */
+#endif
+	j	ruby_boot - TEXT_BASE + RUBY_SPI_FLASH_ADDR /* jump to physical spi address */
+
+ruby_boot:
+	.globl ruby_boot
+	M_IF_BOOT_FROM_FLASH
+	bne	run_c
+#ifdef FLIPBIT
+	M_REMAP_MEM
+#endif
+	M_COPY_UBOOT TEXT_BASE, RUBY_SPI_FLASH_ADDR
+	j	run_c
+#endif /* defined(PIGGY_BUILD) || !defined(RUBY_MINI) */
+
+run_c:
+	M_FILL_BSS
+#if defined(CONFIG_ARC_MAKE_UBOOT_COPY) && \
+		(defined(PIGGY_BUILD) || !defined(RUBY_MINI))
+	M_COPY_UBOOT CONFIG_ARC_FREE_BEGIN, TEXT_BASE
+#endif
+	M_GOTO_C_CODE
+
+/*********************************************************************************************/
diff --git a/board/ruby/start.inl b/board/ruby/start.inl
new file mode 100644
index 0000000..fe18641
--- /dev/null
+++ b/board/ruby/start.inl
@@ -0,0 +1,157 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __START_INL
+#define __START_INL
+
+#ifdef __ASSEMBLY__
+
+#include <config.h>
+#include <asm/arch/platform.h>
+
+#if TOPAZ_MMAP_ALIAS
+	#define FLIPBIT		TOPAZ_SYS_CTL_UNIFIED_MAP | TOPAZ_SYS_CTL_ALIAS_MAP
+#elif TOPAZ_MMAP_UNIFIED
+	#define FLIPBIT		TOPAZ_SYS_CTL_UNIFIED_MAP
+#elif RUBY_MMAP_FLIP
+	#define FLIPBIT		RUBY_SYS_CTL_LINUX_MAP(0x1)
+#else
+	#undef FLIPBIT
+#endif
+
+#define	U_BOOT_TYPE_LARGE	"0"
+#define	U_BOOT_TYPE_MINI	"1"
+#define	U_BOOT_TYPE_TINY	"2"
+
+.macro FLUSH_CACHE
+	/* flush d-cache */
+	mov_s	r0, 0x1
+	sr	r0, [ARC_REG_DC_FLSH]
+1:
+	lr      r1, [ARC_REG_DC_CTRL]
+	and     r1, r1, ARC_DC_FLUSH_STATUS_BIT
+	brne    r1, 0x0, 1b
+	/* invalidate i-cache */
+	mov_s	r0, 0x1
+	sr	r0, [ARC_REG_IC_IVIC]
+	lr      r1, [ARC_REG_DC_CTRL]
+.endm
+
+.macro M_COPY_UBOOT to_addr, from_addr
+	mov_s	r1, \to_addr
+	mov_s	r2, \from_addr
+	mov_s	r3, \to_addr + __bss_start - TEXT_BASE
+1:
+	ld.ab	r0, [r2, 4]
+	st.ab	r0, [r1, 4]
+	brlt	r1, r3, 1b
+	FLUSH_CACHE
+.endm
+
+.macro M_DELAY_US us
+	mov_s	r1, RUBY_FIXED_CPU_CLK
+	mov_s	r2, \us
+	mpy	r1, r2, r1
+	lsr	r1, r1, 20 /* divide by 1024*1024, which is approximately 1000000 */
+1:	
+	sub.f	r1, r1, 1
+	bne	1b
+.endm
+
+
+.macro M_FILL_BSS
+	/* Clear bss */
+	mov_s	r2, __bss_start
+	mov_s	r3, __bss_end
+1:
+	st.ab	0, [r2, 4]
+	brlt	r2, r3, 1b
+.endm
+
+.macro M_GOTO_C_CODE
+	/* setup stack pointer */
+	mov	sp, CONFIG_ARC_STACK_BEGIN
+	mov	fp, sp
+	/* Start C-code */
+	jal	start_arcboot
+.endm
+
+.macro M_REMAP_MEM
+	/* flip memmap and remap ddr */
+	mov	r1, RUBY_SYS_CTL_BASE_ADDR_NOMAP
+	mov	r2, FLIPBIT | RUBY_SYS_CTL_REMAP(0x3)
+	st.di	r2, [r1, RUBY_SYS_CTL_MASK - RUBY_SYS_CTL_BASE_ADDR]
+	mov	r2, FLIPBIT
+	st.di	r2, [r1, RUBY_SYS_CTL_CTRL - RUBY_SYS_CTL_BASE_ADDR]
+	ld.di	r2, [r1, RUBY_SYS_CTL_CTRL - RUBY_SYS_CTL_BASE_ADDR] /* read back to clear pipeline */
+	sync                                                         /* wait for pipeline to flush */
+.endm
+
+.macro M_GOTO_IF_EXEC_REMAPPED_SRAM tag
+	lr	r1, [ARC_REG_PC]
+	brlt	r1, RUBY_SRAM_BEGIN, 1f
+	brgt	r1, RUBY_SRAM_BEGIN + RUBY_SRAM_SIZE, 1f
+	b \tag
+1:
+.endm
+
+.macro M_BOOTMODE_CMP val
+	mov_s	r1, RUBY_SYS_CTL_BASE_ADDR_NOMAP
+	ld.di	r2, [r1, RUBY_SYS_CTL_CTRL - RUBY_SYS_CTL_BASE_ADDR]
+	and	r2, r2, 0x3
+	cmp_s	r2, \val
+.endm
+
+.macro M_IF_BOOT_FROM_FLASH
+	M_BOOTMODE_CMP 0x2
+.endm
+
+// delay/pulse is 200 * 2.5ns (400mhz) = 500 nS, verified on scope
+#define PHY_RESET_DELAY 200
+.macro M_REMOVE_FROM_RESET
+	/* in general case, need to remove ddr and sram from reset
+	 *   We also need to create a reset pulse for external reset pin */
+	mov_s	r1, RUBY_SYS_CTL_BASE_ADDR_NOMAP
+#if TOPAZ_FPGA_PLATFORM
+	mov_s	r2, RUBY_SYS_CTL_RESET_EXT | RUBY_SYS_CTL_RESET_DDR | RUBY_SYS_CTL_RESET_SRAM
+#else
+	mov_s	r2, RUBY_SYS_CTL_RESET_EXT | RUBY_SYS_CTL_RESET_SRAM
+#endif
+
+	st.di	r2, [r1, RUBY_SYS_CTL_CPU_VEC_MASK - RUBY_SYS_CTL_BASE_ADDR]
+	st.di	r2, [r1, RUBY_SYS_CTL_CPU_VEC - RUBY_SYS_CTL_BASE_ADDR]
+
+
+	mov_s	r2, RUBY_SYS_CTL_RESET_EXT
+	st.di	r2, [r1, RUBY_SYS_CTL_CPU_VEC_MASK - RUBY_SYS_CTL_BASE_ADDR]
+        /* delay for PHY reset delay */
+	mov	%lp_count,PHY_RESET_DELAY
+	lp	1f
+	nop
+1:
+	st.di	0, [r1, RUBY_SYS_CTL_CPU_VEC - RUBY_SYS_CTL_BASE_ADDR]
+.endm
+
+#endif // #ifdef __ASSEMBLY__
+
+#endif // #ifndef __START_INL
+
diff --git a/board/ruby/tftp_bootp_loop.c b/board/ruby/tftp_bootp_loop.c
new file mode 100644
index 0000000..c644c1d
--- /dev/null
+++ b/board/ruby/tftp_bootp_loop.c
@@ -0,0 +1,211 @@
+/*
+ * (C) Copyright 2011 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <config.h>
+#include <command.h>
+#include <asm/types.h>
+#include <net.h>
+#include "ruby.h"
+
+#define UBOOT_ENV_IPADDR	"ipaddr"
+#define UBOOT_ENV_SERVERIP	"serverip"
+#define UBOOT_ENV_BOOTFILE	"bootfile"
+#define UBOOT_ENV_NETRETRY	"netretry"
+#define UBOOT_ENV_STR_MAX	32
+
+int do_bootp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+
+static char prev_netretry[UBOOT_ENV_STR_MAX] = {0};
+static char prev_serverip[UBOOT_ENV_STR_MAX] = {0};
+static char prev_bootfile[UBOOT_ENV_STR_MAX] = {0};
+static char prev_ipaddr[UBOOT_ENV_STR_MAX] = {0};
+
+static int get_stage2_bootp(void)
+{
+	setenv(UBOOT_ENV_IPADDR, NULL);
+	setenv(UBOOT_ENV_SERVERIP, NULL);
+	setenv(UBOOT_ENV_BOOTFILE, prev_bootfile);
+	return do_bootp(NULL, 0, 1, NULL);
+}
+
+static int get_stage2_tftp(void)
+{
+	setenv(UBOOT_ENV_IPADDR, prev_ipaddr);
+	setenv(UBOOT_ENV_SERVERIP, prev_serverip);
+	setenv(UBOOT_ENV_BOOTFILE, prev_bootfile);
+	return do_tftpb(NULL, 0, 1, NULL);
+}
+
+int get_stage2_image(uint32_t method_req, uint32_t *method_used)
+{
+	int ret;
+	const char *prev_netretry_env;
+	const char *p;
+
+	/*
+	 * temporary copies of ipaddr etc
+	 * bootp needs these to be blank, tftp needs these set
+	 */
+	if ((p = getenv(UBOOT_ENV_IPADDR)) != NULL) {
+		strcpy(prev_ipaddr, p);
+	}
+	if ((p = getenv(UBOOT_ENV_SERVERIP)) != NULL) {
+		strcpy(prev_serverip, p);
+	}
+	if ((p = getenv(UBOOT_ENV_BOOTFILE)) != NULL) {
+		strcpy(prev_bootfile, p);
+	}
+	if ((prev_netretry_env = getenv(UBOOT_ENV_NETRETRY)) != NULL) {
+		strcpy(prev_netretry, prev_netretry_env);
+	}
+
+	switch (method_req) {
+		case RUBY_BOOT_METHOD_BOOTP:
+			ret = get_stage2_bootp();
+			if (ret == 0) {
+				*method_used = RUBY_BOOT_METHOD_BOOTP;
+			}
+			break;
+		case RUBY_BOOT_METHOD_TFTP:
+			ret = get_stage2_tftp();
+			if (ret == 0) {
+				*method_used = RUBY_BOOT_METHOD_TFTP;
+			}
+			break;
+		case RUBY_BOOT_METHOD_TRYLOOP:
+		default:
+			setenv(UBOOT_ENV_NETRETRY, "no");
+			while (1) {
+				ret = get_stage2_tftp();
+				if (ret == 0) {
+					*method_used = RUBY_BOOT_METHOD_TFTP;
+					break;
+				} else if (had_ctrlc()) {
+					ret = -1;
+					break;
+				}
+
+				ret = get_stage2_bootp();
+				if (ret == 0) {
+					*method_used = RUBY_BOOT_METHOD_BOOTP;
+					break;
+				} else if (had_ctrlc()) {
+					ret = -1;
+					break;
+				}
+			}
+	}
+
+	setenv(UBOOT_ENV_NETRETRY, prev_netretry_env ? prev_netretry : NULL);
+
+	return ret;
+}
+
+void qtn_parse_early_flash_config(int overwrite)
+{
+	struct early_flash_config *ef = get_early_flash_config(TEXT_BASE);
+	char tmp[20];
+	if (ef->ipaddr) {
+		if (overwrite || getenv(UBOOT_ENV_IPADDR) == NULL) {
+			ip_to_string(ef->ipaddr, tmp);
+			setenv(UBOOT_ENV_IPADDR, tmp);
+			printf("Using '%s' from early config: %s\n", UBOOT_ENV_IPADDR, getenv(UBOOT_ENV_IPADDR));
+		}
+	}
+	if (ef->serverip) {
+		if (overwrite || getenv(UBOOT_ENV_SERVERIP) == NULL) {
+			ip_to_string(ef->serverip, tmp);
+			setenv(UBOOT_ENV_SERVERIP, tmp);
+			printf("Using '%s' from early config: %s\n", UBOOT_ENV_SERVERIP, getenv(UBOOT_ENV_SERVERIP));
+		}
+	}
+}
+
+#ifndef RUBY_MINI
+
+static const char *qtn_netboot_method_str(uint32_t method) {
+	switch (method) {
+		case RUBY_BOOT_METHOD_TFTP:
+			return "tftp";
+		case RUBY_BOOT_METHOD_BOOTP:
+			return "bootp";
+		case RUBY_BOOT_METHOD_TRYLOOP:
+			return "loop";
+		default:
+			return "unknown";
+	}
+}
+
+int do_qtn_netboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	uint32_t method_req = RUBY_BOOT_METHOD_TRYLOOP;
+	uint32_t this_method_used = 0;
+	int run = 1;
+
+	if (argc >= 2) {
+		uint32_t i;
+		for (i = 0; i < RUBY_BOOT_METHOD_MAX; i++) {
+			if (strcmp(argv[1], qtn_netboot_method_str(i)) == 0) {
+				method_req = i;
+			}
+		}
+		if (strcmp(argv[1], "tftps1") == 0) {
+			method_req = RUBY_BOOT_METHOD_TFTP;
+			qtn_parse_early_flash_config(1);
+		} else if (strcmp(argv[1], "stage1") == 0) {
+			struct early_flash_config *ef = get_early_flash_config(TEXT_BASE);
+			method_req = ef->method;
+			qtn_parse_early_flash_config(1);
+		} else if (strcmp(argv[1], "loops1") == 0) {
+			method_req = RUBY_BOOT_METHOD_TRYLOOP;
+			qtn_parse_early_flash_config(1);
+		} else if (strcmp(argv[1], "loadvars") == 0) {
+			run = 0;
+			qtn_parse_early_flash_config(1);
+		}
+	}
+
+	if (run) {
+		return get_stage2_image(method_req, &this_method_used);
+	} else {
+		return 0;
+	}
+}
+
+U_BOOT_CMD(qtn_netboot, CONFIG_SYS_MAXARGS, 0, do_qtn_netboot,
+		"boot with tftp/bootp loop",
+		"Optional argument specifies the method. Alternatives are:\n"
+		"  tftp     - use tftp to load image\n"
+		"  bootp    - use bootp to load image\n"
+		"  loop     - use tftp/bootp loop, starting with tftp\n"
+		"  tftps1   - use 'ipaddr' and 'serverip' from start of text area\n"
+		"              (possibly set by the 1st stage bootloader, or\n"
+		"              hard-coded into the image), then use tftp to load image\n"
+		"  loops1   - like tftps1, but uses tftp/bootp loop \n"
+		"  stage1   - like tftps1, but uses the method specified in start\n"
+		"              of text area\n"
+		"  loadvars - load 'ipaddr' 'serverip' from text area, without loading\n"
+	  );
+
+#endif
diff --git a/board/ruby/timer.c b/board/ruby/timer.c
new file mode 100644
index 0000000..3401e5d
--- /dev/null
+++ b/board/ruby/timer.c
@@ -0,0 +1,110 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "ruby.h"
+
+#define TIMER_NO_IN_USE			0x0
+#define TIMER_MAX_VALUE			0xFFFFFFFF
+
+#define TIMER_TICK_PER_SYS_TICK		(gd->bus_clk / CONFIG_SYS_HZ)
+#define TIMER_TICK_PER_USEC(usec)	(gd->bus_clk * (usec) / 1000000)
+#define TIMER_MAX_USEC_PER_ITER()	(0xFFFFFFFF / gd->bus_clk)
+
+/* Monotonic incrementing timer */
+static unsigned long long timestamp = 0;
+
+static inline ulong read_timer(void)
+{
+	return ((TIMER_MAX_VALUE - readl(RUBY_TIMER_VALUE(TIMER_NO_IN_USE))));
+}
+
+static unsigned long long tick(void)
+{
+	/* Internal tick units. Last snapshot. */
+	static ulong last_tick = 0;
+
+	ulong now = read_timer();
+	if (now >= last_tick) {
+		/* normal mode */
+		timestamp += now - last_tick;
+	} else {
+		/* we have an overflow ... */
+		timestamp += now + TIMER_MAX_VALUE - last_tick;
+	}
+	last_tick = now;
+
+	return timestamp;
+}
+
+static void setup_timer(ulong val)
+{
+	writel(0, RUBY_TIMER_CONTROL(TIMER_NO_IN_USE));
+	writel(TIMER_MAX_VALUE - val, RUBY_TIMER_LOAD_COUNT(TIMER_NO_IN_USE));
+	writel(RUBY_TIMER_ENABLE, RUBY_TIMER_CONTROL(TIMER_NO_IN_USE));
+}
+
+ulong get_timer(ulong base)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+	return tick() / TIMER_TICK_PER_SYS_TICK - base;
+}
+
+void udelay(unsigned long usec)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+
+	const unsigned long usec_per_iter = TIMER_MAX_USEC_PER_ITER();
+	const unsigned long tick_per_iter = TIMER_TICK_PER_USEC(usec_per_iter);
+	const unsigned long remain_tick = TIMER_TICK_PER_USEC(usec % usec_per_iter);
+
+	while(usec) {
+
+		unsigned long long future = tick();
+
+		if (usec < usec_per_iter) {
+			future += remain_tick;
+			usec = 0;
+		} else {
+			future += tick_per_iter;
+			usec -= usec_per_iter;
+		}
+
+		while(tick() < future);
+	}
+}
+
+void reset_timer(void)
+{
+	set_timer(0);
+}
+
+void set_timer(ulong t)
+{
+	timestamp = t;
+	setup_timer(t);
+}
+
+void board_timer_init(void)
+{
+	reset_timer();
+}
+
diff --git a/board/ruby/u-boot.lds.S b/board/ruby/u-boot.lds.S
new file mode 100644
index 0000000..44308b6
--- /dev/null
+++ b/board/ruby/u-boot.lds.S
@@ -0,0 +1,107 @@
+/*
+ * Quantenna U-Boot linkmap. Ruby / Topaz platform
+ */
+
+#include <common/common_mem.h>
+#include <configs/ruby.h>
+
+OUTPUT_FORMAT("elf32-littlearc", "elf32-littlearc", "elf32-littlearc")
+OUTPUT_ARCH(arc)
+
+ENTRY(_start)
+
+#if TOPAZ_MMAP_UNIFIED
+	#define SRAM_BEGIN	RUBY_SRAM_BEGIN
+	#define SRAM_UC_BEGIN	RUBY_SRAM_BEGIN
+#else
+	#define SRAM_BEGIN	RUBY_SRAM_BEGIN
+	#define SRAM_UC_BEGIN	RUBY_SRAM_NOFLIP_BEGIN
+#endif
+
+#define UC_MEM_DIFF	(SRAM_BEGIN - SRAM_UC_BEGIN)
+
+MEMORY
+{
+	sram    : ORIGIN = (SRAM_BEGIN + CONFIG_ARC_TEXT_OFFSET),    LENGTH = CONFIG_ARC_TEXT_SIZE
+	sram_uc	: ORIGIN = (SRAM_UC_BEGIN + CONFIG_ARC_TEXT_OFFSET), LENGTH = CONFIG_ARC_TEXT_SIZE
+}
+
+
+SECTIONS
+{
+	.text :
+	{
+		__uboot_begin = .;
+		board/ruby/start.o (.text) /* must be first */
+
+#if defined(CONFIG_CMD_UC)
+		. = MAX(. , MAX(__uboot_begin + (__muc_start_end - __muc_start_begin), __uboot_begin + (__dsp_start_end - __dsp_start_begin)));
+		board/ruby/muc_start.o (.text)
+		board/ruby/dsp_start.o (.text)
+#endif
+
+		*(.text)
+	} > sram
+	. = ALIGN(4);
+
+	.rodata :
+	{
+		*(.rodata)
+		*(.rodata.str*)
+	} > sram
+	. = ALIGN(4);
+
+	.data :
+	{
+		*(.data)
+	} > sram
+	. = ALIGN(4);
+
+	__u_boot_cmd_start = .;
+	.u_boot_cmd :
+	{
+		*(.u_boot_cmd)
+	} > sram
+	__u_boot_cmd_end = .;
+	. = ALIGN(4);
+
+#if defined(CONFIG_CMD_UC)
+	/****MuC/DSP begin***********************************************************************************************************************/
+	/*
+	 * LHOST and MuC/DSP have SRAM mapped to different addresses (memmap flip mode).
+	 * To have MuC/DSP funcs to be part of LHOST uboot image let's play with linker script.
+	 * If memmap flip mode is changed, or uboot moved to DRAM, please correct this file!
+	 */
+	.text.uc ABSOLUTE(.) - UC_MEM_DIFF : AT(ADDR(.text.uc) + UC_MEM_DIFF) /* move relocation address to MuC/DSP view, load address - to LHOST view */
+	{
+		*(.text.uc)
+	} > sram_uc
+	. = ALIGN(4);
+	.data.uc :
+	{
+		*(.data.uc)
+	} > sram_uc
+	. = ALIGN(4);
+	__uc_bss_begin = .;
+	.bss.uc :
+	{
+		*(.bss.uc)
+	} > sram_uc
+	__uc_bss_end = .;
+	. = ALIGN(4);
+	. += UC_MEM_DIFF; /* move relocation address back to LHOST view */
+	/****MuC/DSP end*************************************************************************************************************************/
+#endif
+
+	__bss_start = .;
+	.bss ABSOLUTE(.) :
+	{
+		*(.bss)
+		*(.bss.atags)
+	} > sram
+	. = ALIGN(4);
+	__bss_end = .;
+
+	__uboot_end = .;
+}
+
diff --git a/board/ruby/uc.c b/board/ruby/uc.c
new file mode 100644
index 0000000..ee7eed0
--- /dev/null
+++ b/board/ruby/uc.c
@@ -0,0 +1,377 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "ruby.h"
+
+#ifdef CONFIG_CMD_UC
+
+#include <topaz_reset.h>
+
+/****************************************************/
+
+/* Helper macros */
+#define MUC_ENTRY_CODE		(&__muc_start_begin)
+#define MUC_ENTRY_CODE_SIZE	(&__muc_start_end - &__muc_start_begin)
+#define DSP_ENTRY_CODE		(&__dsp_start_begin)
+#define DSP_ENTRY_CODE_SIZE	(&__dsp_start_end - &__dsp_start_begin)
+#define UC_BSS			((unsigned long)(&__uc_bss_begin))
+#define UC_BSS_SIZE		(&__uc_bss_end - &__uc_bss_begin)
+/* MuC/DSP sections.
+ * MuC/DSP function can call only other MuC/DSP functions -
+ * at least until we have memmap flip feature (unfortunately).
+ */
+#define UC_TEXT_SECTION __attribute__((section(UC_TEXT_SECTION_NAME)))
+#define UC_DATA_SECTION __attribute__((section(UC_DATA_SECTION_NAME)))
+#define UC_BSS_SECTION __attribute__((section(UC_BSS_SECTION_NAME)))
+
+/****************************************************/
+
+/* Defined in assembler - MuC code entry point */
+extern char __muc_start_begin;
+extern char __muc_start_end;
+/* Defined in assembler - DSP code entry point */
+extern char __dsp_start_begin;
+extern char __dsp_start_end;
+/* Defined in assembler - MuC/DSP BSS section */
+extern char __uc_bss_begin;
+extern char __uc_bss_end;
+
+/****************************************************/
+
+UC_BSS_SECTION volatile unsigned long uc_trace_num = 0;
+UC_BSS_SECTION volatile unsigned long uc_trace_done = 0;
+
+/****************************************************/
+
+static int trigger_irq(unsigned long mask, unsigned long reg, int sec)
+{
+	int ret = -1;
+	const unsigned long irq_num = 0x0;
+	int i;
+
+	writel(1 << irq_num, mask);
+	writel(1 << irq_num, reg);
+
+	for(i = 0; i < sec; ++i) {
+		unsigned long stamp = get_timer(0);
+		while(1) {
+			if(!readl(reg)) {
+				ret = 0;
+				goto done;
+			} else if (get_timer(stamp) > CONFIG_SYS_HZ) {
+				break;
+			}
+		}
+	}
+
+done:
+	writel(0x0, mask);
+
+	return ret;
+}
+
+inline static void switch_muc(int enable)
+{
+	topaz_set_reset_vec(enable, RUBY_SYS_CTL_RESET_MUC_ALL);
+}
+
+inline static void switch_dsp(int enable)
+{
+	topaz_set_reset_vec(enable, RUBY_SYS_CTL_RESET_DSP_ALL);
+}
+
+static void prepare_uc_code(void *code_begin, unsigned long code_size)
+{
+	/* Copy instructions to place from which MuC/DSP start execution */
+	memmove(UC_ENTRY_SLOT, code_begin, code_size);
+	flush_cache(
+		virt_to_phys(UC_ENTRY_SLOT),
+		virt_to_phys(UC_ENTRY_SLOT + code_size));
+
+	/* Cleanup BSS section */
+	memset(bus_to_virt(UC_BSS), 0, UC_BSS_SIZE);
+	flush_cache(
+		virt_to_phys(bus_to_virt(UC_BSS)),
+		virt_to_phys(bus_to_virt(UC_BSS)) + UC_BSS_SIZE);
+}
+
+static int set_muc_start_addr(void *addr)
+{
+	/* Check that we have correct address. */
+	if ((unsigned long)addr & (RUBY_BIT(RUBY_SYS_CTL_MUC_REMAP_SHIFT) - 1)) {
+		return -1;
+	}
+
+	/* Tells MuC from which address start execution */
+	writel(RUBY_SYS_CTL_MUC_REMAP_VAL(virt_to_bus(addr)),
+		RUBY_SYS_CTL_MUC_REMAP);
+
+	return 0;
+}
+
+static int prepare_muc_code(void)
+{
+	prepare_uc_code(MUC_ENTRY_CODE, MUC_ENTRY_CODE_SIZE);
+	return set_muc_start_addr(UC_ENTRY_SLOT);
+}
+
+static int set_dsp_start_addr(void *addr)
+{
+	/* Check that we have correct address. */
+	if ((unsigned long)addr & (RUBY_BIT(RUBY_SYS_CTL_DSP_REMAP_SHIFT) - 1)) {
+		return -1;
+	}
+
+	/* Tells DSP from which address start execution */
+	writel(RUBY_SYS_CTL_DSP_REMAP_VAL(virt_to_bus(addr)),
+		RUBY_SYS_CTL_DSP_REMAP);
+
+	return 0;
+}
+
+static int prepare_dsp_code(void)
+{
+	prepare_uc_code(DSP_ENTRY_CODE, DSP_ENTRY_CODE_SIZE);
+	return set_dsp_start_addr(UC_ENTRY_SLOT);
+}
+
+static void test_uc_trace_prepare(void)
+{
+	writel(0, bus_to_virt((unsigned long)&uc_trace_num));
+	writel(0, bus_to_virt((unsigned long)&uc_trace_done));
+}
+
+static unsigned long get_test_uc_trace_num(void)
+{
+	return readl(bus_to_virt((unsigned long)&uc_trace_num));
+}
+
+static unsigned long is_test_uc_trace_done(void)
+{
+	return readl(bus_to_virt((unsigned long)&uc_trace_done));
+}
+
+static int test_uc_wait(int sec)
+{
+	int ret = -1;
+	int i;
+
+	for(i = 0; i < sec; ++i) {
+		unsigned long stamp = get_timer(0);
+		while(1) {
+			if(is_test_uc_trace_done()) {
+				ret = 0;
+				printf("Success: execution time: %d sec, %lu ticks\n",
+					(int)i, (unsigned long)get_timer(stamp));
+				goto done;
+			} else if (get_timer(stamp) > CONFIG_SYS_HZ) {
+				break;
+			}
+		}
+	}
+
+done:
+	printf("uC trace number: %u\n", (unsigned)get_test_uc_trace_num());
+	if (ret) {
+		printf("Failure: %d\n", ret);
+	}
+	return ret;
+}
+
+static int test_uc_irq(unsigned long mask, unsigned long irq, int sec, int attempts)
+{
+	int ret = 0;
+	int i;
+
+	for (i = 0; i < attempts; ++i) {
+		ret = trigger_irq(mask, irq, sec);
+		if (ret) {
+			ret = -1;
+			printf("uC irq triggering failed: ret=%d num=%u\n",
+				ret, (unsigned)get_test_uc_trace_num());
+			break;
+		}
+		printf("uC trace number after IRQ: %u\n",
+			(unsigned)get_test_uc_trace_num());
+	}
+
+	return ret;
+}
+
+static int test_muc(int sec)
+{
+	int ret = 0;
+
+	switch_muc(0);
+	udelay(100000);
+
+	ret = prepare_muc_code();
+	if (ret) {
+		printf("MuC code preparation failed: ret=%d\n", ret);
+		return -1;
+	}
+
+	test_uc_trace_prepare();
+
+	switch_muc(1);
+
+	ret = test_uc_wait(sec);
+	if (ret) {
+		printf("MuC wait failed: ret=%d\n", ret);
+		return -2;
+	}
+
+	ret = test_uc_irq(RUBY_SYS_CTL_L2M_INT_MASK, RUBY_SYS_CTL_L2M_INT, sec, 10);
+	if (ret) {
+		printf("MuC L2M irq triggering failed: ret=%d\n", ret);
+		return -3;
+	}
+
+	printf("MuC test: SUCCESS!\n");
+
+	return 0;
+}
+
+static int test_dsp(int sec)
+{
+	int ret = 0;
+
+	switch_dsp(0);
+	udelay(100000);
+
+	ret = prepare_dsp_code();
+	if (ret) {
+		printf("DSP code preparation failed: ret=%d\n", ret);
+		return -1;
+	}
+
+	test_uc_trace_prepare();
+
+	switch_dsp(1);
+
+	ret = test_uc_wait(sec);
+	if (ret) {
+		printf("DSP wait failed: ret=%d\n", ret);
+		return -2;
+	}
+
+	ret = test_uc_irq(RUBY_SYS_CTL_L2D_INT_MASK, RUBY_SYS_CTL_L2D_INT, sec, 10);
+	if (ret) {
+		printf("DSP L2D irq triggering failed: ret=%d\n", ret);
+		return -3;
+	}
+
+	printf("DSP test: SUCCESS!\n");
+
+	return 0;
+}
+
+static int run_muc(void *addr)
+{
+	int ret = 0;
+
+	switch_muc(0);
+	udelay(100000);
+
+	ret = set_muc_start_addr(addr);
+	if (ret) {
+		printf("Start address is bad: ret=%d\n", ret);
+	} else {
+		switch_muc(1);
+	}
+
+	return 0;
+}
+
+static int run_dsp(void *addr)
+{
+	int ret = 0;
+
+	switch_dsp(0);
+	udelay(100000);
+
+	ret = set_dsp_start_addr(addr);
+	if (ret) {
+		printf("Start address is bad: ret=%d\n", ret);
+	} else {
+		switch_dsp(1);
+	}
+
+	return 0;
+}
+
+/****************************************************/
+
+static int do_uc_test(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+{
+	int ret = 0;
+
+	if (argc != 2) {
+		ret = -1;
+	} else if (!strcmp(argv[1], "dsp")) {
+		ret = test_dsp(5/*sec timeout*/);
+	} else if (!strcmp(argv[1], "muc")) {
+		ret = test_muc(5/*sec timeout*/);
+	} else {
+		ret = -2;
+	}
+
+	return ret;
+}
+
+static int do_uc_run(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+{
+	int ret = 0;
+
+	if (argc != 3) {
+		ret = -1;
+	} else {
+		unsigned long addr = simple_strtoul(argv[2], NULL, 0);
+
+		printf("Run code from 0x%lx\n", addr);
+
+		if (!strcmp(argv[1], "dsp")) {
+			ret = run_dsp((void*)addr);
+		} else if (!strcmp(argv[1], "muc")) {
+			ret = run_muc((void*)addr);
+		} else {
+			ret = -2;
+		}
+	}
+
+	return ret;
+}
+
+U_BOOT_CMD(uc_test, 2, 0, do_uc_test,
+		"MuC/DSP test",
+		"uc_test dsp|muc - perform test (beware, it changes uboot in-RAM image!)\n"
+);
+
+U_BOOT_CMD(uc_run, 3, 0, do_uc_run,
+		"MuC/DSP code run",
+		"uc_run dsp|muc addr - run code\n"
+);
+
+/****************************************************/
+
+#endif // #ifdef CONFIG_CMD_UC
+
diff --git a/board/ruby/uc.inl b/board/ruby/uc.inl
new file mode 100644
index 0000000..794dca9
--- /dev/null
+++ b/board/ruby/uc.inl
@@ -0,0 +1,71 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "ruby.h"
+
+#ifdef CONFIG_CMD_UC
+
+extern volatile unsigned long uc_trace_num;
+extern volatile unsigned long uc_trace_done;
+
+UC_TEXT_SECTION
+void UC_NAME(_serial_putc_simple)(const char c)
+{
+	while (!(readb(RUBY_UART0_LSR) & RUBY_LSR_TX_Empty));
+	writeb(c, RUBY_UART0_RBR_THR_DLL);
+}
+
+UC_TEXT_SECTION
+void UC_NAME(_serial_putc)(const char c)
+{
+	if (c == '\n') {
+		UC_NAME(_serial_putc_simple('\r'));
+	}
+	UC_NAME(_serial_putc_simple(c));
+}
+
+UC_TEXT_SECTION
+void UC_NAME(_serial_puts)(const char *s)
+{
+	while (*s) {
+		UC_NAME(_serial_putc)(*s++);
+	}
+}
+
+UC_TEXT_SECTION
+void UC_NAME(_entry_func)(void)
+{
+	int i;
+
+	++uc_trace_num;
+
+	for (i = 0; i < 30; ++i) {
+		UC_NAME(_serial_puts)(UC_PROMPT": hello world ");
+		UC_NAME(_serial_putc)(i + '0');
+		UC_NAME(_serial_putc)('\n');
+		++uc_trace_num;
+	}
+	UC_NAME(_serial_puts)("DONE!\n");
+}
+
+#endif // #ifdef CONFIG_CMD_UC
+
diff --git a/board/ruby/uc_start.S b/board/ruby/uc_start.S
new file mode 100644
index 0000000..a56701b
--- /dev/null
+++ b/board/ruby/uc_start.S
@@ -0,0 +1,40 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <config.h>
+
+#include "ruby.h"
+
+#ifdef CONFIG_CMD_UC
+
+	/* Allocate stack */
+	.section UC_BSS_SECTION_NAME
+	.align 4
+	.rept 255
+		.word 0x0
+	.endr
+__uc_stack:
+.globl __uc_stack
+	.word 0
+
+#endif
+
diff --git a/board/ruby/uc_start.inl b/board/ruby/uc_start.inl
new file mode 100644
index 0000000..395c4ce
--- /dev/null
+++ b/board/ruby/uc_start.inl
@@ -0,0 +1,140 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <config.h>
+
+#ifdef CONFIG_CMD_UC
+
+#include <asm/arcregs.h>
+#include <asm/arch/platform.h>
+
+#include "ruby.h"
+
+.macro UC_TRACE
+	ld.di	r0, [uc_trace_num]
+	add	r0, r0, 1
+	st.di	r0, [uc_trace_num]
+.endm
+
+.macro UC_TRACE_DONE
+	mov	r0, 1
+	st.di	r0, [uc_trace_done]
+.endm
+
+.macro UC_ENABLE_ARC_INTRS
+	/*
+	 * INT_VECTOR_BASE register on MuC(Ruby) after reset contains 0x0, but internal logic
+	 * uses start address for vector base (till INT_VECTOR_BASE is resetted) - no need really to setup.
+	 * INT_VECTOR_BASE register on DSP(Ruby) must be setted to have interrupts work.
+	 * Having such irregularity it would be better to setup register always.
+	 */
+	UC_TRACE
+	mov	r0, UC_ENTRY_SLOT
+	sr	r0, [ARC_REG_INTR_VEC_BASE]
+	/*
+	 * AUX_IENABLE register after reset has all interrupts enabled - no need to setup,
+	 * but for safety let's do it.
+	 */
+	UC_TRACE
+	mov	r0, 0xFFFFFFFF
+	sr	r0, [ARC_REG_INTR_ENABLE]
+	/* Enable interrupts in STATUS32 register */
+	UC_TRACE
+	flag	STATUS_E1_MASK | STATUS_E2_MASK
+.endm
+
+.macro UC_ENABLE_INTRS_MUC
+	/* Enable external interrupts (Ruby specific) */
+	UC_TRACE
+	mov	r0, 0x0
+	st.di	r0, [RUBY_SYS_CTL_MUC_ORINT_EN]
+	mov	r0, 0xFFFFFFFF
+	st.di	r0, [RUBY_SYS_CTL_MUC_INT_EN]
+	/* Enable ARC interrupts */
+	UC_ENABLE_ARC_INTRS
+.endm
+
+.macro UC_ENABLE_INTRS_DSP
+	/* Enable external interrupts (Ruby specific) */
+	UC_TRACE
+	mov	r0, 0x0
+	st.di	r0, [RUBY_SYS_CTL_DSP_ORINT_EN]
+	mov	r0, 0xFFFFFFFF
+	st.di	r0, [RUBY_SYS_CTL_DSP_INT_EN]
+	/* Enable ARC interrupts */
+	UC_ENABLE_ARC_INTRS
+.endm
+
+.macro UC_DISABLE_DCACHE
+	UC_TRACE
+	lr	r0, [ARC_REG_DC_CTRL]
+	or	r0, r0, ARC_DC_DISABLE
+	sr	r0, [ARC_REG_DC_CTRL]
+.endm
+
+.macro UC_PREPARE_STACK
+	UC_TRACE
+	mov	sp, __uc_stack
+	mov	fp, sp
+.endm
+
+.macro UC_RUN_C name
+	UC_TRACE
+	mov	r0, \name
+	jl	[r0]
+.endm
+
+.macro UC_INDEFINITE_LOOP
+	UC_TRACE
+	UC_TRACE_DONE
+1:
+	sleep
+	UC_TRACE
+	b	1b
+.endm
+
+.macro UC_CODE func_name
+	UC_DISABLE_DCACHE
+	UC_PREPARE_STACK
+	UC_RUN_C \func_name
+	UC_INDEFINITE_LOOP
+.endm
+
+.macro UC_EXCEPTIONS_ARC7 p2p_reg
+	UC_TRACE
+	ld.di	r0, [\p2p_reg]
+	st.di	r0, [\p2p_reg]
+	ld.di	r0, [\p2p_reg]
+	sync
+	rtie
+.endm
+
+.macro UC_EXCEPTIONS_ARC6 p2p_reg
+	UC_TRACE
+	ld.di	r0, [\p2p_reg]
+	st.di	r0, [\p2p_reg]
+	ld.di	r0, [\p2p_reg]
+	j.f	[ilink1]
+.endm
+
+#endif
+
diff --git a/board/ruby/vectors.S b/board/ruby/vectors.S
new file mode 100644
index 0000000..6cde1dd
--- /dev/null
+++ b/board/ruby/vectors.S
@@ -0,0 +1,178 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <config.h>
+
+#include <asm/arch/platform.h>
+
+/***********************************************************************************
+ * Vectors must be aligned on 1KB boundary.
+ */
+.section .text
+
+.align 1024
+
+__vectors_start:
+.globl __vectors_start
+
+/***********************************************************************************
+ * Vectors itself.
+ */
+
+j	EV_Reset    ; 0x00, Reset (0x0)
+j	EV_MemErr   ; 0x08, Memory error (0x8)
+j	EV_InstrErr ; 0x10, Instruction error (0x10)
+
+.rept 29
+	j	EV_NotImpl
+.endr
+
+j	EV_MachineCheck  ; 0x100, Fatal Machine check (0x20)
+j	EV_TLBMissI      ; 0x108, Intruction TLB miss (0x21)
+j	EV_TLBMissD      ; 0x110, Data TLB miss (0x22)
+j	EV_TLBProtV      ; 0x118, Protection Violation (0x23) or Misaligned Access
+j	EV_PrivilegeV    ; 0x120, Privilege Violation (0x24)
+j	EV_Trap          ; 0x128, Trap exception (0x25)
+j	EV_Extension     ; 0x130, Extn Intruction Excp (0x26)
+
+.rept 24
+	j	EV_NotImpl
+.endr
+
+/***********************************************************************************
+ * Stack and static data to process interrupts.
+ * As static data is used, code does not work correctly on SMP systems,
+ * or on systems where interrupts can interrupt each other
+ * (like in case of ARC's 2 levels of interrupts - this mode
+ * must not be used with this code).
+ */
+
+	.rept 127
+		.word 0x0
+	.endr
+__vector_stack:
+	.word 0
+__vector_saved_sp:
+	.word 0
+__vector_saved_fp:
+	.word 0
+__vector_saved_cfunc_ptr:
+	.word 0
+
+/***********************************************************************************
+ * Code to process interrupts.
+ */
+
+.macro VECTOR_SAVE_REGS
+	st.a r0, [sp, -4]
+	st.a r1, [sp, -4]
+	st.a r2, [sp, -4]
+	st.a r3, [sp, -4]
+	st.a r4, [sp, -4]
+	st.a r5, [sp, -4]
+	st.a r6, [sp, -4]
+	st.a r7, [sp, -4]
+	st.a r8, [sp, -4]
+	st.a r9, [sp, -4]
+	st.a r10, [sp, -4]
+	st.a r11, [sp, -4]
+	st.a r12, [sp, -4]
+.endm
+
+.macro VECTOR_RESTORE_REGS
+	ld.ab r12, [sp, 4]
+	ld.ab r11, [sp, 4]
+	ld.ab r10, [sp, 4]
+	ld.ab r9, [sp, 4]
+	ld.ab r8, [sp, 4]
+	ld.ab r7, [sp, 4]
+	ld.ab r6, [sp, 4]
+	ld.ab r5, [sp, 4]
+	ld.ab r4, [sp, 4]
+	ld.ab r3, [sp, 4]
+	ld.ab r2, [sp, 4]
+	ld.ab r1, [sp, 4]
+	ld.ab r0, [sp, 4]
+.endm
+
+.macro VECTOR_FUNC_HEADER name
+	.globl \name
+	.align 4
+	\name :
+.endm
+
+.macro VECTOR_FUNC name ptr
+	; please have this macro small as it will be used many times
+	VECTOR_FUNC_HEADER \name
+
+	; store pointer to __vector_saved_cfunc_ptr address.
+	st r0, [__vector_saved_sp]
+	mov r0, \ptr
+	st r0, [__vector_saved_cfunc_ptr]
+	ld r0, [__vector_saved_sp]
+
+	; go to dispatcher. it never returns back.
+	j EV_Dispatcher
+.endm
+
+VECTOR_FUNC_HEADER EV_Dispatcher
+	; prepare stack
+	st sp, [__vector_saved_sp]
+	st fp, [__vector_saved_fp]
+	mov sp, __vector_stack
+	mov fp, sp
+
+	; save registers which C-function can modify to stack
+	VECTOR_SAVE_REGS
+
+	; call C-function
+	; it must have 'void f(void) prototype
+	ld r0, [__vector_saved_cfunc_ptr]
+	jl [r0]
+
+	; restore registers from stack
+	VECTOR_RESTORE_REGS
+
+	; restore original stack registers
+	ld sp, [__vector_saved_sp]
+	ld fp, [__vector_saved_fp]
+
+	; return from interrupt
+	rtie
+
+VECTOR_FUNC EV_NotImpl      intr_EV_NotImpl
+VECTOR_FUNC EV_Reset        intr_EV_Reset
+VECTOR_FUNC EV_MemErr       intr_EV_MemErr
+VECTOR_FUNC EV_InstrErr     intr_EV_InstrErr
+VECTOR_FUNC EV_MachineCheck intr_EV_MachineCheck
+VECTOR_FUNC EV_TLBMissI     intr_EV_TLBMissI
+VECTOR_FUNC EV_TLBMissD     intr_EV_TLBMissD
+VECTOR_FUNC EV_TLBProtV     intr_EV_TLBProtV
+VECTOR_FUNC EV_PrivilegeV   intr_EV_PrivilegeV
+VECTOR_FUNC EV_Trap         intr_EV_Trap
+VECTOR_FUNC EV_Extension    intr_EV_Extension
+
+.global read_xr
+read_xr:
+	lr r0, [r0]
+	j_s [blink]
+	nop_s
diff --git a/board/ruby_mini/config.mk b/board/ruby_mini/config.mk
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/board/ruby_mini/config.mk
@@ -0,0 +1 @@
+
diff --git a/board/ruby_mini/ruby_mini.c b/board/ruby_mini/ruby_mini.c
new file mode 100644
index 0000000..a5b4215
--- /dev/null
+++ b/board/ruby_mini/ruby_mini.c
@@ -0,0 +1,135 @@
+/*
+ * (C) Copyright 2011 - 2013 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <config.h>
+#include <command.h>
+#include <linux/ctype.h>
+#include <linux/types.h>
+#include <asm/types.h>
+#include <asm/cache.h>
+#include <net.h>
+#include <timestamp.h>
+
+#include "ruby.h"
+#include "board_cfg.h"
+#include <shared_defs_common.h>
+#include "ruby_board_cfg.h"
+#include "ruby_board_db.h"
+#include "ruby_version.h"
+#include "ruby_mini_common.h"
+#include "rtl8367b/rtl8367b_init.h"
+
+void *ar8236_init(unsigned long baseAddr, unsigned long phy_addr)
+{
+	return NULL;
+}
+
+void *ar8237_init(unsigned long baseAddr, unsigned long phy_addr)
+{
+	return NULL;
+}
+
+ret_t rtl8367b_poll_linkup(struct emac_private *priv)
+{
+	return 0;
+}
+
+ret_t rtl8367b_init(struct emac_private *priv, uint32_t emac_cfg)
+{
+	return 0;
+}
+
+void do_bootm(void){}
+
+static void get_stage2(void)
+{
+	uint32_t method_used;
+	int ret = get_stage2_image(get_early_flash_config(TEXT_BASE)->method, &method_used);
+
+	if (ret == 0) {
+		void (*jump_stage2)(void) = (void*)load_addr;
+		struct early_flash_config *stage2ef = get_early_flash_config(load_addr);
+
+		/* provide a boot method, ip and server to 2nd stage u-boot */
+		stage2ef->method = method_used;
+		stage2ef->ipaddr = NetOurIP;
+		stage2ef->serverip = NetServerIP;
+
+		eth_halt();
+
+		flush_and_inv_dcache_all();
+		invalidate_icache_all();
+
+		jump_stage2();
+	}
+}
+
+
+void start_arcboot(void)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+
+	ruby_mini_init();
+
+	printf("Quantenna Mini U-Boot\n");
+	printf("Version: %s Built: %s at %s\n",
+			RUBY_UBOOT_VERSION, U_BOOT_DATE, U_BOOT_TIME);
+
+#if defined(CONFIG_CMD_NET)
+	/*IP Address */
+	gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+	/* MAC Address */
+	{
+		int i;
+		ulong reg;
+		char *s, *e;
+		char tmp[64];
+		i = getenv_r ("ethaddr", tmp, sizeof(tmp));
+		s = (i > 0) ? tmp : NULL;
+		for (reg = 0; reg < 6; ++reg) {
+			gd->bd->bi_enetaddr[reg] = s ? simple_strtoul (s, &e, 16) : 0;
+			if (s) {
+				s = (*e) ? e + 1 : e;
+			}
+		}
+	}
+	/* Boot file */
+	{
+		const char *s;
+		if ((s = getenv("bootfile")) != NULL) {
+			copy_filename(BootFile, s, sizeof(BootFile));
+		}
+	}
+#endif
+
+#ifdef CONFIG_CMD_NET
+	eth_initialize(gd->bd);
+#endif
+	qtn_parse_early_flash_config(1);
+
+	get_stage2();
+
+	board_reset("get_stage2 returned");
+}
+
+
diff --git a/board/ruby_mini/ruby_mini_common.c b/board/ruby_mini/ruby_mini_common.c
new file mode 100644
index 0000000..06c95f8
--- /dev/null
+++ b/board/ruby_mini/ruby_mini_common.c
@@ -0,0 +1,262 @@
+/*
+ * (C) Copyright 2013 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <config.h>
+#include <command.h>
+#include <linux/ctype.h>
+#include <linux/types.h>
+#include <asm/types.h>
+#include <asm/cache.h>
+#include <net.h>
+#include <timestamp.h>
+#include <asm/io.h>
+
+#include "ruby.h"
+#include "board_cfg.h"
+#include <shared_defs_common.h>
+#include "ruby_board_cfg.h"
+#include "ruby_board_db.h"
+#include "ruby_version.h"
+#include "ruby_mini_common.h"
+
+gd_t *gd;
+gd_t *global_data;
+
+int console_assign(int file, char *devname)
+{
+	return 0;
+}
+
+int console_init_f(void)
+{
+	gd->have_console = 0;
+	return 0;
+}
+
+int getc(void)
+{
+	return 0;
+}
+
+void putc(char c)
+{
+	serial_putc(c);
+}
+
+void puts(const char *s)
+{
+	serial_puts(s);
+}
+
+void printf(const char *fmt, ...)
+{
+	va_list args;
+	uint i;
+	char printbuffer[256];
+
+	va_start (args, fmt);
+
+	/*
+	 * For this to work, printbuffer must be larger than
+	 * anything we ever want to print.
+	 */
+	i = vsprintf (printbuffer, fmt, args);
+	va_end (args);
+
+	/* Print the string */
+	puts (printbuffer);
+}
+
+void vprintf(const char *fmt, va_list args)
+{
+	uint i;
+	char printbuffer[256];
+
+	/*
+	 * For this to work, printbuffer must be larger than
+	 * anything we ever want to print.
+	 */
+	i = vsprintf (printbuffer, fmt, args);
+
+	/* Print the string */
+	puts (printbuffer);
+}
+
+int ctrlc(void)
+{
+	return 0;
+}
+
+int had_ctrlc(void)
+{
+	return 0;
+}
+
+void print_size (phys_size_t s, const char * c) {}
+
+unsigned long load_addr = RUBY_SRAM_BEGIN;
+
+#if !defined(TOPAZ_EP_MINI_UBOOT) && !defined(TOPAZ_TINY_UBOOT)
+/*
+ * tftp environment variables (ipaddr, serverip, bootfile) are set dynamically
+ * before attempting tftp. They are cleared before attempting bootp. Bootp will
+ * not work if ipaddr is set, as the udp receive routines reject packets whose
+ * destination address does not match ipaddr
+ */
+uchar __env[CONFIG_ENV_SIZE] = {
+	"ethaddr="	MKSTR(CONFIG_ETHADDR)	"\0"
+	"ipaddr="	MKSTR(CONFIG_IPADDR)	"\0"
+	"serverip="	MKSTR(CONFIG_SERVERIP)	"\0"
+	"bootfile="	MKSTR(CONFIG_BOOTFILE)	"\0"
+	"\0"
+};
+
+static const board_cfg_t mini_board_conf = {
+	.bc_emac0       = EMAC0_CONFIG,
+	.bc_emac1       = EMAC1_CONFIG,
+	.bc_phy0_addr   = EMAC0_PHY_ADDR,
+	.bc_phy1_addr   = EMAC1_PHY_ADDR,
+	.bc_rgmii_timing = EMAC_RGMII_TIMING,
+};
+
+uchar env_get_char (int index)
+{
+	return __env[index];
+}
+
+uchar *env_get_addr (int index)
+{
+	return &__env[index];
+}
+
+void *env_get_file_body(int fileoffset)
+{
+	return NULL; // there are no config files in minimal environment.
+}
+
+
+void env_crc_update(void) {}
+#endif /* TOPAZ_EP_MINI_UBOOT */
+
+void show_boot_progress(int status)
+{
+}
+
+int cpu_init(void)
+{
+	/*
+	 * disable interrupts. Smaller version with no
+	 * return code compared to u-boot full
+	 */
+	unsigned int status;
+	status = read_new_aux_reg(ARC_REG_STATUS32);
+	status &= STATUS_DISABLE_INTERRUPTS;
+	__asm__ __volatile__ ( "flag %0" : : "r"(status) );
+
+	return 0;
+}
+
+static void board_global_data_init(void)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+	gd->cpu_clk = RUBY_FIXED_CPU_CLK;
+	gd->bus_clk = RUBY_FIXED_DEV_CLK;
+	gd->baudrate = RUBY_SERIAL_BAUD;
+	gd->bd->bi_boot_params = 0x0;
+}
+
+int board_init(void)
+{
+	/*
+	 * Enable i-cache/d-cache immediately upon jump from start.S
+	 */
+	#ifndef TOPAZ_ICACHE_WORKAROUND
+	icache_enable();
+	#endif
+
+	dcache_enable();
+	board_global_data_init();
+	board_serial_init();
+	board_timer_init();
+#if defined(TOPAZ_EP_MINI_UBOOT) || defined(TOPAZ_TINY_UBOOT)
+	extern void board_spi_flash_init(void);
+	board_spi_flash_init();
+#endif
+	return 0;
+}
+
+#if !defined(TOPAZ_EP_MINI_UBOOT)
+int env_init(void)
+{
+#if !defined(TOPAZ_TINY_UBOOT)
+	gd->env_addr  = (ulong)&__env[0];
+	gd->env_valid = 1;
+#endif
+	return 0;
+}
+#endif
+
+typedef int (init_fnc_t) (void);
+static init_fnc_t *init_sequence[] = {
+	cpu_init,		/* cpu specific initialisations*/
+	board_init,
+	serial_init,            /* serial communications setup */
+	env_init,		/* intialise environment */
+	console_init_f,         /* stage 1 init of console */
+	NULL,
+};
+
+void ruby_mini_init(void)
+{
+	static gd_t gd_data;
+	static bd_t bd_data;
+	init_fnc_t **init_fnc_ptr;
+
+	gd = global_data = &gd_data;
+	gd->bd = &bd_data;
+	gd->bd->bi_board_id = 0;
+
+	for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
+		if ((*init_fnc_ptr)() != 0) {
+			hang();
+		}
+	}
+}
+
+void __attribute__ ((noreturn)) hang(void)
+{
+	board_reset("hang called\n");
+}
+
+void cmd_usage(cmd_tbl_t *cmdtp)
+{
+}
+
+#if !defined(TOPAZ_EP_MINI_UBOOT) && !defined(TOPAZ_TINY_UBOOT)
+int board_config(int board_id, int parameter)
+{
+	int* ptr = (int *)&mini_board_conf;
+	return ptr[parameter];
+}
+#endif
+
diff --git a/board/ruby_mini/ruby_mini_common.h b/board/ruby_mini/ruby_mini_common.h
new file mode 100644
index 0000000..f1db23f
--- /dev/null
+++ b/board/ruby_mini/ruby_mini_common.h
@@ -0,0 +1,31 @@
+/*
+ * (C) Copyright 2013 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
+#ifndef __RUBY_UBOOT_MINI_COMMON_H
+#define __RUBY_UBOOT_MINI_COMMON_H
+
+void ruby_mini_init(void);
+
+#endif	// __RUBY_UBOOT_MINI_COMMON_H
+
+
diff --git a/board/ruby_mini/ruby_piggy.c b/board/ruby_mini/ruby_piggy.c
new file mode 100644
index 0000000..9a17af9
--- /dev/null
+++ b/board/ruby_mini/ruby_piggy.c
@@ -0,0 +1,116 @@
+/*
+ * (C) Copyright 2011 - 2013 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "common_mem.h"
+#include <config.h>
+#include <asm/cache.h>
+#include <asm/arcregs.h>
+
+#ifdef PIGGY_DEBUG
+#include "common.h"
+#include "ruby_mini_common.h"
+
+static void debug_setup(void)
+{
+	ruby_mini_init();
+	printf("Quantenna U-Boot Piggy DEBUG\n");
+}
+
+#define	DBGVAR(x)	do {					\
+	printf("%s:%d:%s %s = %u 0x%x\n",			\
+			__FILE__, __LINE__, __FUNCTION__,	\
+			(#x), (unsigned int)(x), (int)(x));	\
+} while(0)
+#else
+#define debug_setup()
+#define DBGVAR(x)
+#endif
+
+int lzmaBuffToBuffDecompress (unsigned char *outStream, unsigned long *uncompressedSize,
+			      unsigned char *inStream,  unsigned long length);
+
+void __attribute__((noreturn)) start_arcboot(void)
+{
+	extern unsigned char payload[];
+	extern unsigned int payload_len;
+
+	extern unsigned int early_flash_config_start;
+	extern unsigned int early_flash_config_end;
+	unsigned int *pin;
+	unsigned int *pout;
+	int rc;
+
+	unsigned long decompression_addr = RUBY_SRAM_BEGIN + TEXT_BASE_OFFSET_CHILD;
+	unsigned long uncompressed_size;
+	void (*start)(void) __attribute__((noreturn));
+
+	debug_setup();
+
+	DBGVAR(&start);
+	DBGVAR(decompression_addr);
+	DBGVAR(TEXT_BASE_OFFSET);
+	DBGVAR(TEXT_BASE_OFFSET_CHILD);
+
+	/* decompress u-boot mini */
+	rc = lzmaBuffToBuffDecompress((void *) decompression_addr, &uncompressed_size,
+			payload, payload_len);
+	DBGVAR(rc);
+
+	/* copy over early config bytes */
+	pin = &early_flash_config_start;
+	pout = (unsigned int*)((unsigned long)pin
+			- (RUBY_SRAM_BEGIN + TEXT_BASE_OFFSET)
+			+ decompression_addr);
+	while (pin < &early_flash_config_end) {
+		*pout++ = *pin++;
+	}
+
+	start = (void *)(decompression_addr +  read_new_aux_reg(SCRATCH_DATA0));
+
+	flush_and_inv_dcache_all();
+	invalidate_icache_all();
+
+	start();
+}
+
+#ifndef PIGGY_DEBUG
+void * memset(void * s, int c, unsigned int count)
+{
+	char *xs = (char *) s;
+
+	while (count--)
+		*xs++ = c;
+
+	return s;
+}
+
+void * memcpy(void * dest, const void *src, unsigned int count)
+{
+	char *tmp = (char *) dest, *s = (char *) src;
+
+	while (count--)
+		*tmp++ = *s++;
+
+	return dest;
+}
+#endif	// PIGGY_DEBUG
+
diff --git a/board/ruby_mini/ruby_tiny.c b/board/ruby_mini/ruby_tiny.c
new file mode 100644
index 0000000..aa74c15
--- /dev/null
+++ b/board/ruby_mini/ruby_tiny.c
@@ -0,0 +1,166 @@
+/*
+ * (C) Copyright 2015 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#include <common.h>
+#include <config.h>
+#include <command.h>
+#include <linux/ctype.h>
+#include <linux/types.h>
+#include <asm/types.h>
+#include <asm/cache.h>
+#include <timestamp.h>
+#include <image.h>
+
+#include "ruby.h"
+#include <shared_defs_common.h>
+#include "ruby_version.h"
+#include "ruby_mini_common.h"
+#include "spi_flash.h"
+
+#define UBOOT_LIVE_READ_RETRIES		5
+#define UBOOT_SAFETY_READ_RETRIES	3
+#define UBOOT_TINY_PREFIX	"UBOOT_TINY: "
+
+void free(void *ptr)
+{
+        return;
+}
+
+int image_check_hcrc(image_header_t *hdr)
+{
+        ulong hcrc;
+        image_header_t header;
+
+        /* Copy header so we can blank CRC field for re-calculation */
+        memmove(&header, (char *)hdr, sizeof(header));
+        image_set_hcrc(&header, 0);
+
+        hcrc = crc32(0, (unsigned char *)&header, sizeof(header));
+
+        return (hcrc == image_get_hcrc(hdr));
+}
+
+int image_check_dcrc(image_header_t *hdr)
+{
+        ulong data = image_get_data(hdr);
+        ulong len = image_get_data_size(hdr);
+        ulong dcrc = crc32(0, (unsigned char *)data, len);
+
+        return (dcrc == image_get_dcrc(hdr));
+}
+
+static int recover_uboot_live_partition(u8 *mem_addr)
+{
+	u32 ret_size = 0;
+
+	printf(UBOOT_TINY_PREFIX "recovering live partition\n");
+	if (spi_flash_read(UBOOT_SAFE_PARTITION_ADDR, mem_addr, TEXT_BASE_OFFSET, &ret_size) ||
+				ret_size != TEXT_BASE_OFFSET) {
+		printf(UBOOT_TINY_PREFIX "failed to read safety partition\n");
+		return -1;
+	}
+
+	if (spi_flash_erase(UBOOT_LIVE_PARTITION_ADDR, UBOOT_TEXT_PARTITION_SIZE)) {
+		printf(UBOOT_TINY_PREFIX "failed to erase live partition\n");
+		return -1;
+	}
+
+	if (spi_flash_write(UBOOT_LIVE_PARTITION_ADDR, mem_addr, TEXT_BASE_OFFSET, &ret_size) ||
+				ret_size != TEXT_BASE_OFFSET) {
+		printf(UBOOT_TINY_PREFIX "failed to rewrite live partition\n");
+		return -1;
+	}
+
+	return 0;
+}
+
+static int read_uboot_partition(u32 partition_addr, u8 *mem_addr)
+{
+	image_header_t *image = (image_header_t *)mem_addr;
+	u32 ret_size = 0;
+	char *part_name = partition_addr == UBOOT_LIVE_PARTITION_ADDR ? "live" : "safety";
+
+	if (spi_flash_read(partition_addr, mem_addr, TEXT_BASE_OFFSET, &ret_size) ||
+			ret_size != TEXT_BASE_OFFSET) {
+		printf(UBOOT_TINY_PREFIX "failed to read stage 2 from %s partition\n", part_name);
+		return -1;
+	}
+
+	if (image_check_magic(image) &&
+			image_check_hcrc(image) &&
+			image_check_dcrc(image)) {
+		memcpy(image, (void *)image_get_data(image), image_get_data_size(image));
+		return 0;
+	}
+
+	return -1;
+}
+
+static void get_stage2_uboot(void)
+{
+	u32 retries = 0;
+	int safe_to_start = 0;
+	void (*start_stage2_uboot)(void) = (void *)load_addr;
+
+	while (retries < UBOOT_LIVE_READ_RETRIES) {
+		if (read_uboot_partition(UBOOT_LIVE_PARTITION_ADDR, (u8 *)load_addr)) {
+			recover_uboot_live_partition((u8 *)load_addr);
+		} else {
+			safe_to_start = 1;
+			break;
+		}
+		++retries;
+	}
+
+	if (retries >= UBOOT_LIVE_READ_RETRIES) {
+		printf(UBOOT_TINY_PREFIX "failed to recover live partition\n");
+		for (retries = 0; retries < UBOOT_SAFETY_READ_RETRIES; ++retries) {
+			if (!read_uboot_partition(UBOOT_SAFE_PARTITION_ADDR, (u8 *)load_addr)) {
+				printf(UBOOT_TINY_PREFIX "booting from safety partition\n");
+				safe_to_start = 1;
+				break;
+			}
+		}
+
+		if (retries >= UBOOT_SAFETY_READ_RETRIES) {
+			printf(UBOOT_TINY_PREFIX "failed to boot from safety partition\n");
+		}
+	}
+
+	if (safe_to_start) {
+		flush_and_inv_dcache_all();
+		invalidate_icache_all();
+		start_stage2_uboot();
+	}
+}
+
+void start_arcboot(void)
+{
+	ruby_mini_init();
+
+	printf("\nQuantenna Tiny U-Boot\n");
+	printf("Version: %s Built: %s at %s\n",
+			RUBY_UBOOT_VERSION, U_BOOT_DATE, U_BOOT_TIME);
+
+	get_stage2_uboot();
+	board_reset(UBOOT_TINY_PREFIX "failed to start second stage U-Boot\n");
+}
+
diff --git a/board/ruby_mini/topaz_pcie_ep.c b/board/ruby_mini/topaz_pcie_ep.c
new file mode 100644
index 0000000..cc4e535
--- /dev/null
+++ b/board/ruby_mini/topaz_pcie_ep.c
@@ -0,0 +1,107 @@
+/*
+ * (C) Copyright 2011 - 2013 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <config.h>
+#include <command.h>
+#include <linux/ctype.h>
+#include <linux/types.h>
+#include <asm/types.h>
+#include <timestamp.h>
+
+#include "ruby.h"
+#include "board_cfg.h"
+#include <shared_defs_common.h>
+#include "ruby_version.h"
+#include "ruby_mini_common.h"
+
+#define CONFIG_SYS_MALLOC_LEN	0x10000
+
+extern int do_pcieboot(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+
+extern void qtn_mini_hw_init(int);
+extern int board_cfg_init(int *);
+extern void env_relocate (void);
+extern void board_pmu_init(void);
+
+/*
+ * Because dlmalloc will comsume more than 2k memory space
+ * so implement a simple memory allocator
+ * just used for access the u-boot env variable
+ */
+extern char __uboot_end;
+static ulong mem_malloc_start = 0;
+static ulong mem_malloc_end = 0;
+static void mem_malloc_init (void)
+{
+	mem_malloc_start =  (ulong)&__uboot_end;
+	mem_malloc_end = mem_malloc_start + CONFIG_SYS_MALLOC_LEN;
+}
+
+void *malloc (int size)
+{
+	if (mem_malloc_start + size > mem_malloc_end) {
+		printf("Fail to allocate memory!!!\n");
+		return NULL;
+	}
+	memset((void *)mem_malloc_start, 0, size);
+	mem_malloc_start += size;
+	return (void *)(mem_malloc_start - size);
+}
+
+void free(void *ptr)
+{
+	return;
+}
+
+static void get_stage2(void)
+{
+	int board_id;
+
+	board_pmu_init();
+
+	if (board_cfg_init(&board_id) != 0) {
+		printf("error: board configuration not found\n");
+		return;
+	}
+
+	qtn_mini_hw_init(board_id);
+
+	printf("Quantenna Mini U-Boot\n");
+	printf("Version: %s Built: %s at %s\n",
+			RUBY_UBOOT_VERSION, U_BOOT_DATE, U_BOOT_TIME);
+
+	do_pcieboot(NULL, 0, 0, NULL);
+}
+
+void start_arcboot(void)
+{
+	ruby_mini_init();
+
+	mem_malloc_init();
+
+	env_relocate();
+
+	get_stage2();
+
+	board_reset("get_stage2 returned");
+}
diff --git a/board/ruby_mini/u-boot.lds.S b/board/ruby_mini/u-boot.lds.S
new file mode 100644
index 0000000..cce051d
--- /dev/null
+++ b/board/ruby_mini/u-boot.lds.S
@@ -0,0 +1,76 @@
+/*
+ * (C) Copyright 2011 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <config.h>
+#include <common_mem.h>
+
+OUTPUT_FORMAT("elf32-littlearc", "elf32-littlearc", "elf32-littlearc")
+OUTPUT_ARCH(arc)
+
+ENTRY(_start)
+
+MEMORY
+{
+	sram : ORIGIN = TEXT_BASE, LENGTH = RUBY_UBOOT_PIGGY_MAX_SIZE
+}
+
+SECTIONS
+{
+	.text :
+	{
+		__uboot_begin = .;
+		*(.text)
+		*(.text.*)
+	} > sram
+	. = ALIGN(4);
+
+	.rodata :
+	{
+		*(.rodata)
+		*(.rodata.str*)
+		*(.rodata.*)
+	} > sram
+	. = ALIGN(4);
+
+	.data :
+	{
+		*(.data)
+		*(.data.*)
+	} > sram
+	. = ALIGN(4);
+
+	__bss_start = .;
+	.bss ABSOLUTE(.) :
+	{
+		*(.bss)
+		*(.bss.*)
+	} > sram
+	. = ALIGN(4);
+	__bss_end = .;
+
+	__uboot_end = .;
+
+	/DISCARD/ : {
+		*(.u_boot_cmd)
+	}
+}
+
diff --git a/common/Makefile b/common/Makefile
index b9f4ca7..8a875ac 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -60,7 +60,6 @@
 COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
 COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
 COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
-COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
 COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 
 # command
@@ -146,6 +145,11 @@
 COBJS-$(CONFIG_CMD_XIMG) += cmd_ximg.o
 COBJS-$(CONFIG_YAFFS2) += cmd_yaffs2.o
 COBJS-$(CONFIG_VFD) += cmd_vfd.o
+ifeq ($(POST_BOOT),1)
+CFLAGS += -DPOST_BOOT
+COBJS-y += cmd_post.o
+endif
+COBJS-y += memory.o
 
 # others
 COBJS-$(CONFIG_DDR_SPD) += ddr_spd.o
@@ -158,7 +162,6 @@
 COBJS-$(CONFIG_UPDATE_TFTP) += update.o
 COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
 
-
 COBJS	:= $(sort $(COBJS-y))
 SRCS	:= $(AOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(AOBJS) $(COBJS))
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index d5772e2..3f4a8d1 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -765,6 +765,7 @@
 {
 	image_header_t	*hdr;
 	ulong		img_addr;
+	uint32_t	*img_flags_addr;
 #if defined(CONFIG_FIT)
 	void		*fit_hdr;
 	const char	*fit_uname_config = NULL;
@@ -830,13 +831,18 @@
 		 * copy image header to allow for image overwrites during kernel
 		 * decompression.
 		 */
-		memmove (&images->legacy_hdr_os_copy, hdr, sizeof(image_header_t));
+		memmove (&images->legacy_hdr_os_copy, hdr, sizeof(*hdr));
 
 		/* save pointer to image header */
 		images->legacy_hdr_os = hdr;
 
 		images->legacy_hdr_valid = 1;
+		images->qtn_flags = image_get_qtn_flags(hdr);
 		show_boot_progress (6);
+
+		img_flags_addr = image_get_qtn_flags(hdr);
+		images->qtn_flags = img_flags_addr;
+
 		break;
 #if defined(CONFIG_FIT)
 	case IMAGE_FORMAT_FIT:
@@ -911,9 +917,9 @@
 
 	debug ("   kernel data at 0x%08lx, len = 0x%08lx (%ld)\n",
 			*os_data, *os_len, *os_len);
-#if defined(CONFIG_ARC) && defined(CONFIG_CMD_NET) && defined(CONFIG_ARC_AA4_BOARD)
-    eth_stop();
-#endif 
+#if defined(CONFIG_ARC_EMAC) && defined(CONFIG_CMD_NET)
+	eth_stop();
+#endif
 	return (void *)img_addr;
 }
 
diff --git a/common/cmd_elf.c b/common/cmd_elf.c
index 18bdb42..4beab00 100644
--- a/common/cmd_elf.c
+++ b/common/cmd_elf.c
@@ -19,7 +19,6 @@
 #include <net.h>
 #include <elf.h>
 #include <vxworks.h>
-#include <asm/uboot-arc.h>
 
 #if defined(CONFIG_WALNUT) || defined(CONFIG_SYS_VXWORKS_MAC_PTR)
 DECLARE_GLOBAL_DATA_PTR;
@@ -42,9 +41,9 @@
 	if (dcache)
 		dcache_disable ();
 
-#if defined(CONFIG_ARC) && defined(CONFIG_CMD_NET) && defined(CONFIG_ARC_AA4_BOARD)
+#ifdef CONFIG_ARC
     eth_stop();
-#endif
+#endif 
 	/*
 	 * pass address parameter as argv[0] (aka command name),
 	 * and all remaining args
@@ -223,54 +222,6 @@
 	return 1;
 }
 
-#if defined(CONFIG_BOOTMQX)
-
-extern int init_mqx_context(void);
-extern int cleanup_mqx_context(void);
-
-int do_bootmqx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-	unsigned long addr;		/* Address of the ELF image     */
-	unsigned long rc;		/* Return value from user code  */
-
-	/* -------------------------------------------------- */
-	int rcode = 0;
-
-	if (argc < 2)
-		addr = load_addr;
-	else
-		addr = simple_strtoul (argv[1], NULL, 16);
-
-	if (!valid_elf_image (addr))
-		return 1;
-
-	addr = load_elf_image (addr);
-	if(addr == 0)
-		return 1;
-
-	if(init_mqx_context() != 0)
-		return 1;
-
-	printf ("## Starting application at 0x%08lx ...\n", addr);
-
-	/*
-	 * pass address parameter as argv[0] (aka command name),
-	 * and all remaining args
-	 */
-	rc = do_bootelf_exec ((void *)addr, argc - 1, argv + 1);
-	if (rc != 0)
-		rcode = 1;
-
-	if(cleanup_mqx_context() != 0)
-		return 1;
-
-	printf ("## Application terminated, rc = 0x%lx\n", rc);
-	return rcode;
-}
-
-#endif
-
-
 /* ======================================================================
  * Determine if a valid ELF image exists at the given memory location.
  * First looks at the ELF header magic field, the makes sure that it is
@@ -316,44 +267,7 @@
 	unsigned char *strtab = 0;	/* String table pointer             */
 	unsigned char *image;		/* Binary image pointer             */
 	int i;				/* Loop counter                     */
-#ifdef CONFIG_ELF_GUARD
-    unsigned long addr_chk;
-	int r;
 
-	struct mem_region_s
-	{
-		unsigned long start, end;
-	};
-	typedef struct mem_region_s mem_region_t;
-
-	mem_region_t regions[] = {
-#ifndef  CONFIG_ARC_AA4_BOARD
-		/* xxxload commands space */
-		{.start = CONFIG_LOADADDR,
-		 .end = CONFIG_LOADADDR + simple_strtoul(getenv("filesize"),
-							NULL, 16)
-		},
-		/* u-boot */
-		{.start = TEXT_BASE,
-		 .end = (unsigned)&__bss_end + CONFIG_SYS_MALLOC_LEN
-		},
-#else
-		{.start = TEXT_BASE - CONFIG_SYS_MALLOC_LEN,
-		 .end = (unsigned)&__data_end
-		},
-#endif
-#ifndef  CONFIG_ARC_AA4_BOARD
-		/* periphery space */
-		{.start = ARC_CPU_PERIPHERAL_BASE,
-		 .end = ARC_CPU_PERIPHERAL_BASE + 0x20000
-		},
-		/* bootrom space */
-		{.start = 0,
-		 .end = TEXT_BASE
-		}
-#endif
-	};
-#endif
 	/* -------------------------------------------------- */
 
 	ehdr = (Elf32_Ehdr *) addr;
@@ -375,22 +289,6 @@
 			continue;
 		}
 
-#ifdef CONFIG_ELF_GUARD
-		for(r = 0; r < sizeof(regions)/sizeof(mem_region_t); r++) {
-#ifndef  CONFIG_ARC_AA4_BOARD
-            addr_chk = shdr->sh_addr;
-#else
-            addr_chk = shdr->sh_addr - 0x80000000; // XXX some kernels don't start here
-#endif
-			if(addr_chk >= regions[r].start && addr_chk <= regions[r].end) {
-				printf (".%s load address [0x%08lx] clobbers uboot [%x:%x]\n",
-					&strtab[shdr->sh_name],
-					addr_chk, regions[r].start, regions[r].end);
-				return 0;
-			}
-		}
-#endif
-
 		if (strtab) {
 			printf ("%sing %s @ 0x%08lx (%ld bytes)\n",
 				(shdr->sh_type == SHT_NOBITS) ?
@@ -426,13 +324,3 @@
 	"Boot vxWorks from an ELF image",
 	" [address] - load address of vxWorks ELF image.\n"
 );
-
-#if defined(CONFIG_BOOTMQX)
-
-U_BOOT_CMD(
-	bootmqx,    2,      0,      do_bootmqx,
-	"Boot MQX from an ELF image",
-	" [address] - load address of MQX ELF image.\n"
-);
-
-#endif
diff --git a/common/cmd_net.c b/common/cmd_net.c
index 92bbf85..8319a98 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -163,6 +163,13 @@
 	if ((s = getenv("loadaddr")) != NULL) {
 		load_addr = simple_strtoul(s, NULL, 16);
 	}
+#ifdef CONFIG_TFTP_SERVER
+	if ((s = getenv("tftps")) != NULL)
+		NetRunTftpServer = simple_strtoul(s, NULL, 10);
+	else
+		NetRunTftpServer = 0;
+	printf("tftps %d\n", NetRunTftpServer);
+#endif
 
 	switch (argc) {
 	case 1:
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 3ee971a..acde2c8 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -381,9 +381,9 @@
 	return 0;
 }
 
-int setenv (char *varname, char *varvalue)
+int setenv (const char *varname, const char *varvalue)
 {
-	char *argv[4] = { "setenv", varname, varvalue, NULL };
+	char *argv[4] = { "setenv", (char *) varname, (char *) varvalue, NULL };
 	if (varvalue == NULL)
 		return _do_setenv (0, 2, argv);
 	else
@@ -492,7 +492,7 @@
  * or NULL if not found
  */
 
-char *getenv (char *name)
+char *getenv (const char *name)
 {
 	int i, nxt;
 
@@ -514,7 +514,7 @@
 	return (NULL);
 }
 
-int getenv_r (char *name, char *buf, unsigned len)
+int getenv_r (const char *name, char *buf, unsigned len)
 {
 	int i, nxt;
 
diff --git a/common/cmd_post.c b/common/cmd_post.c
new file mode 100755
index 0000000..3f9edfe
--- /dev/null
+++ b/common/cmd_post.c
@@ -0,0 +1,311 @@
+/*
+ * Implement following commands:
+ *	(1). LED
+ *	(2). DRAM Address Line Continuity
+ *	(3). RF Loop Back
+ *	(4). Ethernet RJ-45 Continuity
+ */
+
+#include <common.h>
+
+#include <asm/arch/platform.h>
+#include <asm/io.h>
+
+#include <command.h>
+#include "net.h"
+
+/* Seconds waiting LED turn off	*/
+#define POST_LED_WAIT_TIME	1
+
+#define POST_MEM_BIT   0
+#define POST_PHY_BIT   1
+#define POST_RF_BIT    2
+#define POST_MEM_LEVEL_BIT   4
+#define POST_MEM_LEVEL_MASK  3
+
+int memory_post(unsigned long *start, unsigned long size);
+void disable_phy_loopback(void);
+
+int do_post_led(unsigned int mask)
+{
+	unsigned val;
+	int offset;
+	int i;
+
+	if (!mask)
+		mask = 0xcc;
+	/*
+	  * 0xcc: bit2:wifi link led, bit3:wps led,
+	  *bit6:mode led, bit7:link quality led
+	  */
+	val = readl(RUBY_GPIO_AFSEL);
+	val &= ~mask;
+	writel(val, RUBY_GPIO_AFSEL);
+
+	/* Set GPIO to Output mode and Mask */
+	for (i = 0; i < RUBY_GPIO_MAX; i++) {
+		if (!((1 << i) & mask))
+			continue;
+
+		if (i < RUBY_GPIO_MODE1_MAX) {
+			offset = i * 2;
+
+			val = readl(RUBY_GPIO_MODE1);
+			val &= ~(0x3 << offset);
+			val |= (0x1 << offset);
+			writel(val, RUBY_GPIO_MODE1);
+		} else {
+			offset = (i - RUBY_GPIO_MODE1_MAX) * 2;
+
+			val = readl(RUBY_GPIO_MODE2);
+			val &= ~(0x3 << offset);
+			val |= (0x1 << offset);
+			writel(val, RUBY_GPIO_MODE2);
+		}
+	}
+
+	writel(mask, GPIO_OUTPUT_MASK);
+
+	/* Turn on LED	*/
+	writel(mask, GPIO_OUTPUT);
+
+	udelay(POST_LED_WAIT_TIME * 1000000);
+
+	/* Turn off LED	*/
+	writel(0, GPIO_OUTPUT);
+
+	writel(0, GPIO_OUTPUT_MASK);
+
+	return 0;
+
+}
+
+int post_led(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	unsigned int mask;
+	int ret;
+
+	/* GPIO mask used for LED */
+	if (argc > 1)
+		mask = (ulong)simple_strtoul(argv[1], NULL, 16);
+	else
+		mask = 0;
+
+	ret = do_post_led(mask);
+
+	return ret;
+}
+
+U_BOOT_CMD(
+	post_led, CONFIG_SYS_MAXARGS, 0, post_led,
+	"POST LED test",
+	"gpio_mask\n"
+	"    - Set gpio_mask bits of gpio pins\n"
+);
+
+int post_phy(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	int ret;
+
+	ret = NetLoop(ETHLOOP);
+	#ifdef CONFIG_CMD_ETHLOOP
+	disable_phy_loopback();
+	#endif
+	if (ret < 0)
+		printf("phy loopback test failed\n");
+	else
+		printf("phy loopback test pass\n");
+
+	return ret;
+}
+
+U_BOOT_CMD(
+	post_phy, CONFIG_SYS_MAXARGS, 0, post_phy,
+	"POST phy loopback test"
+	"ethernet loopback test\n"
+	);
+
+int do_post_mem(unsigned int iteration_limit)
+{
+	ulong	*start, size;
+	unsigned int iterations;
+	int ret;
+	char *p;
+	int dcache;
+
+	dcache = dcache_status();
+	if (dcache)
+		dcache_disable();
+
+	start = (ulong *)CONFIG_SYS_MEMTEST_START;
+	p = getenv("post_mem_size");
+	if (p) {
+		size = simple_strtoul(p, NULL, 16);
+		printf("user defined mem size 0x%x\n", size);
+	} else {
+		size = RUBY_MIN_DRAM_SIZE;
+	}
+
+	if (!iteration_limit) {  /* 0 for loop */
+		for (;;) {
+			if (ctrlc()) {
+				/* printf("stop by ctrl-c ... "); */
+				break;
+			}
+			ret = memory_post(start, size);
+			if (ret < 0)
+				break;
+			iterations++;
+		}
+	} else {
+		for (iterations = 0; iterations < iteration_limit; iterations++) {
+			if (ctrlc()) {
+				/* printf("stop by ctrl-c ... "); */
+				break;
+			}
+			ret = memory_post(start, size);
+			if (ret < 0)
+				break;
+		}
+	}
+
+	if (dcache)
+		dcache_enable ();
+
+	return ret;
+}
+
+int post_mem(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	unsigned int iteration_limit;
+	int ret;
+
+	if (argc > 1)
+		iteration_limit = (ulong)simple_strtoul(argv[1], NULL, 16);
+	else
+		iteration_limit = 1;
+
+	ret = do_post_mem(iteration_limit);
+
+	return ret;
+}
+
+U_BOOT_CMD(
+	post_mem,	CONFIG_SYS_MAXARGS,	0,	post_mem,
+	"POST RAM test",
+	"[iterations]"
+	"    - RAM Address/Data lines read/write test\n"
+);
+
+int do_post(void){
+	char *p;
+	int post_mask, old_result = 0, new_result = 0, result_update = 0;
+	int old_function = 0, new_function = 0, functionn_update = 0;
+	int ret = 0, mem_level;
+	char buf[32];
+
+	p = getenv("post_result");
+	if (p)
+		old_result = simple_strtoul(p, NULL, 16);
+
+	p = getenv("post_function");
+	if (p)
+		old_function = simple_strtoul(p, NULL, 16);
+
+	new_function |= (1<<POST_PHY_BIT);
+	if ((new_function&(1<<POST_PHY_BIT)) != (old_function&(1<<POST_PHY_BIT)))
+		functionn_update = 1;
+
+	new_function |= (1<<POST_MEM_BIT);
+	if ((new_function&(1<<POST_MEM_BIT)) != (old_function&(1<<POST_MEM_BIT)))
+		functionn_update = 1;
+
+	p = getenv("post_mask");
+	if (p) {
+		post_mask = simple_strtoul(p, NULL, 16);
+		printf("post_mask 0x%x\n", post_mask);
+
+		if ((post_mask & 1<<POST_MEM_BIT)) {
+			mem_level = ((post_mask >> POST_MEM_LEVEL_BIT) & POST_MEM_LEVEL_MASK);
+			switch (mem_level) {
+			case 0:
+				ret = do_post_mem(1);
+				break;
+			case 1:
+				ret = do_post_mem(1000);
+				break;
+			case 2:
+				ret = do_post_mem(1000000);
+				break;
+			case 3:
+				ret = do_post_mem(0);
+				break;
+			}
+			printf("mem test ... ");
+			if (ret < 0) {
+				printf("fail\n");
+				new_result &= ~(1<<POST_MEM_BIT);
+			} else {
+				printf("pass\n");
+				new_result |= (1<<POST_MEM_BIT);
+			}
+			if ((new_result&(1<<POST_MEM_BIT)) != (old_result&(1<<POST_MEM_BIT))) {
+				old_result &= ~(1<<POST_MEM_BIT);
+				old_result |= new_result&(1<<POST_MEM_BIT);
+				result_update = 1;
+			}
+		}
+
+		if (post_mask & 1<<POST_PHY_BIT) {
+			ret = NetLoop(ETHLOOP);
+			#ifdef CONFIG_CMD_ETHLOOP
+			disable_phy_loopback();
+			#endif
+			if (ret < 0) {
+				new_result &= ~(1<<POST_PHY_BIT);
+				printf("phy loopback test ... fail\n");
+			} else {
+				new_result |= (1<<POST_PHY_BIT);
+				printf("phy loopback test ... pass\n");
+			}
+			if ((new_result&(1<<POST_PHY_BIT)) != (old_result&(1<<POST_PHY_BIT))) {
+				old_result &= ~(1<<POST_PHY_BIT);
+				old_result |= new_result&(1<<POST_PHY_BIT);
+				result_update = 1;
+			}
+		}
+	} else {
+		printf("post_mask is null\n");
+	}
+
+	if (functionn_update | result_update) {
+		if (functionn_update) {
+			sprintf(buf, "%x", new_function);
+			setenv("post_function", buf);
+		}
+		if (result_update) {
+			sprintf(buf, "%x", old_result);
+			setenv("post_result", buf);
+		}
+		saveenv();
+	}
+}
+
+int post (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	int ret;
+
+	ret = do_post();
+
+	return ret;
+}
+
+#ifdef POST_BOOT
+U_BOOT_CMD(
+	post,	CONFIG_SYS_MAXARGS,	0,	post,
+	"POST test",
+	"POST test\n"
+);
+
+#endif
+
diff --git a/common/env_common.c b/common/env_common.c
index 6be3bb0..f0ef16a 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -46,7 +46,7 @@
 
 extern env_t *env_ptr;
 
-extern void env_relocate_spec (void);
+extern void env_relocate_spec (int);
 extern uchar env_get_char_spec(int);
 
 static uchar env_get_char_init (int index);
@@ -59,7 +59,7 @@
 
 uchar default_environment[] = {
 #ifdef	CONFIG_BOOTARGS
-	"bootargs="	CONFIG_BOOTARGS			"\0"
+	"bootargs="	CONFIG_BOOTARGS			 "\0"
 #endif
 #ifdef	CONFIG_BOOTCOMMAND
 	"bootcmd="	CONFIG_BOOTCOMMAND		"\0"
@@ -104,7 +104,7 @@
 	"serverip="	MK_STR(CONFIG_SERVERIP)		"\0"
 #endif
 #ifdef	CONFIG_SYS_AUTOLOAD
-	"autoload="	CONFIG_SYS_AUTOLOAD			"\0"
+	"autoload="	CONFIG_SYS_AUTOLOAD		"\0"
 #endif
 #ifdef	CONFIG_PREBOOT
 	"preboot="	CONFIG_PREBOOT			"\0"
@@ -122,7 +122,7 @@
 	"hostname="	MK_STR(CONFIG_HOSTNAME)		"\0"
 #endif
 #ifdef	CONFIG_BOOTFILE
-	"bootfile="	MK_STR(CONFIG_BOOTFILE)		"\0"
+	"bootfile="	CONFIG_BOOTFILE			"\0"
 #endif
 #ifdef	CONFIG_LOADADDR
 	"loadaddr="	MK_STR(CONFIG_LOADADDR)		"\0"
@@ -133,6 +133,12 @@
 #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0)
 	"pcidelay="	MK_STR(CONFIG_PCI_BOOTDELAY)	"\0"
 #endif
+#ifdef  CONFIG_HW_CONFIG_ID
+	"hw_config_id=" MK_STR(CONFIG_HW_CONFIG_ID)	"\0"
+#endif
+#ifdef CONFIG_CARRIER_ID
+	"carrier_id="	MK_STR(CONFIG_CARRIER_ID)	"\0"
+#endif
 #ifdef  CONFIG_EXTRA_ENV_SETTINGS
 	CONFIG_EXTRA_ENV_SETTINGS
 #endif
@@ -210,6 +216,15 @@
 	}
 }
 
+void *env_get_file_body(int fileoffset)
+{
+	if (gd->env_valid) {
+		return ( ((uchar *)(gd->file_area_base + fileoffset)) );
+	} else {
+		return NULL; // there are no default config files
+	}
+}
+
 void set_default_env(void)
 {
 	if (sizeof(default_environment) > ENV_SIZE) {
@@ -223,8 +238,11 @@
 #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
 	env_ptr->flags = 0xFF;
 #endif
+
+#ifndef CONFIG_RUBY_BOARD
 	env_crc_update ();
 	gd->env_valid = 1;
+#endif
 }
 
 void env_relocate (void)
@@ -251,8 +269,22 @@
 	DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
 #endif
 
+	if (gd->env_valid == 1) {
+		env_relocate_spec (0);
+	}
+
+#ifdef CONFIG_RUBY_BOARD
+	else if (gd->env_valid == 2) {
+		printf ("Creating recovery environment ...\n");
+		env_relocate_spec (1);
+		gd->env_valid = 1;
+		printf ("Upgrading environment ...\n");
+		saveenv ();
+	}
+#endif
+
 	if (gd->env_valid == 0) {
-#if defined(CONFIG_GTH)	|| defined(CONFIG_ENV_IS_NOWHERE)	/* Environment not changable */
+#if defined (PLATFORM_NOSPI) || defined(CONFIG_GTH)	|| defined(CONFIG_ENV_IS_NOWHERE)	/* Environment not changeable */
 		puts ("Using default environment\n\n");
 #else
 		puts ("*** Warning - bad CRC, using default environment\n\n");
@@ -260,10 +292,9 @@
 #endif
 		set_default_env();
 	}
-	else {
-		env_relocate_spec ();
-	}
+
 	gd->env_addr = (ulong)&(env_ptr->data);
+	gd->file_area_base = (ulong)env_ptr;
 
 #ifdef CONFIG_AMIGAONEG3SE
 	disable_nvram();
diff --git a/common/image.c b/common/image.c
index e22c974..907a288 100644
--- a/common/image.c
+++ b/common/image.c
@@ -100,6 +100,7 @@
 	{	IH_ARCH_SPARC64,	"sparc64",	"SPARC 64 Bit",	},
 	{	IH_ARCH_BLACKFIN,	"blackfin",	"Blackfin",	},
 	{	IH_ARCH_AVR32,		"avr32",	"AVR32",	},
+	{	IH_ARCH_ARC,		"arc",		"arc",	},
 	{	-1,			"",		"",		},
 };
 
@@ -169,14 +170,13 @@
 int image_check_hcrc (image_header_t *hdr)
 {
 	ulong hcrc;
-	ulong len = image_get_header_size ();
 	image_header_t header;
 
 	/* Copy header so we can blank CRC field for re-calculation */
-	memmove (&header, (char *)hdr, image_get_header_size ());
+	memmove (&header, (char *)hdr, sizeof(header));
 	image_set_hcrc (&header, 0);
 
-	hcrc = crc32 (0, (unsigned char *)&header, len);
+	hcrc = crc32 (0, (unsigned char *)&header, sizeof(header));
 
 	return (hcrc == image_get_hcrc (hdr));
 }
@@ -317,6 +317,7 @@
 	genimg_print_size (image_get_data_size (hdr));
 	printf ("%sLoad Address: %08x\n", p, image_get_load (hdr));
 	printf ("%sEntry Point:  %08x\n", p, image_get_ep (hdr));
+	printf ("%sQtn flags:    %08x\n", p, image_get_qtn_flags (hdr));
 
 	if (image_check_type (hdr, IH_TYPE_MULTI) ||
 			image_check_type (hdr, IH_TYPE_SCRIPT)) {
diff --git a/common/main.c b/common/main.c
old mode 100644
new mode 100755
index 026edd1..f2f3d6e
--- a/common/main.c
+++ b/common/main.c
@@ -401,6 +401,10 @@
 # ifdef CONFIG_AUTOBOOT_KEYED
 		int prev = disable_ctrlc(1);	/* disable Control C checking */
 # endif
+#ifdef POST_BOOT
+		run_command ("post", 0);
+#endif
+		s = getenv ("bootcmd");
 
 # ifndef CONFIG_SYS_HUSH_PARSER
 		run_command (s, 0);
diff --git a/common/memory.c b/common/memory.c
new file mode 100755
index 0000000..ad40f0a
--- /dev/null
+++ b/common/memory.c
@@ -0,0 +1,467 @@
+/*
+ * (C) Copyright 2002
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+
+/* Memory test
+ *
+ * General observations:
+ * o The recommended test sequence is to test the data lines: if they are
+ *   broken, nothing else will work properly.  Then test the address
+ *   lines.  Finally, test the cells in the memory now that the test
+ *   program knows that the address and data lines work properly.
+ *   This sequence also helps isolate and identify what is faulty.
+ *
+ * o For the address line test, it is a good idea to use the base
+ *   address of the lowest memory location, which causes a '1' bit to
+ *   walk through a field of zeros on the address lines and the highest
+ *   memory location, which causes a '0' bit to walk through a field of
+ *   '1's on the address line.
+ *
+ * o Floating buses can fool memory tests if the test routine writes
+ *   a value and then reads it back immediately.  The problem is, the
+ *   write will charge the residual capacitance on the data bus so the
+ *   bus retains its state briefely.  When the test program reads the
+ *   value back immediately, the capacitance of the bus can allow it
+ *   to read back what was written, even though the memory circuitry
+ *   is broken.  To avoid this, the test program should write a test
+ *   pattern to the target location, write a different pattern elsewhere
+ *   to charge the residual capacitance in a differnt manner, then read
+ *   the target location back.
+ *
+ * o Always read the target location EXACTLY ONCE and save it in a local
+ *   variable.  The problem with reading the target location more than
+ *   once is that the second and subsequent reads may work properly,
+ *   resulting in a failed test that tells the poor technician that
+ *   "Memory error at 00000000, wrote aaaaaaaa, read aaaaaaaa" which
+ *   doesn't help him one bit and causes puzzled phone calls.  Been there,
+ *   done that.
+ *
+ * Data line test:
+ * ---------------
+ * This tests data lines for shorts and opens by forcing adjacent data
+ * to opposite states. Because the data lines could be routed in an
+ * arbitrary manner the must ensure test patterns ensure that every case
+ * is tested. By using the following series of binary patterns every
+ * combination of adjacent bits is test regardless of routing.
+ *
+ *     ...101010101010101010101010
+ *     ...110011001100110011001100
+ *     ...111100001111000011110000
+ *     ...111111110000000011111111
+ *
+ * Carrying this out, gives us six hex patterns as follows:
+ *
+ *     0xaaaaaaaaaaaaaaaa
+ *     0xcccccccccccccccc
+ *     0xf0f0f0f0f0f0f0f0
+ *     0xff00ff00ff00ff00
+ *     0xffff0000ffff0000
+ *     0xffffffff00000000
+ *
+ * To test for short and opens to other signals on our boards, we
+ * simply test with the 1's complemnt of the paterns as well, resulting
+ * in twelve patterns total.
+ *
+ * After writing a test pattern. a special pattern 0x0123456789ABCDEF is
+ * written to a different address in case the data lines are floating.
+ * Thus, if a byte lane fails, you will see part of the special
+ * pattern in that byte lane when the test runs.  For example, if the
+ * xx__xxxxxxxxxxxx byte line fails, you will see aa23aaaaaaaaaaaa
+ * (for the 'a' test pattern).
+ *
+ * Address line test:
+ * ------------------
+ *  This function performs a test to verify that all the address lines
+ *  hooked up to the RAM work properly.  If there is an address line
+ *  fault, it usually shows up as two different locations in the address
+ *  map (related by the faulty address line) mapping to one physical
+ *  memory storage location.  The artifact that shows up is writing to
+ *  the first location "changes" the second location.
+ *
+ * To test all address lines, we start with the given base address and
+ * xor the address with a '1' bit to flip one address line.  For each
+ * test, we shift the '1' bit left to test the next address line.
+ *
+ * In the actual code, we start with address sizeof(ulong) since our
+ * test pattern we use is a ulong and thus, if we tried to test lower
+ * order address bits, it wouldn't work because our pattern would
+ * overwrite itself.
+ *
+ * Example for a 4 bit address space with the base at 0000:
+ *   0000 <- base
+ *   0001 <- test 1
+ *   0010 <- test 2
+ *   0100 <- test 3
+ *   1000 <- test 4
+ * Example for a 4 bit address space with the base at 0010:
+ *   0010 <- base
+ *   0011 <- test 1
+ *   0000 <- (below the base address, skipped)
+ *   0110 <- test 2
+ *   1010 <- test 3
+ *
+ * The test locations are successively tested to make sure that they are
+ * not "mirrored" onto the base address due to a faulty address line.
+ * Note that the base and each test location are related by one address
+ * line flipped.  Note that the base address need not be all zeros.
+ *
+ * Memory tests 1-4:
+ * -----------------
+ * These tests verify RAM using sequential writes and reads
+ * to/from RAM. There are several test cases that use different patterns to
+ * verify RAM. Each test case fills a region of RAM with one pattern and
+ * then reads the region back and compares its contents with the pattern.
+ * The following patterns are used:
+ *
+ *  1a) zero pattern (0x00000000)
+ *  1b) negative pattern (0xffffffff)
+ *  1c) checkerboard pattern (0x55555555)
+ *  1d) checkerboard pattern (0xaaaaaaaa)
+ *  2)  bit-flip pattern ((1 << (offset % 32))
+ *  3)  address pattern (offset)
+ *  4)  address pattern (~offset)
+ *
+ * Being run in normal mode, the test verifies only small 4Kb
+ * regions of RAM around each 1Mb boundary. For example, for 64Mb
+ * RAM the following areas are verified: 0x00000000-0x00000800,
+ * 0x000ff800-0x00100800, 0x001ff800-0x00200800, ..., 0x03fff800-
+ * 0x04000000. If the test is run in slow-test mode, it verifies
+ * the whole RAM.
+ */
+
+#include <post.h>
+#include <watchdog.h>
+
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Define INJECT_*_ERRORS for testing error detection in the presence of
+ * _good_ hardware.
+ */
+#undef  INJECT_DATA_ERRORS
+#undef  INJECT_ADDRESS_ERRORS
+
+#ifdef INJECT_DATA_ERRORS
+#warning "Injecting data line errors for testing purposes"
+#endif
+
+#ifdef INJECT_ADDRESS_ERRORS
+#warning "Injecting address line errors for testing purposes"
+#endif
+
+
+/*
+ * This function performs a double word move from the data at
+ * the source pointer to the location at the destination pointer.
+ * This is helpful for testing memory on processors which have a 64 bit
+ * wide data bus.
+ *
+ * On those PowerPC with FPU, use assembly and a floating point move:
+ * this does a 64 bit move.
+ *
+ * For other processors, let the compiler generate the best code it can.
+ */
+static void move64(const unsigned long long *src, unsigned long long *dest)
+{
+#if defined(CONFIG_MPC8260) || defined(CONFIG_MPC824X)
+	asm ("lfd  0, 0(3)\n\t" /* fpr0	  =  *scr	*/
+	 "stfd 0, 0(4)"		/* *dest  =  fpr0	*/
+	 : : : "fr0" );		/* Clobbers fr0		*/
+    return;
+#else
+	*dest = *src;
+#endif
+}
+
+/*
+ * This is 64 bit wide test patterns.  Note that they reside in ROM
+ * (which presumably works) and the tests write them to RAM which may
+ * not work.
+ *
+ * The "otherpattern" is written to drive the data bus to values other
+ * than the test pattern.  This is for detecting floating bus lines.
+ *
+ */
+const static unsigned long long pattern[] = {
+	0xaaaaaaaaaaaaaaaaULL,
+	0xccccccccccccccccULL,
+	0xf0f0f0f0f0f0f0f0ULL,
+	0xff00ff00ff00ff00ULL,
+	0xffff0000ffff0000ULL,
+	0xffffffff00000000ULL,
+	0x00000000ffffffffULL,
+	0x0000ffff0000ffffULL,
+	0x00ff00ff00ff00ffULL,
+	0x0f0f0f0f0f0f0f0fULL,
+	0x3333333333333333ULL,
+	0x5555555555555555ULL
+};
+const unsigned long long otherpattern = 0x0123456789abcdefULL;
+
+
+static int memory_post_dataline(unsigned long long * pmem)
+{
+	unsigned long long temp64 = 0;
+	int num_patterns = sizeof(pattern)/ sizeof(pattern[0]);
+	int i;
+	unsigned int hi, lo, pathi, patlo;
+	int ret = 0;
+
+	for ( i = 0; i < num_patterns; i++) {
+		move64(&(pattern[i]), pmem++);
+		/*
+		 * Put a different pattern on the data lines: otherwise they
+		 * may float long enough to read back what we wrote.
+		 */
+		move64(&otherpattern, pmem--);
+		move64(pmem, &temp64);
+
+#ifdef INJECT_DATA_ERRORS
+		temp64 ^= 0x00008000;
+#endif
+
+		if (temp64 != pattern[i]){
+			pathi = (pattern[i]>>32) & 0xffffffff;
+			patlo = pattern[i] & 0xffffffff;
+
+			hi = (temp64>>32) & 0xffffffff;
+			lo = temp64 & 0xffffffff;
+
+			printf ("Memory (date line) error at %08x, "
+				  "wrote %08x%08x, read %08x%08x !\n",
+					  pmem, pathi, patlo, hi, lo);
+			ret = -1;
+		}
+	}
+	return ret;
+}
+
+static int memory_post_addrline(ulong *testaddr, ulong *base, ulong size)
+{
+	ulong *target;
+	ulong *end;
+	ulong readback;
+	ulong xor;
+	int   ret = 0;
+
+	end = (ulong *)((ulong)base + size);	/* pointer arith! */
+	xor = 0;
+	for(xor = sizeof(ulong); xor > 0; xor <<= 1) {
+		target = (ulong *)((ulong)testaddr ^ xor);
+		if((target >= base) && (target < end)) {
+			*testaddr = ~*target;
+			readback  = *target;
+
+#ifdef INJECT_ADDRESS_ERRORS
+			if(xor == 0x00008000) {
+				readback = *testaddr;
+			}
+#endif
+			if(readback == *testaddr) {
+				printf ("Memory (address line) error at %08x<->%08x, "
+					"XOR value %08x !\n",
+					testaddr, target, xor);
+				ret = -1;
+			}
+		}
+	}
+	return ret;
+}
+
+static int memory_post_test1 (unsigned long start,
+			      unsigned long size,
+			      unsigned long val)
+{
+	unsigned long i;
+	ulong *mem = (ulong *) start;
+	ulong readback;
+	int ret = 0;
+
+	for (i = 0; i < size / sizeof (ulong); i++) {
+		mem[i] = val;
+		if (i % 1024 == 0)
+			WATCHDOG_RESET ();
+	}
+
+	for (i = 0; i < size / sizeof (ulong) && ret == 0; i++) {
+		readback = mem[i];
+		if (readback != val) {
+			post_log ("Memory error at %08x, "
+				  "wrote %08x, read %08x !\n",
+					  mem + i, val, readback);
+
+			ret = -1;
+			break;
+		}
+		if (i % 1024 == 0)
+			WATCHDOG_RESET ();
+	}
+
+	return ret;
+}
+
+static int memory_post_test2 (unsigned long start, unsigned long size)
+{
+	unsigned long i;
+	ulong *mem = (ulong *) start;
+	ulong readback;
+	int ret = 0;
+
+	for (i = 0; i < size / sizeof (ulong); i++) {
+		mem[i] = 1 << (i % 32);
+		if (i % 1024 == 0)
+			WATCHDOG_RESET ();
+	}
+
+	for (i = 0; i < size / sizeof (ulong) && ret == 0; i++) {
+		readback = mem[i];
+		if (readback != (1 << (i % 32))) {
+			post_log ("Memory error at %08x, "
+				  "wrote %08x, read %08x !\n",
+					  mem + i, 1 << (i % 32), readback);
+
+			ret = -1;
+			break;
+		}
+		if (i % 1024 == 0)
+			WATCHDOG_RESET ();
+	}
+
+	return ret;
+}
+
+static int memory_post_test3 (unsigned long start, unsigned long size)
+{
+	unsigned long i;
+	ulong *mem = (ulong *) start;
+	ulong readback;
+	int ret = 0;
+
+	for (i = 0; i < size / sizeof (ulong); i++) {
+		mem[i] = i;
+		if (i % 1024 == 0)
+			WATCHDOG_RESET ();
+	}
+
+	for (i = 0; i < size / sizeof (ulong) && ret == 0; i++) {
+		readback = mem[i];
+		if (readback != i) {
+			post_log ("Memory error at %08x, "
+				  "wrote %08x, read %08x !\n",
+					  mem + i, i, readback);
+
+			ret = -1;
+			break;
+		}
+		if (i % 1024 == 0)
+			WATCHDOG_RESET ();
+	}
+
+	return ret;
+}
+
+static int memory_post_test4 (unsigned long start, unsigned long size)
+{
+	unsigned long i;
+	ulong *mem = (ulong *) start;
+	ulong readback;
+	int ret = 0;
+
+	for (i = 0; i < size / sizeof (ulong); i++) {
+		mem[i] = ~i;
+		if (i % 1024 == 0)
+			WATCHDOG_RESET ();
+	}
+
+	for (i = 0; i < size / sizeof (ulong) && ret == 0; i++) {
+		readback = mem[i];
+		if (readback != ~i) {
+			post_log ("Memory error at %08x, "
+				  "wrote %08x, read %08x !\n",
+					  mem + i, ~i, readback);
+
+			ret = -1;
+			break;
+		}
+		if (i % 1024 == 0)
+			WATCHDOG_RESET ();
+	}
+
+	return ret;
+}
+
+static int memory_post_tests (unsigned long start, unsigned long size)
+{
+	int ret = 0;
+
+	if (ret == 0)
+		ret = memory_post_dataline ((unsigned long long *)start);
+	WATCHDOG_RESET ();
+	if (ret == 0)
+		ret = memory_post_addrline ((ulong *)start, (ulong *)start, size);
+	WATCHDOG_RESET ();
+	if (ret == 0)
+		ret = memory_post_addrline ((ulong *)(start + size - 8),
+					    (ulong *)start, size);
+	WATCHDOG_RESET ();
+	if (ret == 0)
+		ret = memory_post_test1 (start, size, 0x00000000);
+	WATCHDOG_RESET ();
+	if (ret == 0)
+		ret = memory_post_test1 (start, size, 0xffffffff);
+	WATCHDOG_RESET ();
+	if (ret == 0)
+		ret = memory_post_test1 (start, size, 0x55555555);
+	WATCHDOG_RESET ();
+	if (ret == 0)
+		ret = memory_post_test1 (start, size, 0xaaaaaaaa);
+	WATCHDOG_RESET ();
+	if (ret == 0)
+		ret = memory_post_test2 (start, size);
+	WATCHDOG_RESET ();
+	if (ret == 0)
+		ret = memory_post_test3 (start, size);
+	WATCHDOG_RESET ();
+	if (ret == 0)
+		ret = memory_post_test4 (start, size);
+	WATCHDOG_RESET ();
+
+	return ret;
+}
+
+int memory_post(unsigned long *start, unsigned long size)
+{
+	int ret = 0;
+
+	if (ret == 0)
+		ret |= memory_post_dataline((unsigned long long *)start);
+	WATCHDOG_RESET();
+	if (ret == 0)
+		ret |= memory_post_addrline(start, start, size);
+	WATCHDOG_RESET();
+
+	return ret;
+}
+
diff --git a/config.mk b/config.mk
index 8a89f5f..68b4906 100644
--- a/config.mk
+++ b/config.mk
@@ -55,9 +55,15 @@
 HOSTSTRIP	= strip
 
 
+# Quantenna's Ruby
 ifeq ($(ARCH),arc)
-	PLATFORM_CPPFLAGS+= -D__ARC__ -Os -g -mno-volatile-cache -fomit-frame-pointer
+	# PLATFORM_CPPFLAGS+= -D__ARC__ -mA7 -mno-sdata -O0 -g -mno-volatile-cache -fomit-frame-pointer
+	# Enable optimization. Disable cache bypassing for "volatile" references.
+	# It is bad design to enable cache bypassing for "volatile" references - readX()/writeX() has to be used.
+	PLATFORM_CPPFLAGS_PATH = -I$(OBJTREE)/../common -I$(OBJTREE)/../include/qtn
+	PLATFORM_CPPFLAGS += -D__ARC__ -mA7 -mno-sdata -Os -g -mvolatile-cache -fomit-frame-pointer $(PLATFORM_CPPFLAGS_PATH)
 endif
+HOST_CFLAGS += -I$(OBJTREE)/../common
 
 #########################################################################
 #
@@ -128,7 +134,9 @@
 gccincdir := $(shell $(CC) -print-file-name=include)
 
 CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS)		\
-	-D__KERNEL__
+	-D__KERNEL__ \
+	-DUBOOT_BUILD
+
 ifneq ($(TEXT_BASE),)
 CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
 endif
diff --git a/cpu/arc/Makefile b/cpu/arc/Makefile
index 8107049..7b93538 100644
--- a/cpu/arc/Makefile
+++ b/cpu/arc/Makefile
@@ -18,18 +18,18 @@
 
 LIB	= lib$(CPU).a
 
-SOBJS	= vector.o start.o
-OBJS	= cpu.o interrupts.o
+START	= start.o
+OBJS	= cpu.o interrupts.o cache.o
 
-all:	.depend $(SOBJS) $(LIB)
+all:	.depend $(START) $(LIB)
 
 $(LIB):	$(OBJS)
 	$(AR) crv $@ $(OBJS)
 
 #########################################################################
 
-.depend:	Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
-		$(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+.depend:	Makefile $(START:.o=.S) $(OBJS:.o=.c)
+		$(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@
 
 sinclude .depend
 
diff --git a/cpu/arc/cache.c b/cpu/arc/cache.c
new file mode 100644
index 0000000..52433a4
--- /dev/null
+++ b/cpu/arc/cache.c
@@ -0,0 +1,200 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/******************************************************************************
+ * Copyright ARC International (www.arc.com) 2007-2009
+ *
+ *****************************************************************************/
+/******************************************************************************
+ * Copyright Codito Technologies (www.codito.com) Oct 01, 2004
+ * 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *****************************************************************************/
+/*
+ *  linux/arch/arc/mm/cache_arc700.c
+ *
+ *  Copyright (C) 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Authors: Amit Bhor, Rahul Trivedi
+ * I-Cache and D-cache control functionality. 
+ * Ashwin Chaugule <ashwin.chaugule@codito.com>
+ */
+
+#include <command.h>
+#include <common.h>
+#include <asm/arcregs.h>
+#include <asm/cache.h>
+#include <asm/io.h>
+
+//---------------------------------------------------------------------------------
+
+/* Please keep it always inlined - it should be safer to use with disable cache function */
+__attribute__((always_inline))
+static inline void _invalidate_icache_all(void)
+{
+	/* Invoke Cache INV CMD */
+	write_new_aux_reg(ARC_REG_IC_IVIC, 0x1);
+	/* read will not complete till the icache inv operation is not over */
+	read_new_aux_reg(ARC_REG_IC_CTRL);
+}
+
+/* Please keep it always inlined - it should be safer to use with disable cache function */
+__attribute__((always_inline))
+static inline void _flush_and_inv_dcache_all(void)
+{
+	/* Set the Invalidate mode to FLUSH BEFORE INV */
+	write_new_aux_reg(ARC_REG_DC_CTRL, read_new_aux_reg(ARC_REG_DC_CTRL) | ARC_INV_MODE_FLUSH);
+
+	/* Invoke Cache INV CMD */
+	write_new_aux_reg(ARC_REG_DC_IVDC, 0x1);
+
+	/* wait for the flush to complete, poll on the FS Bit */
+	while(read_new_aux_reg(ARC_REG_DC_CTRL) & ARC_DC_FLUSH_STATUS_BIT);
+}
+
+//---------------------------------------------------------------------------------
+
+void invalidate_icache_all(void)
+{
+	_invalidate_icache_all();
+}
+
+void invalidate_icache_range(unsigned long start, unsigned long stop)
+{
+	while (start < stop) {
+#if (PLATFORM_ARC7_MMU_VER >= 3)
+		write_new_aux_reg(ARC_REG_IC_PTAG, start);
+#endif
+		write_new_aux_reg(ARC_REG_IC_IVIL, start);
+		start += ARC_ICACHE_LINE_LEN;
+	}
+}
+
+//---------------------------------------------------------------------------------
+
+void flush_and_inv_dcache_all(void)
+{
+	_flush_and_inv_dcache_all();
+}
+
+void invalidate_dcache_range(unsigned long start, unsigned long stop)
+{
+	/* make sure we do not flush here, just invalidate */
+	write_new_aux_reg(ARC_REG_DC_CTRL, read_new_aux_reg(ARC_REG_DC_CTRL) & (~ARC_INV_MODE_FLUSH));
+	while (start < stop) {
+#if (PLATFORM_ARC7_MMU_VER >= 3)
+		write_new_aux_reg(ARC_REG_DC_PTAG, start);
+#endif
+		write_new_aux_reg(ARC_REG_DC_IVDL, start);
+		start += ARC_DCACHE_LINE_LEN;
+	}
+}
+
+void flush_and_inv_dcache_range(unsigned long start, unsigned long stop)
+{
+	/* make sure we do flush here */
+	write_new_aux_reg(ARC_REG_DC_CTRL, read_new_aux_reg(ARC_REG_DC_CTRL) | ARC_INV_MODE_FLUSH);
+	while (start < stop) {
+#if (PLATFORM_ARC7_MMU_VER >= 3)
+		write_new_aux_reg(ARC_REG_DC_PTAG, start);
+#endif
+		write_new_aux_reg(ARC_REG_DC_IVDL, start);
+		start += ARC_DCACHE_LINE_LEN;
+	}
+	/* wait for the flush to complete, poll on the FS Bit */
+	while(read_new_aux_reg(ARC_REG_DC_CTRL) & ARC_DC_FLUSH_STATUS_BIT);
+}
+
+void flush_dcache_range(unsigned long start, unsigned long stop)
+{
+	while (start < stop) {
+#if (PLATFORM_ARC7_MMU_VER >= 3)
+		write_new_aux_reg(ARC_REG_DC_PTAG, start);
+#endif
+		write_new_aux_reg(ARC_REG_DC_FLDL, start);
+		start += ARC_DCACHE_LINE_LEN;
+	}
+	/* wait for the flush to complete, poll on the FS Bit */
+	while(read_new_aux_reg(ARC_REG_DC_CTRL) & ARC_DC_FLUSH_STATUS_BIT);
+}
+
+//---------------------------------------------------------------------------------
+
+void dcache_disable(void)
+{
+	/* Prepare cache for switching off. */
+	_flush_and_inv_dcache_all();
+	/* Switch cache off */
+	write_new_aux_reg(ARC_REG_DC_CTRL, read_new_aux_reg(ARC_REG_DC_CTRL) | ARC_DC_DISABLE);
+}
+
+void icache_disable(void)
+{
+#ifndef TOPAZ_ICACHE_WORKAROUND
+	/* Prepare cache for switching off. */
+	_invalidate_icache_all();
+	/* Switch cache off */
+	write_new_aux_reg(ARC_REG_IC_CTRL, read_new_aux_reg(ARC_REG_IC_CTRL) | ARC_IC_DISABLE);
+#endif
+}
+
+//---------------------------------------------------------------------------------
+
+void dcache_enable(void)
+{
+	write_new_aux_reg(ARC_REG_DC_CTRL, read_new_aux_reg(ARC_REG_DC_CTRL) & ~ARC_DC_DISABLE);
+}
+
+void icache_enable(void)
+{
+	write_new_aux_reg(ARC_REG_IC_CTRL, read_new_aux_reg(ARC_REG_IC_CTRL) & ~ARC_IC_DISABLE);
+}
+
+//---------------------------------------------------------------------------------
+
+int dcache_status(void)
+{
+	return !(read_new_aux_reg(ARC_REG_DC_CTRL) & ARC_DC_DISABLE);
+}
+
+int icache_status(void)
+{
+	return !(read_new_aux_reg(ARC_REG_IC_CTRL) & ARC_IC_DISABLE);
+}
+
+//---------------------------------------------------------------------------------
+
+void flush_cache(unsigned long start, unsigned long stop)
+{
+	flush_and_inv_dcache_range(start, stop);
+	invalidate_icache_range(start, stop);
+}
+
+//---------------------------------------------------------------------------------
diff --git a/cpu/arc/config.mk b/cpu/arc/config.mk
deleted file mode 100644
index e85a1b6..0000000
--- a/cpu/arc/config.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-PLATFORM_CPPFLAGS += -mA6 -EL
-PLATFORM_LDFLAGS += -EL
-
-ifeq ($(CONFIG_ARC_CPU_BUS_WIDTH),32)
-PLATFORM_CPPFLAGS += -DARC_CPU_PERIPHERAL_BASE=0xFC000000
-endif
-
-ifeq ($(CONFIG_ARC_CPU_BUS_WIDTH),24)
-PLATFORM_CPPFLAGS += -DARC_CPU_PERIPHERAL_BASE=0x00FC0000
-endif
diff --git a/cpu/arc/cpu.c b/cpu/arc/cpu.c
index d4df7be..a458dd5 100644
--- a/cpu/arc/cpu.c
+++ b/cpu/arc/cpu.c
@@ -1,99 +1,40 @@
 /*
- * Copyright Codito Technologies (www.codito.com) 
+ * (C) Copyright 2010 Quantenna Communications Inc.
  *
- * cpu/arc/cpu.c
+ * See file CREDITS for list of people who contributed to this
+ * project.
  *
- * Copyright (C) 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- * 
- * Authors :Sandeep Patil (sandeep.patil@codito.com)
- * 			Pradeep Sawlani (pradeep.sawlani@codito.com)
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
  */
 
-#include <command.h>
+
 #include <common.h>
-#include <asm/arcregs.h>
 
-
-int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-	
-#if CFG_UBOOT_ON_FLASH  	
-	/* if uboot is on flash then boot agian from flash */
-	void (*reset)();
-	reset = (void (*)())0x0;
-	(*reset)();
-#endif	
-	return 0;
-}
-
-
-void disable_icache(void)
-{
-	__asm__ __volatile (	"lr  r0,[0x11] \n\t"
-				"or  r0,r0,1 \n\t"
-				"sr  r0,[0x11] \n\t"
-				::
-				:"r0");	
-
-}
-void dcache_disable(void)
-{
-	/* Flush D cache */
-	__asm__ __volatile (	
-			"sr  1, [0x47] \n\t"
-			::
-			);
-	/* Disable D cache */
-	__asm__ __volatile (	
-			"lr  r0,[0x48] \n\t"
-			"or  r0,r0,1 \n\t"
-			"sr  r0,[0x48] \n\t"
-			::
-			:"r0");	
-	
-
-
-}
-
-void dcache_enable()
-{
-
-}
-
-int dcache_status()
-{
-	return 0;
-}
-
-
-
-void flush_cache (unsigned long dummy1, unsigned long dummy2)
-{
-	/* flushing data cache */
-	write_new_aux_reg(ARC_REG_DC_FLSH, 1);
-
-	/* poll for completion */
-	while (read_new_aux_reg(ARC_REG_DC_CTRL) & (1<<8));
-
-	/* Invalidate instruction cache */
-	write_new_aux_reg(ARC_REG_IC_IVIC, 1);
-	    
-	/* read will only comple when invalidation complete */
-	read_new_aux_reg(ARC_REG_IC_CTRL);
-}	
-
-/*
- * disable dcache and icahce
- */
-
+/* First function in initialize sequence */
 int cpu_init(void)
 {
 	disable_interrupts();
 	return 0;
 }
 
+/* Last function before Linux start */
+int cleanup_before_linux(void)
+{
+	dcache_disable();
+	icache_disable();
+	return 0;
+}
 
diff --git a/cpu/arc/interrupts.c b/cpu/arc/interrupts.c
index 0f1e08c..b9f6e92 100644
--- a/cpu/arc/interrupts.c
+++ b/cpu/arc/interrupts.c
@@ -1,20 +1,31 @@
 /*
- *  Copyright Codito Technologies (www.codito.com) 
+ *  Copyright Codito Technologies (www.codito.com)
  *
  *  cpu/arc/interrupts.c
  *
- *  Copyright (C) 
+ *  Copyright (C)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
- * 
+ *
  * Authors : Sandeep Patil (sandeep.patil@codito.com)
- * 			 Pradeep Sawlani (pradeep.sawlani@codito.com)
+ *		Pradeep Sawlani (pradeep.sawlani@codito.com)
  */
-#include <asm/arcregs.h> 
+#include <asm/arcregs.h>
+#include <common.h>
 
-void disable_interrupts(void)
+struct  irq_action {
+        //interrupt_handler_t *handler;
+        void *handler;
+        void *arg;
+        int count;
+};
+
+static struct irq_action irq_vecs[64];
+
+//void disable_interrupts(void)
+int disable_interrupts(void)
 {
 	unsigned int status;
 	status = read_new_aux_reg(ARC_REG_STATUS32);
@@ -23,9 +34,10 @@
 	__asm__ __volatile__ (
 		"FLAG %0"
 		:
-	       	:"r"(status)
+		:"r"(status)
 		);
 
+	return (status & (STATUS_E1_MASK | STATUS_E2_MASK));
 }
 
 void enable_interrupts(void)
@@ -34,6 +46,31 @@
 	status = read_new_aux_reg(ARC_REG_STATUS32);
 	status |= STATUS_E1_MASK;
 	status |= STATUS_E2_MASK;
-	write_new_aux_reg(ARC_REG_STATUS32,status);
+//	write_new_aux_reg(ARC_REG_STATUS32,status);
+	__asm__ __volatile__ (
+		"FLAG %0"
+		:
+		:"r"(status)
+		);
 }
 
+//void irq_install_handler (int vec, interrupt_handler_t *handler, void *arg)
+void irq_install_handler(int vec, interrupt_handler_t *handler, void *arg)
+{
+        struct irq_action *irqa = irq_vecs;
+        int   i = vec;
+        int flag;
+
+        //if (irqa[i].handler != NULL) {
+        if (irqa[i].handler != 0) {
+                printf ("Interrupt vector %d: handler 0x%x "
+                        "replacing 0x%x\n",
+                        vec, (uint)handler, (uint)irqa[i].handler);
+        }
+
+        flag = disable_interrupts ();
+        irqa[i].handler = handler;
+        irqa[i].arg = arg;
+        if (flag )
+                enable_interrupts ();
+}
diff --git a/cpu/arc/start.S b/cpu/arc/start.S
index 961f63a..c5a9e2f 100644
--- a/cpu/arc/start.S
+++ b/cpu/arc/start.S
@@ -1,165 +1,27 @@
-/* 
- * Copyright Codito Technologies (www.codito.com) 
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
  *
- *  cpu/arc/start.S
+ * See file CREDITS for list of people who contributed to this
+ * project.
  *
- *  Copyright (C) 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- * 
- * Authors : Sandeep Patil (sandeep.patil@codito.com)
- *  		 Pradeep Sawlani (pradeep.sawlani@codito.com)
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
  */
 
-#include <asm/arcregs.h>	/* required for STATUS_H_SET */
-#include <config.h>
-
-	/* .text section loaded at TEXT_BASE defined in board/aa3/config.mk */
-	.section .text , "ax" , @progbits
-	.type _start, @function
-	.align 4
-	.globl _start
-	
-.globl _bss_start
-_bss_start:
-	.word __bss_start
-
-.globl _bss_end
-_bss_end:
-	.word __bss_end
-	
-.globl _arcboot_start
-_arcboot_start:
-	.word _start		
-
-_start:
-	/* Disable interrupts */
-	lr    r2,[ARC_REG_STATUS32]	
-	and   r2,r2,STATUS_DISABLE_INTERRUPTS
-	sr    r2,[ARC_REG_STATUS32]	
-
-#if defined(CONFIG_SYS_RELOCATE)
-	/* For relocation following registers are used : 
-	*  r1 : destination
-	*  r2 : source 
-	*  r3 : till
-	*  r4 : jump to next loop
-	*  r5 : temporary storage
-	*  r6 : jump to same loop   
-	*/
-
-	/* Relocate vector table if necessary */
-#if defined(CONFIG_SYS_RELOCATE_VEC)
-				
-	mov r1,CONFIG_SYS_RELOCATE_DEST
-	/* vector table start address in flash is (__vector_start +
-	flash base - text base) since vector start and text base
-	are same we move only CONFIG_SYS_RELOCATE_BASE */
-	mov r2, __vector_start
-
-	/* vector end table address in flash is (__vector_end + flash
-	base - text base) */
-	mov r3,__vector_end
-	add r3,r3,CONFIG_SYS_RELOCATE_BASE-TEXT_BASE
-
-	/* address of relocate text in flash = relocate text + flash
-	base - text base */
-	mov r4,relocate_text
-	add r4,r4,CONFIG_SYS_RELOCATE_BASE-TEXT_BASE
-	
-	mov r6,copy_vector_table
-	add r6,r6,CONFIG_SYS_RELOCATE_BASE-TEXT_BASE
-	
-copy_vector_table :
-
-	cmp r2,r3
-	jeq [r4]
-	
-	/* copy from r2 to dest i.e in r1 register which point to CONFIG_SYS_RELOCATE_DEST */	
-	ld.ab r5,[r2,4]
-	st.ab r5,[r1,4]
-		
-	j [r6]
-		
-#endif /* CONFIG_SYS_RELOCATE_VEC */
-
-	/* Relocate text section */
-relocate_text:
-	mov r1,__text_start
-	
-	mov r2,__text_start
-	add r2,r2,CONFIG_SYS_RELOCATE_BASE-TEXT_BASE
-
-	mov r3,__text_end
-	add r3,r3,CONFIG_SYS_RELOCATE_BASE-TEXT_BASE
-
-	mov r4,relocate_data 	
-	add r4,r4,CONFIG_SYS_RELOCATE_BASE-TEXT_BASE
-
-	mov r6,copy_text_section
-	add r6,r6,CONFIG_SYS_RELOCATE_BASE-TEXT_BASE
-
-copy_text_section :
-	cmp r2,r3
-	jeq [r4]
-	
-	/* copy from r2 to dest i.e in r1 register */	
-	ld.ab r5,[r2,4]
-	st.ab r5,[r1,4]
-
-	j [r6]		
-
-	/* Relocate data section */
-relocate_data:
-	mov r1,__data_start
-
-	mov r2,__data_start
-	add r2,r2,CONFIG_SYS_RELOCATE_BASE-TEXT_BASE
-
-	mov r3,__data_end
-	add r3,r3,CONFIG_SYS_RELOCATE_BASE-TEXT_BASE
-
-	mov r4,fill_bss
-	
-	mov r6,copy_data_section
-	add r6,r6,CONFIG_SYS_RELOCATE_BASE-TEXT_BASE
-
-copy_data_section :
-	
-	cmp r2,r3
-	jeq [r4]
-	
-	/* copy from r2 to dest i.e in r1 register */	
-	ld.ab r5,[r2,4]
-	st.ab r5,[r1,4]
-		
-	j [r6]
-
-
-#endif /* CONFIG_SYS_RELOCATE */
-
-	/* This code will be executed from ram */	
-	.globl fill_bss
-fill_bss:
-	/* Clear bss */
-	mov_s r2, __bss_start
-	mov_s r3, __bss_end
-
-_clear_bss:
-	st.ab 0,[r2,4]
-	brlt  r2,r3,_clear_bss
-	
-	/* setup stack pointer after bss segment*/
-	mov sp, __bss_end
-	mov fp,sp	
-	jal start_arcboot
-
-	.globl halt_stub
-halt_stub:
-	/* Halt Core */
-	flag STATUS_H_SET   ; halt processor
-	nop
-	nop
+/*
+ * U-Boot Makefiles needed to have this file, but we are not going
+ * to have "common" start code, so let's have empty place-holder.
+ */
 
diff --git a/cpu/arc/vector.S b/cpu/arc/vector.S
deleted file mode 100644
index 5414620..0000000
--- a/cpu/arc/vector.S
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <asm/arcregs.h>	/* required for STATUS_H_SET */
-#include <config.h>
-
-	.section .vector , "ax" , @progbits
-	.globl vector
-
-vector:
-jal	_start
-jal	halt_stub
-jal	halt_stub
-jal	halt_stub
-jal	halt_stub
-jal	halt_stub
diff --git a/cpu/arc700/config.mk b/cpu/arc700/config.mk
deleted file mode 100644
index c17c018..0000000
--- a/cpu/arc700/config.mk
+++ /dev/null
@@ -1 +0,0 @@
-PLATFORM_CPPFLAGS += -mA7
diff --git a/cpu/arc700/cpu.c b/cpu/arc700/cpu.c
index 6d24a86..8ae81f2 100644
--- a/cpu/arc700/cpu.c
+++ b/cpu/arc700/cpu.c
@@ -27,7 +27,7 @@
 	reset = (void (*)())0x0;
 	(*reset)();
 #endif	
-	return 0;
+
 }
 
 
@@ -59,14 +59,13 @@
 
 }
 
-void dcache_enable(void)
+dcache_enable()
 {
 
 }
 
-int dcache_status()
+dcache_status()
 {
-	return 0;
 }
 
 
diff --git a/cpu/arc700/start.S b/cpu/arc700/start.S
index ca54b8b..efa6a06 100644
--- a/cpu/arc700/start.S
+++ b/cpu/arc700/start.S
@@ -39,7 +39,6 @@
 	.word _start		
 
 _start:
-    mov gp, __SDATA_BEGIN__
 	/* Disable interrupts */
 /*	lr    r2,[ARC_REG_STATUS32]	
 	and   r2,r2,STATUS_DISABLE_INTERRUPTS
diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c
index bf452aa..e8dff0a 100644
--- a/drivers/block/systemace.c
+++ b/drivers/block/systemace.c
@@ -53,29 +53,19 @@
  */
 #if (CONFIG_SYS_SYSTEMACE_WIDTH == 8)
 #if !defined(__BIG_ENDIAN)
-#define ace_readw(off)									\
-				((readb(CONFIG_SYS_SYSTEMACE_BASE+off)<<8) |		\
-				(readb(CONFIG_SYS_SYSTEMACE_BASE+off+1)))
-				
-#define ace_writew(val, off)								\
-				{writeb(val>>8, CONFIG_SYS_SYSTEMACE_BASE+off);		\
-				writeb(val, CONFIG_SYS_SYSTEMACE_BASE+off+1);}
+#define ace_readw(off) ((readb(CONFIG_SYS_SYSTEMACE_BASE+off)<<8) | \
+			(readb(CONFIG_SYS_SYSTEMACE_BASE+off+1)))
+#define ace_writew(val, off) {writeb(val>>8, CONFIG_SYS_SYSTEMACE_BASE+off); \
+			      writeb(val, CONFIG_SYS_SYSTEMACE_BASE+off+1);}
 #else
-	
-#define ace_readw(off)									\
-				((readb(CONFIG_SYS_SYSTEMACE_BASE+off)) |		\
-				(readb(CONFIG_SYS_SYSTEMACE_BASE+off+1)<<8))
-	
-#define ace_writew(val, off)								\
-				{writeb(val, CONFIG_SYS_SYSTEMACE_BASE+off);		\
-				writeb(val>>8, CONFIG_SYS_SYSTEMACE_BASE+off+1);}
+#define ace_readw(off) ((readb(CONFIG_SYS_SYSTEMACE_BASE+off)) | \
+			(readb(CONFIG_SYS_SYSTEMACE_BASE+off+1)<<8))
+#define ace_writew(val, off) {writeb(val, CONFIG_SYS_SYSTEMACE_BASE+off); \
+			      writeb(val>>8, CONFIG_SYS_SYSTEMACE_BASE+off+1);}
 #endif
-
 #else
-	
-#define ace_readw(off)		(inw(CONFIG_SYS_SYSTEMACE_BASE+off))
-#define ace_writew(val, off)	(outw(val, (CONFIG_SYS_SYSTEMACE_BASE+off)))
-
+#define ace_readw(off) (in16(CONFIG_SYS_SYSTEMACE_BASE+off))
+#define ace_writew(val, off) (out16(CONFIG_SYS_SYSTEMACE_BASE+off,val))
 #endif
 
 /* */
@@ -88,36 +78,15 @@
 static int get_cf_lock(void)
 {
 	int retry = 10;
-	unsigned val, locked;
 
-	ace_writew(SYSTEMACE_CCR_RESET, SYSTEMACE_SECT_CNT_CMD_REG);
-	locked =  ace_readw(SYSTEMACE_STATUS_REG) & SYSTEMACE_SR_CFGLOCK;
-#if SYSTEMACE_FORCE_LOCK == 1
-	/*
-	 * Reset the configuration controller if it has the lock. Per
-	 * ASIC designer, this eliminates a potential deadlock if the
-	 * FORCELOCK and LOCKREQ bits are both set and the RDYFORCFCMD
-	 * is not set.
-	 */
-	if(locked)
-	{
-		val = ace_readw(SYSTEMACE_CONTROL_REG);
-		val |= SYSTEMACE_CR_CFGRESET;
-		ace_writew((val & 0xffff), SYSTEMACE_CONTROL_REG);
-	}
-	val = ace_readw(SYSTEMACE_CONTROL_REG);
-	val |= (SYSTEMACE_CR_LOCKREQ | SYSTEMACE_CR_FORCELOCK);
-	ace_writew((val & 0xffff), SYSTEMACE_CONTROL_REG);
-#else
-	if(locked)
-		return -1;
-	val = ace_readw(SYSTEMACE_CONTROL_REG);
-	val |= SYSTEMACE_CR_LOCKREQ;
-	ace_writew((val & 0xffff), SYSTEMACE_CONTROL_REG);
-#endif
+	/* CONTROLREG = LOCKREG */
+	unsigned val = ace_readw(0x18);
+	val |= 0x0002;
+	ace_writew((val & 0xffff), 0x18);
 
 	/* Wait for MPULOCK in STATUSREG[15:0] */
-	while (!(ace_readw(SYSTEMACE_STATUS_REG) & SYSTEMACE_SR_MPULOCK)) {
+	while (!(ace_readw(0x04) & 0x0002)) {
+
 		if (retry < 0)
 			return -1;
 
@@ -130,9 +99,9 @@
 
 static void release_cf_lock(void)
 {
-	unsigned val = ace_readw(SYSTEMACE_CONTROL_REG);
-	val &= ~(SYSTEMACE_CR_LOCKREQ);
-	ace_writew((val & 0xffff), SYSTEMACE_CONTROL_REG);
+	unsigned val = ace_readw(0x18);
+	val &= ~(0x0002);
+	ace_writew((val & 0xffff), 0x18);
 }
 
 block_dev_desc_t *systemace_get_dev(int dev)
@@ -151,7 +120,7 @@
 		/*
 		 * Ensure the correct bus mode (8/16 bits) gets enabled
 		 */
-		ace_writew(CONFIG_SYS_SYSTEMACE_WIDTH == 8 ? 0x0000 : 0x0001, SYSTEMACE_BUS_MODE_REG);
+		ace_writew(CONFIG_SYS_SYSTEMACE_WIDTH == 8 ? 0 : 0x0001, 0);
 
 		init_part(&systemace_dev);
 
@@ -174,15 +143,15 @@
 	unsigned val;
 
 	if (get_cf_lock() < 0) {
-		unsigned status = ace_readw(SYSTEMACE_STATUS_REG);
+		unsigned status = ace_readw(0x04);
 
 		/* If CFDETECT is false, card is missing. */
-		if (!(status & SYSTEMACE_SR_CARD_DETECT)) {
+		if (!(status & 0x0010)) {
 			printf("** CompactFlash card not present. **\n");
 			return 0;
 		}
 
-		printf("**** ACE locked away from me (STATUSREG=0x%04x)\n",
+		printf("**** ACE locked away from me (STATUSREG=%04x)\n",
 		       status);
 		return 0;
 	}
@@ -192,17 +161,17 @@
 
 	retry = 2000;
 	for (;;) {
-		val = ace_readw(SYSTEMACE_STATUS_REG);
+		val = ace_readw(0x04);
 
 		/* If CFDETECT is false, card is missing. */
-		if (!(val & SYSTEMACE_SR_CARD_DETECT)) {
+		if (!(val & 0x0010)) {
 			printf("**** ACE CompactFlash not found.\n");
 			release_cf_lock();
 			return 0;
 		}
 
 		/* If RDYFORCMD, then we are ready to go. */
-		if (val & SYSTEMACE_SR_RDY_FOR_CMD)
+		if (val & 0x0100)
 			break;
 
 		if (retry < 0) {
@@ -230,15 +199,15 @@
 		printf("... transfer %lu sector in a chunk\n", trans);
 #endif
 		/* Write LBA block address */
-		ace_writew((start >> 0) & 0xffff, SYSTEMACE_MPU_LBA_REG_LOW);
-		ace_writew((start >> 16) & 0x0fff, SYSTEMACE_MPU_LBA_REG_HIGH);
+		ace_writew((start >> 0) & 0xffff, 0x10);
+		ace_writew((start >> 16) & 0x0fff, 0x12);
 
 		/* NOTE: in the Write Sector count below, a count of 0
 		   causes a transfer of 256, so &0xff gives the right
 		   value for whatever transfer count we want. */
 
 		/* Write sector count | ReadMemCardData. */
-		ace_writew((trans & 0xff) | SYSTEMACE_CCR_READ_CMD, SYSTEMACE_SECT_CNT_CMD_REG);
+		ace_writew((trans & 0xff) | 0x0300, 0x14);
 
 /*
  * For FPGA configuration via SystemACE is reset unacceptable
@@ -246,9 +215,9 @@
  */
 #ifndef SYSTEMACE_CONFIG_FPGA
 		/* Reset the configruation controller */
-		val = ace_readw(SYSTEMACE_CONTROL_REG);
-		val |= SYSTEMACE_CR_CFGRESET;
-		ace_writew(val, SYSTEMACE_CONTROL_REG);
+		val = ace_readw(0x18);
+		val |= 0x0080;
+		ace_writew(val, 0x18);
 #endif
 
 		retry = trans * 16;
@@ -256,13 +225,13 @@
 			int idx;
 
 			/* Wait for buffer to become ready. */
-			while (!(ace_readw(SYSTEMACE_STATUS_REG) & SYSTEMACE_SR_DATA_BUF_RDY)) {
+			while (!(ace_readw(0x04) & 0x0020)) {
 				udelay(100);
 			}
 
 			/* Read 16 words of 2bytes from the sector buffer. */
 			for (idx = 0; idx < 16; idx += 1) {
-				unsigned short val = ace_readw(SYSTEMACE_DATA_BUF);
+				unsigned short val = ace_readw(0x40);
 				*dp++ = val & 0xff;
 				*dp++ = (val >> 8) & 0xff;
 			}
@@ -271,9 +240,9 @@
 		}
 
 		/* Clear the configruation controller reset */
-		val = ace_readw(SYSTEMACE_CONTROL_REG);
-		val &= ~SYSTEMACE_CR_CFGRESET;
-		ace_writew(val, SYSTEMACE_CONTROL_REG);
+		val = ace_readw(0x18);
+		val &= ~0x0080;
+		ace_writew(val, 0x18);
 
 		/* Count the blocks we transfer this time. */
 		start += trans;
diff --git a/examples/Makefile b/examples/Makefile
index dbcfa92..19fe075 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -76,6 +76,10 @@
 endif
 endif
 
+ifeq ($(ARCH),arc)
+LOAD_ADDR = 0x80000000 -L -T arc.lds
+endif
+
 ifeq ($(ARCH),sparc)
 LOAD_ADDR = 0x00000000 -L $(gcclibdir) -T sparc.lds
 endif
diff --git a/examples/arc.lds b/examples/arc.lds
new file mode 100644
index 0000000..d5cab01
--- /dev/null
+++ b/examples/arc.lds
@@ -0,0 +1,73 @@
+/*
+ * Ruby platform.
+ *
+ * flip memmap configuration.
+ *
+ * Unfortunately passing linker script through preprocessor is not implemented,
+ * so let's hard-code all values.
+ */
+
+OUTPUT_FORMAT("elf32-littlearc", "elf32-littlearc", "elf32-littlearc")
+OUTPUT_ARCH(arc)
+
+ENTRY(hello_world)
+
+/*
+ *MEMORY
+ *{
+	*
+	 * SRAM size is 256KB.
+	 * SRAM from LHOST seen starting from 0x88000000 address.
+	 * SRAM from MuC/DSP seen starting from 0x80000000 address.
+	 * Let's reserve 64KB at the end of SRAM for stack and heap.
+	 * Please keep it synchronized with include/configs/ruby.h
+	 *
+ *	sram : ORIGIN = 0x80000000, LENGTH = 256K - 64K
+ *}
+ */
+
+SECTIONS
+{
+	.text :
+	{
+
+		*(.text)
+	}
+	. = ALIGN(4);
+
+	.rodata :
+	{
+		*(.rodata)
+		*(.rodata.str*)
+	}
+	. = ALIGN(4);
+
+	.data :
+	{
+		*(.data)
+	}
+	. = ALIGN(4);
+
+
+	__bss_start = .;
+	.bss ABSOLUTE(.) :
+	{
+		*(.bss)
+	}
+	. = ALIGN(4);
+	__bss_end = .;
+
+	.stack :
+	{
+		. += 16384;
+		*(.data)
+	}
+	.heap :
+	{
+		*(.data)
+	}
+	. = ALIGN(4);
+	uboot_end = .;
+	_end = .;
+}
+
diff --git a/examples/hello_world.c b/examples/hello_world.c
index 9317f6d..5c23526 100644
--- a/examples/hello_world.c
+++ b/examples/hello_world.c
@@ -29,7 +29,7 @@
 	int i;
 
 	/* Print the ABI version */
-	app_startup(argv);
+	//app_startup(argv);
 	printf ("Example expects ABI version %d\n", XF_VERSION);
 	printf ("Actual U-Boot ABI version %d\n", (int)get_version());
 
diff --git a/examples/stubs.c b/examples/stubs.c
index e0cf75f..f899c20 100644
--- a/examples/stubs.c
+++ b/examples/stubs.c
@@ -1,5 +1,7 @@
 #include <exports.h>
 
+#define CONFIG_ARC
+
 #ifndef GCC_VERSION
 #define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
 #endif /* GCC_VERSION */
@@ -50,7 +52,21 @@
 "	ldr	pc, [ip, %1]\n"		\
 	: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "ip");
 #elif defined(CONFIG_ARC)
-#define EXPORT_FUNC(x)
+
+/*
+ * The gd pointer is stored on pio register at 0xe00000bc
+ * first arg is pointer to jump table, second arg is offset
+ * of jump.  r10, r11 are clobbered
+ */	
+#define EXPORT_FUNC(x) \
+	asm volatile (			\
+"	.globl " #x "\n"		\
+#x ":\n"				\
+"	ld	r10,[0xe00000bc] \n"	\
+"	ld	r11,[r10,%0] \n"	\
+"	ld	r10,[r11,%1] \n"	\
+"	jal	[r10] \n"			\
+	: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)):"r10","r11");
 
 #elif defined(CONFIG_MIPS)
 /*
diff --git a/helper.mk b/helper.mk
new file mode 100644
index 0000000..751519e
--- /dev/null
+++ b/helper.mk
@@ -0,0 +1,8 @@
+
+RUBY_MINI_LDMAP_SRC = board/ruby_mini/u-boot.lds.S
+
+define build-mini-ldmap
+	@mkdir -p ${@D}
+	$(CPP) -D__ASSEMBLY__ -I../common -Iinclude $1 $< | grep -vE '^\#' > $@
+endef
+
diff --git a/include/asm-arc/arc_emac.h b/include/asm-arc/arc_emac.h
index 44fcde2..69e53a9 100644
--- a/include/asm-arc/arc_emac.h
+++ b/include/asm-arc/arc_emac.h
@@ -30,8 +30,8 @@
 #define TX_TIMEOUT (400*HZ/1000)
 
 /* Buffer descriptors */
-#define TX_BDT_LEN	16	/* Number of recieve BD's */
-#define RX_BDT_LEN	16	/* Number of transmit BD's */
+#define TX_BDT_LEN	10	/* Number of recieve BD's */
+#define RX_BDT_LEN	10	/* Number of transmit BD's */
 
 
 /* Size of RX buffers, min = 0 (pointless) max = 2048 (MAX_RX_BUFFER_LEN)
diff --git a/include/asm-arc/arch-arc/arasan_emac_ahb.h b/include/asm-arc/arch-arc/arasan_emac_ahb.h
new file mode 100755
index 0000000..8990890
--- /dev/null
+++ b/include/asm-arc/arch-arc/arasan_emac_ahb.h
@@ -0,0 +1,159 @@
+/*
+ *  include/asm-arc/arch-arc/arasan_emac_ahb.h
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2007.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * This file only defines those settings that are specific to U-Boot.
+ * All the common definitions are stored in ruby_arasan_emac_ahb.
+ *
+ */
+
+#ifndef __ASM_ARCH_ARASAN_EMAC_AHB_H
+#define __ASM_ARCH_ARASAN_EMAC_AHB_H	1
+
+#define NUM_TX_BUFS	1
+#define TX_BUF_SIZE	2048
+#define NUM_RX_BUFS	2
+#define RX_BUF_SIZE	2048
+
+#define TX_TIMEOUT_IN_TICKS (CONFIG_SYS_HZ)
+
+/* All the common defines for the Ethernet controller */
+#include <config.h>
+#include "../../../../common/ruby_arasan_emac_ahb.h"
+
+#ifndef __ASSEMBLY__
+
+/* Taken from Linux MII driver */
+#define LPA_100FULL             0x0100  /* Can do 100mbps full-duplex  */
+#define LPA_100BASE4            0x0200  /* Can do 100mbps 4k packets   */
+#define LPA_100HALF             0x0080  /* Can do 100mbps half-duplex  */
+#define LPA_10FULL              0x0040  /* Can do 10mbps full-duplex   */
+#define LPA_10HALF              0x0020  /* Can do 10mbps half-duplex   */
+#define LPA_1000FULL            0x0800  /* Link partner 1000BASE-T full duplex */
+#define LPA_1000HALF            0x0400  /* Link partner 1000BASE-T half duplex */
+
+#define ADVERTISE_10FULL        0x0040  /* Try for 10mbps full-duplex  */
+#define ADVERTISE_100FULL       0x0100  /* Try for 100mbps full-duplex */
+#define ADVERTISE_100HALF       0x0080  /* Try for 100mbps half-duplex */
+#define ADVERTISE_1000HALF      0x0100  /* Advertise 1000BASE-T half duplex */
+#define ADVERTISE_CSMA          0x0001  /* Only selector supported     */
+
+#define ADVERTISE_FULL          (ADVERTISE_100FULL | ADVERTISE_10FULL | ADVERTISE_CSMA)
+
+#define PHY_MAX_ADDR            32
+
+#define ARASAN_MDIO_BASE        RUBY_ENET0_BASE_ADDR
+
+enum DP83865PhyRegVals {
+	/* Basic mode control register */
+	PhySoftReset = (1 << 15),
+	PhyLoopback = (1 << 14),
+	PhySetSpeed1G = ((1 << 6) | (0 << 13)),
+	PhySetSpeed100M = ((0 << 6) | (1 << 13)),
+	PhySetSpeed10M = ((0 << 6) | (0 << 13)),
+	PhyAutoNegEnable = (1 << 12),
+	PhyPowerDown = (1 << 11),
+	PhyIsolate = (1 << 10),
+	PhyRestartAutoNeg = (1 << 9),
+	PhyFullDuplex = (1 << 8),
+	PhyColTest = (1 << 7),
+	/* Basic mode status register */
+	PhyAutoNegComplete = (1 << 5),
+	/* Link and AutoNegotiation register */
+	PhySpeedMask = (3 << 3),
+	PhySpeed10M = (0 << 3),
+	PhySpeed100M = (1 << 3),
+	PhySpeed1G = (2 << 3),
+	PhyLinkIsUp = (1 << 2),
+	PhyLinkIsFullDuplex = (1 << 1),
+	PhyInMasterMode = (1 << 0),
+};
+
+enum DP83865RegOffset {
+	PhyBMCR = 0,
+	PhyBMSR = 1,
+	PhyPhysID1 = 2,
+	PhyPhysID2 = 3,
+	PhyAdvertise = 4,
+	PhyLpa = 5,
+	PhyStat1000 = 10,
+};
+
+struct emac_private;
+
+struct emac_private_mdio {
+	unsigned long base;
+	uint32_t (*read)(struct emac_private *priv, uint8_t reg);
+	int (*write)(struct emac_private *priv, uint8_t reg, uint16_t value);
+};
+
+
+/*
+ * Shortened version of the equivalent Linux structure - U-Boot does not
+ * need most of the members that Linux does.
+ */
+struct emac_private {
+	int tx_ring_elements; /* = number of buffers = number of descriptors */
+	int rx_ring_elements; /* = number of buffers = number of descriptors */
+
+	u32 rx_bufs;
+	u32 tx_bufs;
+	volatile struct emac_desc *rx_descs;
+	volatile struct emac_desc *tx_descs;
+	u32 rx_buf_size;
+	u32 tx_buf_size;
+	int rx_index;
+	int tx_index;
+
+	// pointer to switch device
+	void *ar8236dev;
+
+	// board specific cfg
+	int irq;
+	int phy_addr;
+	int phy_flags;
+	int emac;
+	unsigned long io_base;
+	struct emac_private_mdio *mdio;
+	struct eth_device * parent;
+};
+
+struct br_private {
+	struct emac_private * emacs[2];
+	uint8_t nemacs;
+	uint8_t dev_state;
+	uint8_t send_mask;
+	uint32_t phy_addr_mask;
+};
+
+void mdio_postrd_raw(unsigned long base, int phy, int reg);
+int mdio_postwr_raw(unsigned long base, int phy, int reg, u16 val);
+u32 mdio_rdval_raw(unsigned long base, int wait);
+
+#define MDIO_READ_FAIL		((uint32_t) -1)
+
+static inline int mdio_read_failed(uint32_t val)
+{
+	return val == MDIO_READ_FAIL;
+}
+
+#endif /* __ASSEMBLY__ */
+
+#endif
diff --git a/include/asm-arc/arch-arc/platform.h b/include/asm-arc/arch-arc/platform.h
new file mode 100755
index 0000000..f2506fc
--- /dev/null
+++ b/include/asm-arc/arch-arc/platform.h
@@ -0,0 +1,43 @@
+/*
+ *  include/asm-arc/arch-arc/platform.h
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2007.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * This file holds only U-Boot specific platform definitions.
+ * Definitions that are common to Linux and U-Boot are held
+ * in common/ruby_platform.h.
+ */
+
+#ifndef __INCLUDE_ASM_ARCH_PLATFORM_H
+#define __INCLUDE_ASM_ARCH_PLATFORM_H
+
+/* Dummy architecture number */
+
+#ifndef MACH_TYPE_UMS
+	#define MACH_TYPE_UMS (0x4d3)
+#endif
+
+#include "ruby_platform.h"
+
+#ifndef __ASSEMBLY__
+void io_copy_from(void *dst, void *src, int nbytes);
+void io_copy_to(void *dst, void *src, int nbytes);
+#endif
+
+#endif
+
diff --git a/include/asm-arc/arcregs.h b/include/asm-arc/arcregs.h
index 51c6c0d..26eb39b 100644
--- a/include/asm-arc/arcregs.h
+++ b/include/asm-arc/arcregs.h
@@ -23,32 +23,70 @@
 #define	STATUS_E2_MASK			0x04		/* Mask for Interrupt 2 enable */
 #define STATUS_DISABLE_INTERRUPTS	0xFFFFFFF9	/* Mask to disable Interrupts  */
 
-
 /* Auxiliary register values	*/
-#define ARC_REG_STATUS32	0x00A	/* status 32 register */
-#define ARC_REG_TIMER0_CNT      0x021	/* timer 0 count */
-#define ARC_REG_TIMER0_CTRL	0x022	/* timer 0 control */
-#define ARC_REG_TIMER0_LIMIT	0x023	/* timer 0 limit */
-#define ARC_REG_INT_VEC_BASE	0x025	/* interrupt vector base
-					 * address */
-#define ARC_REG_TIMER1_CNT      0x100	/* timer 1 count */
-#define ARC_REG_TIMER1_CTRL	0x101	/* timer 1 control */
-#define ARC_REG_TIMER1_LIMIT	0x102	/* timer 1 limit */
+#define ARC_REG_STATUS32	0x0A /* status 32 register */ 		
+#define ARC_REG_TIMER0_LIMIT	0x23 /* timer 0 limit */
+#define ARC_REG_TIMER0_CTRL	0x22 /* timer 0 control */
+#define ARC_REG_TIMER0_CNT   0x21 /* timer 0 count */
+#define ARC_REG_PC		0x06 /* program counter */
+
+/* MMU related Auxiliary registers */
+#define ARC_REG_DATA_UNCACHED	0x6A
+#define ARC_REG_TLBPD0		0x405
+#define ARC_REG_TLBPD1		0x406
+#define ARC_REG_TLBINDEX	0x407
+#define ARC_REG_TLBCOMMAND	0x408
+#define ARC_REG_PID		0x409
+#define SCRATCH_DATA0		0x418
+
+/* Timer related Aux registers */
+#define ARC_REG_TIMER0_LIMIT 0x23 /* timer 0 limit */
+#define ARC_REG_TIMER0_CTRL  0x22 /* timer 0 control */
+#define ARC_REG_TIMER0_CNT   0x21 /* timer 0 count */
+#define ARC_REG_TIMER1_LIMIT 0x102 /* timer 1 limit */
+#define ARC_REG_TIMER1_CTRL  0x101 /* timer 1 control */
+#define ARC_REG_TIMER1_CNT   0x100 /* timer 1 count */
+
+#define TIMER_CTRL_IE    (1 << 0)    /* Interupt when Count reachs limit */
+#define TIMER_CTRL_NH    (1 << 1)    /* Count only when CPU NOT halted */
+
+/* Interrupt related Auxilliary registers */
+#define ARC_REG_INTR_VEC_BASE		0x25
+#define ARC_REG_INTR_ENABLE		0x40c
 
 /* Instruction cache related Auxiliary registers */
-#define ARC_REG_I_CACHE_BUILD_REG 0x77
-#define ARC_REG_IC_IVIC		0x10
-#define ARC_REG_IC_CTRL		0x11
-#define ARC_REG_IC_IVIL     0x19
-/* Data cache related Auxiliary registers */
-#define ARC_REG_D_CACHE_BUILD_REG 0x72
-#define ARC_REG_DC_IVDC		0x47
-#define ARC_REG_DC_CTRL		0x48
-#define ARC_REG_DC_IVDL     0x4A
-#define ARC_REG_DC_FLSH     0x4B
-#define ARC_REG_DC_FLDL     0x4C
+#define ARC_REG_IC_BUILD_REG		0x77
+#define ARC_REG_IC_IVIC			0x10
+#define ARC_REG_IC_CTRL			0x11
+#define ARC_REG_IC_IVIL			0x19
+#if (PLATFORM_ARC7_MMU_VER >= 3)
+	#define ARC_REG_IC_PTAG		0x1E
+#endif
 
-#define IM_SET_DC_CTRL 		0x40
+/* Data cache related Auxiliary registers */
+#define ARC_REG_DC_BUILD_REG		0x72
+#define ARC_REG_DC_IVDC			0x47
+#define ARC_REG_DC_CTRL			0x48
+#define ARC_REG_DC_IVDL			0x4A
+#define ARC_REG_DC_FLSH			0x4B
+#define ARC_REG_DC_FLDL			0x4C
+#if (PLATFORM_ARC7_MMU_VER >= 3)
+	#define ARC_REG_DC_PTAG		0x5C
+#endif
+
+/* ARC_REG_DC_CTRL fields */
+#define ARC_INV_MODE_FLUSH		0x40
+#define ARC_DC_FLUSH_STATUS_BIT		0x100
+#define ARC_DC_DISABLE			0x01
+
+/* ARC_REG_IC_CTRL fields */
+#define ARC_IC_DISABLE			0x01
+
+/* Cache Line lengths fixed to 32 bytes */
+#define L1_CACHE_SHIFT		5
+#define L1_CACHE_BYTES		(1 << L1_CACHE_SHIFT)
+#define ARC_ICACHE_LINE_LEN	L1_CACHE_BYTES
+#define ARC_DCACHE_LINE_LEN	L1_CACHE_BYTES
 
 
 /* Inline macros for reading, writing into auxiliary registers	*/
@@ -71,3 +109,4 @@
 #endif	/* __ASSEMBLY__ */
 
 #endif	/* _ASM_ARC_ARCDEFS_H */
+
diff --git a/include/asm-arc/cache.h b/include/asm-arc/cache.h
new file mode 100644
index 0000000..0a1ec2b
--- /dev/null
+++ b/include/asm-arc/cache.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright Codito Technologies (www.codito.com)  
+ *
+ *  include/asm-arc/arcregs.h
+ *
+ *  Copyright (C) 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Authors: Sandeep Patil (sandeep.patil@codito.com)
+ * 			Pradeep Sawlani (pradeep.sawlani@codito.com)
+ * Auxiliary register definitions and macros to read and write to them. 
+ */
+
+#ifndef	_ASM_ARC_CACHE_H
+#define	_ASM_ARC_CACHE_H
+
+#ifndef	__ASSEMBLY__
+
+void invalidate_icache_all(void);
+void invalidate_icache_range(unsigned long start, unsigned long stop);
+void flush_and_inv_dcache_all(void);
+void invalidate_dcache_range(unsigned long start, unsigned long stop);
+void flush_and_inv_dcache_range(unsigned long start, unsigned long stop);
+void flush_dcache_range(unsigned long start, unsigned long stop);
+void dcache_disable(void);
+void icache_disable(void);
+void dcache_enable(void);
+void icache_enable(void);
+int dcache_status(void);
+int icache_status(void);
+void flush_cache(unsigned long start, unsigned long stop);
+
+#endif	/* __ASSEMBLY__ */
+
+#endif	/* _ASM_ARC_CACHE_H */
+
diff --git a/include/asm-arc/global_data.h b/include/asm-arc/global_data.h
index cc61df1..f02c7ca 100644
--- a/include/asm-arc/global_data.h
+++ b/include/asm-arc/global_data.h
@@ -15,6 +15,7 @@
 
 #ifndef	__ASM_GBL_DATA_H
 #define __ASM_GBL_DATA_H
+
 #include<asm/u-boot.h> 
 
 typedef	struct	 {
@@ -23,21 +24,16 @@
 	
 	unsigned long	baudrate;
 	unsigned long	have_console;	/* serial_init() was called */
-	
+
 	unsigned long	reloc_off;	/* Relocation Offset */
 
 	unsigned long	env_addr;	/* Address  of Environment struct */
 	unsigned long	env_valid;	/* Checksum of Environment valid? */
+	unsigned long   file_area_base; /* Base address of config files area */
+
 	unsigned long	cpu_clk;	/* CPU clock in Hz!		*/
-	unsigned long	fb_base;	/* base address of frame buffer */
-#ifdef CONFIG_VFD
-	unsigned char	vfd_type;	/* display type */
-#endif	
-#if 0
-	unsigned long	bus_clk;
-	unsigned long	ram_size;	/* RAM size */
-	unsigned long	reset_status;	/* reset status register at boot */
-#endif
+	unsigned long	bus_clk;	/* Bus clock in Hz!		*/
+
 	void		**jt;		/* jump table */
 } gd_t;
 extern gd_t *global_data;
@@ -52,3 +48,4 @@
 #define DECLARE_GLOBAL_DATA_PTR      extern gd_t *gd  /* defined in lib_arc/board.c */ 
 
 #endif /* __ASM_GBL_DATA_H */
+
diff --git a/include/asm-arc/io.h b/include/asm-arc/io.h
index afa310b..ddc7623 100644
--- a/include/asm-arc/io.h
+++ b/include/asm-arc/io.h
@@ -24,13 +24,32 @@
 #ifndef _ASM_ARC_IO_H
 #define _ASM_ARC_IO_H
 
-#define __raw_readb(addr)       (*(volatile unsigned char *)(addr))
-#define __raw_readw(addr)       (*(volatile unsigned short *)(addr))
-#define __raw_readl(addr)       (*(volatile unsigned int *)(addr))
+#define __raw_readb(addr) \
+	({ unsigned int __ret; \
+		__asm__ __volatile__("ldb.di %0, [%1]" : "=r"(__ret) : "r"(addr) );\
+		__ret; \
+	})
 
-#define __raw_writeb(b,addr) ((*(volatile unsigned char *)(addr)) = (b))
-#define __raw_writew(w,addr) ((*(volatile unsigned short *)(addr)) = (w))
-#define __raw_writel(l,addr) ((*(volatile unsigned int *)(addr)) = (l))
+#define __raw_readw(addr) \
+	({ unsigned int __ret; \
+		__asm__ __volatile__("ldw.di %0, [%1]" : "=r"(__ret) : "r"(addr) );\
+		__ret; \
+	})
+
+#define __raw_readl(addr) \
+	({ unsigned int __ret; \
+		__asm__ __volatile__("ld.di %0, [%1]" : "=r"(__ret) : "r"(addr) );\
+		__ret; \
+	})
+
+#define __raw_writeb(b, addr) \
+	__asm__ __volatile__("stb.di %0, [%1]" : : "r"(b),"r"(addr) );
+
+#define __raw_writew(w, addr) \
+	__asm__ __volatile__("stw.di %0, [%1]" : : "r"(w),"r"(addr) );
+
+#define __raw_writel(l, addr) \
+	__asm__ __volatile__("st.di %0, [%1]" : : "r"(l),"r"(addr) );
 
 /* These can't be used, because they don't make any sense like this - PS */
 #define memset_io(a,b,c)        memset((void *)(a),(b),(c))
@@ -110,8 +129,8 @@
 /*
  * Generic virtual read/write
  */
-#define __arch_getw(a)          (*(volatile unsigned short *)(a))
-#define __arch_putw(v,a)        (*(volatile unsigned short *)(a) = (v))
+#define __arch_getw(a)          __raw_getw(a)
+#define __arch_putw(v,a)        __raw_putw(v,a)
 
 #define iomem_valid_addr(iomem,sz)      (1)
 #define iomem_to_phys(iomem)            (iomem)
@@ -148,42 +167,15 @@
 #define insw_p(port,to,len)             insw(port,to,len)
 #define insl_p(port,to,len)             insl(port,to,len)
 
-#define readb(addr) (*(volatile unsigned char *) (addr))
-#define readw(addr) (*(volatile unsigned short *) (addr))
-#define readl(addr) (*(volatile unsigned int *) (addr))
-#define writeb(b,addr) (*(volatile unsigned char *) (addr) = (b))
-#define writew(b,addr) (*(volatile unsigned short *) (addr) = (b))
-#define writel(b,addr) (*(volatile unsigned int *) (addr) = (b))
+#define readb(addr) __raw_readb(addr)
+#define readw(addr) __raw_readw(addr)
+#define readl(addr) __raw_readl(addr)
+#define writeb(b,addr) __raw_writeb(b,addr)
+#define writew(w,addr) __raw_writew(w,addr)
+#define writel(l,addr) __raw_writel(l,addr)
 
-extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag);
-extern void *ioremap(unsigned long physaddr, unsigned long size);
-extern void *ioremap_nocache(unsigned long physaddr, unsigned long size);
-extern void __iounmap(void *addr, unsigned long size);
-extern void iounmap(void *addr);
+#define virt_to_phys(x) ((unsigned long)(x))
+#define phys_to_virt(x) ((void*)(x))
 
-/*
- * IO bus memory addresses are also 1:1 with the physical address
- */
-#define virt_to_bus virt_to_phys
-#define bus_to_virt phys_to_virt
-
-
-/* Written to pacify arch indepeandant code.
- * Not used by ARC I/O
- */
-
-/* #define inb(x) 0 */
-/* #define outb(x,y) do { } while(0) */
-
-#define _inb inb
-#define _outb outb
-
-#define IO_SPACE_LIMIT	0xffff
-
-#define IOMAP_FULL_CACHING		0
-#define IOMAP_NOCACHE_SER		1
-#define IOMAP_NOCACHE_NONSER		2
-#define IOMAP_WRITETHROUGH		3
-
-#endif	/* _ASM_ARC_IO_H */
+#endif /* _ASM_ARC_IO_H */
 
diff --git a/include/asm-arc/serial.h b/include/asm-arc/serial.h
index 3ff9f3a..71f6687 100644
--- a/include/asm-arc/serial.h
+++ b/include/asm-arc/serial.h
@@ -1,16 +1,16 @@
 /*
- * Copyright Codito Technologies (www.codito.com)
+ * Copyright Codito Technologies (www.codito.com) 
  *
  *  include/asm-arc/serial.h
  *
- *  Copyright (C)
+ *  Copyright (C) 
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
- *
+ * 
  * Authors : Sandeep Patil (sandeep.patil@codito.com)
- *           Pradeep Sawlani (pradeep.sawlani@codito.com)
+ * 			 Pradeep Sawlani (pradeep.sawlani@codito.com)
  */
 
 #ifndef	_ASM_ARC_SERIAL_H
@@ -19,31 +19,28 @@
 #include <config.h>
 
 typedef volatile struct {
-	volatile unsigned char id0 __attribute__((aligned(4)));
-	volatile unsigned char id1 __attribute__((aligned(4)));
-	volatile unsigned char id2 __attribute__((aligned(4)));
-	volatile unsigned char id3 __attribute__((aligned(4)));
-	volatile unsigned char data __attribute__((aligned(4)));
-	volatile unsigned char status __attribute__((aligned(4)));
-	volatile unsigned char baudl __attribute__((aligned(4)));
-	volatile unsigned char baudh __attribute__((aligned(4)));
-} arc_uart;
+  volatile int id0;
+  volatile int id1;
+  volatile int id2;
+  volatile int id3;
+  volatile int data;
+  volatile int status;
+  volatile int baudl;
+  volatile int baudh;
+} aa3_uart __attribute__((packed));
 
-/*
+/* 
  * Define the number of ports supported and their irqs.
  */
 #define NR_PORTS 1
 
-#define	CONSOLE_BAUD_RATE CONFIG_ARC_SERIAL_BAUD
+#define UART_RXENB	0x04
+#define UART_RXEMPTY	0x20
+#define UART_FRAME_ERR	0x01
+#define UART_OVERFLOW_ERR  0x02
 
-
-#define UART_RXENB		0x04
-#define UART_RXEMPTY		0x20
-#define UART_FRAME_ERR		0x01
-#define UART_OVERFLOW_ERR	0x02
-
-#define UART_TXENB		0x40
-#define UART_TXEMPTY		0x80
+#define UART_TXENB      0x40
+#define UART_TXEMPTY   0x80
 
 /* UART control registers */
 #define ARC_UART_CREG_DATATX	UART_BASEADDR + 0x4
diff --git a/include/asm-arc/setup.h b/include/asm-arc/setup.h
index 79e86a2..6a36e72 100755
--- a/include/asm-arc/setup.h
+++ b/include/asm-arc/setup.h
@@ -113,6 +113,17 @@
 	char	cmdline[1];	/* this is the minimum size */
 };
 
+/* Quantenna hw_config_id */
+#define ATAG_HW_CONFIG_ID	0x54410100
+struct tag_hwid {
+	uint32_t hwid;
+};
+
+/* Quantenna spi flash protected mode */
+#define ATAG_SPI_FLASH_PROTECT_MODE	0x5441000A
+struct tag_spiflash {
+	uint32_t spi_flash_protect_mode;
+};
 
 struct tag {
 	struct tag_header hdr;
@@ -122,11 +133,12 @@
 		struct tag_ramdisk	ramdisk;
 		struct tag_initrd	initrd;
 		struct tag_cmdline	cmdline;
-	        struct tag_cache        cache;
-                struct tag_clk_speed    clk_speed;
- 	        struct tag_serial       serial;
-	        struct tag_vmac         vmac;
-
+		struct tag_cache        cache;
+		struct tag_clk_speed    clk_speed;
+		struct tag_serial       serial;
+		struct tag_vmac         vmac;
+		struct tag_hwid		hwid;
+		struct tag_spiflash	spi_flash_protect_mode;
 	} u;
 };
 
diff --git a/include/asm-arc/u-boot.h b/include/asm-arc/u-boot.h
index 8d634b4..8974f8c 100644
--- a/include/asm-arc/u-boot.h
+++ b/include/asm-arc/u-boot.h
@@ -22,28 +22,13 @@
 
 
 typedef struct bd_info {
-#if 1	
-	unsigned long	bi_memstart;	/* start of DRAM memory */
 	unsigned long	bi_memsize;	/* size	 of DRAM memory in bytes */
-	unsigned long	bi_flashstart;	/* start of FLASH memory */
-	unsigned long	bi_flashsize;	/* size	 of FLASH memory */
-	unsigned long	bi_flashoffset; /* reserved area for startup monitor */
-	unsigned long	bi_sramstart;	/* start of SRAM memory */
-	unsigned long	bi_sramsize;	/* size	 of SRAM memory */
-	unsigned long	bi_bootflags;	/* boot / reboot flag (for LynxOS) */
 	unsigned long	bi_ip_addr;	/* IP Address */
+	unsigned long	bi_boot_params;	/* ATAG parameters address */
 	unsigned char	bi_enetaddr[6];	/* Ethernet adress */
-	unsigned short	bi_ethspeed;	/* Ethernet speed in Mbps */
-	unsigned long	bi_intfreq;	/* Internal Freq, in MHz */
-	unsigned long	bi_busfreq;	/* Bus Freq, in MHz */
-	unsigned long	bi_baudrate;	/* Console Baudrate */
- 	ulong               bi_boot_params; /* where this board expects params */
-#endif
-//  unsigned long	bi_ip_addr;	/* IP Address */
-//  unsigned char	bi_enetaddr[6];	/* Ethernet adress */
-//  unsigned long bi_boot_params;
-		
+	int		bi_board_id;	/* board id for hw config */
 } bd_t;
 
 #endif /* __ASSEMBLY__ */
 #endif	/* __U_BOOT_H__ */
+
diff --git a/include/asm-arc/uboot-arc.h b/include/asm-arc/uboot-arc.h
index f4ab5d3..49ad44e 100644
--- a/include/asm-arc/uboot-arc.h
+++ b/include/asm-arc/uboot-arc.h
@@ -17,15 +17,6 @@
 
 #ifndef _U_BOOT_ARC_H_
 #define _U_BOOT_ARC_H_  1
-extern ulong _arcboot_start;	/* code start */
-extern ulong _bss_start;	/* bss start	*/
-extern ulong _bss_end;		/* bss end	*/
-extern ulong __bss_start;
-extern ulong __bss_end;
-extern ulong __vector_start;	/* interrupt vector start */
-extern ulong __vector_end;	/* interrupt vector end */
-extern ulong __data_start;	/* data segment start */
-extern ulong __data_end;         /* data segment end */
-int     cpu_init(void);
-extern unsigned round_page(unsigned x);
+int	cpu_init(void);
+int	cleanup_before_linux(void);
 #endif /* _U_BOOT_ARC_H_ */
diff --git a/include/common.h b/include/common.h
index 30fff7d..a88baf0 100644
--- a/include/common.h
+++ b/include/common.h
@@ -32,6 +32,7 @@
 typedef volatile unsigned short vu_short;
 typedef volatile unsigned char	vu_char;
 
+#include "ruby_platform.h"
 #include <config.h>
 #include <linux/bitops.h>
 #include <linux/types.h>
@@ -246,13 +247,13 @@
 int	env_init     (void);
 void	env_relocate (void);
 int	envmatch     (uchar *, int);
-char	*getenv	     (char *);
-int	getenv_r     (char *name, char *buf, unsigned len);
+char	*getenv	     (const char *);
+int	getenv_r     (const char *name, char *buf, unsigned len);
 int	saveenv	     (void);
 #ifdef CONFIG_PPC		/* ARM version to be fixed! */
 int inline setenv   (char *, char *);
 #else
-int	setenv	     (char *, char *);
+int	setenv	     (const char *, const char *);
 #ifdef CONFIG_HAS_UID
 void	forceenv     (char *, char *);
 #endif
@@ -589,10 +590,11 @@
 ulong	video_setmem (ulong);
 
 /* lib_$(ARCH)/cache.c */
-void	flush_cache   (unsigned long, unsigned long);
+void	flush_cache(unsigned long, unsigned long);
 void	flush_dcache_range(unsigned long start, unsigned long stop);
+void	flush_and_inv_dcache_range(unsigned long start, unsigned long stop);
 void	invalidate_dcache_range(unsigned long start, unsigned long stop);
-
+void	invalidate_icache_range(unsigned long start, unsigned long stop);
 
 /* lib_$(ARCH)/ticks.S */
 unsigned long long get_ticks(void);
diff --git a/include/configs/arcangel_arc700_ram.h b/include/configs/arcangel_arc700_ram.h
index c9b4fc8..b18fc8c 100644
--- a/include/configs/arcangel_arc700_ram.h
+++ b/include/configs/arcangel_arc700_ram.h
@@ -18,8 +18,6 @@
 
 #include <config_cmd_default.h>
 
-#define CONFIG_ARC_AA4_BOARD 1
-
 #undef CONFIG_IDE_PREINIT
 #define CONFIG_CMD_IDE
 #define CONFIG_CMD_EXT2
@@ -41,7 +39,6 @@
 #define CONFIG_CRC32_VERIFY
 #define CONFIG_SHOW_BOOT_PROGRESS
 
-#define CONFIG_ELF_GUARD
 
 // Timeouts
 
@@ -92,7 +89,7 @@
 /*
  *  Serial configuartion
  */
-#define CONFIG_ARC_SERIAL_BAUD		115200		/* Baudrate for serial port */
+#define CONFIG_ARC_SERIAL_BAUD		57600		/* Baudrate for serial port */
 
 
 /*
@@ -118,7 +115,7 @@
 
 	#define PHYS_SDRAM_1_SIZE   0x400000 		/* 4 MB for arc 700*/
 	#define UART_BASEADDR 		0xC0FC1000
-	#define VMAC_REG_BASEADDR 	((volatile unsigned int *)0xC0FC2000)
+	#define VMAC_REG_BASEADDR 	0xC0FC2000
 #endif
 
 
diff --git a/include/configs/ml50x_arc600.h b/include/configs/ml50x_arc600.h
deleted file mode 100644
index 85648ba..0000000
--- a/include/configs/ml50x_arc600.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright Codito Technologies (www.codito.com)
- *
- *  include/configs/aa3.h
- *
- *  Copyright (C)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Authors : Sandeep Patil (sandeep.patil@codito.com)
- *           Pradeep Sawlani (pradeep.sawlani@codito.com)
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-#define CONFIG_ARC              1       /* This is an ARC cpu */
-#define CONFIG_ARC_ML50X_BOARD  1
-
-#define CONFIG_SYS_NO_FLASH
-
-#include <config_cmd_default.h>
-/* disable some default commands to decrease size */
-#undef  CONFIG_CMD_BDI		/* bdinfo			*/
-#undef  CONFIG_CMD_BOOTD	/* bootd			*/
-#undef  CONFIG_CMD_CONSOLE	/* coninfo			*/
-#undef  CONFIG_CMD_ECHO		/* echo arguments		*/
-#undef  CONFIG_CMD_SAVEENV	/* saveenv			*/
-#undef  CONFIG_CMD_FLASH	/* flinfo, erase, protect	*/
-#undef  CONFIG_CMD_IMI		/* iminfo			*/
-#undef  CONFIG_CMD_ITEST	/* Integer (and string) test	*/
-#undef  CONFIG_CMD_LOADB	/* loadb			*/
-#undef  CONFIG_CMD_LOADS	/* loads			*/
-#undef  CONFIG_CMD_MEMORY	/* md mm nm mw cp cmp crc base loop mtest */
-#undef  CONFIG_CMD_MISC		/* Misc functions like sleep etc*/
-#undef  CONFIG_CMD_NET          /* bootp, tftpboot, rarpboot	*/
-#undef  CONFIG_CMD_NFS		/* NFS support			*/
-#undef  CONFIG_CMD_RUN		/* run command in env variable	*/
-#undef  CONFIG_CMD_SOURCE	/* "source" command support	*/
-#undef  CONFIG_CMD_XIMG		/* Load part of Multi Image	*/
-
-#define CONFIG_CMD_ELF
-#define CONFIG_ELF_GUARD
-#define CONFIG_BOOTMQX
-#define CONFIG_CMD_FAT
-
-#define CONFIG_DOS_PARTITION
-#undef  CONFIG_SYS_LONGHELP
-#define CONFIG_CRC32_VERIFY
-#define CONFIG_SHOW_BOOT_PROGRESS
-
-/* System ACE controller configuration */
-#define CONFIG_SYSTEMACE
-#define CONFIG_SYS_SYSTEMACE_BASE       (ARC_CPU_PERIPHERAL_BASE + 0x8000)
-#define CONFIG_SYS_SYSTEMACE_WIDTH      16
-#define SYSTEMACE_FORCE_LOCK            0
-
-/* Serial port configuartion */
-#define CONFIG_ARC_SERIAL_BAUD		115200
-#define UART_BASEADDR                   (ARC_CPU_PERIPHERAL_BASE + 0x1000)
-
-#if 0
-/* Doesn't work because there are some BCVI bridge troubles */
-/* XEMACS configuration */
-#define CONFIG_XILINX_EMAC
-#define XILINX_EMAC_BASEADDR            (ARC_CPU_PERIPHERAL_BASE + 0x2000)
-#define CONFIG_HOSTNAME                 ml50x_board
-#define CONFIG_ETHADDR                  00:01:02:03:04:80	/* Ethernet address */
-#define CONFIG_IPADDR                   192.168.100.99		/* Our ip address */
-#define CONFIG_SERVERIP                 192.168.100.1		/* Tftp server ip address */
-#define CONFIG_NETMASK                  255.255.255.0
-
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_MII
-
-#endif
-
-#define CONFIG_BOOTDELAY                5
-#define CONFIG_BOOTCOMMAND              "fatload ace 0:0 ${loadaddr} app.elf; bootmqx"
-
-/*
- *  Size of malloc pool
- */
-#define CONFIG_SYS_MALLOC_LEN		0x8000 /* Malloc size = 32k */
-
-/*
- *  Physical memory map
- */
-
-/*This clock speed is for u-boot */
-#define CONFIG_ARC_CLK			70000000   /* 70MHz default clock speed */
-#define CONFIG_NR_DRAM_BANKS            1          /* We have 1 bank of DRAM */
-#define PHYS_SDRAM_1                    0x00000000 /* SDRAM Bank #1 */
-#define PHYS_SDRAM_1_SIZE               0x200000
-
-/*
- *  Environment variables
- */
-#define CONFIG_AUTO_COMPLETE		1			/* Auto complete commands */
-
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_HZ                   CONFIG_ARC_CLK
-#define CONFIG_SYS_PROMPT               "ML50X # "
-#define CONFIG_SYS_CBSIZE               256                                                     /* Size of console buffer */
-#define CONFIG_SYS_PBSIZE               (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)	/* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS              16                                                      /* Max number of command args   */
-#define CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE                                       /* Boot Argument Buffer Size    */
-#define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR						/* Default load address	for bootm command */ 
-#define CONFIG_SYS_BAUDRATE_TABLE       { 9600, 19200, 38400, 57600, 115200 }
-#define CONFIG_SYS_MEMTEST_START        0x200                                                   /* Exception table starts at 0x0 */ /* memtest works on */
-#define CONFIG_SYS_MEMTEST_END          (PHYS_SDRAM_1_SIZE - (350 << 10) /* code + stack area */ - (CONFIG_SYS_MALLOC_LEN << 10)/* malloc area */ )/* size of memory (not accurate)*/
-
-#define CONFIG_ENV_SIZE                 512
-#define CONFIG_SYS_ENV_SIZE             512
-#define CONFIG_ENV_IS_NOWHERE           1
-#define CONFIG_SYS_KERN_PARM            0
-
-#endif /* __CONFIG_H */
diff --git a/include/configs/ruby.h b/include/configs/ruby.h
new file mode 100644
index 0000000..882682c
--- /dev/null
+++ b/include/configs/ruby.h
@@ -0,0 +1,214 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
+#ifndef __RUBY_UBOOT_CONFIG_H
+#define __RUBY_UBOOT_CONFIG_H
+
+#include "common_mem.h"
+#include "ruby_partitions.h"
+
+/* generic define for RUBY */
+#define CONFIG_RUBY_BOARD
+
+/* Commands */
+#define CONFIG_CMD_CONSOLE
+#define CONFIG_CMD_ECHO
+#define CONFIG_CMD_MEMORY
+#define CONFIG_CMD_MISC
+#define CONFIG_CMD_RUN
+#define CONFIG_CMD_LOADB
+#define CONFIG_CMD_CACHE
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PING
+#undef	CONFIG_CMD_ETHLOOP
+#undef	CONFIG_CMD_UC
+#define CONFIG_CMD_INTR
+#define CONFIG_CMD_SAVEENV
+#define CONFIG_CMD_IMI
+#define CONFIG_CMD_BOOTD
+#undef	CONFIG_CMD_POST
+#define CONFIG_CMD_QMEMTEST
+
+/* decompression algorithms compressed images */
+//#define CONFIG_BZIP2	// doesn't work with -Os
+#define CONFIG_LZMA
+
+/* We have these optimized functions */
+#define __HAVE_ARCH_MEMSET
+#define __HAVE_ARCH_MEMCPY
+#define __HAVE_ARCH_MEMCMP
+
+/* No flash support */
+#define CONFIG_SYS_NO_FLASH
+
+/* Enable verbose boot */
+#define CONFIG_SHOW_BOOT_PROGRESS
+
+/* Delay before boot. */
+#define CONFIG_BOOTDELAY		2
+
+/*
+ * U-Boot full is now encapsulated within a decompressing piggy.
+ * u-boot-piggy loads at sram + 0x0, jumped to from the bootrom.
+ * In the bootloader stage1 (piggy), the start of sram is text, data, bss,
+ * with the piggy stack at the end of sram.
+ * u-boot-piggy will decompress u-boot-full into the stage2 offset, since
+ * the piggy cannot overwrite it's own text or data during decompression.
+ * Once decompressed, piggy will jump to u-boot full. U-boot full will use
+ * the sram previously occupied by the piggy text/data/bss as stack + heap.
+ *
+ * Piggy: SRAM: [text, data, bss, <--gap-->, stack, muc_stack, crumbs, <--gap-->]
+ * Decompresses u-boot-full into second gap right after muc_stack and crumbs, jumps to gap.
+ * Full:  SRAM: [heap, stack, <--unused-->, muc_stack, crumbs, text, data, bss]
+ */
+#define CONFIG_ARC_STAGE2_OFFSET	(4 * RUBY_SRAM_BANK_SIZE)
+
+#define CONFIG_ARC_UBOOT_BEGIN		RUBY_SRAM_BEGIN
+#define CONFIG_ARC_TEXT_OFFSET		CONFIG_ARC_STAGE2_OFFSET
+#define CONFIG_ARC_TEXT_BEGIN		(CONFIG_ARC_UBOOT_BEGIN + CONFIG_ARC_TEXT_OFFSET)
+#define CONFIG_ARC_TEXT_SIZE		(RUBY_SRAM_SIZE - CONFIG_ARC_TEXT_OFFSET)
+#define CONFIG_ARC_TEXT_END		(CONFIG_ARC_TEXT_BEGIN + CONFIG_ARC_TEXT_SIZE)
+#define CONFIG_ARC_STACK_SIZE           (8*1024)
+
+#ifdef FLASH_SUPPORT_256KB
+	#define CONFIG_ARC_STACK_BEGIN          \
+		(CONFIG_ARC_UBOOT_BEGIN + (CONFIG_ARC_MUC_STACK_OFFSET_UBOOT - CONFIG_ARC_MUC_STACK_SIZE) - RUBY_STACK_INIT_OFFSET)
+	#define CONFIG_ARC_HEAP_SIZE	((CONFIG_ARC_MUC_STACK_OFFSET_UBOOT - CONFIG_ARC_MUC_STACK_SIZE) - CONFIG_ARC_STACK_SIZE)
+#else
+	#define CONFIG_ARC_STACK_BEGIN		\
+		(CONFIG_ARC_UBOOT_BEGIN + RUBY_UBOOT_PIGGY_MAX_SIZE - RUBY_STACK_INIT_OFFSET)
+	#define CONFIG_ARC_HEAP_SIZE	(RUBY_UBOOT_PIGGY_MAX_SIZE - CONFIG_ARC_STACK_SIZE)
+#endif
+
+#define CONFIG_ARC_HEAP_BEGIN		CONFIG_ARC_UBOOT_BEGIN
+#if CONFIG_ARC_HEAP_SIZE + CONFIG_ARC_STACK_SIZE > RUBY_SRAM_SIZE - CONFIG_ARC_TEXT_SIZE
+	#error "Too big heap and stack!"
+#endif
+#define CONFIG_ARC_FREE_BEGIN		RUBY_DRAM_BEGIN
+#define CONFIG_ARC_FREE_END		(RUBY_DRAM_BEGIN + RUBY_MIN_DRAM_SIZE)
+#define CONFIG_SYS_MALLOC_LEN		CONFIG_ARC_HEAP_SIZE
+
+#define TEXT_BASE			CONFIG_ARC_TEXT_BEGIN
+
+/* Default load address */
+#define CONFIG_SYS_LOAD_ADDR		RUBY_KERNEL_LOAD_DRAM_BEGIN	/* Default load address for bootm command */
+
+/* Memory test */
+#define CONFIG_SYS_MEMTEST_START	CONFIG_ARC_FREE_BEGIN
+#define CONFIG_SYS_MEMTEST_END		CONFIG_ARC_FREE_END
+
+/* Misc parameters */
+#define CONFIG_SYS_HZ			1000
+#define CONFIG_SYS_BAUDRATE_TABLE	{ RUBY_SERIAL_BAUD }
+#define CONFIG_BAUD_RATE		RUBY_SERIAL_BAUD
+
+/* Console */
+#define CONFIG_SYS_MAXARGS		16 /* Max number of command args */
+#define CONFIG_SYS_PROMPT		"topaz>"
+#define CONFIG_SYS_CBSIZE		256 /* Size of console buffer */
+#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* Print Buffer Size */
+
+/* Environment */
+#define	CONFIG_ENV_IS_IN_SPI_FLASH	1
+#define CONFIG_ENV_SIZE			BOOT_CFG_SIZE
+#define CONFIG_ENV_BASE_SIZE		BOOT_CFG_BASE_SIZE
+#define	CONFIG_ENV_OVERWRITE
+
+/* pass bootargs through to linux kernel using a tag */
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_ATAGS_MAX_SIZE		512
+
+/* Carrier ID */
+#define CONFIG_CARRIER_ID		0
+
+#ifndef MK_STR
+	#define RUBY_MK_STR
+	#define XMK_STR(x)      #x
+	#define MK_STR(x)       XMK_STR(x)
+#endif
+
+#define SAFETY_IMG_ADDR_ARG		"safety_image_addr"
+#define SAFETY_IMG_SIZE_ARG		"safety_image_size"
+#define LIVE_IMG_ADDR_ARG		"live_image_addr"
+#define LIVE_IMG_SIZE_ARG		"live_image_size"
+#define QTNBOOT_COPY_DRAM_ADDR		RUBY_KERNEL_LOAD_DRAM_BEGIN
+
+#define CONFIG_BOOTCMD_BOOTARGS		"setenv bootargs ${bootargs} hw_config_id=${hw_config_id}"
+#define CONFIG_BOOTCMD_NET		"bootcmd_net=" CONFIG_BOOTCMD_BOOTARGS " ; tftp ; bootm"
+
+#define CONFIG_EXTRA_ENV_SETTINGS	""
+
+#ifdef RUBY_MK_STR
+	#undef MK_STR
+	#undef XMK_STR
+#endif
+
+/* Ethernet */
+#ifdef CONFIG_CMD_NET
+	#define CONFIG_NET_MULTI		1
+	#define CONFIG_ARASAN_GBE		1
+	#define CONFIG_IPADDR			192.168.1.100
+	#define CONFIG_SERVERIP			192.168.1.150
+	#define CONFIG_ETHADDR			30:46:9a:25:be:e4
+	#define CONFIG_BOOTFILE			"topaz-linux.lzma.img"
+	#ifndef PLATFORM_NOSPI
+		#define CONFIG_BOOTARGS			"console=ttyS0,115200n8 earlyprintk=1"
+	#endif
+	#define CONFIG_BOOTCMD			CONFIG_BOOTCMD_NET
+	#define CONFIG_NET_RETRY_COUNT		2
+#endif
+
+#ifdef PLATFORM_NOSPI
+
+	#ifdef PLATFORM_NOSPI
+		#define CONFIG_NOSPI	PLATFORM_NOSPI
+	#else
+		#define CONFIG_NOSPI ""
+	#endif /* #ifdef PLATFORM_NOSPI */
+
+	#ifdef PLATFORM_WMAC_MODE
+		#define CONFIG_WMAC_MODE	PLATFORM_WMAC_MODE
+	#else
+		#define CONFIG_WMAC_MODE ""
+	#endif /* #ifdef PLATFORM_WMAC_MODE */
+
+	#define CONFIG_BOOTARGS \
+		"console=ttyS0," \
+		MK_STR(TOPAZ_SERIAL_BAUD) \
+		"n8 earlyprintk=1 hw_config_id=" \
+		MK_STR(DEFAULT_BOARD_ID) \
+		" spi=" MK_STR(CONFIG_NOSPI) \
+		" wmac_mode=" MK_STR(CONFIG_WMAC_MODE)
+
+	#define CONFIG_HW_CONFIG_ID		DEFAULT_BOARD_ID
+
+#endif /* #ifdef PLATFORM_NOSPI */
+
+/* enable for emac switch feature */
+//#define EMAC_SWITCH
+
+/* enable for emac bonding */
+//#define EMAC_BOND_MASTER (0) /* 0 or 1 */
+
+
+#endif // #ifndef __RUBY_UBOOT_CONFIG_H
diff --git a/include/configs/ruby_mini.h b/include/configs/ruby_mini.h
new file mode 100644
index 0000000..d14332d
--- /dev/null
+++ b/include/configs/ruby_mini.h
@@ -0,0 +1,125 @@
+/*
+ * (C) Copyright 2011 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
+#ifndef __RUBY_UBOOT_CONFIG_H
+#define __RUBY_UBOOT_CONFIG_H
+
+#include "common_mem.h"
+#include "ruby_partitions.h"
+
+#define TEXT_BASE		(RUBY_SRAM_BEGIN + TEXT_BASE_OFFSET)
+
+/* generic define for RUBY */
+#define CONFIG_RUBY_BOARD
+
+#define CONFIG_LZMA
+
+#ifndef  TOPAZ_EP_MINI_UBOOT
+/* Commands */
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_INTR
+#endif
+
+//#define CONFIG_BOOTP_RANDOM_DELAY
+
+/* Suppress inclusion of unwanted functions by pretending we have them */
+#define __HAVE_ARCH_STRDUP
+
+/* No flash support */
+#define CONFIG_SYS_NO_FLASH
+
+/* Stack grows backward; put stack before the MuC stack */
+#define CONFIG_ARC_STACK_BEGIN	(RUBY_SRAM_BEGIN + CONFIG_ARC_MUC_STACK_OFFSET_UBOOT - \
+		RUBY_STACK_INIT_OFFSET - CONFIG_ARC_MUC_STACK_SIZE)
+
+/* Misc parameters */
+#define CONFIG_SYS_HZ			1000
+#define CONFIG_SYS_BAUDRATE_TABLE	{ RUBY_SERIAL_BAUD }
+#define CONFIG_BAUD_RATE		RUBY_SERIAL_BAUD
+
+/* Console */
+#define CONFIG_SYS_MAXARGS		16 /* Max number of command args */
+
+/* Environment */
+#ifdef TOPAZ_EP_MINI_UBOOT
+#define	CONFIG_ENV_IS_IN_SPI_FLASH	1
+#define CONFIG_ENV_SIZE			BOOT_CFG_SIZE
+#define CONFIG_ENV_BASE_SIZE		BOOT_CFG_BASE_SIZE
+#define	CONFIG_ENV_OVERWRITE
+#else
+#define	CONFIG_ENV_IS_NOWHERE
+#define CONFIG_ENV_SIZE			512
+#endif
+
+#define __MK_STR(_x)	#_x
+#define MKSTR(_x)	__MK_STR(_x)
+
+/* Ethernet */
+#ifdef CONFIG_CMD_NET
+	#define CONFIG_NET_MULTI		1
+	#define CONFIG_ARASAN_GBE		1
+	#define CONFIG_ETHADDR			00:26:86:00:00:00	/* Quantenna OUI */
+	#define CONFIG_IPADDR			1.1.1.2
+	#define CONFIG_SERVERIP			1.1.1.1
+	#define CONFIG_BOOTFILE			"u-boot.bin"
+	#define CONFIG_NET_RETRY_COUNT		2
+	#define CONFIG_BOOTP_QTN_VENDORINFO
+
+	#define RUBY_BOOT_METHOD	RUBY_BOOT_METHOD_TRYLOOP
+#endif
+
+#ifndef __ASSEMBLY__
+
+#include <linux/types.h>
+
+#endif	// __ASSEMBLY__
+
+/* board config */
+
+#define EMAC0_CONFIG (EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE)
+#ifdef TOPAZ_VZN_MINI_UBOOT
+#define EMAC1_CONFIG (EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE)
+#else
+#define EMAC1_CONFIG (EMAC_NOT_IN_USE)
+#endif
+#define EMAC0_PHY_ADDR (EMAC_PHY_ADDR_SCAN)
+#define EMAC1_PHY_ADDR (EMAC_PHY_ADDR_SCAN)
+#define EMAC_RGMII_TIMING (0)
+/* sample config for enable both emac */
+/*
+#define EMAC0_CONFIG (EMAC_IN_USE)
+#define EMAC1_CONFIG (EMAC_IN_USE)
+#define EMAC0_PHY_ADDR (1)
+#define EMAC1_PHY_ADDR (3)
+#define EMAC_RGMII_TIMING 0x81828282
+*/
+/* enable for emac switch feature */
+//#define EMAC_SWITCH
+
+/* enable for emac bonding */
+//#define EMAC_BOND_MASTER (0) /* 0 or 1 */
+
+
+#endif // #ifndef __RUBY_UBOOT_CONFIG_H
+
diff --git a/include/environment.h b/include/environment.h
index 507e832..5a91b79 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -125,6 +125,7 @@
 /* Function that returns a pointer to a value from the environment */
 unsigned char *env_get_addr(int);
 unsigned char env_get_char_memory (int index);
+void *env_get_file_body(int fileoffset);
 
 /* Function that updates CRC of the enironment */
 void env_crc_update (void);
diff --git a/include/exports.h b/include/exports.h
index 0620e9e..61e881a 100644
--- a/include/exports.h
+++ b/include/exports.h
@@ -21,8 +21,8 @@
 void vprintf(const char *, va_list);
 void do_reset (void);
 unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base);
-char *getenv (char *name);
-int setenv (char *varname, char *varvalue);
+char *getenv (const char *name);
+int setenv (const char *varname, const char *varvalue);
 long simple_strtol(const char *cp,char **endp,unsigned int base);
 int strcmp(const char * cs,const char * ct);
 int ustrtoul(const char *cp, char **endp, unsigned int base);
diff --git a/include/image.h b/include/image.h
index 62199af..cbacd86 100644
--- a/include/image.h
+++ b/include/image.h
@@ -168,27 +168,7 @@
 #define IH_COMP_BZIP2		2	/* bzip2 Compression Used	*/
 #define IH_COMP_LZMA		3	/* lzma  Compression Used	*/
 
-#define IH_MAGIC	0x27051956	/* Image Magic Number		*/
-#define IH_NMLEN		32	/* Image Name Length		*/
-
-/*
- * Legacy format image header,
- * all data in network byte order (aka natural aka bigendian).
- */
-typedef struct image_header {
-	uint32_t	ih_magic;	/* Image Header Magic Number	*/
-	uint32_t	ih_hcrc;	/* Image Header CRC Checksum	*/
-	uint32_t	ih_time;	/* Image Creation Timestamp	*/
-	uint32_t	ih_size;	/* Image Data Size		*/
-	uint32_t	ih_load;	/* Data	 Load  Address		*/
-	uint32_t	ih_ep;		/* Entry Point Address		*/
-	uint32_t	ih_dcrc;	/* Image Data CRC Checksum	*/
-	uint8_t		ih_os;		/* Operating System		*/
-	uint8_t		ih_arch;	/* CPU architecture		*/
-	uint8_t		ih_type;	/* Image Type			*/
-	uint8_t		ih_comp;	/* Compression Type		*/
-	uint8_t		ih_name[IH_NMLEN];	/* Image Name		*/
-} image_header_t;
+#include "uboot_header.h"
 
 typedef struct image_info {
 	ulong		start, end;		/* start/end of blob */
@@ -262,6 +242,7 @@
 #ifndef USE_HOSTCC
 	struct lmb	lmb;		/* for memory mgmt */
 #endif
+	uint32_t	qtn_flags;	/* extra flags (Quantenna) */
 } bootm_headers_t;
 
 /*
@@ -331,10 +312,6 @@
 /*******************************************************************/
 /* Legacy format specific code (prefixed with image_) */
 /*******************************************************************/
-static inline uint32_t image_get_header_size (void)
-{
-	return (sizeof (image_header_t));
-}
 
 #define image_get_hdr_l(f) \
 	static inline uint32_t image_get_##f(image_header_t *hdr) \
@@ -385,6 +362,23 @@
 	return ((ulong)hdr + image_get_header_size ());
 }
 
+static inline uint32_t *image_get_qtn_flags_addr (image_header_t *hdr)
+{
+	return (void *) ((image_get_data(hdr) - sizeof(uint32_t) + 0x3) & ~0x3);
+}
+
+static inline uint32_t image_get_qtn_flags (image_header_t *hdr)
+{
+	uint32_t *flags_addr = image_get_qtn_flags_addr(hdr);
+	return *flags_addr;
+}
+
+static inline void image_set_qtn_flags (image_header_t *hdr, uint32_t val)
+{
+	uint32_t *flags_addr = image_get_qtn_flags_addr(hdr);
+	*flags_addr = val;
+}
+
 static inline uint32_t image_get_image_size (image_header_t *hdr)
 {
 	return (image_get_size (hdr) + image_get_header_size ());
diff --git a/include/linux/types.h b/include/linux/types.h
index 1b0b4a4..6d36cca 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -22,6 +22,7 @@
 typedef __kernel_suseconds_t	suseconds_t;
 
 #ifdef __KERNEL__
+typedef unsigned long		uintptr_t;
 typedef __kernel_uid32_t	uid_t;
 typedef __kernel_gid32_t	gid_t;
 typedef __kernel_uid16_t        uid16_t;
diff --git a/include/malloc.h b/include/malloc.h
index 47154b0..bc4b6a7 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -215,8 +215,8 @@
 
 */
 
-
-
+#ifndef __UBOOT_MALLOC_H__
+#define __UBOOT_MALLOC_H__
 
 /* Preliminaries */
 
@@ -940,3 +940,6 @@
 #ifdef __cplusplus
 };  /* end of extern "C" */
 #endif
+
+#endif	// __UBOOT_MALLOC_H__
+
diff --git a/include/net.h b/include/net.h
index 5a1d36e..597077d 100644
--- a/include/net.h
+++ b/include/net.h
@@ -12,6 +12,8 @@
 #ifndef __NET_H__
 #define __NET_H__
 
+#include "malloc.h"
+
 #if defined(CONFIG_8xx)
 #include <commproc.h>
 # if !defined(CONFIG_NET_MULTI)
@@ -180,6 +182,7 @@
 #define PROT_ARP	0x0806		/* IP ARP protocol		*/
 #define PROT_RARP	0x8035		/* IP ARP protocol		*/
 #define PROT_VLAN	0x8100		/* IEEE 802.1q protocol		*/
+#define PROT_TEST	0x0808		/* Ethernet loopback test */
 
 #define IPPROTO_ICMP	 1	/* Internet Control Message Protocol	*/
 #define IPPROTO_UDP	17	/* User Datagram Protocol		*/
@@ -356,7 +359,14 @@
 extern int		NetRestartWrap;		/* Tried all network devices	*/
 #endif
 
-typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP } proto_t;
+#ifdef CONFIG_TFTP_SERVER
+extern uchar TftpRemoteEther[6];
+extern int NetRunTftpServer;
+extern IPaddr_t TftpRemoteIP;
+extern void ResetNetLoop(void);
+#endif
+
+typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP, ETHLOOP } proto_t;
 
 /* from net/net.c */
 extern char	BootFile[128];			/* Boot File name		*/
@@ -510,7 +520,7 @@
 extern ushort getenv_VLAN(char *);
 
 /* copy a filename (allow for "..." notation, limit length) */
-extern void	copy_filename (char *dst, char *src, int size);
+extern void	copy_filename (char *dst, const char *src, int size);
 
 /**********************************************************************/
 
diff --git a/include/systemace.h b/include/systemace.h
index 9cbf880..be43d46 100644
--- a/include/systemace.h
+++ b/include/systemace.h
@@ -27,37 +27,5 @@
 
 block_dev_desc_t *  systemace_get_dev(int dev);
 
-#define SYSTEMACE_BUS_MODE_REG			(0x00)
-#define SYSTEMACE_STATUS_REG			(0x04)
-#define SYSTEMACE_MPU_LBA_REG_LOW		(0x10)
-#define SYSTEMACE_MPU_LBA_REG_HIGH		(0x12)
-#define SYSTEMACE_SECT_CNT_CMD_REG		(0x14)
-#define SYSTEMACE_CONTROL_REG			(0x18)
-#define SYSTEMACE_DATA_BUF			(0x40)
-
-#define SYSTEMACE_SR_CFGLOCK			(0x0001) /**< Config port lock status */
-#define SYSTEMACE_SR_MPULOCK			(0x0002) /**< MPU port lock status */
-#define SYSTEMACE_SR_CF_CTRLR_ERR		(0x0008)
-#define SYSTEMACE_SR_CARD_DETECT		(0x0010)
-#define SYSTEMACE_SR_DATA_BUF_RDY		(0x0020) /**< Enable data ready Status */
-#define SYSTEMACE_SR_RDY_FOR_CMD		(0x0100)
-
-#define SYSTEMACE_CR_FORCELOCK			(0x0001) /**< Force lock request */
-#define SYSTEMACE_CR_DATARDYIRQ			(0x0100) /**< Enable data ready IRQ */
-#define SYSTEMACE_CR_ERRORIRQ			(0x0200) /**< Enable error IRQ */
-#define SYSTEMACE_CR_CFGDONEIRQ			(0x0400) /**< Enable CFG done IRQ */
-#define SYSTEMACE_CR_LOCKREQ			(0x0002) /**< MPU lock request */
-#define SYSTEMACE_CR_CFGRESET			(0x0080) /**< CFG reset */
-#define SYSTEMACE_CR_RESETIRQ			(0x0800) /**< Reset IRQ line */
-
-#define SYSTEMACE_CCR_IDENTIFY			(0x0200) /**< Identify CF card command */ )
-#define SYSTEMACE_CCR_RESET			(0x0100)
-#define SYSTEMACE_CCR_ABORT			(0x0600)
-
-#define SYSTEMACE_DATA_BUF_SIZE			(32)
-#define SYSTEMACE_CCR_READ_CMD			(0x0300)
-#define SYSTEMACE_CCR_WRITE_CMD			(0x0400)
-
-
 #endif	/* CONFIG_SYSTEMACE */
 #endif	/* __SYSTEMACE_H */
diff --git a/lib_arc/Makefile b/lib_arc/Makefile
index cb80a39..03d67ff 100644
--- a/lib_arc/Makefile
+++ b/lib_arc/Makefile
@@ -20,7 +20,7 @@
 
 AOBJS	=
 
-COBJS	= board.o arclinux.o arcmqx.o
+COBJS	= board.o arclinux.o
 
 OBJS	= $(AOBJS) $(COBJS)
 
diff --git a/lib_arc/arclinux.c b/lib_arc/arclinux.c
index c9598c0..2a3bab4 100644
--- a/lib_arc/arclinux.c
+++ b/lib_arc/arclinux.c
@@ -27,6 +27,7 @@
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 #include <asm/setup.h>
+#include <asm/uboot-arc.h>
 
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -46,6 +47,8 @@
 static void setup_memory_tags (bd_t *bd);
 # endif
 static void setup_commandline_tag (bd_t *bd, char *commandline);
+static void setup_hwid_tag(void);
+static void setup_spiflashprotect_tag(u32 qtn_flags);
 
 #if 0
 static void setup_ramdisk_tag (bd_t *bd);
@@ -65,107 +68,50 @@
 
 extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 
-void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
-		     bootm_headers_t *images)
-{
-	ulong	initrd_start, initrd_end;
-	ulong	ep = 0;
-	bd_t	*bd = gd->bd;
-	char	*s;
-	int	machid; // = bd->bi_arch_number;
-	void	(*theKernel)(int zero, int arch, uint params);
-	int	ret;
+typedef void (*KernelEntry)(int zero, int arch, uint params);
 
+static uint8_t __atag_mem[CONFIG_ATAGS_MAX_SIZE] __attribute__((__section__(".bss.atags")));
+
+void do_bootm_linux (int flag, int argc, char *argv[], bootm_headers_t *images)
+{
+	bd_t *bd = gd->bd;
+
+	// pass atag parameters through space in the u-boot heap
+	bd->bi_boot_params = __atag_mem;
+
+	setup_start_tag(bd);
 #ifdef CONFIG_CMDLINE_TAG
 	char *commandline = getenv ("bootargs");
-#endif
-
-	/* find kernel entry point */
-	if (images->legacy_hdr_valid) {
-		ep = image_get_ep (&images->legacy_hdr_os_copy);
-#if defined(CONFIG_FIT)
-	} else if (images->fit_uname_os) {
-		ret = fit_image_get_entry (images->fit_hdr_os,
-					images->fit_noffset_os, &ep);
-		if (ret) {
-			puts ("Can't get entry point property!\n");
-			goto error;
-		}
-#endif
-	} else {
-		puts ("Could not find kernel entry point!\n");
-		goto error;
-	}
-	theKernel = (void (*)(int, int, uint))ep;
-
-	s = getenv ("machid");
-	if (s) {
-		machid = simple_strtoul (s, NULL, 16);
-		printf ("Using machid 0x%x from environment\n", machid);
-	}
-
-	ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_ARM,
-			&initrd_start, &initrd_end);
-	if (ret)
-		goto error;
-
-	show_boot_progress (15);
-
-	debug ("## Transferring control to Linux (at address %08lx) ...\n",
-	       (ulong) theKernel);
-
-#if defined (CONFIG_SETUP_MEMORY_TAGS) || \
-    defined (CONFIG_CMDLINE_TAG) || \
-    defined (CONFIG_INITRD_TAG) || \
-    defined (CONFIG_SERIAL_TAG) || \
-    defined (CONFIG_REVISION_TAG) || \
-    defined (CONFIG_LCD) || \
-    defined (CONFIG_VFD)
-	setup_start_tag (bd);
-#ifdef CONFIG_SERIAL_TAG
-	setup_serial_tag (&params);
-#endif
-#ifdef CONFIG_REVISION_TAG
-	setup_revision_tag (&params);
-#endif
-#ifdef CONFIG_SETUP_MEMORY_TAGS
-	setup_memory_tags (bd);
-#endif
-#ifdef CONFIG_CMDLINE_TAG
 	setup_commandline_tag (bd, commandline);
 #endif
-#ifdef CONFIG_INITRD_TAG
-	if (initrd_start && initrd_end)
-		setup_initrd_tag (bd, initrd_start, initrd_end);
-#endif
-#if defined (CONFIG_VFD) || defined (CONFIG_LCD)
-	setup_videolfb_tag ((gd_t *) gd);
-#endif
-	setup_end_tag (bd);
-#endif
+	setup_hwid_tag();
 
+	/* Both conditions has to be met:
+	 * 1) env: spi_protect == enable
+	 * 2) new kernel that support Protection Mode
+         */
 
-	/* we assume that the kernel is in place */
-	printf ("\nStarting kernel ...\n\n");
-
-#ifdef CONFIG_USB_DEVICE
-	{
-		extern void udc_disconnect (void);
-		udc_disconnect ();
+	if ((protect_env_get() == 0) && (images->qtn_flags & 0x1)){
+		printf("##  Set TAG qtn_flags %x\n", images->qtn_flags);
+		setup_spiflashprotect_tag((u32)images->qtn_flags);
+	} else {
+		printf("##  Unset TAG qtn_flags %x\n", images->qtn_flags);
+		spi_unprotect_global();
 	}
-#endif
 
-//	cleanup_before_linux ();
+	setup_end_tag(bd);
 
-	theKernel (0, machid, bd->bi_boot_params);
-	/* does not return */
-	return;
+	KernelEntry theKernel = (KernelEntry)images->ep;
 
-error:
-	return;
+	printf("## Transferring control to Linux (at address %08lx) ATAG parameters %08lx - %08lx...\n",
+		(ulong)theKernel, bd->bi_boot_params, params);
+
+	cleanup_before_linux ();
+
+	int arch = read_new_aux_reg(0x04 /*IDENTITY*/);
+	theKernel (0, arch, bd->bi_boot_params);
 }
 
-
 #if defined (CONFIG_SETUP_MEMORY_TAGS) || \
     defined (CONFIG_CMDLINE_TAG) || \
     defined (CONFIG_INITRD_TAG) || \
@@ -234,6 +180,24 @@
 	params = tag_next (params);
 }
 
+static void setup_hwid_tag(void)
+{
+	char *hwid_str = getenv("hw_config_id");
+	if (hwid_str) {
+		params->hdr.tag = ATAG_HW_CONFIG_ID;
+		params->hdr.size = tag_size(tag_hwid);
+		params->u.hwid.hwid = simple_strtoul(hwid_str, NULL, 10);
+		params = tag_next (params);
+	}
+}
+
+static void setup_spiflashprotect_tag(u32 qtn_flags)
+{
+	params->hdr.tag = ATAG_SPI_FLASH_PROTECT_MODE;
+	params->hdr.size = tag_size(tag_spiflash);
+	params->u.spi_flash_protect_mode.spi_flash_protect_mode = (qtn_flags & 0x1);
+	params = tag_next (params);
+}
 
 #ifdef CONFIG_INITRD_TAG
 static void setup_initrd_tag (bd_t *bd, ulong initrd_start, ulong initrd_end)
@@ -316,3 +280,4 @@
 }
 
 #endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */
+
diff --git a/lib_arc/arcmqx.c b/lib_arc/arcmqx.c
deleted file mode 100644
index c43cdc5..0000000
--- a/lib_arc/arcmqx.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <common.h>
-#include <asm/uboot-arc.h>
-
-#if defined(CONFIG_BOOTMQX)
-
-int init_mqx_context(void)
-{
-	unsigned long addr = 0;
-	enable_interrupts();
-	/* indeed only 10 bits of address should be 0 but we already
-	 * have function for rounding */
-	addr = round_page((unsigned)&__bss_end + CONFIG_SYS_MALLOC_LEN);
-	write_new_aux_reg(ARC_REG_INT_VEC_BASE, addr);
-	printf("interrupt vector base address is set to the: 0x%x\n", (unsigned)addr);
-	return 0;
-}
-
-int cleanup_mqx_context(void)
-{
-	unsigned long addr = 0;
-
-	disable_interrupts();
-	addr = (unsigned)&__vector_start;
-	write_new_aux_reg(ARC_REG_INT_VEC_BASE, addr);
-	printf("interrupt vector base address is restored to the: 0x%x\n", addr);
-	return 0;
-}
-
-#endif
diff --git a/lib_arc/board.c b/lib_arc/board.c
index cec49c7..0c68aca 100644
--- a/lib_arc/board.c
+++ b/lib_arc/board.c
@@ -3,19 +3,19 @@
  *
  *  lib_arc/board.c
  *
- *  Copyright (C)
+ *  Copyright (C) 
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
- *
+ * 
  * Authors : Sandeep Patil (sandeep.patil@codito.com)
- *			 Pradeep Sawlani (pradeep.sawlani@codito.com)
+ * 			 Pradeep Sawlani (pradeep.sawlani@codito.com)
  */
 
 
-#include <common.h>		/* Serial functions	*/
-#include <linux/types.h>	/* ulong typedef	*/
+#include <common.h>		/* Serial functions	*/ 
+#include <linux/types.h>	/* ulong typedef    	*/
 #include <asm/uboot-arc.h>	/* _start		*/
 #include <asm/global_data.h>	/* For global data structre */
 #include <version.h>
@@ -26,11 +26,10 @@
 const char version_string[] =
 	U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")";
 
-static int display_banner (void);
-
 typedef int (init_fnc_t) (void);
 
 int board_init(void);
+int board_late_init(void);
 
 init_fnc_t *init_sequence[] = {
 	cpu_init,		/* cpu specific initialisations*/
@@ -38,7 +37,6 @@
 	serial_init,            /* serial communications setup */
 	env_init,		/* intialise environment */
 	console_init_f,         /* stage 1 init of console */
-	display_banner,         /* say that we are here */
 	NULL,
 };
 
@@ -50,43 +48,21 @@
 static ulong mem_malloc_end = 0;
 static ulong mem_malloc_brk = 0;
 
-static int display_banner (void)
-{
-	DECLARE_GLOBAL_DATA_PTR;
-
-	printf ("\n\n%s\n\n", version_string);
-	printf ("running at %dHZ\n", (unsigned)gd->cpu_clk);
-#ifndef  CONFIG_ARC_AA4_BOARD
-	printf ("using timer: %i\n", ARC_BOARD_TIMER);
-#endif
-	printf ("global data pointer: 0x%x\n", (unsigned)gd);
-	printf ("load addr @ 0x%x\n", CONFIG_LOADADDR);
-	printf (".text @ 0x%x\n", TEXT_BASE);
-	printf (".vector @ 0x%x (0x%x bytes)\n", (unsigned)&__vector_start,
-		(unsigned)&__vector_end - (unsigned)&__vector_start);
-	printf (".data @ 0x%x (0x%x bytes)\n", (unsigned)&__data_start,
-		(unsigned)&__data_end - (unsigned)&__data_start);
-	printf (".bss @ 0x%x (0x%x bytes)\n", (unsigned)&__bss_start,
-		(unsigned)&__bss_end - (unsigned)&__bss_start);
-
-	return 0;
-}
-
 static void mem_malloc_init (ulong dest_addr)
 {
 	mem_malloc_start = dest_addr;
 	mem_malloc_end = dest_addr + CONFIG_SYS_MALLOC_LEN;
 	mem_malloc_brk = mem_malloc_start;
-	memset ((void *) mem_malloc_start, 0,mem_malloc_end - mem_malloc_start);
-	printf (".heap @ 0x%x (0x%x bytes)\n", mem_malloc_start,
-		mem_malloc_end - mem_malloc_start);
+#ifndef CONFIG_ARC_HEAP_MEM_NO_INIT
+	memset((void *)mem_malloc_start, 0, mem_malloc_end - mem_malloc_start);
+#endif
 }
 
 void *sbrk (ptrdiff_t increment)
 {
 	ulong old = mem_malloc_brk;
 	ulong new = old + increment;
-
+	
 	if ((new < mem_malloc_start) || (new > mem_malloc_end)) {
 		return (NULL);
 	}
@@ -94,25 +70,8 @@
 	return ((void *) old);
 }
 
-
-#ifndef CONFIG_SYS_NO_FLASH
-static void display_flash_config (ulong size)
-{
-	puts ("Flash: ");
-	print_size (size, "\n");
-}
-#endif
-
-unsigned round_page(unsigned x)
-{
-	x += 0xfff;
-	x &= ~0xfff;
-	return x;
-}
-
-gd_t *global_data;
-gd_t *gd;
-
+gd_t *global_data = NULL;
+gd_t *gd = NULL;
 
 void start_arcboot(void)
 {
@@ -120,42 +79,30 @@
 	static gd_t gd_data;
 	static bd_t bd_data;
 	init_fnc_t **init_fnc_ptr;
-	extern void *__text_end;
-	//cmd_tbl_t *cmdtp;
-	unsigned stage = 0xf;
+	int board_id;
 
-	show_boot_progress(stage--);
-	dcache_disable();
+	unsigned stage = 0xf;
 
 	gd = global_data = &gd_data;
 	gd->bd = &bd_data;
-	gd->baudrate = CONFIG_ARC_SERIAL_BAUD;
-	gd->cpu_clk = CONFIG_ARC_CLK;
 
-	/* frame buffer will sit after end of program */
-	gd->fb_base = round_page((unsigned)__text_end);
-
-	for (init_fnc_ptr = init_sequence;*init_fnc_ptr;++init_fnc_ptr) {
+	for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
 		show_boot_progress(stage--);
 		if ((*init_fnc_ptr)() != 0) {
 			hang();
 		}
-	}
+	}	
 
 	/* Setup malloc area */
-#ifndef  CONFIG_ARC_AA4_BOARD
-	mem_malloc_init((unsigned)&__bss_end);
-#else
-	mem_malloc_init(TEXT_BASE - CONFIG_SYS_MALLOC_LEN);
-#endif
-#ifndef CONFIG_SYS_NO_FLASH
-	display_flash_config(flash_init());
-#endif
+	mem_malloc_init(CONFIG_ARC_HEAP_BEGIN);
 	env_relocate();
 
+	/* set up ddr based on board_cfg*/
+	board_late_init(); 
+
+#if defined(CONFIG_CMD_NET)
 	/*IP Address */
 	gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
-
 	/* MAC Address */
 	{
 		int i;
@@ -164,23 +111,27 @@
 		uchar tmp[64];
 		i = getenv_r ("ethaddr", tmp, sizeof (tmp));
 		s = (i > 0) ? tmp : NULL;
-
 		for (reg = 0; reg < 6; ++reg) {
 			gd->bd->bi_enetaddr[reg] = s ? simple_strtoul (s, &e, 16) : 0;
-			if (s)
+			if (s) {
 				s = (*e) ? e + 1 : e;
-
+			}
 		}
 	}
+	/* Boot file */
+	{
+		const char *s;
+		if ((s = getenv("bootfile")) != NULL) {
+			copy_filename(BootFile, s, sizeof(BootFile));
+		}
+	}
+#endif
+
 	devices_init();        /* get the devices list going. */
 	jumptable_init();
 	console_init_r();
-#if defined(CONFIG_CMD_NET)
-#if defined(CONFIG_ARC_AA4_BOARD)
+#ifdef CONFIG_CMD_NET
 	eth_initialize(gd->bd);
-#else
-	eth_init(gd->bd);
-#endif
 #endif
 	for(;;) {
 		main_loop();
@@ -192,3 +143,4 @@
 	printf("please reset....\n");
 	for(;;);
 }
+
diff --git a/lib_generic/lzma/LzmaDecodeSize.c b/lib_generic/lzma/LzmaDecodeSize.c
new file mode 100644
index 0000000..cfbe554
--- /dev/null
+++ b/lib_generic/lzma/LzmaDecodeSize.c
@@ -0,0 +1,712 @@
+/*
+  LzmaDecodeSize.c
+  LZMA Decoder (optimized for Size version)
+
+  LZMA SDK 4.40 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01)
+  http://www.7-zip.org/
+
+  LZMA SDK is licensed under two licenses:
+  1) GNU Lesser General Public License (GNU LGPL)
+  2) Common Public License (CPL)
+  It means that you can select one of these two licenses and
+  follow rules of that license.
+
+  SPECIAL EXCEPTION:
+  Igor Pavlov, as the author of this code, expressly permits you to
+  statically or dynamically link your code (or bind by name) to the
+  interfaces of this file without subjecting your linked code to the
+  terms of the CPL or GNU LGPL. Any modifications or additions
+  to this file, however, are subject to the LGPL or CPL terms.
+*/
+
+#include "LzmaDecode.h"
+
+#define kNumTopBits 24
+#define kTopValue ((UInt32)1 << kNumTopBits)
+
+#define kNumBitModelTotalBits 11
+#define kBitModelTotal (1 << kNumBitModelTotalBits)
+#define kNumMoveBits 5
+
+typedef struct _CRangeDecoder
+{
+  const Byte *Buffer;
+  const Byte *BufferLim;
+  UInt32 Range;
+  UInt32 Code;
+  #ifdef _LZMA_IN_CB
+  ILzmaInCallback *InCallback;
+  int Result;
+  #endif
+  int ExtraBytes;
+} CRangeDecoder;
+
+Byte RangeDecoderReadByte(CRangeDecoder *rd)
+{
+  if (rd->Buffer == rd->BufferLim)
+  {
+    #ifdef _LZMA_IN_CB
+    SizeT size;
+    rd->Result = rd->InCallback->Read(rd->InCallback, &rd->Buffer, &size);
+    rd->BufferLim = rd->Buffer + size;
+    if (size == 0)
+    #endif
+    {
+      rd->ExtraBytes = 1;
+      return 0xFF;
+    }
+  }
+  return (*rd->Buffer++);
+}
+
+/* #define ReadByte (*rd->Buffer++) */
+#define ReadByte (RangeDecoderReadByte(rd))
+
+void RangeDecoderInit(CRangeDecoder *rd
+  #ifndef _LZMA_IN_CB
+    , const Byte *stream, SizeT bufferSize
+  #endif
+    )
+{
+  int i;
+  #ifdef _LZMA_IN_CB
+  rd->Buffer = rd->BufferLim = 0;
+  #else
+  rd->Buffer = stream;
+  rd->BufferLim = stream + bufferSize;
+  #endif
+  rd->ExtraBytes = 0;
+  rd->Code = 0;
+  rd->Range = (0xFFFFFFFF);
+  for(i = 0; i < 5; i++)
+    rd->Code = (rd->Code << 8) | ReadByte;
+}
+
+#define RC_INIT_VAR UInt32 range = rd->Range; UInt32 code = rd->Code;
+#define RC_FLUSH_VAR rd->Range = range; rd->Code = code;
+#define RC_NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | ReadByte; }
+
+UInt32 RangeDecoderDecodeDirectBits(CRangeDecoder *rd, int numTotalBits)
+{
+  RC_INIT_VAR
+  UInt32 result = 0;
+  int i;
+  for (i = numTotalBits; i != 0; i--)
+  {
+    /* UInt32 t; */
+    range >>= 1;
+
+    result <<= 1;
+    if (code >= range)
+    {
+      code -= range;
+      result |= 1;
+    }
+    /*
+    t = (code - range) >> 31;
+    t &= 1;
+    code -= range & (t - 1);
+    result = (result + result) | (1 - t);
+    */
+    RC_NORMALIZE
+  }
+  RC_FLUSH_VAR
+  return result;
+}
+
+int RangeDecoderBitDecode(CProb *prob, CRangeDecoder *rd)
+{
+  UInt32 bound = (rd->Range >> kNumBitModelTotalBits) * *prob;
+  if (rd->Code < bound)
+  {
+    rd->Range = bound;
+    *prob += (kBitModelTotal - *prob) >> kNumMoveBits;
+    if (rd->Range < kTopValue)
+    {
+      rd->Code = (rd->Code << 8) | ReadByte;
+      rd->Range <<= 8;
+    }
+    return 0;
+  }
+  else
+  {
+    rd->Range -= bound;
+    rd->Code -= bound;
+    *prob -= (*prob) >> kNumMoveBits;
+    if (rd->Range < kTopValue)
+    {
+      rd->Code = (rd->Code << 8) | ReadByte;
+      rd->Range <<= 8;
+    }
+    return 1;
+  }
+}
+
+#define RC_GET_BIT2(prob, mi, A0, A1) \
+  UInt32 bound = (range >> kNumBitModelTotalBits) * *prob; \
+  if (code < bound) \
+    { A0; range = bound; *prob += (kBitModelTotal - *prob) >> kNumMoveBits; mi <<= 1; } \
+  else \
+    { A1; range -= bound; code -= bound; *prob -= (*prob) >> kNumMoveBits; mi = (mi + mi) + 1; } \
+  RC_NORMALIZE
+
+#define RC_GET_BIT(prob, mi) RC_GET_BIT2(prob, mi, ; , ;)
+
+int RangeDecoderBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd)
+{
+  int mi = 1;
+  int i;
+  #ifdef _LZMA_LOC_OPT
+  RC_INIT_VAR
+  #endif
+  for(i = numLevels; i != 0; i--)
+  {
+    #ifdef _LZMA_LOC_OPT
+    CProb *prob = probs + mi;
+    RC_GET_BIT(prob, mi)
+    #else
+    mi = (mi + mi) + RangeDecoderBitDecode(probs + mi, rd);
+    #endif
+  }
+  #ifdef _LZMA_LOC_OPT
+  RC_FLUSH_VAR
+  #endif
+  return mi - (1 << numLevels);
+}
+
+int RangeDecoderReverseBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd)
+{
+  int mi = 1;
+  int i;
+  int symbol = 0;
+  #ifdef _LZMA_LOC_OPT
+  RC_INIT_VAR
+  #endif
+  for(i = 0; i < numLevels; i++)
+  {
+    #ifdef _LZMA_LOC_OPT
+    CProb *prob = probs + mi;
+    RC_GET_BIT2(prob, mi, ; , symbol |= (1 << i))
+    #else
+    int bit = RangeDecoderBitDecode(probs + mi, rd);
+    mi = mi + mi + bit;
+    symbol |= (bit << i);
+    #endif
+  }
+  #ifdef _LZMA_LOC_OPT
+  RC_FLUSH_VAR
+  #endif
+  return symbol;
+}
+
+Byte LzmaLiteralDecode(CProb *probs, CRangeDecoder *rd)
+{
+  int symbol = 1;
+  #ifdef _LZMA_LOC_OPT
+  RC_INIT_VAR
+  #endif
+  do
+  {
+    #ifdef _LZMA_LOC_OPT
+    CProb *prob = probs + symbol;
+    RC_GET_BIT(prob, symbol)
+    #else
+    symbol = (symbol + symbol) | RangeDecoderBitDecode(probs + symbol, rd);
+    #endif
+  }
+  while (symbol < 0x100);
+  #ifdef _LZMA_LOC_OPT
+  RC_FLUSH_VAR
+  #endif
+  return symbol;
+}
+
+Byte LzmaLiteralDecodeMatch(CProb *probs, CRangeDecoder *rd, Byte matchByte)
+{
+  int symbol = 1;
+  #ifdef _LZMA_LOC_OPT
+  RC_INIT_VAR
+  #endif
+  do
+  {
+    int bit;
+    int matchBit = (matchByte >> 7) & 1;
+    matchByte <<= 1;
+    #ifdef _LZMA_LOC_OPT
+    {
+      CProb *prob = probs + 0x100 + (matchBit << 8) + symbol;
+      RC_GET_BIT2(prob, symbol, bit = 0, bit = 1)
+    }
+    #else
+    bit = RangeDecoderBitDecode(probs + 0x100 + (matchBit << 8) + symbol, rd);
+    symbol = (symbol << 1) | bit;
+    #endif
+    if (matchBit != bit)
+    {
+      while (symbol < 0x100)
+      {
+        #ifdef _LZMA_LOC_OPT
+        CProb *prob = probs + symbol;
+        RC_GET_BIT(prob, symbol)
+        #else
+        symbol = (symbol + symbol) | RangeDecoderBitDecode(probs + symbol, rd);
+        #endif
+      }
+      break;
+    }
+  }
+  while (symbol < 0x100);
+  #ifdef _LZMA_LOC_OPT
+  RC_FLUSH_VAR
+  #endif
+  return symbol;
+}
+
+#define kNumPosBitsMax 4
+#define kNumPosStatesMax (1 << kNumPosBitsMax)
+
+#define kLenNumLowBits 3
+#define kLenNumLowSymbols (1 << kLenNumLowBits)
+#define kLenNumMidBits 3
+#define kLenNumMidSymbols (1 << kLenNumMidBits)
+#define kLenNumHighBits 8
+#define kLenNumHighSymbols (1 << kLenNumHighBits)
+
+#define LenChoice 0
+#define LenChoice2 (LenChoice + 1)
+#define LenLow (LenChoice2 + 1)
+#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
+#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
+#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
+
+int LzmaLenDecode(CProb *p, CRangeDecoder *rd, int posState)
+{
+  if(RangeDecoderBitDecode(p + LenChoice, rd) == 0)
+    return RangeDecoderBitTreeDecode(p + LenLow +
+        (posState << kLenNumLowBits), kLenNumLowBits, rd);
+  if(RangeDecoderBitDecode(p + LenChoice2, rd) == 0)
+    return kLenNumLowSymbols + RangeDecoderBitTreeDecode(p + LenMid +
+        (posState << kLenNumMidBits), kLenNumMidBits, rd);
+  return kLenNumLowSymbols + kLenNumMidSymbols +
+      RangeDecoderBitTreeDecode(p + LenHigh, kLenNumHighBits, rd);
+}
+
+#define kNumStates 12
+#define kNumLitStates 7
+
+#define kStartPosModelIndex 4
+#define kEndPosModelIndex 14
+#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
+
+#define kNumPosSlotBits 6
+#define kNumLenToPosStates 4
+
+#define kNumAlignBits 4
+#define kAlignTableSize (1 << kNumAlignBits)
+
+#define kMatchMinLen 2
+
+#define IsMatch 0
+#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
+#define IsRepG0 (IsRep + kNumStates)
+#define IsRepG1 (IsRepG0 + kNumStates)
+#define IsRepG2 (IsRepG1 + kNumStates)
+#define IsRep0Long (IsRepG2 + kNumStates)
+#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
+#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
+#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
+#define LenCoder (Align + kAlignTableSize)
+#define RepLenCoder (LenCoder + kNumLenProbs)
+#define Literal (RepLenCoder + kNumLenProbs)
+
+#if Literal != LZMA_BASE_SIZE
+StopCompilingDueBUG
+#endif
+
+int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size)
+{
+  unsigned char prop0;
+  if (size < LZMA_PROPERTIES_SIZE)
+    return LZMA_RESULT_DATA_ERROR;
+  prop0 = propsData[0];
+  if (prop0 >= (9 * 5 * 5))
+    return LZMA_RESULT_DATA_ERROR;
+  {
+    for (propsRes->pb = 0; prop0 >= (9 * 5); propsRes->pb++, prop0 -= (9 * 5));
+    for (propsRes->lp = 0; prop0 >= 9; propsRes->lp++, prop0 -= 9);
+    propsRes->lc = prop0;
+    /*
+    unsigned char remainder = (unsigned char)(prop0 / 9);
+    propsRes->lc = prop0 % 9;
+    propsRes->pb = remainder / 5;
+    propsRes->lp = remainder % 5;
+    */
+  }
+
+  #ifdef _LZMA_OUT_READ
+  {
+    int i;
+    propsRes->DictionarySize = 0;
+    for (i = 0; i < 4; i++)
+      propsRes->DictionarySize += (UInt32)(propsData[1 + i]) << (i * 8);
+    if (propsRes->DictionarySize == 0)
+      propsRes->DictionarySize = 1;
+  }
+  #endif
+  return LZMA_RESULT_OK;
+}
+
+#define kLzmaStreamWasFinishedId (-1)
+
+int LzmaDecode(CLzmaDecoderState *vs,
+    #ifdef _LZMA_IN_CB
+    ILzmaInCallback *InCallback,
+    #else
+    const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
+    #endif
+    unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed)
+{
+  CProb *p = vs->Probs;
+  SizeT nowPos = 0;
+  Byte previousByte = 0;
+  UInt32 posStateMask = (1 << (vs->Properties.pb)) - 1;
+  UInt32 literalPosMask = (1 << (vs->Properties.lp)) - 1;
+  int lc = vs->Properties.lc;
+  CRangeDecoder rd;
+
+  #ifdef _LZMA_OUT_READ
+
+  int state = vs->State;
+  UInt32 rep0 = vs->Reps[0], rep1 = vs->Reps[1], rep2 = vs->Reps[2], rep3 = vs->Reps[3];
+  int len = vs->RemainLen;
+  UInt32 globalPos = vs->GlobalPos;
+  UInt32 distanceLimit = vs->DistanceLimit;
+
+  Byte *dictionary = vs->Dictionary;
+  UInt32 dictionarySize = vs->Properties.DictionarySize;
+  UInt32 dictionaryPos = vs->DictionaryPos;
+
+  Byte tempDictionary[4];
+
+  rd.Range = vs->Range;
+  rd.Code = vs->Code;
+  #ifdef _LZMA_IN_CB
+  rd.InCallback = InCallback;
+  rd.Buffer = vs->Buffer;
+  rd.BufferLim = vs->BufferLim;
+  #else
+  rd.Buffer = inStream;
+  rd.BufferLim = inStream + inSize;
+  #endif
+
+  #ifndef _LZMA_IN_CB
+  *inSizeProcessed = 0;
+  #endif
+  *outSizeProcessed = 0;
+  if (len == kLzmaStreamWasFinishedId)
+    return LZMA_RESULT_OK;
+
+  if (dictionarySize == 0)
+  {
+    dictionary = tempDictionary;
+    dictionarySize = 1;
+    tempDictionary[0] = vs->TempDictionary[0];
+  }
+
+  if (len == kLzmaNeedInitId)
+  {
+    {
+      UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp));
+      UInt32 i;
+      for (i = 0; i < numProbs; i++)
+        p[i] = kBitModelTotal >> 1;
+      rep0 = rep1 = rep2 = rep3 = 1;
+      state = 0;
+      globalPos = 0;
+      distanceLimit = 0;
+      dictionaryPos = 0;
+      dictionary[dictionarySize - 1] = 0;
+      RangeDecoderInit(&rd
+          #ifndef _LZMA_IN_CB
+          , inStream, inSize
+          #endif
+          );
+      #ifdef _LZMA_IN_CB
+      if (rd.Result != LZMA_RESULT_OK)
+        return rd.Result;
+      #endif
+      if (rd.ExtraBytes != 0)
+        return LZMA_RESULT_DATA_ERROR;
+    }
+    len = 0;
+  }
+  while(len != 0 && nowPos < outSize)
+  {
+    UInt32 pos = dictionaryPos - rep0;
+    if (pos >= dictionarySize)
+      pos += dictionarySize;
+    outStream[nowPos++] = dictionary[dictionaryPos] = dictionary[pos];
+    if (++dictionaryPos == dictionarySize)
+      dictionaryPos = 0;
+    len--;
+  }
+  if (dictionaryPos == 0)
+    previousByte = dictionary[dictionarySize - 1];
+  else
+    previousByte = dictionary[dictionaryPos - 1];
+
+  #ifdef _LZMA_IN_CB
+  rd.Result = LZMA_RESULT_OK;
+  #endif
+  rd.ExtraBytes = 0;
+
+  #else /* if !_LZMA_OUT_READ */
+
+  int state = 0;
+  UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
+  int len = 0;
+
+  #ifndef _LZMA_IN_CB
+  *inSizeProcessed = 0;
+  #endif
+  *outSizeProcessed = 0;
+
+  {
+    UInt32 i;
+    UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp));
+    for (i = 0; i < numProbs; i++)
+      p[i] = kBitModelTotal >> 1;
+  }
+
+  #ifdef _LZMA_IN_CB
+  rd.InCallback = InCallback;
+  #endif
+  RangeDecoderInit(&rd
+      #ifndef _LZMA_IN_CB
+      , inStream, inSize
+      #endif
+      );
+
+  #ifdef _LZMA_IN_CB
+  if (rd.Result != LZMA_RESULT_OK)
+    return rd.Result;
+  #endif
+  if (rd.ExtraBytes != 0)
+    return LZMA_RESULT_DATA_ERROR;
+
+  #endif /* _LZMA_OUT_READ */
+
+
+  while(nowPos < outSize)
+  {
+    int posState = (int)(
+        (nowPos
+        #ifdef _LZMA_OUT_READ
+        + globalPos
+        #endif
+        )
+        & posStateMask);
+    #ifdef _LZMA_IN_CB
+    if (rd.Result != LZMA_RESULT_OK)
+      return rd.Result;
+    #endif
+    if (rd.ExtraBytes != 0)
+      return LZMA_RESULT_DATA_ERROR;
+    if (RangeDecoderBitDecode(p + IsMatch + (state << kNumPosBitsMax) + posState, &rd) == 0)
+    {
+      CProb *probs = p + Literal + (LZMA_LIT_SIZE *
+        (((
+        (nowPos
+        #ifdef _LZMA_OUT_READ
+        + globalPos
+        #endif
+        )
+        & literalPosMask) << lc) + (previousByte >> (8 - lc))));
+
+      if (state >= kNumLitStates)
+      {
+        Byte matchByte;
+        #ifdef _LZMA_OUT_READ
+        UInt32 pos = dictionaryPos - rep0;
+        if (pos >= dictionarySize)
+          pos += dictionarySize;
+        matchByte = dictionary[pos];
+        #else
+        matchByte = outStream[nowPos - rep0];
+        #endif
+        previousByte = LzmaLiteralDecodeMatch(probs, &rd, matchByte);
+      }
+      else
+        previousByte = LzmaLiteralDecode(probs, &rd);
+      outStream[nowPos++] = previousByte;
+      #ifdef _LZMA_OUT_READ
+      if (distanceLimit < dictionarySize)
+        distanceLimit++;
+
+      dictionary[dictionaryPos] = previousByte;
+      if (++dictionaryPos == dictionarySize)
+        dictionaryPos = 0;
+      #endif
+      if (state < 4) state = 0;
+      else if (state < 10) state -= 3;
+      else state -= 6;
+    }
+    else
+    {
+      if (RangeDecoderBitDecode(p + IsRep + state, &rd) == 1)
+      {
+        if (RangeDecoderBitDecode(p + IsRepG0 + state, &rd) == 0)
+        {
+          if (RangeDecoderBitDecode(p + IsRep0Long + (state << kNumPosBitsMax) + posState, &rd) == 0)
+          {
+            #ifdef _LZMA_OUT_READ
+            UInt32 pos;
+            #endif
+
+            #ifdef _LZMA_OUT_READ
+            if (distanceLimit == 0)
+            #else
+            if (nowPos == 0)
+            #endif
+              return LZMA_RESULT_DATA_ERROR;
+
+            state = state < 7 ? 9 : 11;
+            #ifdef _LZMA_OUT_READ
+            pos = dictionaryPos - rep0;
+            if (pos >= dictionarySize)
+              pos += dictionarySize;
+            previousByte = dictionary[pos];
+            dictionary[dictionaryPos] = previousByte;
+            if (++dictionaryPos == dictionarySize)
+              dictionaryPos = 0;
+            #else
+            previousByte = outStream[nowPos - rep0];
+            #endif
+            outStream[nowPos++] = previousByte;
+
+            #ifdef _LZMA_OUT_READ
+            if (distanceLimit < dictionarySize)
+              distanceLimit++;
+            #endif
+            continue;
+          }
+        }
+        else
+        {
+          UInt32 distance;
+          if(RangeDecoderBitDecode(p + IsRepG1 + state, &rd) == 0)
+            distance = rep1;
+          else
+          {
+            if(RangeDecoderBitDecode(p + IsRepG2 + state, &rd) == 0)
+              distance = rep2;
+            else
+            {
+              distance = rep3;
+              rep3 = rep2;
+            }
+            rep2 = rep1;
+          }
+          rep1 = rep0;
+          rep0 = distance;
+        }
+        len = LzmaLenDecode(p + RepLenCoder, &rd, posState);
+        state = state < 7 ? 8 : 11;
+      }
+      else
+      {
+        int posSlot;
+        rep3 = rep2;
+        rep2 = rep1;
+        rep1 = rep0;
+        state = state < 7 ? 7 : 10;
+        len = LzmaLenDecode(p + LenCoder, &rd, posState);
+        posSlot = RangeDecoderBitTreeDecode(p + PosSlot +
+            ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
+            kNumPosSlotBits), kNumPosSlotBits, &rd);
+        if (posSlot >= kStartPosModelIndex)
+        {
+          int numDirectBits = ((posSlot >> 1) - 1);
+          rep0 = ((2 | ((UInt32)posSlot & 1)) << numDirectBits);
+          if (posSlot < kEndPosModelIndex)
+          {
+            rep0 += RangeDecoderReverseBitTreeDecode(
+                p + SpecPos + rep0 - posSlot - 1, numDirectBits, &rd);
+          }
+          else
+          {
+            rep0 += RangeDecoderDecodeDirectBits(&rd,
+                numDirectBits - kNumAlignBits) << kNumAlignBits;
+            rep0 += RangeDecoderReverseBitTreeDecode(p + Align, kNumAlignBits, &rd);
+          }
+        }
+        else
+          rep0 = posSlot;
+        if (++rep0 == (UInt32)(0))
+        {
+          /* it's for stream version */
+          len = kLzmaStreamWasFinishedId;
+          break;
+        }
+      }
+
+      len += kMatchMinLen;
+      #ifdef _LZMA_OUT_READ
+      if (rep0 > distanceLimit)
+      #else
+      if (rep0 > nowPos)
+      #endif
+        return LZMA_RESULT_DATA_ERROR;
+
+      #ifdef _LZMA_OUT_READ
+      if (dictionarySize - distanceLimit > (UInt32)len)
+        distanceLimit += len;
+      else
+        distanceLimit = dictionarySize;
+      #endif
+
+      do
+      {
+        #ifdef _LZMA_OUT_READ
+        UInt32 pos = dictionaryPos - rep0;
+        if (pos >= dictionarySize)
+          pos += dictionarySize;
+        previousByte = dictionary[pos];
+        dictionary[dictionaryPos] = previousByte;
+        if (++dictionaryPos == dictionarySize)
+          dictionaryPos = 0;
+        #else
+        previousByte = outStream[nowPos - rep0];
+        #endif
+        len--;
+        outStream[nowPos++] = previousByte;
+      }
+      while(len != 0 && nowPos < outSize);
+    }
+  }
+
+
+  #ifdef _LZMA_OUT_READ
+  vs->Range = rd.Range;
+  vs->Code = rd.Code;
+  vs->DictionaryPos = dictionaryPos;
+  vs->GlobalPos = globalPos + (UInt32)nowPos;
+  vs->DistanceLimit = distanceLimit;
+  vs->Reps[0] = rep0;
+  vs->Reps[1] = rep1;
+  vs->Reps[2] = rep2;
+  vs->Reps[3] = rep3;
+  vs->State = state;
+  vs->RemainLen = len;
+  vs->TempDictionary[0] = tempDictionary[0];
+  #endif
+
+  #ifdef _LZMA_IN_CB
+  vs->Buffer = rd.Buffer;
+  vs->BufferLim = rd.BufferLim;
+  #else
+  *inSizeProcessed = (SizeT)(rd.Buffer - inStream);
+  #endif
+  *outSizeProcessed = nowPos;
+  return LZMA_RESULT_OK;
+}
diff --git a/lib_generic/lzma/LzmaTools.c b/lib_generic/lzma/LzmaTools.c
index 5ac42e5..f01e827 100644
--- a/lib_generic/lzma/LzmaTools.c
+++ b/lib_generic/lzma/LzmaTools.c
@@ -33,7 +33,6 @@
  * uchar   data[*]
  *
  */
-
 #include <config.h>
 #include <common.h>
 
@@ -49,6 +48,8 @@
 #include <linux/string.h>
 #include <malloc.h>
 
+#define LZMA_DECOMPRESS_NOALLOC
+
 int lzmaBuffToBuffDecompress (unsigned char *outStream, SizeT *uncompressedSize,
 			      unsigned char *inStream,  SizeT  length)
 {
@@ -64,11 +65,11 @@
 	unsigned char properties[LZMA_PROPERTIES_SIZE];
 	SizeT compressedSize = (SizeT)(length - LZMA_DATA_OFFSET);
 
-	debug ("LZMA: Image address............... 0x%lx\n", inStream);
-	debug ("LZMA: Properties address.......... 0x%lx\n", inStream + LZMA_PROPERTIES_OFFSET);
-	debug ("LZMA: Uncompressed size address... 0x%lx\n", inStream + LZMA_SIZE_OFFSET);
-	debug ("LZMA: Compressed data address..... 0x%lx\n", inStream + LZMA_DATA_OFFSET);
-	debug ("LZMA: Destination address......... 0x%lx\n", outStream);
+	debug ("LZMA: Image address............... 0x%lx\n", (unsigned long) inStream);
+	debug ("LZMA: Properties address.......... 0x%lx\n", (unsigned long) inStream + LZMA_PROPERTIES_OFFSET);
+	debug ("LZMA: Uncompressed size address... 0x%lx\n", (unsigned long) inStream + LZMA_SIZE_OFFSET);
+	debug ("LZMA: Compressed data address..... 0x%lx\n", (unsigned long) inStream + LZMA_DATA_OFFSET);
+	debug ("LZMA: Destination address......... 0x%lx\n", (unsigned long) outStream);
 
 	memcpy(properties, inStream + LZMA_PROPERTIES_OFFSET, LZMA_PROPERTIES_SIZE);
 
@@ -109,21 +110,31 @@
 	        return LZMA_RESULT_DATA_ERROR;
 	}
 
-	debug ("LZMA: Uncompresed size............ 0x%lx\n", outSizeFull);
-	debug ("LZMA: Compresed size.............. 0x%lx\n", compressedSize);
-	debug ("LZMA: Dynamic memory needed....... 0x%lx", LzmaGetNumProbs(&state.Properties) * sizeof(CProb));
+	debug ("LZMA: Uncompresed size............ 0x%lx\n", (unsigned long) outSizeFull);
+	debug ("LZMA: Compresed size.............. 0x%lx\n", (unsigned long) compressedSize);
 
+#ifdef LZMA_DECOMPRESS_NOALLOC
+	debug ("LZMA: Decompress buffer needed.... 0x%lx\n",
+			(unsigned long) LzmaGetNumProbs(&state.Properties) * sizeof(CProb));
+	/* decompression buffer lives at the end of the decompressed image area */
+	state.Probs = (void*)(((unsigned long) outStream + outSizeFull + 0x80) & ~(0x80 - 1));
+#else
+	debug ("LZMA: Dynamic memory needed....... 0x%lx, allocating...\n",
+			(unsigned long) LzmaGetNumProbs(&state.Properties) * sizeof(CProb));
 	state.Probs = (CProb *)malloc(LzmaGetNumProbs(&state.Properties) * sizeof(CProb));
+#endif
 
 	if (state.Probs == 0
 	    || (outStream == 0 && outSizeFull != 0)
 	    || (inStream == 0 && compressedSize != 0)) {
+#ifndef LZMA_DECOMPRESS_NOALLOC
 		free(state.Probs);
+#endif
 		debug ("\n");
 		return LZMA_RESULT_DATA_ERROR;
 	}
 
-	debug (" allocated.\n");
+	debug ("LZMA: Decompress buffer at........ 0x%lx\n", (unsigned long) state.Probs);
 
 	/* Decompress */
 
@@ -135,7 +146,9 @@
 	}
 
 	*uncompressedSize = outProcessed;
+#ifndef LZMA_DECOMPRESS_NOALLOC
 	free(state.Probs);
+#endif
 	return res;
 }
 
diff --git a/lib_generic/string.c b/lib_generic/string.c
index 181eda6..f598d8f 100644
--- a/lib_generic/string.c
+++ b/lib_generic/string.c
@@ -15,6 +15,7 @@
  *    reentrant and should be faster). Use only strsep() in new code, please.
  */
 
+#include <common.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/ctype.h>
diff --git a/mkconfig b/mkconfig
index b0bbbd1..cf38da3 100755
--- a/mkconfig
+++ b/mkconfig
@@ -75,14 +75,17 @@
 #
 # Create board specific header file
 #
+boardconfigtmp=config.h.$1.tmp
 if [ "$APPEND" = "yes" ]	# Append to existing config file
 then
-	echo >> config.h
+	echo >> $boardconfigtmp
 else
-	> config.h		# Create new config file
+	> $boardconfigtmp		# Create new config file
 fi
-echo "/* Automatically generated - do not edit */" >>config.h
-echo "#include <configs/$1.h>" >>config.h
-echo "#include <asm/config.h>" >>config.h
-
+echo "/* Automatically generated - do not edit */" >>$boardconfigtmp
+echo "#include <configs/$1.h>" >>$boardconfigtmp
+echo "#include <asm/config.h>" >>$boardconfigtmp
+cmp $boardconfigtmp config.h.$1 || cp -v $boardconfigtmp config.h.$1
+ln -fs config.h.$1 config.h
+rm $boardconfigtmp
 exit 0
diff --git a/net/bootp.c b/net/bootp.c
index 3dea70a..9b5faab 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -370,6 +370,13 @@
 	}
 }
 
+static u8 BootpQtnVendorInfo(u8 * payload) {
+	static const char vendor_specific_payload[] = "QUANTENNA-RGMII";
+	size_t payload_size = strlen(vendor_specific_payload) + 1;
+	memcpy(payload, vendor_specific_payload, payload_size);
+	return payload_size;
+}
+
 /*
  *	Initialize BOOTP extension fields in the request.
  */
@@ -553,6 +560,12 @@
 	e   += 32;
 #endif
 
+#if defined(CONFIG_BOOTP_QTN_VENDORINFO)
+	*e++ = 43;
+	*e = BootpQtnVendorInfo(e + 1);
+	e += *e + 1;
+#endif
+
 	*e++ = 255;		/* End of the list */
 
 	return e - start;
diff --git a/net/eth.c b/net/eth.c
index 6cdefee..9236cce 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -203,9 +203,10 @@
 	mv6446x_eth_initialize(bis);
 #endif
 
-#if defined (CONFIG_ARC)
-    arc_eth_init(bis);
+#if defined (CONFIG_ARC_EMAC)
+	arc_eth_init(bis);
 #endif 
+
 	if (!eth_devices) {
 		puts ("No ethernet found.\n");
 		show_boot_progress (-64);
diff --git a/net/net.c b/net/net.c
index 48cc54b..582d621 100644
--- a/net/net.c
+++ b/net/net.c
@@ -114,6 +114,7 @@
 #define ET_DEBUG
 #endif
 
+#define ETHLOOP_LEN		64
 /** BOOTP EXTENTIONS **/
 
 IPaddr_t	NetOurSubnetMask=0;		/* Our subnet mask (0=unknown)	*/
@@ -146,6 +147,7 @@
 			{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 uchar		NetEtherNullAddr[6] =
 			{ 0, 0, 0, 0, 0, 0 };
+uchar		EtherPacket[ETHLOOP_LEN];	/* buffer for loopback test frame */
 #ifdef CONFIG_API
 void		(*push_packet)(volatile void *, int len) = 0;
 #endif
@@ -164,6 +166,13 @@
 ushort		NetOurVLAN = 0xFFFF;		/* default is without VLAN	*/
 ushort		NetOurNativeVLAN = 0xFFFF;	/* ditto			*/
 
+#ifdef CONFIG_TFTP_SERVER
+int NetRunTftpServer = 0;
+uchar TftpRemoteEther[6] = { 0, 0, 0, 0, 0, 0};
+IPaddr_t TftpRemoteIP = 0;
+#endif
+
+
 char		BootFile[128];		/* Boot File name			*/
 
 #if defined(CONFIG_CMD_PING)
@@ -172,6 +181,12 @@
 static void PingStart(void);
 #endif
 
+#if defined(CONFIG_CMD_ETHLOOP)
+static void EthLoopStart(void);
+void enable_phy_loopback(void);
+void disable_phy_loopback(void);
+#endif
+
 #if defined(CONFIG_CMD_CDP)
 static void CDPStart(void);
 #endif
@@ -285,7 +300,8 @@
 
 	/* update only when the environment has changed */
 	if (env_changed_id != env_id) {
-		NetCopyIP(&NetOurIP, &bd->bi_ip_addr);
+		NetOurIP = getenv_IPaddr("ipaddr");
+		NetCopyIP(&bd->bi_ip_addr, &NetOurIP);
 		NetOurGatewayIP = getenv_IPaddr ("gatewayip");
 		NetOurSubnetMask= getenv_IPaddr ("netmask");
 		NetServerIP = getenv_IPaddr ("serverip");
@@ -382,7 +398,15 @@
 		switch (protocol) {
 		case TFTP:
 			/* always use ARP to get server ethernet address */
-			TftpStart();
+#ifdef CONFIG_TFTP_SERVER
+			if (NetRunTftpServer) {
+				TftpStartServer();
+			} else {
+#endif
+				TftpStart();
+#ifdef CONFIG_TFTP_SERVER
+			}
+#endif
 			break;
 
 #if defined(CONFIG_CMD_DHCP)
@@ -406,6 +430,11 @@
 			PingStart();
 			break;
 #endif
+#if defined(CONFIG_CMD_ETHLOOP)
+		case ETHLOOP:
+			EthLoopStart();
+			break;
+#endif
 #if defined(CONFIG_CMD_NFS)
 		case NFS:
 			NfsStart();
@@ -514,13 +543,13 @@
 		case NETLOOP_SUCCESS:
 			if (NetBootFileXferSize > 0) {
 				char buf[20];
-				printf("Bytes transferred = %ld (%lx hex)\n",
+				printf("Bytes transferred = %ld (0x%lx)\n",
 					NetBootFileXferSize,
 					NetBootFileXferSize);
-				sprintf(buf, "%lX", NetBootFileXferSize);
+				sprintf(buf, "0x%lx", NetBootFileXferSize);
 				setenv("filesize", buf);
 
-				sprintf(buf, "%lX", (unsigned long)load_addr);
+				sprintf(buf, "0x%lx", (unsigned long)load_addr);
 				setenv("fileaddr", buf);
 			}
 			eth_halt();
@@ -747,13 +776,65 @@
 #if defined(CONFIG_NET_MULTI)
 	printf ("Using %s device\n", eth_get_name());
 #endif	/* CONFIG_NET_MULTI */
-	NetSetTimeout (100000000UL, PingTimeout);
+	NetSetTimeout (10000UL, PingTimeout);
 	NetSetHandler (PingHandler);
 
 	PingSend();
 }
 #endif
 
+#if defined(CONFIG_CMD_ETHLOOP)
+int EthLoopSend(void)
+{
+	int i;
+	uchar *pkt;
+
+	for (i = 0; i < ETHLOOP_LEN; i++)
+		EtherPacket[i] = i;
+
+	pkt = (uchar *)EtherPacket;
+	pkt += NetSetEther(pkt, NetOurEther, PROT_TEST); /* set our MAC address as destination address */
+
+	(void) eth_send(EtherPacket, ETHLOOP_LEN);
+	(void) eth_send(EtherPacket, ETHLOOP_LEN);
+
+	return 1;
+}
+
+static void EthLoopTimeout(void)
+{
+	eth_halt();
+	NetState = NETLOOP_FAIL;	/* we did not get the reply */
+}
+
+static void EthLoopHandler(uchar *pkt, unsigned dest, unsigned src, unsigned len)
+{
+	int i;
+
+	len -= 4; /* crc field is excluded */
+	NetState = NETLOOP_SUCCESS;
+	for (i = ETHER_HDR_SIZE ; i < len ; i++) {
+		if (EtherPacket[i] != pkt[i]) {
+			NetState = NETLOOP_FAIL;
+			break;
+		}
+	}
+
+}
+
+static void EthLoopStart(void)
+{
+	enable_phy_loopback();
+#if defined(CONFIG_NET_MULTI)
+	printf("Using %s device\n", eth_get_name());
+#endif	/* CONFIG_NET_MULTI */
+	NetSetTimeout(10000UL, EthLoopTimeout);
+	NetSetHandler(EthLoopHandler);
+
+	EthLoopSend();
+}
+#endif
+
 #if defined(CONFIG_CMD_CDP)
 
 #define CDP_DEVICE_ID_TLV		0x0001
@@ -1435,6 +1516,10 @@
 		} else if (ip->ip_p != IPPROTO_UDP) {	/* Only UDP packets */
 			return;
 		}
+#ifdef CONFIG_TFTP_SERVER
+		TftpRemoteIP = NetReadIP(&ip->ip_src);
+#endif
+
 
 #ifdef CONFIG_UDP_CHECKSUM
 		if (ip->udp_xsum != 0) {
@@ -1492,6 +1577,10 @@
 						ntohs(ip->udp_src),
 						ntohs(ip->udp_len) - 8);
 		break;
+	case PROT_TEST:
+		/* printf ("Got ethernet loopback frame, len=%d\n", NetRxPktLen); */
+		(*packetHandler)((uchar *)NetRxPkt, 0, 0, NetRxPktLen);
+		break;
 	}
 }
 
@@ -1580,6 +1669,13 @@
 	return !((NetCksum(ptr, len) + 1) & 0xfffe);
 }
 
+#ifdef CONFIG_TFTP_SERVER
+void ResetNetLoop(void)
+{
+	timeHandler = 0;
+	NetState = NETLOOP_RESTART;
+}
+#endif
 
 unsigned
 NetCksum(uchar * ptr, int len)
@@ -1666,7 +1762,7 @@
 	ip->ip_sum   = ~NetCksum((uchar *)ip, IP_HDR_SIZE_NO_UDP / 2);
 }
 
-void copy_filename (char *dst, char *src, int size)
+void copy_filename (char *dst, const char *src, int size)
 {
 	if (*src && (*src == '"')) {
 		++src;
diff --git a/net/nfs.c b/net/nfs.c
index e794c9a..0101629 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -674,8 +674,7 @@
 
 	case STATE_READ_REQ:
 		rlen = nfs_read_reply (pkt, len);
-// ARC Added CONFIG_SYS_HZ
-		NetSetTimeout (NFS_TIMEOUT * CONFIG_SYS_HZ, NfsTimeout);
+		NetSetTimeout (NFS_TIMEOUT, NfsTimeout);
 		if (rlen > 0) {
 			nfs_offset += rlen;
 			NfsSend ();
@@ -762,8 +761,7 @@
 	printf ("\nLoad address: 0x%lx\n"
 		"Loading: *\b", load_addr);
 
-// ARC Added CONFIG_SYS_HZ
-	NetSetTimeout (NFS_TIMEOUT*CONFIG_SYS_HZ, NfsTimeout);
+	NetSetTimeout (NFS_TIMEOUT, NfsTimeout);
 	NetSetHandler (NfsHandler);
 
 	NfsTimeoutCount = 0;
diff --git a/net/tftp.c b/net/tftp.c
index efc1983..211b086 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -15,8 +15,7 @@
 #if defined(CONFIG_CMD_NET)
 
 #define WELL_KNOWN_PORT	69		/* Well known TFTP port #		*/
-// ARC
-#define TIMEOUT		50000UL		/* Millisecs to timeout for lost pkt */
+#define TIMEOUT		5000UL		/* Millisecs to timeout for lost pkt */
 #ifndef	CONFIG_NET_RETRY_COUNT
 # define TIMEOUT_COUNT	10		/* # of timeouts before giving up  */
 #else
@@ -35,8 +34,7 @@
 #define TFTP_ERROR	5
 #define TFTP_OACK	6
 
-// ARC Added CONFIG_SYS_HZ
-static ulong TftpTimeoutMSecs = TIMEOUT*CONFIG_SYS_HZ;
+static ulong TftpTimeoutMSecs = TIMEOUT;
 static int TftpTimeoutCountMax = TIMEOUT_COUNT;
 
 /*
@@ -64,9 +62,16 @@
 #define STATE_RRQ	1
 #define STATE_DATA	2
 #define STATE_TOO_LARGE	3
-#define STATE_BAD_MAGIC	4
 #define STATE_OACK	5
 
+
+#ifdef CONFIG_TFTP_SERVER
+#define STATE_WRQ 6
+#define STATE_BAD_IMAGE_TYPE 7
+static int TftpRemotePort;
+#endif
+
+
 #define TFTP_BLOCK_SIZE		512		    /* default TFTP block size	*/
 #define TFTP_SEQUENCE_SIZE	((ulong)(1<<16))    /* sequence number is 16 bit */
 
@@ -89,7 +94,11 @@
  * Minus eth.hdrs thats 1468.  Can get 2x better throughput with
  * almost-MTU block sizes.  At least try... fall back to 512 if need be.
  */
-#define TFTP_MTU_BLOCKSIZE 1468
+/* Reduce the MTU size ot 1460 because in vlan mode, the packets will be
+ * 1518 bytes which exceed the EMAC's capability and these packets will
+ * be discard silently.
+ */
+#define TFTP_MTU_BLOCKSIZE 1460
 static unsigned short TftpBlkSize=TFTP_BLOCK_SIZE;
 static unsigned short TftpBlkSizeOption=TFTP_MTU_BLOCKSIZE;
 
@@ -212,7 +221,7 @@
 		 && eth_get_dev()->mcast) {
 			free(Bitmap);
 			Bitmap=NULL;
-			pkt += sprintf((char *)pkt,"multicast%c%c",0,0);
+			pkt += sprintf((char *)pkt, "multicast%c%c", 0, 0);
 		}
 #endif /* CONFIG_MCAST_TFTP */
 		len = pkt - xp;
@@ -225,6 +234,19 @@
 			TftpBlock=ext2_find_next_zero_bit(Bitmap,(Mapsize*8),0);
 		/*..falling..*/
 #endif
+#ifdef CONFIG_TFTP_SERVER
+		if (NetRunTftpServer && TftpBlkSize != TFTP_BLOCK_SIZE
+		    && TftpBlkSize <= TFTP_MTU_BLOCKSIZE) {
+			xp = pkt;
+			s = (ushort *)pkt;
+			*s++ = htons(TFTP_OACK);
+			pkt = (uchar *)s;
+			pkt += sprintf((char *)pkt, "blksize%c%d%c",
+					0, TftpBlkSize, 0);
+			len = pkt - xp;
+			break;
+		}
+#endif
 	case STATE_DATA:
 		xp = pkt;
 		s = (ushort *)pkt;
@@ -245,21 +267,48 @@
 		len = pkt - xp;
 		break;
 
-	case STATE_BAD_MAGIC:
+#ifdef CONFIG_TFTP_SERVER
+	case STATE_BAD_IMAGE_TYPE:
 		xp = pkt;
 		s = (ushort *)pkt;
 		*s++ = htons(TFTP_ERROR);
 		*s++ = htons(2);
-		pkt = (uchar *)s;
-		strcpy ((char *)pkt, "File has bad magic");
-		pkt += 18 /*strlen("File has bad magic")*/ + 1;
+		strcpy((char *)pkt, "No binary mode used");
+		pkt += 19/*strlen("No binary mode used")*/ + 1;
 		len = pkt - xp;
 		break;
-	}
+#endif
 
-	NetSendUDPPacket(NetServerEther, TftpServerIP, TftpServerPort, TftpOurPort, len);
+	}
+#ifdef CONFIG_TFTP_SERVER
+	if (NetRunTftpServer) {
+		NetSendUDPPacket(TftpRemoteEther, TftpRemoteIP, TftpRemotePort,
+				 TftpOurPort, len);
+		if (TftpState == STATE_BAD_IMAGE_TYPE) {
+			puts("\nNo binary mode used!\n");
+			ResetNetLoop();
+		}
+	} else {
+#endif
+		NetSendUDPPacket(NetServerEther, TftpServerIP, TftpServerPort,
+				 TftpOurPort, len);
+#ifdef CONFIG_TFTP_SERVER
+	}
+#endif
 }
 
+#ifdef CONFIG_TFTP_SERVER
+unsigned char *find_option(uchar *pkt, char *option, unsigned total_len)
+{
+	unsigned i = 0, option_len;
+	option_len = strlen(option);
+	for (; i < total_len-option_len; i++) {
+		if (0 == strcmp((char *)(pkt+i), option))
+			return pkt+i;
+	}
+	return NULL;
+}
+#endif
 
 static void
 TftpHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len)
@@ -267,6 +316,9 @@
 	ushort proto;
 	ushort *s;
 	int i;
+#ifdef CONFIG_TFTP_SERVER
+	uchar *option;
+#endif
 
 	if (dest != TftpOurPort) {
 #ifdef CONFIG_MCAST_TFTP
@@ -275,9 +327,19 @@
 #endif
 		return;
 	}
+#ifdef CONFIG_TFTP_SERVER
+	if (NetRunTftpServer) {
+		if (TftpState != STATE_WRQ && src != TftpRemotePort)
+			return;
+	} else {
+		if (TftpState != STATE_RRQ && src != TftpServerPort)
+			return;
+	}
+#else
 	if (TftpState != STATE_RRQ && src != TftpServerPort) {
 		return;
 	}
+#endif
 
 	if (len < 2) {
 		return;
@@ -290,13 +352,48 @@
 	switch (ntohs(proto)) {
 
 	case TFTP_RRQ:
-	case TFTP_WRQ:
 	case TFTP_ACK:
 		break;
 	default:
 		break;
+	case TFTP_WRQ:
+#ifdef CONFIG_TFTP_SERVER
+		if (NetRunTftpServer) {
+			TftpRemotePort = src;
+			printf("\nImage name:%s ", pkt);
+			pkt += strlen((char *)pkt) + 1;
+			len -= strlen((char *)pkt) + 1;
+
+			option = find_option(pkt, "octet", len);
+
+			if (!option) {
+				TftpState = STATE_BAD_IMAGE_TYPE;
+			} else {
+				pkt += strlen((char *)pkt) + 1;
+				TftpState = STATE_OACK;
+				option = find_option(pkt, "blksize", len);
+				if (option) {
+					TftpBlkSize = (unsigned short)simple_strtoul((char *)option+8, NULL, 10);
+					if (TftpBlkSize > TFTP_MTU_BLOCKSIZE) {
+						TftpBlkSize = TFTP_BLOCK_SIZE;
+					}
+				} else {
+					TftpBlkSize = TFTP_BLOCK_SIZE;
+				}
+				printf("blksize:%d\n", TftpBlkSize);
+				puts("\nReceive: *\b");
+			}
+			TftpSend(); /* Send ACK */
+		}
+#endif
+		break;
 
 	case TFTP_OACK:
+#ifdef CONFIG_TFTP_SERVER
+		if (NetRunTftpServer) {
+			break;
+		} else {
+#endif
 #ifdef ET_DEBUG
 		printf("Got OACK: %s %s\n", pkt, pkt+strlen(pkt)+1);
 #endif
@@ -326,6 +423,9 @@
 #endif
 		TftpSend (); /* Send ACK */
 		break;
+#ifdef CONFIG_TFTP_SERVER
+		}
+#endif
 	case TFTP_DATA:
 		if (len < 2)
 			return;
@@ -387,7 +487,7 @@
 		}
 
 		TftpLastBlock = TftpBlock;
-		TftpTimeoutMSecs = TIMEOUT * CONFIG_SYS_HZ;  // SRS
+		TftpTimeoutMSecs = TIMEOUT;
 		TftpTimeoutCountMax = TIMEOUT_COUNT;
 		NetSetTimeout (TftpTimeoutMSecs, TftpTimeout);
 
@@ -460,7 +560,11 @@
 static void
 TftpTimeout (void)
 {
+#ifdef CONFIG_TFTP_SERVER
+	if (!NetRunTftpServer && ++TftpTimeoutCount > TftpTimeoutCountMax) {
+#else
 	if (++TftpTimeoutCount > TftpTimeoutCountMax) {
+#endif
 		puts ("\nRetry count exceeded; starting again\n");
 #ifdef CONFIG_MCAST_TFTP
 		mcast_cleanup();
@@ -536,8 +640,7 @@
 
 	puts ("Loading: *\b");
 
-// ARC added CONFIG_SYS_HZ	
-TftpTimeoutMSecs = TftpRRQTimeoutMSecs * CONFIG_SYS_HZ;
+	TftpTimeoutMSecs = TftpRRQTimeoutMSecs;
 	TftpTimeoutCountMax = TftpRRQTimeoutCountMax;
 
 	NetSetTimeout (TftpTimeoutMSecs, TftpTimeout);
@@ -570,6 +673,26 @@
 	TftpSend ();
 }
 
+#ifdef CONFIG_TFTP_SERVER
+void
+TftpStartServer(void)
+{
+	printf("Load address: 0x%lx\n", load_addr);
+	printf("TFTPS Port : 69, IP : %pI4 ...\n", &NetOurIP);
+	NetSetTimeout(CONFIG_SYS_HZ/10, TftpTimeout);
+	NetSetHandler(TftpHandler);
+
+	TftpOurPort = WELL_KNOWN_PORT;
+	TftpTimeoutCount = 0;
+	TftpRemotePort = 0;
+	TftpState = STATE_WRQ;
+	TftpBlock = 0;
+
+	memset(TftpRemoteEther, 0, sizeof(TftpRemoteEther));
+	TftpRemoteIP = 0;
+}
+#endif
+
 #ifdef CONFIG_MCAST_TFTP
 /* Credits: atftp project.
  */
diff --git a/net/tftp.h b/net/tftp.h
index e3dfb26..42678f7 100644
--- a/net/tftp.h
+++ b/net/tftp.h
@@ -14,7 +14,7 @@
  */
 
 /* tftp.c */
-extern void	TftpStart (void);	/* Begin TFTP get */
+extern void	TftpStart(void);	/* Begin TFTP get */
 
 /**********************************************************************/
 
diff --git a/piggy.mk b/piggy.mk
new file mode 100644
index 0000000..7e1f769
--- /dev/null
+++ b/piggy.mk
@@ -0,0 +1,126 @@
+
+include helper.mk
+include ../Make.toolchain
+
+CFLAGS =
+CC = $(CROSS_COMPILE)gcc
+CPP = $(CROSS_COMPILE)gcc -E
+LD = $(CROSS_COMPILE)ld
+OBJCOPY = $(CROSS_COMPILE)objcopy
+
+TOPAZ_EP_MINI_UBOOT = 0
+ifeq ($(board_config),topaz_pcie_config)
+TOPAZ_EP_MINI_UBOOT = 1
+endif
+ifeq ($(board_config),topaz_pcie_realign_config)
+TOPAZ_EP_MINI_UBOOT = 1
+endif
+
+default: $(TARGET)-piggy $(TARGET)-piggy.bin
+
+ifeq ($(TARGET),u-boot-tiny)
+TEXT_BASE_OFFSET_PARENT = 0x0
+# must be equal to UBOOT_TINY_TEXT_BASE_OFFSET
+TEXT_BASE_OFFSET_CHILD = 0x14000
+CFLAGS += -DU_BOOT_MINI -DU_BOOT_TINY
+endif
+
+ifeq ($(TARGET),u-boot-mini)
+TEXT_BASE_OFFSET_PARENT = 0x0
+# must be equal to RUBY_MINI_TEXT_BASE_OFFSET
+TEXT_BASE_OFFSET_CHILD = 0x14000
+CFLAGS += -DU_BOOT_MINI
+endif
+
+ifeq ($(TARGET),u-boot)
+TEXT_BASE_OFFSET_PARENT = 0x0
+# must be equal to CONFIG_ARC_STAGE2_OFFSET
+TEXT_BASE_OFFSET_CHILD = 0x40000
+.PHONY: u-boot.bin
+endif
+
+BUILD_DIR=./$(TARGET).build
+
+-include $(shell find $(BUILD_DIR) -name \*.d)
+
+gccincdir = $(shell $(CC) -print-file-name=include)
+
+CFLAGS +=	-Wall -Werror -Wno-unused-parameter \
+		-Os \
+		-D__KERNEL__ -D__ARC__ -DRUBY_MINI \
+		-mA7 \
+		-fno-builtin -ffreestanding -fomit-frame-pointer \
+		-nostdinc \
+		-mno-sdata -mvolatile-cache -mno-millicode \
+		-pipe \
+		-Iinclude/ -Iboard/ruby/ -I../common/ -I../include/qtn/ \
+		-isystem $(gccincdir) \
+		-DTEXT_BASE_OFFSET=$(TEXT_BASE_OFFSET_PARENT) \
+		-DTEXT_BASE_OFFSET_CHILD=$(TEXT_BASE_OFFSET_CHILD) \
+		-DPIGGY_BUILD
+
+AFLAGS = -D__ASSEMBLY__ $(CFLAGS)
+
+.PHONY: FORCE
+.PRECIOUS: $(BUILD_DIR)/%.o $(BUILD_DIR)/%.bin.lzma.c $(BUILD_DIR)/u-boot.bin.lzma.o
+
+$(BUILD_DIR)/%.o: %.c
+	@mkdir -p $(@D)
+	$(CC) $(CFLAGS) $< -c -o $@ -MP -MD -MF $@.d
+
+$(BUILD_DIR)/%.o: %.S
+	@mkdir -p $(@D)
+	$(CC) $(AFLAGS) $< -c -o $@ -MP -MD -MF $@.d
+
+$(BUILD_DIR)/%.s: %.S
+	@mkdir -p $(@D)
+	$(CPP) $(AFLAGS) $< -o $@ -MP -MD -MF $@.d
+
+ifeq ($(PIGGY_DEBUG),1)
+CFLAGS += -DPIGGY_DEBUG
+DEBUG_OBJS =	\
+	board/ruby_mini/ruby_mini_common.o	\
+	board/ruby/serial.o			\
+	board/ruby/timer.o			\
+	board/ruby/gpio.o			\
+	board/ruby/reset.o			\
+	lib_generic/ctype.o			\
+	lib_generic/vsprintf.o			\
+	lib_generic/string.o
+
+LDFLAGS = -L $(tools_path)../lib/gcc/arc-linux-uclibc/4.2.1/ -lgcc
+endif
+
+ifeq ($(TOPAZ_EP_MINI_UBOOT),1)
+LZMA_LIB:=lib_generic/lzma/LzmaDecode.o
+else
+LZMA_LIB:=lib_generic/lzma/LzmaDecodeSize.o
+endif
+
+OBJS =	board/ruby/start.o		\
+	board/ruby/flip.o		\
+	cpu/arc/cache.o			\
+	${DEBUG_OBJS}			\
+	board/ruby_mini/ruby_piggy.o	\
+	lib_generic/lzma/LzmaTools.o	\
+	$(LZMA_LIB)
+
+LZMA = ../host/utilities/lzma
+LDMAP = $(BUILD_DIR)/u-boot-piggy.lds
+
+%.lzma: %
+	$(LZMA) --keep --best $< -c > $@
+
+$(BUILD_DIR)/%.bin.lzma.c: %.bin.lzma
+	@mkdir -p $(@D)
+	cat $< > $(@D)/payload
+	cd $(@D) && xxd -i payload > $(@F)
+
+%-piggy: %.bin $(OBJS:%=$(BUILD_DIR)/%) $(BUILD_DIR)/%.bin.lzma.o $(LDMAP)
+	$(LD) -Bstatic -T $(LDMAP) $(filter %.o,$^) -Map $@.map -o $@ $(LDFLAGS)
+
+%.bin: %
+	$(OBJCOPY) -O binary $< $@
+
+$(LDMAP): $(RUBY_MINI_LDMAP_SRC)
+	$(call build-mini-ldmap,$(CFLAGS))
diff --git a/qtn_tiny.mk b/qtn_tiny.mk
new file mode 100644
index 0000000..a415801
--- /dev/null
+++ b/qtn_tiny.mk
@@ -0,0 +1,86 @@
+#
+#  (C) Copyright 2015 Quantenna Communications Inc.
+#
+# Makefile for building the U-Boot Tiny (first stage bootloader)
+#
+
+include helper.mk
+include ../Make.toolchain
+
+CFLAGS =
+CC = $(CROSS_COMPILE)gcc
+CPP = $(CROSS_COMPILE)gcc -E
+LD = $(CROSS_COMPILE)ld
+OBJCOPY = $(CROSS_COMPILE)objcopy
+
+TARGET=tiny
+
+default: u-boot-$(TARGET) u-boot-$(TARGET).bin
+
+BUILD_DIR=./build_$(TARGET)
+
+-include $(shell if [ -d $(BUILD_DIR) ]; then \
+                     find $(BUILD_DIR)/ -name \*.d; \
+                 fi)
+
+gccincdir = $(shell $(CC) -print-file-name=include)
+UBOOT_TINY_TEXT_BASE_OFFSET = 0x14000
+
+CFLAGS +=	-Wall -Werror -Wno-unused-parameter \
+		-Os \
+		-D__KERNEL__ -D__ARC__ -DTOPAZ_TINY_UBOOT -DRUBY_MINI\
+		-mA7 \
+		-fno-builtin -ffreestanding -fomit-frame-pointer \
+		-nostdinc \
+		-mno-sdata -mvolatile-cache -mno-millicode \
+		-pipe \
+		-Iboard/ruby/ -Iinclude/ -I../common/ -I../include/qtn/ \
+		-isystem $(gccincdir) \
+		-DTEXT_BASE_OFFSET=$(UBOOT_TINY_TEXT_BASE_OFFSET) \
+
+AFLAGS = -D__ASSEMBLY__ $(CFLAGS)
+
+$(BUILD_DIR)/%.o: %.c
+	@mkdir -p $(@D)
+	$(CC) $(CFLAGS) $< -c -o $@ -MP -MD -MF $@.d
+
+$(BUILD_DIR)/%.o: %.S
+	@mkdir -p $(@D)
+	$(CC) $(AFLAGS) $< -c -o $@ -MP -MD -MF $@.d
+
+$(BUILD_DIR)/%.s: %.S
+	@mkdir -p $(@D)
+	$(CPP) $(AFLAGS) $< -o $@ -MP -MD -MF $@.d
+
+
+OBJS =	board/ruby/start.o			\
+	board/ruby/flip.o			\
+	cpu/arc/cache.o				\
+	board/ruby/gpio.o			\
+	board/ruby/timer.o			\
+	board/ruby/serial.o			\
+	board/ruby/reset.o			\
+	board/ruby/spi_api.o			\
+	board/ruby/newlib_io_copy.o		\
+	board/ruby/spi_flash.o			\
+	lib_generic/ctype.o			\
+	lib_generic/vsprintf.o			\
+	lib_generic/string.o			\
+	lib_generic/crc32.o			\
+	board/ruby_mini/ruby_mini_common.o	\
+	board/ruby_mini/ruby_tiny.o
+
+LDFLAGS = -L $(tools_path)../lib/gcc/arc-linux-uclibc/4.2.1/ -lgcc
+
+LDMAP = $(BUILD_DIR)/u-boot-$(TARGET).lds
+
+RUBY_TINY_OBJS = $(OBJS:%=$(BUILD_DIR)/%)
+
+u-boot-$(TARGET): $(RUBY_TINY_OBJS) $(LDMAP)
+	$(LD) -Bstatic -T $(LDMAP) $(RUBY_TINY_OBJS) -Map $@.map -o $@ $(LDFLAGS)
+
+%.bin: %
+	$(OBJCOPY) -O binary $< $@
+
+$(LDMAP): $(RUBY_MINI_LDMAP_SRC)
+	$(call build-mini-ldmap,$(CFLAGS))
diff --git a/quantenna.modified b/quantenna.modified
new file mode 100644
index 0000000..32034d1
--- /dev/null
+++ b/quantenna.modified
@@ -0,0 +1,14 @@
+Support for various peripherals (on-SoC and off-SoC).
+ - Timers.
+ - UARTs.
+ - GPIO.
+ - LED.
+ - DDR parts.
+ - Ethernet parts.
+ - SPI flash parts.
+Support for RGMII download.
+Support for boot from 64K flash.
+Support for PCIe.
+Debug functions.
+Boot functions.
+Bugfixes.
diff --git a/quantenna/Make.toolchain b/quantenna/Make.toolchain
new file mode 100644
index 0000000..f23b873
--- /dev/null
+++ b/quantenna/Make.toolchain
@@ -0,0 +1,6 @@
+tools_path := /usr/local/ARC/gcc/bin/
+target_prefix := arc-linux-uclibc-
+compile_prefix := ${tools_path}${target_prefix}
+CROSS_COMPILE := ${compile_prefix}
+ARCH := arc
+
diff --git a/quantenna/Makefile b/quantenna/Makefile
new file mode 100644
index 0000000..58a2180
--- /dev/null
+++ b/quantenna/Makefile
@@ -0,0 +1,769 @@
+#
+#  Copyright (c) 2007-2014 Quantenna Communications, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+# Top-level makefile for building the entire system.
+#
+
+default: help
+
+ifndef board_config
+-include board_config.mk
+endif
+
+include Make.toolchain
+
+# Provide a default config
+board_config ?= topaz_config
+board_platform ?= $(shell perl -e 'if ( "$(board_config)" =~ /topaz/ ) { print "topaz"; } else { print "ruby"; }')
+board_type ?= asic
+spi ?= yes
+wmac_mode ?= ap
+arc770 ?= no
+arc_rev_ge_4_10 ?= no
+qtn_hal_pm_corrupt_debug ?= no
+pre ?= no # include prepopulated files
+bb_only ?= 1
+br2_jlevel ?= $(shell echo -n $$((`nproc || echo 0` + 1)))
+
+br2_jlevel_max := 5
+br2_jlevel := $(shell \
+	if [ $(br2_jlevel) -gt $(br2_jlevel_max) ] ; \
+	then echo $(br2_jlevel_max) ; \
+	else echo $(br2_jlevel) ; \
+	fi)
+
+ifneq ($(filter topaz_pcie_config topaz_rgmii_config topaz_vzn_config,$(board_config)),)
+mini_uboot_enabled ?= 1
+endif
+
+ifneq ($(filter topaz_pcie_config,$(board_config)),)
+tiny_uboot_enabled ?= 0
+endif
+
+sigma_testbed_support_enabled ?= 0
+tkip_support_enabled ?= $(sigma_testbed_support_enabled)
+flash_env_size ?= 24
+
+# export firmware staging area to child makefiles
+QTN_FW_STAGING_REL = buildroot/target/device/Quantenna/Ruby/fw/$(board_platform)-bin
+QTN_FW_PREBUILD_REL = buildroot/target/device/Quantenna/Ruby/fw_bin/$(board_platform)-bin
+QTN_FW_STAGING = $(shell pwd)/$(QTN_FW_STAGING_REL)
+
+QTN_FW_PREBUILD = $(shell pwd)/$(QTN_FW_PREBUILD_REL)
+export QTN_FW_STAGING QTN_FW_STAGING_REL QTN_FW_PREBUILD
+
+AWK := awk
+CONFIG_AWK := ./post-process-configs.awk
+export NEW_CONFIG = .config.new
+first_run = .first_run
+
+QDRV_DIR = drivers/qdrv
+QDRV_CONFIG_FILE = $(QDRV_DIR)/qdrv_config.h
+PLATFORM_ID_FILE = buildroot/target/device/Quantenna/Ruby/scripts/platform_id
+POWER_TABLES_DIR = power_tables
+
+# Directory sub-tree names for the major modules in the RUBY software tree
+kdir      := linux
+udir      := u-boot
+fsdir     := buildroot
+hostdir   := host
+commondir := common
+macfwdir  := macfw
+aucfwdir  := aucfw
+rdspfwdir := rdspfw
+tftpdir   := tftp
+
+ifeq ($(ccache_enable),yes)
+compile_prefix := $(target_prefix)
+TARGET_CC_FOR_BR := TARGET_CC=$(target_prefix)gcc TARGET_CROSS=$(target_prefix)
+export PATH := $(PATH):$(tools_path)
+else
+compile_prefix := $(tools_path)$(target_prefix)
+TARGET_CC_FOR_BR :=
+endif
+
+# Where the kernel modules live
+INSTALL_MOD_PATH := $(PWD)/$(kdir)/modules
+
+# Configuration file names
+busybox := busybox-1.10.3
+qcsapi :=  $(shell cd buildroot/package/qcsapi; ls -d qcsapi-*.*)
+
+# The final image used by U-Boot to boot
+image_suffix :=
+.PHONY: image_suffix
+
+PROFILE_MUC_EP :=
+PROFILE_MUC_PG :=
+PROFILE_MUC_P :=
+PROFILE_LINUX_EP :=
+PROFILE_MUC_SAMPLE_DCACHE :=
+PROFILE_MUC_SAMPLE_IPTR :=
+PROFILE_MUC_SAMPLE_IPTR_AUC :=
+PROFILE_MUC_DROP_PACKETS :=
+PROFILE_LINUX_SAMPLE_IPTR :=
+PROFILE_LINUX_SAMPLE_DCACHE :=
+PROFILE_MUC_SAMPLE_DCACHE :=
+POST_RF_LOOP :=
+.PHONY: PROFILE_MUC_EP PROFILE_MUC_PG PROFILE_MUC_P PROFILE_LINUX_EP PROFILE_MUC_SAMPLE_DCACHE PROFILE_MUC_SAMPLE_IPTR PROFILE_MUC_SAMPLE_IPTR_AUC PROFILE_LINUX_SAMPLE_DCACHE PROFILE_MUC_DROP_PACKETS PROFILE_LINUX_SAMPLE_IPTR POST_RF_LOOP
+export PROFILE_MUC_EP
+export PROFILE_MUC_P
+export PROFILE_MUC_PG
+export PROFILE_LINUX_EP
+export PROFILE_MUC_SAMPLE_DCACHE
+export PROFILE_MUC_SAMPLE_IPTR
+export PROFILE_MUC_SAMPLE_IPTR_AUC
+export PROFILE_MUC_DROP_PACKETS
+export PROFILE_LINUX_SAMPLE_IPTR
+export PROFILE_LINUX_SAMPLE_DCACHE
+export POST_RF_LOOP
+
+uncompressed-boot-image := $(tftpdir)/$(board_platform)-linux.img$(image_suffix)
+gz-boot-image := $(tftpdir)/$(board_platform)-linux.gz.img$(image_suffix)
+lzma-boot-image := $(tftpdir)/$(board_platform)-linux.lzma.img$(image_suffix)
+
+# Where the kernel compiled image is...
+kimage := $(kdir)/arch/arc/boot/Image
+gz_compressed_kimage := $(kimage).gz
+lzma_compressed_kimage := $(kimage).lzma
+
+# lzma executable
+LZMA := host/utilities/lzma
+CHECK_LZMA_SIZE := host/utilities/check_lzma_image_size
+
+STORE_OBJS := linux/vmlinux macfw/qtn_ruby macfw/bb_only $(shell find drivers/ -name \*.ko)
+
+SPARSE = host/utilities/sparse/install/bin/sparse
+
+# What revision are we building?
+rev_num_file:=buildroot/target/device/Quantenna/Ruby/scripts/rev_num
+rev_num:=$(shell cat ${rev_num_file} 2>/dev/null)
+doc_rev_ext:=$(rev_num)
+
+$(fsdir)/.config.% $(fsdir)/package/busybox/$(busybox)/.config.%: ./configs/%
+	rm -f $(@F)
+	cat $< > $(@F)
+	$(AWK) -f $(CONFIG_AWK) $(@F)
+	cd $(fsdir); \
+		if ! cmp -s $(@F) $(NEW_CONFIG); then \
+			cp $(NEW_CONFIG) $(@F); fi
+	cd $(fsdir)/package/busybox/$(busybox); \
+		if ! cmp -s .config.$(@F) $(NEW_CONFIG); then \
+			cp $(NEW_CONFIG) $(@F); fi
+
+$(kdir)/.config.%: $(kdir)/arch/arc/configs/%
+	cat $< > $@
+
+BUILD_CONFIGS = $(fsdir)/.config.$(board_config)	\
+		$(fsdir)/package/busybox/$(busybox)/.config.$(board_config)	\
+		$(kdir)/.config.$(board_config)
+
+define setconfigs
+	# setting configurations to $(1)
+	cd $(kdir); \
+		ln -fs .config.$(1) .config.current; \
+		cp .config.current .config
+	cd $(fsdir); \
+		ln -fs .config.$(1) .config.current; \
+		cp .config.current .config
+	cd $(fsdir)/package/busybox/$(busybox);	\
+		ln -fs .config.$(1) .config.unpatched.current; \
+		touch .config.unpatched.current
+endef
+
+# copy possibly modified configs back over the board specific config
+define syncconfigs
+	# Syncing configs
+	@if [ -f $(kdir)/.config ] ; then \
+		cat $(kdir)/.config > $(kdir)/.config.current; \
+	fi
+
+	@if [ -f $(fsdir)/.config ] ; then \
+		cat $(fsdir)/.config > $(fsdir)/.config.current; \
+	fi
+endef
+
+test_config: buildroot/.config buildroot/package/busybox/busybox-1.10.3/.config
+	perl -e 'foreach $$file qw($^) { foreach $$line (`cat $$file`) { $$p = `dirname $$file`; chop($$p); print "#prefix0#$$p/#\n$$line"; } }' > configs/test
+	sed -i 's@#prefix0#buildroot/package@#prefix7#buildroot/package@' configs/test
+# -------------------------------------------------------------------------
+#                           Configuration targets
+# -------------------------------------------------------------------------
+
+help:
+	@echo "Use make image or make fromscratch"
+
+config: configupdate
+
+ALL_CONFIGS = 	topaz_config \
+		topaz_rfic6_config \
+		topaz_host_config \
+		topaz_pcie_config \
+		topaz_np_config \
+		topaz_rgmii_config \
+		topaz_vzn_config \
+		topaz_dbdc_config \
+		topaz_msmr_config \
+		topaz_msft_config
+
+.PHONY: $(ALL_CONFIGS) config get_current_config get_current_platform board_config board_platform
+
+ifeq ($(board_config),topaz_host_config)
+QTN_FWS := dsp
+else
+QTN_FWS := muc auc dsp
+endif
+
+define copy_if_changed
+	cmp --quiet $1 $2 || cp -v $1 $2
+endef
+
+board_config.mk.tmp: force
+	rm -f $@
+	echo "# Automatically generated file. Do not edit." >> $@
+	echo "# use 'make xxxx_config' instead" >> $@
+	echo "export board_config = $(board_config)" >> $@
+	echo "export board_type = $(board_type)" >> $@
+	echo "export board_platform = $(board_platform)" >> $@
+	echo "export spi = $(spi)" >> $@
+	echo "export qtn_hal_pm_corrupt_debug = $(qtn_hal_pm_corrupt_debug)" >> $@
+	echo "export wmac_mode = $(wmac_mode)" >> $@
+	echo "export arc770 = $(arc770)" >> $@
+	echo "export arc_rev_ge_4_10 = $(arc_rev_ge_4_10)" >> $@
+	echo "export pre = $(pre)" >> $@
+	echo "export bb_only = $(bb_only)" >> $@
+	@if [ "$(hw_config_id)" != "" ] ; then \
+		echo "export hw_config_id = $(hw_config_id)" >> $@; \
+	fi
+	$(call copy_if_changed,$@,board_config.mk)
+	rm $@
+
+common/current_platform.h.tmp: force
+	@echo "Board type: $(board_type) config: $(board_config) platform: $(board_platform) selected"
+	rm -f $@
+	touch $@
+ifeq ($(board_platform),topaz)
+	echo "#define TOPAZ_PLATFORM" >> $@
+ifeq ($(board_type),asic)
+	echo "#define TOPAZ_FPGA_PLATFORM 0" >> $@
+else
+	echo "#define TOPAZ_FPGA_PLATFORM 1" >> $@
+endif	# board type
+ifeq ($(filter topaz_pcie_config,$(board_config)),)
+	echo "#define TOPAZ_EMAC_NULL_BUF_WR" >> $@
+endif
+ifeq ($(ddr),umctl1)
+	@echo "DDR3 UMCTL-1 Configuration"
+	echo "#define TOPAZ_FPGA_UMCTL1" >> $@
+else
+	@echo "DDR3 UMCTL-2 Configuration"
+	echo "#undef TOPAZ_FPGA_UMCTL1" >> $@
+endif
+endif	# topaz
+ifeq ($(spi),no)
+	echo "#define PLATFORM_NOSPI $(spi)" >> $@
+endif
+ifneq ($(wmac_mode),)
+	@echo "WMAC Mode $(wmac_mode)"
+	echo "#define PLATFORM_WMAC_MODE $(wmac_mode)" >> $@
+endif
+ifneq ($(hw_config_id),)
+	@echo "Default hw_config_id $(hw_config_id)"
+	echo "#define PLATFORM_DEFAULT_BOARD_ID $(hw_config_id)" >> $@
+else
+	echo "#undef PLATFORM_DEFAULT_BOARD_ID" >> $@
+endif
+ifeq ($(arc770),yes)
+	echo "#define PLATFORM_ARC7_MMU_VER 3" >> $@
+endif
+ifneq ($(arc_rev_ge_4_10),yes)
+# For ARC hardware revisions prior to 4.10,
+# there is a hardware bug causing an ITLB Miss exception even if a
+# respective TLB entry already exists. This leads to duplicate TLB entries
+# if an ITLB Miss exception handler does not check whether such an entry
+# already exists:
+#
+# 1. Processor takes an ITLB Miss exception when the entry already exists.
+#
+# 2. ITLB Miss handler presumes that there is no such entry in TLB, and
+# looks for a proper TLB way and set to store the entry.
+#
+# 3. Because the hardware way selection is pseudo-random, it can return a
+# way number that may or may not match the way number of the existing
+# entry. If the way number is different, a duplicate TLB entry is created,
+# because the MMU checks for duplicate TLB entries only at the time of
+# look-up but not at the time of adding entries.
+#
+# The following ITLB Miss exception is eventually triggered with a cause
+# code indicating duplicated TLB entries. This may cause unexpected
+# behavior of the software.
+#
+# This option enables a software workaround for this HW problem.
+	echo "#define ARC_HW_REV_NEEDS_TLBMISS_FIX" >> $@
+endif
+ifeq ($(qtn_hal_pm_corrupt_debug),yes)
+	echo "#define QTN_HAL_PM_CORRUPT_DEBUG" >> $@
+endif
+ifneq ($(hbm_skb_allocator),)
+	echo "#define TOPAZ_HBM_SKB_ALLOCATOR_DEFAULT $(hbm_skb_allocator)" >> $@
+endif
+ifneq ($(hbm_payload_count_s),)
+	echo "#define TOPAZ_HBM_PAYLOAD_COUNT_S $(hbm_payload_count_s)" >> $@
+	echo "#define TOPAZ_HBM_PAYLOAD_PTR_SECTION" >> $@
+endif
+ifeq ($(board_config),topaz_host_config)
+	echo "#define QTN_RC_ENABLE_HDP" >> $@
+endif
+ifeq ($(board_config),topaz_pcie_config)
+	echo "#define TOPAZ_DISABLE_FWT_WAR" >> $@
+endif
+
+ifeq (topaz_rfic6,$(board_config:topaz_rfic6%=topaz_rfic6))
+	echo "#define TOPAZ_RFIC6_PLATFORM" >> $@
+	echo "#define FLASH_SUPPORT_256KB" >> $@
+	echo "#define ENABLE_C0_CALIB" >> $@
+	echo "#define ENABLE_C0" >> $@
+else
+ifeq ($(flash_env_size), 24)
+	echo "#define FLASH_SUPPORT_64KB" >> $@
+else
+ifneq ($(flash_env_size), 64)
+	$(error Wrong flash environment size)
+endif
+endif
+endif
+	echo "#define WPA_TKIP_SUPPORT $(tkip_support_enabled)" >> $@
+	echo "#define SIGMA_TESTBED_SUPPORT $(sigma_testbed_support_enabled)" >> $@
+
+	$(call copy_if_changed,$@,common/current_platform.h)
+	rm $@
+
+$(ALL_CONFIGS):
+	@if [ ! -f $(kdir)/arch/arc/configs/$@ ]; then			\
+		echo No kernel config found for board_config $@ ;	\
+		false ;							\
+	fi
+	$(MAKE) -C . board_config=$@ board_platform=$(shell perl -e 'if ( "$@" =~ /topaz/ ) { print "topaz"; } else { print "ruby"; }') board_config.mk.tmp
+	$(MAKE) -C . board_config=$@ board_platform=$(shell perl -e 'if ( "$@" =~ /topaz/ ) { print "topaz"; } else { print "ruby"; }') common/current_platform.h.tmp
+	$(MAKE) -C . board_config=$@ board_platform=$(shell perl -e 'if ( "$@" =~ /topaz/ ) { print "topaz"; } else { print "ruby"; }') configupdate
+	@if [ -d $(POWER_TABLES_DIR)/$@ ]; then				\
+		(cd $(POWER_TABLES_DIR) && ln -nsf $@ board_config) ;	\
+	else								\
+		rm -f $(POWER_TABLES_DIR)/board_config ;		\
+	fi
+	echo "/* Automatically generated file. Do not edit. */" > $(QDRV_CONFIG_FILE);
+	@echo -n "#define QDRV_CFG_PLATFORM_ID " >> $(QDRV_CONFIG_FILE)
+	@echo $(shell grep CONFIG_PLATFORM_ID configs/$@ 2>/dev/null | cut -d= -f2) >> $(QDRV_CONFIG_FILE)
+	echo "#define QDRV_CFG_TYPE \"$@\"" >> $(QDRV_CONFIG_FILE);
+	@echo $(shell grep CONFIG_PLATFORM_ID configs/$@ 2>/dev/null | cut -d= -f2) > $(PLATFORM_ID_FILE)
+
+get_current_config:
+	@echo $(board_config)
+
+get_current_platform:
+	@echo $(board_platform)
+
+# -------------------------------------------------------------------------
+#                           Cleaning targets
+# -------------------------------------------------------------------------
+
+distcleans := commondistclean udistclean kdistclean hostdistclean macfwdistclean rdspfwdistclean aucfwdistclean
+cleans     := commonclean uclean kclean hostclean macfwclean rdspfwclean aucfwclean
+
+.PHONY: clean distclean fsclean $(cleans) $(distcleans) configclean
+
+clean: $(QTN_LICENSE_CLEAN) fsclean $(cleans)
+
+fsclean:
+	$(MAKE) -C $(fsdir) CROSS_COMPILE=$(compile_prefix) clean
+
+$(cleans):
+	@if [ -d $($(strip $(patsubst %clean, %dir, $@))) ] ; then \
+		$(MAKE) -C $($(strip $(patsubst %clean, %dir, $@))) CROSS_COMPILE=$(compile_prefix) clean ; \
+	fi
+
+distclean: $(QTN_LICENSE_CLEAN) fsdistclean $(distcleans) \
+	driversclean cleantftpdir configclean doxygenclean fwstagingclean
+	rm -f $(first_run)
+
+configclean:
+	rm -f $(fsdir)/package/busybox/$(busybox)/.config* .config* $(fsdir)/.config* $(kdir)/.config*
+	rm -f board_config.mk
+	rm -f common/current_platform.h
+	rm -f $(QDRV_CONFIG_FILE)
+	rm -f $(PLATFORM_ID_FILE)
+
+fsdistclean:
+	$(MAKE) -C $(fsdir) CROSS_COMPILE=$(compile_prefix) distclean
+
+doxygenclean:
+	rm -rf ./doxygen.tar.bz2 ./doxygen/*
+
+fwstagingclean:
+	rm -rf $(QTN_FW_STAGING)
+
+driversclean:
+ifeq ($(wildcard drivers),drivers)
+	$(MAKE) -C drivers clean
+	rm -f drivers/extra_kos.symvers
+endif
+
+$(distcleans):
+	@if [ -d $($(strip $(patsubst %distclean, %dir, $@))) ] ; then \
+	$(MAKE) -C $($(strip $(patsubst %distclean, %dir, $@))) CROSS_COMPILE=$(compile_prefix) distclean ; \
+	fi
+
+clean_linux_modules:
+	rm -rf $(kdir)/modules/lib/modules/*
+
+# -------------------------------------------------------------------------
+#                           Building targets
+# -------------------------------------------------------------------------
+
+.PHONY: include_gen force all ruby topaz $(QTN_FWS) auc_topaz fromscratch cleantftpdir configupdate copyconfigs u-boot host
+.PHONY: buildroot buildbot_package buildbot_nightly verify_binary_archive unpack_binary_archive clean_linux_modules kernel_modules external_modules
+.PHONY: qtn_license
+
+########### prerequisite image building
+CHILD_BUILD_PATH ?= $(shell pwd)
+export CHILD_BUILD_PATH
+
+this_config_prereqs =
+#this_config_prereqs += prereq_debug
+
+# define prerequisite configs for images that require them
+ifeq ($(QTN_LINUX_IMG_DIR),)
+topaz_host_config_prereqs = topaz_pcie_config
+topaz_np_config_prereqs = topaz_rgmii_config
+endif
+
+ifneq ($($(board_config)_prereqs),)
+QTN_FWS += u-boot
+endif
+
+# override image maximum size for images that will contain child images
+qtm710_np_config_maxsize = 7471104
+qtm710_rc_config_maxsize = 7471104
+# minimum ODM request for RGMII image size limit is 4.5M, including u-boot (128k)
+qtm710_rgmii_config_maxsize = 4350000
+qhs711_host_config_maxsize = 10000000
+
+prereq_debug:
+	## board_config: $(board_config) has prerequisites: $(this_config_prereqs)
+
+# template recipe/rule for building child prerequisites
+define PREREQ_TEMPLATE
+prereq_$(1):
+	$(syncconfigs)
+	## target '$(board_config)' has prereq '$(1)', building '$(1)'...
+	$(MAKE) -C $(CHILD_BUILD_PATH) board_config=$(1) configupdate
+	$(MAKE) -C . board_config=$(1) common/current_platform.h.tmp
+	+$(MAKE) -C $(CHILD_BUILD_PATH) board_config=$(1) image_no_prereq
+	## target '$(board_config)' prereq '$(1)' completed.
+	## restoring configs '$(board_config)'
+	$(MAKE) -C . board_config=$(board_config) configupdate
+	$(MAKE) -C . board_config=$(board_config) common/current_platform.h.tmp
+
+.PHONY: prereq_$(1)
+this_config_prereqs += prereq_$(1)
+endef
+$(foreach prereq,$($(board_config)_prereqs),$(eval $(call PREREQ_TEMPLATE,$(prereq))))
+
+PHONY: check_packages
+check_packages:
+	if test -f tools/setup.sh; then tools/setup.sh --check-packages; fi
+
+.PHONY: image_no_prereq
+image_no_prereq: u-boot $(QTN_HOST_BOARD_UTILS) $(uncompressed-boot-image) qtn_license $(lzma-boot-image)
+
+####### current image building
+all image: check_packages $(BUILD_NAME_DEP)
+	@for p in $(this_config_prereqs); do $(MAKE) $${p}; done;
+	$(MAKE) image_no_prereq
+
+qtn_license: $(QTN_LICENSE_FILE)
+
+ruby topaz: $(uncompressed-boot-image) $(lzma-boot-image)
+
+fromscratch:
+	$(MAKE) -j1 distclean
+	$(MAKE) $(board_config)
+	$(MAKE) all
+
+$(SPARSE):
+	$(MAKE) -C host/utilities/sparse
+
+$(tftpdir):
+	mkdir -p $@
+
+cleantftpdir:
+	rm -rf $(tftpdir)/
+
+configupdate: $(BUILD_CONFIGS) clean_linux_modules unpack_binary_archive
+	$(syncconfigs)
+	$(call setconfigs,$(board_config))
+	@if [ "$(spi)" = "no" ] ; then \
+		echo "BR2_PACKAGE_QTN_PREPOPULATE=y" >> $(fsdir)/.config; \
+	fi
+	@if [ "$(pre)" = "yes" ] ; then \
+		echo "BR2_PACKAGE_QTN_PREPOPULATE=y" >> $(fsdir)/.config; \
+	fi
+	@if [ $(br2_jlevel) != '1' ] && [ "$(findstring j,$(MAKEFLAGS))" != "" ] ; then \
+		sed --in-place "s/BR2_JLEVEL=.*/BR2_JLEVEL=$(br2_jlevel)/" $(fsdir)/.config ; \
+	fi
+
+copyconfigs: configupdate
+	cd $(fsdir); yes "" | $(MAKE) config
+	cd $(fsdir); mkdir -p dl; cp download_backup/* dl; chmod u+w dl/*
+
+u-boot: common $(tftpdir)
+	$(MAKE) -C $(udir) CROSS_COMPILE=$(compile_prefix) ruby_config
+	$(MAKE) -C $(udir) CROSS_COMPILE=$(compile_prefix) all
+	$(MAKE) -C $(udir) CROSS_COMPILE=$(compile_prefix) ruby_mini_config
+	$(MAKE) -C $(udir) CROSS_COMPILE=$(compile_prefix) ruby_mini
+ifeq ($(tiny_uboot_enabled),1)
+	$(MAKE) -C $(udir) -f qtn_tiny.mk CROSS_COMPILE=$(compile_prefix)
+	$(MAKE) -C $(udir) -f piggy.mk CROSS_COMPILE=$(compile_prefix) TARGET=u-boot-tiny
+endif
+	$(MAKE) -C $(udir) -f piggy.mk CROSS_COMPILE=$(compile_prefix) TARGET=u-boot-mini
+	$(MAKE) -C $(udir) -f piggy.mk CROSS_COMPILE=$(compile_prefix) TARGET=u-boot
+	mv $(udir)/u-boot.bin $(udir)/u-boot.bin.full
+ifneq ($(NO_CHECK_SIZE),1)
+	$(CHECK_LZMA_SIZE) $(udir)/u-boot-mini-piggy.bin 20480
+ifeq ($(tiny_uboot_enabled),1)
+	$(CHECK_LZMA_SIZE) $(udir)/u-boot-tiny-piggy.bin 20480
+endif
+	$(CHECK_LZMA_SIZE) $(udir)/u-boot-piggy.bin 81920
+endif
+	cp $(udir)/u-boot-piggy.bin $(tftpdir)/u-boot.bin$(image_suffix)
+ifeq ($(mini_uboot_enabled),1)
+	cp $(udir)/u-boot-mini-piggy.bin $(tftpdir)/u-boot-mini-piggy.bin$(image_suffix)
+endif
+	@mkdir -p $(QTN_FW_STAGING)/
+	cp $(udir)/u-boot-piggy.bin $(QTN_FW_STAGING)/u-boot.bin
+ifeq ($(tiny_uboot_enabled),1)
+	cp $(udir)/u-boot-tiny-piggy.bin $(tftpdir)/u-boot-tiny.bin$(image_suffix)
+	$(udir)/tools/mkimage -A arc -C none -O u-boot -T firmware	\
+		-name UBOOT_STAGE2	\
+		-d $(udir)/u-boot-piggy.bin $(tftpdir)/u-boot-stage2.img$(image_suffix)
+endif
+
+host:
+	if [ -d $(hostdir) ] ; then $(MAKE) -C $(hostdir) ; fi
+
+.PHONY: do_buildroot
+do_buildroot:
+	@echo "################################### Do buildroot"
+	-$(MAKE) -j1 -C $(fsdir) KERNEL_MODULES_PATH=$(INSTALL_MOD_PATH)/lib clean-fs
+	@if [ "topaz_msft_config" = "$(board_config)" ]; then \
+		$(MAKE) -j1 -C $(fsdir) $(TARGET_CC_FOR_BR) KERNEL_MODULES_PATH=$(INSTALL_MOD_PATH)/lib MSFT=y; \
+	else \
+		$(MAKE) -j1 -C $(fsdir) $(TARGET_CC_FOR_BR) KERNEL_MODULES_PATH=$(INSTALL_MOD_PATH)/lib; \
+	fi
+	$(syncconfigs)
+
+buildroot: check_packages $(QTN_FWS) kernel_modules external_modules strip_modules $(QTN_REGULATORY_DB)
+	$(MAKE) do_buildroot
+
+kernel_image: buildroot
+	@echo "################################### Making kernel image"
+	@mkdir -p buildroot/build_arc/root/etc/default
+	$(MAKE) -C $(kdir) ARCH=arc CROSS_COMPILE=$(compile_prefix) Image
+	$(syncconfigs)
+
+kernel_modules: $(first_run)
+	@echo "################################### Making kernel modules"
+	$(MAKE) -C $(kdir) ARCH=arc CROSS_COMPILE=$(compile_prefix) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) vmlinux modules
+	$(MAKE) -C $(kdir) ARCH=arc CROSS_COMPILE=$(compile_prefix) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) modules_install
+	$(syncconfigs)
+
+verify_binary_archive:
+	@if [ $$(echo quantenna-bin-*tar | wc -w) -gt 1 ];		\
+	then								\
+		echo "Too many binary archives, correct and restart";	\
+		ls -l quantenna-bin-*tar;				\
+		exit 1;							\
+	fi
+	@if [ $$(echo pcie-quantenna-bin-*tar | wc -w) -gt 1 ];                         \
+	then                                                                            \
+		echo "Too many binary archives for pcie build, correct and restart";	\
+		ls -l pcie-quantenna-bin-*tar;                                          \
+		exit 1;                                                                 \
+	fi
+	@if [ $$(echo pcie-host-quantenna-bin-*tar | wc -w) -gt 1 ];                    \
+	then                                                                            \
+		echo "Too many binary archives for pcie build, correct and restart";	\
+		ls -l pcie-host-quantenna-bin-*tar;                                     \
+		exit 1;                                                                 \
+	fi
+	@if [ $$(echo dbdc-quantenna-bin-*tar | wc -w) -gt 1 ];                    \
+	then                                                                            \
+		echo "Too many binary archives for dbdc build, correct and restart";	\
+		ls -l dbdc-quantenna-bin-*tar;                                     \
+		exit 1;                                                                 \
+	fi
+	@if [ $$(echo rgmii-quantenna-bin-*tar | wc -w) -gt 1 ];                        \
+	then                                                                            \
+		echo "Too many binary archives for rgmii build, correct and restart";   \
+		ls -l rgmii-quantenna-bin-*tar;                                         \
+		exit 1;                                                                 \
+	fi
+	@if [ $$(echo rfic6-quantenna-bin-*tar | wc -w) -gt 1 ];                        \
+	then                                                                            \
+		echo "Too many binary archives for rfic6 vb build, correct and restart";   \
+		ls -l rfic6-quantenna-bin-*tar;                                         \
+		exit 1;                                                                 \
+	fi
+
+unpack_binary_archive: verify_binary_archive
+	@if [ "$(board_config)" = "topaz_pcie_config" ]; then					\
+		if [ -f pcie-quantenna-bin-*.tar ] ; then tar xvf pcie-quantenna-bin-*.tar ;	\
+		fi										\
+	elif [ "$(board_config)" = "topaz_host_config" ]; then					\
+		if [ -f pcie-host-quantenna-bin-*.tar ] ; then tar xvf pcie-host-quantenna-bin-*.tar ; \
+		fi                                                                              \
+	elif [ "$(board_config)" = "topaz_dbdc_config" ] ; then		                \
+		if [ -f dbdc-quantenna-bin-*.tar ] ; then tar xvf dbdc-quantenna-bin-*.tar ; \
+		fi                                                                              \
+	elif [ "$(board_config:topaz_rfic6%=topaz_rfic6)" = "topaz_rfic6" ]; then					\
+		if [ -f rfic6-quantenna-bin-*.tar ] ; then tar xvf rfic6-quantenna-bin-*.tar ;	\
+		fi                                                                              \
+	else                                                                                    \
+		if [ -f quantenna-bin-*.tar ] ; then tar xvf quantenna-bin-*.tar ;              \
+		fi                                                                              \
+	fi
+
+.PHONY: do_external_modules
+do_external_modules: include_gen
+	@echo "################################### Making external modules"
+	if [ -d drivers ];										\
+	then												\
+		$(MAKE) -C drivers ARCH=arc CROSS_COMPILE=$(compile_prefix) CHECK=../$(SPARSE);	\
+	fi
+	if [ -d drivers ];										\
+	then												\
+		$(MAKE) -C drivers ARCH=arc CROSS_COMPILE=$(compile_prefix) install;			\
+	fi
+	$(syncconfigs)
+
+external_modules: kernel_modules
+	$(MAKE) do_external_modules
+
+ifeq ($(board_platform),topaz)
+QTN_AUCFW := auc_topaz
+endif
+
+ifeq ($(bb_only),1)
+MUC_BUILD_TARGETS += bb_only
+endif
+MUC_BUILD_TARGETS += qtn_ruby
+
+muc: $(QTN_FW_STAGING_REL) ${QTN_FW_PREBUILD_REL} $(QTN_FW_STAGING_REL)/$(QTN_MACFW_BIN)
+dsp: $(QTN_FW_STAGING_REL) ${QTN_FW_PREBUILD_REL} $(QTN_FW_STAGING_REL)/$(QTN_RDSPFW_BIN)
+auc: $(QTN_AUCFW)
+auc_topaz: $(QTN_FW_STAGING_REL) ${QTN_FW_PREBUILD_REL} $(QTN_FW_STAGING_REL)/$(QTN_AUCFW_BIN)
+
+$(QTN_FW_STAGING_REL) $(QTN_FW_PREBUILD_REL):
+	@mkdir -p $@
+
+uncompressed_kimage: common kernel_image $(udir)/tools/mkimage
+
+$(gz_compressed_kimage): uncompressed_kimage
+	rm -f $@
+	gzip -c --best $(kimage) > $(gz_compressed_kimage)
+
+$(lzma_compressed_kimage): uncompressed_kimage
+	rm -f $@
+	$(LZMA) -k --best $(kimage)
+
+kernel_base_util := ./host/utilities/kernel_base_util
+kernel_base_util_src := $(kernel_base_util).c
+$(kernel_base_util): $(kernel_base_util_src) force
+	gcc -Wall -Icommon $< -o $@
+
+uboot_qtn_flags = 0x1
+
+$(uncompressed-boot-image): uncompressed_kimage $(tftpdir) $(kernel_base_util)
+	@echo "################################### Creating uncompressed U-Boot image"
+	$(udir)/tools/mkimage -A arc -C none -T kernel	\
+		-a `$(kernel_base_util) -a` -e `$(kernel_base_util) -e`	\
+		-name $(board_platform)-linux -Q $(uboot_qtn_flags) \
+		-d $(kimage) $(uncompressed-boot-image)
+
+$(gz-boot-image): $(gz_compressed_kimage) $(tftpdir) $(kernel_base_util)
+	@echo "################################### Creating gzip compressed U-Boot image"
+	$(udir)/tools/mkimage -A arc -C gzip -T kernel	\
+		-a `$(kernel_base_util) -e` -e `$(kernel_base_util) -e`	\
+		-name $(board_platform)-linux -Q $(uboot_qtn_flags) \
+		-d $(gz_compressed_kimage) $(gz-boot-image)
+
+$(lzma-boot-image): $(lzma_compressed_kimage) $(tftpdir) $(kernel_base_util)
+	@echo "################################### Creating lzma compressed U-Boot image"
+	$(udir)/tools/mkimage -A arc -C lzma -T kernel	\
+		-a `$(kernel_base_util) -e` -e `$(kernel_base_util) -e`	\
+		-name $(board_platform)-linux -Q $(uboot_qtn_flags) \
+		-d $(lzma_compressed_kimage) $(lzma-boot-image)
+	@mkdir -p $(QTN_FW_STAGING)/$(board_config)
+	cp $@ $(QTN_FW_STAGING)/$(board_config)/$(board_platform)-linux.lzma.img
+ifneq ($(NO_CHECK_SIZE),1)
+	$(CHECK_LZMA_SIZE) $@ $($(board_config)_maxsize)
+endif
+
+strip_modules: kernel_modules external_modules
+	@echo "################################### Strip modules"
+	if [ "`find $(INSTALL_MOD_PATH) -name '*\.ko'`" != "" ] ; then \
+		$(compile_prefix)strip --strip-unneeded  `find $(INSTALL_MOD_PATH) -name '*\.ko'` ; \
+	fi
+
+common:
+	$(MAKE) -C common
+
+$(udir)/tools/mkimage: | u-boot
+	@true # empty rule
+
+$(first_run): | $(QTN_FWS) $(QTN_REGULATORY_DB)
+	$(MAKE) copyconfigs
+	$(MAKE) do_buildroot && touch $(first_run)
+
+install:
+	cp $(uncompressed-boot-image) /tftpboot
+	cp $(lzma-boot-image) /tftpboot
+
+all_doxygen:
+	@echo "generate document of drivers,mucfw,qcsapi now...."
+	rm -rf ./doxygen.tar.bz2 ./doxygen/*
+	$(MAKE) -C drivers doxygen
+	$(MAKE) -C macfw doxygen
+	$(MAKE) -C rdspfw doxygen
+	$(MAKE) -C buildroot/package/qcsapi/qcsapi-1.0.1 doxygen
+	tar -cvjf doxygen.tar.bz2 ./doxygen/*
+
+doxygen_pdf: force
+	@echo "Auto-generated doxygen PDF files for QCSAPI and pktlogger"
+	-rm -rf doxygen_pdf
+	-rm -rf doxygen
+	-rm -f doxygen-${doc_rev_ext}.tar
+	mkdir doxygen_pdf
+	REV_NUM=$(doc_rev_ext) $(MAKE) -e -C common/ doco
+	find doxygen -name '*.pdf' | xargs -i cp {} doxygen_pdf/
+	tar cvf doxygen-${doc_rev_ext}.tar doxygen_pdf/
+
+include_gen: force
+	(cd include/qtn && make)
+
+show_configs:
+	@echo ${ALL_CONFIGS}
diff --git a/quantenna/board_config.mk b/quantenna/board_config.mk
new file mode 100644
index 0000000..be4efe1
--- /dev/null
+++ b/quantenna/board_config.mk
@@ -0,0 +1,12 @@
+# Automatically generated file. Do not edit.
+# use 'make xxxx_config' instead
+export board_config = topaz_config
+export board_type = asic
+export board_platform = topaz
+export spi = yes
+export qtn_hal_pm_corrupt_debug = no
+export wmac_mode = ap
+export arc770 = no
+export arc_rev_ge_4_10 = no
+export pre = no 
+export bb_only = 1
diff --git a/quantenna/common/Makefile b/quantenna/common/Makefile
new file mode 100755
index 0000000..b25a070
--- /dev/null
+++ b/quantenna/common/Makefile
@@ -0,0 +1,91 @@
+#
+#   common/Makefile
+# 
+#   Copyright (c) Quantenna Communications Incorporated 2007.
+#   All rights reserved.
+# 
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+# 
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+# 
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+# 
+#  This file defines the major, minor and build numbers for this release, and
+#  can create a C header file corresponding to those values. 
+#
+
+# This section is AWK'd by the release script, so keep the format to be
+# <start of line><label><space>:=<space><number>
+UMS_RELEASE_MAJOR := 0
+UMS_RELEASE_MINOR := 6
+UMS_RELEASE_BUILD := 1
+
+HFILE := ums_release
+
+PDFTK = $(shell which pdftk)
+ENSCRIPT = $(shell which enscript)
+PS2PDF = $(shell which ps2pdf)
+
+$(HFILE).h: Makefile
+	echo "/* This file is auto-generated by common/Makefile */" > $(HFILE).h
+	echo "#ifndef __$(HFILE)_H" >> $(HFILE).h
+	echo "#define __$(HFILE)_H" >> $(HFILE).h
+	echo "#define UMS_RELEASE_MAJOR	 ($(UMS_RELEASE_MAJOR))" >> $(HFILE).h
+	echo "#define UMS_RELEASE_MINOR	 ($(UMS_RELEASE_MINOR))" >> $(HFILE).h
+	echo "#define UMS_RELEASE_BUILD	 ($(UMS_RELEASE_BUILD))" >> $(HFILE).h
+	echo "#endif" >> $(HFILE).h
+
+header_version: check_enscript check_ps2pdf
+	-rm rev-num.pdf .tmp.rev-num .tmp.rev-num.ps
+	echo "$(REV_NUM)" > .tmp.rev-num
+	enscript -B --margins 67:200:260:240 -f Courier24 -p ./.tmp.rev-num.ps .tmp.rev-num
+	ps2pdf .tmp.rev-num.ps rev-num.pdf
+	-rm .tmp.rev-num .tmp.rev-num.ps
+
+clean:
+	rm -f $(HFILE).h
+	
+distclean: clean
+
+doco_pktlogger_i: check_pdftk header_version
+	REV_NUM=$(REV_NUM) make -e -C doxygen/pktlogger_doc Quantenna_pktlogger-INTERNAL-ONLY.pdf
+
+doco_pktlogger_ext_no_muc: check_pdftk header_version
+	REV_NUM=$(REV_NUM) make -e -C doxygen/pktlogger_doc Quantenna_pktlogger-external-no-muc.pdf
+
+doco_pktlogger_ext: check_pdftk header_version
+	REV_NUM=$(REV_NUM) make -e -C doxygen/pktlogger_doc Quantenna_pktlogger.pdf
+
+check_pdftk:
+	@if [ "$(PDFTK)" = "" ]; then \
+		echo "Please install pdftk to generate internal documentation"; \
+		exit 1; \
+	fi
+
+check_enscript:
+	@if [ "$(ENSCRIPT)" = "" ]; then \
+		echo "Please install enscript"; \
+		exit 1; \
+	fi
+
+check_ps2pdf:
+	@if [ "$(PS2PDF)" = "" ]; then \
+		echo "Please install ps2pdf"; \
+		exit 1; \
+	fi
+
+doco_qcsapi: check_pdftk header_version
+	REV_NUM=$(REV_NUM) make -e -C doxygen/qcsapi_doc
+
+ALL_DOCS = doco_pktlogger_ext doco_qcsapi doco_pktlogger_i doco_pktlogger_ext_no_muc
+doco: $(ALL_DOCS)
+.PHONY: doco $(ALL_DOCS)
+
diff --git a/quantenna/common/common_mem.h b/quantenna/common/common_mem.h
new file mode 100644
index 0000000..61b106e
--- /dev/null
+++ b/quantenna/common/common_mem.h
@@ -0,0 +1,264 @@
+/*
+ * (C) Copyright 2014 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * Header file which describes the Ruby and Topaz platforms.
+ * Used by both run-time and boot loader images.
+ *
+ * Do not put run-time specific definitions in this file.
+ */
+
+#ifndef __COMMON_MEM_H
+#define __COMMON_MEM_H
+
+#include "ruby_config.h"
+
+/* Platform memory */
+/* SRAM */
+#define RUBY_SRAM_UNIFIED_BEGIN			0x98000000
+#define RUBY_SRAM_UNIFIED_NOCACHE_BEGIN		0xf8000000
+#define RUBY_SRAM_FLIP_BEGIN			0x88000000
+#define RUBY_SRAM_FLIP_NOCACHE_BEGIN		0x60000000
+#define RUBY_SRAM_NOFLIP_BEGIN			0x80000000
+#define RUBY_SRAM_NOFLIP_NOCACHE_BEGIN		0x60000000
+#define RUBY_SRAM_BANK_SIZE			(64 * 1024)
+
+#define RUBY_SRAM_SIZE			(8 * RUBY_SRAM_BANK_SIZE)
+#define RUBY_SRAM_BANK_SAFE_SIZE	RUBY_SRAM_BANK_SIZE
+
+/* DDR */
+#define RUBY_DRAM_UNIFIED_BEGIN			0x80000000
+#define RUBY_DRAM_UNIFIED_NOCACHE_BEGIN		0xd0000000
+#define RUBY_DRAM_FLIP_BEGIN			0x80000000
+#define RUBY_DRAM_FLIP_NOCACHE_BEGIN		0x40000000
+#define RUBY_DRAM_NOFLIP_BEGIN			0x0
+#define RUBY_DRAM_NOFLIP_NOCACHE_BEGIN		0x40000000
+#define RUBY_MAX_DRAM_SIZE			DDR_128MB
+#define RUBY_MIN_DRAM_SIZE			DDR_64MB
+
+#if TOPAZ_MMAP_UNIFIED
+	#define RUBY_SRAM_BEGIN			RUBY_SRAM_UNIFIED_BEGIN
+	#define RUBY_SRAM_BUS_BEGIN		RUBY_SRAM_UNIFIED_BEGIN
+	#define RUBY_SRAM_NOCACHE_BEGIN		RUBY_SRAM_UNIFIED_NOCACHE_BEGIN
+	#define RUBY_DRAM_BEGIN			RUBY_DRAM_UNIFIED_BEGIN
+	#define RUBY_DRAM_BUS_BEGIN		RUBY_DRAM_UNIFIED_BEGIN
+	#define RUBY_DRAM_NOCACHE_BEGIN		RUBY_DRAM_UNIFIED_NOCACHE_BEGIN
+#elif RUBY_MMAP_FLIP
+	#define RUBY_SRAM_BEGIN			RUBY_SRAM_FLIP_BEGIN
+	#define RUBY_SRAM_BUS_BEGIN		RUBY_SRAM_NOFLIP_BEGIN
+	#define RUBY_SRAM_NOCACHE_BEGIN		RUBY_SRAM_FLIP_NOCACHE_BEGIN
+	#define RUBY_DRAM_BEGIN			RUBY_DRAM_FLIP_BEGIN
+	#define RUBY_DRAM_BUS_BEGIN		RUBY_DRAM_NOFLIP_BEGIN
+	#define RUBY_DRAM_NOCACHE_BEGIN		RUBY_DRAM_FLIP_NOCACHE_BEGIN
+#else
+	#define RUBY_SRAM_BEGIN			RUBY_SRAM_NOFLIP_BEGIN
+	#define RUBY_SRAM_BUS_BEGIN		RUBY_SRAM_NOFLIP_BEGIN
+	#define RUBY_SRAM_NOCACHE_BEGIN		RUBY_SRAM_NOFLIP_NOCACHE_BEGIN
+	#define RUBY_DRAM_BEGIN			RUBY_DRAM_NOFLIP_BEGIN
+	#define RUBY_DRAM_BUS_BEGIN		RUBY_DRAM_NOFLIP_BEGIN
+	#define RUBY_DRAM_NOCACHE_BEGIN		RUBY_DRAM_NOFLIP_NOCACHE_BEGIN
+#endif
+
+/*****************************************************************************/
+/* SPI memory mapped                                                         */
+/*****************************************************************************/
+#define RUBY_SPI_FLASH_ADDR     0x90000000
+
+ /* Hardware */
+#define RUBY_HARDWARE_BEGIN	0xC0000000
+
+#define	ROUNDUP(x, y)		((((x)+((y)-1))/(y))*(y))
+
+/* Config space */
+#define CONFIG_ARC_CONF_SIZE		(8 * 1024)
+/* Config area for Universal H/W ID */
+#define CONFIG_ARC_CONF_BASE		(0x80000000 + CONFIG_ARC_CONF_SIZE)
+
+#define CONFIG_ARC_KERNEL_PAGE_SIZE	(8 * 1024)
+
+#define RUBY_KERNEL_LOAD_DRAM_BEGIN	(RUBY_DRAM_BEGIN + 0x3000000)
+
+/* Safety offset from stack top address */
+#define RUBY_STACK_INIT_OFFSET		4
+
+/* DDR layout */
+#define CONFIG_ARC_NULL_BASE		0x00000000
+#define CONFIG_ARC_NULL_SIZE		(64 * 1024)
+#define CONFIG_ARC_NULL_END		(CONFIG_ARC_NULL_BASE + CONFIG_ARC_NULL_SIZE)
+
+/* PCIe BDA area */
+#define CONFIG_ARC_PCIE_BASE		(RUBY_DRAM_BEGIN + CONFIG_ARC_NULL_END)
+#define CONFIG_ARC_PCIE_SIZE		(64 * 1024) /* minimal PCI BAR size */
+#if ((CONFIG_ARC_PCIE_BASE & (64 * 1024 - 1)) != 0)
+	#error "The reserved region for PCIe BAR should 64k aligned!"
+#endif
+
+/*
+ * CONFIG_ARC_MUC_STACK_OFFSET_UBOOT must be equal to CONFIG_ARC_MUC_STACK_OFFSET
+ * and RUBY_CRUMBS_OFFSET_UBOOT must be equal to RUBY_CRUMBS_OFFSET.
+ * Their values can be obtained with host/utilities/ruby_mem_helper.
+ */
+#if TOPAZ_RX_ACCELERATE
+	/* Must be equal to CONFIG_ARC_MUC_STACK_OFFSET */
+	#define CONFIG_ARC_MUC_STACK_OFFSET_UBOOT	(0x0003F7C0)
+	/* MuC stack, included in CONFIG_ARC_MUC_SRAM_SIZE */
+	#define CONFIG_ARC_MUC_STACK_SIZE		(4 * 1024)
+#else
+	/* Must be equal to CONFIG_ARC_MUC_STACK_OFFSET */
+	#define CONFIG_ARC_MUC_STACK_OFFSET_UBOOT	(0x0003FFA0)
+	/* MuC stack, included in CONFIG_ARC_MUC_SRAM_SIZE */
+	#define CONFIG_ARC_MUC_STACK_SIZE		(6 * 1024)
+#endif
+
+#define CONFIG_ARC_MUC_STACK_INIT_UBOOT		(RUBY_SRAM_BEGIN + CONFIG_ARC_MUC_STACK_OFFSET_UBOOT)
+
+/* Must be equal to RUBY_CRUMBS_OFFSET */
+#define RUBY_CRUMBS_OFFSET_UBOOT	(0x0003FFC0)
+
+#define RUBY_UBOOT_PIGGY_MAX_SIZE		0x14000
+#define RUBY_CRUMBS_ADDR_UBOOT			(RUBY_SRAM_BEGIN + RUBY_CRUMBS_OFFSET_UBOOT)
+
+/*
+ * Crumb structure, sits at the end of 4th SRAM bank. Each core can use it to
+ * store the last run function to detect bus hangs.
+ */
+#define RUBY_CRUMBS_SIZE		64
+
+#ifndef __ASSEMBLY__
+	struct ruby_crumbs_percore {
+		unsigned long	blink;
+		unsigned long	status32;
+		unsigned long	sp;
+	};
+
+	struct ruby_crumbs_mem_section {
+		unsigned long	start;
+		unsigned long	end;
+	};
+
+	struct ruby_crumbs {
+		struct ruby_crumbs_percore	lhost;
+		struct ruby_crumbs_percore	muc;
+		struct ruby_crumbs_percore	dsp;
+		/*
+		 * allow (somewhat) intelligent parsing of muc stacks by
+		 * specifying the text section
+		 */
+		struct ruby_crumbs_mem_section	muc_dram;
+		struct ruby_crumbs_mem_section	muc_sram;
+
+		/*
+		 * magic token; if set incorrectly we probably have
+		 * random values after power-on
+		 */
+		unsigned long			magic;
+	};
+
+	#define	RUBY_CRUMBS_MAGIC	0x7c97be8f
+
+#endif /* __ASSEMBLY__ */
+
+/* Utility functions */
+#ifndef __ASSEMBLY__
+	#if defined(AUC_BUILD) || defined(RUBY_MINI)
+		#define NO_RUBY_WEAK	1
+	#else
+		#define NO_RUBY_WEAK	0
+	#endif
+
+	#define RUBY_BAD_BUS_ADDR	((unsigned  long)0)
+	#define RUBY_BAD_VIRT_ADDR	((void*)RUBY_BAD_BUS_ADDR)
+	#define RUBY_ERROR_ADDR		((unsigned long)0xefefefef)
+
+	#if defined(__CHECKER__)
+		#define RUBY_INLINE			static inline __attribute__((always_inline))
+		#define RUBY_WEAK(name)			RUBY_INLINE
+	#elif defined(__GNUC__)
+		/*GCC*/
+		#define RUBY_INLINE			static inline __attribute__((always_inline))
+		#if NO_RUBY_WEAK
+			#define RUBY_WEAK(name)		RUBY_INLINE
+		#else
+			#define RUBY_WEAK(name)		__attribute__((weak))
+		#endif
+	#else
+		/*MCC*/
+		#define RUBY_INLINE			static _Inline
+		#if NO_RUBY_WEAK
+			#define RUBY_WEAK(name)		RUBY_INLINE
+		#else
+			#define RUBY_WEAK(name)		pragma Weak(name);
+		#endif
+		#pragma Offwarn(428)
+	#endif
+
+	#define ____in_mem_range(addr, start, size)	\
+		(((addr) >= (start)) && ((addr) < (start) + (size)))
+
+	#if defined(STATIC_CHECK) || defined(__CHECKER__)
+		RUBY_INLINE int __in_mem_range(unsigned long addr, unsigned long start, unsigned long size)
+		{
+			return (((addr) >= (start)) && ((addr) < (start) + (size)));
+		}
+	#else
+		#define __in_mem_range ____in_mem_range
+	#endif
+
+	#if RUBY_MMAP_FLIP
+		RUBY_INLINE unsigned long virt_to_bus(const void *addr)
+		{
+			unsigned long ret = (unsigned long)addr;
+			if (__in_mem_range(ret, RUBY_SRAM_FLIP_BEGIN, RUBY_SRAM_SIZE)) {
+				ret = ret - RUBY_SRAM_FLIP_BEGIN + RUBY_SRAM_NOFLIP_BEGIN;
+			} else if (__in_mem_range(ret, RUBY_DRAM_FLIP_BEGIN, RUBY_MAX_DRAM_SIZE)) {
+				ret = ret - RUBY_DRAM_FLIP_BEGIN + RUBY_DRAM_NOFLIP_BEGIN;
+			} else if (ret < RUBY_HARDWARE_BEGIN) {
+				ret = RUBY_BAD_BUS_ADDR;
+			}
+			return ret;
+		}
+		RUBY_WEAK(bus_to_virt) void* bus_to_virt(unsigned long addr)
+		{
+			unsigned long ret = addr;
+			if (__in_mem_range(ret, RUBY_SRAM_NOFLIP_BEGIN, RUBY_SRAM_SIZE)) {
+				ret = ret - RUBY_SRAM_NOFLIP_BEGIN + RUBY_SRAM_FLIP_BEGIN;
+			} else if (__in_mem_range(ret, RUBY_DRAM_NOFLIP_BEGIN, RUBY_MAX_DRAM_SIZE)) {
+				ret = ret - RUBY_DRAM_NOFLIP_BEGIN + RUBY_DRAM_FLIP_BEGIN;
+			} else if (ret < RUBY_HARDWARE_BEGIN) {
+				ret = (unsigned long)RUBY_BAD_VIRT_ADDR;
+			}
+			return (void*)ret;
+		}
+	#else
+		/* Map 1:1, (x) address must be upper then 0x8000_0000. */
+		#define virt_to_bus(x) ((unsigned long)(x))
+		#define bus_to_virt(x) ((void *)(x))
+	#endif /* #if RUBY_MMAP_FLIP */
+
+	#ifndef __GNUC__
+		/* MCC */
+		#pragma Popwarn()
+	#endif
+
+#endif /* #ifndef __ASSEMBLY__ */
+
+#endif /* __COMMON_MEM_H */
diff --git a/quantenna/common/current_platform.h b/quantenna/common/current_platform.h
new file mode 100644
index 0000000..bcd3ab4
--- /dev/null
+++ b/quantenna/common/current_platform.h
@@ -0,0 +1,10 @@
+#define TOPAZ_PLATFORM
+#define TOPAZ_FPGA_PLATFORM 0
+#define TOPAZ_EMAC_NULL_BUF_WR
+#undef TOPAZ_FPGA_UMCTL1
+#define PLATFORM_WMAC_MODE ap
+#undef PLATFORM_DEFAULT_BOARD_ID
+#define ARC_HW_REV_NEEDS_TLBMISS_FIX
+#define FLASH_SUPPORT_64KB
+#define WPA_TKIP_SUPPORT 0
+#define SIGMA_TESTBED_SUPPORT 0
diff --git a/quantenna/common/doxygen/Doxyfile_pdf b/quantenna/common/doxygen/Doxyfile_pdf
new file mode 100644
index 0000000..6bf43ed
--- /dev/null
+++ b/quantenna/common/doxygen/Doxyfile_pdf
@@ -0,0 +1,1670 @@
+# Doxyfile 1.7.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file 
+# that follow. The default is UTF-8 which is also the encoding used for all 
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
+# iconv built into libc) for the transcoding. See 
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = __PROJECT_NAME__
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = __PROJECT_NUMBER__
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = __OUTPUT_DIRECTORY__
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, 
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = NO
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES += callqcsapi="<b><c>call_qcsapi</c> interface:</b><br>"
+ALIASES += wifi0="the interface to perform the action on. (e.g. wifi0)."
+ALIASES += wifi0only="the primary WiFi interface, wifi0 only."
+ALIASES += wifiX="the interface to perform the action on. wifiX, For X=0,1,..."
+ALIASES += wifi_wds="the interface to perform the action on. (e.g. wifi0 or wds0)."
+ALIASES += wifi_wds_eth="the interface to perform the action on. (e.g. wifi0 or wds0 or eth1_0)."
+ALIASES += aponly="This API can only be used in AP mode."
+ALIASES += staonly="This API can only be used in STA mode."
+ALIASES += nonpersistent="The value(s) set by this API are not persistent and must be reapplied if the device reboots."
+ALIASES += primarywifi="This API can only be used on the primary interface (wifi0)"
+ALIASES += hotspot_api="Refer to the WiFi Alliance Hotspot 2.0 (Release 2) Technical Specification for further information."
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Java. For instance, namespaces will be presented as packages, qualified 
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
+# sources. Doxygen will then generate output that is tailored for 
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it 
+# parses. With this tag you can assign which parser to use for a given extension. 
+# Doxygen has a built-in mapping, but you can override or extend it using this 
+# tag. The format is ext=language, where ext is a file extension, and language 
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, 
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make 
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C 
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions 
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
+# to include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter 
+# and setter methods for a property. Setting this option to YES (the default) 
+# will make doxygen to replace the get and set methods by a property in the 
+# documentation. This will only work if the methods are indeed getting or 
+# setting a simple type. If this is not the case, or you want to show the 
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
+# is documented as struct, union, or enum with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code in case the coding convention dictates that all compound 
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
+# determine which symbols to keep in memory and which to flush to disk. 
+# When the cache is full, less often used symbols will be written to disk. 
+# For small to medium size projects (<1000 input files) the default value is 
+# probably good enough. For larger projects a too small cache size can cause 
+# doxygen to be busy swapping symbols to and from disk most of the time 
+# causing a significant performance penality. 
+# If the system has enough physical memory increasing the cache will improve the 
+# performance by keeping more symbols in memory. Note that the value works on 
+# a logarithmic scale so increasing the size by one will rougly double the 
+# memory usage. The cache size is given by this formula: 
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = NO
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be 
+# extracted and appear in the documentation as a namespace called 
+# 'anonymous_namespace{file}', where file will be replaced with the base 
+# name of the file that contains the anonymous namespace. By default 
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = __INTERNAL_DOCS__
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 
+# will list include files with double quotes in the documentation 
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = NO
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 
+# will sort the (brief and detailed) documentation of class members so that 
+# constructors and destructors are listed first. If set to NO (the default) 
+# the constructors will appear in the respective orders defined by 
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
+# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = NO
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = NO
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = NO
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = NO
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
+# This will remove the Files entry from the Quick Index and from the 
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = NO
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from 
+# the version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 
+# by doxygen. The layout file controls the global structure of the generated 
+# output files in an output format independent way. The create the layout file 
+# that represents doxygen's defaults, run doxygen with the -l option. 
+# You can optionally specify a file name after the option, if omitted 
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE            = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = __INPUT__
+
+# This tag can be used to specify the character encoding of the source files 
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
+# also the default input encoding. Doxygen uses libiconv (or the iconv built 
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.idl \
+                         *.odl \
+                         *.cs \
+                         *.php \
+                         *.php3 \
+                         *.inc \
+                         *.m \
+                         *.mm \
+                         *.dox \
+                         *.py \
+                         *.f90 \
+                         *.f \
+                         *.vhd \
+                         *.vhdl
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the 
+# output. The symbol name can be a fully qualified name, a word, or if the 
+# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = __EXCLUDE_SYMBOLS__
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = ./image 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# link to the source code.  Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = NO
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 
+# Doxygen will adjust the colors in the stylesheet and background images 
+# according to this color. Hue is specified as an angle on a colorwheel, 
+# see http://en.wikipedia.org/wiki/Hue for more information. 
+# For instance the value 0 represents red, 60 is yellow, 120 is green, 
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 
+# the colors in the HTML output. For a value of 0 the output will use 
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 
+# the luminance component of the colors in the HTML output. Values below 
+# 100 gradually make the output lighter, whereas values above 100 make 
+# the output darker. The value divided by 100 is the actual gamma applied, 
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 
+# page will contain the date and time when the page was generated. Setting 
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files 
+# will be generated that can be used as input for Apple's Xcode 3 
+# integrated development environment, introduced with OSX 10.5 (Leopard). 
+# To create a documentation set, doxygen will generate a Makefile in the 
+# HTML output directory. Running make will produce the docset in that 
+# directory and running "make install" will install the docset in 
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
+# it at startup. 
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 
+# for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
+# feed. A documentation feed provides an umbrella under which multiple 
+# documentation sets from a single provider (such as a company or product suite) 
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
+# should uniquely identify the documentation set bundle. This should be a 
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify 
+# the documentation publisher. This should be a reverse domain-name style 
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# content.
+
+CHM_INDEX_ENCODING     = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 
+# that can be used as input for Qt's qhelpgenerator to generate a 
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
+# be used to specify the file name of the resulting .qch file. 
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 
+# add. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 
+# custom filter to add. For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> 
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 
+# project's 
+# filter section matches. 
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> 
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
+# be used to specify the location of Qt's qhelpgenerator. 
+# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# .qhp file.
+
+QHG_LOCATION           = 
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files  
+# will be generated, which together with the HTML files, form an Eclipse help 
+# plugin. To install this plugin and make it available under the help contents 
+# menu in Eclipse, the contents of the directory containing the HTML and XML 
+# files needs to be copied into the plugins directory of eclipse. The name of 
+# the directory within the plugins directory should be the same as 
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 
+# the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin 
+# the directory name containing the HTML and XML files should also have 
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 1
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
+# structure should be generated to display hierarchical information. 
+# If the tag value is set to YES, a side panel will be generated 
+# containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = YES
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of Latex formulas included 
+# as images in the HTML documentation. The default is 10. Note that 
+# when you change the font size after a successful doxygen run you need 
+# to manually remove any form_*.png images from the HTML output directory 
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images 
+# generated for formulas are transparent PNGs. Transparent PNGs are 
+# not supported properly for IE 6.0, but are supported on all modern browsers. 
+# Note that when changing this option you need to delete any form_*.png files 
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT    = YES
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box 
+# for the HTML output. The underlying search engine uses javascript 
+# and DHTML and should work on any modern browser. Note that when using 
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 
+# (GENERATE_DOCSET) there is already a search function so this one should 
+# typically be disabled. For large projects the javascript based search engine 
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = NO
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be 
+# implemented using a PHP enabled web server instead of at the web client 
+# using Javascript. Doxygen will generate the search PHP script and index 
+# file to put on the web server. The advantage of the server 
+# based approach is that it scales better to large projects and allows 
+# full text search. The disadvances is that it is more difficult to setup 
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name. 
+# Note that when enabling USE_PDFLATEX this option is only used for 
+# generating bitmaps for formulas in the HTML output, but not in the 
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include 
+# source code with syntax highlighting in the LaTeX output. 
+# Note that which sources are shown also depends on other settings 
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = __PREDEFINED__
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links. 
+# Note that each tag file must have a unique name 
+# (where the name does NOT include the path) 
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = NO
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see 
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
+# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 
+# allowed to run in parallel. When set to 0 (the default) doxygen will 
+# base this on the number of processors available in the system. You can set it 
+# explicitly to a value larger than 0 to get control over the balance 
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS        = 0
+
+# By default doxygen will write a font called FreeSans.ttf to the output 
+# directory and reference it in all dot files that doxygen generates. This 
+# font does not include all possible unicode characters however, so when you need 
+# these (or just want a differently looking font) you can specify the font name 
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
+# which can be done by putting it in a standard location or by setting the 
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# containing the font.
+
+DOT_FONTNAME           = FreeSans.ttf
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the 
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
+# different font using DOT_FONTNAME you can set the path where dot 
+# can find it using this tag.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = NO
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
+# doxygen will generate a call dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable call graphs 
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = YES
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
+# doxygen will generate a caller dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable caller 
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include 
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif 
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the 
+# number of direct children of the root node in a graph is already larger than 
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, because dot on Windows does not 
+# seem to support this out of the box. Warning: Depending on the platform used, 
+# enabling this option may lead to badly anti-aliased labels on the edges of 
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
diff --git a/quantenna/common/doxygen/Doxyfile_pdf_internal b/quantenna/common/doxygen/Doxyfile_pdf_internal
new file mode 100644
index 0000000..5a3353c
--- /dev/null
+++ b/quantenna/common/doxygen/Doxyfile_pdf_internal
@@ -0,0 +1,1660 @@
+# Doxyfile 1.7.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file 
+# that follow. The default is UTF-8 which is also the encoding used for all 
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
+# iconv built into libc) for the transcoding. See 
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = __PROJECT_NAME__
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = __PROJECT_NUMBER__
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = __OUTPUT_DIRECTORY__
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, 
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = NO
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Java. For instance, namespaces will be presented as packages, qualified 
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
+# sources. Doxygen will then generate output that is tailored for 
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it 
+# parses. With this tag you can assign which parser to use for a given extension. 
+# Doxygen has a built-in mapping, but you can override or extend it using this 
+# tag. The format is ext=language, where ext is a file extension, and language 
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, 
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make 
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C 
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions 
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
+# to include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter 
+# and setter methods for a property. Setting this option to YES (the default) 
+# will make doxygen to replace the get and set methods by a property in the 
+# documentation. This will only work if the methods are indeed getting or 
+# setting a simple type. If this is not the case, or you want to show the 
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
+# is documented as struct, union, or enum with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code in case the coding convention dictates that all compound 
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
+# determine which symbols to keep in memory and which to flush to disk. 
+# When the cache is full, less often used symbols will be written to disk. 
+# For small to medium size projects (<1000 input files) the default value is 
+# probably good enough. For larger projects a too small cache size can cause 
+# doxygen to be busy swapping symbols to and from disk most of the time 
+# causing a significant performance penality. 
+# If the system has enough physical memory increasing the cache will improve the 
+# performance by keeping more symbols in memory. Note that the value works on 
+# a logarithmic scale so increasing the size by one will rougly double the 
+# memory usage. The cache size is given by this formula: 
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = NO
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be 
+# extracted and appear in the documentation as a namespace called 
+# 'anonymous_namespace{file}', where file will be replaced with the base 
+# name of the file that contains the anonymous namespace. By default 
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = YES
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 
+# will list include files with double quotes in the documentation 
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = NO
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 
+# will sort the (brief and detailed) documentation of class members so that 
+# constructors and destructors are listed first. If set to NO (the default) 
+# the constructors will appear in the respective orders defined by 
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
+# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = NO
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = NO
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = NO
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = NO
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
+# This will remove the Files entry from the Quick Index and from the 
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = NO
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from 
+# the version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 
+# by doxygen. The layout file controls the global structure of the generated 
+# output files in an output format independent way. The create the layout file 
+# that represents doxygen's defaults, run doxygen with the -l option. 
+# You can optionally specify a file name after the option, if omitted 
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE            = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = __INPUT__
+
+# This tag can be used to specify the character encoding of the source files 
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
+# also the default input encoding. Doxygen uses libiconv (or the iconv built 
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.idl \
+                         *.odl \
+                         *.cs \
+                         *.php \
+                         *.php3 \
+                         *.inc \
+                         *.m \
+                         *.mm \
+                         *.dox \
+                         *.py \
+                         *.f90 \
+                         *.f \
+                         *.vhd \
+                         *.vhdl
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the 
+# output. The symbol name can be a fully qualified name, a word, or if the 
+# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = __EXCLUDE_SYMBOLS__
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = ./image 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# link to the source code.  Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = NO
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 
+# Doxygen will adjust the colors in the stylesheet and background images 
+# according to this color. Hue is specified as an angle on a colorwheel, 
+# see http://en.wikipedia.org/wiki/Hue for more information. 
+# For instance the value 0 represents red, 60 is yellow, 120 is green, 
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 
+# the colors in the HTML output. For a value of 0 the output will use 
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 
+# the luminance component of the colors in the HTML output. Values below 
+# 100 gradually make the output lighter, whereas values above 100 make 
+# the output darker. The value divided by 100 is the actual gamma applied, 
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 
+# page will contain the date and time when the page was generated. Setting 
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files 
+# will be generated that can be used as input for Apple's Xcode 3 
+# integrated development environment, introduced with OSX 10.5 (Leopard). 
+# To create a documentation set, doxygen will generate a Makefile in the 
+# HTML output directory. Running make will produce the docset in that 
+# directory and running "make install" will install the docset in 
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
+# it at startup. 
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 
+# for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
+# feed. A documentation feed provides an umbrella under which multiple 
+# documentation sets from a single provider (such as a company or product suite) 
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
+# should uniquely identify the documentation set bundle. This should be a 
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify 
+# the documentation publisher. This should be a reverse domain-name style 
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# content.
+
+CHM_INDEX_ENCODING     = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 
+# that can be used as input for Qt's qhelpgenerator to generate a 
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
+# be used to specify the file name of the resulting .qch file. 
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 
+# add. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 
+# custom filter to add. For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> 
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 
+# project's 
+# filter section matches. 
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> 
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
+# be used to specify the location of Qt's qhelpgenerator. 
+# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# .qhp file.
+
+QHG_LOCATION           = 
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files  
+# will be generated, which together with the HTML files, form an Eclipse help 
+# plugin. To install this plugin and make it available under the help contents 
+# menu in Eclipse, the contents of the directory containing the HTML and XML 
+# files needs to be copied into the plugins directory of eclipse. The name of 
+# the directory within the plugins directory should be the same as 
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 
+# the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin 
+# the directory name containing the HTML and XML files should also have 
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
+# structure should be generated to display hierarchical information. 
+# If the tag value is set to YES, a side panel will be generated 
+# containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = YES
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of Latex formulas included 
+# as images in the HTML documentation. The default is 10. Note that 
+# when you change the font size after a successful doxygen run you need 
+# to manually remove any form_*.png images from the HTML output directory 
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images 
+# generated for formulas are transparent PNGs. Transparent PNGs are 
+# not supported properly for IE 6.0, but are supported on all modern browsers. 
+# Note that when changing this option you need to delete any form_*.png files 
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT    = YES
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box 
+# for the HTML output. The underlying search engine uses javascript 
+# and DHTML and should work on any modern browser. Note that when using 
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 
+# (GENERATE_DOCSET) there is already a search function so this one should 
+# typically be disabled. For large projects the javascript based search engine 
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = NO
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be 
+# implemented using a PHP enabled web server instead of at the web client 
+# using Javascript. Doxygen will generate the search PHP script and index 
+# file to put on the web server. The advantage of the server 
+# based approach is that it scales better to large projects and allows 
+# full text search. The disadvances is that it is more difficult to setup 
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name. 
+# Note that when enabling USE_PDFLATEX this option is only used for 
+# generating bitmaps for formulas in the HTML output, but not in the 
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include 
+# source code with syntax highlighting in the LaTeX output. 
+# Note that which sources are shown also depends on other settings 
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links. 
+# Note that each tag file must have a unique name 
+# (where the name does NOT include the path) 
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = NO
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see 
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
+# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 
+# allowed to run in parallel. When set to 0 (the default) doxygen will 
+# base this on the number of processors available in the system. You can set it 
+# explicitly to a value larger than 0 to get control over the balance 
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS        = 0
+
+# By default doxygen will write a font called FreeSans.ttf to the output 
+# directory and reference it in all dot files that doxygen generates. This 
+# font does not include all possible unicode characters however, so when you need 
+# these (or just want a differently looking font) you can specify the font name 
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
+# which can be done by putting it in a standard location or by setting the 
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# containing the font.
+
+DOT_FONTNAME           = FreeSans.ttf
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the 
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
+# different font using DOT_FONTNAME you can set the path where dot 
+# can find it using this tag.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = NO
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
+# doxygen will generate a call dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable call graphs 
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = YES
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
+# doxygen will generate a caller dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable caller 
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include 
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif 
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the 
+# number of direct children of the root node in a graph is already larger than 
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, because dot on Windows does not 
+# seem to support this out of the box. Warning: Depending on the platform used, 
+# enabling this option may lead to badly anti-aliased labels on the edges of 
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
diff --git a/quantenna/common/doxygen/Doxyfile_template b/quantenna/common/doxygen/Doxyfile_template
new file mode 100644
index 0000000..a127789
--- /dev/null
+++ b/quantenna/common/doxygen/Doxyfile_template
@@ -0,0 +1,1660 @@
+# Doxyfile 1.7.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file 
+# that follow. The default is UTF-8 which is also the encoding used for all 
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
+# iconv built into libc) for the transcoding. See 
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = __PROJECT_NAME__
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = __PROJECT_NUMBER__
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = __OUTPUT_DIRECTORY__
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, 
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Java. For instance, namespaces will be presented as packages, qualified 
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
+# sources. Doxygen will then generate output that is tailored for 
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it 
+# parses. With this tag you can assign which parser to use for a given extension. 
+# Doxygen has a built-in mapping, but you can override or extend it using this 
+# tag. The format is ext=language, where ext is a file extension, and language 
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, 
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make 
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C 
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions 
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
+# to include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter 
+# and setter methods for a property. Setting this option to YES (the default) 
+# will make doxygen to replace the get and set methods by a property in the 
+# documentation. This will only work if the methods are indeed getting or 
+# setting a simple type. If this is not the case, or you want to show the 
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
+# is documented as struct, union, or enum with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code in case the coding convention dictates that all compound 
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
+# determine which symbols to keep in memory and which to flush to disk. 
+# When the cache is full, less often used symbols will be written to disk. 
+# For small to medium size projects (<1000 input files) the default value is 
+# probably good enough. For larger projects a too small cache size can cause 
+# doxygen to be busy swapping symbols to and from disk most of the time 
+# causing a significant performance penality. 
+# If the system has enough physical memory increasing the cache will improve the 
+# performance by keeping more symbols in memory. Note that the value works on 
+# a logarithmic scale so increasing the size by one will rougly double the 
+# memory usage. The cache size is given by this formula: 
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be 
+# extracted and appear in the documentation as a namespace called 
+# 'anonymous_namespace{file}', where file will be replaced with the base 
+# name of the file that contains the anonymous namespace. By default 
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 
+# will list include files with double quotes in the documentation 
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 
+# will sort the (brief and detailed) documentation of class members so that 
+# constructors and destructors are listed first. If set to NO (the default) 
+# the constructors will appear in the respective orders defined by 
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
+# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
+# This will remove the Files entry from the Quick Index and from the 
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from 
+# the version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 
+# by doxygen. The layout file controls the global structure of the generated 
+# output files in an output format independent way. The create the layout file 
+# that represents doxygen's defaults, run doxygen with the -l option. 
+# You can optionally specify a file name after the option, if omitted 
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE            = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = __INPUT__
+
+# This tag can be used to specify the character encoding of the source files 
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
+# also the default input encoding. Doxygen uses libiconv (or the iconv built 
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.idl \
+                         *.odl \
+                         *.cs \
+                         *.php \
+                         *.php3 \
+                         *.inc \
+                         *.m \
+                         *.mm \
+                         *.dox \
+                         *.py \
+                         *.f90 \
+                         *.f \
+                         *.vhd \
+                         *.vhdl
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the 
+# output. The symbol name can be a fully qualified name, a word, or if the 
+# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# link to the source code.  Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 
+# Doxygen will adjust the colors in the stylesheet and background images 
+# according to this color. Hue is specified as an angle on a colorwheel, 
+# see http://en.wikipedia.org/wiki/Hue for more information. 
+# For instance the value 0 represents red, 60 is yellow, 120 is green, 
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 
+# the colors in the HTML output. For a value of 0 the output will use 
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 
+# the luminance component of the colors in the HTML output. Values below 
+# 100 gradually make the output lighter, whereas values above 100 make 
+# the output darker. The value divided by 100 is the actual gamma applied, 
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 
+# page will contain the date and time when the page was generated. Setting 
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files 
+# will be generated that can be used as input for Apple's Xcode 3 
+# integrated development environment, introduced with OSX 10.5 (Leopard). 
+# To create a documentation set, doxygen will generate a Makefile in the 
+# HTML output directory. Running make will produce the docset in that 
+# directory and running "make install" will install the docset in 
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
+# it at startup. 
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 
+# for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
+# feed. A documentation feed provides an umbrella under which multiple 
+# documentation sets from a single provider (such as a company or product suite) 
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
+# should uniquely identify the documentation set bundle. This should be a 
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify 
+# the documentation publisher. This should be a reverse domain-name style 
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# content.
+
+CHM_INDEX_ENCODING     = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 
+# that can be used as input for Qt's qhelpgenerator to generate a 
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
+# be used to specify the file name of the resulting .qch file. 
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 
+# add. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 
+# custom filter to add. For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> 
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 
+# project's 
+# filter section matches. 
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> 
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
+# be used to specify the location of Qt's qhelpgenerator. 
+# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# .qhp file.
+
+QHG_LOCATION           = 
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files  
+# will be generated, which together with the HTML files, form an Eclipse help 
+# plugin. To install this plugin and make it available under the help contents 
+# menu in Eclipse, the contents of the directory containing the HTML and XML 
+# files needs to be copied into the plugins directory of eclipse. The name of 
+# the directory within the plugins directory should be the same as 
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 
+# the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin 
+# the directory name containing the HTML and XML files should also have 
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
+# structure should be generated to display hierarchical information. 
+# If the tag value is set to YES, a side panel will be generated 
+# containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = YES
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of Latex formulas included 
+# as images in the HTML documentation. The default is 10. Note that 
+# when you change the font size after a successful doxygen run you need 
+# to manually remove any form_*.png images from the HTML output directory 
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images 
+# generated for formulas are transparent PNGs. Transparent PNGs are 
+# not supported properly for IE 6.0, but are supported on all modern browsers. 
+# Note that when changing this option you need to delete any form_*.png files 
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT    = YES
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box 
+# for the HTML output. The underlying search engine uses javascript 
+# and DHTML and should work on any modern browser. Note that when using 
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 
+# (GENERATE_DOCSET) there is already a search function so this one should 
+# typically be disabled. For large projects the javascript based search engine 
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = NO
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be 
+# implemented using a PHP enabled web server instead of at the web client 
+# using Javascript. Doxygen will generate the search PHP script and index 
+# file to put on the web server. The advantage of the server 
+# based approach is that it scales better to large projects and allows 
+# full text search. The disadvances is that it is more difficult to setup 
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name. 
+# Note that when enabling USE_PDFLATEX this option is only used for 
+# generating bitmaps for formulas in the HTML output, but not in the 
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include 
+# source code with syntax highlighting in the LaTeX output. 
+# Note that which sources are shown also depends on other settings 
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links. 
+# Note that each tag file must have a unique name 
+# (where the name does NOT include the path) 
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = NO
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see 
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
+# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 
+# allowed to run in parallel. When set to 0 (the default) doxygen will 
+# base this on the number of processors available in the system. You can set it 
+# explicitly to a value larger than 0 to get control over the balance 
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS        = 0
+
+# By default doxygen will write a font called FreeSans.ttf to the output 
+# directory and reference it in all dot files that doxygen generates. This 
+# font does not include all possible unicode characters however, so when you need 
+# these (or just want a differently looking font) you can specify the font name 
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
+# which can be done by putting it in a standard location or by setting the 
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# containing the font.
+
+DOT_FONTNAME           = FreeSans.ttf
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the 
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
+# different font using DOT_FONTNAME you can set the path where dot 
+# can find it using this tag.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
+# doxygen will generate a call dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable call graphs 
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = YES
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
+# doxygen will generate a caller dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable caller 
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include 
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif 
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the 
+# number of direct children of the root node in a graph is already larger than 
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, because dot on Windows does not 
+# seem to support this out of the box. Warning: Depending on the platform used, 
+# enabling this option may lead to badly anti-aliased labels on the edges of 
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
diff --git a/quantenna/common/doxygen/pktlogger-title.pdf b/quantenna/common/doxygen/pktlogger-title.pdf
new file mode 100644
index 0000000..46345c8
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger-title.pdf
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/Makefile b/quantenna/common/doxygen/pktlogger_doc/Makefile
new file mode 100644
index 0000000..3bb9c56
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/Makefile
@@ -0,0 +1,68 @@
+DOXYGEN_PDF_INPUT_FILES = ../../../drivers/qdrv/qdrv_wlan.h
+DOXYGEN_PDF_INPUT_FILES += ../../../include/qtn/muc_txrx_stats.h
+DOXYGEN_PDF_INPUT_FILES += ../../../include/qtn/muc_phy_stats.h
+DOXYGEN_PDF_INPUT_FILES += ../../../include/qtn/skb_recycle.h
+DOXYGEN_PDF_INPUT_FILES += chapter1.txt chapter2.txt chapter3.txt chapter4.txt
+DOXYGEN_EXCLUDE_STRUCTURES = qdrv_wlan_netdebug qdrv_wlan_ratedebug qdrv_wlan_memdebug memdebug_watchpt qtn_channel qtn_ratetable qtn_rateentry host_txif _temp_info host_fifo_if host_rxif host_scanif muc_bwa_stats qdrv_wlan qdrv_netdebug_event qdrv_netdebug_mem qdrv_netdebug_rate qdrv_netdebug_stats qdrv_netdebug_txbf qtn_node tx_power_cal qtn_stats qtn_stats_log qtn_skb_recycle_list qtn_chan_adm_stats
+DOXYGEN_EXCLUDE_STRUCTURES_EXT = muc_tx_stats muc_rx_stats muc_rx_rates qtn_rate_stats_mcs_data qtn_rate_tx_stats qtn_rate_gen_stats qtn_rate_tx_stats_per_sec MUC_HT_NUM_RATES muc_bwa_stats qdrv_muc_rx_rates qdrv_radar_stats qdrv_rx_evm_array
+TARGET_DIR = ../../../doxygen/pktlogger/latex
+
+REFMAN:=Quantenna_pktlogger-INTERNAL-ONLY.pdf
+REFMAN_EXT_NM:=Quantenna_pktlogger-external-no-muc.pdf
+REFMAN_EXT:=Quantenna_pktlogger.pdf
+
+all: doxygen_pdf
+
+Doxyfile_pdf_internal:
+	perl ../qtn_doxyfile_pdf.pl "Doxyfile_pdf_internal" "Pktlogger (INTERNAL ONLY)" "pktlogger" "$(REV_NUM)" \
+		--internal	\
+		$(DOXYGEN_PDF_INPUT_FILES) > $@
+
+$(REFMAN): $(TARGET_DIR)/$(REFMAN)
+
+$(TARGET_DIR)/$(REFMAN): clean Doxyfile_pdf_internal
+	doxygen Doxyfile_pdf_internal
+	./qtn_latex.sh
+	make -C $(TARGET_DIR)
+	pdftk $(TARGET_DIR)/refman.pdf background ../watermark.pdf output $(TARGET_DIR)/refman2.pdf
+	pdftk ../pktlogger-title.pdf stamp ../../rev-num.pdf output title.pdf
+	pdftk A=$(TARGET_DIR)/refman2.pdf B=./title.pdf cat B1 A2-end output xxx.pdf
+	mv xxx.pdf $@
+	-rm title.pdf $(TARGET_DIR)/refman.pdf $(TARGET_DIR)/refman2.pdf
+
+Doxyfile_pdf_external:
+	perl ../qtn_doxyfile_pdf.pl "Doxyfile_pdf" "Pktlogger" "pktlogger" "$(REV_NUM)"			\
+		--exclusions "$(DOXYGEN_EXCLUDE_STRUCTURES)" \
+		$(DOXYGEN_PDF_INPUT_FILES) > $@
+
+$(REFMAN_EXT): $(TARGET_DIR)/$(REFMAN_EXT)
+
+$(TARGET_DIR)/$(REFMAN_EXT): clean Doxyfile_pdf_external
+	doxygen Doxyfile_pdf_external
+	./qtn_latex.sh
+	make -C $(TARGET_DIR)
+	pdftk ../pktlogger-title.pdf stamp ../../rev-num.pdf output title.pdf
+	pdftk A=$(TARGET_DIR)/refman.pdf B=./title.pdf cat B1 A2-end output xxx.pdf
+	mv xxx.pdf $@
+	-rm title.pdf $(TARGET_DIR)/refman.pdf
+
+Doxyfile_pdf_no_muc:
+	perl ../qtn_doxyfile_pdf.pl "Doxyfile_pdf" "Pktlogger (no MuC)" "pktlogger" "$(REV_NUM)" 	\
+		--exclusions "$(DOXYGEN_EXCLUDE_STRUCTURES) $(DOXYGEN_EXCLUDE_STRUCTURES_EXT)"		\
+		$(DOXYGEN_PDF_INPUT_FILES) > $@
+
+$(REFMAN_EXT_NM): $(TARGET_DIR)/$(REFMAN_EXT_NM)
+
+$(TARGET_DIR)/$(REFMAN_EXT_NM): clean Doxyfile_pdf_no_muc
+	doxygen Doxyfile_pdf_no_muc
+	./qtn_latex.sh
+	make -C $(TARGET_DIR)
+	pdftk ../pktlogger-title.pdf stamp ../../rev-num.pdf output title.pdf
+	pdftk A=$(TARGET_DIR)/refman.pdf B=./title.pdf cat B1 A2-end output xxx.pdf
+	mv xxx.pdf $@
+	-rm title.pdf $(TARGET_DIR)/refman.pdf
+
+clean:
+	-rm -f Doxyfile_pdf_external
+	-rm -f Doxyfile_pdf_internal
+	-rm -f Doxyfile_pdf_no_muc
diff --git a/quantenna/common/doxygen/pktlogger_doc/chapter1.txt b/quantenna/common/doxygen/pktlogger_doc/chapter1.txt
new file mode 100644
index 0000000..e092d86
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/chapter1.txt
@@ -0,0 +1,10 @@
+/**@page mypage1 Overview
+ * This document describes the packet logger debug facility of the Quantenna embedded software.
+ *
+ * This document is divided into sections giving a background, how to setup the packetlogger
+ * system, how to interpret the results, and a detailed list of the various statistics that
+ * are gathered.
+ *
+ * \internal This version of the document is for internal use only! Do not distribute this
+ * document externally.
+ */
diff --git a/quantenna/common/doxygen/pktlogger_doc/chapter2.txt b/quantenna/common/doxygen/pktlogger_doc/chapter2.txt
new file mode 100644
index 0000000..c838aa9
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/chapter2.txt
@@ -0,0 +1,23 @@
+/**@page mypage2 Background
+ * The packetlogger debug facility of the embedded Quantenna software is a debug feature
+ * which is used to monitor realtime statistics in the embedded system.
+ *
+ * The feature exports internally visible statistics (from the LHost, MuC, MAC and baseband)
+ * via the network. A statistics gathering process runs on the network, and packages the
+ * data into machine readable formats, in the first instance as comma separated values (CSVs).
+ *
+ * The following diagram gives a high level component view of the packetlogger facility.
+ *
+ * \anchor image-of-top
+ * \image latex pktlogger_high_level.png "Pktlogger high level setup" width=\textwidth
+ *
+ * The source of the data containing board statistics comes from an individual board such
+ * as a QHS710. This is the first component in the packet logger architecture. The device that
+ * consumes and formats the data is generally run on a host PC connected to the same Ethernet
+ * segment as the Quantenna board. This is the second component in the packet logger architecture.
+ *
+ * The pktlogger environment consists of two device roles, sender and receiver.
+ * The DUT as sender, collects data and constructs a UDP packet, which is then sent via Ethernet,
+ * PCIe or WiFi. The receiver creates a UDP socket to receive these packets, and saves
+ * them to a file which can be processed at a later time.
+ */
diff --git a/quantenna/common/doxygen/pktlogger_doc/chapter3.txt b/quantenna/common/doxygen/pktlogger_doc/chapter3.txt
new file mode 100644
index 0000000..20a5e12
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/chapter3.txt
@@ -0,0 +1,236 @@
+/**@page mypage3 Environment setup and usage
+ * @section mysection3_1 Packet logger variants
+ *
+ * The following table shows the different packet logger variants available for debugging.
+ *
+ * The QHS710 command column indicates the command to be run on the embedded device under test
+ * to enable the feature.
+ *
+ * <TABLE>
+ * <TR> <TH>Name</TH><TH>Description</TH><TH>QHS710 command (brief)</TH></TR>
+ * <TR> <TD>Netdebug</TD><TD>The 'traditional' pktlogger. This packetlogger outputs statistics from
+ * the various different subsystems. The embedded DUT command also enables iwevent network debugging.
+ * </TD><TD><c>netdebug <on|off></c></TD></TR>
+ * <TR> <TD>sysmsgdebug</TD> <TD>Log messages captured by ssylogd.</TD>
+ * <TD><c>sysmsgdebug <on|off></c></TD></TR>
+ * <TR> <TD>Ratedebug</TD><TD>Specific rate retry debugging. This packetlogger outputs detailed
+ * rate adaptation information.</TD><TD><c>ratedebug <on|off></c></TD></TR>
+ * <TR> <TD>Memdebug</TD><TD>Specific memory block debugging. This packetlogger outputs detailed
+ * memory dump information.</TD><TD><c>memdebug <on|off></c></TD></TR>
+ * <TR> <TD>Radardebug</TD><TD>Specific radar memory debugging. This packetlogger outputs detailed
+ * radar memory dump information.</TD><TD><c>radardebug <on|off></c></TD></TR>
+ * </TABLE>
+ *
+ * The default interface for sending debug packet is eth1_0 on Video Bridge devices,
+ * and pcie0 on PCIe EP boards. Debug packets can be sent via wireless interface
+ * by using the following command.
+ *
+ * <c>qdrvcmd pktlogger 0 set interface wifi0</c>
+ *
+ * Debug packets are sent by default as broadcast IPv4 UDP packets. This command shows the current
+ * configuration parameters.
+ *
+ * <c>qdrvcmd pktlogger 0 show</c>
+ *
+ * The following snapshot shows other default configuration.
+ * \image latex pktlogger_dut_default_setting.png "Example of default configuration from a DUT" width=\textwidth
+ *
+ * Use the following command to display all of the pktlogger configuration parameters.
+ *
+ * <c>qdrvcmd pktlogger 0 help</c>
+ *
+ * \note
+ * At beginning of debug, it is advisable to make sure DUT can reach host PC by
+ * running a ping test from DUT to host PC.
+ *
+ * @section mysection3_2 Host side setup
+ *
+ * As noted in the diagram in the figure \ref image-of-top "Pktlogger high level setup", the packet logger is a distributed debugging
+ * facility which runs on both the embedded platform, and on a host platform connected to the same
+ * subnet.
+ *
+ * The host side application is written in Perl.
+ *
+ * @subsection mysection3_2_1 Microsoft Windows installation
+ *
+ * Download and install Perl from:
+ *
+ * \li http://www.activestate.com/activeperl/downloads
+ *
+ * Install the following packages by using the Package Manger: Start->Programs->ActivePerl->Perl Package Manager
+ * \li Config-General
+ *
+ * @subsection mysection3_2_2 Linux installation
+ *
+ * Install the following Perl packages:
+ *
+ * \li <c>Config::General</c>
+ *
+ * @subsubsection mysection3_2_2_1 Fedora Core instructions
+ *
+ * The following specific commands can be run on a Fedora Core system to install the required packages:
+ *
+ * <c>yum install perl-Config-General</c>
+ *
+ * @subsubsection mysection3_2_2_2 Ubuntu 10.10 instructions
+ *
+ * The following specific commands can be run on an Ubuntu system to install the required packages.
+ * In this case, the version is 10.10, but other versions should work in a similar way.
+ *
+ * <c>apt-get install libconfig-general-perl</c>
+ *
+ * @section mysection3_3 Generating the host tool tarball
+ *
+ * The host tool tarball will be distributed on an as-needs basis to customers.
+ *
+ * Build the Packet logger by doing make stat_parser in the swdepot/host directory. This copies the
+ * headers.txt file to the packet logger directory. Obtain the Packet Logger (including headers subdirectory)
+ * from the swdepot/host/pktlogger directory in the source tree that was used to build the image that is
+ * running netdebug. Copy the entire directory structure onto the monitoring system.
+ *
+ * Failure to use the correct header version (and checksum) will result in an error. You can force it continue
+ * even in the case of a mismatch with --force, but chances are something will be broken.
+ *
+ * @subsection mysection3_3_1 Host tool tarball contents
+ *
+ * The following list is a description of the files in the host tarball.
+ *
+ * \li <c>headers.txt</c> - system generated file containing all the structure headers.
+ * \li <c>iwevent.conf</c> - configuration file to capture iwevent logs from the network.
+ * \li <c>mem.conf</c> - configuration file to capture memory dump events from the network.
+ * \li <c>mem_track.py</c> - helper tool to parse memory dumps.
+ * \li <c>pktlogger-parser.conf</c> - configuration tool for the packet logger parser helper script.
+ * \li <c>pktlogger-parser.pl</c> - packet logger parser helper tool.
+ * \li <c>plot_all.py</c> - helper tool to plot statistics in real time.
+ * \li <c>post_analysis_tools.mk</c> - makefile to generate post-processing required for pktlogger-parser.
+ * \li <c>post_analysis_tools.tar</c> - tarball of generated code for post-processing.
+ * \li <c>pp-scan.pl</c> - perl script to scan for changed test results.
+ * \li <c>qdrv_netdebug_checksum.h</c> - checksum file to ensure the tool is receiving the correct debug
+ * packets.
+ * \li <c>qdrv_p4build.h</c> - version header.
+ * \li <c>radar.conf</c> - configuration file to capture radar memory events from the network.
+ * \li <c>rate.conf</c> - configuration file to capture rate adaptation events from the network.
+ * \li <c>stat_parser.pl</c> - main packet logger host tool.
+ * \li <c>stats.conf</c> - configuration file to capture statistics from the network.
+ * \li <c>sysmsgdebug.conf</c> - configuration to capture syslog messages from the network.
+ * \li <c>txbf.conf</c> - configuration to capture beamforming data from the network.
+ *
+ * @section mysection3_4 Running the host side tool
+ *
+ * The general format of the host side tool arguments is as follows:
+ *
+ * \verbatim
+   stat_parser.pl  [--conf <conf1>[,<conf2>[,<conf3>]] [--conf <conf4>]]
+                   [--save] [--port <port number>] [--infile <filename>]
+                   [--log <logFilePrefix>]
+                   [--console] [--conf2 <configFileName> ...]
+                   [--force] [--debug ] [--verbosity <0-10>]
+\endverbatim
+ *
+ * @param conf a set of comma delimited configuration files to use with the tool.
+ * @param save Save debug packet to a binary file instead of parsing in real-time.
+ * @param port UDP port number for receiving debug packets. The default is 6602.
+ * @param infile Parse packets from a file instead of from a network device.
+ * @param log prefix of the directory to store the log files in.
+ * @param console
+ * @param force
+ * @param debug
+ * @param verbosity
+ *
+ * @section mysection3_5 Configuration files
+ *
+ * The different configuration files are enabled using the --conf argument to the host side tool.
+ *
+ * The following default configuration files are defined:
+ *
+ * <TABLE>
+ * <TR> <TH>Config name</TH><TH>Description</TH></TR>
+ * <TR> <TD>stats.conf</TD><TD>The 'traditional' pktlogger.</TD></TR>
+ * <TR> <TD>rate.conf</TD><TD>Specific rate retry debugging.</TD></TR>
+ * <TR> <TD>mem.conf</TD><TD>Specific memory block debugging.</TD></TR>
+ * <TR> <TD>radar.conf</TD><TD>Specific radar memory debugging.</TD></TR>
+ * <TR> <TD>txbf.conf</TD><TD>Specific beamforming debugging.</TD></TR>
+ * <TR> <TD>iwevent.conf</TD><TD>Specific iwevent debugging.</TD></TR>
+ * <TR> <TD>sysmsgdebug.conf</TD><TD>Specific syslog debugging.</TD></TR>
+ * </TABLE>
+ *
+ * These files generally can be used with no alterations. The following variables can be modified in
+ * the file to customise individual setups.
+ *
+ * <TABLE>
+ * <TR> <TH>Variable</TH><TH>Description</TH><TH>Valid values</TH></TR>
+ * <TR> <TD>log_dir</TD><TD>The directory to store the log files. If it doesn't exist, the directory
+ * will be automatically created.</TD><TD>Any valid directory name.</TD></TR>
+ * <TR> <TD>log_file</TD><TD>An informative prefix for all the log file names</TD><TD>Any ASCII
+ * string.</TD></TR>
+ * <TR> <TD>create_raw_log</TD><TD>Whether to generate the unparsed raw log file.</TD><TD><c>0, 1</c></TD></TR>
+ * <TR> <TD>recs_per_file</TD><TD>The number of records to put in a single file.</TD><TD><c>1-65535</c></TD></TR>
+ * </TABLE>
+ *
+ * Pktlogger can be run in a single phase or in two phases.
+ *
+ * When run in a single phase, debug packets are captured and saved directly into
+ * various text files (depending on config types).
+ *
+ * When run in two phases, all debug packets are captured and saved into a single 'raw'
+ * binary file. After the capture is complete, the same script is invoked with different
+ * parameters to parse the binary file and generate the text file.
+ *
+ * Some of the generated text files are in readable text format, and others are in
+ * CSV (comma separated values) format, which can be viewed and processed in a
+ * spreadsheet program.
+ *
+ * @section mysection3_6 Example usage
+ *
+ * <b>Example 1: Usage on a Windows machine.</b>
+ *
+ * The host side command is:
+ *
+ * \verbatim
+stat_parser.pl --save
+\endverbatim
+ *
+ * In parallel, on the embedded platform, enable the packet logger function:
+ *
+ * \verbatim
+netdebug on
+\endverbatim
+ *
+ * After debug packet capture is complete, the following command can be used to parse the packets saved in file.
+ * \verbatim
+stat_parser.pl --conf <stats,iwevent,mem,.etc> --infile <path to the packet file>
+\endverbatim
+ *
+ * The following screenshots show the result of running these commands on the host and DUT.
+ *
+ * \anchor pktlogger-host-screenshot
+ * \image latex pktlogger_host_1.png "Example usage of pktlogger (host side)" width=\textwidth
+ *
+ * \anchor pktlogger_dut_screenshot1
+ * \image latex pktlogger_dut_1.png "Example usage of pktlogger (DUT side)" width=\textwidth
+ *
+ * After stopping capture of the debug packets, the file that contains all data can
+ * be found under the 'LOGS' directory.
+ * \anchor pktlogger_host_screenshot2
+ * \image latex pktlogger_host_2.png "Example usage of pktlogger (host side)" width=\textwidth
+ *
+ * Parse debug packets from file.
+ * \anchor pktlogger_host_screenshot3
+ * \image latex pktlogger_host_3.png "Example usage of pktlogger (Phase2 host side)" width=\textwidth
+ *
+ * \note In phase 2, to process packets from a file,
+ * if there is a mismatched version (the host tools package is not from the same
+ * build version as the embedded image), a message like the following will be displayed:<BR>
+ * \verbatim
+Receiving statistics from 00:26:86:01:37:3d
+ERROR: logger checksum (a6efa7d) does not match sender checksum (bb5a307c)
+\endverbatim<BR>
+ * To correct this condition, use a host tools package with the same build version as
+ * the embeded image.
+ *
+ * In addition to post-capture parsing, pktlogger can capture and parse live streams
+ * as per the following example.
+ * In this case, parameters <c>--save</c> and <c>--infile</c> are not used.
+ * Example:
+ * \image latex pktlogger_host_old.png "Example usage of pktlogger (host side)" width=\textwidth
+ */
diff --git a/quantenna/common/doxygen/pktlogger_doc/chapter4.txt b/quantenna/common/doxygen/pktlogger_doc/chapter4.txt
new file mode 100644
index 0000000..bde83d0
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/chapter4.txt
@@ -0,0 +1,93 @@
+/**@page mypage4 Analyzing results
+ *
+ * Analyzing the results from pktlogger can be done in many different ways. The following sections show some of
+ * the methods used.
+ *
+ * @section mysection4_1 Excel graphing of CSV files
+ *
+ * The simplest method to analyse shorter test runs is to use Microsoft Excel (or another spreadsheet program)
+ * to quickly analyse rows/columns of data, and graph trends in the data.
+ *
+ * Each file generated from pktlogger is stored in two forms. The first is an incremental CSV (comma separated
+ * value) format. The second is a raw data CSV format.
+ *
+ * The incremental CSV format file is a post-processed version of the raw data file, and contains the difference
+ * from one sample of data to the next. The raw CSV file format contains the raw data as received by the data source.
+ * For example, see the following image showing some fields from both the raw and incremental CSV files for
+ * comparison.
+ *
+ * \anchor raw-processed-csv
+ * \image latex raw-processed-csv.png "Raw CSV (left) and processed CSV (right)" width=\textwidth
+ *
+ * \note For the processed CSV file, the first row of data will generally contain a large value. For plotting and
+ * analysing data, this row should be ommitted to prevent skewing of data.
+ *
+ * \note Even in the incremental CSV format, some fields are kept as raw values. For example: tx_channel is constant
+ * at it is not an incremental stat.
+ *
+ * An example of a graph created in excel is shown in the following figure.
+ *
+ * \anchor sys-temp-excel-graph
+ * \image latex sys-temp-graph-excel.png "Example graph of system temperature" width=\textwidth
+ *
+ * The different fields within the CSV file are defined in section [ref].
+ *
+ * @subsection mysection_4_1_1 CSV file formats
+ *
+ * This section details the format of the various pktlogger CSV files generated.
+ *
+ * @subsubsection mysection_4_1_2 Stat logger file format
+ *
+ * The format of the CSV file for the stat logger (the 'traditional' pktlogger) is as per the following diagram:
+ *
+ * \anchor packetlogger-main-format
+ * \image latex packetlogger-main-format.png "Main packetlogger CSV format" width=\textwidth
+ * 
+ * The following table details where to find additional documentation for the different parts of the CSV file.
+ *
+ * <TABLE>
+ * <TR> <TH>Section name</TH><TH>Description</TH><TH>C structure</TH></TR>
+ * <TR> <TD>Common header</TD><TD>Shared header across some different pktlogger formats.</TD>
+ * <TD><c>struct qdrv_netdebug_hdr</c></TD></TR>
+ * <TR> <TD>stats_muc_rx</TD><TD>Statistics on the RX path from the MuC.</TD>
+ * <TD><c>struct muc_rx_stats</c></TD></TR>
+ * <TR> <TD>rates_muc_rx</TD><TD>RX MCS packet counts from the MuC.</TD>
+ * <TD><c>struct muc_rx_rates</c></TD></TR>
+ * <TR> <TD>stats_muc_tx</TD><TD>Statistics on the TX path from the MuC.</TD>
+ * <TD><c>struct muc_tx_stats</c></TD></TR>
+ * <TR> <TD>stats_qdisc</TD><TD>Statistics from the LHost QDisc (queue discipline).</TD>
+ * <TD><c>struct qdrv_qdisc_stats</c></TD></TR>
+ * <TR> <TD>stats_emac</TD><TD>Statistics from the EMAC (Ethernet).</TD>
+ * <TD><c>struct qdrv_emac_stats</c></TD></TR>
+ * <TR> <TD>stats_wlan_rx</TD><TD>Statistics from the WLAN driver for the RX path.</TD>
+ * <TD><c>struct qdrv_wlan_rx_stats</c></TD></TR>
+ * <TR> <TD>stats_wlan_tx</TD><TD>Statistics from the WLAN driver for the TX path.</TD>
+ * <TD><c>struct qdrv_wlan_tx_stats</c></TD></TR>
+ * <TR> <TD>stats_wlan_sm</TD><TD>Statistics from the WLAN 802.11 state machine.</TD>
+ * <TD><c>struct qdrv_wlan_sm_stats</c></TD></TR>
+ * <TR> <TD>stats_phy_rx</TD><TD>Statistics from the PHY RX.</TD>
+ * <TD><c>struct qtn_rx_stats</c></TD></TR>
+ * <TR> <TD>stats_phy_tx</TD><TD>Statistics from the PHY TX.</TD>
+ * <TD><c>struct qtn_tx_stats</c></TD></TR>
+ * <TR> <TD>stats_mem</TD><TD>Statistics from the LHost memory subsystem.</TD>
+ * <TD><c>struct qdrv_mem_stats</c></TD></TR>
+ * <TR> <TD>stats_evm</TD><TD>Statistics from the MuC EVM calculations.</TD>
+ * <TD><c>struct qdrv_rx_evm_array</c></TD></TR>
+ * <TR> <TD>stats_skb_qdrv</TD><TD>Statistics the QDRV for Linux skb usage.</TD>
+ * <TD><c>struct qtn_skb_recycle_stats</c></TD></TR>
+ * <TR> <TD>stats_skb_kfree</TD><TD>Statistics the QDRV for Linux skb usage.</TD>
+ * <TD><c>struct qtn_skb_recycle_stats</c></TD></TR>
+ * </TABLE>
+ *
+ * @subsubsection mysection_4_1_3 Rate logger file format
+ *
+ * The format of the CSV file for the rate logger is as per the following diagram:
+ *
+ * \anchor ratelogger-csv-format
+ * \image latex ratelogger-csv-format.png "Ratelogger CSV format" width=\textwidth
+ *
+ * @section mysection4_2 Packetlogger parser
+ *
+ * For each test run performed, the pktlogger parser script can be run across the resultant pktlogger logs to
+ * generate graphs, and perform rudimentary analysis of the results.
+ */
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/packetlogger-main-format.png b/quantenna/common/doxygen/pktlogger_doc/image/packetlogger-main-format.png
new file mode 100644
index 0000000..6f84871
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/packetlogger-main-format.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/pktlogger-dut.png b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger-dut.png
new file mode 100644
index 0000000..c8a5f46
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger-dut.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/pktlogger-high-level.png b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger-high-level.png
new file mode 100644
index 0000000..d833314
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger-high-level.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/pktlogger-host.png b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger-host.png
new file mode 100644
index 0000000..dc85e1c
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger-host.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_dut_1.png b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_dut_1.png
new file mode 100644
index 0000000..111524f
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_dut_1.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_dut_default_setting.png b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_dut_default_setting.png
new file mode 100644
index 0000000..b85b9be
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_dut_default_setting.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_high_level.png b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_high_level.png
new file mode 100644
index 0000000..f62a204
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_high_level.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_host_1.png b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_host_1.png
new file mode 100644
index 0000000..bdeae2b
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_host_1.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_host_2.png b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_host_2.png
new file mode 100644
index 0000000..10c3e5c
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_host_2.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_host_3.png b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_host_3.png
new file mode 100644
index 0000000..2b98de2
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_host_3.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_host_old.png b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_host_old.png
new file mode 100644
index 0000000..a3dda05
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/pktlogger_host_old.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/ratelogger-csv-format.png b/quantenna/common/doxygen/pktlogger_doc/image/ratelogger-csv-format.png
new file mode 100644
index 0000000..79ad655
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/ratelogger-csv-format.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/raw-processed-csv.png b/quantenna/common/doxygen/pktlogger_doc/image/raw-processed-csv.png
new file mode 100644
index 0000000..dc6fc92
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/raw-processed-csv.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/image/sys-temp-graph-excel.png b/quantenna/common/doxygen/pktlogger_doc/image/sys-temp-graph-excel.png
new file mode 100644
index 0000000..88d6d24
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/image/sys-temp-graph-excel.png
Binary files differ
diff --git a/quantenna/common/doxygen/pktlogger_doc/qtn_latex.sh b/quantenna/common/doxygen/pktlogger_doc/qtn_latex.sh
new file mode 100755
index 0000000..d087e84
--- /dev/null
+++ b/quantenna/common/doxygen/pktlogger_doc/qtn_latex.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+TARGET_DIR=../../../doxygen/pktlogger/latex
+targetfile=${TARGET_DIR}/refman.tex
+tmpfile=${TARGET_DIR}/refman.tex.tmp
+
+if [ -f $targetfile ] ; then
+	echo "refman.tex exists....."
+	# change latex type from "book" to "report"
+	sed -e 's/book/report/' $targetfile > $tmpfile
+
+	cp -f $tmpfile $targetfile
+fi
diff --git a/quantenna/common/doxygen/qcsapi-title.pdf b/quantenna/common/doxygen/qcsapi-title.pdf
new file mode 100644
index 0000000..064f917
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi-title.pdf
Binary files differ
diff --git a/quantenna/common/doxygen/qcsapi_doc/Makefile b/quantenna/common/doxygen/qcsapi_doc/Makefile
new file mode 100644
index 0000000..b4b90aa
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/Makefile
@@ -0,0 +1,56 @@
+DOXYGEN_PDF_INPUT_FILES = ../../../buildroot/package/qcsapi/qcsapi-1.0.1/qcsapi.h \
+	groupdefine.txt chapter1_2_3.txt chapter4.txt chapter5.txt chapter7.txt chapter8.txt \
+	../../../drivers/include/shared/qtn/qvsp_data.h \
+	../../../include/qtn/shared_defs.h
+
+DOXYGEN_PDF_INPUT_FILE_INTERNAL_ONLY = vsp.txt
+
+DOXYGEN_PDF_INPUT_FILES += $(shell ls -r changelog/*changes-* | sort -Vr)
+
+TARGET_DIR = ../../../doxygen/qcsapi
+TARGETS = $(TARGET_DIR)/Quantenna_QCSAPI_internal.pdf $(TARGET_DIR)/Quantenna_QCSAPI.pdf
+
+all: doxygen_pdf
+doxygen_pdf: $(TARGETS)
+
+-include vsp_doc.d
+
+vsp_doc: vsp_doc.c
+	gcc -Wall -Werror -ansi -pedantic -O1 -g				\
+		-isystem ../../../drivers/include/shared 			\
+		-isystem ../../../include					\
+		-isystem ../../../						\
+		-isystem ../../../buildroot/package/qcsapi/qcsapi-1.0.1/	\
+		$< -o $@ -MD -MF $@.d
+
+vsp.txt: vsp_doc
+	./$< > $@
+
+Doxyfile_pdf.Quantenna_QCSAPI: $(DOXYGEN_PDF_INPUT_FILES)
+	perl ../qtn_doxyfile_pdf.pl	\
+		Doxyfile_pdf		\
+		"Quantenna Configuration and Status APIs"	\
+		"qcsapi"		\
+		"$(REV_NUM)"		\
+		--predefined "DOXYGEN_EXCLUDE" $^ > $@
+
+Doxyfile_pdf.Quantenna_QCSAPI_internal: $(DOXYGEN_PDF_INPUT_FILES) $(DOXYGEN_PDF_INPUT_FILE_INTERNAL_ONLY)
+	perl ../qtn_doxyfile_pdf.pl	\
+		Doxyfile_pdf		\
+		"Quantenna Configuration and Status APIs INTERNAL ONLY"	\
+		"qcsapi" "$(REV_NUM)"	\
+		--internal $^ > $@
+
+$(TARGET_DIR)/%.pdf: Doxyfile_pdf.%
+	rm -rf $(TARGET_DIR)/latex
+	doxygen $<
+	./qtn_latex.sh
+	make -C $(TARGET_DIR)/latex
+	pdftk ../qcsapi-title.pdf stamp ../../rev-num.pdf output title.pdf
+	pdftk A=$(TARGET_DIR)/latex/refman.pdf B=./title.pdf cat B1 A2-end output xxx.pdf
+	mv xxx.pdf $@
+	-rm title.pdf $(TARGET_DIR)/latex/refman.pdf
+
+clean:
+	rm -f Doxyfile_pdf*
+	rm -rf $(TARGET_DIR)
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.1-v36.4 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.1-v36.4
new file mode 100644
index 0000000..2e5e107
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.1-v36.4
@@ -0,0 +1,50 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v36_1_TO_v36_4 Version v36.1 to version v36.4 changes
+ *
+ * \subsection v36_1_TO_v36_4Added Added functions
+ *
+ * The following functions were added between versions v36.1 and v36.4
+ *
+ * \li \ref qcsapi_wifi_set_vht (36.1.0.1)
+ * \li \ref qcsapi_bootcfg_commit (36.1.0.1)
+ * \li \ref qcsapi_wifi_scs_switch_channel (36.1.0.1)
+ * \li \ref qcsapi_wifi_get_vht (36.1.0.1)
+ * \li \ref qcsapi_wifi_get_scs_param_report (36.1.0.4)
+ * \li \ref qcsapi_wifi_set_ocac_thrshld (36.1.0.6)
+ * \li \ref qcsapi_wifi_set_ocac_duration (36.1.0.6)
+ * \li \ref qcsapi_wifi_set_ocac_cac_time (36.1.0.6)
+ * \li \ref qcsapi_wifi_get_ocac_status (36.1.0.6)
+ * \li \ref qcsapi_wps_set_timeout (36.1.0.6)
+ * \li \ref qcsapi_wifi_get_psk_auth_failures (36.1.0.6)
+ * \li \ref qcsapi_wifi_set_ocac_report_only (36.1.0.6)
+ * \li \ref qcsapi_wifi_stop_ocac (36.1.0.6)
+ * \li \ref qcsapi_wifi_set_ocac_dwell_time (36.1.0.6)
+ * \li \ref qcsapi_wifi_start_ocac (36.1.0.6)
+ * \li \ref qcsapi_wps_on_hidden_ssid (36.1.0.6)
+ * \li \ref qcsapi_non_wps_get_pp_enable (36.1.0.8)
+ * \li \ref qcsapi_non_wps_set_pp_enable (36.1.0.8)
+ * \li \ref qcsapi_wifi_get_dscp_8021p_map (36.1.0.8)
+ * \li \ref qcsapi_set_carrier_id (36.1.0.8)
+ * \li \ref qcsapi_get_carrier_id (36.1.0.8)
+ * \li \ref qcsapi_wifi_set_dscp_8021p_map (36.1.0.8)
+ * \li \ref qcsapi_wps_set_ap_pin (36.1.0.9)
+ * \li \ref qcsapi_wps_save_ap_pin (36.1.0.9)
+ * \li \ref qcsapi_wps_upnp_status (36.1.0.11)
+ * \li \ref qcsapi_wps_upnp_enable (36.1.0.11)
+ * \li \ref qcsapi_wps_get_pbc_in_srcm (36.1.0.14)
+ * \li \ref qcsapi_wps_set_pbc_in_srcm (36.1.0.14)
+ * \li \ref qcsapi_wifi_set_chan_pri_inactive (36.1.0.15)
+ * \li \ref qcsapi_wifi_enable_tdls (36.1.0.16)
+ * \li \ref qcsapi_wifi_get_tdls_status (36.1.0.16)
+ * \li \ref qcsapi_wifi_get_tdls_params (36.1.0.16)
+ * \li \ref qcsapi_wifi_tdls_operate (36.1.0.16)
+ * \li \ref qcsapi_wifi_set_tdls_params (36.1.0.16)
+ *
+ * \subsection v36_1_TO_v36_4Removed Removed functions
+ *
+ * The following functions were removed between versions v36.1 and v36.4
+ *
+ * \li qcsapi_wifi_set_scs_wf (36.1.0.1)
+ */
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.4-v36.5 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.4-v36.5
new file mode 100644
index 0000000..450d713
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.4-v36.5
@@ -0,0 +1,36 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v36_4TO_v36_5 Version v36.4 to version v36.5 changes
+ *
+ * \subsection v36_4_TO_v36_5Added Added functions
+ *
+ * The following functions were added between versions v36.4 and v36.4
+ *
+ * \li \ref qcsapi_wifi_set_dscp_ac_map (36.4.0.2)
+ * \li \ref qcsapi_wifi_get_congestion_index (36.4.0.2)
+ * \li \ref qcsapi_wifi_set_tx_power (36.4.0.2)
+ * \li \ref qcsapi_wifi_get_dscp_ac_map (36.4.0.2)
+ * \li \ref qcsapi_registrar_get_default_pbc_bss (36.4.0.2)
+ * \li \ref qcsapi_wifi_get_priority (36.4.0.2)
+ * \li \ref qcsapi_regulatory_get_db_version (36.4.0.2)
+ * \li \ref qcsapi_wifi_get_carrier_interference (36.4.0.2)
+ * \li \ref qcsapi_wifi_set_priority (36.4.0.2)
+ * \li \ref qcsapi_registrar_set_default_pbc_bss (36.4.0.2)
+ * \li \ref qcsapi_wps_on_hidden_ssid_status (36.4.0.2)
+ * \li \ref qcsapi_wps_get_runtime_state (36.4.0.2)
+ * \li \ref qcsapi_regulatory_overwrite_country_code (36.4.0.4)
+ * \li \ref qcsapi_wifi_get_spinor_jedecid (36.4.0.4)
+ * \li \ref qcsapi_get_custom_value (36.4.0.5)
+ * \li \ref qcsapi_wifi_get_michael_errcnt (36.4.0.9)
+ * \li \ref qcsapi_wifi_get_bw_power (36.5.0.0)
+ * \li \ref qcsapi_wifi_set_bw_power (36.5.0.0)
+ * \li \ref qcsapi_regulatory_set_bw_power (36.5.0.0)
+ *
+ * \subsection v36_4TO_v36_5Removed Removed functions
+ *
+ * The following functions were removed between versions v36.4 and v36.5
+ *
+ * \li qcsapi_regulatory_get_supported_tx_power_levels (36.4.0.5)
+ * \li qcsapi_regulatory_get_current_tx_power_level (36.4.0.5)
+ */
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.5-v36.6 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.5-v36.6
new file mode 100644
index 0000000..2e7ac14
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.5-v36.6
@@ -0,0 +1,33 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v36_5TO_v36_6 Version v36.5 to version v36.6 changes
+ *
+ * \subsection v36_5TO_v36_6Added Added functions
+ *
+ * The following functions were added between versions v36.5 and v36.6
+ *
+ * \li \ref qcsapi_pm_get_mode (36.5.0.1)
+ * \li \ref qcsapi_wifi_cancel_scan (36.5.0.2)
+ * \li \ref qcsapi_wifi_show_vlan_config (36.5.0.2)
+ * \li \ref qcsapi_wifi_set_nss_cap (36.5.0.6)
+ * \li \ref qcsapi_wifi_get_ipff (36.5.0.6)
+ * \li \ref qcsapi_wifi_get_tx_mcs_per_association (36.5.0.6)
+ * \li \ref qcsapi_wifi_get_mlme_stats_per_association (36.5.0.6)
+ * \li \ref qcsapi_wifi_get_rx_mcs_per_association (36.5.0.6)
+ * \li \ref qcsapi_wifi_get_mlme_stats_per_mac (36.5.0.6)
+ * \li \ref qcsapi_wifi_del_ipff (36.5.0.6)
+ * \li \ref qcsapi_wifi_get_nss_cap (36.5.0.6)
+ * \li \ref qcsapi_wifi_add_ipff (36.5.0.6)
+ * \li \ref qcsapi_wifi_get_mlme_stats_macs_list (36.5.0.6)
+ * \li \ref qcsapi_wps_enable_ap_pin (36.5.0.7)
+ * \li \ref qcsapi_wifi_get_security_defer_mode (36.5.0.8)
+ * \li \ref qcsapi_wifi_startprod (36.5.0.8)
+ * \li \ref qcsapi_wifi_apply_security_config (36.5.0.8)
+ * \li \ref qcsapi_store_ipaddr (36.5.0.8)
+ * \li \ref qcsapi_wifi_set_security_defer_mode (36.5.0.8)
+ * \li \ref qcsapi_wifi_set_rts_threshold (36.6.0.0)
+ * \li \ref qcsapi_config_get_ssid_parameter (36.6.0.0)
+ * \li \ref qcsapi_config_update_ssid_parameter (36.6.0.0)
+ * \li \ref qcsapi_wifi_get_rts_threshold (36.6.0.0)
+ */
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.6-v36.7 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.6-v36.7
new file mode 100644
index 0000000..d8d2a72
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.6-v36.7
@@ -0,0 +1,11 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v36_6TO_v36_7 Version v36.6 to version v36.7 changes
+ *
+ * \subsection v36_6TO_v36_7Added Added functions
+ *
+ * The following functions were added between versions v36.6 and v36.7
+ *
+ * \li \ref qcsapi_regulatory_apply_tx_power_cap (36.7.0.0)
+ */
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.7-v37.3 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.7-v37.3
new file mode 100644
index 0000000..19bf20d
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v36.7-v37.3
@@ -0,0 +1,73 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v36_7TO_v37_3 Version v36.7 to version v37.3 changes
+ *
+ * \subsection v36_7_TO_v37_3Added Added functions
+ *
+ * The following functions were added between versions v36.7 and v37.3
+ *
+ * \li \ref qcsapi_wifi_get_pmf (36.7.0.1)
+ * \li \ref qcsapi_set_aspm_l1 (36.7.0.1)
+ * \li \ref qcsapi_wifi_set_pmf (36.7.0.1)
+ * \li \ref qcsapi_led_pwm_enable (36.7.0.2)
+ * \li \ref qcsapi_led_brightness (36.7.0.2)
+ * \li \ref qcsapi_wifi_set_eap_shared_key (36.7.0.3)
+ * \li \ref qcsapi_SSID_get_pmf (36.7.0.3)
+ * \li \ref qcsapi_wifi_set_phy_mode (36.7.0.3)
+ * \li \ref qcsapi_wifi_get_eap_shared_key (36.7.0.3)
+ * \li \ref qcsapi_regulatory_restore_regulatory_tx_power (36.7.0.3)
+ * \li \ref qcsapi_wifi_set_eap_radius_port (36.7.0.3)
+ * \li \ref qcsapi_get_board_parameter (36.7.0.3)
+ * \li \ref qcsapi_SSID_set_pmf (36.7.0.3)
+ * \li \ref qcsapi_wifi_set_eap_radius_ipaddr (36.7.0.3)
+ * \li \ref qcsapi_wifi_get_eap_radius_port (36.7.0.3)
+ * \li \ref qcsapi_wifi_get_phy_mode (36.7.0.3)
+ * \li \ref qcsapi_wifi_set_own_ip_addr (36.7.0.3)
+ * \li \ref qcsapi_wifi_get_eap_radius_ipaddr (36.7.0.3)
+ * \li \ref qcsapi_wifi_set_bss_isolate (36.7.0.4)
+ * \li \ref qcsapi_wowlan_set_magic_pattern (36.7.0.4)
+ * \li \ref qcsapi_wifi_set_intra_bss_isolate (36.7.0.4)
+ * \li \ref qcsapi_wowlan_set_L2_type (36.7.0.4)
+ * \li \ref qcsapi_wifi_get_intra_bss_isolate (36.7.0.4)
+ * \li \ref qcsapi_set_host_state (36.7.0.4)
+ * \li \ref qcsapi_wowlan_set_udp_port (36.7.0.4)
+ * \li \ref qcsapi_wifi_get_bss_isolate (36.7.0.4)
+ * \li \ref qcsapi_wowlan_set_match_type (36.7.0.4)
+ * \li \ref qcsapi_wifi_get_bgscan_status (36.7.0.5)
+ * \li \ref qcsapi_wifi_get_extender_params (36.7.0.5)
+ * \li \ref qcsapi_wifi_enable_bgscan (36.7.0.5)
+ * \li \ref qcsapi_wifi_set_extender_params (36.7.0.5)
+ * \li \ref qcsapi_wds_get_mode (36.7.0.5)
+ * \li \ref qcsapi_wds_add_peer_encrypt (36.7.0.5)
+ * \li \ref qcsapi_wds_set_mode (36.7.0.5)
+ * \li \ref qcsapi_get_uboot_info (36.7.0.6)
+ * \li \ref qcsapi_wifi_get_airfair (36.7.0.7)
+ * \li \ref qcsapi_wifi_get_group_key_interval (36.7.0.7)
+ * \li \ref qcsapi_wifi_set_airfair (36.7.0.7)
+ * \li \ref qcsapi_wifi_set_group_key_interval (36.7.0.7)
+ * \li \ref qcsapi_wifi_disable_dfs_channels (36.7.0.8)
+ * \li \ref qcsapi_is_startprod_done (37.3.0.0)
+ * \li \ref qcsapi_wifi_wowlan_get_magic_pattern (37.3.0.0)
+ * \li \ref qcsapi_wifi_get_auth_enc_per_association (37.3.0.0)
+ * \li \ref qcsapi_wifi_get_tx_amsdu (37.3.0.0)
+ * \li \ref qcsapi_wifi_wowlan_get_host_state (37.3.0.0)
+ * \li \ref qcsapi_wifi_set_scs_stats (37.3.0.0)
+ * \li \ref qcsapi_wifi_wowlan_get_match_type (37.3.0.0)
+ * \li \ref qcsapi_set_l1 (37.3.0.0)
+ * \li \ref qcsapi_wifi_get_config_BSSID (37.3.0.0)
+ * \li \ref qcsapi_wifi_set_bf_power (37.3.0.0)
+ * \li \ref qcsapi_wifi_set_bb_param (37.3.0.0)
+ * \li \ref qcsapi_wifi_get_bb_param (37.3.0.0)
+ * \li \ref qcsapi_wifi_get_disassoc_reason (37.3.0.0)
+ * \li \ref qcsapi_wifi_get_vendor_per_association (37.3.0.0)
+ * \li \ref qcsapi_wifi_wowlan_param_get (37.3.0.0)
+ * \li \ref qcsapi_wifi_disassociate_sta (37.3.0.0)
+ * \li \ref qcsapi_wifi_wowlan_get_udp_port (37.3.0.0)
+ * \li \ref qcsapi_wifi_wowlan_get_l2_type (37.3.0.0)
+ * \li \ref qcsapi_wifi_get_bf_power (37.3.0.0)
+ * \li \ref qcsapi_get_qpm_level (37.3.0.0)
+ * \li \ref qcsapi_wifi_get_tput_caps (37.3.0.0)
+ * \li \ref qcsapi_wifi_set_tx_amsdu (37.3.0.0)
+ * \li \ref qcsapi_regulatory_set_bf_power (37.3.0.0)
+ */
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.3-v37.4 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.3-v37.4
new file mode 100644
index 0000000..0ab0b4c
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.3-v37.4
@@ -0,0 +1,191 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_3_TO_v37_4 Version v37.3 to version v37.4 changes
+ *
+ * \subsection v37_3_TO_v37_4Added Added functions
+ *
+ * The following functions were added between versions v37.3 and v37.4
+ *
+ * \li \ref qcsapi_interface_get_counter64 (37.3.0.1)
+ * \li \ref qcsapi_wifi_get_scan_buf_max_size (37.3.0.2)
+ * \li \ref qcsapi_calcmd_get_info (37.3.0.2)
+ * \li \ref qcsapi_wifi_set_scan_buf_max_size (37.3.0.2)
+ * \li \ref qcsapi_wifi_get_scan_table_max_len (37.3.0.2)
+ * \li \ref qcsapi_wifi_set_scan_table_max_len (37.3.0.2)
+ * \li \ref qcsapi_wifi_get_tdls_params (37.3.0.3)
+ * \li \ref qcsapi_wifi_get_tdls_status (37.3.0.3)
+ * \li \ref qcsapi_wifi_tdls_operate (37.3.0.3)
+ * \li \ref qcsapi_wifi_get_connection_mode (37.3.0.3)
+ * \li \ref qcsapi_wifi_set_tdls_params (37.3.0.3)
+ * \li \ref qcsapi_wifi_reassociate (37.3.0.4)
+ * \li \ref qcsapi_wifi_get_max_mimo (37.3.0.6)
+ * \li \ref qcsapi_get_swfeat_list (37.3.0.6)
+ * \li \ref qcsapi_security_get_nai_realms (37.3.0.8)
+ * \li \ref qcsapi_wifi_get_proxy_arp (37.3.0.8)
+ * \li \ref qcsapi_wifi_get_80211u_params (37.3.0.8)
+ * \li \ref qcsapi_remove_hs20_param (37.3.0.8)
+ * \li \ref qcsapi_wifi_set_interworking (37.3.0.8)
+ * \li \ref qcsapi_wifi_get_power_selection (37.3.0.8)
+ * \li \ref qcsapi_security_get_roaming_consortium (37.3.0.8)
+ * \li \ref qcsapi_wifi_get_interworking (37.3.0.8)
+ * \li \ref qcsapi_security_del_roaming_consortium (37.3.0.8)
+ * \li \ref qcsapi_security_del_nai_realm (37.3.0.8)
+ * \li \ref qcsapi_wifi_get_hs20_status (37.3.0.8)
+ * \li \ref qcsapi_wifi_set_hs20_status (37.3.0.8)
+ * \li \ref qcsapi_wifi_get_hs20_params (37.3.0.8)
+ * \li \ref qcsapi_wifi_get_venue_info (37.3.0.8)
+ * \li \ref qcsapi_security_add_roaming_consortium (37.3.0.8)
+ * \li \ref qcsapi_wifi_set_proxy_arp (37.3.0.8)
+ * \li \ref qcsapi_remove_11u_param (37.3.0.8)
+ * \li \ref qcsapi_wifi_set_power_selection (37.3.0.8)
+ * \li \ref qcsapi_wifi_set_hs20_params (37.3.0.8)
+ * \li \ref qcsapi_wifi_set_80211u_params (37.3.0.8)
+ * \li \ref qcsapi_wifi_set_venue_info (37.3.0.8)
+ * \li \ref qcsapi_security_add_nai_realm (37.3.0.8)
+ * \li \ref qcsapi_qtm_del_rule_index (37.3.0.9)
+ * \li \ref qcsapi_qtm_get_strm (37.3.0.9)
+ * \li \ref qcsapi_qtm_get_state (37.3.0.9)
+ * \li \ref qcsapi_qtm_get_state_all (37.3.0.9)
+ * \li \ref qcsapi_qtm_del_rule (37.3.0.9)
+ * \li \ref qcsapi_qtm_set_state (37.3.0.9)
+ * \li \ref qcsapi_qtm_get_config (37.3.0.9)
+ * \li \ref qcsapi_qtm_add_rule (37.3.0.9)
+ * \li \ref qcsapi_qtm_get_stats (37.3.0.9)
+ * \li \ref qcsapi_qtm_get_config_all (37.3.0.9)
+ * \li \ref qcsapi_qtm_get_rule (37.3.0.9)
+ * \li \ref qcsapi_qtm_get_inactive_flags (37.3.0.9)
+ * \li \ref qcsapi_qtm_set_config (37.3.0.9)
+ * \li \ref qcsapi_regulatory_get_configured_tx_power_ext (37.3.0.10)
+ * \li \ref qcsapi_wifi_get_scan_chk_inv (37.3.0.10)
+ * \li \ref qcsapi_get_service_action_enum (37.3.0.10)
+ * \li \ref qcsapi_wifi_set_scan_chk_inv (37.3.0.10)
+ * \li \ref qcsapi_service_control (37.3.0.10)
+ * \li \ref qcsapi_get_service_name_enum (37.3.0.10)
+ * \li \ref qcsapi_wifi_set_tx_power_ext (37.3.0.10)
+ * \li \ref qcsapi_wifi_get_tx_power_ext (37.3.0.10)
+ * \li \ref qcsapi_wifi_enable_tdls_over_qhop (37.3.0.11)
+ * \li \ref qcsapi_interface_get_ip4 (37.3.0.12)
+ * \li \ref qcsapi_wifi_set_dfs_s_radio_dwell_time (37.3.0.12)
+ * \li \ref qcsapi_wifi_set_dfs_s_radio_thrshld (37.3.0.12)
+ * \li \ref qcsapi_wifi_get_dfs_s_radio_status (37.3.0.12)
+ * \li \ref qcsapi_wifi_get_bss_assoc_limit (37.3.0.12)
+ * \li \ref qcsapi_wifi_set_dfs_s_radio_report_only (37.3.0.12)
+ * \li \ref qcsapi_wifi_set_dfs_s_radio_cac_time (37.3.0.12)
+ * \li \ref qcsapi_wifi_get_dfs_s_radio_availability (37.3.0.12)
+ * \li \ref qcsapi_wifi_set_bss_assoc_limit (37.3.0.12)
+ * \li \ref qcsapi_interface_set_ip4 (37.3.0.12)
+ * \li \ref qcsapi_wifi_start_dfs_s_radio (37.3.0.12)
+ * \li \ref qcsapi_wifi_set_dfs_s_radio_duration (37.3.0.12)
+ * \li \ref qcsapi_wifi_stop_dfs_s_radio (37.3.0.12)
+ * \li \ref qcsapi_security_add_oper_friendly_name (37.3.0.13)
+ * \li \ref qcsapi_security_del_venue_name (37.3.0.13)
+ * \li \ref qcsapi_security_get_hs20_conn_capab (37.3.0.13)
+ * \li \ref qcsapi_security_get_venue_name (37.3.0.13)
+ * \li \ref qcsapi_security_add_venue_name (37.3.0.13)
+ * \li \ref qcsapi_security_get_oper_friendly_name (37.3.0.13)
+ * \li \ref qcsapi_security_del_oper_friendly_name (37.3.0.13)
+ * \li \ref qcsapi_security_del_hs20_conn_capab (37.3.0.13)
+ * \li \ref qcsapi_verify_numeric (37.3.0.13)
+ * \li \ref qcsapi_security_add_hs20_conn_capab (37.3.0.13)
+ * \li \ref qcsapi_wifi_del_radius_auth_server_cfg (37.3.0.15)
+ * \li \ref qcsapi_wifi_get_radius_auth_server_cfg (37.3.0.15)
+ * \li \ref qcsapi_wifi_add_radius_auth_server_cfg (37.3.0.15)
+ * \li \ref qcsapi_get_random_seed (37.3.0.16)
+ * \li \ref qcsapi_set_random_seed (37.3.0.16)
+ * \li \ref qcsapi_wifi_get_link_quality_max (37.3.0.16)
+ * \li \ref qcsapi_wifi_set_enable_mu (37.3.0.17)
+ * \li \ref qcsapi_wifi_get_mu_use_eq (37.3.0.17)
+ * \li \ref qcsapi_wifi_get_mu_use_precode (37.3.0.17)
+ * \li \ref qcsapi_wifi_get_enable_mu (37.3.0.17)
+ * \li \ref qcsapi_wifi_set_mu_use_eq (37.3.0.17)
+ * \li \ref qcsapi_wfa_cert_mode_enable (37.3.0.17)
+ * \li \ref qcsapi_wifi_get_mu_groups (37.3.0.17)
+ * \li \ref qcsapi_wifi_set_mu_use_precode (37.3.0.17)
+ * \li \ref qcsapi_wifi_set_l2_ext_filter (37.3.0.19)
+ * \li \ref qcsapi_wifi_get_l2_ext_filter (37.3.0.19)
+ * \li \ref qcsapi_set_emac_switch (37.3.0.20)
+ * \li \ref qcsapi_send_file (37.3.0.20)
+ * \li \ref qcsapi_get_emac_switch (37.3.0.20)
+ * \li \ref qcsapi_eth_dscp_map (37.3.0.20)
+ * \li \ref qcsapi_wifi_set_dfs_s_radio_wea_cac_time (37.4.0.0)
+ * \li \ref qcsapi_str_to_uint32 (37.4.0.0)
+ * \li \ref qcsapi_wifi_set_dfs_s_radio_wea_duration (37.4.0.0)
+ *
+ * \subsection v37_3_TO_v37_4Removed Removed functions
+ *
+ * The following functions were removed between versions v37.3 and v37.4
+ *
+ * \li qcsapi_vsp_add_rule (37.3.0.9)
+ * \li qcsapi_vsp_get_rule (37.3.0.9)
+ * \li qcsapi_vsp_get_strm (37.3.0.9)
+ * \li qcsapi_vsp_set_config (37.3.0.9)
+ * \li qcsapi_vsp_get_inactive_flags (37.3.0.9)
+ * \li qcsapi_vsp_del_rule (37.3.0.9)
+ * \li qcsapi_vsp_get_config (37.3.0.9)
+ * \li qcsapi_vsp_get_stats (37.3.0.9)
+ * \li qcsapi_vsp_get_state_all (37.3.0.9)
+ * \li qcsapi_vsp_get_state (37.3.0.9)
+ * \li qcsapi_vsp_del_rule_index (37.3.0.9)
+ * \li qcsapi_vsp_set_state (37.3.0.9)
+ * \li qcsapi_vsp_get_config_all (37.3.0.9)
+ * \li \ref qcsapi_wifi_set_venue_info (37.3.0.13)
+ * \li \ref qcsapi_wifi_get_venue_info (37.3.0.13)
+ * \li qcsapi_wifi_set_eap_shared_key (37.3.0.15)
+ * \li qcsapi_wifi_get_eap_shared_key (37.3.0.15)
+ * \li qcsapi_wifi_set_eap_radius_port (37.3.0.15)
+ * \li qcsapi_wifi_set_eap_radius_ipaddr (37.3.0.15)
+ * \li qcsapi_wifi_get_eap_radius_port (37.3.0.15)
+ * \li qcsapi_wifi_get_eap_radius_ipaddr (37.3.0.15)
+ *
+ * \subsection v37_3_0_1_TO_v37_3_0_2Proto Function prototype changes
+ * The following function prototypes were modified between versions v37.3 and v37.4
+ *  - \ref qcsapi_wifi_get_auth_state (37.3.0.2)
+ *    - Old prototype: int qcsapi_wifi_get_auth_state(const char *ifname, char *mac_addr, int *auth_state);
+ *    - New prototype: int qcsapi_wifi_get_auth_state(const char *ifname, const char *mac_addr, int *auth_state);
+ *  - \ref qcsapi_wifi_get_wpa_status (37.3.0.2)
+ *    - Old prototype: int qcsapi_wifi_get_wpa_status(const char *ifname, char *wpa_status, char *mac_addr, const qcsapi_unsigned_int max_len);
+ *    - New prototype: int qcsapi_wifi_get_wpa_status(const char *ifname, char *wpa_status, const char *mac_addr, const qcsapi_unsigned_int max_len);
+ *  - \ref qcsapi_wifi_tdls_operate (37.3.0.11)
+ *    - Old prototype: int qcsapi_wifi_tdls_operate(const char *ifname, qcsapi_tdls_oper operate, const char *mac_addr_str);
+ *    - New prototype: int qcsapi_wifi_tdls_operate(const char *ifname, qcsapi_tdls_oper operate, const char *mac_addr_str, int cs_interval);
+ *  - \ref qcsapi_security_add_roaming_consortium (37.3.0.13)
+ *    - Old prototype: int qcsapi_security_add_roaming_consortium(const char *ifname, const string_32 p_value);
+ *    - New prototype: int qcsapi_security_add_roaming_consortium(const char *ifname, const char *p_value);
+ *  - \ref qcsapi_security_get_nai_realms (37.3.0.13)
+ *    - Old prototype: int qcsapi_security_get_nai_realms(const char *ifname, string_1024 p_value);
+ *    - New prototype: int qcsapi_security_get_nai_realms(const char *ifname, string_4096 p_value);
+ *  - \ref qcsapi_wifi_set_80211u_params (37.3.0.13)
+ *    - Old prototype: int qcsapi_wifi_set_80211u_params(const char *ifname, const string_32 param, const string_32 p_value);
+ *    - New prototype: int qcsapi_wifi_set_80211u_params(const char *ifname, const string_32 param, const string_256 value1, const string_32 value2);
+ *  - \ref qcsapi_security_del_nai_realm (37.3.0.13)
+ *    - Old prototype: int qcsapi_security_del_nai_realm(const char *ifname, const string_32 p_value);
+ *    - New prototype: int qcsapi_security_del_nai_realm(const char *ifname, const char *nai_realm);
+ *  - \ref qcsapi_get_temperature_info (37.3.0.13)
+ *    - Old prototype: int qcsapi_get_temperature_info(int *temp_external, int *temp_internal);
+ *    - New prototype: int qcsapi_get_temperature_info(int *temp_external, int *temp_internal, int *temp_bb_internal);
+ *  - \ref qcsapi_security_del_roaming_consortium (37.3.0.13)
+ *    - Old prototype: int qcsapi_security_del_roaming_consortium(const char *ifname, const string_32 p_value);
+ *    - New prototype: int qcsapi_security_del_roaming_consortium(const char *ifname, const char *p_value);
+ *  - \ref qcsapi_wifi_get_80211u_params (37.3.0.13)
+ *    - Old prototype: int qcsapi_wifi_get_80211u_params(const char *ifname, const string_32 param, string_32 p_value);
+ *    - New prototype: int qcsapi_wifi_get_80211u_params(const char *ifname, const string_32 param, string_256 p_value);
+ *  - \ref qcsapi_wifi_set_phy_mode (37.3.0.17)
+ *    - Old prototype: int qcsapi_wifi_set_phy_mode(const char *ifname, char *new_phy_mode);
+ *    - New prototype: int qcsapi_wifi_set_phy_mode(const char *ifname, const char *new_phy_mode);
+ *  - \ref qcsapi_wifi_rfstatus (37.3.0.18)
+ *    - Old prototype: int qcsapi_wifi_rfstatus(const char *ifname, qcsapi_unsigned_int *rfstatus);
+ *    - New prototype: int qcsapi_wifi_rfstatus(qcsapi_unsigned_int *rfstatus);
+ *  - \ref qcsapi_wifi_rfenable (37.3.0.18)
+ *    - Old prototype: int qcsapi_wifi_rfenable(const char *ifname, const qcsapi_unsigned_int onoff);
+ *    - New prototype: int qcsapi_wifi_rfenable(const qcsapi_unsigned_int onoff);
+ *  - \ref qcsapi_get_service_action_enum (37.3.0.19)
+ *    - Old prototype: int qcsapi_get_service_action_enum(string_32 lookup_action, qcsapi_service_action *serv_action);
+ *    - New prototype: int qcsapi_get_service_action_enum(const char *lookup_action, qcsapi_service_action *serv_action);
+ *  - \ref qcsapi_get_service_name_enum (37.3.0.19)
+ *    - Old prototype: int qcsapi_get_service_name_enum(string_32 lookup_service, qcsapi_service_name *serv_name);
+ *    - New prototype: int qcsapi_get_service_name_enum(const char *lookup_service, qcsapi_service_name *serv_name);
+ *  - \ref qcsapi_wifi_set_hs20_params (37.3.0.21)
+ *    - Old prototype: int qcsapi_wifi_set_hs20_params(const char *ifname, const string_32 param, const string_64 p_value);
+ *    - New prototype: int qcsapi_wifi_set_hs20_params(const char *ifname, const string_32 param, const string_64 value1, const string_64 value2, const string_64 value3, const string_64 value4, const string_64 value5, const string_64 value6);
+ */
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.0-v37.4.0.18 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.0-v37.4.0.18
new file mode 100644
index 0000000..b6b501d
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.0-v37.4.0.18
@@ -0,0 +1,101 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_0_TO_v37_4_0_18 Version v37.4.0.0 to version v37.4.0.18 changes
+ *
+ * \subsection v37_4_0_0_TO_v37_4_0_18Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.0 and v37.4.0.18
+ *
+ * \li \ref qcsapi_wifi_set_optim_stats (37.4.0.3)
+ * \li \ref qcsapi_wifi_set_sys_time (37.4.0.5)
+ * \li \ref qcsapi_wifi_set_2_4ghz_bw (37.4.0.5)
+ * \li \ref qcsapi_wifi_get_mac_address_reserve (37.4.0.5)
+ * \li \ref qcsapi_wifi_set_vco_lock_detect_mode (37.4.0.5)
+ * \li \ref qcsapi_wifi_clear_mac_address_reserve (37.4.0.5)
+ * \li \ref qcsapi_wifi_set_mac_address_reserve (37.4.0.5)
+ * \li \ref qcsapi_wifi_get_vco_lock_detect_mode (37.4.0.5)
+ * \li \ref qcsapi_wifi_get_sys_time (37.4.0.5)
+ * \li \ref qcsapi_wifi_set_pref_band (37.4.0.5)
+ * \li \ref qcsapi_wifi_get_2_4ghz_bw (37.4.0.5)
+ * \li \ref qcsapi_wifi_get_pref_band (37.4.0.5)
+ * \li \ref qcsapi_wifi_ssid_get_bssid (37.4.0.6)
+ * \li \ref qcsapi_wifi_ssid_set_bssid (37.4.0.6)
+ * \li \ref qcsapi_get_eth_info (37.4.0.6)
+ * \li \ref qcsapi_wifi_get_chan_power_table (37.4.0.7)
+ * \li \ref qcsapi_wifi_get_scs_score_report (37.4.0.7)
+ * \li \ref qcsapi_wifi_set_chan_power_table (37.4.0.7)
+ * \li \ref qcsapi_wifi_get_ap_interface_name (37.4.0.9)
+ * \li \ref qcsapi_wifi_set_ap_interface_name (37.4.0.9)
+ * \li \ref qcsapi_wifi_verify_repeater_mode (37.4.0.9)
+ * \li \ref qcsapi_wifi_block_bss (37.4.0.12)
+ * \li \ref qcsapi_wifi_chan_control (37.4.0.13)
+ * \li \ref qcsapi_wifi_get_chan_disabled (37.4.0.13)
+ * \li \ref qcsapi_wifi_set_txba_disable (37.4.0.17)
+ * \li \ref qcsapi_security_del_hs20_icon (37.4.0.17)
+ * \li \ref qcsapi_wifi_get_pairwise_key_interval (37.4.0.17)
+ * \li \ref qcsapi_wifi_get_vap_state (37.4.0.17)
+ * \li \ref qcsapi_wifi_set_vap_default_state (37.4.0.17)
+ * \li \ref qcsapi_wifi_send_qos_map_conf (37.4.0.17)
+ * \li \ref qcsapi_wifi_set_chan_pri_inactive_ext (37.4.0.17)
+ * \li \ref qcsapi_wifi_get_txburst (37.4.0.17)
+ * \li \ref qcsapi_wifi_get_supported_freq_bands (37.4.0.17)
+ * \li \ref qcsapi_wifi_get_qos_map (37.4.0.17)
+ * \li \ref qcsapi_security_del_osu_server_uri (37.4.0.17)
+ * \li \ref qcsapi_wifi_get_sec_chan (37.4.0.17)
+ * \li \ref qcsapi_wifi_get_dscp_tid_map (37.4.0.17)
+ * \li \ref qcsapi_wifi_get_rxba_decline (37.4.0.17)
+ * \li \ref qcsapi_wifi_del_qos_map (37.4.0.17)
+ * \li \ref qcsapi_wifi_set_pairwise_key_interval (37.4.0.17)
+ * \li \ref qcsapi_security_add_osu_server_uri (37.4.0.17)
+ * \li \ref qcsapi_security_get_osu_server_uri (37.4.0.17)
+ * \li \ref qcsapi_security_get_osu_server_param (37.4.0.17)
+ * \li \ref qcsapi_wifi_set_vap_state (37.4.0.17)
+ * \li \ref qcsapi_wifi_get_txba_disable (37.4.0.17)
+ * \li \ref qcsapi_security_del_osu_server_param (37.4.0.17)
+ * \li \ref qcsapi_security_get_hs20_icon (37.4.0.17)
+ * \li \ref qcsapi_wifi_set_qos_map (37.4.0.17)
+ * \li \ref qcsapi_wifi_set_rxba_decline (37.4.0.17)
+ * \li \ref qcsapi_wifi_set_txburst (37.4.0.17)
+ * \li \ref qcsapi_wifi_set_sec_chan (37.4.0.17)
+ * \li \ref qcsapi_security_add_osu_server_param (37.4.0.17)
+ * \li \ref qcsapi_security_add_hs20_icon (37.4.0.17)
+ * \li \ref qcsapi_wifi_get_vap_default_state (37.4.0.17)
+ *
+ * \subsection v37_4_0_0_TO_v37_4_0_18Proto Function prototype changes
+ *
+ * The following function prototypes were modified between versions v37.4.0.0 and v37.4.0.18
+ *  - \ref qcsapi_security_del_venue_name (37.4.0.2)
+ *    - Old prototype: int qcsapi_security_del_venue_name(const char *ifname, char *lang_code, char *venue_name);
+ *    - New prototype: int qcsapi_security_del_venue_name(const char *ifname, const char *lang_code, const char *venue_name);
+ *  - \ref qcsapi_security_add_venue_name (37.4.0.2)
+ *    - Old prototype: int qcsapi_security_add_venue_name(const char *ifname, char *lang_code, char *venue_name);
+ *    - New prototype: int qcsapi_security_add_venue_name(const char *ifname, const char *lang_code, const char *venue_name);
+ *  - \ref qcsapi_security_del_oper_friendly_name (37.4.0.2)
+ *    - Old prototype: int qcsapi_security_del_oper_friendly_name(const char *ifname, char *lang_code, char *oper_friendly_name);
+ *    - New prototype: int qcsapi_security_del_oper_friendly_name(const char *ifname, const char *lang_code, const char *oper_friendly_name);
+ *  - \ref qcsapi_security_add_nai_realm (37.4.0.2)
+ *    - Old prototype: int qcsapi_security_add_nai_realm(const char *ifname, int encoding, char *nai_realm, char *eap_method);
+ *    - New prototype: int qcsapi_security_add_nai_realm(const char *ifname, const int encoding, const char *nai_realm, const char *eap_method);
+ *  - \ref qcsapi_security_add_oper_friendly_name (37.4.0.2)
+ *    - Old prototype: int qcsapi_security_add_oper_friendly_name(const char *ifname, char *lang_code, char *oper_friendly_name);
+ *    - New prototype: int qcsapi_security_add_oper_friendly_name(const char *ifname, const char *lang_code, const char *oper_friendly_name);
+ *  - \ref qcsapi_enable_vlan_pass_through (37.4.0.7)
+ *    - Old prototype: int qcsapi_enable_vlan_pass_through(int enabled);
+ *    - New prototype: int qcsapi_enable_vlan_pass_through(const char *ifname, int enabled);
+ *  - \ref qcsapi_get_uboot_info (37.4.0.9)
+ *    - Old prototype: int qcsapi_get_uboot_info(char *info, qcsapi_unsigned_int uboot_info);
+ *    - New prototype: int qcsapi_get_uboot_info(string_32 uboot_version, struct early_flash_config *ef_config);
+ *  - \ref qcsapi_wifi_set_group_key_interval (37.4.0.17)
+ *    - Old prototype: int qcsapi_wifi_set_group_key_interval(const char *ifname, const string_16 group_key_interval);
+ *    - New prototype: int qcsapi_wifi_set_group_key_interval(const char *ifname, const unsigned int key_interval);
+ *  - \ref qcsapi_wifi_show_vlan_config (37.4.0.17)
+ *    - Old prototype: int qcsapi_wifi_show_vlan_config(const char *ifname, string_1024 vcfg);
+ *    - New prototype: int qcsapi_wifi_show_vlan_config(const char *ifname, string_2048 vcfg, const char *flag);
+ *  - \ref qcsapi_wifi_get_group_key_interval (37.4.0.17)
+ *    - Old prototype: int qcsapi_wifi_get_group_key_interval(const char *ifname, string_16 group_key_interval);
+ *    - New prototype: int qcsapi_wifi_get_group_key_interval(const char *ifname, unsigned int *p_key_interval);
+ *  - \ref qcsapi_wifi_vlan_config (37.4.0.17)
+ *    - Old prototype: int qcsapi_wifi_vlan_config(const char *ifname, qcsapi_vlan_cmd cmd, uint32_t vlanid, uint32_t flags);
+ *    - New prototype: int qcsapi_wifi_vlan_config(const char *ifname, qcsapi_vlan_cmd cmd, uint32_t vlanid);
+ */
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.19-v37.4.0.20 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.19-v37.4.0.20
new file mode 100644
index 0000000..87dca00
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.19-v37.4.0.20
@@ -0,0 +1,18 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_19_TO_v37_4_0_20 Version v37.4.0.19 to version v37.4.0.20 changes
+ *
+ * \subsection v37_4_0_19_TO_v37_4_0_20Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.19 and v37.4.0.20
+ * \li \ref qcsapi_wifi_get_24g_bw
+ * \li \ref qcsapi_wifi_set_24g_bw
+ *
+ * \subsection v37_4_0_19_TO_v37_4_0_20Removed Removed functions
+ *
+ * The following functions were removed between versions v37.4.0.19 and v37.4.0.20
+ * \li \ref qcsapi_wifi_get_2_4ghz_bw
+ * \li \ref qcsapi_wifi_set_2_4ghz_bw
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.20-v37.4.0.21 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.20-v37.4.0.21
new file mode 100644
index 0000000..6796837
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.20-v37.4.0.21
@@ -0,0 +1,11 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_20_TO_v37_4_0_21 Version v37.4.0.20 to version v37.4.0.21 changes
+ *
+ * \subsection v37_4_0_20_TO_v37_4_0_21Removed Removed functions
+ *
+ * The following functions were removed between versions v37.4.0.20 and v37.4.0.21
+ * \li \ref qcsapi_enable_vlan_pass_through
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.26-v37.4.0.27 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.26-v37.4.0.27
new file mode 100644
index 0000000..94ef05d
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.26-v37.4.0.27
@@ -0,0 +1,12 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_26_TO_v37_4_0_27 Version v37.4.0.26 to version v37.4.0.27 changes
+ *
+ * \subsection v37_4_0_26_TO_v37_4_0_27Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.26 and v37.4.0.27
+ * \li \ref qcsapi_qwe_command
+ * \li \ref qcsapi_wifi_get_scan_IEs
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.27-v37.4.0.28 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.27-v37.4.0.28
new file mode 100644
index 0000000..73bb8fd
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.27-v37.4.0.28
@@ -0,0 +1,13 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_27_TO_v37_4_0_28 Version v37.4.0.27 to version v37.4.0.28 changes
+ *
+ * \subsection v37_4_0_27_TO_v37_4_0_28Proto Function prototype changes
+ *
+ * The following function prototypes were modified between versions v37.4.0.27 and v37.4.0.28
+ *  - \ref qcsapi_wifi_get_node_param
+ *    - Old prototype: int qcsapi_wifi_get_node_param(const char *ifname, const uint32_t node_index, qcsapi_per_assoc_param param_type, int local_remote_flag, string_128 input_param_str, qcsapi_measure_report_result *report_result);
+ *    - New prototype: int qcsapi_wifi_get_node_param(const char *ifname, const uint32_t node_index, qcsapi_per_assoc_param param_type, int local_remote_flag, const string_128 input_param_str, qcsapi_measure_report_result *report_result);
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.28-v37.4.0.29 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.28-v37.4.0.29
new file mode 100644
index 0000000..254ebe1
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.28-v37.4.0.29
@@ -0,0 +1,12 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_28_TO_v37_4_0_29 Version v37.4.0.28 to version v37.4.0.29 changes
+ *
+ * \subsection v37_4_0_28_TO_v37_4_0_29Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.28 and v37.4.0.29
+ * \li \ref qcsapi_pm_dual_emac_get_mode
+ * \li \ref qcsapi_pm_dual_emac_set_mode
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.29-v37.4.0.30 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.29-v37.4.0.30
new file mode 100644
index 0000000..2a70842
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.29-v37.4.0.30
@@ -0,0 +1,18 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_29_TO_v37_4_0_30 Version v37.4.0.29 to version v37.4.0.30 changes
+ *
+ * \subsection v37_4_0_29_TO_v37_4_0_30Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.29 and v37.4.0.30
+ * \li \ref qcsapi_wifi_get_block_bss
+ * \li \ref qcsapi_qtm_safe_get_rule
+ * \li \ref qcsapi_qtm_safe_get_stats
+ * \li \ref qcsapi_qtm_safe_del_rule
+ * \li \ref qcsapi_qtm_safe_get_strm
+ * \li \ref qcsapi_qtm_safe_get_config_all
+ * \li \ref qcsapi_qtm_safe_add_rule
+ * \li \ref qcsapi_qtm_safe_get_state_all
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.32-v37.4.0.33 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.32-v37.4.0.33
new file mode 100644
index 0000000..c0150e7
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.32-v37.4.0.33
@@ -0,0 +1,14 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_32_TO_v37_4_0_33 Version v37.4.0.32 to version v37.4.0.33 changes
+ *
+ * \subsection v37_4_0_32_TO_v37_4_0_33Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.32 and v37.4.0.33
+ * \li \ref qcsapi_wifi_get_supp_chans
+ * \li \ref qcsapi_get_client_mac_list
+ * \li \ref qcsapi_get_core_dump
+ * \li \ref qcsapi_get_core_dump_size
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.34-v37.4.0.35 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.34-v37.4.0.35
new file mode 100644
index 0000000..94ffb56
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.34-v37.4.0.35
@@ -0,0 +1,12 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_34_TO_v37_4_0_35 Version v37.4.0.34 to version v37.4.0.35 changes
+ *
+ * \subsection v37_4_0_34_TO_v37_4_0_35Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.34 and v37.4.0.35
+ * \li \ref qcsapi_wifi_get_per_assoc_data
+ * \li \ref qcsapi_wifi_sample_all_clients
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.35-v37.4.0.36 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.35-v37.4.0.36
new file mode 100644
index 0000000..5d91180
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.35-v37.4.0.36
@@ -0,0 +1,20 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_35_TO_v37_4_0_36 Version v37.4.0.35 to version v37.4.0.36 changes
+ *
+ * \subsection v37_4_0_35_TO_v37_4_0_36Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.35 and v37.4.0.36
+ * \li \ref qcsapi_wifi_get_multicast_list
+ * \li \ref qcsapi_wifi_add_multicast
+ * \li \ref qcsapi_wifi_del_multicast
+ *
+ * \subsection v37_4_0_35_TO_v37_4_0_36Proto Function prototype changes
+ *
+ * The following function prototypes were modified between versions v37.4.0.35 and v37.4.0.36
+ *  - \ref qcsapi_qtm_safe_get_strm
+ *    - Old prototype: int qcsapi_qtm_safe_get_strm(const char *ifname, struct qcsapi_int_array1024 *entries, unsigned int max_entries, int show_all);
+ *    - New prototype: int qcsapi_qtm_safe_get_strm(const char *ifname, struct qvsp_strms *strms, int show_all);
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.40-v37.4.0.41 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.40-v37.4.0.41
new file mode 100644
index 0000000..fbb6ecd
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.40-v37.4.0.41
@@ -0,0 +1,17 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_40_TO_v37_4_0_41 Version v37.4.0.40 to version v37.4.0.41 changes
+ *
+ * \subsection v37_4_0_40_TO_v37_4_0_41Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.40 and v37.4.0.41
+ * \li \ref qcsapi_get_igmp_snooping_state
+ * \li \ref qcsapi_wifi_remove_mac_address_list
+ * \li \ref qcsapi_wifi_is_ready
+ * \li \ref qcsapi_get_ep_status
+ * \li \ref qcsapi_wifi_authorize_mac_address_list
+ * \li \ref qcsapi_set_igmp_snooping_state
+ * \li \ref qcsapi_wifi_deny_mac_address_list
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.41-v37.4.0.42 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.41-v37.4.0.42
new file mode 100644
index 0000000..6da031d
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.41-v37.4.0.42
@@ -0,0 +1,13 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_41_TO_v37_4_0_42 Version v37.4.0.41 to version v37.4.0.42 changes
+ *
+ * \subsection v37_4_0_41_TO_v37_4_0_42Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.41 and v37.4.0.42
+ * \li \ref qcsapi_wifi_set_max_bcast_pps
+ * \li \ref qcsapi_wifi_update_bss_cfg
+ * \li \ref qcsapi_wifi_set_dfs_s_radio_wea_dwell_time
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.42-v37.4.0.43 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.42-v37.4.0.43
new file mode 100644
index 0000000..96f2223
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.42-v37.4.0.43
@@ -0,0 +1,11 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_42_TO_v37_4_0_43 Version v37.4.0.42 to version v37.4.0.43 changes
+ *
+ * \subsection v37_4_0_42_TO_v37_4_0_43Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.42 and v37.4.0.43
+ * \li \ref qcsapi_wifi_get_chan_pri_inactive
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.43-v37.4.0.44 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.43-v37.4.0.44
new file mode 100644
index 0000000..0658a86
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.43-v37.4.0.44
@@ -0,0 +1,32 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_43_TO_v37_4_0_44 Version v37.4.0.43 to version v37.4.0.44 changes
+ *
+ * \subsection v37_4_0_43_TO_v37_4_0_44Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.43 and v37.4.0.44
+ * \li \ref qcsapi_wifi_set_SSID_group_id
+ * \li \ref qcsapi_wifi_get_SSID_assoc_reserve
+ * \li \ref qcsapi_wifi_set_scs_leavedfs_chan_mtrc_mrgn
+ * \li \ref qcsapi_wifi_get_SSID_group_id
+ * \li \ref qcsapi_wifi_set_max_boot_cac_duration
+ * \li \ref qcsapi_set_custom_value
+ * \li \ref qcsapi_wifi_set_SSID_assoc_reserve
+ *
+ * \subsection v37_4_0_43_TO_v37_4_0_44Removed Removed functions
+ *
+ * The following functions were removed between versions v37.4.0.43 and v37.4.0.44
+ * \li \ref qcsapi_wifi_fget
+ *
+ * \subsection v37_4_0_43_TO_v37_4_0_44Proto Function prototype changes
+ *
+ * The following function prototypes were modified between versions v37.4.0.43 and v37.4.0.44
+ *  - \ref qcsapi_wifi_set_bss_assoc_limit
+ *    - Old prototype: int qcsapi_wifi_set_bss_assoc_limit(const char *ifname, qcsapi_unsigned_int assoc_limit);
+ *    - New prototype: int qcsapi_wifi_set_bss_assoc_limit(const qcsapi_unsigned_int group, const qcsapi_unsigned_int limit);
+ *  - \ref qcsapi_wifi_get_bss_assoc_limit
+ *    - Old prototype: int qcsapi_wifi_get_bss_assoc_limit(const char *ifname, qcsapi_unsigned_int *p_assoc_limit);
+ *    - New prototype: int qcsapi_wifi_get_bss_assoc_limit(qcsapi_unsigned_int group, qcsapi_unsigned_int *p_assoc_limit);
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.47-v37.4.0.48 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.47-v37.4.0.48
new file mode 100644
index 0000000..6c76903
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.47-v37.4.0.48
@@ -0,0 +1,12 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_47_TO_v37_4_0_48 Version v37.4.0.47 to version v37.4.0.48 changes
+ *
+ * \subsection v37_4_0_47_TO_v37_4_0_48Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.47 and v37.4.0.48
+ * \li \ref qcsapi_wps_set_default_pbc_bss
+ * \li \ref qcsapi_wps_get_default_pbc_bss
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.49-v37.4.0.50 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.49-v37.4.0.50
new file mode 100644
index 0000000..4fedac4
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.49-v37.4.0.50
@@ -0,0 +1,13 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_49_TO_v37_4_0_50 Version v37.4.0.49 to version v37.4.0.50 changes
+ *
+ * \subsection v37_4_0_49_TO_v37_4_0_50Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.49 and v37.4.0.50
+ * \li \ref qcsapi_wifi_authorize_mac_address_list_ext
+ * \li \ref qcsapi_wifi_deny_mac_address_list_ext
+ * \li \ref qcsapi_wifi_remove_mac_address_list_ext
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.50-v37.4.0.51 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.50-v37.4.0.51
new file mode 100644
index 0000000..95e7483
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.50-v37.4.0.51
@@ -0,0 +1,16 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_50_TO_v37_4_0_51 Version v37.4.0.50 to version v37.4.0.51 changes
+ *
+ * \subsection v37_4_0_50_TO_v37_4_0_51Proto Function prototype changes
+ *
+ * The following function prototypes were modified between versions v37.4.0.50 and v37.4.0.51
+ *  - \ref qcsapi_wifi_show_vlan_config
+ *    - Old prototype: int qcsapi_wifi_show_vlan_config(const char *ifname, string_2048 vcfg, const char *flag);
+ *    - New prototype: int qcsapi_wifi_show_vlan_config(const char *ifname, struct qcsapi_data_2Kbytes *vcfg, const char *flag);
+ *  - \ref qcsapi_wifi_get_rates
+ *    - Old prototype: int qcsapi_wifi_get_rates(const char *ifname, qcsapi_rate_type rate_type, string_1024 supported_rates);
+ *    - New prototype: int qcsapi_wifi_get_rates(const char *ifname, qcsapi_rate_type rate_type, string_2048 supported_rates);
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.51-v37.4.0.52 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.51-v37.4.0.52
new file mode 100644
index 0000000..e4a7d82
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.51-v37.4.0.52
@@ -0,0 +1,16 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_51_TO_v37_4_0_52 Version v37.4.0.51 to version v37.4.0.52 changes
+ *
+ * \subsection v37_4_0_51_TO_v37_4_0_52Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.51 and v37.4.0.52
+ * \li \ref qcsapi_set_log_level
+ * \li \ref qcsapi_get_log_level
+ * \li \ref qcsapi_get_app_core_dump
+ * \li \ref qcsapi_wifi_set_threshold_of_neighborhood_type
+ * \li \ref qcsapi_get_app_core_dump_size
+ * \li \ref qcsapi_wifi_get_neighborhood_type
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.53-v37.4.0.54 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.53-v37.4.0.54
new file mode 100644
index 0000000..5686b24
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.53-v37.4.0.54
@@ -0,0 +1,11 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_53_TO_v37_4_0_54 Version v37.4.0.53 to version v37.4.0.54 changes
+ *
+ * \subsection v37_4_0_53_TO_v37_4_0_54Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.53 and v37.4.0.54
+ * \li \ref qcsapi_wifi_set_current_tx_power_level
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.56-v37.4.0.57 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.56-v37.4.0.57
new file mode 100644
index 0000000..78a346e
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.56-v37.4.0.57
@@ -0,0 +1,33 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_56_TO_v37_4_0_57 Version v37.4.0.56 to version v37.4.0.57 changes
+ *
+ * \subsection v37_4_0_56_TO_v37_4_0_57Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.56 and v37.4.0.57
+ * \li \ref qcsapi_do_system_action
+ * \li \ref qcsapi_set_remote_logging
+ * \li \ref qcsapi_wifi_node_get_txrx_airtime
+ * \li \ref qcsapi_wifi_get_txrx_airtime
+ *
+ * \subsection v37_4_0_56_TO_v37_4_0_57Removed Removed functions
+ *
+ * The following functions were removed between versions v37.4.0.56 and v37.4.0.57
+ * \li \ref qcsapi_wifi_get_tx_airtime
+ * \li \ref qcsapi_wifi_node_get_tx_airtime
+ *
+ * \subsection v37_4_0_56_TO_v37_4_0_57Proto Function prototype changes
+ *
+ * The following function prototypes were modified between versions v37.4.0.56 and v37.4.0.57
+ *  - \ref qcsapi_set_log_level
+ *    - Old prototype: int qcsapi_set_log_level(const char *interface, string_32 level, qcsapi_log_module_name index);
+ *    - New prototype: int qcsapi_set_log_level(const char *ifname, qcsapi_log_module_name index, const string_128 params);
+ *  - \ref qcsapi_get_log_level
+ *    - Old prototype: int qcsapi_get_log_level(const char *interface, string_32 level, qcsapi_log_module_name index);
+ *    - New prototype: int qcsapi_get_log_level(const char *ifname, qcsapi_log_module_name index, string_128 params);
+ *  - \ref qcsapi_wifi_scs_switch_channel
+ *    - Old prototype: int qcsapi_wifi_scs_switch_channel(const char *ifname);
+ *    - New prototype: int qcsapi_wifi_scs_switch_channel(const char *ifname, uint16_t pick_flags);
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.57-v37.4.0.58 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.57-v37.4.0.58
new file mode 100644
index 0000000..5641f8f
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.57-v37.4.0.58
@@ -0,0 +1,14 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_57_TO_v37_4_0_58 Version v37.4.0.57 to version v37.4.0.58 changes
+ *
+ * \subsection v37_4_0_57_TO_v37_4_0_58Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.57 and v37.4.0.58
+ * \li \ref qcsapi_wifi_get_threshold_of_neighborhood_type
+ * \li \ref qcsapi_wifi_set_parameter
+ * \li \ref qcsapi_wifi_is_weather_channel
+ * \li \ref qcsapi_wifi_get_parameter
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.58-v37.4.0.59 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.58-v37.4.0.59
new file mode 100644
index 0000000..376a0e5
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.58-v37.4.0.59
@@ -0,0 +1,12 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_58_TO_v37_4_0_59 Version v37.4.0.58 to version v37.4.0.59 changes
+ *
+ * \subsection v37_4_0_58_TO_v37_4_0_59Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.58 and v37.4.0.59
+ * \li \ref qcsapi_wifi_set_br_isolate
+ * \li \ref qcsapi_wifi_get_br_isolate
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.59-v37.4.0.60 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.59-v37.4.0.60
new file mode 100644
index 0000000..1d3133f
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.59-v37.4.0.60
@@ -0,0 +1,11 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_59_TO_v37_4_0_60 Version v37.4.0.59 to version v37.4.0.60 changes
+ *
+ * \subsection v37_4_0_59_TO_v37_4_0_60Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.59 and v37.4.0.60
+ * \li \ref qcsapi_set_console
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.60-v37.4.0.61 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.60-v37.4.0.61
new file mode 100644
index 0000000..1ecc44e
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.60-v37.4.0.61
@@ -0,0 +1,12 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_60_TO_v37_4_0_61 Version v37.4.0.60 to version v37.4.0.61 changes
+ *
+ * \subsection v37_4_0_60_TO_v37_4_0_61Added Added functions
+ *
+ * The following functions were added between versions v37.4.0.60 and v37.4.0.61
+ * \li \ref qcsapi_wifi_set_tx_max_amsdu
+ * \li \ref qcsapi_wifi_get_tx_max_amsdu
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.62-v37.4.1.62 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.62-v37.4.1.62
new file mode 100644
index 0000000..43b07b7
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.0.62-v37.4.1.62
@@ -0,0 +1,16 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_0_62_TO_v37_4_1_62 Version v37.4.0.62 to version v37.4.1.62 changes
+ *
+ * \subsection v37_4_0_62_TO_v37_4_1_62Proto Function prototype changes
+ *
+ * The following function prototypes were modified between versions v37.4.0.62 and v37.4.1.62
+ *  - \ref qcsapi_get_app_core_dump
+ *    - Old prototype: int qcsapi_get_app_core_dump(char *file, string_4096 buf, uint32_t bytes_to_copy, uint32_t offset, uint32_t *bytes_copied);
+ *    - New prototype: int qcsapi_get_app_core_dump(const char *file, string_4096 buf, uint32_t bytes_to_copy, uint32_t offset, uint32_t *bytes_copied);
+ *  - \ref qcsapi_get_app_core_dump_size
+ *    - Old prototype: int qcsapi_get_app_core_dump_size(char *file, uint32_t *core_dump_size);
+ *    - New prototype: int qcsapi_get_app_core_dump_size(const char *file, uint32_t *core_dump_size);
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.6.62-v37.4.7.62 b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.6.62-v37.4.7.62
new file mode 100644
index 0000000..e1e8b41
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/changelog/changes-v37.4.6.62-v37.4.7.62
@@ -0,0 +1,16 @@
+/**
+ * \page ChangeLog
+ *
+ * \section v37_4_6_62_TO_v37_4_7_62 Version v37.4.6.62 to version v37.4.7.62 changes
+ *
+ * \subsection v37_4_6_62_TO_v37_4_7_62Added Added functions
+ *
+ * The following functions were added between versions v37.4.6.62 and v37.4.7.62
+ * \li \ref qcsapi_get_app_core_dump_ext
+ *
+ * \subsection v37_4_6_62_TO_v37_4_7_62Removed Removed functions
+ *
+ * The following functions were removed between versions v37.4.6.62 and v37.4.7.62
+ * \li \ref qcsapi_get_app_core_dump_size
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/chapter1_2_3.txt b/quantenna/common/doxygen/qcsapi_doc/chapter1_2_3.txt
new file mode 100644
index 0000000..bf0db98
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/chapter1_2_3.txt
@@ -0,0 +1,40 @@
+/**@page mypage1 Overview
+ * This document describes the Quantenna Configuration and Status API (QCSAPI).
+ *
+ * The document contains a general overview, specific information on the SDK, details on the RPC mechanism used for remote control,
+ * and detailed API usage and data structures used in QCSAPI. In addition to this, a sample application, <c>call_qcsapi</c> is detailed.
+ */
+
+/**@page ChangeLog Revision history
+ */
+
+/**@page mypage2 References
+ * - Quantenna Software Architecture (Software Integration Guide)
+ * - TR-098: Internet Gateway Device Data Model for TR-069<br>
+ *	Issue: 1 Amendment 2<br>
+ *	Issue Date: September 2008
+ */
+
+/**@page mypage3 Background
+ * The Quantenna WiFi device includes a number of configuration parameters, e.g. the MAC address or the current WiFi channel.
+ * In addition a variety of other parameters can be monitored, including counters and status.
+ *
+ * Prior to introducing the QCSAPI, reviewing the current configuration, making changes and monitoring the system required accessing several user-level
+ * commands, including ifconfig, iwconfig, iwpriv and iwlist.
+ *
+ * While workable for casual access, for more systematic programmable access, some drawbacks are present.
+ * First, required information is distributed over several commands or interfaces; no single point of access is available.
+ * Second, accessing the configuration is heavy, for the desired command must be executed as a shell process,
+ * with the output typically then parsed using a shell script or an awk program.
+ * A second child process is thus usually required to interpret the output from the original command.
+ * And any changes to the underlying configuration or monitoring command would likely require changes in this interface programming.
+ * 
+ * The Quantenna Configuration and Status APIs (QCSAPI) address these drawbacks.  
+ * They offer the application programmer a series of C-callable APIs to access and modify the current configuration.
+ * All configuration parameters can be read and updated through this API.  Statistics and other monitoring parameters are also available.
+ * And the APIs will not change, regardless of changes to the underlying programming, including the user-level interface commands.
+ * 
+ * The figure below shows selected software components on the Quantenna WiFI device and their interrelationships:<br>
+ * @image latex qcsapi_image1.jpg " " width=\textwidth
+ */
+
diff --git a/quantenna/common/doxygen/qcsapi_doc/chapter4.txt b/quantenna/common/doxygen/qcsapi_doc/chapter4.txt
new file mode 100644
index 0000000..f295ba5
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/chapter4.txt
@@ -0,0 +1,177 @@
+/**@page mypage4 QCSAPI concepts
+ * @section mysection4_1 Overview of the QCSAPIs
+ * The QCSAPI set shares a common set of parameters as described below.
+ * @subsection mysection4_1_1 Names of the QCSAPIs
+ * The name of each QCSAPI starts with "qcsapi".  The underscore character ('_') serves as a separator and punctuation.
+ * The kind of interface the QCSAPI is designed for typically follows "qcsapi" - e.g. "interface" for a general (network) interface
+ * or "wifi" for an API that only applies for WiFI devices (wifi0, etc.).  Next usually is "get" or "set" to show whether
+ * the API returns a parameter value or configures the parameter value.
+ * The last part of the name describes the parameter the API works with.
+ * 
+ * @subsection mysection_4_1_2 QCSAPIs data types and data structs
+ * Many of the QCSAPI data types and data structs follow the definitions in the TR-098 standards.
+ * Each datatype is introduced using its literal name or definition as found in the qcsapi.h header file,
+ * followed by a description or explanation.<br>
+ * The first API data type provides a platform independent definition of an unsigned 32-bit integer:<br>
+ * <c>qcsapi_unsigned_int</c><br>
+ * This tracks the "unsignedInt" data type from TR-098 and should match the uint32_t type defined in the C99 standard.
+ * 
+ * The next data type is an enumeration that represents the possible modes of a WiFi device, Access Point or Station.<br>
+ * 	@code 
+	typedef enum {
+		qcsapi_mode_not_defined = 1,
+		qcsapi_access_point,
+		qcsapi_station,
+		qcsapi_nosuch_mode = 0
+	} qcsapi_wifi_mode;
+  	@endcode
+ * 
+ * Mode not defined is valid; it means the WiFi device has not been configured as an AP or a Station.
+ * No such mode is a placeholder for invalid WiFi modes.
+ * 
+ * The next enumeration represents possible configuration options:<br>
+ * 	@code
+	typedef enum {
+		qcsapi_DFS,
+        	qcsapi_wmm,
+        	qcsapi_beacon_advertise,
+        	qcsapi_wifi_radio,
+        	qcsapi_autorate_fallback,
+        	qcsapi_security,
+        	qcsapi_SSID_broadcast,
+        	qcsapi_802_11d,
+        	qcsapi_wireless_isolation,
+        	qcsapi_short_GI,
+        	qcsapi_dfs_fast_channel_switch,
+        	qcsapi_dfs_no_dfs_scan,
+        	qcsapi_nosuch_option = 0
+	} qcsapi_option_type;
+	@endcode
+ * 
+ * These are parameters with only two values, yes or true, represented as 1 (actually any non-zero value);
+ * and no or false, represented as 0.  Only the Get Option and Set Option APIs work with this enum.<br>
+ * The next enumeration represents counters available through the Get Counter API:
+ * 	@code
+ * 	typedef enum {
+ * 		qcsapi_nosuch_counter = 0,
+ * 		qcsapi_total_bytes_sent = 1,
+ * 		qcsapi_total_bytes_received,
+ * 		qcsapi_total_packets_sent,
+ * 		qcsapi_total_packets_received,
+ *		qcsapi_discard_packets_sent,
+ * 		qcsapi_discard_packets_received,
+ * 		qcsapi_error_packets_sent,
+ * 		qcsapi_error_packets_received,
+ * 	} qcsapi_counter_type;
+ * 	@endcode
+ * This enum is one of the required arguments to qcsapi_interface_get_counter.
+ * 
+ * The next data type represents a 48-bit (6-byte) MAC address:<br>
+ * <c>qcsapi_mac_addr</c>
+ * 
+ * This is NOT a string; a MAC address can have an embedded NUL (value is 0) byte;
+ * nor is it required that a NUL byte be present.  When setting a MAC address,
+ * the 1st 6 bytes will be used to set the MAC address; when getting a MAC address, 6 bytes must be available to accept the address.<br>
+ * These datatypes describe strings of various lengths:
+ * 	@code
+ * 	typedef char    string_16[ 17 ];
+ * 	typedef char    string_32[ 33 ];
+ * 	typedef char    string_64[ 65 ];
+ * 	typedef char    string_128[ 129 ];
+ * 	typedef char    string_256[ 257 ];
+ * 	typedef char    string_1024[ 1025 ];
+ * 	@endcode
+ * They are provided as a convenience.  The reference standards define selected parameters to be strings of fixed length.
+ * The internal definition adds one character to insure room for the terminating NUL character; e.g. a string_32 actually has 33 characters.
+ * 
+ * All string parameters passed to the QCSAPIs are required to be terminated with a NUL character.
+ * This includes SSIDs and MCS rates.  Any string returned by a QCSAPI will be terminated with a NUL character.
+ * 
+ * This datatype represents a Service Set identifier:<br>
+ * <c>qcsapi_SSID</c>
+ * 
+ * One additional character is allocated to provide space for a NUL byte to terminate the string.
+ * By standard, the SSID can have up to 32 characters.  An SSID passed to an API is required to be terminated with a NUL byte.
+ * 
+ * Next is a datatype to represent the 802.11n paradigm for specifying and setting rates:<br>
+ * <c>qcsapi_mcs_rate</c>
+ * 
+ * It is a string that starts with the letters "MCS", followed by the MCS rate selection.
+ * Currently MCS0 to MCS76 (excluding MCS32) are available. Embedded '0's are NOT permitted; "MCS01" is NOT valid.
+ * 
+ * @subsection mysection4_1_3 API signature
+ * "Signature" here refers to a QCSAPI's return value and its arguments.
+ * 
+ * The return value is always an integer, and always represents the status of the operation.
+ * Following the POSIX standard a return value of 0 or positive reports success; a value less that 0 reports an error.
+ * If the value is less than 0, it will represent the error.  By changing the algebraic sign - by rendering the return value positive,
+ * the nature of the error can be determined from the "errno" facility.
+ * 
+ * An API that returns a parameter value, typically a get API, will return that value in one of the arguments in the argument list.
+ * A parameter value will not ever be returned as the value from a QCSAPI.
+ * 
+ * The first argument is usually the interface, the device the API is to work with.
+ * An interface is required to distinguish between an ethernet interface - "eth1_0" and a WiFi interface - "wifi0".
+ * And even those APIs targeted for the WiFi interface require the actual interface to distinguish between different Virtual Access Points (VAP).
+ * 
+ * Several QCSAPIs are generic, in that the API itself works with a class of parameter.  Examples include options - parameters with two values,
+ * "yes" and "no" or "true" and "false" - and counters - the number of bytes received, or packets transmitted, etc.
+ * For these APIs, the second parameter selects the exact parameter - the desired option or counter.
+ * 
+ * The final argument is usually the value of the parameter the API is working with.  For most QCSAPIs, the API itself selects this parameter.
+ * For the generic APIs, the second argument selects this parameter.  For a SET API, an API that  configures a new value,
+ * the parameter argument is passed by value; for a GET API, an API that returns the current value of a parameter,
+ * the parameter argument is passed by reference.
+ * 
+ * The following code fragment illustrates a recommended way of calling a QCSAPI and
+ * processing the result (notice because this is a GET API, the parameter argument is a reference).<br>
+ * 	@code
+ * 	qcsapi_result = qcsapi_interface_get_status( "eth1_0", &eth1_status );
+
+ * 	if (qcsapi_result < 0) {
+ * 		qcsapi_errno = -qcsapi_result;
+ * 	} else {
+ * 		/* call was successful*/
+ * 	}
+ * 	@endcode
+ *
+ * @anchor QCSAPI_Return_Values
+ * @subsection mysection4_1_4 QCSAPI return values
+ * As stated previously, a return value of 0 or greater than 0 reports success.  A return value less than 0 reports an error.
+ * The nature of the error is encoded in the return value, and is based on the ERRNO facility from the POSIX standard.
+ * 
+ * \note ERRNO values and other API error definitions are positive integers,
+ * so programming will need to change the sign of a QCSAPI error return value before
+ * comparing with any predefined error definitions.
+ * 
+ * Please see \ref QCSAPI_ERRNO "enum qcsapi_errno" for details of all the different error return values that QCSAPI
+ * calls may return.
+ *
+ * @subsection mysection4_1_5 Production mode vs calibration mode
+ * The WiFi device can operate in 2 different modes. Usually the device operates in production mode.
+ * In this mode the AP broadcasts beacons and accepts associations from properly qualified STA devices,
+ * snd the STA scans the WiFi channels searching for an AP to associate with.
+ * 
+ * An additional runtime mode, bringup and calibration mode (or calibration mode for short), is available
+ * for testing and calibrating the RF stage of the device during the development phase as well as during the
+ * manufacturing phase.
+ * 
+ * The choice between production and calibration mode is made when the device first starts up,
+ * based on the value of the boot configuration environmental variable, <c>calstate</c>.
+ *
+ * If calstate is set to 1, the device operates in calibration mode; otherwise, the device
+ * operates in production mode.
+ * 
+ * Selected APIs that assist with configuring the system are only available in calibration mode.
+ * This is noted in the detailed description for each API that has this restriction.
+ * Also note that in calibration mode, many of the APIs will not be available.
+ *
+ * Please review the writeup on individual APIs before using a particular API in this mode.
+ * 
+ * In calibration mode, the expected error code for an API that is not available is <c>-ENODEV</c>,
+ * since those APIs require the name of the WiFi interface, or VAP (Virtual Access Point),
+ * which will not be present if the device is running in calibration mode.
+ *
+ * @subsection mysection4_1_6 Permissions and Access
+ * Selected APIs require root access; that is the user ID of the calling process must be 0.
+ */
diff --git a/quantenna/common/doxygen/qcsapi_doc/chapter5.txt b/quantenna/common/doxygen/qcsapi_doc/chapter5.txt
new file mode 100644
index 0000000..efe0e1e
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/chapter5.txt
@@ -0,0 +1,88 @@
+/**@page mypage5 Demonstration application: call_qcsapi
+ * @brief An application is present to demonstrate the QCSAPI, <c>call_qcsapi</c>.
+ * It is a non-interactive command that takes all its parameter from the command line.
+ * This application is also the interface to the QSCAPI for scripting applications including web-based GUIs.
+ * 
+ @section mysection5_1 Command Line Parameters
+ * The first command-line parameter specifies the API to be called.
+ * Remaining command-line parameters specify the arguments to that API.
+ * The order is the order of the arguments in the API.
+ * Thus the 2nd argument is usually the interface - e.g. wifi0 or eth1_0.
+ * For a generic QSCAPI, the 3rd argument will select the generic parameter - counter, option, etc.
+ * A set API will expect the new value as its final parameter.
+ *
+ * @anchor MAC_ADDRESS_DETAILS
+ * @subsection mysection5_1_1 Format for a MAC address
+ * MAC addresses are 48 bits, or 6 bytes long.  They should be entered in this format:<br>
+	<c>xx:xx:xx:xx:xx:xx</c><br>
+ * where each "xx" represents the value of the corresponding byte in hexadecimal radix.
+ * The <c>call_qcsapi</c> command uses this same format to display MAC addresses, e.g. Get MAC Address (qcsapi_interface_get_mac_addr)
+ * or Get BSSID (qcsapi_wifi_get_BSSID).
+ * 
+ * Not all sequences of 6 bytes represent valid MAC addresses for an individual interface.
+ *
+ * If the low-order bit is set in the 1st byte, the MAC address is interpreted as a multicast address.
+ * As this is a logical identifier for a group of interfaces on a network, it is not suitable as the address for an individual interface.
+ * Notice the broadcast address, <c>FF:FF:FF:FF:FF:FF</c>, is a special case of a multicast address.
+ * 
+ * The MAC address that is all zeros (<c>00:00:00:00:00:00</c>) is also not valid as the MAC address for an individual interface.
+ *
+ * By convention, the all-zero MAC address is reported as the BSSID for a STA that is not in association.
+ * Since the BSSID for a STA is the MAC address of its partner AP, this means an AP cannot have a WiFi MAC address that is all zeros.
+ * This restriction applies to STAs as well as APs.
+ * 
+ * All APIs that accept a MAC address as a parameter expect that MAC address to be valid for an individual interface.
+ * Thus a multicast address will not be accepted as a MAC address, and the selected API will return Invalid Value (<c>EINVAL</c>) as the error code.
+ * Additional details about command line parameters are listed with each individual QCSAPI.
+ * 
+ * @section mysection5_2 Operation and Output
+ * Using its command line parameters, call_qcsapi calls the selected API, reports on the results and then exits.
+ * Its output depends on the nature of the API.  For APIs that set a parameter, it displays the message complete.
+ * For APIs that get a parameter value, it reports the parameter value.
+ * 
+ * If the API returns an error, the resulting message resembles the example below:
+ * 
+ * <c>QCS API error 22: Invalid argument</c>
+ * 
+ * The key is the word error, followed by the numeric error code (notice the actual returned error code will be less than 0, here -22).
+ * See @ref mysection4_1_4 "section QCS API Return Values" for more details on error codes.
+ * 
+ * The <c>call_qcsapi</c> application also provides an interface to the QCSAPIs for scripting and web-based applications.
+ *
+ * @section mysection5_3 Examples
+ *
+ * The following examples are documented for the reader's reference.
+ *
+ * Example 1: Get the operational mode of a device:
+ *
+ * \code
+quantenna # call_qcsapi get_mode wifi0     
+Access point
+quantenna # 
+\endcode
+ *
+ * Example 2: Disable the RF on a device:
+ *
+ * \code
+quantenna # call_qcsapi rfenable wifi0 0
+killing cmdloop hostapd with pid: 275
+killing hostapd with pid: 278
+[93387.180000] wifi0: station 00:26:86:01:1a:be disassociated
+[93387.185000] wifi0: station 00:26:86:01:1a:be disassociated
+01:56:27.304088   wifi0    Custom driver event:Dot11Msg:Client removed [00:26:86:01:1A:BE] [Deauthenticated - 3 - Deauthenticated because sendin[93387.210000] br0: port 2(wifi0) entering disabled state
+g STA is leaving (or has left) IBSS or ESS]
+01:56:27.304449   wifi0    Custom driver event:STA-TRAFFIC-STAT
+mac=00:26:86:01:1a:be
+rx_packets=50036
+rx_bytes=13669562
+tx_packets=17931
+tx_bytes=3282979
+
+01:56:27.306999   wifi0    Custom driver event:Dot11Msg:Client disconnected [00:26:86:01:1A:BE] [Client sent disassociation - 8 - Disassociated because sending STA is leaving (or has left) BSS]
+01:56:27.307305   wifi0    Expired node:00:26:86:01:1A:BE
+complete
+quantenna # 
+\endcode
+ *
+ * Note in this example there was a single STA associated, which was removed when the RF was disabled on the AP via <c>call_qcsapi</c>.
+ */
diff --git a/quantenna/common/doxygen/qcsapi_doc/chapter7.txt b/quantenna/common/doxygen/qcsapi_doc/chapter7.txt
new file mode 100644
index 0000000..9894ced
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/chapter7.txt
@@ -0,0 +1,53 @@
+/**@page mypage7 QCSAPI and the SDK
+ * @brief The QCSAPI is a key part of the SDK.  This section describes how to use the SDK and how to access the QCSAPI binary library from within the SDK.
+ *
+ * @section mysection7_1 SDK Contents
+ * The Quantenna SDK is a Linux based distribution (ARC kernel version 2.6.30). Its contents include:
+ * - Sources:
+ *  - Linux Kernel
+ *  - User-space applications
+ *  - C library programs
+ *  - Toolchain (gcc, etc.)
+ *
+ * - Binaries
+ *  - Quantenna MuC firmware
+ *  - Selected Linux drivers
+
+ * @section mysection7_2 SDK Make Environment
+ * We have tested the SDK build process on the following distributions:
+ *
+ * \ul Fedora release 8 (Werewolf) x86 PC running Linux version 2.6.26.8-57.fc8,
+ * with native mode gcc compiler version 4.1.2 (versions 4.1 - 4.4 have been tested) and make version GNU Make 3.81.
+ * \ul Ubuntu version 9.10 X86 with kernel version 2.6.31-14-generic.
+ * \ul Ubuntu version 11.04 X86 SMP with kernel version 2.6.38-8-generic.
+ *
+ * The ARC cross compiler for the Quantenna target is included in the SDK. The toolchain is created during the make fromscratch process shown below.
+ *
+ * @section mysection7_3 Installing the SDK
+ * The SDK is delivered as a compressed TAR archive.  Download the archive onto the system where the build is to be completed.
+ * It is recommended to store the archive in an empty folder, although since the SDK TAR archive stores all files in its own subfolder,
+ * an empty folder is not absolutely required.
+ *
+ * After unpacking the archive, change directory to the SDK subfolder, e.g.<br>
+ * <c>quantenna-sdk-021009</c><br>
+ * Now enter this command:<br>
+ * <c>make fromscratch</c>
+ *
+ * This completes the first comprehensive build and will take a significant amount of time, say 30 minutes.
+ * At the end of the make process, a new subfolder within the SDK subfolder will be present: <c>tftp</c>.
+ * This subfolder has the file <c>ruby-linux.img</c> (uncompressed image file), and <c>ruby-linux.img.lzma</c> (compressed image file).
+ *
+ * @section mysection7_4 QCSAPI components in the SDK
+ * The QCSAPI has two components, the header file and the binary library.  In addition the application / interface program,
+ * call_qcsapi is included.  Each is built or installed as part of the overall SDK build process.
+ *
+ * The library file will be installed in <c>buildroot/build_arc/staging_dir/lib</c>, (path relative to the top-level SDK folder, 
+ * e.g. quantenna-sdk-021009) as this is the folder the cross compiler searches by default for binary libraries.
+ * Thus to build an application that calls the QCSAPI, it is only necessary to pass the option <c>-lqcsapi</c> to the cross-linker.
+ *
+ * The header file will be installed in buildroot/include.
+ * Thus to locate this include file, when building an application to call QCSAPIs, include the path to this folder.
+ *
+ * The application <c>call_qcsapi</c> will be present in <c>/sbin/</c> when the Quantenna device boots up with a build from the SDK.
+ * Within the SDK, the contents of the QCSAPI are available in the subdirectory <c>buildroot/package/qcsapi/qcsapi-1.0.1/</c>
+ */
diff --git a/quantenna/common/doxygen/qcsapi_doc/chapter8.txt b/quantenna/common/doxygen/qcsapi_doc/chapter8.txt
new file mode 100644
index 0000000..5fb6428
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/chapter8.txt
@@ -0,0 +1,90 @@
+/**@page mypage8 Using QCSAPI via RPC
+ * @section mysecton8_1 Introduction
+ * @subsection mysection8_1_1 rpcgen
+ * <c>rpcgen</c> is a tool for creating remote procedure call stubs in C, given an RPC protocol definition file.
+ * These stubs contain code relevant for marshaling and un-marshaling, which is serialization of data so that
+ * it can be transmitted over a network. The marshaled data can be sent over UDP sockets, TCP sockets, or through PCIe.
+ *
+ * @section mysection8_2 call_qcsapi_sockrpc / call_qcsapi_rpcd
+ * These are utilities for remote invocation of the <c>call_qcsapi</c> example program.
+ *
+ * <c>call_qcsapi_rpcd</c> is a server implementation, which is much like <c>call_qcsapi</c>, except that it runs as a daemon,
+ * accepting requests from RPC clients. Requests take the format of a list of strings, which are equivalent to <c>argv</c> in <c>call_qcsapi</c>.
+ *
+ * <c>call_qcsapi_sockrpc</c> is a client implementation, which finds the server hostname, 
+ * then creates a request out of argc and <c>argv</c>, waits for a response then prints it.
+ * It uses UDP sockets to communicate with the server.
+ *
+ * <c>call_qcsapi_pcie</c> is a client implementation which creates requests from <c>argc</c> and <c>argv</c>, 
+ * but it uses PCIe to communicate with the server instead of UDP sockets.<br>
+ * @image latex rpc_img1.jpg " " width=\textwidth
+ *
+ * @subsection mysection8_2_1 Implementation
+ * <c>call_qcsapi_rpc</c> and associated client programs use <c>rpcgen</c> to create client and server stubs based on a simple interface definition file, <c>call_qcsapi_rpc.x</c>.
+ *
+ * @section mysection8_3 RPC for qcsapi.h
+ * This is an RPC service, which provides and RPC interface for (almost) all of the functions in libqcsapi.
+ * @subsection mysection8_3_1 libqcsapi
+ * The target device includes a binary library, <c>libqcsapi.so</c>, which provides implementations for 
+ * the functions prototyped in <c>qcsapi.h</c>. Third party developers may develop applications that run on the target and link to libqcsapi.so
+ * @subsection mysection8_3_2 libqcsapi_client
+ * In order to develop applications that can use QCSAPI, but run on another host, libqcsapi_client provides RPC 
+ * stubs based on prototypes in qcsapi.h, with an additional function for specifying the RPC transport mechanism (UDP/TCP/PCIe).<br>
+ * Third party developers can create a program running on a host platform, link against <c>libqcsapi_client.so</c>,
+ * and call qcsapi functions from C code.<br>
+ * <c>libqcsapi_client.so</c> communicates with server RPC stubs running on <c>qcsapi_rpcd</c>.
+ * @subsection mysection8_3_3 qcsapi_rpcd
+ * <c>qcsapi_rpcd</c> is an RPC service program, which contains RPC server stubs for each function in libqcsapi.
+ * <c>qcsapi_rpcd</c> registers UDP, TCP and PCIe services. It links to <c>libqcsapi.so</c>, to invoke the real QCSAPI functions when requested by clients.
+ *
+ * @subsection mysection8_3_4 qcsapi_sockrpc
+ * qcsapi_sockrpc is a version of <c>call_qcsapi</c>, which is linked against <c>libqcsapi_client.so</c> instead of <c>libqcsapi.so</c>.
+ * It works as follows:<br>
+ * @image latex rpc_img2.jpg " " width=\textwidth
+ *
+ * @section mysection8_4 Implementation details of libqcsapi_client + qcsapi_rpcd
+ * To reduce ongoing maintenance effort required, <c>libqcsapi_client</c> and <c>qcsapi_rpcd</c> are both automatically generated
+ * based on the contents of <c>qcsapi.h</c>; it is just RPC client and server stubs. The process of code generation
+ * is as follows. All of these files are relative paths under <c>buildroot/package/qcsapi/qcsapi-1.0.1/</c>.
+ * -# <c>qcsapi.h</c> is manually changed with new feature developments, as it always has been.
+ * -# <c>qcsapi_rpc</c>/<c>qcsapi_rpc_gen.pl</c> reads <c>qcsapi.h</c>, and generates:
+ *    -# an rpc interface definition file for use with <c>rpcgen</c><br>
+	 <c>qcsapi_rpc/generated/qcsapi_rpc.x</c>. This file is later used as an input for <c>rpcgen</c>.
+ *    -# client stub implementations:<br>
+	 <c>qcsapi_rpc/generated/qcsapi_rpc_clnt_adapter.c</c>.
+	 This will contain function definitions matched to the prototypes in <c>qcsapi.h</c>, which convert <c>qcsapi.h</c> calls to the relevant RPC routines.
+ *    -# server stub adapter implementation:<br>
+	 <c>qcsapi_rpc/generated/qcsapi_rpc_svc_adapter.c</c>, which convert from <c>rpcgen</c> RPC server stub functions to <c>qcsapi.h</c> calls; these calls will go to the real implementation in <c>libqcsapi.so</c>.
+ * -# Once the perl script generates <c>qcsapi_rpc/generated/qcsapi_rpc.x</c>, <c>rpcgen</c> is used to create other files:
+      -# <c>qcsapi_rpc/generated/qcsapi_rpc.h</c>, structure definitions and function prototypes to represent data that is appropriate for marshaling/un-marshaling.
+      -# <c>qcsapi_rpc/generated/qcsapi_rpc_clnt.c</c>, which is <c>rpcgen</c> generated client stubs, but these are unused. Required code is already in <c>qcsapi_rpc_clnt_adapter.c</c>.
+      -# <c>qcsapi_rpc/generated/qcsapi_rpc_svc.c</c>, RPC service function demultiplexer. Takes arguments from the RPC service program, and will call the appropriate function in <c>qcsapi_rpc_svc_adapter.c</c>.
+      -# <c>qcsapi_rpc/generated/qcsapi_rpc_xdr.c</c> marshaling/un-marshaling functions.
+ * -# Programs are compiled and linked with the following dependencies:
+      -# <c>qcsapi_rpcd</c>
+	-# <c>qcsapi_rpc/generated/qcsapi_rpc_svc.c</c>
+	-# <c>qcsapi_rpc/generated/qcsapi_rpc_svc_adapter.c</c>
+	-# <c>qcsapi_rpc/generated/qcsapi_rpc_xdr.c</c>
+	-# <c>libqcsapi.so</c>
+	-# Additional code for starting and registering the server, and PCIe server transport.
+      -# <c>libqcsapi_client</c>
+	-# <c>qcsapi_rpc/generated/qcsapi_rpc_clnt_adapter.c</c>
+	-# <c>qcsapi_rpc/generated/qcsapi_rpc_xdr.c</c>
+      -# <c>qcsapi_sockrpc</c>:
+	-# Code for resolving which remote server to use
+	-# <c>call_qcsapi</c> frontend code
+	-# <c>libqcsapi_client.so</c>
+ *.
+ * @section mysection8_5 QCSAPI RPC in the SDK
+ * The sdk ships with generated sources for <c>qcsapi_rpc</c> and <c>call_qcsapi_rpc</c>, but not with <c>qcsapi_rpc/qcsapi_rpc_gen.pl</c>,
+ * or interface definition files. This allows <c>libqcsapi_client</c> and other client programs to be rebuild by customers, 
+ * but any changes to <c>qcsapi.h</c> will not automatically update the RPC code.
+ *
+ * @subsection mysection8_5_1 Source bundles
+ * <c>call_qcsapi</c> clients and <c>qcsapi_rpc</c> clients (including <c>libqcsapi_client.so</c> source) are included in the 
+ * SDK as source code .zip bundles, which can be taken integrated with host tools by vendors, 
+ * so their host firmware can contain QCSAPI RPC client programs without the Quantenna build system. 
+ * A caveat of this is that automatically generated code based on <c>qcsapi.h</c> will be updated with each change to <c>qcsapi.h</c>,
+ * so vendors must be diligent to make sure they are matching the appropriate client 
+ * release with the Quantenna target platform server.
+ */
diff --git a/quantenna/common/doxygen/qcsapi_doc/groupdefine.txt b/quantenna/common/doxygen/qcsapi_doc/groupdefine.txt
new file mode 100644
index 0000000..e5920da
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/groupdefine.txt
@@ -0,0 +1,966 @@
+/**@defgroup APIInitializationAPIs API Initialization and Process Management
+ * @brief Unlike most APIs, the ones documented in this section cannot be called from the scripting interface, call_qcsapi.
+ *
+ * These functions are used internally, and in linked applications (using libqcsapi), in order to setup the runtime
+ * environment for further QCSAPI calls.
+ */
+
+ /**@defgroup SystemAPIs System APIs
+ * @brief APIs to deal with general system configuration.
+ *
+ * This section contains functions for general system configuration not suitable for other sections.
+ */
+
+/**@defgroup ParameterConfAPIs Parameter Configuration
+ * @section mysection2_1 Working with the Persistent Configuration
+ * Typically a WiFi device will have a configuration that persists across a reboot or power-cycle.
+ * Examples include the WiFi Mode (AP or Station), the WiFi Channel and the Regulatory Region.<br>
+ * Security configuration parameters - those parameters that are handled by the @ref SecurityAPIs "Security APIs" and
+ * the @ref SSIDAPIs "SSID APIs" - are stored separately.  Security parameters include the SSID, the WiFi Security Protocol and the Passphrase.
+ * Security parameters should not be stored in a separate persistent configuration.
+ * 
+ * Thus parameters such as the SSID name, the WiFi Security Protocol or the Passphrase
+ * should NOT be stored using the Persistent Configuration facility described below.
+ * 
+ * @section mysection2_2 Helper Scripts and Configuration Requirements
+ * The Update (Persistent) Configuration Parameter API will modify a parameter that has been stored in the persistent configuration.
+ * This API relies on a helper script, <c>update_wifi_config</c>, to complete the change.
+ * If this script is not present in <c>/scripts</c>, the Update Persistent Configuration Parameter API will fail.
+ * The script itself uses the Get File Path API with parameter security to locate the folder that contains the persistent configuration.
+ * The persistent configuration is then stored in <c>wireless_conf.txt</c>.
+ * Its format consists of pairs of parameter name=value, each pair separated by an ampersand ('&').
+ * 
+ * Thus the persistent configuration file <c>wireless_conf.txt</c> is stored in the same place on the device as the security configuration files
+ * hostapd.conf and wpa_supplicant.conf.<br>
+ * Example <c>wireless_conf.txt</c> file:<br>
+ * <c>mode=ap&bw=40&region=us&channel=44&</c>
+ * 
+ * All of these conditions must be met:<br>
+ * The <c>/scripts</c> folder has an executable script <c>update_wifi_config</c><br>
+ * Folder with the persistent configuration can be located using the Get File Path API with parameter security<br>
+ * Persistent configuration stored in <c>wireless_conf.txt</c><br>
+ * Format of <c>wireless_conf.txt</c> consists of pairs of parameter name=value, each pair separated by an ampersand ('&')
+ * 
+ * otherwise the Update Persistent) Configuration Parameter API will fail.<br>
+ * The display script <c>get_wifi_config</c> will display the parameter name, value pairs.  Enter:<br>
+ * <c>get_wifi_config wifi0</c><br>
+ * to display the persistent configuration.<br>
+ * With the example <c>wireless_conf.txt</c> above, <c>get_wifi_config</c> would display:<br>
+ *	@code
+ *	mode=ap
+ *	bw=40
+ *	region=us
+ *	channel=44
+ *	@endcode
+ * 
+ * @section mysection2_3 Additional Notes
+ * The <c>update_wifi_config</c> script verifies the values for selected parameters:
+ * <TABLE>
+ * <TR>	<TD>\b Parameter</TD>  <TD>\b Explanation    </TD>	<TD><b> Valid value</b></TD>	</TR>
+ * <TR>	<TD>mode     </TD>  <TD>wifi mode            </TD>	<TD>ap<br>sta	</TD>		</TR>
+ * <TR>	<TD>bw       </TD>  <TD>Bandwidth (802.11n)<br>Bandwidth (802.11ac)  </TD>	<TD>20/40<br>20/40/80	</TD>		</TR>
+ * <TR>	<TD>channel  </TD>  <TD>WiFi channel (802.11)</TD>	<TD>Range:0 - 255</TD>		</TR>
+ * <TR>	<TD>pmf  </TD>  <TD>PMF capability (802.11w)</TD>	<TD>0 (disabled), 1 (optional) or 2 (disabled)</TD>		</TR>
+ * </TABLE>
+ * Special note regarding the WiFi channel parameter check - this should be considered a sanity check,
+ * as the list of valid WiFi channels is much more restricted than the range [0 - 255].<br>
+ * A change to one of these persistent parameters will not take effect until the device is rebooted.
+ * Selected parameters, e.g. the channel, can be updated dynamically using other APIs.
+ * 
+ * @section mysection2_4 Update (Persistent) Configuration Parameter
+ * refer to functon qcsapi_config_update_parameter
+ *
+ * \sa qcsapi_config_update_parameter
+ */
+
+/**@defgroup FilePathAPIs File Path configuration
+ * @anchor File_Path_conf
+ * @brief These APIs manage file paths.  Each file path is the location where groups of files that the APIs work with are found.
+ * At this time the only file path configuration available is for security.<br>
+ * \note A number of APIs rely on the security file path setting, including all APIs documented in the @ref SecurityAPIs "Security APIs",
+ * the @ref MACFilterAPIs "MAC address filtering APIs" and the @ref SSIDAPIs "SSID APIs".
+ * Results from these APIs may be inconsistent or incorrect if the security file path has not been set properly.
+ */
+
+/**@defgroup NetInterfaceAPIs Network Interface APIs
+ * @brief Network interface APIs apply to all network interfaces on the Quantenna device,
+ * including Ethernet and bridge devices as well as WiFi devices.
+ */
+
+/**@defgroup WiFiAPIs WiFi APIs
+ * @brief Wifi APIs require the interface to be a Wireless Extension (WE) device, and return Not Supported for other network interfaces.<br>
+ * Special note regarding the call_qcsapi interface:  the default WiFi interface name is wifi0,
+ *  and this interface is used to describe all interfaces to the WiFi APIs thru call_qcsapi.
+ * If a different WiFi interface name is present, that name should be used to access the WiFi APIs.
+ * @section mygroup5_1 Multiple Basic Service Sets (MBSSID)
+ * One can create multiple Basic Service Sets (BSSIDs) on a device initially configured as an access point (AP).
+ * This capability is not available on a device configured as a STA.
+ * The first step in creating an additional BSSID is to create the wireless interface device for that BSSID.
+ * Use the Set (WiFi) Mode API for this purpose.
+ * 
+ * @section mygroup5_2 Primary versus Secondary Wireless Interface
+ * A number of APIs change or report properties of the WiFi radio.  An example is the current WiFi channel.
+ * A change in the WiFi channel affects all wireless interfaces.  To prevent unexpected side effects, the concept of the Primary Wireless Interface is introduced.
+ * Selected WiFi APIs only work on the primary interface.  An example is the Set Channel API.
+ * If one of these APIs is called with a wireless interface that is not the primary interface, the API will fail.<br>
+ * To get the primary interface, use the Get Primary Interface API.<br>
+ * It may be necessary to get a list of all wireless interfaces.
+ * The Get Interface by Index API facilitates this.  It takes as a parameter an index, an unsigned integer.
+ * If the index is 0, the primary wireless interface will be returned.
+ * For index greater than 0, the API returns the corresponding wireless interface, or <c>-ERANGE</c>, numeric value out of range, if the index is too large.
+ * 
+ * @section mygroup5_3 APIs Only Available on the Primary Interface
+ * The following APIs only work when called with the primary interface:<br>
+ * 	@code
+ 	Get WiFi Bandwidth
+ 	Set WiFi Bandwidth
+ 	Get WiFi Channel
+ 	Set WiFi Channel
+ 	Start Scan
+ 	Get Regulatory TX Power
+ 	Get Configured TX Power
+ 	Get WiFi Current Transmit Power
+ 	Set Regulatory Channel
+ 	Get Regulatory Region
+ 	Set Regulatory Region
+ 	Get IEEE 802.11 Standard
+ 	Get List Wifi Channels
+ 	Get WiFi Noise
+ 	Get WiFi RSSI by RF Chain
+ 	Get MCS Rate
+ 	Set MCS Rate
+ 	Reload in WiFi mode
+	@endcode
+ *
+ * @section mygroup5_4 Quality of Service (QoS) extensions
+ * A number of APIs handle QoS enhancements parameters for WiFi. The enhancements are based on WMM (Wireless MultiMedia extensions) specification by WiFi aliance,
+ * which, in turn, is a subset of 802.11e amendment.<br>
+ * Under WMM, all outgoing traffic is divided into four logical queues, and each queue is set in correspondence with one of four access categories (AC). Specification
+ * references access categories by their symbolic names AC_BK, AC_BE, AC_VI and AC_VO, but APIs reference ACs by their corresponding numeric indexes. Mapping between
+ * AC's symbolic name and it's index, as well as AC's relative priorities are given in a table:
+ *
+ * <TABLE>
+ * <TR><TD>\b ACname</TD><TD>\b ACindex</TD><TD>\b Priority</TD><TD>\b Description</TD></TR>
+ * <TR><TD>AC_BK</TD><TD>1</TD><TD>Lowest</TD><TD>Background traffic</TD></TR>
+ * <TR><TD>AC_BE</TD><TD>0</TD><TD> </TD><TD>Best effort traffic</TD></TR>
+ * <TR><TD>AC_VI</TD><TD>2</TD><TD> </TD><TD>Video traffic</TD></TR>
+ * <TR><TD>AC_VO</TD><TD>3</TD><TD>Highest</TD><TD>Voice traffic</TD></TR>
+ * </TABLE>
+ *
+ * Access category is merely a label for a certain set of medium access parameters of one respective outgoing traffic queue. Each transmission queue competes
+ * for medium access using it's own set of parameters, and variations in ACs parameters value ensures statistical prioritization of one outgoing traffic queue over another.<br>
+ * APIs differentiate between ACs parameters applied to prioritize outgoing traffic by device itself (short, "self params"), and ACs parameters of a BSS the device is associated with
+ * (short, "BSS params"). In case of operating in AP mode, device uses "self params" internally for prioritizing it's own outgoing traffic, while it signals "BSS params"
+ * to it's client STAs in managment frames headers. In case of operating in STA mode, only "self params" set have a meaning. STA receives it's QoS parameters from associated AP,
+ * and it doesn't use its "BSS params" set in any way. Still, APIs allow to set/get both "self" and "BSS" parameters sets in either STA or AP mode.<br>
+ * There are in total six QoS parameters, and APIs use numeric indexes to reference them. Mapping of parameters symbolic names to their corresponding
+ * indexes are showed in a table:
+ * <TABLE>
+ * <TR><TD>\b Name</TD><TD>\b Index</TD><TD>\b Description</TD></TR>
+ * <TR><TD>ECWMin</TD><TD>1</TD><TD>Contention window exponent (MIN value)</TD></TR>
+ * <TR><TD>ECWMax</TD><TD>2</TD><TD>Contention window exponent (MAX value)</TD></TR>
+ * <TR><TD>AIFS</TD><TD>3</TD><TD>Arbitration InterFrame Spacing number</TD></TR>
+ * <TR><TD>TXOP</TD><TD>4</TD><TD>Transmit Opportunity limit</TD></TR>
+ * <TR><TD>ACM</TD><TD>5</TD><TD>Admission Control Mandatory</TD></TR>
+ * <TR><TD>AckPolicy</TD><TD>6</TD><TD>Frame Ack Policy</TD></TR>
+ * </TABLE>
+ *
+ * Following is a short description of AC parameters and their possible values. Parameters are per-VAP, per-AC.
+ * @subsection mysection5_4_1 ECWMin
+ * Exponent of minimum possible value for contention window (CWMin). This encodes the values of CWMin as an exponent: CWMin = 2^ECWMin - 1.<br>
+ * For example, if ECWMin is 8, then CWMin is 2^8 - 1, or 255. Possible values are 0-15.
+ * @subsection mysection5_4_2 ECWMax
+ * Exponent of maximum possible value for contention window (CWMax). This encodes the values of CWMax as an exponent: CWMax = 2^ECWMax - 1.<br>
+ * For example, if ECWMax is 8, then CWMax is 2^8 - 1, or 255. Possible values are 0-15.
+ * @subsection mysection5_4_3 AIFS
+ * Arbitration Inter Frame Spacing Number - the number of time slots in the arbitration interframe space.<br>
+ * Possible values are 0-15.
+ * @subsection mysection5_4_4 TXOP
+ * Transmit Opportunity limit, in microseconds. A limit to a length of time interval during which device can acquire medium for private use.<br>
+ * Possible values are 0-8192.
+ * @subsection mysection5_4_5 ACM
+ * Admission Control Mandatory flag. Applies to "BSS params" set only and allows AP to signal to it's client STAs that admission control is mandatory for some AC,
+ * and STA has to start traffic transmission for this particular AC by issuing TSPEC request first.<br>
+ * Possible values are 0 and 1. APIs will not allow to set or query ACM parameter for "self params" set.
+ * @subsection mysection5_4_6 AckPolicy
+ * Acknowledge policy expected by sender device. Only meaningful for outgoing traffic. Whether or not sender expects the receiver to send an ACK in response to 
+ * normally received frame.<br>
+ * Possible values are 0 and 1. APIs will not allow to set or query AckPolicy parameter for "BSS params" set.
+ */
+
+/**@defgroup MBSSIDAPIs MBSSID APIs
+ * @brief MBSSID is a feature that allows additional AP-mode virtual interfaces to be configured on a single device.
+ * Each additional virtual interface is created as a new network interface,
+ * so existing security APIs and generic interface APIs can be used on the new interface.<br>
+ * \note All MBSSID APIs work with the host AP daemon security configuration file, hostapd.conf.
+ * Its location is determined by the @ref File_Path_conf "get file path configuration API".
+ * Results from these APIs may be inconsistent or incorrect if the file path to the security configuration files has not been correctly configured.
+ */
+
+/**@defgroup WDSAPIs WDS APIs
+ * @brief WDS (Wireless Distribution System) here means a link between two APs on the same 802.11 channel,
+ * between which traffic is allowed to flow using 4 address frames.<br>
+ * It is important to note that the implementation of WDS peering is not an official 802.11 standard.
+ * 802.11 only details the implementation of 4 address frames, not any of the setup or negotiation between peers.<br>
+ * The implementation is largely targeted at interoperability with units produced by a specific customer using a competitor's chipset.<br>
+ * A WDS peer is identified by its primary BSSID.  Recall a BSSID is represented as a MAC address, in this context the MAC address of the peer AP.<br>
+ * The WDS peering agreement is symmetric.  Both sides need to have the peer address of the other added. Otherwise no WDS connection will be established.
+ * If only one side of a WDS link has added the other, the peer AP will not recognize the connection.
+ */
+
+/**@defgroup SecurityAPIs Security APIs
+ *
+ * @brief These APIs are for the Access Point (AP) and do not work on a Station (STA).
+ *
+ * For the equivalent STA APIs, see section @ref SSIDAPIs "SSID APIs".
+ * The interface parameter must reference either the primary interface or a previously created AP-mode virtual interface (MBSSID feature).<br>
+ * \note All Security APIs work with the host AP daemon security configuration file, hostapd.conf.
+ * Its location is determined by the get file path configuration API (section @ref File_Path_conf "File Path configuration").
+ * Results from these APIs may be inconsistent or incorrect if the file path to the security configuration files
+ * has not been correctly configured.
+ *
+ * @section CommonSecurityDefinitions Security definitions
+ *
+ * The following table outlines the defined string <b>authentication protocols</b> as used commonly throughout the QCSAPI.
+ * 
+ * <TABLE>
+ * <TR><TD>\b Value</TD><TD>\b Interpretation</TD></TR>
+ * <TR><TD>Basic</TD><TD>No security in use</TD></TR>
+ * <TR><TD>WPA</TD><TD>WPA version 1 authentication protocol</TD></TR>
+ * <TR><TD>11i</TD><TD>802.11i authentication protocol</TD></TR>
+ * <TR><TD>WPAand11i</TD><TD>Both WPA and 802.11i authentication protocols are available</TD></TR>
+ * </TABLE>
+ *
+ * The following table outlines the defined string <b>encryption</b> types as used commonly throughout the QCSAPI.
+ * 
+ * <TABLE>
+ * <TR><TD>\b Value</TD><TD>\b Interpretation</TD></TR>
+ * <TR><TD>AESEncryption</TD><TD>AES(CCMP) Encryption in use.</TD></TR>
+ * <TR><TD>TKIPEncryption</TD><TD>TKIP Encryption in use.</TD></TR>
+ * <TR><TD>TKIPandAESEncryption</TD><TD>TKIP and AES(CCMP) Encryption in use.</TD></TR>
+ * </TABLE>
+ * 
+ * The following table outlines the defined string <b>authentication types</b> as used commonly througout the QCSAPI.
+ * <TABLE>
+ * <TR><TD>\b Value</TD><TD>\b Interpretation</TD></TR>
+ * <TR><TD>PSKAuthentication</TD><TD>Pre-shared key authentication.</TD></TR>
+ * <TR><TD>EAPAuthentication</TD><TD>Use of an EAP server for authentication.</TD></TR>
+ * </TABLE>
+ *
+ * @section APSTADualFunctions Authentication protocols and encryption
+ *
+ * This section has a few sentences to try and clarify the difference between authentication and encryption, and the different methods
+ * as documented in the previous tables. All are closely inter-related, but are different parts of the same stick.
+ *
+ * Authentication is the act of verifying an entity is allowed access to a resource. In the case of 802.11 devices, authentication is
+ * done through one of multiple methods:
+ *
+ * \li NULL authentication (eg, OPEN networks) - "None"
+ * \li Pre-shared WEP key (obsolete - not mentioned further).
+ * \li Pre-shared key with WPA/WPA2 authentication - "WPA" or "11i" or "WPAand11i" - collectively "PSKAuthentication"
+ * \li Extensible Authentication Protocol (EAP). - EAP-FAST, EAP-PEAP, ... - collectively "EAPAuthentication"
+ *
+ * The Quantenna software implicitly supports "None" and "PSKAuthentication". "EAPAuthentication" can be added by customers, as it sits
+ * at the userspace level.
+ *
+ * Typically, once authentication has completed, one of the outputs from the authentication protocol will be a set of temporary keys.
+ *
+ * These keys are then used for the second part of the security equation, for <b>encryption</b>.
+ *
+ * Encryption takes plain text (or packets) and applies a cryptographic algorithm, using a known (or derived) shared key, to generate
+ * encrypted text (or packets). The different algorithms used for encryption are negotiated during initial connection establishment,
+ * and the supported encryption algorithms are:
+ *
+ * \li NONE (no encryption)
+ * \li TKIP (Rotating WEP or RC4 key)
+ * \li CCMP (or AES key)
+ *
+ * Generally speaking, devices using an encryption key will have two keys - one for unicast (AP->STA and STA->AP), and one for broadcast
+ * and multicast (AP-> all STAs in the BSS).
+ *
+ * Functions within the QCSAPI that deal with security have three broad categories for defining the security setup:
+ *
+ * \li Setting the authentication type (eg, PSK, EAP, NONE, etc.)
+ * \li Setting the specific authentication protocol (eg, WPA, WPA2, PEAP etc.)
+ * \li Setting the encryption type (eg, TKIP, CCMP)
+ *
+ * The following table shows the different functions used for these different tasks - both set and get functions.
+ * <TABLE>
+ * <TR><TD>\b Function</TD><TD>\b Get</TD><TD>\b Set</TD></TR>
+ * <TR><TD>Get/set authentication type</TD><TD>\ref qcsapi_wifi_get_WPA_authentication_mode, \ref qcsapi_SSID_get_authentication_mode</TD><TD>\ref qcsapi_wifi_set_WPA_authentication_mode, \ref qcsapi_SSID_set_authentication_mode</TD></TR>
+ * <TR><TD>Get/set authentication protocol</TD><TD>\ref qcsapi_wifi_get_beacon_type, \ref qcsapi_SSID_get_protocol</TD><TD>\ref qcsapi_wifi_set_beacon_type, \ref qcsapi_SSID_set_protocol</TD></TR>
+ * <TR><TD>Get/set encryption type</TD><TD>\ref qcsapi_wifi_get_WPA_encryption_modes, \ref qcsapi_SSID_get_encryption_modes</TD><TD>\ref qcsapi_wifi_set_WPA_encryption_modes, \ref qcsapi_SSID_set_encryption_modes</TD></TR>
+ */
+
+/**@defgroup MACFilterAPIs MAC Address Filtering APIs
+ * @brief The AP can block a selected station from associating based on its MAC (hardware interface) address.
+ * This section lists and describes the APIs that manage this capability.
+ * The interface parameter to these APIs must reference a Wireless Extension (WE) device configured as an AP.<br>
+ * By default, MAC address filtering is disabled.  Use the Set MAC Address Filtering API to configure this capability.
+ * Consult section 5.1.1 on the format of a MAC address when working with the scripting interface to the MAC address filtering APIs.<br>
+ *
+ * \note All MAC Address Filtering APIs work with security configuration files.
+ * Their location is determined by the get file path configuration API (section @ref File_Path_conf "File Path configuration").
+ * Results from these APIs may be inconsistent or incorrect if the file path to this security configuration files has not been correctly configured.
+ *
+ * @section mysection9_1 Data Type to Configure MAC Address Filtering
+ *
+ * @section mysection9_2 Error Codes from MAC Address Filtering APIs
+ * The API that returns a list of authorized MAC addresses will fail with an error code of Configuration Error if the MAC address filtering is not set to Deny Unless Authorized.
+ * The API that returns a list of denied or blocked MAC addresses will fail with error code Configuration Error if the MAC address filtering is not set to Authorize Unless Denied.<br>
+ * Both of those APIs will fail with an error code of Buffer Overflow if the length of the string is too short to store all MAC addresses. <br>
+ * See @ref mysection4_1_4 "QCSAPI Return Values" for more details on error codes and error messages.
+ */
+
+/**@defgroup MACReserveAPIs MAC Address Reservation APIs
+ * @brief MAC address reservation can be used to prevent associated WiFi devices and downstream
+ * devices from hijacking MAC addresses that belong to core network devices.
+ *
+ * MAC address reservation is implemented on an Access Point by configuring a list of up to six
+ * reserved MAC addresses.  An optional mask can be supplied with each entry in order to reserve a
+ * range of MAC addresses.
+ *
+ * The following example reserves 1c:6f:65:d1:bf:01 and the 16 MAC addresses from 1c:6f:65:d1:bf:10
+ * to 1c:6f:65:d1:bf:1f are reserved for devices on the wired side of the Access Point.
+ *
+ * <c>call_qcsapi set_macaddr_reserve wifi0 1c:6f:65:d1:bf:01</c>
+ *
+ * <c>call_qcsapi set_macaddr_reserve wifi0 1c:6f:65:d1:bf:10 ff:ff:ff:ff:ff:f0</c>
+ *
+ * Any association request with a source address that matches an entry in the reserved MAC address
+ * list is refused, and any Ethernet packet with a source address that matches an entry in the
+ * reserved MAC address list is dropped.
+ */
+
+/**@defgroup OptionsAPIs Options
+ * @brief A variety of options can be accessed or set.
+ * See the discussion of the datatype qcsapi_option_type for the list of available options.
+ * See the discussion of the datatype qcsapi_wifi_param_type for the list of available parameters.
+ * Relevant entry points follow:
+ *
+ * @section mysection10_3 WiFi Options and the call_qcsapi Interface
+ * The table below lists selected options as listed in the enumerated type and how to pass them to call_qcsapi.
+ * <TABLE>
+ * <TR>		<TD><b>Option</b></TD>		<TD><b>call_qcsapi representation</b></TD>	</TR>
+ * <TR>		<TD>qcsapi_channel_refresh</TD>		<TD>channel_refresh</TD>	</TR>
+ * <TR>		<TD>qcsapi_DFS</TD>		<TD>DFS</TD>	</TR>
+ * <TR>		<TD>qcsapi_wmm</TD>		<TD>WMM</TD>	</TR>
+ * <TR>		<TD>qcsapi_beacon_advertise</TD>		<TD>beacon_advertise</TD>	</TR>
+ * <TR>		<TD>qcsapi_wifi_radio</TD>		<TD>radio</TD>	</TR>
+ * <TR>		<TD>qcsapi_autorate_fallback</TD>		<TD>autorate</TD>	</TR>
+ * <TR>		<TD>qcsapi_security</TD>		<TD>security</TD>	</TR>
+ * <TR>		<TD>qcsapi_SSID_broadcast</TD>		<TD>SSID_broadcast</TD>	</TR>
+ * <TR>		<TD>qcsapi_short_GI</TD>		<TD>shortGI</TD>	</TR>
+ * <TR>		<TD>qcsapi_802_11h</TD>		<TD>802_11h</TD>	</TR>
+ * <TR>		<TD>qcsapi_tpc_query</TD>		<TD>tpc_query</TD>	</TR>
+ * <TR>		<TD>qcsapi_dfs_fast_channel_switch</TD>		<TD>dfs_fast_switch</TD>	</TR>
+ * <TR>		<TD>qcsapi_dfs_avoid_dfs_scan</TD>		<TD>avoid_dfs_scan</TD>	</TR>
+ * <TR>		<TD>qcsapi_uapsd</TD>		<TD>uapsd</TD>	</TR>
+ * <TR>		<TD>qcsapi_sta_dfs</TD>		<TD>sta_dfs</TD>	</TR>
+ * <TR>		<TD>qcsapi_specific_scan</TD>		<TD>specific_scan</TD>	</TR>
+ * <TR>		<TD>qcsapi_GI_probing</TD>		<TD>GI_probing</TD>	</TR>
+ * <TR>		<TD>qcsapi_GI_fixed</TD>		<TD>GI_fixed</TD>	</TR>
+ * <TR>		<TD>qcsapi_stbc</TD>		<TD>stbc</TD>	</TR>
+ * <TR>		<TD>qcsapi_beamforming</TD>		<TD>beamforming</TD>	</TR>
+ * <TR>		<TD>qcsapi_short_slot</TD>		<TD>short_slot</TD>	</TR>
+ * <TR>		<TD>qcsapi_short_preamble</TD>		<TD>short_preamble</TD>	</TR>
+ * <TR>		<TD>qcsapi_rts_cts</TD>		<TD>rts_cts</TD>	</TR>
+ * <TR>		<TD>qcsapi_40M_only</TD>		<TD>40M_bw_only</TD>	</TR>
+ * <TR>		<TD>qcsapi_obss_coexist</TD>		<TD>obss_coexist</TD>	</TR>
+ * <TR>		<TD>qcsapi_11g_protection</TD>		<TD>11g_protection</TD>	</TR>
+ * <TR>		<TD>qcsapi_11n_protection</TD>		<TD>11n_protection</TD>	</TR>
+ * </TABLE>
+ * To access the get option API enter:<br>
+ * <c>call_qcsapi get_option wifi0 \<option\>	</c><br>
+ * Unless an error occurs, the output will be either TRUE or FALSE.<br>
+ * To access the set option API enter:<br>
+ * <c>call_qcsapi set_option wifi0 \<option\> \<1 | TRUE | 0 | FALSE\></c><br>
+ * Unless an error occurs, the output will be the string <c>complete</c>.
+ *
+ * @section mysection10_4 Notes on Selected Options
+ *
+ * - The autorate fallback option (qcsapi_autorate_fallback) can be considered a rate setting.
+ *   This option can be enabled from the set option API, but disabling is not allowed.  To disable autorate fallback,
+ *   call the Set MCS rate API with a valid MCS rate.
+ * - WiFi MultiMedia (WMM, qcsapi_wmm) is required for 802.11n.  As Quantenna devices always operate in 802.11n mode,
+ *   this option is enabled by default and thus cannot be disabled thru the Set Option API.
+ * - Dynamic Frequency Selection (DFS, qcsapi_DFS) is a read-only option.
+ *   If enabled, the programming on the Quantenna WiFi device supports DFS.
+ *   It is not possible to enable or disable DFS through the set option API.
+ * - SSID Broadcast controls whether the name of the SSID is included in beacons broadcast by the AP.
+ *   This option is not available if the device is configured as a STA.
+ * - Security is a read-only option.  On an AP, security is determined by the Set Beacon API.
+ *   On a STA, security is determined by the security policy of the AP it associates with.
+ * - DFS Fast Switch enhances availability if a channel covered by DFS / radar protocols is selected.
+ *   The protocol requires the AP to immediately switch channels if radar is detected on the current channel.
+ *   By default, the AP scans available channels to find the channel with least interference.
+ *   This operation typically leads to a gap in traffic lasting from 20 seconds to over 1 minute.
+ *   With DFS Fast Switch enabled, the AP immediately switches to a non-DFS channel.
+ *   Testing with this option enabled shows there should be no loss of traffic if radar is detected.<br>
+ *   If both DFS Fast Switch and Avoid DFS Scan are enabled, DFS Fast Switch takes precedence.<br>
+ *   Examples using <c>call_qcsapi</c>:<br>
+ *   To enable DFS Fast Swich:<br>
+ *      <c>call_qcsapi set_option wifi0 dfs_fast_switch 1	</c><br>
+ *   To disable DFS Fast Switch:<br>
+ *      <c>call_qcsapi set_option wifi0 dfs_fast_switch 0	</c><br>
+ *   To query this option:<br>
+ *      <c>call_qcsapi get_option wifi0 dfs_fast_switch		</c><br>
+ * - Avoid DFS Scan causes the AP to scan only non-DFS channels if radar is detected and a switch of channels is required.
+ *   Enabling this option ensures that the Channel Availability Check (CAC) will not be required after radar is detected.
+ *   A gap in traffic should still be expected after radar is detected, but without the CAC, the maximum gap should be less than 30 seconds. <br>
+ *   If both DFS Fast Switch and Avoid DFS Scan are enabled, DFS Fast Switch takes precedence.<br>
+ *   Examples using call_qcsapi:<br>
+ *   To enable Avoid DFS Fast Swich:<br>
+ *      <c>call_qcsapi set_option wifi0 avoid_dfs_scan 1		</c><br>
+ *   To disable DFS Fast Switch:<br>
+ *      <c>call_qcsapi set_option wifi0 avoid_dfs_scan 0		</c><br>
+ *   To query this option:<br>
+ *      <c>call_qcsapi get_option wifi0 avoid_dfs_scan		</c>
+ * - For options that are not supported yet, API will return
+ *   <c>-qcsapi_option_not_supported</c> and for call_qcsapi, it shows<br>
+ *      <c>QCS API error 1044: Option is not supported</c><br>
+ *   Caller can check the return value <c>-qcsapi_option_not_supported</c> to query
+ *   if the option is supported.
+ *
+ * @section mysection10_5 WiFi Parameters and the call_qcsapi Interface
+ * The table below lists selected parameters as listed in the enumerated type and how to pass them to call_qcsapi.
+ * <TABLE>
+ * <TR>		<TD><b>Option</b></TD>		<TD><b>call_qcsapi representation</b></TD>	</TR>
+ * <TR>		<TD>qcsapi_wifi_param_dtim_period</TD>		<TD>dtim_period</TD>	</TR>
+ * </TABLE>
+ * To access the get parameter API enter:<br>
+ * <c>call_qcsapi get_wifi_param wifi0 \<parameter\>	</c><br>
+ * Unless an error occurs, the output will be the numeric value of the parameter.<br>
+ * To access the set parameter API enter:<br>
+ * <c>call_qcsapi set_wifi_param wifi0 \<parameter\> \<numeric value\></c><br>
+ * Unless an error occurs, the output will be the string <c>complete</c>.
+ *
+ * @section mysection10_6 Notes on Selected Parameters
+ *
+ * - The dtim period is an AP only parameter.<br>
+ *   It controls how often the broadcast/multicast traffic indication bit set in beacon unit.<br>
+ */
+
+
+/**@defgroup SSIDAPIs SSID APIs
+ * @brief The WPA Supplicant configuration file (STA only) allows multiple service sets to be configured.
+ *
+ * Parameters configured in a service set include encryption modes, authentication mode, pre-shared keys (PSK) and the passphrase.
+ * Thus these APIs mirror the "WPA" APIs, with the exception that the SSID APIs require a service set identifier (SSID).
+ * Two additional APIs verify an SSID is present in the configuration file and create a new service set.
+ *
+ * \note All SSID APIs work with the WPA Supplicant security configuration file, wpa_supplicant.conf.
+ * This file's location is determined by the get file path configuration API (section @ref File_Path_conf "File Path configuration").
+ * Results from these APIs may be inconsistent or incorrect if the file path to the security configuration files has not been correctly configured.
+ * 
+ * @section mysection11_1 Error Codes from SSID APIs
+ * Two failure conditions are restricted to the SSID APIs.
+ *
+ * The first failure condition is if the referenced SSID is not present in the configuration file.
+ * The error code in this situation will be:
+ *
+ * <c>-qcsapi_SSID_not_found</c>
+ *
+ * and the error message from the <c>call_qcsapi</c> scripting interface will be:
+ *
+ * <c>QCS API error 1002: SSID not found</c>
+ *
+ * Use the Verify SSID API (\ref qcsapi_SSID_verify_SSID) to confirm an SSID is present in the configuration file.
+ *
+ * The second failure condition is if the referenced SSID is present in the configuration file, but a required
+ * parameter is not present.
+ *
+ * An example is calling the SSID Get (Security) Protocol for an SSID that is configured without security.
+ *
+ * Here the error code will be:
+ *
+ * <c>-qcsapi_SSID_parameter_not_found</c>
+ *
+ * and the error message from the <c>call_qcsapi</c> scripting interface will be:
+ *
+ * <c>QCS API error 1012: Required parameter not found in the SSID configuration block.</c>
+ */
+
+/**@defgroup WPSAPIs WPS APIs
+ * @section mysection12_1 Overview
+ * Under the WPS standard, a WiFi device can be either a Registrar or an Enrollee.
+ * In this context, currently an AP is always a Registrar and a STA is always an Enrollee.
+ */
+
+/**@defgroup LEDGPIOAPIs LED and GPIO APIs
+ * @brief Although the APIs make a formal distinction between LEDs and GPIO pins, currently all LEDs are controlled thru GPIO pins.<br>
+ * To accommodate different board designs, all LEDs / GPIO pins must be configured prior to use by software.
+ * The configuration is persistent and should only need to be done once.  GPIO pin configuration is one of:
+ *  - qcsapi_gpio_not_available = 0
+ *  - qcsapi_gpio_input_only = 1
+ *  - qcsapi_gpio_output = 2
+ * .
+ * Default configuration is qcsapi_gpio_not_available.  A pin configured for output can be read as input.<br>
+ * All GPIO pins are accessed through the LED APIs, including GPIO pins that do not control an LED.
+ * An LED / GPIO pin can be either HIGH (value for setting is 1) or low (value for setting is 0).
+ * Be aware that a particular LED / GPIO pin can either be active high or active low.
+ * Consult the board documentation or schematics for details on the logic for each GPIO pin.<br>
+ * GPIO pin numbers range from 0 to 31.
+ */
+
+/**@defgroup PerAssocAPIs Per Association APIs
+ * @brief These APIs report on items available for each association.
+ * The first two only work on the AP; remaining APIs work on both an AP and a STA.
+ * On a STA, the association index must be 0.
+ */
+
+/**@defgroup RegulatoryAPIs APIs for Regulatory Compliance
+ * @brief This section describes APIs that assist with regulatory compliance.
+ * "Get" APIs are present for reference and convenience; "set" APIs are recommended to insure regulatory compliance.
+ * Also included are details on how to configure and manage transmit (TX) power, since the "set" APIs rely on this TX power configuration to set the transmit power.
+ * All APIs qcsapi_regulatory_xxx are used for regulatory database, and other APIs qcsapi_wifi_xxx which are used for EIRP table will be discarded.
+ * @section mysection15_1 Overview
+ * Regulatory compliance covers the choice of WiFi channels and how much power can be transmitted on each channel.
+ * The choice of WiFi channels is pretty straightforward.  Typically either a channel is available or is not available.
+ * Currently the APIs either grant access to a channel or block access to that channel (if a channel cannot be used the API returns -EINVAL as its error code return value).
+ * If a channel is available by regulatory authority, no further restrictions are imposed on its use, except for the amount of power that can be transmitted.
+ * 
+ * Transmit power (TX power) is more complicated.  First, the regulatory authority imposes a limit on the overall TX power.
+ * But sometimes the TX power that should be configured is lower than the limit established by the regulatory authority.
+ * For example, each board design usually has a maximum TX power for the board, a power level that should not be exceeded on any channel.
+ * Also, during testing for regulatory compliance,
+ * sometimes it is found the TX power for a particular channel needs to be reduced to meet the detailed requirements of the regulatory authority.
+ * This latter limit on the TX power can change from channel to channel, and from one regulatory region to another.
+ * 
+ * Transmit power is always measured and reported for an individual antenna chain.  The overall TX power that the system broadcasts is not measured or considered.
+ * It is expect regulatory requirements will be mapped to TX power   limitations on a per-chain / per-antenna basis,
+ * and that testing for regulatory compliance will be based on per-chain / per-antenna results.
+ * @section mysection15_2 Managing TX Power
+ * The TX power that should be configured for a channel is derived from the three sources described above:
+ *  -# TX power limit set by regulatory authority.
+ *  -# TX power limit established for the board.  This limit is independent of the regulatory authority, but can lower the TX power below what the regulatory authority specifies.
+ *  -# TX power limit established for each channel - the TX power database.  The limit for each channel can differ depending on the controlling regulatory authority.
+      This limit also can lower the TX power below what the regulatory authority specifies.
+ * .
+ * All TX power values are expressed as integers in units of dBm.  All values are absolute power settings, not offsets.<br>
+ * The rule for deriving the TX power for a channel is: take the minimum of the values from each of the three sources, regulatory authority,
+ * board limit and the TX power database.
+ * @section mysection15_3 The Calibration State
+ * A boot configuration environmental variable, calstate, helps determine the capabilities of the WiFi device when it boots up.
+ * If calstate is set to 1, the system installs special programming that facilitates testing for regulatory compliance.
+ * In this state though, the WiFi device will not associate or pass traffic.
+ * Set calstate to 3 to get the system to boot up so that it will associate and pass traffic.
+ * With calstate set to 3 though, testing for regulatory compliance may be less straightforward.  This latter state is also referred to as production mode.
+ * 
+ * To make changes in the TX power database, calstate must be set to 1.
+ * @section mysection15_4 Selecting the Regulatory Region
+ * The regulatory region is specified using a string.  The table below lists currently supported regulatory regions and
+ * what strings will select that region.  Base name is what would be returned by the Get Regulatory Region and
+ * the Get List of WiFi Regulatory Region APIs.
+ * <TABLE>
+ * <TR>	<TD>Region</TD>	<TD>Base Name</TD>	<TD>Synonyms</TD></TR>
+ * <TR>	
+ * 	<TD>United States of America – Federal Communications Commission (FCC)</TD>
+ * 	<TD>us</TD>
+ * 	<TD>US, usa, USA, FCC</TD>
+ * </TR>
+ * <TR>
+ * 	<TD>European Community</TD>	<TD>eu</TD>	<TD>EU, CE, ce, Europe</TD>
+ * </TR>
+ * </TABLE>
+ * 
+ * @section mysection15_5 TX Power Configuration
+ * This section describes where the 3 sources for configuring TX power are located.
+ *
+ * @section mysection15_6 Limit by Regulatory Authority
+ * The TX power limit that is set by regulatory authority is stored in tables that are part of the
+ * binary QCSAPI library (libqcsapi.so) and cannot be edited.
+ * The value for each available channel is available from an API.  The same API also reports if a channel is available,
+ * for if it is called with an invalid channel, it will return an error (error code return value: <c>-EINVAL</c>).
+ * An example is WiFi channel 188, a valid 5 GHz channel by the 802.11 standard, but not available in Europe or the USA.
+ *
+ * @section mysection15_7 Per Channel Limits
+ * The TX power limit established for each channel is stored in flash memory, in the boot configuration sector.
+ * (All boards are required to have a boot configuration sector in flash memory.)
+ * Entries in this table are typically obtained while testing the WiFi device at a laboratory
+ * that verifies regulatory compliance.
+ * Here is an example file of TX power limits configured for each WiFi channel:<br>
+ * @code
+ * # TX power database table
+ * # Chan   TX power
+ *   36      14
+ *   40      15
+ *   44      15
+ *   48      15
+ *   52      15
+ *   56      15
+ *   60      15
+ *   64      14
+ *   100     18
+ *   104     19
+ *   108     19
+ *   112     19
+ *   116     19
+ *   132     19
+ *   136     19
+ *   140     18
+ * @endcode
+ * (Caution: above table is an example and should not be used.
+ * Actual values for the max TX power have to be derived from testing for regulatory compliance.)
+ *
+ * Each channel is listed together with the max TX power for that channel.
+ * The table should then be stored in a file, with one entry per line.
+ * Each line is expected to have 2 numbers (3 numbers are also possible, as explained later).
+ * The first number is the channel; the second is the max TX power for that channel.
+ * A separate file should be created for each regulatory region.
+ *
+ * This file then needs to be loaded into the TX power database, as shown in section @ref mysection15_12 "Reviewing and Updating the TX Power Configuration".
+ *
+ * @section mysection15_8 Board Limits
+ * The overall max TX power for the board is stored in a boot configuration environmental
+ * variable, <c>max_tx_power</c>.  A related variable, <c>min_tx_power</c>,
+ * stores the minimum TX power that should be configured.
+ * If the regulatory limit for transmit power for a a channel is below the value for <c>min_tx_power</c>,
+ * access to that channel will be denied under that regulatory region.
+ *
+ * Values for both are expected to be obtained from testing the board.
+ *
+ * @section mysection15_9 Bandwidth 20 MHz vs. Bandwidth 40 MHz
+ * The usual bandwidth when the system is in production mode is 40 MHz.  However,
+ * it is possible to configure the bandwidth to be 20 MHz.
+ * When configured this way, the WiFi device will limit the bandwidth to 20 MHz,
+ * even if its partner in association supports 40 MHz.
+ *
+ * It turns out the per-channel power limits can differ based on the configured bandwidth,
+ * 20 MHz vs 40 MHz.  Regulatory requirements though do not change based on how the bandwidth is configured;
+ * nor does the overall board limit, the value in the boot configuration environmental variable, <c>max_tx_power</c>.
+ *
+ * To support a different TX power limit when the bandwidth is configured to 20 MHz,
+ * each entry in the TX power database table can have 2 TX power values.
+ * The first value is the one to be used if the bandwidth is configured to 40 MHz.
+ * If present, a second value will be used if the bandwidth is configured to 20 MHz.
+ * This second value is optional.  If this second value is not present,
+ * the same TX power will be used for bandwidth configured to 40 MHz or 20 MHz, obtained from the first entry.
+ *
+ * Below is an example file of TX power limits with separate entries for bandwidth of 40 MHz and 20 MHz.<br>
+ * @code
+ * # TX power database table
+ * # chan 40/20  20
+ * #-----------------
+ *    36   14    14
+ *    40   14    15
+ *    44   15    15
+ *    48   15    15
+ *    52   15    15
+ *    56   15    15
+ *    60   14    15
+ *    64   14    15
+ *    100   15    15
+ *    104   15    17
+ *    108   17    17
+ *    112   17    17
+ *    116   17    17
+ *    132   17    17
+ *    136   15    17
+ *    140   15    15
+ * @endcode
+ * (Caution: above table is an example and should not be used.
+ * Actual values for the max TX power need to be derived from testing for regulatory compliance.)
+ *
+ * @section mysection15_10 Defaults for TX Power
+ * Regulatory limits are stored in the QCSAPI library binary and cannot be changed.
+ * The per-channel and board limits are expected to be configured for each board.
+ * If either are missing, the API programming will create defaults.
+ *
+ * For the boot configuration environmental variables, the default value for <c>max_tx_power</c> is 19;
+ * for <c>min_tx_power</c> it is 9.
+ *
+ * The TX power database has a separate table for each regulatory region.
+ * The table has an entry of channel, max TX power for each channel.  If this table is absent for a regulatory region,
+ * the software will create this table, using the minimum of the regulatory limit and the board limit to
+ * obtain the max TX power for each channel.  Note the default board limit is 19 dBm,
+ * so the "default default" max TX power is 19 dBm.  Only one TX power value will be configured for each channel,
+ * so by default no distinction will be made between bandwidth configured to 40 MHz vs 20 MHz.
+ *
+ * These defaults are provided to prevent problems if for any reason the per-channel limits or
+ * the board limits are not configured.  It is expected that both will be configured before
+ * bringing the system up in production mode (<c>calstate = 3</c>), using the commands described in the next section.
+ *
+ * @section mysection15_11 Reducing TX Power on the STA Independent of the AP
+ * For various reasons it may be necessary to reduce power on the STA separately from the AP.
+ * This distinction is required because a particular WiFi device can switch roles, Access Point and Station,
+ * by simply changing the configuration.  If a device changes from STA mode to AP mode,
+ * any power reduction applied due to it being a STA should no longer be applied.
+ *
+ * For this reason, another boot configuration parameter, <c>max_sta_tx_power</c>,
+ * is available that will limit the max TX power, but only on the STA.  This parameter is optional;
+ * If not present, the system will look for and work with <c>max_tx_power</c> as described previously.
+ *
+ * @section mysection15_12 Reviewing and Updating the TX Power Configuration
+ * As mentioned previously, regulatory limited are stored in the API binaries and cannot be modified.
+ * Use the API Get Regulatory TX Power, described in detail below, to access regulatory requirements,
+ * including the maximum TX power allowed by regulatory authority.
+ * Use the API Get List Regulatory Channels, described in detail below,
+ * to display the list of channels allowed in a particular regulatory region.
+ *
+ * The boot configuration environmental variables <c>calstate, max_tx_power</c> and <c>min_tx_power</c> can
+ * all be accessed from the u-boot prompt, or by using the <c>get_bootval</c> command once the system boots up.
+ * Their values can be changed at the u-boot prompt, or by using the <c>set_bootval</c> command after the system boots up.
+ * Be aware that when setting a value from the u-boot prompt, the new value needs to be saved with the <c>saveenv</c>
+ * u-boot command.  Updates to boot configuration environmental variables are automatically saved with
+ * the <c>set_bootval</c> command.
+ *
+ * Three commands are available to work with the TX power database, the tables of TX power limits for each channel.
+ * The boot parameter <c>calstate</c> must be set to 1 to make changes to the TX power database.
+ *
+ * The command <c>configure_tx_power_limit</c> sets up the TX power database for a particular regulatory region.
+ * The command takes either one or two parameters.  If two parameters are present, the first is interpreted as the
+ * regulatory region and the second as the path to a file with the table of channels and TX power limits.  Example file
+ * contents are shown in sections 8.15.7 and 8.15.9.  If only one parameter is present, it will be interpreted as the
+ * regulatory region.  See section @ref mysection15_4 for details on selecting a regulatory region.  Boot parameter
+ * <c>calstate</c> must be set to 1.
+ *
+ * The command <c>display_tx_power_limit</c> displays the TX power limits for a particular channel, or the entire table
+ * for a regulatory region.  This command expects two parameters.  The first is the regulatory region; the second is the
+ * WiFi channel.  If the 2nd parameter is "all", the entire table for the selected regulatory region is displayed.  See
+ * section @ref mysection15_4 "HERE" for details on selecting a regulatory region.
+ *
+ * The command <c>update_tx_power_limit</c> updates the TX power limits for a particular channel.  This command takes
+ * either three or four parameters.  The first is the regulatory region; the second is the WiFi channel; the third is the
+ * limit on TX power.  A fourth parameter will be interpreted as the limit on TX power when the bandwidth is configured to
+ * 20 MHz.  Boot parameter <c>calstate</c> must be set to 1.
+ */
+
+/**@defgroup DFSAPIs DFS, Radar and OCAC APIs
+ * Selected channels in the 5 GHz frequency range are also used by weather and military radar.
+ * To prevent unwanted interference, WiFi devices using those channels are required to follow special protocols, as describe in 802.11h.
+ * APIs are available that list channels that are subject to the DFS protocols and channels that are not subject to those protocols.
+ * A separate API reports whether a particular channel is subject to DFS protocols.
+ * As the exact DFS-related regulations are determined by the regulatory authority,
+ * the regulatory region is a required parameter for all these APIs.
+ *
+ * @section mysection16_1 OCAC
+ * OCAC is a feature where the DFS master device will periodically scan off-channel in order to detect radar on a channel different to
+ * the current operating channel. This feature is limited to operation with up to 2 BSSes only.
+ */
+
+/**@defgroup ScanAPIs Scan APIs
+ * This section describes APIs that report on properties of APs that were found when the STA scanned the WiFi channels.<br>
+ * When a WiFi device configured as a STA starts up, it typically scans the WiFi channels for APs in its neighborhood.
+ *
+ * \note The list of channels will be limited to those legal in the local regulatory region by calling the Set Regulatory Region API.
+ *
+ * Two APIs are available to report on the results of the last AP scan. The first API gets the results and caches them in memory.
+ * A second API then reports the properties of a particular AP. The AP is selected by index, starting at 0.
+ * An application that wants to examine all APs can call Get Properties AP (see qcsapi_wifi_get_properties_AP), starting first with
+ * the index set to 0, and incrementing that index in each subsequent call until the API returns an error (-ERANGE).
+ * 
+ * If either API is called on a WiFI device configured as an AP, the API will return an error (see enum qcsapi_only_on_STA).<br>
+ *
+ * \note The Get Properties API uses the results it finds in the in-memory cache.
+ * To insure the results from the latest AP scan are used, an application should always call the get results AP scan API first
+ * (see qcsapi_wifi_get_results_AP_scan).
+ * The example application shows how this should be programmed.
+ *
+ * @section mysection17_1 Data Structure to Report the Properties of an AP
+ * The properties of an AP are returned in the data structure shown below (see struct qcsapi_ap_properties for full details):<br>
+ * @code
+ *	typedef struct qcsapi_ap_properties
+ *	{
+ *		qcsapi_SSID             ap_name_SSID;
+ *		qcsapi_mac_addr         ap_mac_addr;
+ *		qcsapi_unsigned_int     ap_flags;
+ *		int                     ap_channel;
+ *		int                     ap_RSSI;
+ *		int                     ap_protocol;
+ *		int                     ap_encryption_modes;
+ *		int                     ap_authentication_mode;
+ *		int			ap_best_rate;
+ *		int			ap_wps;
+ *		int			ap_80211_proto;
+ *	} qcsapi_ap_properties;
+ * @endcode
+ * As can be seen from the data struct definition, properties returned by the Get AP Properties API include its SSID,
+ * its MAC address, what channel it is broadcasting beacons on and the relative signal strength (RSSI) from that AP.
+ * RSSI will range from 1 up to 70; the larger this value, the stronger the signal from the AP is on the local STA.
+ *
+ * Flags (ap_flags) is a bit mask and currently only reports on whether the AP has enabled security.
+ * If the low-order bit (0x01) is set, the referenced AP has enabled security; if that bit is cleared,
+ * the referenced AP has disabled security.  Remaining bits have no meaning currently.
+ *
+ * If security is reported as enabled, the security protocol(s) in use, the encryption mode(s) and the authentication mode are all reported.<br>
+ * Possible values for the protocol(s) (ap_protocol ) are derived from these two values:
+ * @code
+ *	qcsapi_protocol_WPA_mask = 1
+ *	qcsapi_protocol_11i_mask = 2
+ * @endcode
+ * Since an AP can enable both WPA and 11i (WPA2) at the same time, the two values are actually bit masks.<br>
+ * Possible values for the authentication mode (ap_encryption_modes) are shown below:<br>
+ * @code
+ *	qcsapi_ap_PSK_authentication = 1
+ *	qcsapi_ap_EAP_authentication = 2
+ * @endcode
+ * Possible values for the encryption mode(s) (ap_authentication_mode) are derived from these two values:<br>
+ * @code
+ *	qcsapi_ap_TKIP_encryption_mask = 0x01
+ *	qcsapi_ap_CCMP_encryption_mask = 0x02
+ * @endcode
+ * Since an AP can enable both CCMP and TKIP as encryption modes at the same time, the two values are actually bit masks.<br>
+ * The value of WPS capability (ap_wps) is 1 when AP supports WPS, or 0 when not.<br>
+ * The value of IEEE802.11 protocol (ap_80211_proto) may be any combination of following values:<br>
+ * @code
+ *	802.11b	0x01
+ *	802.11g	0x02
+ *	802.11a	0x04
+ *	802.11n	0x08
+ * @endcode
+ *
+ * @section mysection17_4 Demonstration Application for AP Scan APIs
+ * A demonstration command line application, <c>show_access_points</c>, is included with the SDK.
+ *
+ * This application details how to use the Get Results AP Scan API before getting the properties for individual APs.
+ *
+ * Look at the code fragment below:
+ *	@code
+
+	errorval = qcsapi_wifi_get_results_AP_scan( ifname, &count_APs );
+
+	if (errorval >= 0) {
+		qcsapi_unsigned_int     iter;
+		qcsapi_ap_properties    ap_properties;
+
+		for (iter = 0; iter < count_APs && errorval >= 0; iter++) {
+			errorval = qcsapi_wifi_get_properties_AP( ifname, iter, &ap_properties );
+			if (errorval >= 0) {
+				show_ap_properties( iter + 1, &ap_properties );
+			}
+		}
+	} else {
+		/* come here if the initial call to get the results of the AP scan fails */
+	}
+	@endcode
+ * 
+ * Notice the program first calls qcsapi_wifi_get_results_AP_scan before looping over the individual APs,
+ * calling qcsapi_wifi_get_properties_AP to get the properties for individual APs.
+ * Such a programming model is recommended whenever an application reviews or lists the properties of individual APs.
+ */
+
+
+/**@defgroup SecurityMisAPIs Security Mismatch Backoff APIs
+ * @brief Two APIs are available on the WiFi station (WiFi mode is "Station") to manage retries when a mismatch in security is discovered with its partner Access Point.
+ * Because the STA can eventually back off and stop attempting to associate for a period of time, these APIs are referred to as Backoff APIs.<br>
+ * These API configure the number of time to try before backing off and the amount of time to wait before trying again after backing off.
+ */
+
+
+/**@defgroup EngineeringAPIs Engineering and Test APIs
+ * @brief These APIs are not expected to be called in normal programming.
+ * They are present to assist with engineering testing and performance evaluation.
+ */
+
+/**@defgroup vsp_group Video Stream Protection APIs
+ * @brief VSP ensures that video streams transmitted through Quantenna Access Points are protected from interference by other intra-BSS traffic and channel interference.
+ * VSP pro-actively monitors and adjusts the streams running across the network to ensure video streams do not drop or suffer artefacts. These APIs provide configuration for the VSP module.
+ */
+ */
+
+/**@defgroup invoke_script API to call scripts for EMI testing and RF testing
+ *
+ * This chapter describes APIs to call scripts on the board to run EMI testing and RF testing in
+ * calstate=1 mode.
+ */
+
+/**@defgroup CalcmdAPI API for PHY testing
+ * \brief These APIs are used for PHY testing.
+ */
+
+/**@defgroup BootConfigAPIs Bootcfg APIs
+ * \brief These APIs deal with the bootcfg interface.
+ *
+ * These APIs deal with the low level, early boottime configuration of the board.
+ *
+ * \note The update bootcfg API (qcsapi_bootcfg_update_parameter) can only be called in bringup mode, NOT in production mode.
+ */
+
+/**@defgroup FirmwareAPIs Firmware Management APIs
+ * \brief These APIs are used for firmware management functions.
+ */
+
+/**@defgroup PowerAPIs Power Management APIs
+ * \brief These APIs are used for power management functions.
+ */
+
+/**@defgroup SCSAPIs Smart Channel Select (SCS) APIs
+ * \brief These APIs are used to configure and get status for the Quantenna Smart Channel Select (SCS) feature.
+ */
+
+/**@defgroup VLANAPIs VLAN APIs
+ * \brief These APIs are used to configure, control and obtain status for VLANs within the Quantenna device.
+ *
+ * @section VLANsection_31_1 VLAN concepts in wireless networking
+ *
+ * This section outlines some key concepts in wireless networking relating specifically to VLANs.
+ *
+ * In order to understand the different uses for VLANs, some terminology will be introduced. The following table outlines the three different types of VLAN which apply to wireless systems.
+ *
+ * <TABLE>
+ * <TR><TD><b>Term</b></TD><TD><b>Description</b></TD></TR>
+ * <TR><TD>VLAN termination</TD><TD>A type of VLAN which terminates on the Quantenna device Linux host. That is, the Linux host is a member of the given VLAN. In networking terminology, this can be considered the Linux host is part of the VLAN access port.</TD></TR>
+ * <TR><TD>VLAN passthrough</TD><TD>A type of VLAN which is transparently bridged across 4-address wireless hops (ie, not terminated or mapped). In networking terminology, this can be considered a VLAN trunk port.</TD></TR>
+ * <TR><TD>VLAN mapping</TD><TD>A type of VLAN which maps to a given BSS, for which the 802.1q header is stripped prior to forwarding the packet to the wireless client. Packets received from the wireless client are tagged with an appropriate 802.1q tag prior to forwarding to the Ethernet interface. In networking terminology, this can be considered a VLAN access port.</TD></TR>
+ * </TABLE>
+ *
+ * The three different modes of VLANs for the Quantenna firmware are shown operating in the following diagram.
+ *
+ * \image latex VLAN-types.png " " width=\textwidth
+ *
+ * @section VLANsection_31_4 Example VLAN configuration - VLAN mapping
+ *
+ * This section presents a concrete example of how to map VLANs to configured BSSes (SSIDs). In this case, the Quantenna device being configured is running a pure AP function, mapping clients per BSS into the appropriate VLAN on the Ethernet side of the Quantenna device.
+ *
+ * First ensure the Quantenna device is configured with at least two additional BSSes (and corresponding SSIDs). See the section @ref MBSSIDAPIs for details of configuring multiple BSSes on a single Quantenna device. This example gives a very simple configuration including both BSS creation and VLAN mapping to the SSID.
+ *
+ * Second, select two VLAN IDs to map onto the different BSSes. In this example, VLAN 10 and 20 are used.
+ *
+ * The script shown in the following code snippet shows how to map VLAN 10 onto SSID Qtn-Open-BSS (with no authentication or encryption), and VLAN 20 onto SSID Qtn-WPA2-BSS (with WPA2 authentication/CCMP encryption enabled).
+ *
+ * @code
+ * #Enable VLAN functionality
+ * call_qcsapi vlan_config wifi0 enable 0
+ * #Create wifi1, bind to VLAN 10
+ * call_qcsapi wifi_create_bss wifi1
+ * call_qcsapi set_SSID wifi1 "Qtn-Open-BSS"
+ * call_qcsapi set_beacon wifi1 Basic
+ * call_qcsapi vlan_config wifi1 bind 10
+ * #Create wifi2, bind to VLAN 20
+ * call_qcsapi wifi_create_bss wifi2
+ * call_qcsapi set_SSID wifi2 "Qtn-WPA2-BSS"
+ * call_qcsapi set_beacon wifi2 11i
+ * call_qcsapi set_WPA_encryption_modes wifi2 AESEncryption
+ * call_qcsapi set_passphrase wifi2 "This is the passphrase!" 0
+ * call_qcsapi vlan_config wifi2 bind 20
+ * @endcode
+ */
+
+/**@defgroup StatisticsAPIs Statistics APIs
+ * \brief These APIs are used to obtain statistics from the device.
+ */
+
+/**@defgroup ServicesAPIs Linux Services APIs
+ * \brief These APIs are used for Linux daemon control.
+ */
+
+/**@defgroup QTM_group Quantenna Traffic Management (QTM) APIs
+ * \brief These APIs are used for Quantenna Traffic Management (QTM) configuration.
+ */
+
+/**@defgroup TDLS_group TDLS APIs
+ * \brief These APIs are used for configuration and control of TDLS.
+ */
+
+/**@defgroup MU_group Multi-user MIMO APIs
+ * \brief These APIs are used for debugging and display of MU details.
+ */
+
+/**@defgroup WOWLAN_group Wake on WLAN (WoWLAN) APIs
+ * \brief These APIs are used for Wake on WLAN configuration and control.
+ */
+
+/**@defgroup ANDROID_group Android APIs
+ * \brief These APIs are used for integrating QTN firmware with Android host.
+ */
diff --git a/quantenna/common/doxygen/qcsapi_doc/image/VLAN-types.png b/quantenna/common/doxygen/qcsapi_doc/image/VLAN-types.png
new file mode 100644
index 0000000..20c21c1
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/image/VLAN-types.png
Binary files differ
diff --git a/quantenna/common/doxygen/qcsapi_doc/image/qcsapi_image1.jpg b/quantenna/common/doxygen/qcsapi_doc/image/qcsapi_image1.jpg
new file mode 100644
index 0000000..d66515a
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/image/qcsapi_image1.jpg
Binary files differ
diff --git a/quantenna/common/doxygen/qcsapi_doc/image/rpc_img1.jpg b/quantenna/common/doxygen/qcsapi_doc/image/rpc_img1.jpg
new file mode 100644
index 0000000..d261a9d
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/image/rpc_img1.jpg
Binary files differ
diff --git a/quantenna/common/doxygen/qcsapi_doc/image/rpc_img2.jpg b/quantenna/common/doxygen/qcsapi_doc/image/rpc_img2.jpg
new file mode 100644
index 0000000..a98d13b
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/image/rpc_img2.jpg
Binary files differ
diff --git a/quantenna/common/doxygen/qcsapi_doc/qtn_latex.sh b/quantenna/common/doxygen/qcsapi_doc/qtn_latex.sh
new file mode 100755
index 0000000..874609f
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/qtn_latex.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+TARGET_DIR=../../../doxygen/qcsapi/latex
+targetfile=${TARGET_DIR}/refman.tex
+tmpfile=${TARGET_DIR}/refman.tex.tmp
+
+if [ -f $targetfile ] ; then
+	echo "refman.tex exists....."
+	# change latex type from "book" to "report" , Change the default title generated by doxygen, remove chapters that we don't need
+	sed -e 's/book/report/' -e 's/Module Documentation/QCSAPI detailed documentation/' \
+		-e '/Module Index/',+1d \
+		-e '/Data Structure Index/',+1d \
+		$targetfile > $tmpfile
+
+	cp -f $tmpfile $targetfile
+fi
diff --git a/quantenna/common/doxygen/qcsapi_doc/vsp_doc.c b/quantenna/common/doxygen/qcsapi_doc/vsp_doc.c
new file mode 100644
index 0000000..f74a81a
--- /dev/null
+++ b/quantenna/common/doxygen/qcsapi_doc/vsp_doc.c
@@ -0,0 +1,318 @@
+/*SH0
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2009 - 2011 Quantenna Communications Inc            **
+**                                                                           **
+**  File        : vsp_doc.c                                                  **
+**  Description : Automatically create VSP QCSAPI documentation              **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH0*/
+
+#define inline
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+
+#include "qcsapi.h"
+
+static const struct qvsp_rule_param qvsp_rule_params[] = QVSP_RULE_PARAMS;
+static const struct qvsp_cfg_param qvsp_cfg_params[] = QVSP_CFG_PARAMS;
+static const char *qvsp_rule_order_desc[] = QVSP_RULE_ORDER_DESCS;
+
+#define E(x)	case x: return #x
+
+static const char *qvspdoc_enumstr_cfg(enum qvsp_cfg_param_e e)
+{
+	switch (e) {
+	E(QVSP_CFG_ENABLED);
+	E(QVSP_CFG_ENABLED_ALWAYS);
+	E(QVSP_CFG_FAT_MIN);
+	E(QVSP_CFG_FAT_MIN_SOFT);
+	E(QVSP_CFG_FAT_MIN_SOFT_CONSEC);
+	E(QVSP_CFG_FAT_MIN_SAFE);
+	E(QVSP_CFG_FAT_MIN_CHECK_INTV);
+	E(QVSP_CFG_FAT_MAX_SOFT);
+	E(QVSP_CFG_FAT_MAX_SOFT_CONSEC);
+	E(QVSP_CFG_FAT_MAX_SAFE);
+	E(QVSP_CFG_FAT_MAX_CHECK_INTV);
+	E(QVSP_CFG_NODE_DATA_MIN);
+	E(QVSP_CFG_DISABLE_DEMOTE);
+	E(QVSP_CFG_DISABLE_DEMOTE_FIX_FAT);
+	E(QVSP_CFG_DISABLE_WAIT);
+	E(QVSP_CFG_DISABLE_PER_EVENT_MAX);
+	E(QVSP_CFG_ENABLE_WAIT);
+	E(QVSP_CFG_ENABLE_PER_EVENT_MAX);
+	E(QVSP_CFG_STRM_RMT_DIS_TCP);
+	E(QVSP_CFG_STRM_RMT_DIS_UDP);
+	E(QVSP_CFG_STRM_TPUT_MIN);
+	E(QVSP_CFG_STRM_DISABLED_MAX);
+	E(QVSP_CFG_STRM_ADPT_THROT);
+	E(QVSP_CFG_STRM_ADPT_THROT_STEP);
+	E(QVSP_CFG_STRM_ADPT_THROT_MARGIN);
+	E(QVSP_CFG_STRM_TPUT_SMPL_MIN);
+	E(QVSP_CFG_STRM_COST_RC_ADJUST);
+	E(QVSP_CFG_STRM_MAX);
+	E(QVSP_CFG_STRM_MAX_AC0);
+	E(QVSP_CFG_STRM_MAX_AC1);
+	E(QVSP_CFG_STRM_MAX_AC2);
+	E(QVSP_CFG_STRM_MAX_AC3);
+	E(QVSP_CFG_STRM_MIN);
+	E(QVSP_CFG_STRM_MIN_AC0);
+	E(QVSP_CFG_STRM_MIN_AC1);
+	E(QVSP_CFG_STRM_MIN_AC2);
+	E(QVSP_CFG_STRM_MIN_AC3);
+	E(QVSP_CFG_STRM_TPUT_MAX_TCP);
+	E(QVSP_CFG_STRM_TPUT_MAX_TCP_AC0);
+	E(QVSP_CFG_STRM_TPUT_MAX_TCP_AC1);
+	E(QVSP_CFG_STRM_TPUT_MAX_TCP_AC2);
+	E(QVSP_CFG_STRM_TPUT_MAX_TCP_AC3);
+	E(QVSP_CFG_STRM_TPUT_MAX_UDP);
+	E(QVSP_CFG_STRM_TPUT_MAX_UDP_AC0);
+	E(QVSP_CFG_STRM_TPUT_MAX_UDP_AC1);
+	E(QVSP_CFG_STRM_TPUT_MAX_UDP_AC2);
+	E(QVSP_CFG_STRM_TPUT_MAX_UDP_AC3);
+	E(QVSP_CFG_STRM_ENABLE_WAIT);
+	E(QVSP_CFG_STRM_AGE_MAX);
+	E(QVSP_CFG_AGE_CHK_INTV);
+	E(QVSP_CFG_3RDPT_CTL);
+	E(QVSP_CFG_3RDPT_LOCAL_THROT);
+	E(QVSP_CFG_3RDPT_QTN);
+	E(QVSP_CFG_BA_THROT_INTV);
+	E(QVSP_CFG_BA_THROT_DUR_MIN);
+	E(QVSP_CFG_BA_THROT_DUR_STEP);
+	E(QVSP_CFG_BA_THROT_WINSIZE_MIN);
+	E(QVSP_CFG_BA_THROT_WINSIZE_MAX);
+	E(QVSP_CFG_WME_THROT_AC);
+	E(QVSP_CFG_WME_THROT_AIFSN);
+	E(QVSP_CFG_WME_THROT_ECWMIN);
+	E(QVSP_CFG_WME_THROT_ECWMAX);
+	E(QVSP_CFG_WME_THROT_TXOPLIMIT);
+	E(QVSP_CFG_WME_THROT_THRSH_DISABLED);
+	E(QVSP_CFG_WME_THROT_THRSH_VICTIM);
+	E(QVSP_CFG_EVENT_LOG_LVL);
+	E(QVSP_CFG_DEBUG_LOG_LVL);
+	E(QVSP_CFG_MAX);
+	}
+	return "unknown!";
+}
+
+static const char *qvspdoc_enumstr_rule_param(enum qvsp_rule_param_e e)
+{
+	switch (e) {
+	E(QVSP_RULE_PARAM_DIR);
+	E(QVSP_RULE_PARAM_VAPPRI);
+	E(QVSP_RULE_PARAM_AC);
+	E(QVSP_RULE_PARAM_PROTOCOL);
+	E(QVSP_RULE_PARAM_TPUT_MIN);
+	E(QVSP_RULE_PARAM_TPUT_MAX);
+	E(QVSP_RULE_PARAM_COST_MIN);
+	E(QVSP_RULE_PARAM_COST_MAX);
+	E(QVSP_RULE_PARAM_ORDER);
+	E(QVSP_RULE_PARAM_THROT_POLICY);
+	E(QVSP_RULE_PARAM_DEMOTE);
+	E(QVSP_RULE_PARAM_MAX);
+	}
+	return "unknown!";
+}
+
+static const char *qvspdoc_enumstr_rule_order(enum qvsp_rule_order_e e)
+{
+	switch (e) {
+	E(QVSP_RULE_ORDER_GREATEST_COST_NODE);
+	E(QVSP_RULE_ORDER_LEAST_COST_NODE);
+	E(QVSP_RULE_ORDER_GREATEST_NODE_INV_PHY_RATE);
+	E(QVSP_RULE_ORDER_LEAST_NODE_INV_PHY_RATE);
+	E(QVSP_RULE_ORDER_GREATEST_COST_STREAM);
+	E(QVSP_RULE_ORDER_LEAST_COST_STREAM);
+	E(QVSP_RULE_ORDER_NEWEST);
+	E(QVSP_RULE_ORDER_OLDEST);
+	E(QVSP_RULE_ORDER_LOWEST_TPUT);
+	E(QVSP_RULE_ORDER_HIGHEST_TPUT);
+	E(QVSP_RULE_ORDER_MAX);
+	}
+	return "unknown!";
+}
+
+static const char *qvspdoc_enumstr_rule_dir(enum qvsp_rule_dir_e e)
+{
+	switch (e) {
+	E(QVSP_RULE_DIR_ANY);
+	E(QVSP_RULE_DIR_TX);
+	E(QVSP_RULE_DIR_RX);
+	}
+	return "unknown!";
+}
+
+static const char *qvsp_rule_dir_descs[] = QVSP_RULE_DIR_DESCS;
+
+static void create_cfg_table(void)
+{
+	int i;
+	const struct qvsp_cfg_param *param;
+
+	if (0) {
+		printf(" * <TABLE>\n");
+		printf(" * <TR> <TD> \\b Enum </TD> <TD> \\b Name </TD> <TD> \\b Units </TD> "
+				"<TD> \\b Default </TD> <TD> \\b Min </TD> <TD> \\b Max </TD> <TD> \\b Description </TD> </TR>\n");
+
+		for (i = 0; i < QVSP_CFG_MAX; i++) {
+			param = &qvsp_cfg_params[i];
+			printf(" * <TR><TD>%s (%d)</TD><TD>%s</TD><TD>%s</TD><TD>%u</TD><TD>%u</TD><TD>%u</TD><TD>%s</TD></TR>\n",
+					qvspdoc_enumstr_cfg(i),
+					i,
+					param->name,
+					param->units,
+					param->default_val,
+					param->min_val,
+					param->max_val,
+					param->desc);
+		}
+
+		printf(" * </TABLE>\n");
+	} else if(0) {
+		static int colwidths[] = {34, 23, 10, 8, 8, 8, 32};
+
+		printf(" * @section vsp_cfg_table VSP Configuration options\n");
+		printf(" *\n");
+		printf(" * @code\n");
+
+
+		printf(" *  %-*s%-*s%-*s%-*s%-*s%-*s%-*s\n",
+				colwidths[0], "Enum",
+				colwidths[1], "Name",
+				colwidths[2], "Units",
+				colwidths[3], "Default",
+				colwidths[4], "Minimum",
+				colwidths[5], "Maximum",
+				colwidths[6], "Description");
+
+		for (i = 0; i < QVSP_CFG_MAX; i++) {
+			param = &qvsp_cfg_params[i];
+			printf(" * %2d %-*s%-*s%-*s%-*u%-*u%-*u%-*s\n",
+					i, colwidths[0] - 2, qvspdoc_enumstr_cfg(i),
+					colwidths[1], param->name,
+					colwidths[2], param->units,
+					colwidths[3], param->default_val,
+					colwidths[4], param->min_val,
+					colwidths[5], param->max_val,
+					colwidths[6], param->desc);
+		}
+
+		printf(" * @endcode\n *\n");
+	} else {
+		printf(" * @section vsp_cfg_table VSP Configuration options\n");
+
+		for (i = 0; i < QVSP_CFG_MAX; i++) {
+			param = &qvsp_cfg_params[i];
+			printf(" * \\li %d: %s - %s<br>Default: %u %s [%u - %u].  %s\n",
+					i,
+					qvspdoc_enumstr_cfg(i),
+					param->name,
+					param->default_val,
+					param->units,
+					param->min_val,
+					param->max_val,
+					param->desc);
+		}
+	}
+}
+
+static void create_rule_table(void)
+{
+	int i;
+	int j;
+	const struct qvsp_rule_param *rule_param;
+
+	printf(" * @section vsp_rule_table VSP Rule options\n");
+	for (i = 0; i < QVSP_RULE_PARAM_MAX; i++) {
+		rule_param = &qvsp_rule_params[i];
+		printf(" * - %d: %s - %s<br>[%u - %u %s].  %s\n",
+				i,
+				qvspdoc_enumstr_rule_param(i),
+				rule_param->name,
+				rule_param->min_val,
+				rule_param->max_val,
+				rule_param->units,
+				rule_param->desc);
+		switch (i) {
+			case QVSP_RULE_PARAM_DIR:
+				printf(" * <br>Possible values are:\n");
+				for (j = 0; j < ARRAY_SIZE(qvsp_rule_dir_descs); j++) {
+					printf("    - %s - %s\n",
+							qvspdoc_enumstr_rule_dir(j),
+							qvsp_rule_dir_descs[j]);
+				}
+				break;
+			case QVSP_RULE_PARAM_VAPPRI:
+				printf(" * <br>Possible values are:\n");
+				printf("     - 0x01 = VAP priority 0\n");
+				printf("     - 0x02 = VAP priority 1\n");
+				printf("     - 0x04 = VAP priority 2\n");
+				printf("     - 0x08 = VAP priority 3\n");
+				break;
+			case QVSP_RULE_PARAM_AC:
+				printf(" * <br>Possible values are:\n");
+				printf("     - 0x01 = Best Effort (0)\n");
+				printf("     - 0x02 = Background (1)\n");
+				printf("     - 0x04 = Voice (2)\n");
+				printf("     - 0x08 = Video (3)\n");
+				break;
+			case QVSP_RULE_PARAM_ORDER:
+				printf(" * <br>Allowed match orderings are (see enum qvsp_rule_order_e):\n");
+				for (j = 0; j < QVSP_RULE_ORDER_MAX; j++) {
+					printf("    - %d: %s<br>%s\n",
+							j,
+							qvspdoc_enumstr_rule_order(j),
+							qvsp_rule_order_desc[j]);
+				}
+				break;
+			default:
+				break;
+		}
+	}
+}
+
+int main(int argc, char **argv)
+{
+	printf("/** @addtogroup vsp_group\n\n");
+	create_cfg_table();
+	create_rule_table();
+	printf(" */\n");
+	return 0;
+}
diff --git a/quantenna/common/doxygen/qtn_doxyfile.pl b/quantenna/common/doxygen/qtn_doxyfile.pl
new file mode 100644
index 0000000..db0fec1
--- /dev/null
+++ b/quantenna/common/doxygen/qtn_doxyfile.pl
@@ -0,0 +1,39 @@
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+use File::Basename;
+use Cwd 'abs_path';
+
+my $script_path = dirname(__FILE__);
+my $checkout_root = abs_path("$script_path/../../");
+
+my $p4rev = `p4 changelists ...\#have | head -1 | awk '{print \$2}'`;
+my $p4client = `p4 info | grep 'Client name' | awk '{print \$NF}'`;
+
+$p4rev =~ s/^\s*(.*?)\s*$/$1/g;
+$p4client =~ s/^\s*(.*?)\s*$/$1/g;
+
+my $project_name = shift @ARGV;
+my $output_path = shift @ARGV;
+
+$output_path =~ s/[^a-z0-9_-]+/_/g;
+$output_path = "$checkout_root/doxygen/$output_path/";
+system("mkdir -p $output_path");
+
+my $project_number = $p4client . "@" . $p4rev;
+
+my $inputs = join(" ", @ARGV);
+
+my $doxyfile = `cat $script_path/Doxyfile_template`;
+$doxyfile =~ s/__PROJECT_NAME__/\"$project_name\"/;
+$doxyfile =~ s/__PROJECT_NUMBER__/$project_number/;
+$doxyfile =~ s/__OUTPUT_DIRECTORY__/$output_path/;
+$doxyfile =~ s/__INPUT__/$inputs/;
+
+warn "$0: PROJECT_NAME     = $project_name\n";
+warn "$0: PROJECT_NUMBER   = $project_number\n";
+warn "$0: OUTPUT_DIRECTORY = $output_path\n";
+warn "$0: INPUT            = $inputs\n";
+
+print $doxyfile;
+
diff --git a/quantenna/common/doxygen/qtn_doxyfile_pdf.pl b/quantenna/common/doxygen/qtn_doxyfile_pdf.pl
new file mode 100644
index 0000000..34af2d2
--- /dev/null
+++ b/quantenna/common/doxygen/qtn_doxyfile_pdf.pl
@@ -0,0 +1,60 @@
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+use File::Basename;
+use Cwd 'abs_path';
+use Getopt::Long;
+
+my $script_path = dirname(__FILE__);
+my $checkout_root = abs_path("$script_path/../../");
+
+#my $p4rev = `p4 changelists ...\#have | head -1 | awk '{print \$2}'`;
+#my $p4client = `p4 info | grep 'Client name' | awk '{print \$NF}'`;
+
+#$p4rev =~ s/^\s*(.*?)\s*$/$1/g;
+#$p4client =~ s/^\s*(.*?)\s*$/$1/g;
+
+my @exclusions;
+my @predefined;
+my $internal = undef;
+
+GetOptions(
+	"exclusions=s"	=> \@exclusions,
+	"predefined=s"	=> \@predefined,
+	"internal"	=> \$internal,
+);
+
+my $doxyfile_name = shift @ARGV;
+my $project_name = shift @ARGV;
+my $output_path = shift @ARGV;
+my $revision = shift @ARGV;
+
+if ($internal) {
+	$internal = "YES";
+} else {
+	$internal = "NO";
+}
+
+$output_path =~ s/[^a-z0-9_-]+/_/g;
+$output_path = "$checkout_root/doxygen/$output_path/";
+system("mkdir -p $output_path");
+
+my $inputs = join(" ", @ARGV);
+
+my $doxyfile = `cat $script_path/$doxyfile_name`;
+$doxyfile =~ s/__PROJECT_NAME__/\"$project_name\"/;
+$doxyfile =~ s/__PROJECT_NUMBER__/\"$revision\"/;
+$doxyfile =~ s/__OUTPUT_DIRECTORY__/$output_path/;
+$doxyfile =~ s/__EXCLUDE_SYMBOLS__/"@exclusions"/e;
+$doxyfile =~ s/__PREDEFINED__/"@predefined"/e;
+$doxyfile =~ s/__INTERNAL_DOCS__/$internal/;
+$doxyfile =~ s/__INPUT__/$inputs/;
+
+warn "$0: PROJECT_NAME     = $project_name\n";
+warn "$0: OUTPUT_DIRECTORY = $output_path\n";
+warn "$0: EXCLUDE_SYMBOLS  = @exclusions\n";
+warn "$0: PREDEFINED       = @predefined\n";
+warn "$0: INPUT            = $inputs\n";
+
+print $doxyfile;
+
diff --git a/quantenna/common/doxygen/watermark.pdf b/quantenna/common/doxygen/watermark.pdf
new file mode 100644
index 0000000..fbb7dd3
--- /dev/null
+++ b/quantenna/common/doxygen/watermark.pdf
Binary files differ
diff --git a/quantenna/common/queue.h b/quantenna/common/queue.h
new file mode 100644
index 0000000..c384592
--- /dev/null
+++ b/quantenna/common/queue.h
@@ -0,0 +1,648 @@
+/*
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: queue.h 1441 2006-02-06 16:03:21Z mrenzmann $
+ */
+
+#ifndef _SYS_QUEUE_H_
+#define	_SYS_QUEUE_H_
+
+#ifdef MUC_BUILD
+#include <stddef.h>
+#endif
+
+/*
+ * This file defines four types of data structures: singly-linked lists,
+ * singly-linked tail queues, lists and tail queues.
+ *
+ * A singly-linked list is headed by a single forward pointer. The elements
+ * are singly linked for minimum space and pointer manipulation overhead at
+ * the expense of O(n) removal for arbitrary elements. New elements can be
+ * added to the list after an existing element or at the head of the list.
+ * Elements being removed from the head of the list should use the explicit
+ * macro for this purpose for optimum efficiency. A singly-linked list may
+ * only be traversed in the forward direction.  Singly-linked lists are ideal
+ * for applications with large datasets and few or no removals or for
+ * implementing a LIFO queue.
+ *
+ * A singly-linked tail queue is headed by a pair of pointers, one to the
+ * head of the list and the other to the tail of the list. The elements are
+ * singly linked for minimum space and pointer manipulation overhead at the
+ * expense of O(n) removal for arbitrary elements. New elements can be added
+ * to the list after an existing element, at the head of the list, or at the
+ * end of the list. Elements being removed from the head of the tail queue
+ * should use the explicit macro for this purpose for optimum efficiency.
+ * A singly-linked tail queue may only be traversed in the forward direction.
+ * Singly-linked tail queues are ideal for applications with large datasets
+ * and few or no removals or for implementing a FIFO queue.
+ *
+ * A list is headed by a single forward pointer (or an array of forward
+ * pointers for a hash table header). The elements are doubly linked
+ * so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before
+ * or after an existing element or at the head of the list. A list
+ * may only be traversed in the forward direction.
+ *
+ * A tail queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or
+ * after an existing element, at the head of the list, or at the end of
+ * the list. A tail queue may be traversed in either direction.
+ *
+ * For details on the use of these macros, see the queue(3) manual page.
+ *
+ *
+ *				SLIST	LIST	STAILQ	TAILQ
+ * _HEAD			+	+	+	+
+ * _HEAD_INITIALIZER		+	+	+	+
+ * _ENTRY			+	+	+	+
+ * _INIT			+	+	+	+
+ * _EMPTY			+	+	+	+
+ * _FIRST			+	+	+	+
+ * _NEXT			+	+	+	+
+ * _PREV			-	-	-	+
+ * _LAST			-	-	+	+
+ * _FOREACH			+	+	+	+
+ * _FOREACH_SAFE		+	+	+	+
+ * _FOREACH_REVERSE		-	-	-	+
+ * _FOREACH_REVERSE_SAFE	-	-	-	+
+ * _INSERT_HEAD			+	+	+	+
+ * _INSERT_BEFORE		-	+	-	+
+ * _INSERT_AFTER		+	+	+	+
+ * _INSERT_TAIL			-	-	+	+
+ * _CONCAT			-	-	+	+
+ * _REMOVE_HEAD			+	-	+	-
+ * _REMOVE			+	+	+	+
+ *
+ */
+
+#ifdef MUC_BUILD
+# define QUEUE_MACRO_LOCK_DEBUG	0
+#else
+# define QUEUE_MACRO_LOCK_DEBUG	0
+#endif
+
+/*
+ * Additional fields to try and locate unprotected accesses of fields.
+ * These macros provide hooks to a function which is checked when the
+ * various queue macros are 
+ */
+#if QUEUE_MACRO_LOCK_DEBUG
+# define QUEUE_MACRO_LOCK_FIELD(prefix)					\
+		int prefix##lockcontext;
+
+# define QUEUE_MACRO_LOCK_INIT(prefix, x)	(x)->prefix##lockcontext = 0
+struct os_spinlock;
+int queue_debug_muc_context_check(int* context, const char* file, const int line);
+# define MUC_CONTEXT_CHECK_IN_INTERRUPT		0x00000001
+# define MUC_CONTEXT_CHECK_NOT_IN_INTERRUPT	0x00000002
+# define MUC_CONTEXT_CHECK(context)		queue_debug_muc_context_check(&(context), __FILE__, __LINE__)
+# define QUEUE_MACRO_LOCK_ASSERT(context)	MUC_CONTEXT_CHECK(context)
+#elif defined(SYSTEM_BUILD)
+# define QUEUE_MACRO_LOCK_FIELD(prefix)	int dummy
+# define QUEUE_MACRO_LOCK_INIT(prefix, x)	int dummy
+# define QUEUE_MACRO_LOCK_ASSERT(context)	__queue_macro_lock_assert_noop()
+static __inline int __queue_macro_lock_assert_noop(void) {
+	return 1;
+}
+#else
+# define QUEUE_MACRO_LOCK_FIELD(prefix)
+# define QUEUE_MACRO_LOCK_INIT(prefix, x)
+# define QUEUE_MACRO_LOCK_ASSERT(context)	__queue_macro_lock_assert_noop()
+static __inline__ int __queue_macro_lock_assert_noop(void) {
+	return 1;
+}
+#endif
+
+#define	QUEUE_MACRO_DEBUG 0
+#if QUEUE_MACRO_DEBUG
+/* Store the last 2 places the queue element or head was altered */
+struct qm_trace {
+	char *lastfile;
+	int lastline;
+	char *prevfile;
+	int prevline;
+};
+
+#define	TRACEBUF	struct qm_trace trace;
+#define	TRASHIT(x)	do {(x) = (void *)-1;} while (0)
+
+#define	QMD_TRACE_HEAD(head) do {					\
+	(head)->trace.prevline = (head)->trace.lastline;		\
+	(head)->trace.prevfile = (head)->trace.lastfile;		\
+	(head)->trace.lastline = __LINE__;				\
+	(head)->trace.lastfile = __FILE__;				\
+} while (0)
+
+#define	QMD_TRACE_ELEM(elem) do {					\
+	(elem)->trace.prevline = (elem)->trace.lastline;		\
+	(elem)->trace.prevfile = (elem)->trace.lastfile;		\
+	(elem)->trace.lastline = __LINE__;				\
+	(elem)->trace.lastfile = __FILE__;				\
+} while (0)
+
+#else
+#define	QMD_TRACE_ELEM(elem)
+#define	QMD_TRACE_HEAD(head)
+#define	TRACEBUF
+#define	TRASHIT(x)
+#endif	/* QUEUE_MACRO_DEBUG */
+
+/*
+ * Singly-linked List declarations.
+ */
+#define	SLIST_HEAD(name, type)						\
+struct name {								\
+	struct type *slh_first;	/* first element */			\
+	QUEUE_MACRO_LOCK_FIELD(slh_);					\
+}
+
+#define	SLIST_HEAD_INITIALIZER(head)					\
+	{ NULL }
+
+#define	SLIST_ENTRY(type)						\
+struct {								\
+	struct type *sle_next;	/* next element */			\
+}
+
+#define SLIST_LOCK_ASSERT(head)		\
+	QUEUE_MACRO_LOCK_ASSERT((head)->slh_lockcontext)
+
+/*
+ * Singly-linked List functions.
+ */
+#define	SLIST_EMPTY(head)	((head)->slh_first == NULL)
+
+#define	SLIST_FIRST(head)	((head)->slh_first)
+
+#define	SLIST_FOREACH(var, head, field)					\
+	for ((var) = SLIST_FIRST((head));				\
+	    SLIST_LOCK_ASSERT((head)) && (var);				\
+	    (var) = SLIST_NEXT((var), field))
+
+#define	SLIST_FOREACH_SAFE(var, head, field, tvar)			\
+	for ((var) = SLIST_FIRST((head));				\
+	    SLIST_LOCK_ASSERT((head)) &&				\
+	    (var) && ((tvar) = SLIST_NEXT((var), field), 1);		\
+	    (var) = (tvar))
+
+#define	SLIST_FOREACH_PREVPTR(var, varp, head, field)			\
+	for ((varp) = &SLIST_FIRST((head));				\
+	    SLIST_LOCK_ASSERT((head)) &&				\
+	    ((var) = *(varp)) != NULL;					\
+	    (varp) = &SLIST_NEXT((var), field))
+
+#define	SLIST_INIT(head) do {						\
+	SLIST_FIRST((head)) = NULL;					\
+} while (0)
+
+#define	SLIST_INSERT_AFTER(slistelm, elm, field) do {			\
+	SLIST_LOCK_ASSERT((head));					\
+	SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field);	\
+	SLIST_NEXT((slistelm), field) = (elm);				\
+} while (0)
+
+#define	SLIST_INSERT_HEAD(head, elm, field) do {			\
+	SLIST_LOCK_ASSERT((head));					\
+	SLIST_NEXT((elm), field) = SLIST_FIRST((head));			\
+	SLIST_FIRST((head)) = (elm);					\
+} while (0)
+
+#define	SLIST_NEXT(elm, field)	((elm)->field.sle_next)
+
+#define	SLIST_REMOVE(head, elm, type, field) do {			\
+	SLIST_LOCK_ASSERT((head));					\
+	if (SLIST_FIRST((head)) == (elm)) {				\
+		SLIST_REMOVE_HEAD((head), field);			\
+	}								\
+	else {								\
+		struct type *curelm = SLIST_FIRST((head));		\
+		while (SLIST_NEXT(curelm, field) != (elm))		\
+			curelm = SLIST_NEXT(curelm, field);		\
+		SLIST_NEXT(curelm, field) =				\
+		    SLIST_NEXT(SLIST_NEXT(curelm, field), field);	\
+	}								\
+} while (0)
+
+#define	SLIST_REMOVE_HEAD(head, field) do {				\
+	SLIST_LOCK_ASSERT((head));					\
+	SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field);	\
+} while (0)
+
+/*
+ * Singly-linked Tail queue declarations.
+ */
+#define	STAILQ_HEAD(name, type)						\
+struct name {								\
+	struct type *stqh_first;/* first element */			\
+	struct type **stqh_last;/* addr of last next element */		\
+	QUEUE_MACRO_LOCK_FIELD(stqh_);	/* debug locking primitive */	\
+}
+
+#define	STAILQ_HEAD_INITIALIZER(head)					\
+	{ NULL, &(head).stqh_first }
+
+#define	STAILQ_ENTRY(type)						\
+struct {								\
+	struct type *stqe_next;	/* next element */			\
+}
+
+#define STAILQ_LOCK_ASSERT(head)	\
+	QUEUE_MACRO_LOCK_ASSERT((head)->stqh_lockcontext)
+#if QUEUE_MACRO_LOCK_DEBUG
+# define STAILQ_INIT_LOCK_DEBUG(head, lock)	(head)->stqh_lock = lock;
+#else
+# define STAILQ_INIT_LOCK_DEBUG(head, intref)
+#endif
+
+/*
+ * Singly-linked Tail queue functions.
+ */
+#define	STAILQ_CONCAT(head1, head2) do {				\
+	if (!STAILQ_EMPTY((head2))) {					\
+		*(head1)->stqh_last = (head2)->stqh_first;		\
+		(head1)->stqh_last = (head2)->stqh_last;		\
+		STAILQ_INIT((head2));					\
+	}								\
+} while (0)
+
+#define	STAILQ_EMPTY(head)	((head)->stqh_first == NULL)
+
+#define	STAILQ_FIRST(head)	((head)->stqh_first)
+
+#define	STAILQ_FOREACH(var, head, field)				\
+	for((var) = STAILQ_FIRST((head));				\
+	   STAILQ_LOCK_ASSERT((head)) && (var);				\
+	   (var) = STAILQ_NEXT((var), field))
+
+
+#define	STAILQ_FOREACH_SAFE(var, head, field, tvar)			\
+	for ((var) = STAILQ_FIRST((head));				\
+	    STAILQ_LOCK_ASSERT((head)) &&				\
+	    (var) && ((tvar) = STAILQ_NEXT((var), field), 1);		\
+	    (var) = (tvar))
+
+#define	STAILQ_INIT(head) do {						\
+	STAILQ_FIRST((head)) = NULL;					\
+	(head)->stqh_last = &STAILQ_FIRST((head));			\
+	QUEUE_MACRO_LOCK_INIT(stqh_, (head));				\
+} while (0)
+
+#define	STAILQ_INSERT_AFTER(head, tqelm, elm, field) do {		\
+	STAILQ_LOCK_ASSERT(head);					\
+	if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\
+		(head)->stqh_last = &STAILQ_NEXT((elm), field);		\
+	STAILQ_NEXT((tqelm), field) = (elm);				\
+} while (0)
+
+#define	STAILQ_INSERT_HEAD(head, elm, field) do {			\
+	STAILQ_LOCK_ASSERT(head);					\
+	if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL)	\
+		(head)->stqh_last = &STAILQ_NEXT((elm), field);		\
+	STAILQ_FIRST((head)) = (elm);					\
+} while (0)
+
+#define	STAILQ_INSERT_TAIL(head, elm, field) do {			\
+	STAILQ_LOCK_ASSERT(head);					\
+	STAILQ_NEXT((elm), field) = NULL;				\
+	*(head)->stqh_last = (elm);					\
+	(head)->stqh_last = &STAILQ_NEXT((elm), field);			\
+} while (0)
+
+#define	STAILQ_LAST(head, type, field)					\
+	(STAILQ_EMPTY((head)) ?						\
+		NULL :							\
+	        ((struct type *)					\
+		((char *)((head)->stqh_last) - __offsetof(struct type, field))))
+
+#define	STAILQ_NEXT(elm, field)	((elm)->field.stqe_next)
+
+#define	STAILQ_REMOVE(head, elm, type, field) do {			\
+	STAILQ_LOCK_ASSERT(head);					\
+	if (STAILQ_FIRST((head)) == (elm)) {				\
+		STAILQ_REMOVE_HEAD((head), field);			\
+	}								\
+	else {								\
+		struct type *curelm = STAILQ_FIRST((head));		\
+		while (STAILQ_NEXT(curelm, field) != (elm))		\
+			curelm = STAILQ_NEXT(curelm, field);		\
+		if ((STAILQ_NEXT(curelm, field) =			\
+		     STAILQ_NEXT(STAILQ_NEXT(curelm, field), field)) == NULL)\
+			(head)->stqh_last = &STAILQ_NEXT((curelm), field);\
+	}								\
+} while (0)
+
+
+#define	STAILQ_REMOVE_AFTER(head, elm, field) do {			\
+	STAILQ_LOCK_ASSERT(head);					\
+	if (STAILQ_NEXT(elm, field)) {		\
+		if ((STAILQ_NEXT(elm, field) =			\
+		    STAILQ_NEXT(STAILQ_NEXT(elm, field), field)) == NULL)\
+			(head)->stqh_last = &STAILQ_NEXT((elm), field); \
+	}								\
+} while (0)
+
+
+#define	STAILQ_REMOVE_HEAD(head, field) do {				\
+	STAILQ_LOCK_ASSERT(head);					\
+	if ((STAILQ_FIRST((head)) =					\
+	     STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL)		\
+		(head)->stqh_last = &STAILQ_FIRST((head));		\
+} while (0)
+
+#define	STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do {			\
+	STAILQ_LOCK_ASSERT(head);					\
+	if ((STAILQ_FIRST((head)) = STAILQ_NEXT((elm), field)) == NULL)	\
+		(head)->stqh_last = &STAILQ_FIRST((head));		\
+} while (0)
+
+/*
+ * List declarations.
+ */
+#define	ATH_LIST_HEAD(name, type)					\
+struct name {								\
+	struct type *lh_first;	/* first element */			\
+	QUEUE_MACRO_LOCK_FIELD(lh_);					\
+}
+
+#define	LIST_HEAD_INITIALIZER(head)					\
+	{ NULL }
+
+#define	LIST_ENTRY(type)						\
+struct {								\
+	struct type *le_next;	/* next element */			\
+	struct type **le_prev;	/* address of previous next element */	\
+}
+
+#define LIST_LOCK_ASSERT(head)	\
+	QUEUE_MACRO_LOCK_ASSERT((head)->lh_lockcontext)
+
+/*
+ * List functions.
+ */
+
+#define	LIST_EMPTY(head)	((head)->lh_first == NULL)
+
+#define	LIST_FIRST(head)	((head)->lh_first)
+
+#define	LIST_FOREACH(var, head, field)					\
+	for ((var) = LIST_FIRST((head));				\
+	    LIST_LOCK_ASSERT((head)) && (var);				\
+	    (var) = LIST_NEXT((var), field))
+
+#define	LIST_FOREACH_SAFE(var, head, field, tvar)			\
+	for ((var) = LIST_FIRST((head));				\
+	    LIST_LOCK_ASSERT((head)) &&					\
+	    (var) && ((tvar) = LIST_NEXT((var), field), 1);		\
+	    (var) = (tvar))
+
+#define	LIST_INIT(head) do {						\
+	LIST_FIRST((head)) = NULL;					\
+} while (0)
+
+#define	LIST_INSERT_AFTER(listelm, elm, field) do {			\
+	if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\
+		LIST_NEXT((listelm), field)->field.le_prev =		\
+		    &LIST_NEXT((elm), field);				\
+	LIST_NEXT((listelm), field) = (elm);				\
+	(elm)->field.le_prev = &LIST_NEXT((listelm), field);		\
+} while (0)
+
+#define	LIST_INSERT_BEFORE(listelm, elm, field) do {			\
+	(elm)->field.le_prev = (listelm)->field.le_prev;		\
+	LIST_NEXT((elm), field) = (listelm);				\
+	*(listelm)->field.le_prev = (elm);				\
+	(listelm)->field.le_prev = &LIST_NEXT((elm), field);		\
+} while (0)
+
+#define	LIST_INSERT_HEAD(head, elm, field) do {				\
+	LIST_LOCK_ASSERT((head));					\
+	if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL)	\
+		LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\
+	LIST_FIRST((head)) = (elm);					\
+	(elm)->field.le_prev = &LIST_FIRST((head));			\
+} while (0)
+
+#define	LIST_NEXT(elm, field)	((elm)->field.le_next)
+
+#define	LIST_REMOVE(elm, field) do {					\
+	if (LIST_NEXT((elm), field) != NULL)				\
+		LIST_NEXT((elm), field)->field.le_prev = 		\
+		    (elm)->field.le_prev;				\
+	*(elm)->field.le_prev = LIST_NEXT((elm), field);		\
+} while (0)
+
+/*
+ * Tail queue declarations.
+ */
+#define	TAILQ_HEAD(name, type)						\
+struct name {								\
+	struct type *tqh_first;	/* first element */			\
+	struct type **tqh_last;	/* addr of last next element */		\
+	TRACEBUF							\
+	QUEUE_MACRO_LOCK_FIELD(tqh_);					\
+}
+
+#define	TAILQ_HEAD_INITIALIZER(head)					\
+	{ NULL, &(head).tqh_first }
+#if (!defined(TAILQ_ENTRY))
+#define	TAILQ_ENTRY(type)						\
+struct {								\
+	struct type *tqe_next;	/* next element */			\
+	struct type **tqe_prev;	/* address of previous next element */	\
+	TRACEBUF							\
+}
+#endif
+
+#define TAILQ_LOCK_ASSERT(head)	\
+	QUEUE_MACRO_LOCK_ASSERT((head)->tqh_lockcontext)
+
+/*
+ * Tail queue functions.
+ */
+#define	TAILQ_CONCAT(head1, head2, field) do {				\
+	if (!TAILQ_EMPTY(head2)) {					\
+		*(head1)->tqh_last = (head2)->tqh_first;		\
+		(head2)->tqh_first->field.tqe_prev = (head1)->tqh_last;	\
+		(head1)->tqh_last = (head2)->tqh_last;			\
+		TAILQ_INIT((head2));					\
+		QMD_TRACE_HEAD(head);					\
+		QMD_TRACE_HEAD(head2);					\
+	}								\
+} while (0)
+
+#define	TAILQ_EMPTY(head)	((head)->tqh_first == NULL)
+
+#define	TAILQ_FIRST(head)	((head)->tqh_first)
+
+#define	TAILQ_FOREACH(var, head, field)					\
+	for ((var) = TAILQ_FIRST((head));				\
+	    TAILQ_LOCK_ASSERT((head)) && (var);				\
+	    (var) = TAILQ_NEXT((var), field))
+
+#define	TAILQ_FOREACH_SAFE(var, head, field, tvar)			\
+	for ((var) = TAILQ_FIRST((head));				\
+	    TAILQ_LOCK_ASSERT((head)) &&				\
+	    (var) && ((tvar) = TAILQ_NEXT((var), field), 1);		\
+	    (var) = (tvar))
+
+#define	TAILQ_FOREACH_REVERSE(var, head, headname, field)		\
+	for ((var) = TAILQ_LAST((head), headname);			\
+	    TAILQ_LOCK_ASSERT((head)) && (var);				\
+	    (var) = TAILQ_PREV((var), headname, field))
+
+#define	TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar)	\
+	for ((var) = TAILQ_LAST((head), headname);			\
+	    TAILQ_LOCK_ASSERT((head)) &&				\
+	    (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1);	\
+	    (var) = (tvar))
+
+#define	TAILQ_INIT(head) do {						\
+	TAILQ_FIRST((head)) = NULL;					\
+	(head)->tqh_last = &TAILQ_FIRST((head));			\
+	QMD_TRACE_HEAD(head);						\
+} while (0)
+
+#define	TAILQ_INSERT_AFTER(head, listelm, elm, field) do {		\
+	TAILQ_LOCK_ASSERT((head));					\
+	if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\
+		TAILQ_NEXT((elm), field)->field.tqe_prev =		\
+		    &TAILQ_NEXT((elm), field);				\
+	else {								\
+		(head)->tqh_last = &TAILQ_NEXT((elm), field);		\
+		QMD_TRACE_HEAD(head);					\
+	}								\
+	TAILQ_NEXT((listelm), field) = (elm);				\
+	(elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field);		\
+	QMD_TRACE_ELEM(&(elm)->field);					\
+	QMD_TRACE_ELEM(&listelm->field);				\
+} while (0)
+
+#define	TAILQ_INSERT_BEFORE(listelm, elm, field) do {			\
+	(elm)->field.tqe_prev = (listelm)->field.tqe_prev;		\
+	TAILQ_NEXT((elm), field) = (listelm);				\
+	*(listelm)->field.tqe_prev = (elm);				\
+	(listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field);		\
+	QMD_TRACE_ELEM(&(elm)->field);					\
+	QMD_TRACE_ELEM(&listelm->field);				\
+} while (0)
+
+#define	TAILQ_INSERT_HEAD(head, elm, field) do {			\
+	TAILQ_LOCK_ASSERT((head));					\
+	if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL)	\
+		TAILQ_FIRST((head))->field.tqe_prev =			\
+		    &TAILQ_NEXT((elm), field);				\
+	else								\
+		(head)->tqh_last = &TAILQ_NEXT((elm), field);		\
+	TAILQ_FIRST((head)) = (elm);					\
+	(elm)->field.tqe_prev = &TAILQ_FIRST((head));			\
+	QMD_TRACE_HEAD(head);						\
+	QMD_TRACE_ELEM(&(elm)->field);					\
+} while (0)
+
+#define	TAILQ_INSERT_TAIL(head, elm, field) do {			\
+	TAILQ_LOCK_ASSERT((head));					\
+	TAILQ_NEXT((elm), field) = NULL;				\
+	(elm)->field.tqe_prev = (head)->tqh_last;			\
+	*(head)->tqh_last = (elm);					\
+	(head)->tqh_last = &TAILQ_NEXT((elm), field);			\
+	QMD_TRACE_HEAD(head);						\
+	QMD_TRACE_ELEM(&(elm)->field);					\
+} while (0)
+
+#define	TAILQ_LAST(head, headname)					\
+	(*(((struct headname *)((head)->tqh_last))->tqh_last))
+
+#define	TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
+
+#define	TAILQ_PREV(elm, headname, field)				\
+	(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
+
+#define	TAILQ_REMOVE(head, elm, field) do {				\
+	TAILQ_LOCK_ASSERT((head));					\
+	if ((TAILQ_NEXT((elm), field)) != NULL)				\
+		TAILQ_NEXT((elm), field)->field.tqe_prev =		\
+		    (elm)->field.tqe_prev;				\
+	else {								\
+		(head)->tqh_last = (elm)->field.tqe_prev;		\
+		QMD_TRACE_HEAD(head);					\
+	}								\
+	*(elm)->field.tqe_prev = TAILQ_NEXT((elm), field);		\
+	TRASHIT((elm)->field.tqe_next);					\
+	TRASHIT((elm)->field.tqe_prev);					\
+	QMD_TRACE_ELEM(&(elm)->field);					\
+} while (0)
+
+
+#ifdef _KERNEL
+
+/*
+ * XXX insque() and remque() are an old way of handling certain queues.
+ * They bogusly assumes that all queue heads look alike.
+ */
+
+struct quehead {
+	struct quehead *qh_link;
+	struct quehead *qh_rlink;
+};
+
+#if defined(__GNUC__) || defined(__INTEL_COMPILER)
+
+static __inline void
+insque(void *a, void *b)
+{
+	struct quehead *element = (struct quehead *)a,
+		 *head = (struct quehead *)b;
+
+	element->qh_link = head->qh_link;
+	element->qh_rlink = head;
+	head->qh_link = element;
+	element->qh_link->qh_rlink = element;
+}
+
+static __inline void
+remque(void *a)
+{
+	struct quehead *element = (struct quehead *)a;
+
+	element->qh_link->qh_rlink = element->qh_rlink;
+	element->qh_rlink->qh_link = element->qh_link;
+	element->qh_rlink = 0;
+}
+
+#else /* !(__GNUC__ || __INTEL_COMPILER) */
+
+void	insque(void *a, void *b);
+void	remque(void *a);
+
+#endif /* __GNUC__ || __INTEL_COMPILER */
+
+#endif /* _KERNEL */
+
+#endif /* !_SYS_QUEUE_H_ */
diff --git a/quantenna/common/ruby_arasan_emac_ahb.h b/quantenna/common/ruby_arasan_emac_ahb.h
new file mode 100755
index 0000000..2d36410
--- /dev/null
+++ b/quantenna/common/ruby_arasan_emac_ahb.h
@@ -0,0 +1,436 @@
+/*
+ *  drivers/net/arasan_emac_ahb.h
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2007.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef __COMMON_RUBY_ARASAN_EMAC_AHB_H
+#define __COMMON_RUBY_ARASAN_EMAC_AHB_H	1
+
+#ifdef TOPAZ_AMBER_IP
+#include <include/qtn/amber.h>
+#endif
+
+extern __inline__ void __mydelay(unsigned long loops)
+{
+	__asm__ __volatile__ ( "1: \n\t"
+			     "sub.f %0, %1, 1\n\t"
+			     "jpnz 1b"
+			     : "=r" (loops)
+			     : "0" (loops));
+}
+
+/*
+ * Division by multiplication: you don't have to worry about loss of
+ * precision.
+ *
+ * Use only for very small delays ( < 1 msec).  Should probably use a
+ * lookup table, really, as the multiplications take much too long with
+ * short delays.  This is a "reasonable" implementation, though (and the
+ * first constant multiplications gets optimized away if the delay is
+ * a constant)
+ */
+static inline void __const_myudelay(unsigned long xloops)
+{
+	__asm__ ("mpyhu %0, %1, %2"
+		 : "=r" (xloops)
+		 : "r" (xloops), "r" (1<<20));	/* Number derived from loops per jiffy */
+	__mydelay(xloops * 100);		/* Jiffies per sec */
+}
+
+static inline void __myudelay(unsigned long usecs)
+{
+	__const_myudelay(usecs * 4295);	/* 2**32 / 1000000 */
+}
+#ifndef MAX_UDELAY_MS
+#define MAX_UDELAY_MS	5
+#endif
+
+#ifndef mydelay
+#define mydelay(n) (\
+	(__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? __myudelay((n)*1000) : \
+	({unsigned long __ms=(n); while (__ms--) __myudelay(1000);}))
+#endif
+
+#define		DELAY_40MILLISEC	(40)
+#define		DELAY_50MILLISEC	(50)
+
+/* Arasan Gigabit AHB controller register offsets */
+#define EMAC_DMA_CONFIG			0x0000
+#define EMAC_DMA_CTRL			0x0004
+#define EMAC_DMA_STATUS_IRQ		0x0008
+#define EMAC_DMA_INT_ENABLE		0x000C
+#define EMAC_DMA_TX_AUTO_POLL		0x0010
+#define EMAC_DMA_TX_POLL_DEMAND		0x0014
+#define EMAC_DMA_RX_POLL_DEMAND		0x0018
+#define EMAC_DMA_TX_BASE_ADDR		0x001C
+#define EMAC_DMA_RX_BASE_ADDR		0x0020
+#define EMAC_DMA_MISSED_FRAMES		0x0024
+#define EMAC_DMA_STOP_FLUSHES		0x0028
+#define EMAC_DMA_RX_IRQ_MITIGATION	0x002C
+#define EMAC_DMA_CUR_TXDESC_PTR		0x0030
+#define EMAC_DMA_CUR_TXBUF_PTR		0x0034
+#define EMAC_DMA_CUR_RXDESC_PTR		0x0038
+#define EMAC_DMA_CUR_RXBUF_PTR		0x003C
+
+#define EMAC_MAC_GLOBAL_CTRL		0x0100
+#define EMAC_MAC_TX_CTRL		0x0104
+#define EMAC_MAC_RX_CTRL		0x0108
+#define EMAC_MAC_MAX_FRAME_SIZE		0x010C
+#define EMAC_MAC_TX_JABBER_SIZE		0x0110
+#define EMAC_MAC_RX_JABBER_SIZE		0x0114
+#define EMAC_MAC_ADDR_CTRL		0x0118
+#define EMAC_MAC_ADDR1_HIGH		0x0120
+#define EMAC_MAC_ADDR1_MED		0x0124
+#define EMAC_MAC_ADDR1_LOW		0x0128
+#define EMAC_MAC_ADDR2_HIGH		0x012C
+#define EMAC_MAC_ADDR2_MED		0x0130
+#define EMAC_MAC_ADDR2_LOW		0x0134
+#define EMAC_MAC_ADDR3_HIGH		0x0138
+#define EMAC_MAC_ADDR3_MED		0x013C
+#define EMAC_MAC_ADDR3_LOW		0x0140
+#define EMAC_MAC_ADDR4_HIGH		0x0144
+#define EMAC_MAC_ADDR4_MED		0x0148
+#define EMAC_MAC_ADDR4_LOW		0x014C
+#define EMAC_MAC_TABLE1			0x0150
+#define EMAC_MAC_TABLE2			0x0154
+#define EMAC_MAC_TABLE3			0x0158
+#define EMAC_MAC_TABLE4			0x015C
+#define EMAC_MAC_FLOW_CTRL		0x0160
+#define EMAC_MAC_FLOW_PAUSE_GENERATE	0x0164
+#define EMAC_MAC_FLOW_SA_HIGH		0x0168
+#define EMAC_MAC_FLOW_SA_MED		0x016C
+#define EMAC_MAC_FLOW_SA_LOW		0x0170
+#define EMAC_MAC_FLOW_DA_HIGH		0x0174
+#define EMAC_MAC_FLOW_DA_MED		0x0178
+#define EMAC_MAC_FLOW_DA_LOW		0x017C
+#define EMAC_MAC_FLOW_PAUSE_TIMEVAL	0x0180
+#define EMAC_MAC_MDIO_CTRL		0x01A0
+#define EMAC_MAC_MDIO_DATA		0x01A4
+#define EMAC_MAC_RXSTAT_CTRL		0x01A8
+#define EMAC_MAC_RXSTAT_DATA_HIGH	0x01AC
+#define EMAC_MAC_RXSTAT_DATA_LOW	0x01B0
+#define EMAC_MAC_TXSTAT_CTRL		0x01B4
+#define EMAC_MAC_TXSTAT_DATA_HIGH	0x01B8
+#define EMAC_MAC_TXSTAT_DATA_LOW	0x01BC
+#define EMAC_MAC_TX_ALMOST_FULL		0x01C0
+#define EMAC_MAC_TX_START_THRESHOLD	0x01C4
+#define EMAC_MAC_RX_START_THRESHOLD	0x01C8
+#define EMAC_MAC_INT			0x01E0
+#define EMAC_MAC_INT_ENABLE		0x01E4
+
+#ifndef __ASSEMBLY__
+
+/* Common structure for tx and rx descriptors */
+struct emac_desc {
+	volatile u32 status;
+	volatile u32 control;
+	volatile u32 bufaddr1;
+	volatile u32 bufaddr2;
+};
+
+enum DmaRxDesc {
+	/* status field */
+	RxDescOwn = (1 << 31),
+	RxDescFirstDesc = (1 << 30),
+	RxDescLastDesc = (1 << 29),
+	RxDescStatusLenErr = (1 << 23),
+	RxDescStatusJabberErr = (1 << 22),
+	RxDescStatusMaxLenErr = (1 << 21),
+	RxDescStatusCRCErr = (1 << 20),
+	RxDescStatusRuntFrame = (1 << 15),
+	RxDescStatusAlignErr = (1 << 14),
+	RxDescStatusShift = 14,
+	RxDescStatusMask = 0x7fff,
+	RxDescFrameLenShift = 0,
+	RxDescFrameLenMask = 0x3fff,
+	/* control field */
+	RxDescEndOfRing = (1 << 26),
+	RxDescChain2ndAddr = (1 << 25),
+	RxDescBuf2SizeShift = 12,
+	RxDescBuf2SizeMask = 0xfff,
+	RxDescBuf1SizeShift = 0,
+	RxDescBuf1SizeMask = 0xfff,
+};
+
+enum DmaTxDesc {
+	/* status field */
+	TxDescOwn = (1 << 31),
+	TxDescStatusShift = 0,
+	TxDescStatusMask = 0x8fffffff,
+	/* control field */
+	TxDescIntOnComplete = (1 << 31),
+	TxDescLastSeg = (1 << 30),
+	TxDescFirstSeg = (1 << 29),
+	TxDescCrcDisable = (1 << 28),
+	TxDescPadDisable = (1 << 27),
+	TxDescEndOfRing = (1 << 26),
+	TxDescChain2ndAddr = (1 << 25),
+	TxDescForceEopErr = (1 << 24),
+	TxDescBuf2SizeShift = 12,
+	TxDescBuf2SizeMask = 0xfff,
+	TxDescBuf1SizeShift = 0,
+	TxDescBuf1SizeMask = 0xfff,
+};
+
+enum AraMacRegVals {
+	/* DMA config register */
+	DmaSoftReset = 1,
+	Dma1WordBurst = (0x01 << 1),
+	Dma4WordBurst = (0x04 << 1),
+	Dma16WordBurst = (0x10 << 1),
+	DmaRoundRobin = (1 << 15),
+	DmaWait4Done = (1 << 16),
+	DmaStrictBurst = (1 << 17),
+	Dma64BitMode = (1 << 18),
+	/* DMA control register */
+	DmaStartTx = (1 << 0),
+	DmaStartRx = (1 << 1),
+	/* DMA status/interrupt & interrupt mask registers */
+	DmaTxDone = (1 << 0),
+	DmaNoTxDesc = (1 << 1),
+	DmaTxStopped = (1 << 2),
+	DmaRxDone = (1 << 4),
+	DmaNoRxDesc = (1 << 5),
+	DmaRxStopped = (1 << 6),
+	DmaRxMissedFrame = (1 << 7),
+	DmaMacInterrupt = (1 << 8),
+	DmaAllInts = DmaTxDone | DmaNoTxDesc | DmaTxStopped | DmaRxDone | 
+		DmaNoRxDesc | DmaRxStopped | DmaRxMissedFrame | DmaMacInterrupt,
+	DmaTxStateMask = (7 << 16),
+	DmaTxStateStopped = (0 << 16),
+	DmaTxStateFetchDesc = (1 << 16),
+	DmaTxStateFetchData = (2 << 16),
+	DmaTxStateWaitEOT = (3 << 16),
+	DmaTxStateCloseDesc = (4 << 16),
+	DmaTxStateSuspended = (5 << 16),
+	DmaRxStateMask = (15 << 21),
+	DmaRxStateStopped = (0 << 21),
+	DmaRxStateFetchDesc = (1 << 21),
+	DmaRxStateWaitEOR = (2 << 21),
+	DmaRxStateWaitFrame = (3 << 21),
+	DmaRxStateSuspended = (4 << 21),
+	DmaRxStateCloseDesc = (5 << 21),
+	DmaRxStateFlushBuf = (6 << 21),
+	DmaRxStatePutBuf = (7 << 21),
+	DmaRxStateWaitStatus = (8 << 21),
+	/* MAC global control register */
+	MacSpeed10M = (0 << 0),
+	MacSpeed100M = (1 << 0),
+	MacSpeed1G = (2 << 0),
+	MacSpeedMask = (3 << 0),
+	MacFullDuplex = (1 << 2),
+	MacResetRxStats = (1 << 3),
+	MacResetTxStats = (1 << 4),
+	/* MAC TX control */
+	MacTxEnable = (1 << 0),
+	MacTxInvertFCS = (1 << 1),
+	MacTxDisableFCSInsertion = (1 << 2),
+	MacTxAutoRetry = (1 << 3),
+	MacTxIFG96 = (0 << 4),
+	MacTxIFG64 = (1 << 4),
+	MacTxIFG128 = (2 << 4),
+	MacTxIFG256 = (3 << 4),
+	MacTxPreamble7 = (0 << 6),
+	MacTxPreamble3 = (2 << 6),
+	MacTxPreamble5 = (3 << 6),
+	/* MAC RX control */
+	MacRxEnable = (1 << 0),
+	MacRxStripFCS = (1 << 2),
+	MacRxStoreAndForward = (1 << 3),
+	MacAccountVLANs = (1 << 6),
+	/* MAC address control */
+	MacAddr1Enable = (1 << 0),
+	MacAddr2Enable = (1 << 1),
+	MacAddr3Enable = (1 << 2),
+	MacAddr4Enable = (1 << 3),
+	MacInverseAddr1Enable = (1 << 4),
+	MacInverseAddr2Enable = (1 << 5),
+	MacInverseAddr3Enable = (1 << 6),
+	MacInverseAddr4Enable = (1 << 7),
+	MacPromiscuous = (1 << 8),
+	/* MAC flow control */
+	MacFlowDecodeEnable = (1 << 0),
+	MacFlowGenerationEnable = (1 << 1),
+	MacAutoFlowGenerationEnable = (1 << 2),
+	MacFlowMulticastMode = (1 << 3),
+	MacBlockPauseFrames = (1 << 4),
+	/* MDIO control register values */
+	MacMdioCtrlPhyMask = 0x1f,
+	MacMdioCtrlPhyShift = 0,
+	MacMdioCtrlRegMask = 0x1f,
+	MacMdioCtrlRegShift = 5,
+	MacMdioCtrlRead = (1 << 10),
+	MacMdioCtrlWrite = 0,
+	MacMdioCtrlClkMask = 0x3,
+	MacMdioCtrlClkShift = 11,
+	MacMdioCtrlStart = (1 << 15),
+	/* MDIO data register values */
+	MacMdioDataMask = 0xffff,
+	/* MAC interrupt & interrupt mask values */
+	MacUnderrun = (1 << 0),
+	MacJabber = (1 << 0),
+	/* RX statistics counter control */
+	RxStatReadBusy = (1 << 15),
+	/* TX statistics counter control */
+	TxStatReadBusy = (1 << 15),
+};
+
+enum ArasanTxStatisticsCounters {
+	FramesSentOK = 0,
+	FramesSentTotal = 1,
+	OctetsSentOK = 2,
+	FramesSentError = 3,
+	FramesSentSingleCol = 4,
+	FramesSentMultipleCol = 5,
+	FramesSentLateCol = 6,
+	FramesSentExcessiveCol = 7,
+	FramesSentUnicast = 8,
+	FramesSentMulticast = 9,
+	FramesSentBroadcast = 10,
+	FramesSentPause = 11,
+	TxLastStatCounter = 11,
+};
+
+enum ArasanRxStatisticsCounters {
+	FramesRxOK = 0,
+	FramesRxTotal = 1,
+	FramesRxCrcErr = 2,
+	FramesRxAlignErr = 3,
+	FramesRxErrTotal = 4,
+	OctetsRxOK = 5,
+	OctetsRxTotal = 6,
+	FramesRxUnicast = 7,
+	FramesRxMulticast = 8,
+	FramesRxBroadcast = 9,
+	FramesRxPause = 10,
+	FramesRxLenErr = 11,
+	FramesRxUndersized = 12,
+	FramesRxOversized = 13,
+	FramesRxFragments = 14,
+	FramesRxJabber = 15,
+	FramesRx64bytes = 16,
+	FramesRx65to127bytes = 17,
+	FramesRx128to255bytes = 18,
+	FramesRx256to511bytes = 19,
+	FramesRx512to1023bytes = 20,
+	FramesRx1024to1518bytes = 21,
+	FramesRxOver1518bytes = 22,
+	FramesRxDroppedBufFull = 23,
+	FramesRxTruncatedBufFull = 24,
+	RxLastStatCounter = 24,
+};
+
+extern int mdc_clk_divisor;
+static inline void arasan_initialize_release_reset(uint32_t emac0_cfg,
+		uint32_t emac1_cfg, uint32_t rgmii_timing, uint32_t ext_reset)
+{
+	uint32_t emac_cfg = emac0_cfg | emac1_cfg;
+	unsigned long reset_mask;
+	uint32_t mii_value = 0x481 | ((mdc_clk_divisor & MacMdioCtrlClkMask) << MacMdioCtrlClkShift);
+
+	if (!(emac_cfg & EMAC_IN_USE)) {
+		return;
+	}
+
+	/* both interfaces (if enabled) must use same mii config so we can just or here */
+	writel(RUBY_SYS_CTL_MASK_MII, RUBY_SYS_CTL_MASK);
+	if (emac0_cfg & EMAC_PHY_MII) {
+		writel(RUBY_SYS_CTL_MASK_MII_EMAC0, RUBY_SYS_CTL_CTRL);
+	}
+	if (emac1_cfg & EMAC_PHY_MII) {
+		writel(RUBY_SYS_CTL_MASK_MII_EMAC1, RUBY_SYS_CTL_CTRL);
+	}
+	if (!(emac0_cfg & EMAC_PHY_MII) && !(emac1_cfg & EMAC_PHY_MII)){
+		writel(0, RUBY_SYS_CTL_CTRL);
+	}
+	/* Have PLL clock signal go out */
+	writel_topaz(TOPAZ_SYS_CTL_PLLCLKOUT_EN, RUBY_SYS_CTL_MASK);
+	writel_topaz(TOPAZ_SYS_CTL_PLLCLKOUT_EN, RUBY_SYS_CTL_CTRL);
+
+	/*
+	 * if RGMII mode, we need to configure the clock before we release reset and also
+	 * make sure we actually reset the block
+	 */
+	writel(rgmii_timing, RUBY_SYS_CTL_GMII_CLKDLL);
+
+	/* Release Ethernet busses from reset separately to emacs */
+	reset_mask = RUBY_SYS_CTL_RESET_NETSS | RUBY_SYS_CTL_RESET_IOSS;
+	writel(reset_mask, RUBY_SYS_CTL_CPU_VEC_MASK);
+	writel(reset_mask, RUBY_SYS_CTL_CPU_VEC);
+
+	if (emac1_cfg & EMAC_IN_USE) {
+		/*
+		 * emac1 only or emac0 + emac1 configurations both require emac0
+		 * to be taken out of reset, since both PHYs use a shared mdio bus
+		 * starting from emac0
+		 */
+		reset_mask = RUBY_SYS_CTL_RESET_ENET0 | RUBY_SYS_CTL_RESET_ENET1;
+	} else if (emac0_cfg & EMAC_IN_USE) {
+		reset_mask = RUBY_SYS_CTL_RESET_ENET0;
+	}
+#ifdef TOPAZ_AMBER_IP
+	amber_bus_flush_req(TOPAZ_AMBER_BUS_FLUSH_RGMII);
+#endif
+	if (ext_reset) {
+		reset_mask |= RUBY_SYS_CTL_RESET_EXT;
+	}
+	if (reset_mask && (readl(RUBY_SYS_CTL_CPU_VEC) & reset_mask) != reset_mask) {
+		writel(reset_mask, RUBY_SYS_CTL_CPU_VEC_MASK);
+		if (ext_reset) {
+			writel(RUBY_SYS_CTL_RESET_EXT, RUBY_SYS_CTL_CPU_VEC);
+			mydelay(DELAY_40MILLISEC);
+			reset_mask &= ~RUBY_SYS_CTL_RESET_EXT;
+		}
+		writel(0, RUBY_SYS_CTL_CPU_VEC);
+		mydelay(DELAY_50MILLISEC);
+	}
+	/* Bring the EMAC out of reset */
+	writel(reset_mask, RUBY_SYS_CTL_CPU_VEC_MASK);
+	writel(reset_mask, RUBY_SYS_CTL_CPU_VEC);
+
+	writel(0, RUBY_SYS_CTL_MASK);
+	writel(0, RUBY_SYS_CTL_CPU_VEC_MASK);
+#ifdef TOPAZ_AMBER_IP
+	amber_bus_flush_release(TOPAZ_AMBER_BUS_FLUSH_RGMII);
+#endif
+
+	/*
+	 * Trigger dummy MDIO read to set MDC clock
+	 */
+	writel(mii_value, RUBY_ENET0_BASE_ADDR + EMAC_MAC_MDIO_CTRL);
+
+	/*
+	 * Remove EMAC DMA from soft reset; all other EMAC register
+	 * writes result in bus hang if the EMAC is in soft reset
+	 */
+	if (emac0_cfg & EMAC_IN_USE) {
+		writel(0x0, RUBY_ENET0_BASE_ADDR + EMAC_DMA_CONFIG);
+		writel(0x0, RUBY_ENET0_BASE_ADDR + EMAC_DMA_CTRL);
+	}
+	if (emac1_cfg & EMAC_IN_USE) {
+		writel(0x0, RUBY_ENET1_BASE_ADDR + EMAC_DMA_CONFIG);
+		writel(0x0, RUBY_ENET1_BASE_ADDR + EMAC_DMA_CTRL);
+	}
+
+}
+
+#endif /* __ASSEMBLY__ */
+
+#endif
diff --git a/quantenna/common/ruby_board_cfg.h b/quantenna/common/ruby_board_cfg.h
new file mode 100644
index 0000000..dc5275a
--- /dev/null
+++ b/quantenna/common/ruby_board_cfg.h
@@ -0,0 +1,117 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __RUBY_BOARD_CFG_H
+#define __RUBY_BOARD_CFG_H
+
+#include "ruby_platform.h"
+
+#define	SPI1_NOT_IN_USE			(0)
+#define	SPI1_IN_USE			(BIT(0))
+
+/*
+ * There is a copy named qdpc_pcie_board_cfg_t in qdpc_config.h they must be the same.
+ * The copy is used for Host driver Because the Host driver can't cite to here.
+ */
+typedef struct board_cfg {
+	int bc_board_id;
+	char *bc_name;		/* optional name of cfg */
+	int bc_ddr_type;	/* ID */
+	int bc_ddr_speed;	/* speed in MHz */
+	int bc_ddr_size;	/* in bytes */
+	int bc_emac0;		/* in use? */
+	int bc_emac1;		/* in use? */
+	int bc_phy0_addr;	/* address */
+	int bc_phy1_addr;	/* address */
+	int bc_spi1;		/* in use? */
+	int bc_wifi_hw;		/* WiFi hardware type */
+	int bc_uart1;		/* in use? */
+	int bc_pcie;		/* in use? */
+	int bc_rgmii_timing;	/* special timing value for RGMII */
+} board_cfg_t;
+
+#define BOARD_CFG_STRUCT_NUM_FIELDS	(sizeof(struct board_cfg) / sizeof(int))
+
+/* These are index into cfg array */
+#define BOARD_CFG_ID			(0)
+#define BOARD_CFG_NAME			(1)
+#define BOARD_CFG_DDR_TYPE		(2)
+#define BOARD_CFG_DDR_SPEED		(3)
+#define BOARD_CFG_DDR_SIZE		(4)
+#define BOARD_CFG_EMAC0			(5)
+#define BOARD_CFG_EMAC1			(6)
+#define BOARD_CFG_PHY0_ADDR		(7)
+#define BOARD_CFG_PHY1_ADDR		(8)
+#define BOARD_CFG_SPI1			(9)
+#define BOARD_CFG_WIFI_HW		(10)
+#define BOARD_CFG_UART1			(11)
+#define BOARD_CFG_PCIE			(12)
+#define BOARD_CFG_RGMII_TIMING		(13)
+#define BOARD_CFG_EXT_LNA_GAIN		(14)
+#define BOARD_CFG_TX_ANTENNA_NUM	(15)
+#define BOARD_CFG_FLASH_SIZE		(16)
+#define BOARD_CFG_TX_ANTENNA_GAIN	(17)
+#define BOARD_CFG_EXT_LNA_BYPASS_GAIN	(18)
+#define BOARD_CFG_RFIC			(19)
+#define BOARD_CFG_CALSTATE_VPD		(20)
+
+#define BOARD_CFG_FIELD_NAMES	{	\
+	"bc_board_id",			\
+	"bc_name",			\
+	"bc_ddr_type",			\
+	"bc_ddr_speed",			\
+	"bc_ddr_size",			\
+	"bc_emac0",			\
+	"bc_emac1",			\
+	"bc_phy0_addr",			\
+	"bc_phy1_addr",			\
+	"bc_spi1",			\
+	"bc_wifi_hw",			\
+	"bc_uart1",			\
+	"bc_pcie",			\
+	"bc_rgmii_timing",		\
+	"bc_ext_lna_gain",		\
+	"bc_tx_antenna_num",		\
+	"bc_flash_cfg",			\
+	"bc_tx_antenna_gain",		\
+	"bc_ext_lna_bypass_gain",	\
+	"bc_rfic",			\
+	"bc_tx_power_cal",		\
+}
+
+#define RUBY_BDA_VERSION		0x1000
+#define RUBY_BDA_NAMELEN		32
+
+/*
+ * quantenna board configuration information,
+ * shared between u-boot and linux kernel.
+ */
+typedef struct qtn_board_cfg_info {
+	uint16_t	bda_len;			/* Size of BDA block */
+	uint16_t	bda_version;			/* BDA version */
+	uint8_t		rsvd[36];
+	board_cfg_t	bda_boardcfg;
+	uint32_t	bda_flashsz;
+	char		bda_boardname[RUBY_BDA_NAMELEN];
+} __attribute__ ((packed)) ruby_bda_t;
+
+#endif /* __RUBY_BOARD_CFG_H */
diff --git a/quantenna/common/ruby_board_db.h b/quantenna/common/ruby_board_db.h
new file mode 100644
index 0000000..da7883d
--- /dev/null
+++ b/quantenna/common/ruby_board_db.h
@@ -0,0 +1,1169 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef _RUBY_BOARD_DB_
+#define _RUBY_BOARD_DB_
+
+#include "ruby_platform.h"
+
+#ifdef UBOOT_BOARD_AUTOCONFIG
+/*
+ * UBoot dynamic board config
+ * Placed here to allow for simplified maintenence
+ */
+struct ruby_cfgstr_map {
+	const char *name;
+	const int val;
+};
+#define CFGSTR(x)	{ #x, (x) }
+
+struct ruby_board_param {
+	const struct ruby_cfgstr_map * const p_map;
+	const uint32_t p_index;
+};
+
+const struct ruby_cfgstr_map g_cfgstr_board_id_cfg[] = {
+	{ "UNIVERSAL_ID", QTN_RUBY_UNIVERSAL_BOARD_ID },
+	{ 0 , 0 }
+};
+
+/* Board name */
+static const struct ruby_cfgstr_map g_cfgstr_name_cfg[] = {
+	{ "hw_QTN_test", 0 },
+	{ 0 , 0 }
+};
+
+/* DDR Configuration strings */
+/* DDR Type */
+static const struct ruby_cfgstr_map g_cfgstr_ddr_cfg[] = {
+	CFGSTR(DDR_16_ETRON),
+	CFGSTR(DDR_32_MICRON),
+	CFGSTR(DDR_16_MICRON),
+	CFGSTR(DDR_32_ETRON),
+	CFGSTR(DDR_32_SAMSUNG),
+	CFGSTR(DDR_16_SAMSUNG),
+	CFGSTR(DDR_16_HYNIX),
+	CFGSTR(DDR3_16_WINBOND),
+	CFGSTR(DDR3_32_WINBOND),
+	CFGSTR(DEFAULT_DDR_CFG),
+	{ 0 , 0 }
+};
+
+/* DDR Size */
+static const struct ruby_cfgstr_map g_cfgstr_ddr_size[] = {
+	CFGSTR(DDR_32MB),
+	CFGSTR(DDR_64MB),
+	CFGSTR(DDR_128MB),
+	CFGSTR(DDR_256MB),
+	CFGSTR(DDR_AUTO),
+	CFGSTR(DEFAULT_DDR_SIZE),
+	{ 0 , 0 }
+};
+
+/* DDR Speed */
+static const struct ruby_cfgstr_map g_cfgstr_ddr_speed[] = {
+	CFGSTR(DDR_160),
+	CFGSTR(DDR_250),
+	CFGSTR(DDR_320),
+	CFGSTR(DDR_400),
+	CFGSTR(DDR3_320MHz),
+	CFGSTR(DDR3_400MHz),
+	CFGSTR(DDR3_500MHz),
+	CFGSTR(DDR3_640MHz),
+	CFGSTR(DDR3_800MHz),
+	CFGSTR(DEFAULT_DDR_SPEED),
+	{ 0 , 0 }
+};
+
+/* EMAC configuration strings */
+static const struct ruby_cfgstr_map g_cfgstr_emac_cfg[] = {
+	{ "EMAC_IN_USE", EMAC_IN_USE },
+	{ "EMAC_RGMII_AN", EMAC_IN_USE },
+	{ "EMAC_NOT_IN_USE", EMAC_NOT_IN_USE },
+	{ "EMAC_MII_AN", (EMAC_IN_USE | EMAC_PHY_MII) },
+	{ "EMAC_MII_100M", (EMAC_IN_USE | EMAC_PHY_NOT_IN_USE | EMAC_PHY_MII | EMAC_PHY_FORCE_100MB) },
+	{ "EMAC_MII_100M_PHY", (EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_FORCE_100MB) },
+	{ "EMAC_AR8327_RGMII", (EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE | EMAC_PHY_AR8327) },
+	{ "EMAC_RTL8363S_RGMII", (EMAC_IN_USE |  EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE) },
+	{ "EMAC_RTL8363SB_RGMII_P0", (EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE | EMAC_PHY_RTL8363SB_P0) },
+	{ "EMAC_RTL8363SB_RGMII_P1", (EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE | EMAC_PHY_RTL8363SB_P1) },
+	{ "EMAC_RTL8363SB_RGMII_BONDED", (EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE |
+			EMAC_PHY_RTL8363SB_P0 | EMAC_PHY_RTL8363SB_P1 | EMAC_BONDED) },
+	{ "EMAC_RTL8211E_RGMII", (EMAC_IN_USE |  EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE) },
+	{ "EMAC_88E6071_MII", (EMAC_MV88E6071) },
+	{ "EMAC_B2B_RGMII", (EMAC_IN_USE |  EMAC_PHY_FORCE_100MB | EMAC_PHY_NOT_IN_USE) },
+	{ "EMAC_B2B_RGMII_100M", (EMAC_IN_USE | EMAC_PHY_FORCE_100MB | EMAC_PHY_NOT_IN_USE) },
+	{ "EMAC_B2B_RGMII_1000M", (EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE) },
+	{ "EMAC_AR8236_MII", (EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_FORCE_100MB | EMAC_PHY_NOT_IN_USE | EMAC_PHY_AR8236) },
+	{ "EMAC_MII_GPIO1_RST", (EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_GPIO1_RESET) },
+	{ "EMAC_MII_100M_GPIO13_RST", (EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_GPIO13_RESET | EMAC_PHY_FORCE_100MB) },
+	{ "DEFAULT_EMAC", (EMAC_NOT_IN_USE) },
+	{ 0 , 0 }
+};
+
+
+static const struct ruby_cfgstr_map g_cfgstr_emac_phyaddr[] = {
+	CFGSTR(24),
+	CFGSTR(31),
+	CFGSTR(EMAC_PHY_ADDR_SCAN),
+	{ "EMAC_PHY0_ADDR", 1 },
+	{ "EMAC_PHY1_ADDR", 3 },
+	{ "DEFAULT_PHY_ADDR", EMAC_PHY_ADDR_SCAN },
+	{ 0 , 0 }
+};
+
+/* Wireless PHY */
+static const struct ruby_cfgstr_map g_cfgstr_rfpa_cfg[] = {
+	CFGSTR(QTN_RUBY_BRINGUP_RWPA),
+	CFGSTR(QTN_RUBY_REF_RWPA),
+	CFGSTR(QTN_RUBY_SIGE),
+	CFGSTR(QTN_RUBY_WIFI_NONE),
+	CFGSTR(QTN_TPZ_SE5003L1),
+	CFGSTR(QTN_TPZ_SE5003L1_INV),
+	CFGSTR(QTN_TPZ_SKY85703),
+	CFGSTR(QTN_TPZ_DBS),
+	CFGSTR(QTN_TPZ_SKY85405_BPF840),
+	CFGSTR(QTN_TPZ_DBS),
+	CFGSTR(QTN_TPZ_SE5502L),
+	CFGSTR(QTN_TPZ_SKY85710_NG),
+	CFGSTR(QTN_TPZ_DBS_5591),
+	CFGSTR(QTN_TPZ_DBS_5591),
+	CFGSTR(QTN_TPZ_DBS_NXP_BGU7224_BGU7258),
+	CFGSTR(QTN_TPZ_2_4GHZ_NXP_BGU7224),
+	CFGSTR(QTN_TPZ_5GHZ_NXP_BGU7258),
+	CFGSTR(QTN_TPZ_5GHZ_SKY85728),
+	{ "DEFAULT_WIFI_HW", QTN_RUBY_REF_RWPA },
+	{ 0 , 0 }
+};
+
+/* SPI config */
+static const struct ruby_cfgstr_map g_cfgstr_spi_cfg[] = {
+	CFGSTR(SPI1_IN_USE),
+	CFGSTR(SPI1_NOT_IN_USE),
+	{ 0 , 0 }
+};
+
+/* UART Config */
+static const struct ruby_cfgstr_map g_cfgstr_uart_cfg[] = {
+	CFGSTR(UART1_NOT_IN_USE),
+	CFGSTR(UART1_IN_USE),
+	{ "DEFAULT_UART1", UART1_NOT_IN_USE },
+	{ 0 , 0 }
+};
+
+/* RGMII Timing Config */
+static const struct ruby_cfgstr_map g_cfgstr_rgmii_cfg[] = {
+	{ "RGMII_DEFAULT_S2p7ns_H1p1ns", CONFIG_ARCH_RGMII_DEFAULT },
+	{ "RGMII_S2p4ns_H1p4ns", CONFIG_ARCH_RGMII_DLL_TIMING },
+	{ "RGMII_S1p8ns_H1p9ns", CONFIG_ARCH_RGMII_S1P8NS_H1P9NS },
+	{ "RGMII_P1RX00TX0E", CONFIG_ARCH_RGMII_P1RX00TX0E },
+	{ "RGMII_710F", CONFIG_ARCH_RGMII_710F },
+	{ "RGMII_NODELAY", CONFIG_ARCH_RGMII_NODELAY },
+	{ "DEFAULT_RGMII_TIMING", CONFIG_ARCH_RGMII_DEFAULT },
+	{ 0 , 0 }
+};
+
+
+/* PCIE Config */
+static const struct ruby_cfgstr_map g_cfgstr_pcie_cfg[] = {
+	CFGSTR(PCIE_NOT_IN_USE),
+	CFGSTR(PCIE_ENDPOINT),
+	CFGSTR(PCIE_ROOTCOMPLEX),
+	{ 0 , 0 }
+};
+
+/* Flash config */
+static const struct ruby_cfgstr_map g_cfgstr_flash_cfg[] = {
+	CFGSTR(FLASH_SIZE_JEDEC),
+	CFGSTR(FLASH_32MB),
+	CFGSTR(FLASH_16MB),
+	CFGSTR(FLASH_8MB),
+	CFGSTR(FLASH_4MB),
+	CFGSTR(FLASH_2MB),
+	CFGSTR(DEFAULT_FLASH_SIZE),
+	{ 0 , 0 }
+};
+
+static const struct ruby_cfgstr_map g_cfgstr_tx_antenna_num[] = {
+	{ "TX_ANTENNA_NUM_1", 1 },
+	{ "TX_ANTENNA_NUM_2", 2 },
+	{ "TX_ANTENNA_NUM_3", 3 },
+	{ "TX_ANTENNA_NUM_4", 4 },
+	{ "DEFAULT_TX_ANTENNA_NUM", 4 },
+	{ 0 , 0 }
+};
+
+#define TX_ANTENNA_GAIN_1_1dB	4506
+static const struct ruby_cfgstr_map g_cfgstr_tx_antenna_gain[] = {
+	CFGSTR(TX_ANTENNA_GAIN_1_1dB),
+	{ "DEFAULT_TX_ANTENNA_GAIN", TX_ANTENNA_GAIN_1_1dB },
+	{ 0 , 0 }
+};
+
+#define LNA_gain_12dB		12
+static const struct ruby_cfgstr_map g_cfgstr_ext_lna_gain[] = {
+	CFGSTR(LNA_gain_12dB),
+	{ "DEFAULT_EXT_LNA_GAIN", LNA_gain_12dB },
+	{ 0 , 0 }
+};
+
+#define LNA_gain_BYPASS_N5dB	-5
+static const struct ruby_cfgstr_map g_cfgstr_ext_lna_bypass_gain[] = {
+	CFGSTR(LNA_gain_BYPASS_N5dB),
+	{ "DEFAULT_EXT_LNA_BYPASS_GAIN", LNA_gain_BYPASS_N5dB },
+	{ 0 , 0 }
+};
+
+#define RFIC_NOT_IN_USE		0
+#define RFIC_V4_IN_USE		4
+#define RFIC_V6_IN_USE		6
+static const struct ruby_cfgstr_map g_cfgstr_rfic[] = {
+	CFGSTR(RFIC_NOT_IN_USE),
+	CFGSTR(RFIC_V4_IN_USE),
+	CFGSTR(RFIC_V6_IN_USE),
+	{ "DEFAULT_RFIC", RFIC_V4_IN_USE },
+	{ 0 , 0 }
+};
+
+#define CALSTATE_VPD_LOG	0
+#define CALSTATE_VPD_LINEAR	1
+static const struct ruby_cfgstr_map g_cfgstr_txpow_cal[] = {
+	CFGSTR(CALSTATE_VPD_LOG),
+	CFGSTR(CALSTATE_VPD_LINEAR),
+	{ "DEFAULT_CALSTATE_VPD", CALSTATE_VPD_LOG },
+	{ 0 , 0 }
+};
+
+static const struct ruby_board_param g_custom_board_params[] = {
+	{ g_cfgstr_board_id_cfg, BOARD_CFG_ID },
+	{ g_cfgstr_name_cfg, BOARD_CFG_NAME },
+	{ g_cfgstr_ddr_cfg, BOARD_CFG_DDR_TYPE },
+	{ g_cfgstr_ddr_speed, BOARD_CFG_DDR_SPEED },
+	{ g_cfgstr_ddr_size, BOARD_CFG_DDR_SIZE },
+	{ g_cfgstr_emac_cfg, BOARD_CFG_EMAC0 },
+	{ g_cfgstr_emac_cfg, BOARD_CFG_EMAC1 },
+	{ g_cfgstr_emac_phyaddr, BOARD_CFG_PHY0_ADDR },
+	{ g_cfgstr_emac_phyaddr, BOARD_CFG_PHY1_ADDR },
+	{ g_cfgstr_rfpa_cfg, BOARD_CFG_WIFI_HW },
+	{ g_cfgstr_spi_cfg, BOARD_CFG_SPI1 },
+	{ g_cfgstr_uart_cfg, BOARD_CFG_UART1 },
+	{ g_cfgstr_rgmii_cfg, BOARD_CFG_RGMII_TIMING },
+	{ g_cfgstr_pcie_cfg, BOARD_CFG_PCIE },
+	{ g_cfgstr_flash_cfg, BOARD_CFG_FLASH_SIZE },
+	{ g_cfgstr_tx_antenna_num, BOARD_CFG_TX_ANTENNA_NUM },
+	{ g_cfgstr_tx_antenna_gain, BOARD_CFG_TX_ANTENNA_GAIN },
+	{ g_cfgstr_ext_lna_gain, BOARD_CFG_EXT_LNA_GAIN },
+	{ g_cfgstr_ext_lna_bypass_gain, BOARD_CFG_EXT_LNA_BYPASS_GAIN },
+	{ g_cfgstr_rfic, BOARD_CFG_RFIC },
+	{ g_cfgstr_txpow_cal, BOARD_CFG_CALSTATE_VPD },
+	{0, 0 }
+};
+
+static board_cfg_t g_custom_board_cfg = {
+	.bc_board_id	= QTN_RUBY_AUTOCONFIG_ID,
+	.bc_name	= "Autoconfigured board",
+	.bc_ddr_type	= DEFAULT_DDR_CFG,
+	.bc_ddr_speed	= DEFAULT_DDR_SPEED,
+	.bc_ddr_size	= DDR_AUTO,
+	.bc_emac0	= EMAC_NOT_IN_USE,
+	.bc_emac1	= EMAC_NOT_IN_USE,
+	.bc_spi1	= SPI1_NOT_IN_USE,
+	.bc_wifi_hw	= QTN_RUBY_WIFI_NONE,
+	.bc_uart1	= UART1_NOT_IN_USE,
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,
+};
+
+#endif
+
+
+#define QTN_BOARD_DB					{		\
+	{ /* 0 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD,			\
+	.bc_name	= "micron32-160, emac0-24, pa0",		\
+	.bc_ddr_type	= DDR_32_MICRON,				\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_32_320,		\
+	.bc_name	= "micron32-250, emac0-24, pa0",		\
+	.bc_ddr_type	= DDR_32_MICRON,				\
+	.bc_ddr_speed	= DDR_250,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 2 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_16_320,		\
+	.bc_name	= "micron16-250, emac0-24, pa0",		\
+	.bc_ddr_type	= DDR_16_MICRON,				\
+	.bc_ddr_speed	= DDR_250,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 3 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_16_160,		\
+	.bc_name	= "micron16-160, emac0-24, pa0",		\
+	.bc_ddr_type	= DDR_16_MICRON,				\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 4 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_ETRON,			\
+	.bc_name	= "etron16-250, emac0-24, pa0",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_250,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 5 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_ETRON_320,		\
+	.bc_name	= "etron16-320, emac0-24, pa0",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_320,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 6 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_ETRON_160,		\
+	.bc_name	= "etron16-160, emac0-24, pa0",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 7 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_16_200,		\
+	.bc_name	= "micron16-200, emac0-24, pa0",		\
+	.bc_ddr_type	= DDR_16_MICRON,				\
+	.bc_ddr_speed	= DDR_200,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 8 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_32_200,		\
+	.bc_name	= "micron32-200, emac0-24, pa0",		\
+	.bc_ddr_type	= DDR_32_MICRON,				\
+	.bc_ddr_speed	= DDR_200,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 9 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_PCIE,			\
+	.bc_name	= "etron16-160, pcie, pa2, phy loopbk",		\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_pcie	= PCIE_IN_USE | PCIE_USE_PHY_LOOPBK,		\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{								\
+	/* test arbitration settings */					\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_32_160_ARB,		\
+	.bc_name	= "micron32-160, emac0-24, pa0, arb",		\
+	.bc_ddr_type	= DDR_32_MICRON,				\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{								\
+	/* test emac1 */						\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_32_160_ARB_1,		\
+	.bc_name	= "micron32-160, emac1-31, pa0, arb",		\
+	.bc_ddr_type	= DDR_32_MICRON,				\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_phy1_addr	= 31,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{	/* 12 - arb, 16bit emac1 */				\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_16_160_ARB_1,		\
+	.bc_name	= "micron16-160, emac1-31, pa0, arb",		\
+	.bc_ddr_type	= DDR_16_MICRON,				\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= 31,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{	/* 13 - arb, 16bit emac1 */				\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_32_160_ARB_0,		\
+	.bc_name	= "micron16-160, emac0-24, pa0, arb",		\
+	.bc_ddr_type	= DDR_16_MICRON,				\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{	/* 14 */						\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_ETRON_160_EMAC1,	\
+	.bc_name	= "etron16-160, emac0-24, pa0",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 15 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_ETRON_250_EMAC1,	\
+	.bc_name	= "etron16-250, emac1-31, pa0",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_250,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_phy1_addr	= 31,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 16 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_ETRON_32_320_EMAC1,	\
+	.bc_name	= "etron32-320, emac1-31, pa0",			\
+	.bc_ddr_type	= DDR_32_ETRON,					\
+	.bc_ddr_speed	= DDR_320,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_phy1_addr	= 31,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 17 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_ETRON32_160,			\
+	.bc_name	= "etron32-160, emac0-24, pa0",			\
+	.bc_ddr_type	= DDR_32_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_pcie	= PCIE_IN_USE | PCIE_USE_PHY_LOOPBK,		\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 18 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_ETRON32_320,			\
+	.bc_name	= "etron32-250, emac0-24, pa0",			\
+	.bc_ddr_type	= DDR_32_ETRON,					\
+	.bc_ddr_speed	= DDR_320,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_pcie	= PCIE_IN_USE | PCIE_USE_PHY_LOOPBK,		\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 19 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_MICRON_DUALEMAC,	\
+	.bc_name	= "micron32-160, emac0, emac1, pa0",		\
+	.bc_ddr_type	= DDR_32_MICRON,				\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy0_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 20 */							\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_MICRON_DUALEMAC_MII,	\
+	.bc_name	= "micron32-160, emac0-mii-100, emac1-mii-100, pa0",	\
+	.bc_ddr_type	= DDR_32_MICRON,				\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_FORCE_100MB,	\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_FORCE_100MB,	\
+	.bc_phy0_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,			\
+	.bc_uart1	= UART1_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{								\
+	/* 21 Bringup board with dual EMAC loopback */			\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_MICRON_DUALEMAC_LOOPBACK,		\
+	.bc_name	= "micron16-160, pcie, emac0, emac1, pa0, phy loopback",	\
+	.bc_ddr_type	= DDR_16_MICRON,				\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_128MB,				\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_phy1_addr	= 31,						\
+	.bc_phy0_addr	= 24,						\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_BRINGUP_RWPA,		\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_pcie	= PCIE_IN_USE | PCIE_USE_PHY_LOOPBK,\
+	 },{	/* 22 */												\
+	.bc_board_id	= QTN_RUBY_BRINGUP_BOARD_16_160_DUALEMAC,	\
+	.bc_name        = "etron16-160, emac1,emac0, pa0",			\
+	.bc_ddr_type    = DDR_16_ETRON,								\
+	.bc_ddr_speed   = DDR_160,									\
+	.bc_ddr_size    = DDR_64MB,									\
+	.bc_emac0       = EMAC_IN_USE,								\
+	.bc_emac1       = EMAC_IN_USE,								\
+	.bc_phy0_addr	= EMAC_PHY_ADDR_SCAN,						\
+	.bc_phy1_addr   = EMAC_PHY_ADDR_SCAN,						\
+	.bc_spi1        = SPI1_IN_USE,								\
+	.bc_wifi_hw     = QTN_RUBY_BRINGUP_RWPA,					\
+	.bc_uart1       = UART1_IN_USE,								\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,				\
+	 },{ /* 1000 */							\
+	.bc_board_id	= QTN_RUBY_REFERENCE_DESIGN_BOARD,		\
+	.bc_name	= "etron16-160, emac1, pa1",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1001 */							\
+	.bc_board_id	= QTN_RUBY_REFERENCE_DESIGN_BOARD_250,		\
+	.bc_name	= "etron16-250, emac1, pa1",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_250,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1002 */							\
+	.bc_board_id	= QTN_RUBY_REF_BOARD_DUAL_CON,			\
+	.bc_name	= "etron32-160, emac1, pa1",			\
+	.bc_ddr_type	= DDR_32_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_pcie	= PCIE_IN_USE,					\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1003 */							\
+	.bc_board_id	= QTN_RUBY_REFERENCE_DESIGN_BOARD_320,		\
+	.bc_name	= "etron16-320, emac1, pa1",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_320,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1004 */							\
+	.bc_board_id	= QTN_RUBY_ETRON_32_320_EMAC1,			\
+	.bc_name	= "etron32-320, emac1, pa1",			\
+	.bc_ddr_type	= DDR_32_ETRON,					\
+	.bc_ddr_speed	= DDR_320,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1005 */							\
+	.bc_board_id	= QTN_RUBY_ETRON_32_250_EMAC1,			\
+	.bc_name	= "etron32-250, emac1, pa1",			\
+	.bc_ddr_type	= DDR_32_ETRON,					\
+	.bc_ddr_speed	= DDR_250,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1006 */							\
+	.bc_board_id	= QTN_RUBY_REFERENCE_DESIGN_BOARD_RGMII_DLL,	\
+	.bc_name	= "etron16-160, emac1-rgmii-dll, pa2",		\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DLL_TIMING,		\
+	 },{ /* 1007 */							\
+	.bc_board_id	= QTN_RUBY_QHS710_5S5_SIGE_DDR250,		\
+	.bc_name	= "etron16-250, emac1, pa2",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_250,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1008 */							\
+	.bc_board_id	= QTN_RUBY_QHS710_5S5_SIGE_DDR320,		\
+	.bc_name	= "etron16-320, emac1, pa2",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_320,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1009 */							\
+	.bc_board_id	= QTN_RUBY_OHS711_PCIE_320DDR,			\
+	.bc_name	= "etron16-320, pcie, pa2",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_320,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_pcie	= PCIE_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1170 */							\
+	.bc_board_id	= QTN_RUBY_QHS713_5S1_PCIERC_DDR160,		\
+	.bc_name	= "etron16-160, emac1, pcie-rc, pa1",		\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_pcie	= PCIE_IN_USE | PCIE_RC_MODE,			\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1171 */							\
+	.bc_board_id	= QTN_RUBY_OHS711_5S13_PCIE_DDR320,		\
+	.bc_name	= "etron16-320, pcie-ep, pa2",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_320,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_pcie	= PCIE_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1172 */							\
+	.bc_board_id	= QTN_RUBY_QHS713_5S1_PCIERC_DDR320,		\
+	.bc_name	= "etron16-320, emac1, pcie-rc, pa1",		\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_320,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_pcie	= PCIE_IN_USE | PCIE_RC_MODE,			\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1200 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_0,				\
+	.bc_name	= "etron16-160, emac1-mii, pa1",		\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_MII,			\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1201 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_1,				\
+	.bc_name	= "etron16-160, emac0-mii, pa1",		\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE | EMAC_PHY_MII,			\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1202 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_2,				\
+	.bc_name	= "etron16-160, emac1 88e6071-mii, pa1",	\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_MV88E6071,				\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1203 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_3,				\
+	.bc_name	= "etron16-160, emac1 ar8236-mii, pa1",		\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_FORCE_100MB | EMAC_PHY_NOT_IN_USE | EMAC_PHY_AR8236,	\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1204 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_4,				\
+	.bc_name	= "etron16-160, pcie, pa2",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_pcie	= PCIE_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1205 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_5,				\
+	.bc_name	= "etron16-160, emac1, mii-100, pa1",		\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_NOT_IN_USE | EMAC_PHY_MII | EMAC_PHY_FORCE_100MB,	\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1206 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_6,				\
+	.bc_name	= "etron16-160, emac1, mii-100, pa2",		\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_NOT_IN_USE | EMAC_PHY_MII | EMAC_PHY_FORCE_100MB,	\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1207 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_7,				\
+	.bc_name	= "etron16-160, emac1, pa2",			\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE,					\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1208 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_8,				\
+	.bc_name	= "etron16-160, emac1 ar8327-rgmii, pa1",	\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE | EMAC_PHY_AR8327,     \
+	.bc_phy1_addr   = EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_REF_RWPA,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1209*/							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_9,				\
+	.bc_name	= "etron16-160, emac1 rtl8363s-rgmii , pa2",	\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE |  EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE,	\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1210*/							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_10,			\
+	.bc_name	= "etron16-160, emac1 back-to-back-rgmii, pa2",	\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE |  EMAC_PHY_FORCE_100MB | EMAC_PHY_NOT_IN_USE,	\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1211 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_11,			\
+	.bc_name	= "etron16-160, emac0-mii, pa2",		\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE | EMAC_PHY_MII,			\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1212 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_12,			\
+	.bc_name	= "etron16-160, emac1 88e6071-mii, pa2",	\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_MV88E6071,				\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1213 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_13,			\
+	.bc_name	= "etron16-160, emac0, emac1 b2b-rgmii 100M, pa2",	\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_FORCE_100MB | EMAC_PHY_NOT_IN_USE,	\
+	.bc_phy0_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1214 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_14,			\
+	.bc_name	= "etron16-160, emac0-mii-gpio1rst, emac1-mii-gpio13rst-100M, pa2",	\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_GPIO1_RESET,		\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_GPIO13_RESET | EMAC_PHY_FORCE_100MB,	\
+	.bc_phy0_addr	= 1,				\
+	.bc_phy1_addr	= 2,				\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1215 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_15,			\
+	.bc_name	= "etron16-160, emac0, emac1 b2b-rgmii 1000M, pa2",	\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE,	\
+	.bc_phy0_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_710F,			\
+	 },{ /* 1216 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_16,			\
+	.bc_name	= "etron16-160, emac1 b2b-rgmii 100M, pa2",	\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_FORCE_100MB | EMAC_PHY_NOT_IN_USE,	\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1217 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_17,			\
+	.bc_name	= "etron16-160, emac1 b2b-rgmii 1000M, pa2",	\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE,	\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_710F,			\
+	 },{ /* 1218 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_18,			\
+	.bc_name	= "etron16-160, emac1-mii, pa2",		\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_NOT_IN_USE,				\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_FORCE_100MB,	\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1219 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_19,			\
+	.bc_name	= "samsung16-160, emac1, mii-100, pa2",		\
+	.bc_ddr_type	= DDR_16_SAMSUNG,				\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_NOT_IN_USE | EMAC_PHY_MII | EMAC_PHY_FORCE_100MB,	\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_IN_USE,					\
+	 },{ /* 1220 */							\
+	.bc_board_id	= QTN_RUBY_ODM_BOARD_20,			\
+	.bc_name	= "etron16-160, emac0, emac1 b2b-rgmii 1000M, no wifi",	\
+	.bc_ddr_type	= DDR_16_ETRON,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE,	\
+	.bc_phy0_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_phy1_addr	= EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw	= QTN_RUBY_WIFI_NONE,				\
+	.bc_uart1	= UART1_NOT_IN_USE,				\
+	.bc_pcie	= PCIE_IN_USE | PCIE_RC_MODE,			\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1221 */							\
+	.bc_board_id = QTN_RUBY_ODM_BOARD_21,				\
+	.bc_name = "etron16-160, emac1 ar8236-mii, pa2",		\
+	.bc_ddr_type = DDR_16_ETRON,					\
+	.bc_ddr_speed = DDR_160,					\
+	.bc_ddr_size = DDR_64MB,					\
+	.bc_emac1 = EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_FORCE_100MB | EMAC_PHY_NOT_IN_USE | EMAC_PHY_AR8236,                                          \
+	.bc_phy1_addr = EMAC_PHY_ADDR_SCAN,				\
+	.bc_wifi_hw = QTN_RUBY_SIGE,                                    \
+	.bc_uart1 = UART1_NOT_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1222 */							\
+	.bc_board_id    = QTN_RUBY_ODM_BOARD_22,                        \
+	.bc_name        = "etron16-160, emac1 ar8327-rgmii, pa2",       \
+	.bc_ddr_type    = DDR_16_ETRON,                                 \
+	.bc_ddr_speed   = DDR_160,                                      \
+	.bc_ddr_size    = DDR_64MB,                                     \
+	.bc_emac1       = EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE | EMAC_PHY_AR8327, \
+	.bc_phy1_addr   = EMAC_PHY_ADDR_SCAN,                           \
+	.bc_wifi_hw     = QTN_RUBY_SIGE,                                \
+	.bc_uart1       = UART1_NOT_IN_USE,                             \
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,                   \
+	 },{ /* 1223 */							\
+	.bc_board_id	= QTN_TOPAZ_FPGAA_BOARD,		\
+	.bc_name	= "FPGA-A(hw_config_id:1223) DDR3, EMAC1, WMAC, RGMII-1G", \
+	.bc_ddr_type	= DDR3_16_WINBOND,					\
+	.bc_ddr_speed	= DDR3_320MHz,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE | EMAC_PHY_FORCE_100MB | EMAC_PHY_NOT_IN_USE, \
+	.bc_emac1	= EMAC_NOT_IN_USE | EMAC_PHY_FORCE_100MB | EMAC_PHY_NOT_IN_USE, \
+	.bc_phy0_addr	= TOPAZ_FPGAA_PHY0_ADDR,			\
+	.bc_phy1_addr	= TOPAZ_FPGAA_PHY1_ADDR,			\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1224 */							\
+	.bc_board_id	= QTN_TOPAZ_FPGAB_BOARD,		\
+	.bc_name	= "FPGA-B(hw_config_id:1224) DDR3, EMAC0, WMAC, RGMII-1G", \
+	.bc_ddr_type	= DDR3_16_WINBOND,					\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE | EMAC_PHY_FORCE_100MB, \
+	.bc_emac1	= EMAC_NOT_IN_USE | EMAC_PHY_FORCE_100MB,	\
+	.bc_phy0_addr	= TOPAZ_FPGAB_PHY0_ADDR,			\
+	.bc_phy1_addr	= TOPAZ_FPGAB_PHY1_ADDR,			\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1225 */							\
+	.bc_board_id	= QTN_TOPAZ_DUAL_EMAC_FPGAA_BOARD,		\
+	.bc_name	= "FPGA-A(hw_config_id:1225) DDR3, EMAC0, EMAC1, WMAC, RGMII-1G", \
+	.bc_ddr_type	= DDR3_16_WINBOND,				\
+	.bc_ddr_speed	= DDR3_320MHz,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE | EMAC_PHY_FORCE_100MB | EMAC_PHY_NOT_IN_USE | EMAC_PHY_FPGAA_ONLY, \
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_FORCE_100MB | EMAC_PHY_NOT_IN_USE | EMAC_PHY_FPGAA_ONLY, \
+	.bc_phy0_addr	= TOPAZ_FPGAA_PHY0_ADDR,			\
+	.bc_phy1_addr	= TOPAZ_FPGAA_PHY1_ADDR,			\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1226 */							\
+	.bc_board_id	= QTN_TOPAZ_DUAL_EMAC_FPGAB_BOARD,		\
+	.bc_name	= "FPGA-B(hw_config_id:1226) DDR3, EMAC0, EMAC1, WMAC, RGMII-1G", \
+	.bc_ddr_type	= DDR3_16_WINBOND,				\
+	.bc_ddr_speed	= DDR3_320MHz,					\
+	.bc_ddr_size	= DDR_64MB,					\
+	.bc_emac0	= EMAC_IN_USE | EMAC_PHY_FORCE_100MB | EMAC_PHY_FPGAB_ONLY, \
+	.bc_emac1	= EMAC_IN_USE | EMAC_PHY_FORCE_100MB | EMAC_PHY_FPGAB_ONLY, \
+	.bc_phy0_addr	= TOPAZ_FPGAB_PHY0_ADDR,			\
+	.bc_phy1_addr	= TOPAZ_FPGAB_PHY1_ADDR,			\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1227 */							\
+	.bc_board_id	= QTN_TOPAZ_RC_BOARD,				\
+	.bc_name	= "FPGA-A(hw_config_id:1227) DDR3, EMAC1, WMAC, RGMII-1G", \
+	.bc_ddr_type	= DDR3_16_WINBOND,				\
+	.bc_ddr_speed	= DDR3_320MHz,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= TOPAZ_PHY0_ADDR,				\
+	.bc_phy1_addr	= TOPAZ_PHY1_ADDR,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_WIFI_NONE,				\
+	.bc_uart1	= UART1_IN_USE,					\
+	.bc_pcie        = PCIE_IN_USE | PCIE_RC_MODE,			\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	 },{ /* 1228 */							\
+	.bc_board_id	= QTN_TOPAZ_EP_BOARD,				\
+	.bc_name	= "FPGA-B(hw_config_id:1228) DDR3, EMAC0, WMAC, RGMII-1G", \
+	.bc_ddr_type	= DDR3_16_WINBOND,				\
+	.bc_ddr_speed	= DDR_160,					\
+	.bc_ddr_size	= DDR_128MB,					\
+	.bc_emac0	= EMAC_IN_USE,					\
+	.bc_emac1	= EMAC_NOT_IN_USE,				\
+	.bc_phy0_addr	= TOPAZ_PHY0_ADDR,				\
+	.bc_phy1_addr	= TOPAZ_PHY1_ADDR,				\
+	.bc_spi1	= SPI1_IN_USE,					\
+	.bc_wifi_hw	= QTN_RUBY_SIGE,				\
+	.bc_uart1	= UART1_IN_USE,					\
+	.bc_pcie	= PCIE_IN_USE,					\
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_DEFAULT,			\
+	} ,{ /* 1229 */							\
+	.bc_board_id    = QTN_TOPAZ_BB_BOARD, \
+	.bc_name        = "BB-EVK(hw_config_id:1229) DDR3, EMAC0, WMAC, RGMII-1G", \
+	.bc_ddr_type    = DDR3_16_WINBOND, \
+	.bc_ddr_speed   = DDR3_400MHz, \
+	.bc_ddr_size    = DDR_128MB, \
+	.bc_emac0       = EMAC_IN_USE, \
+	.bc_emac1       = EMAC_IN_USE, \
+	.bc_phy0_addr   = TOPAZ_PHY0_ADDR, \
+	.bc_phy1_addr   = TOPAZ_PHY1_ADDR, \
+	.bc_spi1        = SPI1_IN_USE, \
+	.bc_wifi_hw     = QTN_RUBY_WIFI_NONE, \
+	.bc_uart1       = UART1_IN_USE, \
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_NODELAY, \
+	} ,{ /* 1230 */ \
+	.bc_board_id    = QTN_TOPAZ_RF_BOARD, \
+	.bc_name        = "RF-EVK(hw_config_id:1230) DDR3, EMAC0, WMAC, RGMII-1G", \
+	.bc_ddr_type    = DDR3_16_WINBOND, \
+	.bc_ddr_speed   = DDR3_500MHz, \
+	.bc_ddr_size    = DDR_128MB, \
+	.bc_emac0       = EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE, \
+	.bc_emac1       = EMAC_IN_USE, \
+	.bc_phy0_addr   = TOPAZ_PHY0_ADDR, \
+	.bc_phy1_addr   = TOPAZ_PHY1_ADDR, \
+	.bc_spi1        = SPI1_IN_USE, \
+	.bc_wifi_hw     = QTN_TPZ_SE5003L1_INV, \
+	.bc_uart1       = UART1_IN_USE, \
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_NODELAY, \
+	} ,{ /* 1231 */ \
+	.bc_board_id    = QTN_TOPAZ_QHS840_5S1, \
+	.bc_name        = "QHS840_5S1 RDK", \
+	.bc_ddr_type    = DDR3_16_WINBOND, \
+	.bc_ddr_speed   = DDR3_500MHz, \
+	.bc_ddr_size    = DDR_128MB, \
+	.bc_emac0       = EMAC_IN_USE | EMAC_PHY_FORCE_1000MB | EMAC_PHY_NOT_IN_USE | EMAC_PHY_RTL8363SB_P0, \
+	.bc_wifi_hw     = QTN_TPZ_SE5003L1, \
+	.bc_rgmii_timing = CONFIG_ARCH_RGMII_NODELAY, \
+	} \
+}
+
+#endif /* _RUBY_BOARD_DB_ */
diff --git a/quantenna/common/ruby_config.h b/quantenna/common/ruby_config.h
new file mode 100644
index 0000000..c50e98a
--- /dev/null
+++ b/quantenna/common/ruby_config.h
@@ -0,0 +1,184 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * Header file which describes Ruby platform.
+ * Has to be used by both kernel and bootloader.
+ */
+
+#ifndef __RUBY_CONFIG_H
+#define __RUBY_CONFIG_H
+
+#include "topaz_config.h"
+
+/*******************************************************************/
+
+#if TOPAZ_MMAP_UNIFIED
+	#define RUBY_MMAP_FLIP		0
+#else
+	#if !(defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD))
+		#define RUBY_MMAP_FLIP		1
+	#else
+		#define RUBY_MMAP_FLIP		0
+	#endif
+#endif
+
+/* Set to 1 if MuC need to enable TLB, otherwise set to 0 */
+#define RUBY_MUC_TLB_ENABLE		1
+
+/*******************************************************************/
+
+#ifdef RUBY_PLATFORM
+
+	#if RUBY_FPGA_PLATFORM
+		#define RUBY_SERIAL_BAUD	38400
+		#define RUBY_FIXED_DEV_CLK	12500000
+		#define RUBY_FIXED_CPU_CLK	40000000
+		#define RUBY_FPGA_DDR
+	#else
+		#define RUBY_SERIAL_BAUD	115200
+		#define RUBY_FIXED_DEV_CLK	125000000
+		#define RUBY_FIXED_CPU_CLK	400000000
+		#define RUBY_ASIC_DDR
+	#endif /* #if RUBY_FPGA_PLATFORM */
+
+	#define UPF_SPD_FLAG	0
+	#define DEFAULT_BAUD	RUBY_SERIAL_BAUD
+
+#endif /* #ifdef RUBY_PLATFORM */
+
+/*******************************************************************/
+/* Define some constants for Linux ARC kernel */
+#define CONFIG_ARC700_SERIAL_BAUD	RUBY_SERIAL_BAUD
+#define CONFIG_ARC700_CLK		RUBY_FIXED_CPU_CLK
+#define CONFIG_ARC700_DEV_CLK		RUBY_FIXED_DEV_CLK
+
+/*******************************************************************/
+
+/* RGMII related defines */
+#define CONFIG_ARCH_RUBY_ENET_RGMII
+
+#define CONFIG_ARCH_RGMII_DEFAULT	0x8F8F8F8F
+#define CONFIG_ARCH_RGMII_DLL_TIMING	0x8F8D8F8F
+#define CONFIG_ARCH_RGMII_S1P8NS_H1P9NS	0x8F891F1F
+#define CONFIG_ARCH_RGMII_NODELAY	0x1F1F1F1F
+#define CONFIG_ARCH_RGMII_710F		CONFIG_ARCH_RGMII_NODELAY
+#define CONFIG_ARCH_RGMII_P1RX00TX0E    0x0E8E1F1F
+
+/* EMAC related defines */
+
+/* EMAC flags */
+#define EMAC_NOT_IN_USE			(0)
+#define EMAC_IN_USE			(BIT(0))
+#define EMAC_PHY_NOT_IN_USE		(BIT(1))  // do not initialize/access phy mdio
+#define EMAC_PHY_FORCE_10MB		(BIT(2))
+#define EMAC_PHY_FORCE_100MB		(BIT(3))
+#define EMAC_PHY_FORCE_1000MB		(BIT(4))
+#define EMAC_PHY_FORCE_HDX		(BIT(5))
+#define EMAC_PHY_RESET			(BIT(6)) // force PHY reset
+#define EMAC_PHY_MII			(BIT(7)) // default is rgmii
+#define EMAC_PHY_AUTO_MASK		(EMAC_PHY_FORCE_10MB | EMAC_PHY_FORCE_100MB | EMAC_PHY_FORCE_1000MB)
+#define EMAC_PHY_AR8236			(BIT(8))
+#define EMAC_PHY_AR8327			(BIT(9))
+#define EMAC_PHY_GPIO1_RESET		(BIT(10))
+#define EMAC_PHY_GPIO13_RESET		(BIT(11))
+#define EMAC_PHY_NO_COC			(BIT(12)) // do not adjust link speed for power savings
+#define EMAC_PHY_MV88E6071		(BIT(13))
+#define EMAC_PHY_FPGAA_ONLY		(BIT(15))
+#define EMAC_PHY_FPGAB_ONLY		(BIT(16))
+#define EMAC_PHY_RTL8363SB_P0		(BIT(18))
+#define EMAC_PHY_RTL8363SB_P1		(BIT(19))
+#define EMAC_BONDED			(BIT(20))
+#define EMAC_PHY_RTL8365MB		(BIT(21))
+#define EMAC_PHY_RTL8211DS		(BIT(22))
+#define EMAC_PHY_CUSTOM			(BIT(31))
+
+#define EMAC_MV88E6071			(EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_NOT_IN_USE |	\
+						EMAC_PHY_NO_COC | EMAC_PHY_FORCE_100MB | EMAC_PHY_MV88E6071)
+#define EMAC_SLOW_PHY			(EMAC_PHY_FORCE_10MB|EMAC_PHY_FORCE_100MB|EMAC_PHY_MII)
+
+/* force phy addr scan */
+#define EMAC_PHY_ADDR_SCAN		(32)	// scan bus for addr
+
+/* Flash memory sizes */
+#define FLASH_64MB			(64*1024*1024)
+#define FLASH_32MB			(32*1024*1024)
+#define FLASH_16MB			(16*1024*1024)
+#define FLASH_8MB			(8*1024*1024)
+#define FLASH_4MB			(4*1024*1024)
+#define FLASH_2MB			(2*1024*1024)
+#define FLASH_256KB			(256*1024)
+#define FLASH_64KB			(64*1024)
+#define DEFAULT_FLASH_SIZE		(FLASH_8MB)
+#define FLASH_SIZE_JEDEC		(0)
+
+/* DDR memory sizes */
+#define DDR_256MB			(256*1024*1024)
+#define DDR_128MB			(128*1024*1024)
+#define DDR_64MB			(64*1024*1024)
+#define DDR_32MB			(32*1024*1024)
+#define DDR_AUTO			(0)
+#define DEFAULT_DDR_SIZE		(DDR_64MB)
+
+/* Other DDR defines */
+#define DDR3_800MHz		800
+#define DDR3_640MHz		640
+#define DDR3_500MHz		500
+#define DDR3_400MHz		400
+#define DDR3_320MHz		320
+#define DDR_400			400
+#define DDR_320			320
+#define DDR_250			250
+#define DDR_200			200
+#define DDR_160			160
+#define DDR_125			125
+#define DEFAULT_DDR_SPEED	(DDR_160)
+
+#define	DDR_32_MICRON		0
+#define DDR_16_MICRON		1
+#define DDR_16_ETRON		2
+#define DDR_16_SAMSUNG		3
+#define DDR_32_ETRON		4
+#define DDR_32_SAMSUNG		5
+#define DDR_16_HYNIX		6
+#define DDR3_16_WINBOND		7
+#define DDR3_32_WINBOND		8
+#define DEFAULT_DDR_CFG		(DDR_16_MICRON)
+
+/* UART1 defines */
+#define	UART1_NOT_IN_USE	0
+#define	UART1_IN_USE		1
+
+#define PCIE_NOT_IN_USE		0
+#define PCIE_IN_USE		(BIT(0))
+#define PCIE_USE_PHY_LOOPBK	(BIT(1))
+#define PCIE_RC_MODE		(BIT(2))
+#define PCIE_ENDPOINT		(PCIE_IN_USE | PCIE_USE_PHY_LOOPBK)
+#define PCIE_ROOTCOMPLEX	(PCIE_IN_USE | PCIE_RC_MODE | PCIE_USE_PHY_LOOPBK)
+
+/*******************************************************************/
+
+#define CONFIG_USE_SPI1_FOR_IPC	PLATFORM_REG_SWITCH(1, 0)
+
+#endif // #ifndef __RUBY_CONFIG_H
+
+
diff --git a/quantenna/common/ruby_flip.S b/quantenna/common/ruby_flip.S
new file mode 100644
index 0000000..31b57a2
--- /dev/null
+++ b/quantenna/common/ruby_flip.S
@@ -0,0 +1,92 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <config.h>
+#include <asm/arcregs.h>
+#include <asm/arch/platform.h>
+#include "start.inl"
+
+#if RUBY_MMAP_FLIP || TOPAZ_MMAP_UNIFIED
+
+ruby_flip_mmap:
+	.globl ruby_flip_mmap
+	/* Code must be position-independent! */
+
+	/*
+	* Flush and invalidate data cache.
+	* Please make sure that instructions which touch
+	* d-cache are NOT used until flipping is done.
+	*/
+	/* Set flush mode for invalidate operation */
+	lr      r1, [ARC_REG_DC_CTRL]
+	bset    r1, r1, 0x6
+	sr      r1, [ARC_REG_DC_CTRL]
+	/* Start invalidate operation */
+	mov     r1, 0x1
+	sr      r1, [ARC_REG_DC_IVDC]
+	/* Check while cache invalidating will be finished */
+dcache_flush_continue:
+	lr      r1, [ARC_REG_DC_CTRL]
+	and     r1, r1, ARC_DC_FLUSH_STATUS_BIT
+	brne    r1, 0x0, dcache_flush_continue
+
+	/* Prepare flipping.
+	 * After code is finished, memory maps will change as follows:
+	 *     Flip map:
+	 *         SRAM 0x8000_0000 -> 0x8800_0000
+	 *         DRAM 0x0         -> 0x8000_0000
+	 *     Unified map:
+	 *         SRAM 0x8000_0000 -> 0x9800_0000
+	 *         DRAM 0x0         -> 0x8000_0000
+	 */
+	mov     r1, RUBY_SYS_CTL_BASE_ADDR_NOMAP
+	mov     r2, FLIPBIT | RUBY_SYS_CTL_REMAP(0x3)
+	st.di   r2, [r1, RUBY_SYS_CTL_MASK - RUBY_SYS_CTL_BASE_ADDR]
+	mov     r2, FLIPBIT
+
+.align ARC_ICACHE_LINE_LEN
+	/* Do flipping.
+	* Align to cache line to ensure we don't hit memory during following instructions.
+	* Code must fit into 1 cache line (32 bytes).
+	*/
+	st.di   r2, [r1, RUBY_SYS_CTL_CTRL - RUBY_SYS_CTL_BASE_ADDR]
+	ld.di   r2, [r1, RUBY_SYS_CTL_CTRL - RUBY_SYS_CTL_BASE_ADDR] /* read back to clear pipeline */
+	sync
+	j       boot_continue		/* jump to absolute addr in sram */
+	/* Align to cache line so code occupy strictly 1 cache line. */
+.align ARC_ICACHE_LINE_LEN
+
+boot_continue:
+	/* Finalize flipping. */
+	mov     r2, 0x0
+	st.di   r2, [r1, RUBY_SYS_CTL_MASK - RUBY_SYS_CTL_BASE_ADDR]
+
+	/* Let's discard instruction cache.
+	*/
+	mov     r2, 0x1
+	sr      r2, [ARC_REG_IC_IVIC] /* invalidate i-cache */
+	lr      r2, [ARC_REG_IC_CTRL] /* read will be not completed until i-cache is invalidated */
+
+	/* Done. We are now sitting in different addresses. */
+	b	ruby_boot
+#endif // #if RUBY_MMAP_FLIP
+
diff --git a/quantenna/common/ruby_mem.h b/quantenna/common/ruby_mem.h
new file mode 100644
index 0000000..06c97bf
--- /dev/null
+++ b/quantenna/common/ruby_mem.h
@@ -0,0 +1,496 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * Header file which describes Ruby platform.
+ * Has to be used by runtime firmware.
+ */
+
+#ifndef __RUBY_MEM_H
+#define __RUBY_MEM_H
+
+#include "common_mem.h"
+
+/* FIXME: Move CPU related macros to a separate header file. */
+#define ARC_DCACHE_LINE_LENGTH			32
+
+/* NEVTBD - put in real XYMEM values */
+#define RUBY_DSP_XYMEM_BEGIN			0xD0000000
+#define RUBY_DSP_XYMEM_END			0xDFFFFFFF
+
+/* SRAM layout */
+
+#ifdef QTN_RC_ENABLE_HDP
+#define TOPAZ_HBM_BUF_EMAC_RX_COUNT_S		(14)
+#define TOPAZ_HBM_BUF_WMAC_RX_COUNT_S		(0)
+#else
+#define TOPAZ_HBM_BUF_EMAC_RX_COUNT_S		(13)
+#define TOPAZ_HBM_BUF_WMAC_RX_COUNT_S		(11)
+#endif
+#define TOPAZ_HBM_EMAC_TX_DONE_COUNT_S		(12)
+
+#define TOPAZ_HBM_BUF_EMAC_RX_COUNT		(1 << TOPAZ_HBM_BUF_EMAC_RX_COUNT_S)
+#define TOPAZ_HBM_BUF_WMAC_RX_COUNT		(1 << TOPAZ_HBM_BUF_WMAC_RX_COUNT_S)
+#define TOPAZ_HBM_EMAC_TX_DONE_COUNT		(1 << TOPAZ_HBM_EMAC_TX_DONE_COUNT_S)
+
+/* dedicated SRAM space for HBM pointer pools */
+#define TOPAZ_HBM_POOL_PTR_SIZE			4	/* sizeof(void *), 32 bit arch */
+#define TOPAZ_HBM_POOL_EMAC_RX_START		0x00000000
+#define TOPAZ_HBM_POOL_EMAC_RX_SIZE		(TOPAZ_HBM_BUF_EMAC_RX_COUNT * TOPAZ_HBM_POOL_PTR_SIZE)
+#define TOPAZ_HBM_POOL_EMAC_RX_END		(TOPAZ_HBM_POOL_EMAC_RX_START + TOPAZ_HBM_POOL_EMAC_RX_SIZE)
+#define TOPAZ_HBM_POOL_WMAC_RX_START		TOPAZ_HBM_POOL_EMAC_RX_END
+#define TOPAZ_HBM_POOL_WMAC_RX_SIZE		(TOPAZ_HBM_BUF_WMAC_RX_COUNT * TOPAZ_HBM_POOL_PTR_SIZE)
+#define TOPAZ_HBM_POOL_WMAC_RX_END		(TOPAZ_HBM_POOL_WMAC_RX_START + TOPAZ_HBM_POOL_WMAC_RX_SIZE)
+#define TOPAZ_HBM_POOL_EMAC_TX_DONE_START	TOPAZ_HBM_POOL_WMAC_RX_END
+#define TOPAZ_HBM_POOL_EMAC_TX_DONE_SIZE	(TOPAZ_HBM_EMAC_TX_DONE_COUNT * TOPAZ_HBM_POOL_PTR_SIZE)
+#define TOPAZ_HBM_POOL_EMAC_TX_DONE_END		(TOPAZ_HBM_POOL_EMAC_TX_DONE_START + TOPAZ_HBM_POOL_EMAC_TX_DONE_SIZE)
+#define TOPAZ_FWT_SW_START			TOPAZ_HBM_POOL_EMAC_TX_DONE_END
+#define TOPAZ_FWT_SW_SIZE			(4096)
+#define TOPAZ_FWT_SW_END			(TOPAZ_FWT_SW_START + TOPAZ_FWT_SW_SIZE)
+
+#define CONFIG_MUC_EXTRA_RES_BASE		TOPAZ_FWT_SW_END
+#define CONFIG_MUC_EXTRA_RESERVE_SIZE		(8 * 1024)
+#define CONFIG_MUC_EXTRA_RES_END		(CONFIG_MUC_EXTRA_RES_BASE + CONFIG_MUC_EXTRA_RESERVE_SIZE)
+
+#define CONFIG_ARC_KERNEL_SRAM_B1_BASE		ROUNDUP(CONFIG_MUC_EXTRA_RES_END, CONFIG_ARC_KERNEL_PAGE_SIZE)
+#define CONFIG_ARC_KERNEL_SRAM_B1_SIZE		(22 * 1024)
+#define CONFIG_ARC_KERNEL_SRAM_B1_END		(CONFIG_ARC_KERNEL_SRAM_B1_BASE + CONFIG_ARC_KERNEL_SRAM_B1_SIZE)
+#define CONFIG_ARC_KERNEL_SRAM_B2_BASE		CONFIG_ARC_KERNEL_SRAM_B1_END
+#define CONFIG_ARC_KERNEL_SRAM_B2_END		ROUNDUP(CONFIG_ARC_KERNEL_SRAM_B2_BASE, RUBY_SRAM_BANK_SIZE)
+#define CONFIG_ARC_KERNEL_SRAM_B2_SIZE		(CONFIG_ARC_KERNEL_SRAM_B2_END - CONFIG_ARC_KERNEL_SRAM_B2_BASE)
+#define CONFIG_ARC_MUC_SRAM_B1_BASE		ROUNDUP(CONFIG_ARC_KERNEL_SRAM_B2_END, CONFIG_ARC_KERNEL_PAGE_SIZE)
+#define CONFIG_ARC_MUC_SRAM_B1_END		ROUNDUP(CONFIG_ARC_MUC_SRAM_B1_BASE + 1, RUBY_SRAM_BANK_SIZE)
+#define CONFIG_ARC_MUC_SRAM_B1_SIZE		(CONFIG_ARC_MUC_SRAM_B1_END - CONFIG_ARC_MUC_SRAM_B1_BASE)
+#define CONFIG_ARC_MUC_SRAM_B2_BASE		ROUNDUP(CONFIG_ARC_MUC_SRAM_B1_END, RUBY_SRAM_BANK_SIZE)
+#define CONFIG_ARC_MUC_SRAM_B2_SIZE		(RUBY_SRAM_BANK_SAFE_SIZE - RUBY_CRUMBS_SIZE)
+#define CONFIG_ARC_MUC_SRAM_B2_END		(CONFIG_ARC_MUC_SRAM_B2_BASE + CONFIG_ARC_MUC_SRAM_B2_SIZE)
+#define CONFIG_ARC_AUC_SRAM_BASE		ROUNDUP(CONFIG_ARC_MUC_SRAM_B2_END, RUBY_SRAM_BANK_SIZE)
+#define CONFIG_ARC_AUC_SRAM_SIZE		(3 * RUBY_SRAM_BANK_SIZE)
+#define CONFIG_ARC_AUC_SRAM_END			(CONFIG_ARC_AUC_SRAM_BASE + CONFIG_ARC_AUC_SRAM_SIZE)
+#define CONFIG_ARC_SRAM_END			CONFIG_ARC_AUC_SRAM_END
+
+/* MU TxBF qmatrix is stored at the last bank of SRAM, DSP writes to it, has to use SRAM BUS addr */
+#define CONFIG_ARC_MU_QMAT_BASE			(RUBY_SRAM_BUS_BEGIN + 0X70000)
+#define CONFIG_ARC_MU_QMAT_SIZE			RUBY_SRAM_BANK_SIZE
+#define CONFIG_ARC_MU_QMAT_END			(CONFIG_ARC_MU_QMAT_BASE + CONFIG_ARC_MU_QMAT_SIZE)
+
+#if TOPAZ_RX_ACCELERATE
+	/* TODO FIXME - MuC crashed when copying data between SRAM and DDR */
+	#define CONFIG_ARC_MUC_STACK_OFFSET		(CONFIG_ARC_MUC_SRAM_B2_END - 2048)
+#else
+	#define CONFIG_ARC_MUC_STACK_OFFSET		(CONFIG_ARC_MUC_SRAM_B2_END)
+#endif
+
+#if CONFIG_ARC_MUC_STACK_OFFSET_UBOOT != CONFIG_ARC_MUC_STACK_OFFSET
+	#error "CONFIG_ARC_MUC_STACK_OFFSET_UBOOT must be equal to CONFIG_ARC_MUC_STACK_OFFSET!"
+#endif
+
+#define CONFIG_ARC_MUC_STACK_INIT	(RUBY_SRAM_BEGIN + CONFIG_ARC_MUC_STACK_OFFSET)
+
+#define RUBY_CRUMBS_OFFSET		(CONFIG_ARC_MUC_SRAM_B2_END)
+
+#if RUBY_CRUMBS_OFFSET != RUBY_CRUMBS_OFFSET_UBOOT
+	#error "RUBY_CRUMBS_OFFSET_UBOOT must be equal to RUBY_CRUMBS_OFFSET!"
+#endif
+
+#define RUBY_CRUMBS_ADDR		(RUBY_SRAM_BEGIN + RUBY_CRUMBS_OFFSET)
+
+/* DDR layout  */
+#define CONFIG_ARC_PCIE_RSVD_SIZE	(64 * 1024)
+#define CONFIG_ARC_DSP_BASE		(CONFIG_ARC_NULL_END + CONFIG_ARC_PCIE_RSVD_SIZE)
+#define CONFIG_ARC_DSP_SIZE		(768 * 1024)
+#define CONFIG_ARC_DSP_END		(CONFIG_ARC_DSP_BASE + CONFIG_ARC_DSP_SIZE)
+#define CONFIG_ARC_MUC_BASE		CONFIG_ARC_DSP_END
+#ifdef TOPAZ_128_NODE_MODE
+#define CONFIG_ARC_MUC_SIZE		((3 * 1024 * 1024) + (584 * 1024))
+#else
+#define CONFIG_ARC_MUC_SIZE		((2 * 1024 * 1024) + (772 * 1024))
+#endif
+#define MUC_DRAM_RX_RESVERED_RELOC_SIZE		(8 * 1024)
+#define CONFIG_ARC_MUC_END		(CONFIG_ARC_MUC_BASE + CONFIG_ARC_MUC_SIZE)
+#define CONFIG_ARC_MUC_MAPPED_BASE	CONFIG_ARC_MUC_BASE
+#define CONFIG_ARC_MUC_MAPPED_SIZE	(RUBY_MAX_DRAM_SIZE - CONFIG_ARC_MUC_MAPPED_BASE)
+
+#define CONFIG_ARC_AUC_BASE		CONFIG_ARC_MUC_END
+#define CONFIG_ARC_AUC_SIZE		(1024 * 1024 + 768 * 1024 + 40 * 1024)
+#define CONFIG_ARC_AUC_END		(CONFIG_ARC_AUC_BASE + CONFIG_ARC_AUC_SIZE)
+#define TOPAZ_HBM_BUF_ALIGN		(1 * 1024)
+
+#define TOPAZ_HBM_BUF_EMAC_RX_POOL	0
+#define TOPAZ_HBM_BUF_WMAC_RX_POOL	1
+#define TOPAZ_HBM_AUC_FEEDBACK_POOL	2
+#define TOPAZ_HBM_EMAC_TX_DONE_POOL	3
+
+#define TOPAZ_HBM_BUF_EMAC_RX_SIZE	(4 * 1024)
+#define TOPAZ_HBM_BUF_WMAC_RX_SIZE	(17 * 1024)
+
+#define TOPAZ_HBM_BUF_META_SIZE		64		/* keep it 2^n */
+#define TOPAZ_HBM_POOL_GUARD_SIZE	(64 * 1024)
+
+#define TOPAZ_HBM_BUF_EMAC_RX_TOTAL	(TOPAZ_HBM_BUF_EMAC_RX_COUNT *	\
+						TOPAZ_HBM_BUF_EMAC_RX_SIZE)
+#define TOPAZ_HBM_BUF_WMAC_RX_TOTAL	(TOPAZ_HBM_BUF_WMAC_RX_COUNT *	\
+						TOPAZ_HBM_BUF_WMAC_RX_SIZE)
+#define TOPAZ_HBM_BUF_META_BASE		CONFIG_ARC_AUC_END
+
+#define TOPAZ_HBM_BUF_META_EMAC_RX_BASE		(TOPAZ_HBM_BUF_META_BASE + TOPAZ_HBM_BUF_META_SIZE)
+#define TOPAZ_HBM_BUF_META_EMAC_RX_BASE_VIRT	(RUBY_DRAM_BEGIN + TOPAZ_HBM_BUF_META_EMAC_RX_BASE)
+#define TOPAZ_HBM_BUF_META_EMAC_RX_TOTAL	(TOPAZ_HBM_BUF_EMAC_RX_COUNT * \
+							TOPAZ_HBM_BUF_META_SIZE)
+#define TOPAZ_HBM_BUF_META_EMAC_RX_END		(TOPAZ_HBM_BUF_META_EMAC_RX_BASE + \
+							TOPAZ_HBM_BUF_META_EMAC_RX_TOTAL)
+
+#define TOPAZ_HBM_BUF_META_WMAC_RX_BASE		(TOPAZ_HBM_BUF_META_EMAC_RX_END + TOPAZ_HBM_BUF_META_SIZE)
+#define TOPAZ_HBM_BUF_META_WMAC_RX_BASE_VIRT	(RUBY_DRAM_BEGIN + TOPAZ_HBM_BUF_META_WMAC_RX_BASE)
+#define TOPAZ_HBM_BUF_META_WMAC_RX_TOTAL	(TOPAZ_HBM_BUF_WMAC_RX_COUNT * \
+							TOPAZ_HBM_BUF_META_SIZE)
+#define TOPAZ_HBM_BUF_META_WMAC_RX_END		(TOPAZ_HBM_BUF_META_WMAC_RX_BASE + \
+							TOPAZ_HBM_BUF_META_WMAC_RX_TOTAL)
+
+#define TOPAZ_HBM_BUF_META_END		(TOPAZ_HBM_BUF_META_WMAC_RX_END + TOPAZ_HBM_BUF_META_SIZE)
+#define TOPAZ_HBM_BUF_META_TOTAL	(TOPAZ_HBM_BUF_META_END - TOPAZ_HBM_BUF_META_BASE)
+
+#define TOPAZ_HBM_BUF_BASE		ROUNDUP(TOPAZ_HBM_BUF_META_END, TOPAZ_HBM_BUF_ALIGN)
+
+#define TOPAZ_HBM_BUF_EMAC_RX_BASE	(TOPAZ_HBM_BUF_BASE + TOPAZ_HBM_POOL_GUARD_SIZE)
+#define TOPAZ_HBM_BUF_EMAC_RX_BASE_VIRT	(RUBY_DRAM_BEGIN + TOPAZ_HBM_BUF_EMAC_RX_BASE)
+#define TOPAZ_HBM_BUF_EMAC_RX_END	(TOPAZ_HBM_BUF_EMAC_RX_BASE +	\
+						TOPAZ_HBM_BUF_EMAC_RX_TOTAL)
+
+#define TOPAZ_HBM_BUF_WMAC_RX_BASE	(TOPAZ_HBM_BUF_EMAC_RX_END + TOPAZ_HBM_POOL_GUARD_SIZE)
+#define TOPAZ_HBM_BUF_WMAC_RX_BASE_VIRT	(RUBY_DRAM_BEGIN + TOPAZ_HBM_BUF_WMAC_RX_BASE)
+#define TOPAZ_HBM_BUF_WMAC_RX_END	(TOPAZ_HBM_BUF_WMAC_RX_BASE +	\
+						TOPAZ_HBM_BUF_WMAC_RX_TOTAL)
+
+#define TOPAZ_HBM_BUF_END		(TOPAZ_HBM_BUF_WMAC_RX_END + TOPAZ_HBM_POOL_GUARD_SIZE)
+
+#define TOPAZ_FWT_MCAST_ENTRIES		2048
+#define TOPAZ_FWT_MCAST_FF_ENTRIES	1	/* one for all FF addresses */
+#define TOPAZ_FWT_MCAST_IPMAP_ENT_SIZE	64	/* sizeof(struct topaz_fwt_sw_ipmap) */
+#define TOPAZ_FWT_MCAST_TQE_ENT_SIZE	20	/* sizeof(struct topaz_fwt_sw_mcast_entry) */
+/* Tables are cache-line aligned to ensure proper memory flushing. */
+#define TOPAZ_FWT_MCAST_IPMAP_SIZE	\
+	ROUNDUP(TOPAZ_FWT_MCAST_ENTRIES * TOPAZ_FWT_MCAST_IPMAP_ENT_SIZE,	\
+			ARC_DCACHE_LINE_LENGTH)
+#define TOPAZ_FWT_MCAST_TQE_SIZE	\
+	ROUNDUP(TOPAZ_FWT_MCAST_ENTRIES * TOPAZ_FWT_MCAST_TQE_ENT_SIZE,		\
+			ARC_DCACHE_LINE_LENGTH)
+#define TOPAZ_FWT_MCAST_TQE_FF_SIZE	\
+	ROUNDUP(TOPAZ_FWT_MCAST_FF_ENTRIES * TOPAZ_FWT_MCAST_TQE_ENT_SIZE,	\
+			ARC_DCACHE_LINE_LENGTH)
+
+#define TOPAZ_FWT_MCAST_IPMAP_BASE	TOPAZ_HBM_BUF_END
+#define TOPAZ_FWT_MCAST_IPMAP_END	(TOPAZ_FWT_MCAST_IPMAP_BASE + TOPAZ_FWT_MCAST_IPMAP_SIZE)
+#define TOPAZ_FWT_MCAST_TQE_BASE	TOPAZ_FWT_MCAST_IPMAP_END
+#define TOPAZ_FWT_MCAST_TQE_END		(TOPAZ_FWT_MCAST_TQE_BASE + TOPAZ_FWT_MCAST_TQE_SIZE)
+#define TOPAZ_FWT_MCAST_TQE_FF_BASE	TOPAZ_FWT_MCAST_TQE_END
+#define TOPAZ_FWT_MCAST_TQE_FF_END	(TOPAZ_FWT_MCAST_TQE_FF_BASE + TOPAZ_FWT_MCAST_TQE_FF_SIZE)
+#define TOPAZ_FWT_MCAST_END		TOPAZ_FWT_MCAST_TQE_FF_END
+
+/* Offset from DDR beginning, from which memory start to belong to Linux */
+#define CONFIG_ARC_KERNEL_MEM_BASE	TOPAZ_FWT_MCAST_END
+
+#if TOPAZ_HBM_BUF_EMAC_RX_BASE & (TOPAZ_HBM_BUF_ALIGN - 1)
+	#error EMAC Buffer start not aligned
+#endif
+#if TOPAZ_HBM_BUF_WMAC_RX_BASE & (TOPAZ_HBM_BUF_ALIGN - 1)
+	#error WMAC Buffer start not aligned
+#endif
+#define CONFIG_ARC_UBOOT_RESERVED_SPACE	(8 * 1024)
+
+/* Linux kernel u-boot image start address, for uncompressed images */
+#define CONFIG_ARC_KERNEL_BOOT_BASE	ROUNDUP(CONFIG_ARC_KERNEL_MEM_BASE, \
+						CONFIG_ARC_KERNEL_PAGE_SIZE)
+/* Linux kernel image start */
+#define CONFIG_ARC_KERNEL_BASE		(CONFIG_ARC_KERNEL_BOOT_BASE + CONFIG_ARC_UBOOT_RESERVED_SPACE)
+#define CONFIG_ARC_KERNEL_MAX_SIZE	(RUBY_MAX_DRAM_SIZE - CONFIG_ARC_KERNEL_MEM_BASE)
+#define CONFIG_ARC_KERNEL_MIN_SIZE	(RUBY_MIN_DRAM_SIZE - CONFIG_ARC_KERNEL_MEM_BASE)
+
+/* AuC tightly coupled memory specification */
+#define TOPAZ_AUC_IMEM_ADDR		0xE5000000
+#define TOPAZ_AUC_IMEM_SIZE		(32 * 1024)
+/* BBIC4 RevB AuC DMEM bottom 4KB: 0xE510_0000 to 0xE510_0FFF is aliased with Wmac1 TCM 0xE514_0000
+ * exclude the bottom 4K from DMEM, and reduce the size from 16KB to 12KB
+ */
+#define TOPAZ_AUC_DMEM_ADDR		0xE5101000
+#define TOPAZ_AUC_DMEM_SIZE		(12 * 1024)
+#define TOPAZ_REVB_DMEM_SIZE_RESERVED	(4 *1024)
+/***************/
+
+/* Utility functions */
+#ifndef __ASSEMBLY__
+
+	#if defined(__CHECKER__)
+		#define __sram_text
+		#define __sram_data
+	#elif defined(__GNUC__)
+		/*GCC*/
+		#if defined(CONFIG_ARCH_RUBY_NUMA) && defined(__KERNEL__) && defined(__linux__)
+			/* Kernel is compiled with -mlong-calls option, so we can make calls between code fragments placed in different memories */
+			#define __sram_text_sect_name	".sram.text"
+			#define __sram_data_sect_name	".sram.data"
+			#define __sram_text
+			#define __sram_data
+		#else
+			#define __sram_text_sect_name	".text"
+			#define __sram_data_sect_name	".data"
+			#define __sram_text
+			#define __sram_data
+		#endif
+	#else
+		#pragma Offwarn(428)
+	#endif
+
+	RUBY_INLINE int is_valid_mem_addr(unsigned long addr)
+	{
+		if (__in_mem_range(addr, RUBY_SRAM_BEGIN, RUBY_SRAM_SIZE)) {
+			return 1;
+		} else if (__in_mem_range(addr, RUBY_DRAM_BEGIN, RUBY_MAX_DRAM_SIZE)) {
+			return 1;
+		}
+		return 0;
+	}
+
+	#if TOPAZ_MMAP_UNIFIED
+		RUBY_WEAK(virt_to_nocache) void* virt_to_nocache(const void *addr)
+		{
+			unsigned long ret = (unsigned long)addr;
+			if (__in_mem_range(ret, RUBY_SRAM_BEGIN, RUBY_SRAM_SIZE)) {
+				ret = ret - RUBY_SRAM_BEGIN + RUBY_SRAM_NOCACHE_BEGIN;
+			} else if (__in_mem_range(ret, RUBY_DRAM_BEGIN, RUBY_MAX_DRAM_SIZE)) {
+				ret = ret - RUBY_DRAM_BEGIN + RUBY_DRAM_NOCACHE_BEGIN;
+			} else if (ret < RUBY_HARDWARE_BEGIN) {
+				ret = (unsigned long)RUBY_BAD_VIRT_ADDR;
+			}
+			return (void*)ret;
+		}
+		RUBY_WEAK(nocache_to_virt) void* nocache_to_virt(const void *addr)
+		{
+			unsigned long ret = (unsigned long)addr;
+			if (__in_mem_range(ret, RUBY_SRAM_NOCACHE_BEGIN, RUBY_SRAM_SIZE)) {
+				ret = ret - RUBY_SRAM_NOCACHE_BEGIN + RUBY_SRAM_BEGIN;
+			} else if (__in_mem_range(ret, RUBY_DRAM_NOCACHE_BEGIN, RUBY_MAX_DRAM_SIZE)) {
+				ret = ret - RUBY_DRAM_NOCACHE_BEGIN + RUBY_DRAM_BEGIN;
+			} else if (ret < RUBY_HARDWARE_BEGIN) {
+				ret = (unsigned long)RUBY_BAD_VIRT_ADDR;
+			}
+			return (void*)ret;
+		}
+	#endif
+
+	#if RUBY_MUC_TLB_ENABLE
+		#if TOPAZ_MMAP_UNIFIED
+			#define muc_to_nocache virt_to_nocache
+			#define nocache_to_muc nocache_to_virt
+		#else
+			RUBY_WEAK(muc_to_nocache) void* muc_to_nocache(const void *addr)
+			{
+				unsigned long ret = (unsigned long)addr;
+				if (__in_mem_range(ret, RUBY_SRAM_NOFLIP_BEGIN, RUBY_SRAM_SIZE)) {
+					ret = ret - RUBY_SRAM_NOFLIP_BEGIN + RUBY_SRAM_NOFLIP_NOCACHE_BEGIN;
+				} else if (__in_mem_range(ret, RUBY_DRAM_NOFLIP_BEGIN, RUBY_MAX_DRAM_SIZE)) {
+					ret = ret - RUBY_DRAM_NOFLIP_BEGIN + RUBY_DRAM_NOFLIP_NOCACHE_BEGIN;
+				} else if (ret < RUBY_HARDWARE_BEGIN) {
+					ret = (unsigned long)RUBY_BAD_VIRT_ADDR;
+				}
+				return (void*)ret;
+			}
+			RUBY_WEAK(nocache_to_muc) void* nocache_to_muc(const void *addr)
+			{
+				unsigned long ret = (unsigned long)addr;
+				if (__in_mem_range(ret, RUBY_SRAM_NOFLIP_NOCACHE_BEGIN, RUBY_SRAM_SIZE)) {
+					ret = ret - RUBY_SRAM_NOFLIP_NOCACHE_BEGIN + RUBY_SRAM_NOFLIP_BEGIN;
+				} else if (__in_mem_range(ret, RUBY_DRAM_NOFLIP_NOCACHE_BEGIN, RUBY_MAX_DRAM_SIZE)) {
+					ret = ret - RUBY_DRAM_NOFLIP_NOCACHE_BEGIN + RUBY_DRAM_NOFLIP_BEGIN;
+				} else if (ret < RUBY_HARDWARE_BEGIN) {
+					ret = (unsigned long)RUBY_BAD_VIRT_ADDR;
+				}
+				return (void*)ret;
+			}
+		#endif
+		#ifndef MUC_BUILD
+			RUBY_INLINE unsigned long muc_to_lhost(unsigned long addr)
+			{
+				void *tmp = nocache_to_muc((void*)addr);
+				if (tmp != RUBY_BAD_VIRT_ADDR) {
+					addr = (unsigned long)tmp;
+				}
+				return (unsigned long)bus_to_virt(addr);
+			}
+		#endif // #ifndef MUC_BUILD
+	#else
+		#define muc_to_nocache(x) ((void*)(x))
+		#define nocache_to_muc(x) ((void*)(x))
+		#ifndef MUC_BUILD
+			#define muc_to_lhost(x)   ((unsigned long)bus_to_virt((unsigned long)(x)))
+		#endif // #ifndef MUC_BUILD
+	#endif // #if RUBY_MUC_TLB_ENABLE
+
+	#ifndef __GNUC__
+		/*MCC*/
+		#pragma Popwarn()
+	#endif
+
+#endif // #ifndef __ASSEMBLY__
+
+/*
+ * "Write memory barrier" instruction emulation.
+ * Ruby platform has complex net of connected buses.
+ * Write transactions are buffered.
+ * qtn_wmb() guarantees that all issued earlier and pending writes
+ * to system controller, to SRAM and to DDR are completed
+ * before qtn_wmb() is finished.
+ * For complete safety Linux's wmb() should be defined
+ * through qtn_wmb(), but I afraid it would kill performance.
+ */
+#ifndef __ASSEMBLY__
+	#define RUBY_SYS_CTL_SAFE_READ_REGISTER 0xE0000000
+	#if defined(__GNUC__) && defined(__i386__)
+		#define qtn_wmb()		do {} while(0)
+		static inline unsigned long _qtn_addr_wmb(unsigned long *addr) { return *addr; }
+		#define qtn_addr_wmb(addr)	_qtn_addr_wmb((unsigned long *)(addr))
+		#define qtn_pipeline_drain()	do {} while(0)
+	#elif defined(__GNUC__)
+		/*GCC*/
+		#if defined(__arc__)
+			#define qtn_wmb() \
+			({ \
+				unsigned long temp; \
+				__asm__ __volatile__ ( \
+					"ld.di %0, [%1]\n\t" \
+					"ld.di %0, [%2]\n\t" \
+					"ld.di %0, [%3]\n\t" \
+					"sync\n\t" \
+					: "=r"(temp) \
+					: "i"(RUBY_DRAM_BEGIN + CONFIG_ARC_KERNEL_MEM_BASE), "i"(RUBY_SRAM_BEGIN + CONFIG_ARC_KERNEL_SRAM_B1_BASE), "i"(RUBY_SYS_CTL_SAFE_READ_REGISTER) \
+					: "memory"); \
+			})
+			#define qtn_addr_wmb(addr) \
+			({ \
+				unsigned long temp; \
+				__asm__ __volatile__ ( \
+					"ld.di %0, [%1]\n\t" \
+					"sync\n\t" \
+					: "=r"(temp) \
+					: "r"(addr) \
+					: "memory"); \
+				temp; \
+			})
+			#define qtn_pipeline_drain() \
+			({ \
+				__asm__ __volatile__ ( \
+					"sync\n\t" \
+					: : : "memory"); \
+			})
+		#else
+			#define qtn_wmb()
+			#define qtn_addr_wmb(addr)	*((volatile uint32_t*)addr)
+			#define qtn_pipeline_drain()
+		#endif
+	#else
+		/*MCC*/
+		#if _ARCVER >= 0x31/*ARC7*/
+			#define _qtn_pipeline_drain() \
+				sync
+		#else
+			#define _qtn_pipeline_drain() \
+				nop_s; nop_s; nop_s
+		#endif
+		_Asm void qtn_wmb(void)
+		{
+			/*r12 is temporary register, so we can use it inside this function freely*/
+			ld.di %r12, [RUBY_DRAM_BEGIN + CONFIG_ARC_MUC_BASE]
+			ld.di %r12, [RUBY_SRAM_BEGIN + CONFIG_ARC_MUC_SRAM_B1_BASE]
+			ld.di %r12, [RUBY_SYS_CTL_SAFE_READ_REGISTER]
+			_qtn_pipeline_drain()
+		}
+		_Asm u_int32_t qtn_addr_wmb(unsigned long addr)
+		{
+			%reg addr;
+			ld.di %r0, [addr]
+			_qtn_pipeline_drain()
+		}
+		_Asm void qtn_pipeline_drain(void)
+		{
+			_qtn_pipeline_drain()
+		}
+	#endif
+#endif
+
+/*
+ * Problem - writing to first half of cache way trash second half.
+ * Idea is to lock second half.
+ * Need make sure that invalidation does not unlock these lines (whole
+ * cache invalidation unlocks), or need to re-lock lines back.
+ * Also side effect - half of lines will be cached, half - not.
+ * So may need to shuffle data to make hot data cacheable.
+ */
+#define TOPAZ_CACHE_WAR_OFFSET	2048
+#ifndef __ASSEMBLY__
+#ifdef __GNUC__
+RUBY_INLINE void qtn_cache_topaz_war_dcache_lock(unsigned long aux_reg, unsigned long val)
+{
+	unsigned long addr;
+	unsigned long way_iter;
+	unsigned long line_iter;
+
+	asm volatile (
+		"	sr	%4, [%3]\n"
+		"	mov	%0, 0xA0000000\n"
+		"	mov	%1, 0\n"
+		"1:	add	%0, %0, 2048\n"
+		"	mov	%2, 0\n"
+		"2:	sr	%0, [0x49]\n"
+		"	add	%0, %0, 32\n"
+		"	add	%2, %2, 1\n"
+		"	cmp	%2, 64\n"
+		"	bne	2b\n"
+		"	add	%1, %1, 1\n"
+		"	cmp	%1, 4\n"
+		"	bne	1b\n"
+		: "=r"(addr), "=r"(way_iter), "=r"(line_iter)
+		: "r"(aux_reg), "r"(val)
+	);
+}
+#else
+_Inline _Asm  void qtn_cache_topaz_war_dcache_lock(unsigned long aux_reg, unsigned long val)
+{
+	% reg aux_reg, reg val;
+
+	sr	val, [aux_reg]
+	mov	%r0, 0xA0000000
+	mov	%r1, 0
+	1:	add	%r0, %r0, 2048
+	mov	%r2, 0
+	2:	sr	%r0, [0x49]
+	add	%r0, %r0, 32
+	add	%r2, %r2, 1
+	cmp	%r2, 64
+	bne	2b
+	add	%r1, %r1, 1
+	cmp	%r1, 4
+	bne	1b
+}
+#endif // #ifdef __GNUC__
+#endif // #ifndef __ASSEMBLY__
+
+#endif // #ifndef __RUBY_MEM_H
diff --git a/quantenna/common/ruby_partitions.h b/quantenna/common/ruby_partitions.h
new file mode 100644
index 0000000..1af2bc5
--- /dev/null
+++ b/quantenna/common/ruby_partitions.h
@@ -0,0 +1,102 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * Header file which describes Ruby platform.
+ * Has to be used by both kernel and bootloader.
+ */
+
+#ifndef __RUBY_PARTITIONS_H
+#define __RUBY_PARTITIONS_H
+
+#define F64K_UBOOT_PIGGY_PARTITION_SIZE	0x5000
+
+#if defined(FLASH_SUPPORT_256KB)
+	#define F256K_UBOOT_PIGGY_PARTITION_SIZE 0x5000
+	#define F256K_ENV_PARTITION_SIZE	0x18000
+#endif
+#define F64K_ENV_PARTITION_SIZE         0x6000
+
+#define UBOOT_TEXT_PARTITION_SIZE	0x20000
+#define UBOOT_TINY_TEXT_PARTITION_SIZE	UBOOT_TEXT_PARTITION_SIZE
+#if defined(FLASH_SUPPORT_256KB)
+	#define UBOOT_ENV_PARTITION_SIZE	0x40000
+#else
+	#define UBOOT_ENV_PARTITION_SIZE        0x10000
+#endif
+#define UBOOT_ENV_PARTITION_ADDR	UBOOT_TEXT_PARTITION_SIZE
+
+/*
+ * Make sure CONFIG_ENV_SIZE in file carve_env_partition.sh is the same value
+ */
+#if defined(FLASH_SUPPORT_256KB)
+	#define BOOT_CFG_SIZE			(96 * 1024)
+#elif defined(FLASH_SUPPORT_64KB)
+	#define BOOT_CFG_SIZE			(24 * 1024)
+#else
+	#define BOOT_CFG_SIZE			(64 * 1024)
+#endif
+
+#if defined(FLASH_SUPPORT_256KB)
+	#define BOOT_CFG_BASE_SIZE	(24 * 1024)
+#else
+	#define BOOT_CFG_BASE_SIZE      (16 * 1024)
+#endif
+
+#define BOOT_CFG_DATA_SIZE		(BOOT_CFG_SIZE - sizeof(u32))
+#define BOOT_CFG_DEF_START		(0x1000)
+
+#define RUBY_MIN_DATA_PARTITION_SIZE	(512 * 1024)
+#define IMAGES_START_ADDR		(UBOOT_ENV_PARTITION_ADDR + UBOOT_ENV_PARTITION_SIZE * 2)
+#define NON_IMAGE_SIZE			(UBOOT_TEXT_PARTITION_SIZE +		\
+						UBOOT_ENV_PARTITION_SIZE * 2 +	\
+						RUBY_MIN_DATA_PARTITION_SIZE)
+#define TINY_CFG_NON_IMAGE_SIZE		(UBOOT_TINY_TEXT_PARTITION_SIZE +	\
+						UBOOT_ENV_PARTITION_SIZE * 2 +	\
+						UBOOT_TEXT_PARTITION_SIZE * 2 +	\
+						RUBY_MIN_DATA_PARTITION_SIZE)
+
+#define IMG_SIZE_8M_FLASH_2_IMG		((FLASH_8MB - NON_IMAGE_SIZE) / 2)
+#define IMG_SIZE_8M_FLASH_1_IMG		((FLASH_8MB - NON_IMAGE_SIZE) / 1)
+#define IMG_SIZE_16M_FLASH_2_IMG	((FLASH_16MB - NON_IMAGE_SIZE) / 2)
+#define IMG_SIZE_16M_FLASH_1_IMG	((FLASH_16MB - NON_IMAGE_SIZE) / 1)
+
+#define TINY_CFG_SIZE_16M_FLASH_1_IMG	(FLASH_16MB - TINY_CFG_NON_IMAGE_SIZE)
+#define UBOOT_SAFE_PARTITION_ADDR	(IMAGES_START_ADDR + TINY_CFG_SIZE_16M_FLASH_1_IMG)
+#define UBOOT_LIVE_PARTITION_ADDR	(UBOOT_SAFE_PARTITION_ADDR + UBOOT_TEXT_PARTITION_SIZE)
+
+#define MTD_PARTNAME_UBOOT_BIN		"uboot"
+#define MTD_PARTNAME_UBOOT_TINY_BIN	"uboot_tiny"
+#define MTD_PARTNAME_UBOOT_SAFETY	"uboot_safety"
+#define MTD_PARTNAME_UBOOT_LIVE		"uboot_live"
+#define MTD_PARTNAME_UBOOT_ENV		"uboot_env"
+#define MTD_PARTNAME_UBOOT_ENV_BAK	"uboot_env_bak"
+#define MTD_PARTNAME_LINUX_SAFETY	"linux_safety"
+#define MTD_PARTNAME_LINUX_LIVE		"linux_live"
+#define MTD_PARTNAME_DATA		"data"
+#define MTD_PARTNAME_EXTEND		"extend"
+
+#define IMG_SIZE_LIMIT_PLATFORM	IMG_SIZE_16M_FLASH_2_IMG
+
+#endif // #ifndef __RUBY_PARTITIONS_H
+
+
diff --git a/quantenna/common/ruby_pcie_bda.h b/quantenna/common/ruby_pcie_bda.h
new file mode 100644
index 0000000..89091ae
--- /dev/null
+++ b/quantenna/common/ruby_pcie_bda.h
@@ -0,0 +1,136 @@
+/*

+ * (C) Copyright 2011 Quantenna Communications Inc.

+ *

+ * See file CREDITS for list of people who contributed to this

+ * project.

+ *

+ * This program is free software; you can redistribute it and/or

+ * modify it under the terms of the GNU General Public License as

+ * published by the Free Software Foundation; either version 2 of

+ * the License, or (at your option) any later version.

+ *

+ * This program is distributed in the hope that it will be useful,

+ * but WITHOUT ANY WARRANTY; without even the implied warranty of

+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

+ * GNU General Public License for more details.

+ *

+ * You should have received a copy of the GNU General Public License

+ * along with this program; if not, write to the Free Software

+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,

+ * MA 02111-1307 USA

+ */

+

+/*

+ * Header file which describes Ruby PCI Express Boot Data Area

+ * Has to be used by both kernel and bootloader.

+ */

+

+#ifndef RUBY_PCIE_BDA_H

+#define RUBY_PCIE_BDA_H

+

+/* Area mapped by via the BAR visible to the host */

+#define RUBY_PCIE_BDA_ADDR		CONFIG_ARC_PCIE_BASE

+#define RUBY_PCIE_BDA_SIZE		CONFIG_ARC_PCIE_SIZE

+

+#define RUBY_BDA_VADDR			(RUBY_PCIE_BDA_ADDR + 0x80000000)

+

+

+#define QDPC_PCIE_BDA_VERSION	0x1000

+

+#define QDPC_BDA_PCIE_INIT		0x01

+#define QDPC_BDA_PCIE_RDY		0x02

+#define QDPC_BDA_FW_LOAD_RDY		0x03

+#define QDPC_BDA_FW_LOAD_DONE		0x04

+#define QDPC_BDA_FW_START		0x05

+#define QDPC_BDA_FW_RUN			0x06

+#define QDPC_BDA_FW_HOST_RDY		0x07

+#define QDPC_BDA_FW_TARGET_RDY		0x11

+#define QDPC_BDA_FW_TARGET_BOOT		0x12

+#define QDPC_BDA_FW_FLASH_BOOT		0x13

+#define QDPC_BDA_FW_HOST_LOAD		0x08

+#define QDPC_BDA_FW_BLOCK_DONE		0x09

+#define QDPC_BDA_FW_BLOCK_RDY		0x0A

+#define QDPC_BDA_FW_EP_RDY		0x0B

+#define QDPC_BDA_FW_BLOCK_END		0x0C

+#define QDPC_BDA_FW_CONFIG		0x0D

+#define QDPC_BDA_FW_RUNNING		0x0E

+

+#define QDPC_BDA_PCIE_FAIL		0x82

+#define QDPC_BDA_FW_LOAD_FAIL		0x85

+

+

+#define PCIE_BDA_RCMODE                 BIT(1)

+#define PCIE_BDA_MSI                    BIT(2)

+#define PCIE_BDA_BAR64                  BIT(3)

+#define PCIE_BDA_FLASH_PRESENT          BIT(4)  /* Tell the Host if EP have flash contain firmware */

+#define PCIE_BDA_FLASH_BOOT             BIT(5)  /* Tell TARGET to boot from flash */

+#define PCIE_BDA_XMIT_UBOOT             BIT(6) /* EP ask for u-boot.bin */

+#define PCIE_BDA_TARGET_FBOOT_ERR       BIT(8)  /* TARGET flash boot failed */

+#define PCIE_BDA_TARGET_FWLOAD_ERR      BIT(9)  /* TARGET firmware load failed */

+#define PCIE_BDA_HOST_NOFW_ERR          BIT(12) /* Host not find any firmware */

+#define PCIE_BDA_HOST_MEMALLOC_ERR      BIT(13) /* Host malloc firmware download memory block failed */

+#define PCIE_BDA_HOST_MEMMAP_ERR        BIT(14) /* Host pci map download memory block failed */

+#define PCIE_BDA_VER(x)                 (((x) >> 4) & 0xFF)

+#define PCIE_BDA_ERROR_MASK             0xFF00  /* take the second 8 bits as error flag */

+

+#define PCIE_DMA_OFFSET_ERROR		0xFFFF

+#define PCIE_DMA_OFFSET_ERROR_MASK	0xFFFF

+

+#define PCIE_BDA_NAMELEN		32

+

+#define QDPC_PCI_ENDIAN_DETECT_DATA	0x12345678

+#define QDPC_PCI_ENDIAN_REVERSE_DATA	0x78563412

+

+#define QDPC_PCI_ENDIAN_VALID_STATUS	0x3c3c3c3c

+#define QDPC_PCI_ENDIAN_INVALID_STATUS	0

+

+#define QDPC_PCI_LITTLE_ENDIAN		0

+#define	QDPC_PCI_BIG_ENDIAN		0xffffffff

+

+#define QDPC_SCHED_TIMEOUT		(HZ / 20)

+

+#define PCIE_DMA_ISSUE_LOG_NUM		128

+

+#define PCIE_RC_TX_QUEUE_LEN		256

+#define PCIE_TX_VALID_PKT		0x80000000

+#define PCIE_PKT_LEN_MASK		0xffff

+

+struct vmac_pkt_info {

+	uint32_t addr;

+	uint32_t info;

+};

+

+typedef struct qdpc_pcie_bda {

+	uint16_t	bda_len;			/* Size of BDA block */

+	uint16_t	bda_version;			/* BDA version */

+	uint32_t	bda_bootstate;			/* Boot state of device */

+	uint32_t	bda_dma_mask;			/* Number of addressable DMA bits */

+	uint32_t	bda_dma_offset;			/* HW specific offset for DMA engine */

+	uint32_t	bda_flags;

+	uint32_t	bda_img;			/* Current load image block */

+	uint32_t	bda_img_size;			/* Current load image block size */

+	uint32_t	bda_ep2h_irqstatus;		/* Added here to allow boot loader to use irqs if desired */

+	uint32_t	bda_h2ep_irqstatus;		/* Added here to allow boot loader to use irqs if desired */

+	uint32_t	bda_msi_addr;

+	uint8_t		reserved1[56];			/* Reserve 56 bytes to make it compatible with older version */

+	uint32_t	bda_flashsz;

+	char		bda_boardname[PCIE_BDA_NAMELEN];

+	uint32_t	bda_pci_pre_status;		/* PCI endian check previous status */

+	uint32_t	bda_pci_endian;			/* Check pci memory endian format */

+	uint32_t	bda_pci_post_status;		/* PCI endian check post status */

+	int32_t		bda_h2ep_txd_budget;		/* txdone replenish budget for ep */

+	int32_t		bda_ep2h_txd_budget;		/* txdone replenish budget for host */

+	uint32_t	bda_rc_rx_bd_base;		/* EP rx buffer descriptors base address */

+	uint32_t	bda_rc_rx_bd_num;

+	uint32_t	bda_rc_tx_bd_base;		/* RC rx buffer descriptors base address */

+	uint32_t	bda_rc_tx_bd_num;

+	uint8_t		bda_ep_link_state;

+	uint8_t		bda_rc_link_state;

+	uint8_t		bda_rc_msi_enabled;

+	uint8_t		reserved2;

+        uint32_t        bda_ep_next_pkt;		/* A pointer to RC's memory specifying next packet to be handled by EP */

+	struct vmac_pkt_info request[PCIE_RC_TX_QUEUE_LEN];

+} qdpc_pcie_bda_t;

+

+#endif

+

diff --git a/quantenna/common/ruby_platform.h b/quantenna/common/ruby_platform.h
new file mode 100644
index 0000000..9708d63
--- /dev/null
+++ b/quantenna/common/ruby_platform.h
@@ -0,0 +1,818 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * Header file which describes Ruby platform.
+ * Has to be used by both kernel and bootloader.
+ */
+
+#ifndef __RUBY_PLATFORM_H
+#define __RUBY_PLATFORM_H
+
+#include "ruby_config.h"
+
+/*****************************************************************************/
+/*****************************************************************************/
+/* Common                                                                    */
+/*****************************************************************************/
+#define RUBY_BIT(x)			(1 << (x))
+/*****************************************************************************/
+/* DRAM registers                                                            */
+/*****************************************************************************/
+#define RUBY_DDR_BASE_ADDR		TOPAZ_ALIAS_MAP_SWITCH(0xF6000000, 0xE40E0000)
+#define RUBY_DDR_CONTROL		(RUBY_DDR_BASE_ADDR + 0x0)
+#define RUBY_DDR_CONTROL_POWERDOWN_EN	RUBY_BIT(1)
+#define RUBY_DDR_SETTLE_US		(4)
+/*****************************************************************************/
+/*****************************************************************************/
+/* GPIO constants                                                            */
+/*****************************************************************************/
+#define RUBY_GPIO_MAX			(32)
+#define RUBY_GPIO_MODE1_MAX		(11)
+#define RUBY_GPIO_MODE2_MAX		(22)
+#define RUBY_GPIO_IRQ_MAX		(16)
+/*****************************************************************************/
+/* GPIO registers                                                            */
+/*****************************************************************************/
+#define RUBY_GPIO_REGS_ADDR		TOPAZ_ALIAS_MAP_SWITCH(0xF1000000, 0xE4090000)
+#define RUBY_GPIO_INPUT			(RUBY_GPIO_REGS_ADDR + 0x00)
+#define GPIO_INPUT			RUBY_GPIO_INPUT
+#define RUBY_GPIO_OMASK			(RUBY_GPIO_REGS_ADDR + 0x04)
+#define GPIO_OUTPUT_MASK		RUBY_GPIO_OMASK
+#define RUBY_GPIO_OUTPUT		(RUBY_GPIO_REGS_ADDR + 0x08)
+#define GPIO_OUTPUT			RUBY_GPIO_OUTPUT
+#define RUBY_GPIO_MODE1			(RUBY_GPIO_REGS_ADDR + 0x0c)
+#define GPIO_MODE1			RUBY_GPIO_MODE1
+#define RUBY_GPIO_MODE2			(RUBY_GPIO_REGS_ADDR + 0x10)
+#define GPIO_MODE2			RUBY_GPIO_MODE2
+#define RUBY_GPIO_AFSEL			(RUBY_GPIO_REGS_ADDR + 0x14)
+#define GPIO_ALTFN			RUBY_GPIO_AFSEL
+#define RUBY_GPIO_DEF			(RUBY_GPIO_REGS_ADDR + 0x18)
+#define	RUBY_GPIO1_PWM0			(RUBY_GPIO_REGS_ADDR + 0x20) /* AFSEL: UART1 (input) */
+#define	RUBY_GPIO9_PWM2			(RUBY_GPIO_REGS_ADDR + 0x28) /* AFSEL: UART1 (output) */
+/*****************************************************************************/
+/* GPIO pins                                                                 */
+/*****************************************************************************/
+#define RUBY_GPIO_PIN0			(0)
+#define RUBY_GPIO_PIN1			(1)
+#define RUBY_GPIO_PIN2			(2)
+#define RUBY_GPIO_PIN3			(3)
+#define RUBY_GPIO_PIN4			(4)
+#define RUBY_GPIO_PIN5			(5)
+#define RUBY_GPIO_PIN6			(6)
+#define RUBY_GPIO_PIN7			(7)
+#define RUBY_GPIO_PIN8			(8)
+#define RUBY_GPIO_PIN9			(9)
+#define RUBY_GPIO_PIN10			(10)
+#define RUBY_GPIO_PIN11			(11)
+#define RUBY_GPIO_PIN12			(12)
+#define RUBY_GPIO_PIN13			(13)
+#define RUBY_GPIO_PIN14			(14)
+#define RUBY_GPIO_PIN15			(15)
+#define RUBY_GPIO_PIN16			(16)
+#define RUBY_GPIO_PIN17			(17)
+
+#define RUBY_GPIO_UART0_SI		(0)
+#define RUBY_GPIO_UART0_SO		(8)
+#define RUBY_GPIO_UART1_SI		(1)
+#define RUBY_GPIO_UART1_SO		(9)
+/* these are for spi1, bga has dedicated spi0 pins */
+#define RUBY_GPIO_SPI_MISO		(2)
+#define RUBY_GPIO_SPI_SCK		(6)
+#define RUBY_GPIO_SPI_MOSI		(5)
+#define RUBY_GPIO_SPI_nCS		(4)
+
+#define RUBY_GPIO_LNA_TOGGLE		(7)
+
+#define RUBY_GPIO_RTD			(3)	/* Reset to default */
+#define RUBY_GPIO_WPS			(7)
+#define RUBY_GPIO_I2C_SCL		(10)
+#define RUBY_GPIO_I2C_SDA		(11)
+#define RUBY_GPIO_WLAN_DISABLE		(12)
+#define RUBY_GPIO_LED1			(13)
+#define RUBY_GPIO_RFIC_INTR		(14)
+
+#ifndef TOPAZ_AMBER_IP
+#define RUBY_GPIO_RFIC_RESET		(15)
+#else
+#define RUBY_GPIO_RFIC_RESET		(10)
+#endif
+
+#define RUBY_GPIO_LED2			(16)
+
+/*****************************************************************************/
+/* GPIO function constants                                                   */
+/*****************************************************************************/
+#define RUBY_GPIO_MODE_INPUT		(0)
+#define GPIO_MODE_INPUT				RUBY_GPIO_MODE_INPUT
+#define RUBY_GPIO_MODE_OUTPUT		(1)
+#define GPIO_MODE_OUTPUT			RUBY_GPIO_MODE_OUTPUT
+#define RUBY_GPIO_MODE_OPEN_SOURCE	(2)
+#define RUBY_GPIO_MODE_OPEN_DRAIN	(3)
+#define RUBY_GPIO_ALT_INPUT			(4)
+#define RUBY_GPIO_ALT_OUTPUT		(5)
+#define RUBY_GPIO_ALT_OPEN_SOURCE	(6)
+#define RUBY_GPIO_ALT_OPEN_DRAIN	(7)
+#define	GPIO_PIN(x)			(x)
+#define	GPIO_OUTPUT_LO			(0)
+#define	GPIO_OUTPUT_HI			(1)
+/*****************************************************************************/
+/*****************************************************************************/
+/* UART FIFO size                                                            */
+/*****************************************************************************/
+#define RUBY_UART_FIFO_SIZE		(16)
+/*****************************************************************************/
+/* UART register addresses                                                   */
+/*****************************************************************************/
+#define RUBY_UART0_BASE_ADDR		TOPAZ_ALIAS_MAP_SWITCH(0xF0000000, 0xE4080000)
+#define RUBY_UART0_RBR_THR_DLL		(RUBY_UART0_BASE_ADDR + 0x00)
+#define RUBY_UART0_DLH_IER		(RUBY_UART0_BASE_ADDR + 0x04)
+#define RUBY_UART0_IIR_FCR_LCR		(RUBY_UART0_BASE_ADDR + 0x08)
+#define RUBY_UART0_LCR			(RUBY_UART0_BASE_ADDR + 0x0c)
+#define RUBY_UART0_MCR			(RUBY_UART0_BASE_ADDR + 0x10)
+#define RUBY_UART0_LSR			(RUBY_UART0_BASE_ADDR + 0x14)
+#define RUBY_UART0_MSR			(RUBY_UART0_BASE_ADDR + 0x18)
+#define RUBY_UART0_SCR			(RUBY_UART0_BASE_ADDR + 0x1c)
+#define RUBY_UART0_LPDLL		(RUBY_UART0_BASE_ADDR + 0x20)
+#define RUBY_UART0_LPDLH		(RUBY_UART0_BASE_ADDR + 0x24)
+#define RUBY_UART0_SRBR			(RUBY_UART0_BASE_ADDR + 0x30)
+#define RUBY_UART0_STHR			(RUBY_UART0_BASE_ADDR + 0x34)
+#define RUBY_UART0_FAR			(RUBY_UART0_BASE_ADDR + 0x70)
+#define RUBY_UART0_TFR			(RUBY_UART0_BASE_ADDR + 0x74)
+#define RUBY_UART0_RFW			(RUBY_UART0_BASE_ADDR + 0x78)
+#define RUBY_UART0_USR			(RUBY_UART0_BASE_ADDR + 0x7c)
+#define RUBY_UART0_TFL			(RUBY_UART0_BASE_ADDR + 0x80)
+#define RUBY_UART0_RFL			(RUBY_UART0_BASE_ADDR + 0x84)
+#define RUBY_UART0_SRR			(RUBY_UART0_BASE_ADDR + 0x88)
+#define RUBY_UART0_SRTS			(RUBY_UART0_BASE_ADDR + 0x8c)
+#define RUBY_UART0_SBCR			(RUBY_UART0_BASE_ADDR + 0x90)
+#define RUBY_UART0_SDMAM		(RUBY_UART0_BASE_ADDR + 0x94)
+#define RUBY_UART0_SFE			(RUBY_UART0_BASE_ADDR + 0x98)
+#define RUBY_UART0_SRT			(RUBY_UART0_BASE_ADDR + 0x9c)
+#define RUBY_UART0_STET			(RUBY_UART0_BASE_ADDR + 0xa0)
+#define RUBY_UART0_HTX			(RUBY_UART0_BASE_ADDR + 0xa4)
+#define RUBY_UART0_DMASA		(RUBY_UART0_BASE_ADDR + 0xa8)
+#define RUBY_UART0_CPR			(RUBY_UART0_BASE_ADDR + 0xf4)
+#define RUBY_UART0_UCV			(RUBY_UART0_BASE_ADDR + 0xf8)
+#define RUBY_UART0_CTR			(RUBY_UART0_BASE_ADDR + 0xfc)
+
+#define RUBY_UART1_BASE_ADDR		TOPAZ_ALIAS_MAP_SWITCH(0xF5000000, 0xE40D0000)
+#define RUBY_UART1_RBR_THR_DLL		(RUBY_UART1_BASE_ADDR + 0x00)
+#define RUBY_UART1_DLH_IER		(RUBY_UART1_BASE_ADDR + 0x04)
+#define RUBY_UART1_IIR_FCR_LCR		(RUBY_UART1_BASE_ADDR + 0x08)
+#define RUBY_UART1_LCR			(RUBY_UART1_BASE_ADDR + 0x0c)
+#define RUBY_UART1_MCR			(RUBY_UART1_BASE_ADDR + 0x10)
+#define RUBY_UART1_LSR			(RUBY_UART1_BASE_ADDR + 0x14)
+#define RUBY_UART1_MSR			(RUBY_UART1_BASE_ADDR + 0x18)
+#define RUBY_UART1_SCR			(RUBY_UART1_BASE_ADDR + 0x1c)
+#define RUBY_UART1_LPDLL		(RUBY_UART1_BASE_ADDR + 0x20)
+#define RUBY_UART1_LPDLH		(RUBY_UART1_BASE_ADDR + 0x24)
+#define RUBY_UART1_SRBR			(RUBY_UART1_BASE_ADDR + 0x30)
+#define RUBY_UART1_STHR			(RUBY_UART1_BASE_ADDR + 0x34)
+#define RUBY_UART1_FAR			(RUBY_UART1_BASE_ADDR + 0x70)
+#define RUBY_UART1_TFR			(RUBY_UART1_BASE_ADDR + 0x74)
+#define RUBY_UART1_RFW			(RUBY_UART1_BASE_ADDR + 0x78)
+#define RUBY_UART1_USR			(RUBY_UART1_BASE_ADDR + 0x7c)
+#define RUBY_UART1_TFL			(RUBY_UART1_BASE_ADDR + 0x80)
+#define RUBY_UART1_RFL			(RUBY_UART1_BASE_ADDR + 0x84)
+#define RUBY_UART1_SRR			(RUBY_UART1_BASE_ADDR + 0x88)
+#define RUBY_UART1_SRTS			(RUBY_UART1_BASE_ADDR + 0x8c)
+#define RUBY_UART1_SBCR			(RUBY_UART1_BASE_ADDR + 0x90)
+#define RUBY_UART1_SDMAM		(RUBY_UART1_BASE_ADDR + 0x94)
+#define RUBY_UART1_SFE			(RUBY_UART1_BASE_ADDR + 0x98)
+#define RUBY_UART1_SRT			(RUBY_UART1_BASE_ADDR + 0x9c)
+#define RUBY_UART1_STET			(RUBY_UART1_BASE_ADDR + 0xa0)
+#define RUBY_UART1_HTX			(RUBY_UART1_BASE_ADDR + 0xa4)
+#define RUBY_UART1_DMASA		(RUBY_UART1_BASE_ADDR + 0xa8)
+#define RUBY_UART1_CPR			(RUBY_UART1_BASE_ADDR + 0xf4)
+#define RUBY_UART1_UCV			(RUBY_UART1_BASE_ADDR + 0xf8)
+#define RUBY_UART1_CTR			(RUBY_UART1_BASE_ADDR + 0xfc)
+
+/*****************************************************************************/
+/* UART Status Register - USR                                                */
+/*****************************************************************************/
+#define RUBY_USR_TX_Fifo_Empty		0x04
+#define RUBY_USR_RX_Fifo_Full		0x10
+#define RUBY_USR_TX_Fifo_nFull		0x02
+#define RUBY_USR_RX_Fifo_nEmpty		0x08
+#define RUBY_USR_Busy			0x01
+/*****************************************************************************/
+/* Line Status Register - LSR                                                */
+/*****************************************************************************/
+#define RUBY_LSR_TX_Empty		0x40
+#define RUBY_LSR_RX_Ready		0x01
+/*****************************************************************************/
+/* Line Control Register - LCR                                               */
+/*****************************************************************************/
+#define RUBY_LCR_Data_Word_Length_5	0x0
+#define RUBY_LCR_Data_Word_Length_6	0x1
+#define RUBY_LCR_Data_Word_Length_7	0x2
+#define RUBY_LCR_Data_Word_Length_8	0x3
+#define RUBY_LCR_Stop_Bit_1		0x0
+#define RUBY_LCR_Stop_Bit_2		0x4
+#define RUBY_LCR_No_Parity		0x0
+#define RUBY_LCR_Odd_Parity		0x8
+#define RUBY_LCR_Even_Parity		0x18
+#define RUBY_LCR_High_Parity		0x28
+#define RUBY_LCR_Low_Parity		0x38
+#define RUBY_LCR_Break_Disable		0x0
+#define RUBY_LCR_Break_Enable		0x40
+#define RUBY_LCR_DLAB			0x80
+/*****************************************************************************/
+/*****************************************************************************/
+/* Timer constants                                                           */
+/*****************************************************************************/
+#define RUBY_TIMER_INT_MASK		(RUBY_BIT(2))
+#define RUBY_TIMER_SINGLE		(RUBY_BIT(1))
+#define RUBY_TIMER_ENABLE		(RUBY_BIT(0))
+/*****************************************************************************/
+#define RUBY_CPU_TIMERS			(2)
+#define RUBY_NUM_TIMERS			(4)
+#define RUBY_TIMER_MUC_CCA              (3)
+#define RUBY_TIMER_FREQ                 125000000
+
+#define RUBY_TIMER_MUC_CCA_FREQ_SHIFT    2    /* shift from 1ms base */
+#define RUBY_TIMER_MUC_CCA_FREQ          (1000 << RUBY_TIMER_MUC_CCA_FREQ_SHIFT)
+#define RUBY_TIMER_MUC_CCA_LIMIT         (RUBY_TIMER_FREQ / RUBY_TIMER_MUC_CCA_FREQ)
+#define RUBY_TIMER_MUC_CCA_INTV          (1000 >> RUBY_TIMER_MUC_CCA_FREQ_SHIFT)    /* microseconds */
+#define RUBY_TIMER_MUC_CCA_CNT2MS(_v)    ((_v) >> RUBY_TIMER_MUC_CCA_FREQ_SHIFT)
+/*****************************************************************************/
+#define RUBY_TIMER_BASE_ADDR		TOPAZ_ALIAS_MAP_SWITCH(0xF3000000, 0xE40B0000)
+#define RUBY_TIMER_CHANNEL		(0x14)
+#define RUBY_TIMER_LOAD_COUNT(x)	(RUBY_TIMER_BASE_ADDR + ((x)*RUBY_TIMER_CHANNEL) + 0)
+#define RUBY_TIMER_VALUE(x)		(RUBY_TIMER_BASE_ADDR + ((x)*RUBY_TIMER_CHANNEL) + 4)
+#define RUBY_TIMER_CONTROL(x)		(RUBY_TIMER_BASE_ADDR + ((x)*RUBY_TIMER_CHANNEL) + 8)
+#define RUBY_TIMER_EOI(x)		(RUBY_TIMER_BASE_ADDR + ((x)*RUBY_TIMER_CHANNEL) + 12)
+#define RUBY_TIMER_INTSTAT(x)		(RUBY_TIMER_BASE_ADDR + ((x)*RUBY_TIMER_CHANNEL) + 16)
+/*****************************************************************************/
+#define RUBY_TIMER_GLOBAL_INT_STATUS	(RUBY_TIMER_BASE_ADDR + 0xa0)
+#define RUBY_TIMER_GLOBAL_EOI		(RUBY_TIMER_BASE_ADDR + 0xa4)
+#define RUBY_TIMER_GLOBAL_RAW_STATUS	(RUBY_TIMER_BASE_ADDR + 0xa8)
+#define RUBY_TIMER_GLOBAL_COMP_VER	(RUBY_TIMER_BASE_ADDR + 0xac)
+/*****************************************************************************/
+#define RUBY_TIMER_ORINT_EN(x)		(1 << (18 + (x)))
+/*****************************************************************************/
+/*****************************************************************************/
+/* ENET registers                                                            */
+/*****************************************************************************/
+#define RUBY_ENET0_BASE_ADDR		TOPAZ_ALIAS_MAP_SWITCH(0xED000000, 0xE4070000)
+#define RUBY_ENET1_BASE_ADDR		TOPAZ_ALIAS_MAP_SWITCH(0xE8000000, 0xE4040000)
+/*****************************************************************************/
+/*****************************************************************************/
+/* System controller registers                                               */
+/*****************************************************************************/
+#define RUBY_SYS_CTL_BASE_ADDR_NOMAP		0xE0000000
+#define RUBY_SYS_CTL_BASE_ADDR			TOPAZ_ALIAS_MAP_SWITCH(RUBY_SYS_CTL_BASE_ADDR_NOMAP, 0xE4000000)
+#define RUBY_SYS_CTL_CPU_VEC_MASK		(RUBY_SYS_CTL_BASE_ADDR + 0x00)
+#define RUBY_SYS_CTL_CPU_VEC			(RUBY_SYS_CTL_BASE_ADDR + 0x04)
+#define RUBY_SYS_CTL_MASK			(RUBY_SYS_CTL_BASE_ADDR + 0x08)
+#define RUBY_SYS_CTL_CTRL			(RUBY_SYS_CTL_BASE_ADDR + 0x0c)
+#define RUBY_SYS_CTL_RESET_CAUSE		(RUBY_SYS_CTL_BASE_ADDR + 0x10)
+#define RUBY_SYS_CTL_CSR			(RUBY_SYS_CTL_BASE_ADDR + 0x14)
+#define RUBY_SYS_CTL_DEBUG_SEL			(RUBY_SYS_CTL_BASE_ADDR + 0x18)
+#define RUBY_SYS_CTL_L2M_INT			(RUBY_SYS_CTL_BASE_ADDR + 0x1C)
+#define RUBY_SYS_CTL_L2M_INT_MASK		(RUBY_SYS_CTL_BASE_ADDR + 0x20)
+#define RUBY_SYS_CTL_L2D_INT			(RUBY_SYS_CTL_BASE_ADDR + PLATFORM_REG_SWITCH(0x24, 0x34))
+#define RUBY_SYS_CTL_L2D_INT_MASK		(RUBY_SYS_CTL_BASE_ADDR + PLATFORM_REG_SWITCH(0x28, 0x38))
+#define RUBY_SYS_CTL_M2L_INT			(RUBY_SYS_CTL_BASE_ADDR + 0x2C)
+#define RUBY_SYS_CTL_M2L_INT_MASK		(RUBY_SYS_CTL_BASE_ADDR + 0x30)
+#define RUBY_SYS_CTL_M2D_INT			(RUBY_SYS_CTL_BASE_ADDR + PLATFORM_REG_SWITCH(0x34, 0x24))
+#define RUBY_SYS_CTL_M2D_INT_MASK		(RUBY_SYS_CTL_BASE_ADDR + PLATFORM_REG_SWITCH(0x38, 0x28))
+#define RUBY_SYS_CTL_D2L_INT			(RUBY_SYS_CTL_BASE_ADDR + 0x3C)
+#define RUBY_SYS_CTL_D2L_INT_MASK		(RUBY_SYS_CTL_BASE_ADDR + 0x40)
+#define RUBY_SYS_CTL_D2M_INT			(RUBY_SYS_CTL_BASE_ADDR + 0x44)
+#define RUBY_SYS_CTL_D2M_INT_MASK		(RUBY_SYS_CTL_BASE_ADDR + 0x48)
+#define RUBY_SYS_CTL_LHOST_INT_EN		(RUBY_SYS_CTL_BASE_ADDR + 0x4C)
+#define RUBY_SYS_CTL_MUC_INT_EN			(RUBY_SYS_CTL_BASE_ADDR + 0x50)
+#define RUBY_SYS_CTL_DSP_INT_EN			(RUBY_SYS_CTL_BASE_ADDR + 0x54)
+#define RUBY_SYS_CTL_LHOST_ORINT_EN		(RUBY_SYS_CTL_BASE_ADDR + 0x58)
+#define RUBY_SYS_CTL_MUC_ORINT_EN		(RUBY_SYS_CTL_BASE_ADDR + 0x5C)
+#define RUBY_SYS_CTL_DSP_ORINT_EN		(RUBY_SYS_CTL_BASE_ADDR + 0x60)
+#define RUBY_SYS_CTL_MUC_REMAP			(RUBY_SYS_CTL_BASE_ADDR + 0x64)
+#define RUBY_SYS_CTL_DSP_REMAP			(RUBY_SYS_CTL_BASE_ADDR + 0x68)
+#define RUBY_SYS_CTL_PCIE_CFG0			(RUBY_SYS_CTL_BASE_ADDR + 0x6C)
+#define RUBY_SYS_CTL_PCIE_CFG1			(RUBY_SYS_CTL_BASE_ADDR + 0x70)
+#define RUBY_SYS_CTL_PCIE_CFG2			(RUBY_SYS_CTL_BASE_ADDR + 0x74)
+#define RUBY_SYS_CTL_PCIE_CFG3			(RUBY_SYS_CTL_BASE_ADDR + 0x78)
+#define RUBY_SYS_CTL_PCIE_CFG4			(RUBY_SYS_CTL_BASE_ADDR + 0x7C)
+#define RUBY_SYS_CTL_PLL0_CTRL			(RUBY_SYS_CTL_BASE_ADDR + 0x80)
+#define RUBY_SYS_CTL_PLL1_CTRL			(RUBY_SYS_CTL_BASE_ADDR + 0x84)
+#define RUBY_SYS_CTL_LHOST_ID			(RUBY_SYS_CTL_BASE_ADDR + 0x88)
+#define RUBY_SYS_CTL_PLL2_CTRL			(RUBY_SYS_CTL_BASE_ADDR + 0x8C)
+#define RUBY_SYS_CTL_MUC_ID			(RUBY_SYS_CTL_BASE_ADDR + 0x90)
+#define RUBY_SYS_CTL_L2M_SEM			(RUBY_SYS_CTL_BASE_ADDR + 0x94)
+#define RUBY_SYS_CTL_M2L_SEM			(RUBY_SYS_CTL_BASE_ADDR + 0x98)
+#define RUBY_SYS_CTL_L2D_SEM			(RUBY_SYS_CTL_BASE_ADDR + 0x9C)
+#define RUBY_SYS_CTL_D2L_SEM			(RUBY_SYS_CTL_BASE_ADDR + 0xA0)
+#define RUBY_SYS_CTL_M2D_SEM			(RUBY_SYS_CTL_BASE_ADDR + 0xA4)
+#define RUBY_SYS_CTL_D2M_SEM			(RUBY_SYS_CTL_BASE_ADDR + 0xA8)
+#define RUBY_SYS_CTL_INTR_INV0			(RUBY_SYS_CTL_BASE_ADDR + 0xAC)
+#define RUBY_SYS_CTL_INTR_INV1			(RUBY_SYS_CTL_BASE_ADDR + 0xB0)
+#define RUBY_SYS_CTL_GMII_CLKDLL		(RUBY_SYS_CTL_BASE_ADDR + 0xB4)
+#define RUBY_SYS_CTL_DEBUG_BUS			(RUBY_SYS_CTL_BASE_ADDR + 0xB8)
+#define RUBY_SYS_CTL_SPARE			(RUBY_SYS_CTL_BASE_ADDR + 0xBC)
+#define RUBY_SYS_CTL_PCIE_INT_MASK		(RUBY_SYS_CTL_BASE_ADDR + 0xC0)
+#define	RUBY_SYS_CTL_GPIO_IRQ_SEL		(RUBY_SYS_CTL_BASE_ADDR + 0xc4)
+#define RUBY_SYS_CTL_PCIE_SLV_REQ_MISC_INFO	(RUBY_SYS_CTL_BASE_ADDR + 0xCC)
+#define RUBY_SYS_CTL_DDR_CTRL			(RUBY_SYS_CTL_BASE_ADDR + 0xE8)
+#define RUBY_SYS_CTL_GPIO_INT_STATUS		(RUBY_SYS_CTL_BASE_ADDR + 0x154)
+#define RUBY_SYS_AHB_MON_INT_MASK		(RUBY_SYS_CTL_BASE_ADDR + 0x160)
+#define RUBY_SYS_CTL_BOND_OPT			(RUBY_SYS_CTL_BASE_ADDR + 0x16C)
+
+/*****************************************************************************/
+/* System controller constants                                               */
+/*****************************************************************************/
+#define RUBY_SYS_CTL_REMAP(x)		(((x) & 0x3) << 3)
+#define RUBY_SYS_CTL_LINUX_MAP(x)	(((x) & 0x1) << 31)
+#define RUBY_SYS_CTL_SPICLK(x)		(((x) & 0x3) << 15)
+#define RUBY_SYS_CTL_CLKSEL(x)		(((x) & 0x3) << 5)
+#define RUBY_SYS_CTL_MUC_REMAP_SHIFT	15
+#define RUBY_SYS_CTL_MUC_REMAP_VAL(x)	(RUBY_BIT(31) | ((x) >> RUBY_SYS_CTL_MUC_REMAP_SHIFT))
+#define RUBY_SYS_CTL_DSP_REMAP_SHIFT	15
+#define RUBY_SYS_CTL_DSP_REMAP_VAL(x)	(RUBY_BIT(31) | ((x) >> RUBY_SYS_CTL_DSP_REMAP_SHIFT))
+/* reset bits - names match rtl */
+#define RUBY_SYS_CTL_RESET_LHOST_CORE	(RUBY_BIT(0))
+#define RUBY_SYS_CTL_RESET_LHOST_BUS	(RUBY_BIT(1))
+#define RUBY_SYS_CTL_RESET_DDR		(RUBY_BIT(2))
+#define RUBY_SYS_CTL_RESET_SRAM		(RUBY_BIT(3))
+#define RUBY_SYS_CTL_RESET_DSP		(RUBY_BIT(4))
+#define RUBY_SYS_CTL_RESET_IOSS		(RUBY_BIT(5))
+#define RUBY_SYS_CTL_RESET_NETSS	(RUBY_BIT(7))
+#define RUBY_SYS_CTL_RESET_MAC		(RUBY_BIT(8))
+#define RUBY_SYS_CTL_RESET_ENET0	(RUBY_BIT(9))
+#define RUBY_SYS_CTL_RESET_MUC		(RUBY_BIT(11))
+#define RUBY_SYS_CTL_RESET_ENET1	(RUBY_BIT(12))
+#define RUBY_SYS_CTL_RESET_PCIE		(RUBY_BIT(13))
+#define RUBY_SYS_CTL_RESET_BB		(RUBY_BIT(14))
+#define RUBY_SYS_CTL_RESET_EXT		(RUBY_BIT(15))
+/* reset useful constants */
+#define RUBY_SYS_CTL_RESET_ALL		(~0x0)
+#define RUBY_SYS_CTL_RESET_MUC_ALL	RUBY_SYS_CTL_RESET_MUC
+#define RUBY_SYS_CTL_RESET_DSP_ALL	RUBY_SYS_CTL_RESET_DSP
+/* reset cause definitions */
+#define	RUBY_SYS_CTL_RESET_CAUSE_PO	(RUBY_BIT(0))
+#define	RUBY_SYS_CTL_RESET_CAUSE_SR	(RUBY_BIT(1))
+#define	RUBY_SYS_CTL_RESET_CAUSE_WD	(RUBY_BIT(2))
+#define RUBY_SYS_CTL_INTR_TIMER_MSK(t)	(1 << (20 + (t)))
+/* sysctl vector/mask bit definitions */
+#define RUBY_SYS_CTL_MASK_BOOTMODE	(0x7 << 0)
+#define RUBY_SYS_CTL_MASK_REMAP		(0x3 << 3)
+#define RUBY_SYS_CTL_MASK_CLKSEL	(0x3 << 5)
+/* clksel: 00 = cpu(400)      bus(200) */
+#define RUBY_SYS_CTL_CLKSEL_00_BUS_FREQ	200000000
+/* clksel: 01 = cpu(320)      bus(160) */
+#define RUBY_SYS_CTL_CLKSEL_01_BUS_FREQ	160000000
+/* clksel: 10 = cpu(250)      bus(125) */
+#define RUBY_SYS_CTL_CLKSEL_10_BUS_FREQ	125000000
+/* clksel: 11 = cpu(200)      bus(100) */
+#define RUBY_SYS_CTL_CLKSEL_11_BUS_FREQ	100000000
+#define RUBY_SYS_CTL_MASK_DDRDRV	(0x1 << 7)
+#define RUBY_SYS_CTL_MASK_DDRODT	(0x3 << 8)
+#define RUBY_SYS_CTL_MASK_NODDR		(0x1 << 12)
+#define RUBY_SYS_CTL_MASK_MII		(0x3 << 13)
+#define RUBY_SYS_CTL_MASK_MII_EMAC0	(0x1 << 13)
+#define RUBY_SYS_CTL_MASK_MII_EMAC1	(0x1 << 14)
+#define RUBY_SYS_CTL_MASK_SPICLK	(0x3 << 15)
+#define RUBY_SYS_CTL_MASK_JTAGCHAIN	(0x1 << 17)
+
+#define RUBY_SYS_CTL_MASK_GMII0_TXCLK	(0x3 << 18)
+#define RUBY_SYS_CTL_MASK_GMII0_10M	(0x0 << 18)
+#define RUBY_SYS_CTL_MASK_GMII0_100M	(0x1 << 18)
+#define RUBY_SYS_CTL_MASK_GMII0_1000M	(0x2 << 18)
+
+#define RUBY_SYS_CTL_MASK_GMII1_TXCLK	(0x3 << 20)
+#define RUBY_SYS_CTL_MASK_GMII1_10M	(0x0 << 20)
+#define RUBY_SYS_CTL_MASK_GMII1_100M	(0x1 << 20)
+#define RUBY_SYS_CTL_MASK_GMII1_1000M	(0x2 << 20)
+
+#define RUBY_SYS_CTL_MASK_GMII_10M	(0)
+#define RUBY_SYS_CTL_MASK_GMII_100M	(1)
+#define RUBY_SYS_CTL_MASK_GMII_1000M	(2)
+#define RUBY_SYS_CTL_MASK_GMII_TXCLK	(3)
+#define RUBY_SYS_CTL_MASK_GMII0_SHIFT	(18)
+#define RUBY_SYS_CTL_MASK_GMII1_SHIFT	(20)
+
+#define RUBY_SYS_CTL_MASK_DDRCLK	(0x7 << 22)
+#define RUBY_SYS_CTL_MASK_LINUX_MAP	(0x1 << 31)
+
+#define RUBY_RESET_CAUSE_UART_SHIFT	(7)
+#define RUBY_RESET_CAUSE_UART(x)	(1 << (RUBY_RESET_CAUSE_UART_SHIFT + x))
+
+/* global[30:25,11] unused */
+/* for compatibility */
+#define SYSCTRL_CTRL_MASK		(RUBY_SYS_CTL_MASK - RUBY_SYS_CTL_BASE_ADDR)
+#define SYSCTRL_CTRL			(RUBY_SYS_CTL_CTRL - RUBY_SYS_CTL_BASE_ADDR)
+#define SYSCTRL_RESET_MASK		(RUBY_SYS_CTL_CPU_VEC_MASK - RUBY_SYS_CTL_BASE_ADDR)
+#define SYSCTRL_RESET			(RUBY_SYS_CTL_CPU_VEC - RUBY_SYS_CTL_BASE_ADDR)
+#define SYSCTRL_REV_NUMBER		(RUBY_SYS_CTL_CSR - RUBY_SYS_CTL_BASE_ADDR)
+#define SYSCTRL_RGMII_DLL		(RUBY_SYS_CTL_GMII_CLKDLL - RUBY_SYS_CTL_BASE_ADDR)
+/*****************************************************************************/
+/*****************************************************************************/
+/* Watchdog registers                                                        */
+/*****************************************************************************/
+#define RUBY_WDT_BASE_ADDR		TOPAZ_ALIAS_MAP_SWITCH(0xF4000000, 0xE40C0000)
+#define RUBY_WDT_CTL			(RUBY_WDT_BASE_ADDR + 0x00)
+#define RUBY_WDT_TIMEOUT_RANGE		(RUBY_WDT_BASE_ADDR + 0x04)
+#define RUBY_WDT_CURRENT_VALUE		(RUBY_WDT_BASE_ADDR + 0x08)
+#define RUBY_WDT_COUNTER_RESTART	(RUBY_WDT_BASE_ADDR + 0x0c)
+#define RUBY_WDT_INT_STAT		(RUBY_WDT_BASE_ADDR + 0x10)
+#define RUBY_WDT_INT_CLEAR		(RUBY_WDT_BASE_ADDR + 0x14)
+/*****************************************************************************/
+/* Watchdog constants                                                        */
+/*****************************************************************************/
+#define RUBY_WDT_ENABLE_IRQ_WARN	(RUBY_BIT(1))
+#define RUBY_WDT_ENABLE			(RUBY_BIT(0))
+#define RUBY_WDT_MAGIC_NUMBER		(0x76)
+#define RUBY_WDT_MAX_TIMEOUT		(0xF)
+#define RUBY_WDT_RESET_TIMEOUT		(0x8)
+/*****************************************************************************/
+/*****************************************************************************/
+/* SPI registers                                                             */
+/*****************************************************************************/
+#define RUBY_SPI_BASE_ADDR		TOPAZ_ALIAS_MAP_SWITCH(0xE2000000, 0xE4030000)
+#define RUBY_SPI_COMMIT			(RUBY_SPI_BASE_ADDR + 0x0000)
+#define RUBY_SPI_CONTROL		(RUBY_SPI_BASE_ADDR + 0x0004)
+#define RUBY_SPI_WRITE_STATUS		(RUBY_SPI_BASE_ADDR + 0x0100)
+#define RUBY_SPI_PAGE_PROGRAM		(RUBY_SPI_BASE_ADDR + 0x0200)
+#define RUBY_SPI_WRITE_DIS		(RUBY_SPI_BASE_ADDR + 0x0400)
+#define RUBY_SPI_READ_STATUS		(RUBY_SPI_BASE_ADDR + 0x0500)
+#define RUBY_SPI_WRITE_EN		(RUBY_SPI_BASE_ADDR + 0x0600)
+#define RUBY_SPI_FAST_READ		(RUBY_SPI_BASE_ADDR + 0x0B00)
+#define RUBY_SPI_WRITE_REG3		(RUBY_SPI_BASE_ADDR + 0x1100)
+#define RUBY_SPI_READ_REG3              (RUBY_SPI_BASE_ADDR + 0x1500)
+#define RUBY_SPI_SECTOR_ERASE_20	(RUBY_SPI_BASE_ADDR + 0x2000)
+#define RUBY_SPI_READ_SCUR              (RUBY_SPI_BASE_ADDR + 0x2b00)
+#define RUBY_SPI_WRITE_IBUP		(RUBY_SPI_BASE_ADDR + 0x3900)
+#define RUBY_SPI_WRITE_PRO_SEL          (RUBY_SPI_BASE_ADDR + 0x6800)
+#define RUBY_SPI_GBLOCK_LOCK            (RUBY_SPI_BASE_ADDR + 0x7e00)
+#define RUBY_SPI_GBLOCK_UNLOCK          (RUBY_SPI_BASE_ADDR + 0x9800)
+#define TOPAZ_SPI_GBLOCK_UNLOCK		(RUBY_SPI_BASE_ADDR + 0x9800)
+#define RUBY_SPI_READ_ID		(RUBY_SPI_BASE_ADDR + 0x9F00)
+#define RUBY_SPI_BULK_ERASE		(RUBY_SPI_BASE_ADDR + 0xC700)
+#define RUBY_SPI_SECTOR_ERASE_D8	(RUBY_SPI_BASE_ADDR + 0xD800)
+#define RUBY_SPI_READ_DPB               (RUBY_SPI_BASE_ADDR + 0xe000)
+#define RUBY_SPI_WRITE_DPB              (RUBY_SPI_BASE_ADDR + 0xe100)
+#define RUBY_SPI_PAGE_PROGRAM_4B	(RUBY_SPI_BASE_ADDR + 0x1200)
+#define RUBY_SPI_SECTOR_ERASE_D8_4B	(RUBY_SPI_BASE_ADDR + 0xDC00)
+#define RUBY_SPI_SECTOR_ERASE_20_4B	(RUBY_SPI_BASE_ADDR + 0x2100)
+#define RUBY_SPI_ADDRESS_MODE_4B	0x85
+#define RUBY_SPI_BOUNDARY_4B		0x1000000
+
+/*
+ * UBOOT_VERSION_LOCATION:
+ * This is hardwired in u-boot's start.S; the first instruction generates a
+ * 32 bit branch instruction.  The next several locations holds a human
+ * readable ascii version string that is visible in the file and in memory.
+ * The branch target of the first instruction is the next 4 byte aligned
+ * address following the version string.
+ *
+ */
+#define UBOOT_VERSION_LOCATION		(RUBY_SPI_FLASH_ADDR + 4)
+
+/*****************************************************************************/
+/* SPI constants                                                             */
+/*****************************************************************************/
+#define RUBY_SPI_WR_IN_PROGRESS		(RUBY_BIT(0))
+#define RUBY_SPI_PROTECTION		(0x3C)
+
+/*****************************************************************************/
+/* SPI1 registers                                                             */
+/*****************************************************************************/
+#define RUBY_SPI1_BASE_ADDR		TOPAZ_ALIAS_MAP_SWITCH(0xF2000000, 0xE40A0000)
+#define RUBY_SPI1_SPCR			(RUBY_SPI1_BASE_ADDR + 0x0000)
+#define RUBY_SPI1_SPSR			(RUBY_SPI1_BASE_ADDR + 0x0004)
+#define RUBY_SPI1_SPDR			(RUBY_SPI1_BASE_ADDR + 0x0008)
+#define RUBY_SPI1_SPER			(RUBY_SPI1_BASE_ADDR + 0x000C)
+#define RUBY_SPI1_SLVN			(RUBY_SPI1_BASE_ADDR + 0x0010)
+/*****************************************************************************/
+/* SPI1 constants                                                            */
+/*****************************************************************************/
+#define RUBY_SPI1_SPCR_SPIE_BIT		7
+#define RUBY_SPI1_SPCR_SPIE		(RUBY_BIT(RUBY_SPI1_SPCR_SPIE_BIT))
+#define RUBY_SPI1_SPCR_SPE		(RUBY_BIT(6))
+#define RUBY_SPI1_SPCR_MSTR		(RUBY_BIT(4))
+#define RUBY_SPI1_SPCR_CPOL		(RUBY_BIT(3))
+#define RUBY_SPI1_SPCR_CPHA		(RUBY_BIT(2))
+#define RUBY_SPI1_SPCR_SPR(x)		((x) & 0x3)
+#define RUBY_SPI1_SPSR_SPIF		(RUBY_BIT(7))
+#define RUBY_SPI1_SPSR_WCOL		(RUBY_BIT(6))
+#define RUBY_SPI1_SPSR_WFFULL		(RUBY_BIT(3))
+#define RUBY_SPI1_SPSR_WFEMPTY		(RUBY_BIT(2))
+#define RUBY_SPI1_SPSR_RFFULL		(RUBY_BIT(1))
+#define RUBY_SPI1_SPSR_RFEMPTY		(RUBY_BIT(0))
+#define RUBY_SPI1_SPER_ICNT(x)		(((x) & 0x3) << 6)
+#define RUBY_SPI1_SPER_ESPR(x)		((x) & 0x3)
+/*****************************************************************************/
+
+/*****************************************************************************/
+/* I2C constants                                                            */
+/*****************************************************************************/
+#define RUBY_I2C_BASE_ADDR			TOPAZ_ALIAS_MAP_SWITCH(0xF9000000, 0xE40F0000)
+#define RUBY_I2C_MEM_SIZE			(0x0A08)
+#define RUBY_I2C_ADAPTER_NUM		(0)
+
+/*****************************************************************************/
+/* Interrupts                                                                */
+/*****************************************************************************/
+#define RUBY_IRQ_RESET			(0)
+#define RUBY_IRQ_MEM_ERR		(1)
+#define RUBY_IRQ_INS_ERR		(2)
+#define RUBY_IRQ_CPUTIMER0		(3)
+#define RUBY_IRQ_CPUTIMER1		(4)
+#define RUBY_IRQ_WATCHDOG		(5)
+#define RUBY_IRQ_DMA0			(6)
+#define RUBY_IRQ_BB			(7)
+#define RUBY_IRQ_IPC_LO			(8)
+#define IRQ_MAC0_0			RUBY_IRQ_IPC_LO
+#define RUBY_IRQ_DSP			(9)
+#define RUBY_IRQ_IPC_HI			(10)
+#define RUBY_IRQ_MAC_TX_DONE		(11)
+#define RUBY_IRQ_MAC_TX_ALERT		(12)
+#define RUBY_IRQ_MAC_RX_DONE		(13)
+#define RUBY_IRQ_MAC_RX_TYPE		(14)
+#define RUBY_IRQ_MAC_MIB		(15)
+#define RUBY_IRQ_MAC_0			(16)
+#define RUBY_IRQ_MAC_1			(17)
+#define RUBY_IRQ_PCIE			(18)
+#define RUBY_IRQ_ENET0			(19)
+#define RUBY_IRQ_ENET1			(20)
+#define RUBY_IRQ_DMA1			(21)
+#define RUBY_IRQ_DMA2			(22)
+#define RUBY_IRQ_DMA3			(23)
+#define RUBY_IRQ_UART			(24)
+#define RUBY_IRQ_GPIO			(25)
+#define RUBY_IRQ_TIMER			(26)
+#define RUBY_IRQ_MISC			(27)
+/* Combined PCIe Interrupt IRQ 28 */
+#define RUBY_IRQ_MSI			(28)
+#define RUBY_IRQ_INTA			(28)
+/* Combined PCIe DMA Legacy/MSI Interrupt IRQ 22 */
+#define TOPAZ_IRQ_PCIE_DMA_INT		(22)
+#define TOPAZ_IRQ_PCIE_IPC4_INT		(29)
+/* Combined PCIe Legacy/MSI Interrupt IRQ 28 */
+#define TOPAZ_IRQ_PCIE_INT		RUBY_IRQ_INTA
+#define RUBY_IRQ_SPI			(30)
+#define RUBY_IRQ_BB_PER_PACKET		(31)
+#define RUBY_MAX_IRQ_VECTOR		(31)
+#define RUBY_IRQ_VECTORS_NUM		(RUBY_MAX_IRQ_VECTOR + 1)
+/* these are extended (shared) irqs */
+#define GPIO2IRQ(x)			((x) + RUBY_IRQ_GPIO0)
+#define RUBY_IRQ_GPIO0			(32)
+#define RUBY_IRQ_GPIO1			(33)
+#define RUBY_IRQ_GPIO2			(34)
+#define RUBY_IRQ_GPIO3			(35)
+#define RUBY_IRQ_GPIO4			(36)
+#define RUBY_IRQ_GPIO5			(37)
+#define RUBY_IRQ_GPIO6			(38)
+#define RUBY_IRQ_GPIO7			(39)
+#define RUBY_IRQ_GPIO8			(40)
+#define RUBY_IRQ_GPIO9			(41)
+#define RUBY_IRQ_GPIO10			(42)
+#define RUBY_IRQ_GPIO11			(43)
+#define RUBY_IRQ_GPIO12			(44)
+#define RUBY_IRQ_GPIO13			(45)
+#define RUBY_IRQ_GPIO14			(46)
+#define RUBY_IRQ_GPIO15			(47)
+#define RUBY_IRQ_UART0			(48)
+#define RUBY_IRQ_UART1			(49)
+#define RUBY_IRQ_TIMER0			(50)
+#define RUBY_IRQ_TIMER1			(51)
+#define RUBY_IRQ_TIMER2			(52)
+#define RUBY_IRQ_TIMER3			(53)
+#define RUBY_IRQ_MISC_I2C		(56)
+#define RUBY_IRQ_MISC_SRAM		(57)
+#define RUBY_IRQ_MISC_NETSS		(58)
+#define RUBY_IRQ_MISC_PLL1		(59)
+#define RUBY_IRQ_MISC_PLL2		(60)
+#define RUBY_IRQ_MISC_EXT_IRQ_COUNT		(5)
+#define RUBY_IRQ_MISC_EXT_IRQ_START		(56)
+#define RUBY_IRQ_MISC_RST_CAUSE_START	(26)
+
+#define QTN_IRQ_MISC_EXT_IRQ_COUNT		TOPAZ_IRQ_MISC_EXT_IRQ_COUNT
+#define QTN_IRQ_MISC_RST_CAUSE_START	TOPAZ_IRQ_MISC_RST_CAUSE_START
+
+#define RUBY_MAX_IRQ_EXT_VECTOR		(63)
+#define RUBY_IRQ_EXT_VECTORS_NUM	(RUBY_MAX_IRQ_EXT_VECTOR + 1)
+
+/* M2L interrupt register is [31:16] high prio, [15:0] low prio */
+#define RUBY_M2L_IRQ_NUM_HI		(16)
+#define RUBY_M2L_IRQ_NUM_LO		(16)
+/* M2L High priority interrupts, sent to RUBY_IRQ_IPC_HI */
+#define RUBY_M2L_IRQ_HI_REBOOT		RUBY_M2L_IPC_HI_IRQ(13)
+#define RUBY_M2L_IRQ_HI_DIE		RUBY_M2L_IPC_HI_IRQ(14)
+/* M2L Low priority interrupts, sent to RUBY_IRQ_IPC_LO */
+#define RUBY_M2L_IRQ_LO_MEAS		(8)
+#define RUBY_M2L_IRQ_LO_OCAC		(9)
+#define RUBY_M2L_IRQ_LO_CSA		(10)
+#define RUBY_M2L_IRQ_LO_SCS		(11)
+#define RUBY_M2L_IRQ_LO_SCAN		(12)
+#define RUBY_M2L_IRQ_LO_VSP		(13)
+#define RUBY_M2L_IRQ_LO_PRINT		(14)
+#define RUBY_M2L_IRQ_LO_HLINK		(15)
+
+/* these are DSP interrupts */
+#define RUBY_DSP_IRQ_TIMER0		(3)
+#define RUBY_DSP_IRQ_TIMER1		(5)
+#define RUBY_DSP_IRQ_IPC_MUC2DSP	(10)
+#define RUBY_DSP_IRQ_IPC_LHOST2DSP	(11)
+#define RUBY_DSP_IRQ_IPC_MUC2DSP_HI	(17)
+#define RUBY_DSP_IRQ_WMAC_COMBINED	(20)
+
+/* M2D High priority interrupts, sent to RUBY_DSP_IRQ_IPC_MUC2DSP_HI */
+#define RUBY_M2D_IRQ_HI_DIE		PLATFORM_REG_SWITCH(RUBY_IPC_HI_IRQ(7), 0)
+
+/* L2M Low priority interrupts */
+#define RUBY_L2M_IRQ_HLINK		(6)
+#define RUBY_L2M_IRQ_HIGH		(7)
+
+/*****************************************************************************/
+/*****************************************************************************/
+/* BB registers                                                             */
+/*****************************************************************************/
+#define RUBY_BB_BASE_ADDR			0xE6000000
+/* FIXME: no BB2 on Ruby - this should expand to something else */
+#define UMS_REGS_BB2				RUBY_BB_BASE_ADDR
+#define RUBY_QT3_BB_GLBL_PREG_RIF_ENABLE	(RUBY_BB_BASE_ADDR + 0x1F4)
+#define RUBY_QT3_BB_GLBL_PREG_RIF_ENABLE_ON	0x1
+#define RUBY_QT3_BB_GLBL_PREG_RIF_ENABLE_OFF	0x0
+#define RUBY_QT3_BB_GLBL_PREG_INTR_STATUS	(RUBY_BB_BASE_ADDR + 0x320)
+#define RUBY_QT3_BB_FFT_INTR			(0x1000)
+#define RUBY_QT3_BB_MIMO_PREG_RX_IPG_RST_ENABLE	(RUBY_BB_BASE_ADDR + 0x50268)
+#define RUBY_QT3_BB_MIMO_BF_RX			(RUBY_BB_BASE_ADDR + 0x501FC)
+#define RUBY_QT3_BB_MIMO_BF_RX_DUMP_ENABLE	(1 << 1) /*11n HT-LF dump enable*/
+
+#define RUBY_QT3_BB_GLBL_SOFT_RST		(RUBY_BB_BASE_ADDR + 0x0008)
+#define RUBY_QT3_BB_GLBL_SPI_CTRL		(RUBY_BB_BASE_ADDR + 0x0024)
+#define RUBY_QT3_BB_TD_BASE_ADDR		(RUBY_BB_BASE_ADDR + 0x90000)
+
+#define RUBY_QT3_BB_RF1_BASE_ADDR		0xE6080000
+#define RUBY_QT3_BB_BONDING_4SS			0x01
+
+#define RUBY_QT3_BB_TD_SPARE_0			(RUBY_QT3_BB_TD_BASE_ADDR + 0x5f4)
+#define RUBY_QT3_BB_TD_SPARE_1			(RUBY_QT3_BB_TD_BASE_ADDR + 0x5f8)
+#define RUBY_QT3_BB_TD_MAX_GAIN			(RUBY_QT3_BB_TD_BASE_ADDR + 0x36c)
+
+/*****************************************************************************/
+/* Radar registers                                                           */
+/*****************************************************************************/
+#define RUBY_RADAR_CNT_L	0xE6090558
+
+/*****************************************************************************/
+/* ARC addresses                                                             */
+/*****************************************************************************/
+#define RUBY_ARC_TLB_BYPASS	0x80000000
+#define RUBY_ARC_CACHE_BYPASS	0xC0000000
+
+/*****************************************************************************/
+/*               DMA registers and bit defines.                              */
+/*****************************************************************************/
+#define RUBY_DMA_NUM_CHANNELS	(4)
+#define RUBY_DMA_BASE_ADDR		TOPAZ_ALIAS_MAP_SWITCH(0xEA000000, 0xE4060000)
+#define	RUBY_DMA_SAR(x)			(RUBY_DMA_BASE_ADDR + 0x00 + (x)*0x58)
+#define	RUBY_DMA_DAR(x)			(RUBY_DMA_BASE_ADDR + 0x08 + (x)*0x58)
+#define	RUBY_DMA_LLP(x)			(RUBY_DMA_BASE_ADDR + 0x10 + (x)*0x58)
+#define	RUBY_DMA_CTL(x)			(RUBY_DMA_BASE_ADDR + 0x18 + (x)*0x58)
+#define	RUBY_DMA_SIZE(x)		(RUBY_DMA_BASE_ADDR + 0x1c + (x)*0x58)
+#define	RUBY_DMA_SSTAT(x)		(RUBY_DMA_BASE_ADDR + 0x20 + (x)*0x58)
+#define	RUBY_DMA_DSTAT(x)		(RUBY_DMA_BASE_ADDR + 0x28 + (x)*0x58)
+#define	RUBY_DMA_SSTATAR(x)		(RUBY_DMA_BASE_ADDR + 0x30 + (x)*0x58)
+#define	RUBY_DMA_DSTATAR(x)		(RUBY_DMA_BASE_ADDR + 0x38 + (x)*0x58)
+#define	RUBY_DMA_CFG(x)			(RUBY_DMA_BASE_ADDR + 0x40 + (x)*0x58)
+#define	RUBY_DMA_SGR(x)			(RUBY_DMA_BASE_ADDR + 0x48 + (x)*0x58)
+#define	RUBY_DMA_DSR(x)			(RUBY_DMA_BASE_ADDR + 0x50 + (x)*0x58)
+
+#define RUBY_DMA_MASK_BLK		(RUBY_DMA_BASE_ADDR + 0x318)
+#define RUBY_DMA_BLK_CLR		(RUBY_DMA_BASE_ADDR + 0x340)
+#define RUBY_DMA_DMA_CFG		(RUBY_DMA_BASE_ADDR + 0x398)
+#define RUBY_DMA_CH_EN			(RUBY_DMA_BASE_ADDR + 0x3a0)
+/************** RUBY_DMA_CTL(x) bit defines. *********************************/
+#define RUBY_DMA_CTL_INT_EN		RUBY_BIT(0)
+#define RUBY_DMA_CTL_DINC		(0)
+#define RUBY_DMA_CTL_DDEC		RUBY_BIT(7)
+#define RUBY_DMA_CTL_DNOCHNG		RUBY_BIT(8)
+#define RUBY_DMA_CTL_SINC		(0)
+#define RUBY_DMA_CTL_SDEC		RUBY_BIT(9)
+#define RUBY_DMA_CTL_SNOCHNG		RUBY_BIT(10)
+#define RUBY_DMA_CTL_DMS_LHOST		(0)
+#define RUBY_DMA_CTL_DMS_MUC		RUBY_BIT(23)
+#define RUBY_DMA_CTL_SMS_LHOST		(0)		// ahb master bus 1
+#define RUBY_DMA_CTL_SMS_MUC		RUBY_BIT(25)	// ahb master bus 2
+
+/************** RUBY_DMA_CFG(x) bit defines. *********************************/
+#define RUBY_DMA_CFG_ENABLE		RUBY_BIT(0)
+
+/*****************************************************************************/
+/* PCI registers & memory regions for target driver.                         */
+/*****************************************************************************/
+#define RUBY_PCIE_REG_BASE			TOPAZ_ALIAS_MAP_SWITCH(0xE9000000, 0xE4050000)
+#define RUBY_PCIE_CONFIG_REGION			(0xCF000000)
+
+#define RUBY_PCIE_CMD_REG			(RUBY_PCIE_REG_BASE + 0x0004)
+#define RUBY_PCIE_BAR_NUM			(6)
+#define	RUBY_PCIE_BAR_BASE			(RUBY_PCIE_REG_BASE + 0x0010)
+#define	RUBY_PCIE_BAR(n)			(RUBY_PCIE_BAR_BASE + (n << 2))
+#define	RUBY_PCIE_BAR_MASK_ADDR			(RUBY_PCIE_REG_BASE + 0x1010)
+#define	RUBY_PCIE_BAR_MASK(n)			(RUBY_PCIE_BAR_MASK_ADDR + (n << 2))
+
+#define RUBY_PCIE_ATU_VIEW			(RUBY_PCIE_REG_BASE + 0x0900)
+#define RUBY_PCIE_ATU_CTL1			(RUBY_PCIE_REG_BASE + 0x0904)
+#define RUBY_PCIE_ATU_CTL2			(RUBY_PCIE_REG_BASE + 0x0908)
+#define RUBY_PCIE_ATU_BASE_LO			(RUBY_PCIE_REG_BASE + 0x090c)
+#define RUBY_PCIE_ATU_BASE_HI			(RUBY_PCIE_REG_BASE + 0x0910)
+#define RUBY_PCIE_ATU_BASE_LIMIT		(RUBY_PCIE_REG_BASE + 0x0914)
+#define RUBY_PCIE_ATU_TARGET_LO			(RUBY_PCIE_REG_BASE + 0x0918)
+#define RUBY_PCIE_ATU_TARGET_HI			(RUBY_PCIE_REG_BASE + 0x091c)
+
+#define RUBY_PCIE_ATU_OB_REGION(n)		(0x0 + n)
+#define RUBY_PCIE_ATU_IB_REGION(n)		(0x80000000 + n)
+#define RUBY_PCIE_ATU_CFG_SHIFT			RUBY_BIT(28)
+#define RUBY_PCIE_ATU_OB_ENABLE			RUBY_BIT(31)
+
+#define RUBY_PCI_RC_MEM_WINDOW			(32 << 20) /* 32MB  MEMORY window in Root Complex for pcie tree  */
+#define RUBY_PCI_RC_CFG_SIZE			(64 << 10) /* 64KB  CFG size in Root Complex for pcie tree */
+#define RUBY_PCI_RC_MEM_START			(0xc0000000) /* PCI memory region in Root Complex's kernel address space */
+
+#define RUBY_PCIE_INT_MASK			(RUBY_SYS_CTL_BASE_ADDR + 0xC0)
+#define RUBY_PCIE_MSI_ENABLE			RUBY_BIT(16)
+#define MSI_CTL_OFFSET				(0x50)
+#define RUBY_MSI_ADDR_LOWER			(RUBY_PCIE_REG_BASE + 0x820)
+#define RUBY_MSI_ADDR_UPPER			(RUBY_PCIE_REG_BASE + 0x824)
+#define RUBY_MSI_INT_ENABLE			(RUBY_PCIE_REG_BASE + 0x828)
+#define RUBY_PCIE_MSI_MASK			(RUBY_PCIE_REG_BASE + 0x82c)
+#define RUBY_PCIE_MSI_STATUS			(RUBY_PCIE_REG_BASE + 0x830)
+#define RUBY_PCIE_MSI_REGION			(0xce000000) /* msi message address */
+#define RUBY_MSI_DATA				(0x0)	     /* msi message data */
+#define RUBY_PCIE_MSI_CLEAR			RUBY_BIT(0)  /* clear msi intr */
+
+#define TOPAZ_PCIE_STAT				(RUBY_SYS_CTL_BASE_ADDR + 0x017C)
+#if TOPAZ_FPGA_PLATFORM
+	#define TOPAZ_PCIE_LINKUP		(0xe)
+#else
+	#define TOPAZ_PCIE_LINKUP		(0x7)
+#endif
+
+#define PCIE_LINK_STAT				(RUBY_PCIE_REG_BASE + 0x80)
+#define PCIE_LINK_CTL2				(RUBY_PCIE_REG_BASE + 0xa0)
+#define PCIE_ASPM_L1_CTRL			(RUBY_PCIE_REG_BASE + 0x70c)
+#define PCIE_ASPM_LINK_CTRL			(PCIE_LINK_STAT)
+#define PCIE_PORT_LINK_CTL			(RUBY_PCIE_REG_BASE + 0x710)
+#define PCIE_ASPM_L1_SUBSTATE_TIMING		(RUBY_PCIE_REG_BASE + 0xB44)
+#define PCIE_L1SUB_CTRL1			(RUBY_PCIE_REG_BASE + 0x150)
+#define PCIE_PMCSR				(RUBY_PCIE_REG_BASE + 0x44)
+
+/* PCIe link defines */
+#define PCIE_LINK_GEN1				(BIT(0))
+#define PCIE_LINK_GEN2				(BIT(1))
+#define PCIE_LINK_GEN3				(BIT(2))
+#define PCIE_LINK_MODE(x)			(((x) >> 16) & 0x7)
+
+/* ATU setting for Host Buffer Descriptor Mapping */
+#define PCIE_HOSTBD_REGION			(RUBY_PCIE_ATU_OB_REGION(2))
+#define PCIE_ATU_BAR_MIN_SIZE			0x00010000 /* 64k */
+#define PCIE_HOSTBD_SIZE			(2 * PCIE_ATU_BAR_MIN_SIZE)
+#define PCIE_HOSTBD_SIZE_MASK			(PCIE_HOSTBD_SIZE - 1)
+#define PCIE_HOSTBD_START_HI			0x00000000
+#define PCIE_HOSTBD_REGION_ENABLE		RUBY_PCIE_ATU_OB_ENABLE
+
+/* Extra system controller bits */
+#define TOPAZ_SYS_CTL_PLLCLKOUT_EN		(RUBY_BIT(10))
+
+/* Board platform and revision */
+#define TOPAZ_BOARD_REVA			0x40
+#define TOPAZ_BOARD_REVB			0x41
+#define TOPAZ_BOARD_REVA2			0x43
+
+/*
+ * WOWLAN GPIO assignment
+ * On RGMII module - GPIO_B_10 (set as output for WoWLAN)
+ * On RGMII host board - GPIO_B_10 (set as input to wake up the host)
+ *
+ * On PCIe module - WAKE# or GPIO_B_12 ( set as output for WoWLAN, use WAKE# by default)
+ * On PCIe host board - GPIO_B_14 (set as input to wake up the host)
+ */
+#ifdef CONFIG_TOPAZ_PCIE_TARGET
+#define WOWLAN_GPIO_OUTPUT_PIN	12
+#else
+#define WOWLAN_GPIO_OUTPUT_PIN	10
+#endif
+#endif // #ifndef __RUBY_PLATFORM_H
+
diff --git a/quantenna/common/ruby_pm.h b/quantenna/common/ruby_pm.h
new file mode 100644
index 0000000..8319f2f
--- /dev/null
+++ b/quantenna/common/ruby_pm.h
@@ -0,0 +1,163 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __RUBY_PM_H
+#define __RUBY_PM_H
+
+/* Power save levels */
+#define BOARD_PM_LEVEL_FORCE_NO			(0)
+#define BOARD_PM_LEVEL_NO			(1)
+#define BOARD_PM_LEVEL_SLOW_DOWN		(2)
+#define BOARD_PM_LEVEL_LATENCY_UP		(3)
+#define BOARD_PM_LEVEL_DISTANCE_DOWN		(4)
+#define BOARD_PM_LEVEL_IDLE			(5)
+#define BOARD_PM_LEVEL_SUSPEND			(6)
+
+#define BOARD_PM_LEVEL_INIT			BOARD_PM_LEVEL_FORCE_NO
+
+/* Duty level, shared between Lhost and MuC */
+#define BOARD_PM_LEVEL_DUTY			BOARD_PM_LEVEL_IDLE
+
+/* Names of power save governors */
+#define BOARD_PM_GOVERNOR_WLAN			"wlan"
+#define BOARD_PM_GOVERNOR_QDISC			"qdisc"
+#define BOARD_PM_GOVERNOR_QCSAPI		"qcsapi"
+
+/* wlan timings to switch between modes */
+#define BOARD_PM_WLAN_IDLE_TIMEOUT		(120 * HZ)
+#define BOARD_PM_WLAN_STA_IDLE_TIMEOUT		(15 * HZ)
+#define BOARD_PM_WLAN_DEFAULT_TIMEOUT		(0)
+#define BOARD_PM_WLAN_CHECK_IDLE_AFTER_CAC	(30 * HZ)
+
+/* qdisc parameters to switch between modes */
+#define BOARD_PM_QDISC_TIMER_TIMEOUT		(50/*ms*/ * HZ / 1000)
+#define BOARD_PM_QDISC_SPEEDUP_THRESHOLD	(400)
+#define BOARD_PM_QDISC_SLOWDOWN_THRESHOLD	(100)
+#define BOARD_PM_QDISC_SLOWDOWN_COUNT		(80)
+#define BOARD_PM_QDISC_SLOWDOWN_TIMEOUT		(3 * HZ)
+#define BOARD_PM_QDISC_DEFAULT_TIMEOUT		(0)
+
+/* Beacon TSF setting */
+#define BOARD_PM_WAKE_BEACON_TSF_DEADLINE_PCT		(50)
+#define BOARD_PM_WAKE_BEACON_TSF_ALERT_PCT		(25)
+
+/* Default setting, shared between Lhost and MuC */
+#define BOARD_PM_PDUTY_PERIOD_MS_DEFAULT		80
+#define BOARD_PM_PDUTY_PCT_LOW_DEFAULT			80
+#define BOARD_PM_SUSPEND_PERIOD_MS_DEFAULT		100
+#define BOARD_PM_SUSPEND_PCT_LOW_DEFAULT		99
+
+/* Multiple Periods Support */
+#define BOARD_PM_PERIOD_CHANGE_INTERVAL			1
+#define BOARD_PM_PERIOD_CNT			3
+
+enum qtn_pm_param {
+	QTN_PM_CURRENT_LEVEL,
+
+	QTN_PM_SUSPEND,
+	QTN_PM_SUSPEND_PERIOD_MS,
+	QTN_PM_SUSPEND_PCT_LOW,
+	QTN_PM_SUSPEND_HRESET,
+	QTN_PM_SUSPEND_ALLCHAINS_DISABLE,
+
+	QTN_PM_PDUTY,
+	QTN_PM_PDUTY_PERIOD_MS,
+	QTN_PM_PDUTY_PCT_LOW,
+	QTN_PM_PDUTY_HRESET,
+	QTN_PM_PDUTY_RXCHAINS_DISABLE,
+
+	QTN_PM_MUC_SLEEP,
+
+	QTN_PM_RXCHAIN_IDLE_COUNT,
+	QTN_PM_RXCHAIN_IDLE_LEVEL,
+	QTN_PM_TXCHAIN_IDLE_COUNT,
+	QTN_PM_TXCHAIN_IDLE_LEVEL,
+
+	QTN_PM_PAUSE_MGMT_PROBERESP,
+	QTN_PM_PAUSE_MGMT_ASSOCRESP,
+	QTN_PM_PAUSE_MGMT_AUTH,
+	QTN_PM_PAUSE_DATA = QTN_PM_PAUSE_MGMT_AUTH,
+
+	/* For Multiple Periods Support */
+	QTN_PM_PERIOD_CHANGE_INTERVAL,	/* How long period setting will be changed(unit: second) */
+	QTN_PM_PERIOD_CNT,	/* How many periods in period group(Max 3) */
+	QTN_PM_PERIOD_GROUP,	/* Period group(Max 3 periods, each <= 255ms, unit: millisecond)*/
+
+	QTN_PM_IOCTL_MAX
+};
+
+#define QTN_PM_PARAM_NAMES	{						\
+	"level",			/* QTN_PM_CURRENT_LEVEL */		\
+	"suspend_level",		/* QTN_PM_SUSPEND */			\
+	"suspend_period",		/* QTN_PM_SUSPEND_PERIOD_MS */		\
+	"suspend_pct",			/* QTN_PM_SUSPEND_PCT_LOW */		\
+	"suspend_hreset",		/* QTN_PM_SUSPEND_HRESET */		\
+	"suspend_allchains",		/* QTN_PM_SUSPEND_ALLCHAINS_DISABLE */	\
+	"pduty_level",			/* QTN_PM_PDUTY */			\
+	"pduty_period",			/* QTN_PM_PDUTY_PERIOD_MS */		\
+	"pduty_pct",			/* QTN_PM_PDUTY_PCT_LOW */		\
+	"pduty_hreset",			/* QTN_PM_PDUTY_HRESET */		\
+	"pduty_rxchains",		/* QTN_PM_PDUTY_RXCHAINS_DISABLE */	\
+	"muc_sleep_level",		/* QTN_PM_MUC_SLEEP */			\
+	"rxchain_count",		/* QTN_PM_RXCHAIN_IDLE_COUNT */		\
+	"rxchain_level",		/* QTN_PM_RXCHAIN_IDLE_LEVEL */		\
+	"txchain_count",		/* QTN_PM_TXCHAIN_IDLE_COUNT */		\
+	"txchain_level",		/* QTN_PM_TXCHAIN_IDLE_LEVEL */		\
+	"pause_proberesp",		/* QTN_PM_PAUSE_MGMT_PROBERESP */	\
+	"pause_assocresp",		/* QTN_PM_PAUSE_MGMT_ASSOCRESP */	\
+	"pause_auth",			/* QTN_PM_PAUSE_MGMT_ASSOCRESP */	\
+	"period_change_interval",	/* QTN_PM_PERIOD_CHANGE_INTERVAL */	\
+	"period_cnt",			/* QTN_PM_PERIOD_CNT */	\
+	"period_group"			/* QTN_PM_PERIOD_GROUP */	\
+}
+
+#define QTN_PM_PARAM_DEFAULTS	{							\
+	BOARD_PM_LEVEL_INIT,			/* QTN_PM_CURRENT_LEVEL */		\
+	BOARD_PM_LEVEL_SUSPEND,			/* QTN_PM_SUSPEND */			\
+	BOARD_PM_SUSPEND_PERIOD_MS_DEFAULT,	/* QTN_PM_SUSPEND_PERIOD_MS */		\
+	BOARD_PM_SUSPEND_PCT_LOW_DEFAULT,	/* QTN_PM_SUSPEND_PCT_LOW */		\
+	1,					/* QTN_PM_SUSPEND_HRESET */		\
+	1,					/* QTN_PM_SUSPEND_ALL_CHAINS_DISABLE */	\
+	BOARD_PM_LEVEL_DUTY,			/* QTN_PM_PDUTY */			\
+	BOARD_PM_PDUTY_PERIOD_MS_DEFAULT,	/* QTN_PM_PDUTY_PERIOD_MS */		\
+	BOARD_PM_PDUTY_PCT_LOW_DEFAULT,		/* QTN_PM_PDUTY_PCT_LOW */		\
+	0,					/* QTN_PM_PDUTY_HRESET */		\
+	1,					/* QTN_PM_PDUTY_RXCHAINS_DISABLE */	\
+	BOARD_PM_LEVEL_LATENCY_UP,		/* QTN_PM_MUC_SLEEP */			\
+	4,					/* QTN_PM_RXCHAIN_IDLE_COUNT */		\
+	BOARD_PM_LEVEL_DISTANCE_DOWN,		/* QTN_PM_RXCHAIN_IDLE_LEVEL */		\
+	4,					/* QTN_PM_TXCHAIN_IDLE_COUNT */		\
+	BOARD_PM_LEVEL_DISTANCE_DOWN,		/* QTN_PM_TXCHAIN_IDLE_LEVEL */		\
+	60000,					/* QTN_PM_PAUSE_MGMT_PROBERESP */	\
+	5000,					/* QTN_PM_PAUSE_MGMT_ASSOCRESP */	\
+	5000,					/* QTN_PM_PAUSE_MGMT_AUTH */		\
+	BOARD_PM_PERIOD_CHANGE_INTERVAL,	/* QTN_PM_PERIOD_CHANGE_INTERVAL */	\
+	BOARD_PM_PERIOD_CNT,			/* QTN_PM_PERIOD_CNT */	\
+	0x50321E				/* QTN_PM_PERIOD_GROUP(30ms, 50ms, 80ms) */	\
+}
+
+#define QTN_PM_UNPACK_PARAM(x)		((x) & 0xFF)
+#define QTN_PM_UNPACK_VALUE(x)		((x) >> 8)
+#define QTN_PM_PACK_PARAM_VALUE(p, v)	(((p) & 0xFF) | (((v) << 8) & 0xFFFFFF00))
+
+#endif /* __RUBY_PM_H */
+
diff --git a/quantenna/common/ruby_pm_mproc.h b/quantenna/common/ruby_pm_mproc.h
new file mode 100644
index 0000000..869303c
--- /dev/null
+++ b/quantenna/common/ruby_pm_mproc.h
@@ -0,0 +1,75 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __RUBY_PM_MPROC_H
+#define __RUBY_PM_MPROC_H
+
+#if defined(__KERNEL__) || defined(MUC_BUILD)
+	#include <qtn/mproc_sync.h>
+	#include "ruby_pm.h"
+
+#if QTN_SEM_TRACE
+#define qtn_pm_duty_try_lock(_cpu) qtn_pm_duty_try_lock_dbg(_cpu, __FILE__, __LINE__)
+	RUBY_WEAK(qtn_pm_duty_try_lock_dbg) int
+	qtn_pm_duty_try_lock_dbg(QTN_SOC_CPU current_cpu, char *caller, int caller_line)
+#else
+	RUBY_WEAK(qtn_pm_duty_try_lock) int
+	qtn_pm_duty_try_lock(QTN_SOC_CPU current_cpu)
+#endif
+	{
+		int ret = 0;
+		unsigned long flags;
+		uint32_t fail_sem = 0;
+
+		if (__qtn_mproc_sync_spin_try_lock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, &flags, &fail_sem)) {
+			u_int32_t lock = qtn_mproc_sync_addr(&qtn_mproc_sync_shared_params_get()->pm_duty_lock);
+			if (!qtn_mproc_sync_mem_read(lock)) {
+				qtn_mproc_sync_mem_write_wmb(lock, 1);
+				ret = 1;
+			}
+			__qtn_mproc_sync_spin_unlock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, &flags);
+		}
+
+		return ret;
+	}
+
+#if QTN_SEM_TRACE
+#define qtn_pm_duty_unlock(_cpu) qtn_pm_duty_unlock_dbg(_cpu, __FILE__, __LINE__)
+	RUBY_WEAK(qtn_pm_duty_unlock_dbg) void
+	qtn_pm_duty_unlock_dbg(QTN_SOC_CPU current_cpu, char *caller, int caller_line)
+#else
+	RUBY_WEAK(qtn_pm_duty_unlock) void
+	qtn_pm_duty_unlock(QTN_SOC_CPU current_cpu)
+#endif
+	{
+		u_int32_t lock = qtn_mproc_sync_addr(&qtn_mproc_sync_shared_params_get()->pm_duty_lock);
+		unsigned long flags;
+
+		__qtn_mproc_sync_spin_lock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, &flags);
+		qtn_mproc_sync_mem_write_wmb(lock, 0);
+		__qtn_mproc_sync_spin_unlock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, &flags);
+	}
+
+#endif	// defined(__KERNEL__) || defined(MUC_BUILD)
+
+#endif /* __RUBY_PM_MPROC_H */
+
diff --git a/quantenna/common/ruby_spi_api.h b/quantenna/common/ruby_spi_api.h
new file mode 100644
index 0000000..1612a0d
--- /dev/null
+++ b/quantenna/common/ruby_spi_api.h
@@ -0,0 +1,127 @@
+/*
+ *(C) Copyright 2014 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __RUBY_SPI_API_H__
+#define __RUBY_SPI_API_H__
+
+/*
+ * Swap bytes
+ */
+
+#define SWAP32(x)	((((x) & 0x000000ff) << 24)  | \
+			(((x)  & 0x0000ff00) << 8)   | \
+			(((x)  & 0x00ff0000) >> 8)   | \
+			(((x)  & 0xff000000) >> 24))
+
+
+#define SPI_WR_IN_PROGRESS	(BIT(0))
+#define SPI_SR_QUAD_MODE	(BIT(6))
+#define SPI_SCUR_WPSEL		(BIT(7))
+#define SPI_PROTECTION		(0x3c)
+#define SPI_WPS_SELECT		(0x4)
+#define SPI_SECTOR_SIZE_4K	4
+#define ADDRESS_MASK		(0x0fffffff)
+#define SPI_WRITE_DELAY         (9)
+#define SPI_FLASH_ADDR		(0x90000000)
+#define SECTOR_MASK		(0x01ffff00)
+#define SECTOR_ERASE_WAIT_TIME	(90)
+#define CHIP_ERASE_WAIT_TIME	(50)
+#define SPI_WRITE_TIMEOUT       (1) /*sec*/
+#define SPI_ERASE_TIMEOUT       (5) /*sec*/
+#define SPI_UNLOCK_TIMEOUT      (5) /*sec*/
+#define MX_25L12805_ID		(0xc22018)
+#define MX_25L25635_ID		(0xc22019)
+#define MX_25L6405_ID		(0xc22017)
+#define M25P32_ID		(0x202016)
+#define W25Q128_ID		(0xef4018)
+#define	MX25L512E		(0xc22010)
+#define S25FL129P		(0x012018)
+#define SPI_SECTOR_64K		(64 * 1024)
+#define SPI_SECTOR_COUNT_256	(256)
+#define SPI_SECTOR_4K		(4 * 1024)
+#define SPI_SECTOR_COUNT_4K	(4 * 1024)
+#define SPI_SECTOR_INDEX	(16)
+#define SPI_SR_QUAD_MODE_MASK(X)	(((X) & 0xfffff0ff) | (2<<8))
+#define SPI_SR_SINGLE_MODE_MASK(X)	((X) & 0xfffff0ff)
+#define RUBY_SPI_READ_SCUR_MASK(X)	(((X) & 0xffffff00) | 2)
+#define RUBY_SPI_READ_DPB_MASK(X)	(((X) & 0xffffff00) | 0x86)
+#define RUBY_SPI_GBLOCK_LOCK_MASK(X)	(((X) & 0xffffff00) | 0x1)
+#define RUBY_SPI_GBLOCK_UNLOCK_MASK(X)	(((X) & 0xffffff00) | 0x1)
+#define RUBY_SPI_WRITE_PRO_SEL_MASK(X)	(((X) & 0xffffff00) | 1)
+#define RUBY_SPI_WRITE_WPS_SEL_MASK(X)	(((X) & 0xffffff00) | 2)   /* writing 2 bytes */
+#define RUBY_SPI_WRITE_DPB_MASK(X)	(((X) & 0xffffff00) | 0x86)
+#define RUBY_SPI_WRITE_IBUP_MASK(X)	(((X) & 0xffffff00) | 0x06)
+#define RUBY_SPI_WRITE_WPS_MASK(X)	(((X) & 0xffffff00) | 0x64)
+#define RUBY_SPI_READ_ID_MASK		(0xffffff)
+#define RUBY_SPI_READ_STATUS_MASK	(0xff)
+#define SECTOR_ERASE_OP20		(0x02)
+#define SPI_WPS_ENABLE			(0x00640000)
+#define SPI_PROTECT_MODE		"spi_protect"
+#define SPI_PROTECT_MODE_STR		17
+#define SPI_PROTECT_MODE_ENABLE		"enable"
+#define SPI_PROTECT_MODE_FLAG_DISABLE	1
+#define SPI_PROTECT_MODE_FLAG_ENABLE	0
+/*
+*
+* Ruby uses 3 msb bytes to form addresses.
+* Topaz uses all 4 bytes, just skip first msb if in 3-bytes address mode.
+*
+*/
+#define SPI_MEM_ADDR(addr)      (((addr) & 0x00FFFFFF))
+#define SPI_MEM_ADDR_4B(addr)	(((addr) & 0xFFFFFFFF))
+
+enum SPI_TYPES{
+	NOT_SUPPORTED,
+	ATMEL,
+	SPANSION,
+	SST,
+	ST_MICROELECTRONICS,
+	WINBOND,
+	MACRONIX,
+	ESMT,
+	EON,
+	MICRON,
+	GD
+};
+
+struct flash_info {
+	char *name;
+	/* JEDEC id zero means "no ID" (most older chips); otherwise it has
+	 * a high byte of zero plus three data bytes: the manufacturer id,
+	 * then a two byte device id.
+	 */
+	u32 jedec_id;
+
+	/* The size listed here is what works with OPCODE_SE, which isn't
+	 * necessarily called a "sector" by the vendor.
+	 */
+	unsigned sector_size;
+	u16 n_sectors;
+
+	u16 flags;
+
+	unsigned freq;
+	enum SPI_TYPES single_unprotect_mode;
+};
+
+
+#endif
diff --git a/quantenna/common/ruby_spi_flash_data.h b/quantenna/common/ruby_spi_flash_data.h
new file mode 100644
index 0000000..3006f73
--- /dev/null
+++ b/quantenna/common/ruby_spi_flash_data.h
@@ -0,0 +1,148 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * MTD SPI driver for ST M25Pxx (and similar) serial flash chips
+ *
+ * Author: Mike Lavender, mike@steroidmicros.com
+ *
+ * Copyright (c) 2005, Intec Automation Inc.
+ *
+ * Some parts are based on lart.c by Abraham Van Der Merwe
+ *
+ * Cleaned up and generalized based on mtd_dataflash.c
+ *
+ * This code is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+
+/*****************************************************
+ * Structure definitions as well as data was borrowed
+ * from Linux kernel, 2.6.30 version.
+ * File name is drivers/mtd/devices/m25p80.c
+ */
+
+#ifndef __SPI_FLASH_DATA_H
+#define __SPI_FLASH_DATA_H
+
+#include "ruby_spi_api.h"
+
+#define FREQ_UNKNOWN		0
+#define FREQ_MHZ(num)		(num * 1000000)
+
+/* NOTE: double check command sets and memory organization when you add
+ * more flash chips.  This current list focusses on newer chips, which
+ * have been converging on command sets which including JEDEC ID.
+ */
+
+static struct flash_info flash_data [] = {
+
+	/* Atmel -- some are (confusingly) marketed as "DataFlash" */
+	{ "at25fs010", 0x1f6601, 32 * 1024, 4, 0, FREQ_UNKNOWN, ATMEL, },
+	{ "at25fs040", 0x1f6604, 64 * 1024, 8, 0, FREQ_UNKNOWN, ATMEL, },
+
+	{ "at25df041a", 0x1f4401, 64 * 1024, 8, 0, FREQ_UNKNOWN, ATMEL, },
+	{ "at25df641", 0x1f4800, 64 * 1024, 128, 0, FREQ_UNKNOWN, ATMEL, },
+
+	{ "at26f004", 0x1f0400, 64 * 1024, 8, 0, FREQ_UNKNOWN, ATMEL, },
+	{ "at26df081a", 0x1f4501, 64 * 1024, 16, 0, FREQ_UNKNOWN, ATMEL, },
+	{ "at26df161a", 0x1f4601, 64 * 1024, 32, 0, FREQ_UNKNOWN, ATMEL, },
+	{ "at26df321",  0x1f4701, 64 * 1024, 64, 0, FREQ_UNKNOWN, ATMEL, },
+	{ "at25f512b",  0x1f6500,  4 * 1024, 16, SECTOR_ERASE_OP20, FREQ_MHZ(50), ATMEL, },
+
+	/* Spansion -- single (large) sector size only, at least
+	 * for the chips listed here (without boot sectors).
+	 */
+	{ "s25sl004a", 0x010212, 64 * 1024, 8, 0, FREQ_UNKNOWN, SPANSION },
+	{ "s25sl008a", 0x010213, 64 * 1024, 16, 0, FREQ_UNKNOWN, SPANSION },
+	{ "s25sl016a", 0x010214, 64 * 1024, 32, 0, FREQ_UNKNOWN, SPANSION },
+	{ "s25fl032", 0x010215, 64 * 1024, 64, 0, FREQ_UNKNOWN, SPANSION },
+	{ "s25sl064a", 0x010216, 64 * 1024, 128, 0, FREQ_UNKNOWN, SPANSION },
+	{ "s25sl12801", 0x012018, 64 * 1024, 256, 0, FREQ_MHZ(40), SPANSION }, /* S25FL129P has same jedec_id, but higher frequency - so it should be supported, but at not at maximum speed */
+	{ "s25fl256s", 0x010219, 64 * 1024, 512, 0, FREQ_UNKNOWN, SPANSION },
+
+	/* Micron */
+	{ "N25Q032", 0x20ba16, 64 * 1024, 64, 0, FREQ_UNKNOWN, MICRON },
+
+	/* SST -- large erase sizes are "overlays", "sectors" are 4K */
+	{ "sst25vf040b", 0xbf258d, 64 * 1024, 8, 0, FREQ_UNKNOWN, SST },
+	{ "sst25vf080b", 0xbf258e, 64 * 1024, 16, 0, FREQ_UNKNOWN, SST },
+	{ "sst25vf016b", 0xbf2541, 64 * 1024, 32, 0, FREQ_UNKNOWN, SST },
+	{ "sst25vf032b", 0xbf254a, 64 * 1024, 64, 0, FREQ_UNKNOWN, SST },
+
+	/* ST Microelectronics -- newer production may have feature updates */
+	{ "m25p05", 0x202010, 32 * 1024, 2, 0, FREQ_UNKNOWN, ST_MICROELECTRONICS },
+	{ "m25p10", 0x202011, 32 * 1024, 4, 0, FREQ_UNKNOWN, ST_MICROELECTRONICS },
+	{ "m25p20", 0x202012, 64 * 1024, 4, 0, FREQ_UNKNOWN, ST_MICROELECTRONICS },
+	{ "m25p40", 0x202013, 64 * 1024, 8, 0, FREQ_UNKNOWN, ST_MICROELECTRONICS },
+	{ "m25p80", 0x202014, 64 * 1024, 16, 0, FREQ_UNKNOWN, ST_MICROELECTRONICS },
+	{ "m25p16", 0x202015, 64 * 1024, 32, 0, FREQ_UNKNOWN, ST_MICROELECTRONICS },
+	{ "m25p32", 0x202016, 64 * 1024, 64, 0, FREQ_MHZ(75), ST_MICROELECTRONICS },
+	{ "m25p64", 0x202017, 64 * 1024, 128, 0, FREQ_UNKNOWN, ST_MICROELECTRONICS },
+	{ "m25p128", 0x202018, 256 * 1024, 64, 0, FREQ_MHZ(54), ST_MICROELECTRONICS },
+
+	{ "m45pe80", 0x204014, 64 * 1024, 16, 0, FREQ_UNKNOWN, ST_MICROELECTRONICS },
+	{ "m45pe16", 0x204015, 64 * 1024, 32, 0, FREQ_UNKNOWN, ST_MICROELECTRONICS },
+
+	{ "m25pe80", 0x208014, 64 * 1024, 16, 0, FREQ_UNKNOWN, ST_MICROELECTRONICS },
+	{ "m25pe16", 0x208015, 64 * 1024, 32, 0, FREQ_UNKNOWN, ST_MICROELECTRONICS },
+
+	/* Winbond -- w25x "blocks" are 64K, except w25q128 is 4K  */
+	{ "w25x05", 0xef3010, 4 * 1024,  16, SECTOR_ERASE_OP20, FREQ_MHZ(104), WINBOND },
+	{ "w25x10", 0xef3011, 64 * 1024, 2, 0, FREQ_UNKNOWN, WINBOND },
+	{ "w25x20", 0xef3012, 64 * 1024, 4, 0, FREQ_UNKNOWN, WINBOND },
+	{ "w25x40", 0xef3013, 64 * 1024, 8, 0, FREQ_UNKNOWN, WINBOND },
+	{ "w25x80", 0xef3014, 64 * 1024, 16, 0, FREQ_UNKNOWN, WINBOND },
+	{ "w25x16", 0xef3015, 64 * 1024, 32, 0, FREQ_UNKNOWN, WINBOND },
+	{ "w25x32", 0xef3016, 64 * 1024, 64, 0, FREQ_UNKNOWN, WINBOND },
+	{ "w25x64", 0xef3017, 64 * 1024, 128, 0, FREQ_UNKNOWN, WINBOND },
+	{ "w25q64", 0xef4017, 64 * 1024, 128, 0, FREQ_MHZ(80), WINBOND },
+	{ "w25q128", 0xef4018, 64 * 1024, 256, 0, FREQ_MHZ(104), WINBOND },
+
+	/* Macronix -- MX25L "blocks" are 64K, except mx25l12836e and mx25l25635 are 4K */
+	{ "mx25l512e", 0xc22010, 4 * 1024, 16, SECTOR_ERASE_OP20, FREQ_MHZ(104), MACRONIX },
+	{ "mx25l1606e", 0xc22015, 64 * 1024, 32, 0, FREQ_MHZ(50), MACRONIX },
+	{ "mx25l6405", 0xc22017, 64 * 1024, 128, 0, FREQ_MHZ(50), MACRONIX },
+	{ "mx25l12836e", 0xc22018, 64 * 1024, 256, 0, FREQ_MHZ(104), MACRONIX },
+	{ "mx25l25635f", 0xc22019, 64 * 1024, 512, 0, FREQ_MHZ(104), MACRONIX },
+	{ "mx25l51245g", 0xc2201A, 64 * 1024, 1024, 0, FREQ_MHZ(104), MACRONIX },
+
+	/* ESMT -- F25L "blocks are 64K, "sectors" are 4KiB */
+	{ "f25l05pa", 0x8c3010, 4 * 1024, 16, SECTOR_ERASE_OP20, FREQ_MHZ(50), ESMT },
+	{ "f25l64qa", 0x8c4117, 64 * 1024, 128, 0, FREQ_MHZ(50), ESMT },
+
+	/* EON -- EN25Q "blocks are 64K, "sectors" are 4KiB */
+	{ "en25f05", 0x1c3110, 4 * 1024, 16, SECTOR_ERASE_OP20, FREQ_MHZ(100), EON },
+	{ "en25q64", 0x1c3017, 64 * 1024, 128, 0, FREQ_MHZ(104), EON },
+	{ "en25q128", 0x1c3018, 64 * 1024, 256, 0, FREQ_MHZ(104), EON },
+
+	/* GD -- GD25Q "blocks are 64K, "sectors" are 4KiB */
+	{ "qd25q512", 0xc84010, 4 * 1024, 16, SECTOR_ERASE_OP20, FREQ_MHZ(104), GD },
+	{ "gd25q128", 0xc84018, 64 * 1024, 256, 0, FREQ_MHZ(104), GD },
+
+};
+
+#endif // #ifndef __SPI_FLASH_DATA_H
+
diff --git a/quantenna/common/ruby_version.h b/quantenna/common/ruby_version.h
new file mode 100644
index 0000000..7664b11
--- /dev/null
+++ b/quantenna/common/ruby_version.h
@@ -0,0 +1,17 @@
+#ifndef __RUBY_RELEASE_H__
+#define __RUBY_RELEASE_H__
+/*
+ * Copyright (c) 2011 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ *  Header file to hold build version information.
+ *
+ */
+
+////////////////////////////////////////////////////////////////////////////
+// Defines
+////////////////////////////////////////////////////////////////////////////
+
+#define RUBY_UBOOT_VERSION	"v37.4.0.28"
+
+#endif // __RUBY_RELEASE_H__
diff --git a/quantenna/common/topaz_config.h b/quantenna/common/topaz_config.h
new file mode 100644
index 0000000..5be0113
--- /dev/null
+++ b/quantenna/common/topaz_config.h
@@ -0,0 +1,138 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * Header file which describes Topaz platform.
+ * Has to be used by both kernel and bootloader.
+ */
+
+#ifndef __TOPAZ_CONFIG_H
+#define __TOPAZ_CONFIG_H
+
+#include "current_platform.h"
+
+#if !TOPAZ_FPGA_PLATFORM
+#undef TOPAZ_ICACHE_WORKAROUND
+#endif
+
+/*
+ * Control registers move depending on unified + alias bit
+ */
+
+#define TOPAZ_MMAP_UNIFIED	0
+#define TOPAZ_MMAP_ALIAS	0
+#define TOPAZ_RX_ACCELERATE	1
+
+/* If MU-MIMO done in HDP or SDP */
+#define QTN_HDP_MU		1
+
+#if QTN_HDP_MU
+#define QTN_HDP_MU_FCS_WORKROUND	1
+#else
+#define QTN_HDP_MU_FCS_WORKROUND	0
+#endif
+
+#if TOPAZ_MMAP_ALIAS && !TOPAZ_MMAP_UNIFIED
+	#error Alias map requires unified map
+#endif
+
+#if TOPAZ_MMAP_ALIAS
+	#define TOPAZ_ALIAS_MAP_SWITCH(a, b)	(b)
+#else
+	#define TOPAZ_ALIAS_MAP_SWITCH(a, b)	(a)
+#endif
+
+/* Topaz fixed phy addresses */
+#define TOPAZ_FPGAA_PHY0_ADDR		2
+#define TOPAZ_FPGAA_PHY1_ADDR		3
+#define TOPAZ_FPGAB_PHY0_ADDR		4
+#define TOPAZ_FPGAB_PHY1_ADDR		1
+#define TOPAZ_PHY0_ADDR				1
+#define TOPAZ_PHY1_ADDR				3
+
+#ifndef TOPAZ_FPGA_PLATFORM
+	#define TOPAZ_FPGA_PLATFORM	0
+#endif
+
+/* Definition indicates that Topaz platform is FPGA */
+#if TOPAZ_FPGA_PLATFORM
+	/* CLK speeds are in MHz and 1/10th the speed of actual ASIC */
+	#define TOPAZ_SERIAL_BAUD	38400
+	#define TOPAZ_APB_CLK		12500000
+	#define TOPAZ_AHB_CLK		25000000
+	#define TOPAZ_CPU_CLK		50000000
+	#define RUBY_FPGA_DDR
+#else
+	#define TOPAZ_SERIAL_BAUD	115200
+	#define TOPAZ_APB_CLK		125000000
+	#define TOPAZ_AHB_CLK		250000000
+	#define TOPAZ_CPU_CLK		500000000
+	#define RUBY_ASIC_DDR
+#endif /* #if TOPAZ_FPGA_PLATFORM */
+
+/*
+ * Setting UPF_SPD_FLAG gives a developer the option to set the
+ * flag to match a UPF_ define from <linux>/include/linux/serial_core.h
+ * or set the value to 0 to use the default baud rate setting DEFAULT_BAUD
+ */
+#define UPF_SPD_FLAG	0
+#define DEFAULT_BAUD	TOPAZ_SERIAL_BAUD
+
+/*
+ * Re-use Ruby defines to simplify the number of changes required
+ * to compile new binaries for Topaz
+ */
+#define RUBY_SERIAL_BAUD	TOPAZ_SERIAL_BAUD
+#define RUBY_FIXED_DEV_CLK	TOPAZ_APB_CLK
+#define RUBY_FIXED_CPU_CLK	TOPAZ_CPU_CLK
+
+#ifdef PLATFORM_DEFAULT_BOARD_ID
+        #define DEFAULT_BOARD_ID	PLATFORM_DEFAULT_BOARD_ID
+#else
+	/* Default board id used to match Topaz setting if there is no SPI Flash */
+	#define DEFAULT_BOARD_ID	QTN_TOPAZ_BB_BOARD
+#endif /* TOPAZ_DEFAULT_BOARD_ID */
+
+#ifndef PLATFORM_ARC7_MMU_VER
+	#define PLATFORM_ARC7_MMU_VER	2
+#endif
+
+#define CONFIG_RUBY_BROKEN_IPC_IRQS	0
+
+#define RUBY_IPC_HI_IRQ(bit_num)	((bit_num) + 8)
+#define RUBY_M2L_IPC_HI_IRQ(bit_num)	(bit_num)
+
+#define PLATFORM_REG_SWITCH(reg1, reg2)	(reg2)
+
+#define writel_topaz(a, b)		writel(a, b)
+#define writel_ruby(a, b)
+
+#define QTN_VLAN_LLC_ENCAP		1
+
+#define TOPAZ_128_NODE_MODE		1
+
+#define TOPAZ_ETH_REFLECT_SW_FWD	0
+
+#define DSP_ENABLE_STATS		1
+
+#endif /* #ifndef __TOPAZ_CONFIG_H */
+
diff --git a/quantenna/common/topaz_emac.h b/quantenna/common/topaz_emac.h
new file mode 100644
index 0000000..b6c0bcc
--- /dev/null
+++ b/quantenna/common/topaz_emac.h
@@ -0,0 +1,281 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __TOPAZ_EMAC_H
+#define __TOPAZ_EMAC_H
+
+#include "topaz_platform.h"
+#ifdef _KERNEL
+#include "ruby_arasan_emac_ahb.h"
+#endif
+
+#define TOPAZ_EMAC_NUM_DPI_FIELDS		32
+#define TOPAZ_EMAC_NUM_DPI_FILTERS		16
+#define TOPAZ_EMAC_NUM_DPI_IPTUPLES		8
+
+#define TOPAZ_EMAC_WRAP_CTRL			0x300
+# define TOPAZ_EMAC_WRAP_CTRL_VERSION			0x0000000f
+#define TOPAZ_EMAC_RXP_CTRL			0x304
+# define TOPAZ_EMAC_RXP_CTRL_ENABLE			BIT(0)
+# define TOPAZ_EMAC_RXP_CTRL_ENDIAN			BIT(1)
+# define TOPAZ_EMAC_RXP_CTRL_TQE_SYNC_EN_BP		BIT(2)
+# define TOPAZ_EMAC_RXP_CTRL_TQE_SYNC_EN_SUCC		BIT(3)
+# define TOPAZ_EMAC_RXP_CTRL_SYNC_NONE			0
+# define TOPAZ_EMAC_RXP_CTRL_SYNC_TQE			BIT(4)
+# define TOPAZ_EMAC_RXP_CTRL_SYNC_RX_DMA		BIT(5)
+# define TOPAZ_EMAC_RXP_CTRL_SYNC_RX_PARSER		(BIT(4) | BIT(5))
+# define TOPAZ_EMAC_RXP_CTRL_SRESET			BIT(8)
+#define TOPAZ_EMAC_TXP_CTRL			0x308
+# define TOPAZ_EMAC_TXP_CTRL_AHB_ENABLE			BIT(0)
+# define TOPAZ_EMAC_TXP_CTRL_SRESET			BIT(8)
+#define TOPAZ_EMAC_TXP_Q_FULL			0x320
+# define TOPAZ_EMAC_TXP_Q_FULL_BIT			BIT(31)
+#define TOPAZ_EMAC_TXP_DESC_PTR			0x324
+#define TOPAZ_EMAC_DEBUG_BUS_SEL		0x328
+#define TOPAZ_EMAC_DEBUG_BUS_SEL_TXP_PTR		0x00000001
+
+#define TOPAZ_EMAC_BUFFER_POOLS			0x32c
+# define TOPAZ_EMAC_BUFFER_POOLS_RX_REPLENISH		0x00000003
+# define TOPAZ_EMAC_BUFFER_POOLS_RX_REPLENISH_S		0
+# define TOPAZ_EMAC_BUFFER_POOLS_TX_RETURN		0x0000000c
+# define TOPAZ_EMAC_BUFFER_POOLS_TX_RETURN_S		2
+#define TOPAZ_EMAC_TXP_STATUS			0x330
+
+/*
+ * EMAC Tx-ring read/write pointer, should write 0x1 to reg_0x328 before read the pointer.
+ * Bit[12:0]  : EMAC read pointer
+ * Bit[25:13] : TQE write pointer
+ */
+#define TOPAZ_EMAC_TXP_READ_PTR(stat)			((stat) & 0x1FFF)
+#define TOPAZ_EMAC_TXP_WRITE_PTR(stat)			(((stat) >> 13) & 0x1FFF)
+
+#define TOPAZ_EMAC_DESC_LIMIT			0x334
+# define TOPAZ_EMAC_DESC_LIMIT_MASK			0x0000ffff
+#define TOPAZ_EMAC_RXP_PRIO_CTRL		0x350
+# define TOPAZ_EMAC_RXP_PRIO_CTRL_TID_SEL		0x00000003
+# define TOPAZ_EMAC_RXP_PRIO_CTRL_TID_SEL_S		0
+# define TOPAZ_EMAC_RXP_PRIO_CTRL_TID_MINMAX		0x00000004
+# define TOPAZ_EMAC_RXP_PRIO_CTRL_TID_MINMAX_S		2
+# define TOPAZ_EMAC_RXP_PRIO_CTRL_SW_TID		0x00000f00
+# define TOPAZ_EMAC_RXP_PRIO_CTRL_SW_TID_S		8
+# define TOPAZ_EMAC_RXP_PRIO_CTRL_SW_TID_SEL		BIT(12)
+
+#define TOPAZ_EMAC_RXP_OUTPORT_CTRL		0x354
+# define TOPAZ_EMAC_RXP_OP_CTRL_DA			0x00000003
+# define TOPAZ_EMAC_RXP_OP_CTRL_DA_S			0
+# define TOPAZ_EMAC_RXP_OP_CTRL_VLAN			0x0000000c
+# define TOPAZ_EMAC_RXP_OP_CTRL_VLAN_S			2
+# define TOPAZ_EMAC_RXP_OP_CTRL_IP			0x00000030
+# define TOPAZ_EMAC_RXP_OP_CTRL_IP_S			4
+# define TOPAZ_EMAC_RXP_OP_CTRL_DPI			0x000000c0
+# define TOPAZ_EMAC_RXP_OP_CTRL_DPI_S			6
+# define TOPAZ_EMAC_RXP_OP_CTRL_MCAST_EN		BIT(8)
+# define TOPAZ_EMAC_RXP_OP_CTRL_MCAST_SEL		BIT(9)
+# define TOPAZ_EMAC_RXP_OP_CTRL_MCAST_PORT		0x00003c00
+# define TOPAZ_EMAC_RXP_OP_CTRL_MCAST_PORT_S		10
+# define TOPAZ_EMAC_RXP_OP_CTRL_DYNAMIC_FAIL_PORT	0x000f0000
+# define TOPAZ_EMAC_RXP_OP_CTRL_DYNAMIC_FAIL_PORT_S	16
+# define TOPAZ_EMAC_RXP_OP_CTRL_SW_BACKDOOR_PORT	0x00f00000
+# define TOPAZ_EMAC_RXP_OP_CTRL_SW_BACKDOOR_PORT_S	20
+# define TOPAZ_EMAC_RXP_OP_CTRL_STATIC_FAIL_PORT	0x0f000000
+# define TOPAZ_EMAC_RXP_OP_CTRL_STATIC_FAIL_PORT_S	24
+# define TOPAZ_EMAC_RXP_OP_CTRL_STATIC_PORT_SEL		0x70000000
+# define TOPAZ_EMAC_RXP_OP_CTRL_STATIC_PORT_SEL_S	28
+# define TOPAZ_EMAC_RXP_OP_CTRL_STATIC_ENABLE		BIT(31)
+#ifndef __ASSEMBLY__
+union topaz_emac_rxp_outport_ctrl {
+	struct {
+		uint32_t word0;
+	} raw;
+	struct {
+		uint32_t da_prio		: 2,
+			vlan_prio		: 2,
+			ip_prio			: 2,
+			dpi_prio		: 2,
+			mcast_en		: 1,
+			mcast_sel		: 1,
+			mcast_port		: 4,
+			__unused		: 2,
+			dynamic_fail_port	: 4,
+			sw_backdoor_port	: 4,
+			static_fail_port	: 4,
+			static_port_sel		: 3,
+			static_mode_en		: 1;
+	} data;
+};
+#endif	// __ASSEMBLY__
+
+#define TOPAZ_EMAC_RXP_OUTNODE_CTRL		0x358
+union topaz_emac_rxp_outnode_ctrl {
+	struct {
+		uint32_t word0;
+	} raw;
+	struct {
+		uint32_t mcast_node		: 6,
+			 __unused		: 4,
+			 dynamic_fail_node	: 6,
+			 sw_backdoor_node	: 6,
+			 static_fail_node	: 6,
+			 static_node_sel	: 3,
+			 __unused2		: 1;
+	} data;
+};
+#define TOPAZ_EMAC_RXP_VLAN_PRI_TO_TID		0x380
+# define TOPAZ_EMAC_RXP_VLAN_PRI_TO_TID_PRI(pcp, tid)	(((tid) & 0xf) << ((pcp) * 4))
+#define TOPAZ_EMAC_RXP_VLAN_PRI_CTRL		0x384
+# define TOPAZ_EMAC_RXP_VLAN_PRI_CTRL_TAG		0x00000003
+# define TOPAZ_EMAC_RXP_VLAN_PRI_CTRL_TAG_S		0
+#define TOPAZ_EMAC_RXP_VLAN_TAG_0_1		0x388
+# define TOPAZ_EMAC_RXP_VLAN_TAG_0			0x0000ffff
+# define TOPAZ_EMAC_RXP_VLAN_TAG_0_S			0
+# define TOPAZ_EMAC_RXP_VLAN_TAG_1			0xffff0000
+# define TOPAZ_EMAC_RXP_VLAN_TAG_1_S			16
+#define TOPAZ_EMAC_RXP_VLAN_TAG_2_3		0x38c
+# define TOPAZ_EMAC_RXP_VLAN_TAG_2			0x0000ffff
+# define TOPAZ_EMAC_RXP_VLAN_TAG_2_S			0
+# define TOPAZ_EMAC_RXP_VLAN_TAG_3			0xffff0000
+# define TOPAZ_EMAC_RXP_VLAN_TAG_3_S			16
+#define TOPAZ_EMAC_RXP_IP_DIFF_SRV_TID_REG(x)	(0x390 + 4 * (x))
+#define TOPAZ_EMAC_RXP_IP_DIFF_SRV_TID_REGS	8
+#define TOPAZ_EMAC_RXP_IP_CTRL			0x3b0
+#define TOPAZ_EMAC_RXP_DPI_TID_MAP_REG(x)	(0x3b4 + 4 * (x))
+#define TOPAZ_EMAC_RXP_DPI_TID_MAP_INDEX(x)	TOPAZ_EMAC_RXP_DPI_TID_MAP_REG((x) >> 3)
+#define TOPAZ_EMAC_RXP_TID_MAP_INDEX_SHIFT(x)	(((x) & 0x7) << 2)
+#define TOPAZ_EMAC_RXP_TID_MAP_INDEX_MASK(x)	(0xF << TOPAZ_EMAC_RXP_TID_MAP_INDEX_SHIFT(x))
+#define TOPAZ_EMAC_RXP_DPI_CTRL			0x3bc
+# define TOPAZ_EMAC_RXP_DPI_CTRL_DPI_FAIL_TID		0x0000000f
+#define TOPAZ_EMAC_RXP_STATUS			0x3c0
+#define TOPAZ_EMAC_RXP_CST_SEL			0x3c4
+#define TOPAZ_EMAC_RXP_FRAME_CNT_CLEAR		0x3cc
+# define TOPAZ_EMAC_RXP_FRAME_CNT_CLEAR_ERROR		BIT(0)
+# define TOPAZ_EMAC_RXP_FRAME_CNT_CLEAR_TOTAL		BIT(1)
+# define TOPAZ_EMAC_RXP_FRAME_CNT_CLEAR_DA_MATCH	BIT(2)
+# define TOPAZ_EMAC_RXP_FRAME_CNT_CLEAR_SA_MATCH	BIT(3)
+#define TOPAZ_EMAC_FRM_COUNT_ERRORS		0x3d0
+#define TOPAZ_EMAC_FRM_COUNT_TOTAL		0x3d4
+#define TOPAZ_EMAC_FRM_COUNT_DA_MATCH		0x3d8
+#define TOPAZ_EMAC_FRM_COUNT_SA_MATCH		0x3dc
+#define TOPAZ_EMAC_RX_DPI_FIELD_VAL(x)		(0x400 + 4 * (x))
+#define TOPAZ_EMAC_RX_DPI_FIELD_MASK(x)		(0x480 + 4 * (x))
+#define TOPAZ_EMAC_RX_DPI_FIELD_CTRL(x)		(0x500 + 4 * (x))
+#define TOPAZ_EMAC_RX_DPI_FIELD_GROUP(x)	(0x580 + 4 * (x))
+#define TOPAZ_EMAC_RX_DPI_OUT_CTRL(x)		(0x5c0 + 4 * (x))
+# define TOPAZ_EMAC_RX_DPI_OUT_CTRL_NODE	0x0000007f
+# define TOPAZ_EMAC_RX_DPI_OUT_CTRL_NODE_S	0
+# define TOPAZ_EMAC_RX_DPI_OUT_CTRL_PORT	0x00000780
+# define TOPAZ_EMAC_RX_DPI_OUT_CTRL_PORT_S	7
+# define TOPAZ_EMAC_RX_DPI_OUT_CTRL_COMBO	0x00001800
+# define TOPAZ_EMAC_RX_DPI_OUT_CTRL_COMBO_S	11
+# define TOPAZ_EMAC_RX_DPI_OUT_CTRL_OFF		0x0
+# define TOPAZ_EMAC_RX_DPI_OUT_CTRL_IPTUPLE	0x1
+# define TOPAZ_EMAC_RX_DPI_OUT_CTRL_DPI		0x2
+# define TOPAZ_EMAC_RX_DPI_OUT_CTRL_BOTH	0x3
+
+#ifndef __ASSEMBLY__
+enum topaz_emac_rx_dpi_anchor {
+	TOPAZ_EMAC_RX_DPI_ANCHOR_FRAME	= 0x0,
+	TOPAZ_EMAC_RX_DPI_ANCHOR_VLAN0	= 0x1,
+	TOPAZ_EMAC_RX_DPI_ANCHOR_VLAN1	= 0x2,
+	TOPAZ_EMAC_RX_DPI_ANCHOR_VLAN2	= 0x3,
+	TOPAZ_EMAC_RX_DPI_ANCHOR_VLAN3	= 0x4,
+	TOPAZ_EMAC_RX_DPI_ANCHOR_OTHER	= 0x5,
+	TOPAZ_EMAC_RX_DPI_ANCHOR_LLC	= 0x6,
+	TOPAZ_EMAC_RX_DPI_ANCHOR_IPV4	= 0x7,
+	TOPAZ_EMAC_RX_DPI_ANCHOR_IPV6	= 0x8,
+	TOPAZ_EMAC_RX_DPI_ANCHOR_TCP	= 0x9,
+	TOPAZ_EMAC_RX_DPI_ANCHOR_UDP	= 0xa,
+};
+
+enum topaz_emac_rx_dpi_cmp_op {
+	TOPAZ_EMAC_RX_DPI_CMP_OP_EQUAL	= 0x0,
+	TOPAZ_EMAC_RX_DPI_CMP_OP_NEQUAL	= 0x1,
+	TOPAZ_EMAC_RX_DPI_CMP_OP_GT	= 0x2,
+	TOPAZ_EMAC_RX_DPI_CMP_OP_LT	= 0x3,
+};
+
+#define TOPAZ_EMAC_RX_DPI_ANCHOR_NAMES	{		\
+	"frame", "vlan0", "vlan1", "vlan2", "vlan3",	\
+	"other", "llc", "ipv4", "ipv6", "tcp", "udp",	\
+}
+
+#define TOPAZ_EMAC_RX_DPI_CMP_OP_NAMES	{		\
+	"==", "!=", ">", "<",				\
+}
+
+
+union topaz_emac_rx_dpi_ctrl {
+	uint32_t raw;
+	struct {
+		uint32_t offset		: 9,
+			 anchor		: 4,
+			 cmp_op		: 2,
+			 enable		: 1,
+			 __unused	: 16;
+	} data;
+};
+#endif	// __ASSEMBLY__
+
+#define TOPAZ_EMAC_RX_DPI_IPT_GROUP(x)		(0x720 + 4 * (x))
+#define TOPAZ_EMAC_RX_DPI_IPT_GROUP_SRCADDR(x)	BIT((x) + 0)
+#define TOPAZ_EMAC_RX_DPI_IPT_GROUP_DESTADDR(x)	BIT((x) + 8)
+#define TOPAZ_EMAC_RX_DPI_IPT_GROUP_DESTPORT(x)	BIT((x) + 16)
+#define TOPAZ_EMAC_RX_DPI_IPT_GROUP_SRCPORT(x)	BIT((x) + 24)
+#define TOPAZ_EMAC_RX_DPI_IPT_MEM_DATA(x)	(0x600 + 4 * (x))
+#define TOPAZ_EMAC_RX_DPI_IPT_MEM_DATA_MAX	8
+#define TOPAZ_EMAC_RX_DPI_IPT_PORT_DEST		0x0000FFFF
+#define TOPAZ_EMAC_RX_DPI_IPT_PORT_DEST_S	0
+#define TOPAZ_EMAC_RX_DPI_IPT_PORT_SRC		0xFFFF0000
+#define TOPAZ_EMAC_RX_DPI_IPT_PORT_SRC_S	16
+#define TOPAZ_EMAC_RX_DPI_IPT_MEM_COM		0x620
+#define TOPAZ_EMAC_RX_DPI_IPT_MEM_COM_ENT	0x0000000F
+#define TOPAZ_EMAC_RX_DPI_IPT_MEM_COM_ENT_S	0
+#define TOPAZ_EMAC_RX_DPI_IPT_MEM_COM_WRITE	BIT(8)
+#define TOPAZ_EMAC_RX_DPI_IPT_MEM_COM_READ	BIT(9)
+#define TOPAZ_EMAC_RX_DPI_IPT_ENTRIES			9
+#define TOPAZ_EMAC_RX_DPI_IPT_ENTRY_SRCADDR_START	0
+#define TOPAZ_EMAC_RX_DPI_IPT_ENTRY_SRCADDR_END		4
+#define TOPAZ_EMAC_RX_DPI_IPT_ENTRY_DESTADDR_START	4
+#define TOPAZ_EMAC_RX_DPI_IPT_ENTRY_DESTADDR_END	8
+#define TOPAZ_EMAC_RX_DPI_IPT_ENTRY_PORTS		8
+
+
+#define TOPAZ_EMAC_IP_PROTO_ENTRY(x)		(0xa000 + 4 * (x))
+#define TOPAZ_EMAC_IP_PROTO_ENTRIES		256
+#define TOPAZ_EMAC_IP_PROTO_OUT_NODE		0x0000007F
+#define TOPAZ_EMAC_IP_PROTO_OUT_NODE_S		0
+#define TOPAZ_EMAC_IP_PROTO_OUT_PORT		0x00000780
+#define TOPAZ_EMAC_IP_PROTO_OUT_PORT_S		7
+#define TOPAZ_EMAC_IP_PROTO_VALID		BIT(11)
+#define TOPAZ_EMAC_IP_PROTO_VALID_S		11
+
+#define TOPAZ_EMAC_IPDSCP_HWT_SHIFT	2
+
+#define TOPAZ_EMAC_RXP_PRIO_IS_BIT2	0
+#define TOPAZ_EMAC_RXP_PRIO_IS_VLAN	1
+#define TOPAZ_EMAC_RXP_PRIO_IS_DSCP	2
+#define TOPAZ_EMAC_RXP_PRIO_IS_DPI	3
+
+extern void topaz_emac_to_lhost(uint32_t enable);
+extern int topaz_emac_get_bonding(void);
+
+#endif	// __TOPAZ_EMAC_H
+
diff --git a/quantenna/common/topaz_platform.h b/quantenna/common/topaz_platform.h
new file mode 100644
index 0000000..be27da5
--- /dev/null
+++ b/quantenna/common/topaz_platform.h
@@ -0,0 +1,498 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * Header file which describes Topaz platform.
+ * Has to be used by both kernel and bootloader.
+ */
+
+#ifndef __TOPAZ_PLATFORM_H
+#define __TOPAZ_PLATFORM_H
+
+#include "ruby_platform.h"
+
+#ifndef MS
+#define MS(_v, _f)		(((_v) & _f) >> _f##_S)
+#endif
+#ifndef SM
+#define SM(_v, _f)		(((_v) << _f##_S) & _f)
+#endif
+
+/*
+ * The following macro couldn't be defined via SM because of issues with nesting ##
+ * i.e. the following define does not work
+ * do{ where = (where) & (~(bitmask)) | SM(new_value, bitmask); }while(0)
+ */
+#define UPDATE_BITSET(where, bitmask, new_value) \
+	do{ where = ((where) & (~(bitmask))) | (((new_value) << bitmask##_S) & bitmask); }while(0)
+
+/* Extra reset bits */
+#define TOPAZ_SYS_CTL_RESET_AUC		(RUBY_BIT(10))
+#define TOPAZ_SYS_CTL_ALIAS_MAP		(RUBY_BIT(29))
+#define TOPAZ_SYS_CTL_UNIFIED_MAP	(RUBY_BIT(30))
+
+/* Extra system controller bits */
+#define TOPAZ_SYS_CTL_DDRCLK_S		22
+#define TOPAZ_SYS_CTL_DDRCLK		(0x7 << TOPAZ_SYS_CTL_DDRCLK_S)
+#define TOPAZ_SYS_CTL_DDRCLK_400MHZ	SM(0, TOPAZ_SYS_CTL_DDRCLK)
+#define TOPAZ_SYS_CTL_DDRCLK_320MHZ	SM(1, TOPAZ_SYS_CTL_DDRCLK)
+#define TOPAZ_SYS_CTL_DDRCLK_250MHZ	SM(2, TOPAZ_SYS_CTL_DDRCLK)
+#define TOPAZ_SYS_CTL_DDRCLK_200MHZ	SM(3, TOPAZ_SYS_CTL_DDRCLK)
+#define TOPAZ_SYS_CTL_DDRCLK_160MHZ	SM(4, TOPAZ_SYS_CTL_DDRCLK)
+
+/* Extra system controller registers */
+#define TOPAZ_SYS_CTL_M2D_2_INT		(RUBY_SYS_CTL_BASE_ADDR + 0x0184)
+#define TOPAZ_SYS_CTL_M2D_2_INT_MASK	(RUBY_SYS_CTL_BASE_ADDR + 0x0188)
+#define TOPAZ_SYS_CTL_M2D_3_INT		(RUBY_SYS_CTL_BASE_ADDR + 0x018C)
+#define TOPAZ_SYS_CTL_M2D_3_INT_MASK	(RUBY_SYS_CTL_BASE_ADDR + 0x0190)
+
+/* Temperature control registers */
+#define TOPAZ_SYS_CTL_TEMPSENS_CTL	(RUBY_SYS_CTL_BASE_ADDR + 0x0108)
+#define TOPAZ_SYS_CTL_TEMPSENS_CTL_START_CONV		0x00000001
+#define TOPAZ_SYS_CTL_TEMPSENS_CTL_SHUTDWN		0x00000002
+
+#define TOPAZ_SYS_CTL_TEMP_SENS_TEST_CTL		(RUBY_SYS_CTL_BASE_ADDR + 0x010C)
+
+#define TOPAZ_SYS_CTL_TEMP_SENS_DATA			(RUBY_SYS_CTL_BASE_ADDR + 0x0110)
+#define TOPAZ_SYS_CTL_TEMP_SENS_DATA_TEMP		0x00000FFF
+#define TOPAZ_SYS_CTL_TEMP_SENS_DATA_END_CONV		0x00001000
+#define TOPAZ_SYS_CTL_TEMP_SENS_DATA_END_CONV_S		11
+
+/* AuC SoC interrupt controller registers */
+#define TOPAZ_AUC_INT_MASK		(RUBY_SYS_CTL_BASE_ADDR + 0x0174)
+#define TOPAZ_AUC_IPC_INT		(RUBY_SYS_CTL_BASE_ADDR + 0x0178)
+#define TOPAZ_AUC_IPC_INT_MASK(val)	((val & 0xFFFF) << 16)
+#define TOPAZ_AUC_INT_STATUS		(RUBY_SYS_CTL_BASE_ADDR + 0x00D0)
+
+/* Linux Host interrupt controller registers */
+#define TOPAZ_LH_IPC3_INT		(RUBY_SYS_CTL_BASE_ADDR + 0x14C)
+#define TOPAZ_LH_IPC3_INT_MASK		(RUBY_SYS_CTL_BASE_ADDR + 0x150)
+#define TOPAZ_IPC4_INT(base)	((base) + 0x13C)
+#define TOPAZ_IPC4_INT_MASK(base)	((base) + 0x140)
+#define TOPAZ_LH_IPC4_INT		(TOPAZ_IPC4_INT(RUBY_SYS_CTL_BASE_ADDR))
+#define TOPAZ_LH_IPC4_INT_MASK		(TOPAZ_IPC4_INT_MASK(RUBY_SYS_CTL_BASE_ADDR))
+
+/* Multi-processor hardware semahpore */
+#define TOPAZ_MPROC_SEMA		(RUBY_SYS_CTL_BASE_ADDR + 0x0170)
+
+/* MuC SoC Interrupt controller registers */
+#define TOPAZ_SYS_CTL_A2M_INT		(RUBY_SYS_CTL_BASE_ADDR + 0x0144)
+#define TOPAZ_SYS_CTL_A2M_INT_MASK	(RUBY_SYS_CTL_BASE_ADDR + 0x0148)
+
+/* PCIE SoC Interrupt controller registers */
+#define TOPAZ_SYS_CTL_PCIE_INT_STATUS	(RUBY_SYS_CTL_BASE_ADDR + 0x017c)
+#define TOPAZ_SYS_CTL_TQE_INT_STATS_BIT	(RUBY_BIT(10))
+
+#define TOPAZ_SWITCH_BASE_ADDR		0xE1000000
+#define TOPAZ_SWITCH_OUT_NODE_BITS	7		/* Up to 128 output nodes */
+#define TOPAZ_SWITCH_OUT_NODE_MAX	(1 << TOPAZ_SWITCH_OUT_NODE_BITS)
+#define TOPAZ_SWITCH_OUT_NODE_MASK	((1 << TOPAZ_SWITCH_OUT_NODE_BITS) - 1)
+#define TOPAZ_SWITCH_OUT_PORT_BITS	4		/* Up to 16 output ports. 8 are used */
+#define TOPAZ_SWITCH_OUT_PORT_MAX	(1 << TOPAZ_SWITCH_OUT_PORT_BITS)
+#define TOPAZ_SWITCH_OUT_PORT_MASK	((1 << TOPAZ_SWITCH_OUT_PORT_BITS) - 1)
+
+/* TQE */
+#define TOPAZ_TQE_BASE_ADDR		(TOPAZ_SWITCH_BASE_ADDR + 0x30000)
+#define TOPAZ_TQE_EMAC_TDES_1_CNTL	(TOPAZ_TQE_BASE_ADDR + 0x0000)
+#define TOPAZ_TQE_EMAC_TDES_1_CNTL_VAL				0x000000FF
+#define TOPAZ_TQE_EMAC_TDES_1_CNTL_VAL_S			0
+#define TOPAZ_TQE_EMAC_TDES_1_CNTL_SHIFT			24	/* reg bits [7:0] become emac ctrl [31:24] */
+#define TOPAZ_TQE_EMAC_TDES_1_CNTL_MCAST_APPEND_CNTR_EN_S	16
+#define TOPAZ_TQE_EMAC_TDES_1_CNTL_MCAST_APPEND_CNTR_EN		0x00010000
+#define TOPAZ_TQE_EMAC_TDES_1_CNTL_PRI_MODE			0x0F000000
+#define TOPAZ_TQE_EMAC_TDES_1_CNTL_PRI_MODE_S			24
+#define TOPAZ_TQE_MISC			(TOPAZ_TQE_BASE_ADDR + 0x0004)
+#define TOPAZ_TQE_MISC_CLR_DONE_DLY_CYCLE_NUM		0x000003FF	/* q_avail_clr_done delay cycles */
+#define TOPAZ_TQE_MISC_CLR_DONE_DLY_CYCLE_NUM_S		0
+#define TOPAZ_TQE_MISC_RFLCT_OUT_PORT			0x000F0000	/* dest port for reflected pkts */
+#define TOPAZ_TQE_MISC_RFLCT_OUT_PORT_S			16
+#define TOPAZ_TQE_MISC_RFLCT_OUT_PORT_ENABLE		0x00100000	/* redirect emac0<->emac0 or emac1<->emac1 reflected pkts */
+#define TOPAZ_TQE_MISC_RFLCT_OUT_PORT_ENABLE_S		20
+#define TOPAZ_TQE_MISC_RFLCT_2_OUT_PORT_ENABLE		0x00200000	/* redirect emac0<->emac0/emac1 or emac1<->emac0/emac1 reflected pkts */
+#define TOPAZ_TQE_MISC_RFLCT_2_OUT_PORT_ENABLE_S	21
+#define TOPAZ_TQE_MISC_CLR_DONE_DLY_ENABLE		0x80000000	/* enable q_avail_clr_done delay */
+#define TOPAZ_TQE_MISC_CLR_DONE_DLY_ENABLE_S		31
+#define TOPAZ_TQE_WMAC_Q_STATUS_PTR	(TOPAZ_TQE_BASE_ADDR + 0x0008)
+#define TOPAZ_TQE_CPU_SEM		(TOPAZ_TQE_BASE_ADDR + 0x000c)
+#define TOPAZ_TQE_OUTPORT_EMAC0_CNT	(TOPAZ_TQE_BASE_ADDR + 0x0010)
+#define TOPAZ_TQE_OUTPORT_EMAC1_CNT	(TOPAZ_TQE_BASE_ADDR + 0x0014)
+#define TOPAZ_TQE_OUTPORT_WMAC_CNT	(TOPAZ_TQE_BASE_ADDR + 0x0018)
+#define TOPAZ_TQE_OUTPORT_LHOST_CNT	(TOPAZ_TQE_BASE_ADDR + 0x001c)
+#define TOPAZ_TQE_OUTPORT_MUC_CNT	(TOPAZ_TQE_BASE_ADDR + 0x0020)
+#define TOPAZ_TQE_OUTPORT_DSP_CNT	(TOPAZ_TQE_BASE_ADDR + 0x0024)
+#define TOPAZ_TQE_OUTPORT_AUC_CNT	(TOPAZ_TQE_BASE_ADDR + 0x0028)
+#define TOPAZ_TQE_OUTPORT_PCIE_CNT	(TOPAZ_TQE_BASE_ADDR + 0x002c)
+#define TOPAZ_TQE_Q_AVAIL_CLR_CNTL	(TOPAZ_TQE_BASE_ADDR + 0x0030)
+#define TOPAZ_TQE_Q_AVAIL_CLR_CNTL_TID		0xF
+#define TOPAZ_TQE_Q_AVAIL_CLR_CNTL_TID_S	0
+#define TOPAZ_TQE_Q_AVAIL_CLR_CNTL_NODE		0x7F00
+#define TOPAZ_TQE_Q_AVAIL_CLR_CNTL_NODE_S	8
+#define TOPAZ_TQE_Q_AVAIL_CLR_CNTL_CLEAR	RUBY_BIT(30)
+#define TOPAZ_TQE_Q_AVAIL_CLR_CNTL_CLEAR_DONE	RUBY_BIT(31)
+#define TOPAZ_TQE_DROP_CNT		(TOPAZ_TQE_BASE_ADDR + 0x0034)
+#define TOPAZ_TQE_DROP_EMAC0_CNT	(TOPAZ_TQE_BASE_ADDR + 0x0040)
+#define TOPAZ_TQE_DROP_EMAC1_CNT	(TOPAZ_TQE_BASE_ADDR + 0x0044)
+#define TOPAZ_TQE_DROP_WMAC_CNT		(TOPAZ_TQE_BASE_ADDR + 0x0048)
+#define TOPAZ_TQE_DROP_LHOST_CNT	(TOPAZ_TQE_BASE_ADDR + 0x004c)
+#define TOPAZ_TQE_DROP_MUC_CNT		(TOPAZ_TQE_BASE_ADDR + 0x0050)
+#define TOPAZ_TQE_DROP_DSP_CNT		(TOPAZ_TQE_BASE_ADDR + 0x0054)
+#define TOPAZ_TQE_DROP_AUC_CNT		(TOPAZ_TQE_BASE_ADDR + 0x0058)
+#define TOPAZ_TQE_DROP_PCIE_CNT		(TOPAZ_TQE_BASE_ADDR + 0x005c)
+
+/* TQE-CPU interface */
+#define TOPAZ_TQE_CPUIF_BASE(num)		(TOPAZ_TQE_BASE_ADDR + 0x4000 + 0x1000 * (num))	// For FPGA build 72 and earlier need to use (0xE1040000 + 0x10000 * (num))
+#define TOPAZ_TQE_CPUIF_CSR(num)		(TOPAZ_TQE_CPUIF_BASE(num) + 0x0000)
+#define TOPAZ_TQE_CPUIF_RX_RING_SIZE(num)	(TOPAZ_TQE_CPUIF_BASE(num) + 0x0004)
+#define TOPAZ_TQE_CPUIF_RX_RING(num)		(TOPAZ_TQE_CPUIF_BASE(num) + 0x0008)
+#define TOPAZ_TQE_CPUIF_RX_CURPTR(num)		(TOPAZ_TQE_CPUIF_BASE(num) + 0x000c)
+#define TOPAZ_TQE_CPUIF_PKT_FINISH(num)		(TOPAZ_TQE_CPUIF_BASE(num) + 0x0010)
+#define TOPAZ_TQE_CPUIF_Q_PTR_STATUS(num)	(TOPAZ_TQE_CPUIF_BASE(num) + 0x0014)
+#define TOPAZ_TQE_CPUIF_PPCTL0(num)		(TOPAZ_TQE_CPUIF_BASE(num) + 0x0020)
+#define TOPAZ_TQE_CPUIF_PPCTL1(num)		(TOPAZ_TQE_CPUIF_BASE(num) + 0x0024)
+#define TOPAZ_TQE_CPUIF_PPCTL2(num)		(TOPAZ_TQE_CPUIF_BASE(num) + 0x0028)
+#define TOPAZ_TQE_CPUIF_PPCTL3(num)		(TOPAZ_TQE_CPUIF_BASE(num) + 0x002c)
+#define TOPAZ_TQE_CPUIF_PPCTL4(num)		(TOPAZ_TQE_CPUIF_BASE(num) + 0x0030)
+#define TOPAZ_TQE_CPUIF_PPCTL5(num)		(TOPAZ_TQE_CPUIF_BASE(num) + 0x0034)
+#define TOPAZ_TQE_CPUIF_TXSTART(num)		(TOPAZ_TQE_CPUIF_BASE(num) + 0x0038)
+#define TOPAZ_TQE_CPUIF_STATUS(num)		(TOPAZ_TQE_CPUIF_BASE(num) + 0x003C)
+/* Some bits definitions */
+#define TOPAZ_TQE_CPUIF_CSR_IRQ_EN		RUBY_BIT(0)
+#define TOPAZ_TQE_CPUIF_CSR_IRQ_THRESHOLD(num)	(((num) & 0x7F) << 8)
+#define TOPAZ_TQE_CPUIF_CSR_IRQ_THRESHOLD_EN	RUBY_BIT(15)
+#define TOPAZ_TQE_CPUIF_CSR_RESET		RUBY_BIT(31)
+/* Aux definitions */
+#define TOPAZ_TQE_CPUIF_RXDESC_ALIGN		8	/* TQE CPU rx descriptors must be 64 bit aligned */
+
+/**
+ * Hardware Buffer Manager
+ */
+#define TOPAZ_HBM_BASE_ADDR		(TOPAZ_SWITCH_BASE_ADDR + 0x20000)
+#define TOPAZ_HBM_CSR_REG		(TOPAZ_HBM_BASE_ADDR + 0x0000)
+#define TOPAZ_HBM_CSR_Q_EN(x)		(BIT(0 + (x)))
+#define TOPAZ_HBM_CSR_INT_EN		(BIT(7))
+#define TOPAZ_HBM_CSR_OFLOW_INT_MASK(x)	(BIT(8 + (x)))
+#define TOPAZ_HBM_CSR_UFLOW_INT_MASK(x)	(BIT(12 + (x)))
+#define TOPAZ_HBM_CSR_OFLOW_INT_RAW(x)	(BIT(16 + (x)))
+#define TOPAZ_HBM_CSR_UFLOW_INT_RAW(x)	(BIT(20 + (x)))
+#define TOPAZ_HBM_CSR_INT_MSK_RAW	(0xff << 16)
+#define TOPAZ_HBM_CSR_OFLOW_INT_STATUS(x) (BIT(24 + (x)))
+#define TOPAZ_HBM_CSR_UFLOW_INT_STATUS(x) (BIT(28 + (x)))
+
+#define TOPAZ_HBM_BASE_REG(x)		(TOPAZ_HBM_BASE_ADDR + 0x0004 + ((x) * 0x10))
+#define TOPAZ_HBM_LIMIT_REG(x)		(TOPAZ_HBM_BASE_ADDR + 0x0008 + ((x) * 0x10))
+#define TOPAZ_HBM_WR_PTR(x)		(TOPAZ_HBM_BASE_ADDR + 0x000c + ((x) * 0x10))
+#define TOPAZ_HBM_RD_PTR(x)		(TOPAZ_HBM_BASE_ADDR + 0x0010 + ((x) * 0x10))
+
+#define TOPAZ_HBM_POOL(x)		(TOPAZ_HBM_BASE_ADDR + 0x0100 + ((x) * 0x4))
+#define TOPAZ_HBM_POOL_REQ(x)		(TOPAZ_HBM_BASE_ADDR + 0x0110 + ((x) * 0x4))
+#define TOPAZ_HBM_POOL_DATA(x)		(TOPAZ_HBM_BASE_ADDR + 0x0140 + ((x) * 0x4))
+
+#define TOPAZ_HBM_OVERFLOW_CNT		(TOPAZ_HBM_BASE_ADDR + 0x0190)
+#define TOPAZ_HBM_UNDERFLOW_CNT		(TOPAZ_HBM_BASE_ADDR + 0x0194)
+
+#define TOPAZ_HBM_MASTER_COUNT				9
+#define TOPAZ_HBM_POOL_COUNT				4
+#define TOPAZ_HBM_POOL_REQUEST_CNT(master, pool)	(TOPAZ_HBM_BASE_ADDR + 0x0200 + (master) * 0x20 + (pool) * 0x4)
+#define TOPAZ_HBM_POOL_RELEASE_CNT(master, pool)	(TOPAZ_HBM_BASE_ADDR + 0x0210 + (master) * 0x20 + (pool) * 0x4)
+
+#define TOPAZ_HBM_RELEASE_BUF		(BIT(0))
+#define TOPAZ_HBM_REQUEST_BUF		(BIT(1))
+#define TOPAZ_HBM_POOL_NUM(x)		((x) << 2)
+#define TOPAZ_HBM_DONE			(BIT(31))
+
+/* SoC interrupts */
+#define TOPAZ_SYS_CTL_M2L_HI_INT	PLATFORM_REG_SWITCH(RUBY_SYS_CTL_M2L_INT, (RUBY_SYS_CTL_BASE_ADDR + 0xFC))
+
+/**
+ * Forwarding Table
+ */
+#define TOPAZ_FWT_BASE_ADDR		(TOPAZ_SWITCH_BASE_ADDR + 0x0)
+#define TOPAZ_FWT_SIZE			(BIT(12))
+
+#define TOPAZ_FWT_TABLE_BASE		(TOPAZ_FWT_BASE_ADDR)
+
+#define TOPAZ_FWT_VLAN_TABLE_BASE	(TOPAZ_FWT_BASE_ADDR + 0x10000)
+#define TOPAZ_FWT_VLAN_TABLE_LIMIT	(TOPAZ_FWT_BASE_ADDR + 0x14000)
+
+#define TOPAZ_FWT_CTRL_BASE_ADDR	(TOPAZ_FWT_BASE_ADDR + 0xA000)
+
+#define TOPAZ_FWT_CPU_ACCESS		(TOPAZ_FWT_CTRL_BASE_ADDR + 0x0000)
+#define TOPAZ_FWT_CPU_ACCESS_STATE	0x0000000F
+#define TOPAZ_FWT_CPU_ACCESS_STATE_S	0
+#define TOPAZ_FWT_CPU_ACCESS_STATE_GRANTED	0x3
+#define TOPAZ_FWT_CPU_ACCESS_REQ	BIT(31)
+#define TOPAZ_FWT_TIME_STAMP_CTRL	(TOPAZ_FWT_CTRL_BASE_ADDR + 0x0004)
+#define TOPAZ_FWT_TIME_STAMP_CTRL_UNIT		0x0000001F
+#define TOPAZ_FWT_TIME_STAMP_CTRL_UNIT_S	0
+#define TOPAZ_FWT_TIME_STAMP_CTRL_SCALE		0x000003e0
+#define TOPAZ_FWT_TIME_STAMP_CTRL_SCALE_S	5
+#define TOPAZ_FWT_TIME_STAMP_DIS_AUTO_UPDATE_S	(16)
+#define TOPAZ_FWT_TIME_STAMP_CTRL_CLEAR		BIT(31)
+#define TOPAZ_FWT_TIME_STAMP_CNT	(TOPAZ_FWT_CTRL_BASE_ADDR + 0x0008)
+#define TOPAZ_FWT_HASH_CTRL		(TOPAZ_FWT_CTRL_BASE_ADDR + 0x000c)
+#define TOPAZ_FWT_HASH_CTRL_ENABLE	BIT(15)
+
+#define TOPAZ_FWT_LOOKUP_LHOST		0
+#define TOPAZ_FWT_LOOKUP_MUC		1
+#define TOPAZ_FWT_LOOKUP_DSP		2
+#define TOPAZ_FWT_LOOKUP_AUC		3
+
+#define	__TOPAZ_FWT_LOOKUP_REG(x)	(TOPAZ_FWT_CTRL_BASE_ADDR + 0x0010 + ((x) * 0x10))
+#define	__TOPAZ_FWT_LOOKUP_MAC_LO(x)	(TOPAZ_FWT_CTRL_BASE_ADDR + 0x0014 + ((x) * 0x10))
+#define	__TOPAZ_FWT_LOOKUP_MAC_HI(x)	(TOPAZ_FWT_CTRL_BASE_ADDR + 0x0018 + ((x) * 0x10))
+
+#define TOPAZ_FWT_LOOKUP_TRIG		0x00000001
+#define TOPAZ_FWT_LOOKUP_TRIG_S		0
+#define TOPAZ_FWT_LOOKUP_ENTRY_ADDR	0x7FF00000
+#define TOPAZ_FWT_LOOKUP_ENTRY_ADDR_S	20
+#define TOPAZ_FWT_LOOKUP_HASH_ADDR	0x0003FF00
+#define TOPAZ_FWT_LOOKUP_HASH_ADDR_S	8
+#define TOPAZ_FWT_LOOKUP_VALID		0x80000000
+#define TOPAZ_FWT_LOOKUP_VALID_S	31
+
+#define TOPAZ_FWT_PORT_EMAC0		(0)
+#define TOPAZ_FWT_PORT_EMAC1		(1)
+#define TOPAZ_FWT_PORT_WMAC		(2)
+#define TOPAZ_FWT_PORT_PCIE		(3)
+#define TOPAZ_FWT_PORT_LH		(4)
+#define TOPAZ_FWT_PORT_MUC		(5)
+#define TOPAZ_FWT_PORT_DSP		(6)
+#define TOPAZ_FWT_PORT_AUC		(7)
+
+#define TOPAZ_FWT_ENTRY_NXT_ENTRY	0x0FFE0000
+#define TOPAZ_FWT_ENTRY_NXT_ENTRY_S	17
+#define TOPAZ_FWT_ENTRY_VALID		0x80000000
+#define TOPAZ_FWT_ENTRY_VALID_S		31
+#define TOPAZ_FWT_ENTRY_PORTAL		0x40000000
+#define TOPAZ_FWT_ENTRY_PORTAL_S	30
+
+#define TOPAZ_FWT_ENTRY_OUT_NODE_0		0x0000007F
+#define TOPAZ_FWT_ENTRY_OUT_NODE_0_S		0
+#define TOPAZ_FWT_ENTRY_OUT_NODE_VLD_0		0x00000080
+#define TOPAZ_FWT_ENTRY_OUT_NODE_VLD_0_S	7
+#define TOPAZ_FWT_ENTRY_OUT_NODE_1		0x00007F00
+#define TOPAZ_FWT_ENTRY_OUT_NODE_1_S		8
+#define TOPAZ_FWT_ENTRY_OUT_NODE_VLD_1		0x00008000
+#define TOPAZ_FWT_ENTRY_OUT_NODE_VLD_1_S	15
+#define TOPAZ_FWT_ENTRY_OUT_NODE_2		0x007F0000
+#define TOPAZ_FWT_ENTRY_OUT_NODE_2_S		16
+#define TOPAZ_FWT_ENTRY_OUT_NODE_VLD_2		0x00800000
+#define TOPAZ_FWT_ENTRY_OUT_NODE_VLD_2_S	23
+#define TOPAZ_FWT_ENTRY_OUT_NODE_3		0x7F000000
+#define TOPAZ_FWT_ENTRY_OUT_NODE_3_S		24
+#define TOPAZ_FWT_ENTRY_OUT_NODE_VLD_3		0x80000000
+#define TOPAZ_FWT_ENTRY_OUT_NODE_VLD_3_S	31
+#define TOPAZ_FWT_ENTRY_OUT_NODE_4		0x007F0000
+#define TOPAZ_FWT_ENTRY_OUT_NODE_4_S		16
+#define TOPAZ_FWT_ENTRY_OUT_NODE_VLD_4		0x00800000
+#define TOPAZ_FWT_ENTRY_OUT_NODE_VLD_4_S	23
+#define TOPAZ_FWT_ENTRY_OUT_NODE_5		0x7F000000
+#define TOPAZ_FWT_ENTRY_OUT_NODE_5_S		24
+#define TOPAZ_FWT_ENTRY_OUT_NODE_VLD_5		0x80000000
+#define TOPAZ_FWT_ENTRY_OUT_NODE_VLD_5_S	31
+
+#define TOPAZ_FWT_ENTRY_OUT_PORT	0x00003C00
+#define TOPAZ_FWT_ENTRY_OUT_PORT_S	10
+
+#define TOPAZ_FWT_ENTRY_TIMESTAMP	0x000003FF
+#define TOPAZ_FWT_ENTRY_TIMESTAMP_S	0
+
+#define TOPAZ_FWT_HW_HASH_SHIFT		10
+#define TOPAZ_FWT_HW_HASH_MASK		((1 << TOPAZ_FWT_HW_HASH_SHIFT) - 1)
+#define TOPAZ_FWT_HW_LEVEL1_ENTRIES	(1 << TOPAZ_FWT_HW_HASH_SHIFT)
+#define TOPAZ_FWT_HW_LEVEL2_ENTRIES	1024
+#define TOPAZ_FWT_HW_TOTAL_ENTRIES	(TOPAZ_FWT_HW_LEVEL1_ENTRIES + TOPAZ_FWT_HW_LEVEL2_ENTRIES)
+
+/*
+ * VLAN table
+ */
+#define TOPAZ_VLAN_BASE_ADDR		(TOPAZ_SWITCH_BASE_ADDR + 0x10000)
+#define TOPAZ_VLAN_ENTRIES		(1 << 12)	/* 802.1Q VLAN ID */
+#define TOPAZ_VLAN_ENTRY_ADDR(x)	(TOPAZ_VLAN_BASE_ADDR + 4 * (x))
+#define TOPAZ_VLAN_OUT_NODE		0x0000007F
+#define TOPAZ_VLAN_OUT_NODE_S		0
+#define TOPAZ_VLAN_OUT_PORT		0x00000380
+#define TOPAZ_VLAN_OUT_PORT_S		7
+#define TOPAZ_VLAN_VALID		0x00000400
+#define TOPAZ_VLAN_VALID_S		10
+#define TOPAZ_VLAN_HW_BITMASK		0x000007ff
+
+/* TX AGG */
+#define TOPAZ_TX_AGG_BASE_ADDR				0xE5090000
+#define TOPAZ_TX_AGG_NODE_N_TID_Q_AVAIL(node)		(TOPAZ_TX_AGG_BASE_ADDR + 0x000 + 4 * (node))
+#define TOPAZ_TX_AGG_NODE_N_TID_Q_AVAIL_MASK(val)	((val & 0xFFFF) << 16)
+#define TOPAZ_TX_AGG_NODE_N_TID_Q_AVAIL_SUP(node)	(TOPAZ_TX_AGG_BASE_ADDR + 0x200 + 4 * (node))
+#define TOPAZ_TX_AGG_NODE_N_TID_Q_AVAIL_SUP_MASK(val)	((val & 0xFFFF) << 16)
+#define TOPAZ_TX_AGG_CSR				(TOPAZ_TX_AGG_BASE_ADDR + 0x460)
+#define TOPAZ_TX_AGG_TAC_MAP_MODE_64			0
+#define TOPAZ_TX_AGG_TAC_MAP_MODE_128			1
+#define TOPAZ_TX_AGG_AC					0xF0000000
+#define TOPAZ_TX_AGG_AC_S				28
+#define TOPAZ_TX_AGG_CPU_Q_ACCESS_SEM			(TOPAZ_TX_AGG_BASE_ADDR + 0x464)
+#define TOPAZ_TX_AGG_UC_Q_ACCESS_SEM			(TOPAZ_TX_AGG_BASE_ADDR + 0x468)
+#define TOPAZ_TX_AGG_TAC_CNTL				(TOPAZ_TX_AGG_BASE_ADDR + 0x46C)
+#ifdef TOPAZ_128_NODE_MODE
+#define TOPAZ_TX_AGG_TAC_CNTL_NODE(node)		((node) & 0x7F)
+#else
+#define TOPAZ_TX_AGG_TAC_CNTL_NODE(node)		((node) & 0x3F)
+#endif
+#define TOPAZ_TX_AGG_TAC_CNTL_TID(tid)			(((tid) & 0xF) << 8)
+#define TOPAZ_TX_AGG_TAC_CNTL_READ_CMD(cmd)		(((cmd) & 0x3) << 12)
+#define TOPAZ_TX_AGG_TAC_CNTL_READ_DATA_VLD		RUBY_BIT(29)
+#define TOPAZ_TX_AGG_TAC_CNTL_READ			RUBY_BIT(30)
+#define TOPAZ_TX_AGG_TAC_CNTL_WRITE			RUBY_BIT(31)
+#define TOPAZ_TX_AGG_TAC_DATA				(TOPAZ_TX_AGG_BASE_ADDR + 0x470)
+#define TOPAZ_TX_AGG_TAC_DATA_AC(__ac)			((__ac) & 0x3)
+#define TOPAZ_TX_AGG_TAC_DATA_PRIORITY(__pri)		(((__pri) & 0xFF) << 2)
+#ifdef TOPAZ_128_NODE_MODE
+#define TOPAZ_TX_AGG_TAC_DATA_AC_LO			0x00000003
+#define TOPAZ_TX_AGG_TAC_DATA_AC_LO_S			0
+#define TOPAZ_TX_AGG_TAC_DATA_PRIORITY_LO		0x0000001c
+#define TOPAZ_TX_AGG_TAC_DATA_PRIORITY_LO_S		2
+#define TOPAZ_TX_AGG_TAC_DATA_AC_HI			0x00000060
+#define TOPAZ_TX_AGG_TAC_DATA_AC_HI_S			5
+#define TOPAZ_TX_AGG_TAC_DATA_PRIORITY_HI		0x00000380
+#define TOPAZ_TX_AGG_TAC_DATA_PRIORITY_HI_S		7
+#endif
+#define TOPAZ_TX_AGG_AC_N_NODE_TID(ac)			(TOPAZ_TX_AGG_BASE_ADDR + 0x478 + 4 * (ac))
+#define TOPAZ_TX_AGG_AC_N_STAT_PTR(ac)			(TOPAZ_TX_AGG_BASE_ADDR + 0x488 + 4 * (ac))
+#define TOPAZ_TX_AGG_Q_FULL_THRESH			(TOPAZ_TX_AGG_BASE_ADDR + 0x498)
+#define TOPAZ_TX_AGG_Q_FULL_THRESH_VAL(q0, q1, q2, q3)	(((q0) & 0xF) | (((q1) & 0xF) << 4) | (((q2) & 0xF) << 8) | (((q3) & 0xF) << 12))
+#define TOPAZ_TX_AGG_CPU_IRQ_CSR			(TOPAZ_TX_AGG_BASE_ADDR + 0x49C)
+#define TOPAZ_TX_AGG_STATUS_IRQ				(TOPAZ_TX_AGG_BASE_ADDR + 0x4A0)
+#define TOPAZ_TX_AGG_AC_N_NODE_TID_NO_SEL(ac)		(TOPAZ_TX_AGG_BASE_ADDR + 0x4A4 + 4 * (ac))
+#define TOPAZ_TX_AGG_TAC_CNTL_READ_CMD_NODE_TAB		0
+#define TOPAZ_TX_AGG_TAC_CNTL_READ_CMD_AVAIL_LO		1
+#define TOPAZ_TX_AGG_TAC_CNTL_READ_CMD_AVAIL_HI		3
+#define TOPAZ_TX_AGG_MAX_NODE_NUM			128
+#define TOPAZ_TX_AGG_HALF_MAX_NODE_NUM			(TOPAZ_TX_AGG_MAX_NODE_NUM >> 1)
+
+/*
+ * MuC/Lhost new interrupts.
+ * Old interrupts (even changed number) are in ruby_platform, RUBY_IRQ_*
+ */
+#define	TOPAZ_IRQ_TQE					(5)
+#define TOPAZ_IRQ_HDMA0					(RUBY_IRQ_DMA0)
+#define TOPAZ_IRQ_HBM					(RUBY_IRQ_DMA1)
+#define TOPAZ_IRQ_HDMA1					(RUBY_IRQ_DMA3)
+#define TOPAZ_IRQ_PCIE					(28)
+#define TOPAZ_IRQ_IPC_A2M				(18)
+#define TOPAZ_IQR_TQE_DSP				(19)
+#define	TOPAZ_IRQ_PCIE_DMA				(RUBY_IRQ_DMA2)
+#define	TOPAZ_IRQ_IPC4					(29)
+#define	TOPAZ_MUC_IRQ_BB_PER_PKT			(31)
+#define TOPAZ_HBM_INT_EN				RUBY_BIT(31)
+#define TOPAZ_PCIE_INTX_CLR_MASK			RUBY_BIT(11)
+#define	TOPAZ_PCIE_INT_MASK				RUBY_PCIE_INT_MASK
+#define	TOPAZ_PCIE_MSI_MASK				RUBY_PCIE_MSI_MASK
+#define TOPAZ_PCIE_MSI_EN				RUBY_BIT(0)
+#define TOPAZ_PCIE_MSI_BASE				0xE9000050
+#define TOPAZ_PCIE_MSI_CAP				(TOPAZ_PCIE_MSI_BASE + 0x0)
+
+#define TOPAZ_PCIE_EXP_DEVCTL				(0xE9000078)
+
+/* MSI defines to be used in Topaz PCIe host driver */
+#define	TOPAZ_PCIE_MSI_REGION				RUBY_PCIE_MSI_REGION
+#define	TOPAZ_MSI_ADDR_LOWER				RUBY_MSI_ADDR_LOWER
+#define	TOPAZ_MSI_ADDR_UPPER				RUBY_MSI_ADDR_UPPER
+#define	TOPAZ_MSI_INT_ENABLE				RUBY_MSI_INT_ENABLE
+
+/* AHB Bus monitors */
+#define TOPAZ_BUSMON_INTR_STATUS			(RUBY_SYS_CTL_BASE_ADDR + 0x015c)
+#define TOPAZ_BUSMON_INTR_MASK				(RUBY_SYS_CTL_BASE_ADDR + 0x0160)
+#define TOPAZ_BUSMON_INTR_MASK_TIMEOUT_EN(master)	BIT((master) * 2 + 0)
+#define TOPAZ_BUSMON_INTR_MASK_RANGE_CHECK_EN(master)	BIT((master) * 2 + 1)
+#define TOPAZ_BUSMON_DEBUG_VIEW				(RUBY_SYS_CTL_BASE_ADDR + 0x0164)
+#define TOPAZ_BUSMON_DEBUG_VIEW_MASTER(x)		(((x) & 0x3) << 0)
+#define TOPAZ_BUSMON_DEBUG_VIEW_DATA_SEL(x)		(((x) & 0x7) << 2)
+#define TOPAZ_BUSMON_DEBUG_STATUS			(RUBY_SYS_CTL_BASE_ADDR + 0x0168)
+#define TOPAZ_BUSMON_CTL_BASE_ADDR			(RUBY_SYS_CTL_BASE_ADDR + 0x0200)
+#define TOPAZ_BUSMON_CTL(core)				(TOPAZ_BUSMON_CTL_BASE_ADDR + ((core) * 0x40))
+#define __TOPAZ_BUSMON_CTL_RANGE(core, range)		(TOPAZ_BUSMON_CTL(core) + 0x8 + ((range) * 0x8))
+#define TOPAZ_BUSMON_CTL_RANGE_LOW(core, range)		(__TOPAZ_BUSMON_CTL_RANGE((core), (range)) + 0x0)
+#define TOPAZ_BUSMON_CTL_RANGE_HIGH(core, range)	(__TOPAZ_BUSMON_CTL_RANGE((core), (range)) + 0x4)
+#define TOPAZ_BUSMON_HREADY_EN				BIT(0)
+#define TOPAZ_BUSMON_TIMER_INT_EN			BIT(1)
+#define TOPAZ_BUSMON_TIMER_ERROR_EN			BIT(2)
+#define TOPAZ_BUSMON_ADDR_CHECK_EN			BIT(3)
+#define TOPAZ_BUSMON_REGION_VALID(x)			(((x) & 0xF) << 4)
+#define TOPAZ_BUSMON_TIMEOUT(cycles)			(((cycles) & 0x3FF) << 8)
+#define TOPAZ_BUSMON_BLOCK_TRANS_EN			BIT(18)
+#define TOPAZ_BUSMON_OUTSIDE_ADDR_CHECK			BIT(19)
+
+/* AHB Bus monitor masters */
+#define TOPAZ_BUSMON_LHOST				0
+#define TOPAZ_BUSMON_MUC				1
+#define TOPAZ_BUSMON_DSP				2
+#define TOPAZ_BUSMON_AUC				3
+#define TOPAZ_BUSMON_WMAC				4
+#define TOPAZ_BUSMON_PCIE				5
+#define TOPAZ_BUSMON_SWE				6
+#define TOPAZ_BUSMON_EMAC				7
+
+#define TOPAZ_BUSMON_MASTER_NAMES	{ "lhost", "muc", "dsp", "auc", "wmac", "pcie", "swe", "emac" }
+
+/* AHB Bus monitor debug data select */
+#define TOPAZ_BUSMON_ADDR				0
+#define TOPAZ_BUSMON_WR_L32				1
+#define TOPAZ_BUSMON_WR_H32				2
+#define TOPAZ_BUSMON_RD_L32				3
+#define TOPAZ_BUSMON_RD_H32				4
+#define TOPAZ_BUSMON_CTRL0				5
+#define TOPAZ_BUSMON_CTRL1				6
+#define TOPAZ_BUSMON_CTRL2				7
+#define TOPAZ_BUSMON_DEBUG_MAX				8
+
+/* GPIO Registers */
+#define RUBY_GPIO3_PWM1					(RUBY_GPIO1_PWM0 + 4)
+#define RUBY_GPIO12_PWM3				(RUBY_GPIO1_PWM0 + 12)
+#define RUBY_GPIO13_PWM4				(RUBY_GPIO1_PWM0 + 16)
+#define RUBY_GPIO15_PWM5				(RUBY_GPIO1_PWM0 + 20)
+#define RUBY_GPIO16_PWM6				(RUBY_GPIO1_PWM0 + 24)
+#define RUBY_GPIO_PWM_LOW_SHIFT				(0)
+#define RUBY_GPIO_PWM_HIGH_SHIFT			(8)
+#define RUBY_GPIO_PWM_ENABLE				(BIT(16))
+#define RUBY_GPIO_PWM_MAX_COUNT				(255)
+
+#ifdef TOPAZ_AMBER_IP
+#define	AMBER_GPIO11_PWM0				(RUBY_GPIO_REGS_ADDR + 0x20)
+#define AMBER_GPIO12_PWM1				(RUBY_GPIO_REGS_ADDR + 0x24)
+#define	AMBER_GPIO13_PWM2				(RUBY_GPIO_REGS_ADDR + 0x28)
+#define AMBER_GPIO14_PWM3				(RUBY_GPIO_REGS_ADDR + 0x2C)
+#define AMBER_GPIO15_PWM4				(RUBY_GPIO_REGS_ADDR + 0x30)
+#define AMBER_GPIO16_PWM5				(RUBY_GPIO_REGS_ADDR + 0x34)
+#define AMBER_GPIO17_PWM6				(RUBY_GPIO_REGS_ADDR + 0x38)
+#endif
+
+/* Interrupt lines */
+#define TOPAZ_IRQ_MISC_WDT				(57)
+#define TOPAZ_IRQ_MISC_SPI1				(58)
+#define TOPAZ_IRQ_MISC_AHB_MON				(61)
+#define TOPAZ_IRQ_MISC_HBM				(62)
+#define TOPAZ_IRQ_MISC_FWT				(63)
+#define TOPAZ_IRQ_MISC_EXT_IRQ_COUNT			(8)
+#define TOPAZ_IRQ_MISC_RST_CAUSE_START			(9)
+
+/* RESET CAUSE */
+#define TOPAZ_SYS_CTL_INTR_TIMER_MSK(t)		(1 << (3 + (t)))
+
+#endif /* #ifndef __TOPAZ_PLATFORM_H */
diff --git a/quantenna/common/topaz_reset.h b/quantenna/common/topaz_reset.h
new file mode 100644
index 0000000..fab7393
--- /dev/null
+++ b/quantenna/common/topaz_reset.h
@@ -0,0 +1,94 @@
+/*
+ * (C) Copyright 2015 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/* This header file defines reset function to be used on Topaz */
+
+#ifndef __TOPAZ_RESET_H
+#define __TOPAZ_RESET_H
+
+#include <include/qtn/mproc_sync_base.h>
+#ifdef TOPAZ_AMBER_IP
+#include <include/qtn/amber.h>
+#endif
+
+static void topaz_set_reset_vec(int enable, unsigned long reset)
+{
+#ifdef TOPAZ_AMBER_IP
+	unsigned long flush_mask = 0;
+
+	switch (reset) {
+	case TOPAZ_SYS_CTL_RESET_AUC:
+		flush_mask = TOPAZ_AMBER_BUS_FLUSH_AUC;
+		break;
+	case RUBY_SYS_CTL_RESET_DSP_ALL:
+		flush_mask = TOPAZ_AMBER_BUS_FLUSH_DSP;
+		break;
+	case RUBY_SYS_CTL_RESET_MUC_ALL:
+		flush_mask = TOPAZ_AMBER_BUS_FLUSH_MUC;
+		break;
+	case RUBY_SYS_CTL_RESET_ENET0:
+		flush_mask = TOPAZ_AMBER_BUS_FLUSH_RGMII;
+		break;
+	case RUBY_SYS_CTL_RESET_IOSS:
+		flush_mask = TOPAZ_AMBER_BUS_FLUSH_BRIDGE | TOPAZ_AMBER_BUS_FLUSH_DMA;
+		break;
+	case RUBY_SYS_CTL_RESET_MAC:
+		flush_mask = TOPAZ_AMBER_BUS_FLUSH_WMAC;
+		break;
+	case RUBY_SYS_CTL_RESET_BB:
+		flush_mask = 0;
+		break;
+	default:
+		/* In the case we accidentally get here - request/release flush for everything to be safe */
+		flush_mask = TOPAZ_AMBER_BUS_FLUSH_AUC |
+			TOPAZ_AMBER_BUS_FLUSH_DSP |
+			TOPAZ_AMBER_BUS_FLUSH_MUC |
+			TOPAZ_AMBER_BUS_FLUSH_RGMII |
+			TOPAZ_AMBER_BUS_FLUSH_BRIDGE |
+			TOPAZ_AMBER_BUS_FLUSH_DMA |
+			TOPAZ_AMBER_BUS_FLUSH_WMAC |
+			TOPAZ_AMBER_BUS_FLUSH_LHOST;
+		qtn_mproc_sync_log("%s:%u: error - invalid reset flag 0x%08x\n", __FILE__, __LINE__, reset);
+		break;
+	}
+
+	if (!enable && flush_mask) {
+		/* Need to request bus flush before switching off */
+		amber_bus_flush_req(flush_mask);
+	}
+#endif
+
+	qtn_mproc_sync_mem_write(RUBY_SYS_CTL_CPU_VEC_MASK, reset);
+	qtn_mproc_sync_mem_write_wmb(RUBY_SYS_CTL_CPU_VEC, enable ? reset : 0);
+	qtn_mproc_sync_mem_write_wmb(RUBY_SYS_CTL_CPU_VEC_MASK, 0);
+
+#ifdef TOPAZ_AMBER_IP
+	if (enable && flush_mask) {
+		/* Need to release bus flush after switching on */
+		amber_bus_flush_release(flush_mask);
+	}
+#endif
+
+}
+#endif // #ifndef __TOPAZ_RESET_H
+
+
diff --git a/quantenna/common/topaz_rfic6_config b/quantenna/common/topaz_rfic6_config
new file mode 100644
index 0000000..0b7d498
--- /dev/null
+++ b/quantenna/common/topaz_rfic6_config
@@ -0,0 +1,149 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * Header file which describes Topaz platform.
+ * Has to be used by both kernel and bootloader.
+ */
+
+#ifndef __TOPAZ_CONFIG_H
+#define __TOPAZ_CONFIG_H
+
+#include "current_platform.h"
+
+#if !TOPAZ_FPGA_PLATFORM
+#undef TOPAZ_ICACHE_WORKAROUND
+#endif
+
+/*
+ * Control registers move depending on unified + alias bit
+ */
+
+#define TOPAZ_MMAP_UNIFIED	0
+#define TOPAZ_MMAP_ALIAS	0
+#define TOPAZ_RX_ACCELERATE	1
+
+/*
+ * VSP/QTM
+ * Macro TOPAZ_QTM is used to help identify changes between original VSP and QTM.
+ * In Lhost kernel driver, it must be used within CONFIG_QVSP(in kernel .config).
+ * CONFIG_QVSP	TOPAZ_QTM	ruby		topaz
+ * Y		1		invalid		*QTM works
+ * Y		0		*VSP works	VSP alive but doesn't work for HDP
+ * N		1		invalid		*no VSP/QTM
+ * N		0		*no VSP		no VSP/QTM, and no QTM changes in MuC and AuC
+ * So generally, sololy changing CONFIG_QVSP works for both ruby and topaz as indicated by *.
+ * But to throughly clean QTM code in AuC and MuC, disable TOPAZ_QTM in topaz below.
+ */
+	#define TOPAZ_QTM		1
+
+/*
+ * HBM buffer process in MuC requires that TOPAZ_AUC_RX is dependent on TOPAZ_RX_ACCELERATE, so let's
+ * enable TOPAZ_AUC_RX only when TOPAZ_RX_ACCELERATE is enabled.
+ */
+#if TOPAZ_RX_ACCELERATE
+#define TOPAZ_AUC_RX	1
+#else
+#define TOPAZ_AUC_RX	0
+#endif
+
+#if TOPAZ_MMAP_ALIAS && !TOPAZ_MMAP_UNIFIED
+	#error Alias map requires unified map
+#endif
+
+#if TOPAZ_MMAP_ALIAS
+	#define TOPAZ_ALIAS_MAP_SWITCH(a, b)	(b)
+#else
+	#define TOPAZ_ALIAS_MAP_SWITCH(a, b)	(a)
+#endif
+
+/* Topaz fixed phy addresses */
+#define TOPAZ_FPGAA_PHY0_ADDR		2
+#define TOPAZ_FPGAA_PHY1_ADDR		3
+#define TOPAZ_FPGAB_PHY0_ADDR		4
+#define TOPAZ_FPGAB_PHY1_ADDR		1
+#define TOPAZ_PHY0_ADDR				1
+#define TOPAZ_PHY1_ADDR				3
+
+#ifndef TOPAZ_FPGA_PLATFORM
+	#define TOPAZ_FPGA_PLATFORM	0
+#endif
+
+/* Definition indicates that Topaz platform is FPGA */
+#if TOPAZ_FPGA_PLATFORM
+	/* CLK speeds are in MHz and 1/10th the speed of actual ASIC */
+	#define TOPAZ_SERIAL_BAUD	38400
+	#define TOPAZ_APB_CLK		12500000
+	#define TOPAZ_AHB_CLK		25000000
+	#define TOPAZ_CPU_CLK		50000000
+	#define RUBY_FPGA_DDR
+#else
+	#define TOPAZ_SERIAL_BAUD	115200
+	#define TOPAZ_APB_CLK		125000000
+	#define TOPAZ_AHB_CLK		250000000
+	#define TOPAZ_CPU_CLK		500000000
+	#define RUBY_ASIC_DDR
+#endif /* #if TOPAZ_FPGA_PLATFORM */
+
+/*
+ * Setting UPF_SPD_FLAG gives a developer the option to set the
+ * flag to match a UPF_ define from <linux>/include/linux/serial_core.h
+ * or set the value to 0 to use the default baud rate setting DEFAULT_BAUD
+ */
+#define UPF_SPD_FLAG	0
+#define DEFAULT_BAUD	TOPAZ_SERIAL_BAUD
+
+/*
+ * Re-use Ruby defines to simplify the number of changes required
+ * to compile new binaries for Topaz
+ */
+#define RUBY_SERIAL_BAUD	TOPAZ_SERIAL_BAUD
+#define RUBY_FIXED_DEV_CLK	TOPAZ_APB_CLK
+#define RUBY_FIXED_CPU_CLK	TOPAZ_CPU_CLK
+
+#ifdef PLATFORM_DEFAULT_BOARD_ID
+        #define DEFAULT_BOARD_ID	PLATFORM_DEFAULT_BOARD_ID
+#else
+	/* Default board id used to match Topaz setting if there is no SPI Flash */
+	#define DEFAULT_BOARD_ID	QTN_TOPAZ_BB_BOARD
+#endif /* TOPAZ_DEFAULT_BOARD_ID */
+
+#ifndef PLATFORM_ARC7_MMU_VER
+	#define PLATFORM_ARC7_MMU_VER	2
+#endif
+
+#define CONFIG_RUBY_BROKEN_IPC_IRQS	0
+
+#define RUBY_IPC_HI_IRQ(bit_num)	((bit_num) + 8)
+#define RUBY_M2L_IPC_HI_IRQ(bit_num)	(bit_num)
+
+#define PLATFORM_REG_SWITCH(reg1, reg2)	(reg2)
+
+#define writel_topaz(a, b)		writel(a, b)
+#define writel_ruby(a, b)
+
+#define QTN_VLAN_LLC_ENCAP		1
+
+#define TOPAZ_128_NODE_MODE		1
+
+#endif /* #ifndef __TOPAZ_CONFIG_H */
+
diff --git a/quantenna/common/uboot_header.h b/quantenna/common/uboot_header.h
new file mode 100644
index 0000000..478cf06
--- /dev/null
+++ b/quantenna/common/uboot_header.h
@@ -0,0 +1,70 @@
+/*
+ *  Copyright (c) 2015 Quantenna Communications, Inc.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * This code is taken from u-boot/include/image.h file
+ */
+#ifndef UBOOT_HEADER_H
+#define UBOOT_HEADER_H
+
+#ifndef __ASSEMBLY__
+#define IH_MAGIC      0x27051956      /* Image Magic Number           */
+#define IH_NMLEN              32      /* Image Name Length            */
+
+/*
+ * Legacy format image header,
+ * all data in network byte order (aka natural aka bigendian).
+ */
+typedef struct image_header {
+	uint32_t        ih_magic;       /* Image Header Magic Number    */
+	uint32_t        ih_hcrc;        /* Image Header CRC Checksum    */
+	uint32_t        ih_time;        /* Image Creation Timestamp     */
+	uint32_t        ih_size;        /* Image Data Size              */
+	uint32_t        ih_load;        /* Data  Load  Address          */
+	uint32_t        ih_ep;          /* Entry Point Address          */
+	uint32_t        ih_dcrc;        /* Image Data CRC Checksum      */
+	uint8_t         ih_os;          /* Operating System             */
+	uint8_t         ih_arch;        /* CPU architecture             */
+	uint8_t         ih_type;        /* Image Type                   */
+	uint8_t         ih_comp;        /* Compression Type             */
+	uint8_t         ih_name[IH_NMLEN];      /* Image Name           */
+} image_header_t;
+
+static inline uint32_t image_get_header_size(void)
+{
+#define MAX_KNOWN_PAGE_SIZE 8192
+#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
+	return ROUND_UP(sizeof(image_header_t), MAX_KNOWN_PAGE_SIZE);
+}
+
+struct early_flash_config {
+	uint32_t	method;
+	uint32_t	ipaddr;
+	uint32_t	serverip;
+	uint8_t		reserved[8];
+	uint8_t		built_time_utc_sec[11];
+	uint8_t		uboot_type;
+} __attribute__ ((packed));
+#endif /* __ASSEMBLY__ */
+
+#define RUBY_BOOT_METHOD_TRYLOOP        0
+#define RUBY_BOOT_METHOD_TFTP           1
+#define RUBY_BOOT_METHOD_BOOTP          2
+#define RUBY_BOOT_METHOD_MAX            3
+
+#endif /* UBOOT_HEADER_H */
+
diff --git a/quantenna/common/ums_platform.h b/quantenna/common/ums_platform.h
new file mode 100755
index 0000000..ff8e7bd
--- /dev/null
+++ b/quantenna/common/ums_platform.h
@@ -0,0 +1,347 @@
+/*
+ *  common/ums_platform.h
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2007.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * This file holds the hardware specific memory map and common declarations
+ * for the UMS build system.  The defines here are used in the bootrom,
+ * the U-Boot bootloader and the linux kernel.
+ *
+ * This file should only contain definitions that are assembler-friendly.
+ */
+
+#ifndef __UMS_PLATFORM_H
+#define __UMS_PLATFORM_H	1
+
+/* ================ System boot modes ================ */
+/* These are used in the boot rom which is hardcoded into
+ * the chip.  Do not change them unless the chip changes.
+ */
+#define BMODE_PRODUCTION_TEST 0
+#define BMODE_SERIAL_ICC 1
+#define BMODE_NOR 2
+
+/* ================ Physical address map ================ */
+#define UMS_DDR				0x00000000
+#define UMS_SRAM			0x80000000
+#define UMS_SRAM_SIZE			0x00080000
+#define UMS_EBB_CS0			0x90000000
+#define UMS_EBB_CS1			0x91000000
+#define UMS_EBB_CS2			0x92000000
+#define UMS_EBB_CS3			0x93000000
+#define UMS_EBB_CS4			0x94000000
+#define UMS_BOOTROM			0xA0000000
+#define UMS_ARM_ITCM			0xB0000000
+#define UMS_ITCM_SIZE			0x00008000
+#define UMS_ARM_DTCM			0xB0100000
+#define UMS_DTCM_SIZE			0x00008000
+#define UMS_REGS_DSP_UART		0xD0000000
+#define UMS_REGS_DSP_GPIO		0xD1000000
+#define UMS_REGS_DSP_SPI		0xD3000000
+#define UMS_REGS_DSP_CTRLRESET		0xD8000000
+#define UMS_REGS_DSP_MSP		0xD9000000
+#define UMS_REGS_DSP_XMEM		0xDCF80000
+#define UMS_REGS_DSP_YMEM		0xDCFA0000
+#define UMS_REGS_SYSCTRL		0xE0000000
+#define UMS_REGS_DDR			0xE1000000
+#define UMS_REGS_EBI			0xE2000000
+#define UMS_REGS_SRAM			0xE3000000
+#define UMS_REGS_MB			0xE4000000
+#define UMS_REGS_MAC			0xE5000000
+#define UMS_REGS_BB			0xE6000000
+#define UMS_REGS_RADAR			0xE6080000
+#define UMS_REGS_BB2			0xE6800000
+#define UMS_REGS_RADAR2			0xE6880000
+#define UMS_REGS_ICC			0xE8000000
+#define UMS_REGS_USB			0xE9000000
+#define UMS_REGS_ULA			0xEC000000
+#define UMS_REGS_ULA_MB         0xEC200000
+#define UMS_REGS_ETHERNET0		0xED000000
+#define UMS_REGS_ARM_UART0		0xF0000000
+#define UMS_REGS_ARM_GPIO		0xF1000000
+#define UMS_REGS_ARM_SPI		0xF2000000
+#define UMS_REGS_ARM_TIMERS		0xF3000000
+#define UMS_REGS_ARM_WATCHDOG		0xF4000000
+#define UMS_REGS_ARM_UART1		0xF5000000
+#define UMS_REGS_ARM_DMA		0xF8000000
+#define UMS_REGS_ARM_DSPI2C		0xF9000000
+#define UMS_REGS_ARM_VICS		0xFFF00000
+
+/* Explicit virtual address mappings for TCMs */
+#define UMS_ARM_ITCM_VA			0xFB000000
+#define UMS_ARM_DTCM_VA			0xFB100000
+
+#define UMS_ARM_SRAM_AREA		UMS_SRAM + CONFIG_ARCH_UMS_MUC_SRAM_REQUIREMENT
+#define UMS_ARM_SRAM_AREA_VA		IO_ADDRESS(UMS_ARM_SRAM_AREA)
+
+/* !!! FIXME_UMS - at present SRAM lives in IO address space */
+#define UMS_IO_AREA_START		UMS_SRAM
+
+/* ============== Interrupt functions ============== */
+
+/* Set bits in these values to make an interrupt a FIQ rather than an IRQ.
+   SELECT0 is for interrupts 0-31, SELECT1 for the others.
+*/
+#define FIQ_SELECT0 (0)
+#define FIQ_SELECT1 (0)
+
+#define VIC0_OFFSET	0x000FF000
+#define VIC1_OFFSET	0x000FE000
+#define INTERRUPT_VA0(a) (IO_ADDRESS(UMS_REGS_ARM_VICS) + VIC0_OFFSET + (a))
+#define INTERRUPT_VA1(a) (IO_ADDRESS(UMS_REGS_ARM_VICS) + VIC1_OFFSET + (a))
+#define PL192_IRQSTATUS (0)
+#define PL192_INTSELECT (0x0c)
+#define PL192_ENABLE (0x10)
+#define PL192_DISABLE (0x14)
+#define PL192_SOFTINT (0x18)
+#define PL192_SOFTINT_CLEAR (0x1c)
+#define PL192_PROTECTION (0x20)
+#define PL192_PRIORITY_MASK (0x24)
+#define PL192_PRIORITY_DAISY (0x28)
+#define PL192_VECTOR_ADDR (0x100)
+#define PL192_VECTOR_PRIORITY (0x200)
+#define PL192_VECTORADDRESS	0x0F00
+
+/* ============== Timer functions ============== */
+
+#define TIMER_VA(a) (IO_ADDRESS(UMS_REGS_ARM_TIMERS) + (a))
+
+#define TIMER_PRESCALAR_ENABLE (0x00)
+#define TIMER_PRESCALAR0 (0x04)
+#define TIMER_PRESCALAR1 (0x08)
+#define TIMER_CONTROL0 (0x0c)
+#define TIMER_VALUE0 (0x10)
+#define TIMER_CONTROL1 (0x14)
+#define TIMER_VALUE1 (0x18)
+#define TIMER_CONTROL2 (0x1c)
+#define TIMER_VALUE2 (0x20)
+#define TIMER_CONTROL3 (0x24)
+#define TIMER_VALUE3 (0x28)
+#define TIMER_INT_ENABLE (0x2c)
+#define TIMER_INT_STATUS (0x30)
+#define TIMER_INT_CLEAR (0x34)
+
+/* GPIO block register offsets */
+#define GPIO_INPUT		(0x00)
+#define GPIO_OUTPUT_MASK	(0x04)
+#define GPIO_OUTPUT		(0x08)
+#define GPIO_MODE1		(0x0c)
+#define GPIO_MODE2		(0x10)
+#define GPIO_ALTFN		(0x14)
+#define GPIO_ALTFN_DEFVAL	(0x18)
+
+/* GPIO special function GPIO line assignments (ARM GPIO block) */
+#define GPIO_UART0_SI		(0)
+#define GPIO_UART0_nRI		(1)
+#define GPIO_UART0_DSR		(2)
+#define GPIO_UART0_nDCD		(3)
+#define GPIO_UART0_nCTS		(4)
+#define GPIO_SPI_MISO		(5)
+#define GPIO_UART1_SI		(6)
+#define GPIO_UART0_SO		(8)
+#define GPIO_UART0_nRTS		(9)
+#define GPIO_UART0_nDTR		(10)
+#define GPIO_SPI_SCK		(11)
+#define GPIO_SPI_MOSI		(12)
+#define GPIO_UART1_SO		(13)
+#define GPIO_SPI_nCS		(14)
+
+/* alternate use for gpio5 */
+#define GPIO_RGMII_MODE		(5)
+
+/* GPIO mode register values */
+#define GPIO_MODE_INPUT		(0)
+#define GPIO_MODE_OUTPUT	(1)
+#define GPIO_MODE_OSOURCE	(2)
+#define GPIO_MODE_ODRAIN	(3)
+
+/* SPI controller register offsets */
+#define SPI_SPCR		(0x00)
+#define SPI_SPSR		(0x04)
+#define SPI_SPDR		(0x08)
+#define SPI_SPER		(0x0c)
+#define SPI_SLVN		(0x10)
+
+/* SPI status register bits */
+#define SPI_SPSR_RFEMPTY	(1 << 0)
+#define SPI_SPSR_RFFULL		(1 << 1)
+#define SPI_SPSR_WFEMPTY	(1 << 2)
+#define SPI_SPSR_WFFULL		(1 << 3)
+
+/* SPI control register bits */
+#define SPI_SPCR_SPR(x)		(((x) & 3) << 0)
+#define SPI_SPCR_CPHA		(1 << 2)
+#define SPI_SPCR_CPOL		(1 << 3)
+#define SPI_SPCR_MSTR		(1 << 4)
+#define SPI_SPCR_SPE		(1 << 6)
+#define SPI_SPCR_SPIE		(1 << 7)
+
+/* SPI extended control register bits */
+#define SPI_SPER_ESPR(x)	(((x) & 3) << 0)
+#define SPI_SPER_ICNT(x)	(((x) & 3) << 6)
+
+/* System controller register offset and bit position definitions */
+#define SYSCTRL_RESET_MASK	(0x00)
+#define SYSCTRL_RESET		(0x04)
+#define SYSCTRL_CTRL_MASK	(0x08)
+#define SYSCTRL_CTRL		(0x0c)
+#define SYSCTRL_RESET_CAUSE	(0x10)
+#define SYSCTRL_REV_NUMBER	(0x14)
+#define SYSCTRL_RGMII_DELAY	(0x1c)
+
+/* Reset bit positions for RESET_MASK and RESET_VEC registers */
+#define SYSCTRL_ARM_RUN		(1 << 0)
+#define SYSCTRL_EBI_RUN		(1 << 1)
+#define SYSCTRL_DDR_RUN		(1 << 2)
+#define SYSCTRL_SRAM_RUN	(1 << 3)
+#define SYSCTRL_DSPSS_RUN	(1 << 4)
+#define SYSCTRL_DSP_RUN		(1 << 5)
+#define SYSCTRL_MUC_RUN		(1 << 6)
+#define SYSCTRL_NETSS_RUN	(1 << 7)
+#define SYSCTRL_MMC_RUN		(1 << 8)
+#define SYSCTRL_ETHERNET_RUN	(1 << 9)
+#define SYSCTRL_IOSS_RUN	(1 << 10)
+#define SYSCTRL_ICC_RUN		(1 << 12)
+#define SYSCTRL_USB_RUN		(1 << 13)
+#define SYSCTRL_RESET_OUT   (1 << 31)
+
+/* System controller control register */
+#define SYSCTRL_BOOT_MODE(x)	(((x) & 7) << 0)
+#define SYSCTRL_REMAP(x)	(((x) & 3) << 3)
+#define SYSCTRL_CLKSEL(x)	(((x) & 3) << 5)
+#define SYSCTRL_ARM_IS_2X	(1 << 7)
+#define SYSCTRL_DSP_CLK		(1 << 8)
+#define SYSCTRL_MAC_CLK(x)	(((x) & 7) << 9)
+#define SYSCTRL_REMAP_SRAM	(1 << 12)
+#define SYSCTRL_ULPI_ENABLE	(1 << 13)
+#define SYSCTRL_ARM_GPIO_ENABLE	(1 << 14)
+#define SYSCTRL_DSP_GPIO_ENABLE	(1 << 15)
+#define SYSCTRL_EBI_MUXMODE	(1 << 16)
+#define SYSCTRL_ARBITER_MODE(x)	(((x) & 0xf) << 17)
+#define SYSCTRL_SPLIT_DISABLE	(1 << 21)
+#define SYSCTRL_EXT_USBCLK	(1 << 22)
+#define SYSCTRL_PCIE_ENABLE	(1 << 23)
+#define SYSCTRL_NETBUS_SWAP	(1 << 24)
+#define SYSCTRL_IOBUS_SWAP	(1 << 25)
+#define SYSCTRL_DSPBUS_SWAP	(1 << 26)
+
+#define SYSCTRL_REMAP_DDR	(0)
+#define SYSCTRL_REMAP_ROM	(1)
+#define SYSCTRL_REMAP_NOR	(2)
+#define SYSCTRL_REMAP_NAND	(3)
+
+/* Reset cause definitions */
+#define SYSCTRL_HARD_RESET	(1 << 0)
+#define SYSCTRL_SOFT_RESET	(1 << 1)
+#define SYSCTRL_WATCHDOG	(1 << 2)
+#define SYSCTRL_PLL_DRIFT	(1 << 3)
+#define SYSCTRL_EBI_STRAP(x)	(((x) & 3) >> 16)
+
+/* bbic2 bit to switch between 100M and 1000M */
+#define SYS_CTL_GMII_CLK_SEL	(1 << 23)
+#define SYS_CTL_FORCE_RGMII		(0xc0000000)
+
+/* Chip revision macros - use with SYSCTRL_REV_NUMBER */
+#define SYSCTRL_CHIP_MINOR(x)	((x) & 0xff)
+#define SYSCTRL_CHIP_MAJOR(x)	(((x) & 0xff) >> 8)
+#define SYSCTRL_CHIP_TYPE(x)	(((x) & 0xff) >> 16)
+#define SYSCTRL_CHIP_TYPE_UMS	(0)
+
+/* UART register offsets */
+#define PL011_DR	(0x00)
+#define PL011_RSR_ECR	(0x04)
+#define PL011_FR	(0x18)
+#define PL011_ILPR	(0x20)
+#define PL011_IBRD	(0x24)
+#define PL011_FBRD	(0x28)
+#define PL011_LCR_H	(0x2c)
+#define PL011_CR	(0x30)
+#define PL011_IFLS	(0x34)
+#define PL011_IMSC	(0x38)
+#define PL011_RIS	(0x3c)
+#define PL011_MIS	(0x40)
+#define PL011_ICR	(0x44)
+#define PL011_DMACR	(0x48)
+#define PL011_PERIPHID0	(0xfe0)
+#define PL011_PERIPHID1	(0xfe4)
+#define PL011_PERIPHID2	(0xfe8)
+#define PL011_PERIPHID3	(0xfec)
+#define PL011_CELLID0	(0xff0)
+#define PL011_CELLID1	(0xff4)
+#define PL011_CELLID2	(0xff8)
+#define PL011_CELLID3	(0xffc)
+
+/* Static memory controller offsets */
+#define PL241_DIRCMD	(0x1010)
+#define PL241_SETCYC	(0x1014)
+#define PL241_SETOPM	(0x1018)
+#define PL241_SETCYC0	(0x1100)
+#define PL241_SETOPM0	(0x1104)
+
+/* ICC register offsets */
+#define ICC_SRC		(0x00)
+#define ICC_DST		(0x04)
+#define ICC_CTRL	(0x08)
+#define ICC_ISR		(0x0C)
+#define ICC_MASKED_ISR	(0x10)
+#define ICC_IEN		(0x14)
+#define ICC_CLR_RIP	(0x18)
+#define ICC_RD_CMD	(0x20)
+#define ICC_BUSY_FLAG	(1 << 31) /* Busy bit in CTRL register */
+#define ICC_RD_COMPLETE	(1 << 1)  /* Read complete bit in ISR register */
+#define ICC_MAX_XFER	(0x8000) /* Max ICC length = 64kB !!! FIXME */
+
+/* MAC register offsets */
+#define UMS_MAC_IMEM	(0x00000)
+#define UMS_MAC_DMEM	(0x20000)
+#define UMS_MAC_PKTMEM	(0x30000)
+#define UMS_MAC_TXMEM	(0x40000)
+#define UMS_MAC_GBLCTRL	(0x42000)
+#define UMS_MAC0_TXREGS	(0x50000)
+#define UMS_MAC0_RXREGS	(0x52000)
+#define UMS_MAC0_SHARED	(0x53000)
+#define UMS_MAC1_TXREGS	(0x60000)
+#define UMS_MAC1_RXREGS	(0x62000)
+#define UMS_MAC1_SHARED	(0x63000)
+#define UMS_MAC_DMA	(0x70000)
+#define UMS_MAC_HOSTIF	(0x71000)
+
+/* BB register offsets*/
+/* MAY need revisit XXX */
+#define UMS_BB_SPI  (0x40000)
+#define UMS_BB_GAIN (0x50000) 
+#define UMS_BB_XREF (0x60000) 
+#define UMS_BB_RFIC (0x70000)
+#define UMS_BB_RDR  (0x80000)
+#define UMS_BB_COMPQ_MEM  (0xB0000)
+
+/* MBX register offsets */
+#define UMS_MBX_DSP_POP  (0x0000)
+#define UMS_MBX_DSP_PUSH (0x0040)
+#define UMS_MBX_CTRL     (0x0080)
+#define UMS_MBX_STATUS   (0x0084)
+#define UMS_MBX_INT_MSK  (0x0088)
+#define UMS_MBX_INT_CLR  (0x008C)
+
+/* MBX register bitfields */
+#define UMS_MBX_INT0 (1 << 0)
+#define UMS_MBX_INT1 (1 << 1)
+
+#define UMS_MBX_DSP_TO_ARM_EMPTY ( 1 << 24 )
+
+#endif
diff --git a/quantenna/configs/topaz_config b/quantenna/configs/topaz_config
new file mode 100644
index 0000000..7a00dbe
--- /dev/null
+++ b/quantenna/configs/topaz_config
@@ -0,0 +1,1883 @@
+#
+# Platform
+#
+CONFIG_PLATFORM_ID=410
+CONFIG_PLATFORM_TYPE=topaz
+CONFIG_PLATFORM_DESCR="BBIC4 Video Bridge with 128MB DDR"
+
+#
+# Filesystem & toolchain
+#
+#prefix0#buildroot/#
+BR2_HAVE_DOT_CONFIG=y
+#prefix0#buildroot/#
+# BR2_alpha is not set
+#prefix0#buildroot/#
+# BR2_arm is not set
+#prefix0#buildroot/#
+# BR2_armeb is not set
+#prefix0#buildroot/#
+# BR2_avr32 is not set
+#prefix0#buildroot/#
+# BR2_cris is not set
+#prefix0#buildroot/#
+# BR2_i386 is not set
+#prefix0#buildroot/#
+# BR2_m68k is not set
+#prefix0#buildroot/#
+# BR2_mips is not set
+#prefix0#buildroot/#
+# BR2_mipsel is not set
+#prefix0#buildroot/#
+# BR2_nios2 is not set
+#prefix0#buildroot/#
+# BR2_powerpc is not set
+#prefix0#buildroot/#
+# BR2_sh is not set
+#prefix0#buildroot/#
+# BR2_sh64 is not set
+#prefix0#buildroot/#
+# BR2_sparc is not set
+#prefix0#buildroot/#
+# BR2_x86_64 is not set
+#prefix0#buildroot/#
+BR2_arc=y
+#prefix0#buildroot/#
+BR2_ARCH="arc"
+
+#
+# Build options
+#
+#prefix0#buildroot/#
+BR2_WGET="wget --passive-ftp"
+#prefix0#buildroot/#
+BR2_SVN="svn co"
+#prefix0#buildroot/#
+BR2_ZCAT="zcat"
+#prefix0#buildroot/#
+BR2_BZCAT="bzcat"
+#prefix0#buildroot/#
+BR2_TAR_OPTIONS=""
+#prefix0#buildroot/#
+BR2_DL_DIR="$(BASE_DIR)/dl"
+#prefix0#buildroot/#
+BR2_SOURCEFORGE_MIRROR="easynews"
+#prefix0#buildroot/#
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+#prefix0#buildroot/#
+BR2_TOPDIR_PREFIX=""
+#prefix0#buildroot/#
+BR2_TOPDIR_SUFFIX=""
+#prefix0#buildroot/#
+BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
+#prefix0#buildroot/#
+BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+#prefix0#buildroot/#
+BR2_JLEVEL=1
+#prefix0#buildroot/#
+# BR2_PREFER_IMA is not set
+#prefix0#buildroot/#
+# BR2_DEPRECATED is not set
+#prefix0#buildroot/#
+# BR2_TOOLCHAIN_BUILDROOT is not set
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_HOST is not set
+#prefix0#buildroot/#
+BR2_LARGEFILE=y
+#prefix0#buildroot/#
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
+
+#
+# Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIB_C="libc.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIBS="libc.so.0 ld-uClibc.so libcrypt.so libresolv.so librt.so libpthread.so libdl.so libm.so libutil.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_STRIP=y
+#prefix0#buildroot/#
+BR2_KERNEL_HEADERS_LOCAL=y
+#prefix0#buildroot/#
+BR2_DEFAULT_KERNEL_HEADERS="local"
+#
+
+#
+# Gdb Options
+#
+
+#
+# Common Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PATH="/usr/local/ARC/gcc/"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PREFIX="arc-linux-uclibc"
+
+#
+# Package Selection for the target
+#
+
+#
+# The default minimal system
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX=y
+#prefix0#buildroot/#
+BR2_BUSYBOX_VERSION_1_10_3=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.2.2.1.config"
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_HIDE_OTHERS=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_BUSYBOX_SKELETON is not set
+
+#
+# The minimum needed to build a uClibc development system
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_BASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BZIP2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DIFFUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FLEX is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GCC_TARGET is not set
+#prefix0#buildroot/#
+BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS=""
+#prefix0#buildroot/#
+# BR2_PACKAGE_MAKE is not set
+
+#
+# Other development stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOCONF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOMAKE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BISON is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CCACHE_TARGET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CVS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DISTCC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMALLOC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_EXPAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FAKEROOT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GETTEXT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBINTL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBGMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBMPFR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_M4 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MPATROL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PKGCONFIG is not set
+#prefix0#buildroot/#
+# BR2_READLINE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VDEV is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_Q_PARSE_LOG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RFCALTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SSCLDBG is not set
+
+#
+# Other stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BERKELEYDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BSDIFF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CUSTOMIZE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FILE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_KEXEC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TESTIPC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBELF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBEVENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBFLOAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBSYSFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LSOF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTP-TESTSUITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MICROCOM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTAGE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SQLITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STRACE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SUDO is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_MACFW=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_DSPFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_UBOOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_AUCFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_LINUX_IMG is not set
+#prefix0#buildroot/#
+BR2_NETWORK_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_ARGUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AVAHI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BOA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BIND is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_BRIDGE=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IGMPPROXY is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NEMESIS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_RELAY is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_DHCP_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DNSMASQ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DROPBEAR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_ETHTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HASERL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HOSTAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPERF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_IPROUTE2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPSEC_TOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPTABLES is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_L2TP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGI is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_LIBCURL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_JSON_C=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QHARVEST=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGICC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBPCAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIGHTTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINKS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LRZSZ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MIIDL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MROUTED is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NBD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITBASE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITTELNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETPLUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETSNMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NFS_UTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NTP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_NTPCLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENNTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSH is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_OPENSSL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSL_TARGET_HEADERS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENVPN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSWAN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTMAP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_PHP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_PPPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PROFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RSYNC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBIF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBCGIIF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QWEBPHPIF=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SAMBA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SOCAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STUNNEL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TCPDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TN5250 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TTCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VTUN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WIRELESS_TOOLS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_Q_UTILS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_SIGMA=y
+#prefix0#buildroot/#
+BR2_PACKAGE_SIGMA_CA_PORT=9000
+#prefix0#buildroot/#
+BR2_PACKAGE_SIGMA_DUT_PORT=6070
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_MONITOR_RFENABLE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WLANCONFIG is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WPASUPPLICANT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_ZHOSTAPD=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QEVENTD=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SYSSTAT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MINIHTTPD=y
+#prefix0#buildroot/#
+BR2_BLOCKDEV_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DBUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMRAID is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_E2FSPROGS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HWDATA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IOSTAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBRAW1394 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBUSB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LVM2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MDADM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MEMTESTER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MKDOSFS is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD=y
+
+#
+# MTD package selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SNAPSHOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG_STRING="mtd_20050122.orig.tar.gz"
+
+#
+# MTD tools selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASE=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASEALL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_INFO=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_LOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_UNLOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASHCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_ERASE is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_JFFS2DUMP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_JFFS3DUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SUMTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_CHECK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTLDUMP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_MKFSJFFS2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MKFSJFFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDWRITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MTD_DEBUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOCFDISK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOC_LOADBIOS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PCIUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RAIDTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SETSERIAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SMARTMONTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBMOUNT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WIPE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_XFSPROGS is not set
+#prefix0#buildroot/#
+# BR2_AUDIO_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_GRAPHIC_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_COMPRESSOR_SUPPORT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_ZLIB=y
+#prefix0#buildroot/#
+# BR2_SCRIPTING_SUPPORT is not set
+
+#prefix0#buildroot/#
+# BR2_MSWBSP_SUPPORT is not set
+
+#
+# Target Options
+#
+
+#
+# filesystem for target device
+#
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CRAMFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CLOOP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_EXT2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_JFFS2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_SQUASHFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_TAR is not set
+#prefix0#buildroot/#
+BR2_TARGET_ROOTFS_CPIO=y
+
+#
+# bootloader for target device
+#
+
+#
+# Board Support Options
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINUX is not set
+#prefix0#buildroot/#
+BR2_INET_IPV6=y
+
+#
+# Atmel Target
+#
+
+#
+# Add Atmel Target here
+#
+#prefix0#buildroot/#
+# BR2_TARGET_UMS88K is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY=y
+
+#
+# Ruby filesystem configuration
+#
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_IPC_SUBNET="192.168.101"
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_NONE is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC1_ETH_IP_DHCP=y
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC2_ETH_IP_NONE=y
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_DHCP is not set
+
+#
+# Generic System Support
+#
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_ACCESS_POINT is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_FIREWALL is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_DEV_SYSTEM is not set
+
+#
+# Busybox configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NITPICK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DESKTOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SHOW_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_COMPRESS_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALLER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOCALE_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT_LONG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DEVPTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PIDFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SUID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUID_CONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SELINUX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STATIC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOMMU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUILD_LIBBUSYBOX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LFS is not set
+
+#
+# Debugging Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WERROR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NO_DEBUG_LIB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DMALLOC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EFENCE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INCLUDE_SUSv2=y
+
+#
+# Installation Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_NO_USR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_DONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PASSWORD_MINLEN=6
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5_SIZE_VS_SPEED=3
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FAST_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_VI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_HISTORY=15
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAB_COMPLETION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_COPYBUF_KB=4
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MONOTONIC_SYSCALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IOCTL_HEX2STR_ERROR=y
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_AR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUNZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG_DEB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GUNZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM2CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_CREATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_AUTODETECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_FROM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GNU_EXTENSIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNLZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNZIP is not set
+
+#
+# Common options for cpio and tar
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+
+#
+# Coreutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BASENAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CAL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CATV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHGRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHOWN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CKSUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_COMM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DATE_ISOFMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DF_INODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DIRNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DOS2UNIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIX2DOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ENV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FALSE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FOLD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEAD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_HEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HOSTID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LENGTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FILETYPES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_RECURSIVE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_SORTFILES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_USERNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LS_COLOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFIFO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKNOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PWD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_READLINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_READLINK_FOLLOW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_REALPATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SEQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SHA1SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_SLEEP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SORT_BIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SPLIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_STTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYNC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_TAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TEE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEST_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TOUCH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TRUE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNEXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_USLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UUDECODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UUENCODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WC_LARGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WHO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_WHOAMI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HUMAN_READABLE is not set
+
+#
+# Common options for md5sum, sha1sum
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CLEAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEALLOCVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DUMPKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KBD_MODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADFONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OPENVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RESET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETCONSOLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETKEYCODES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETLOGCONS is not set
+
+#
+# Debian Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKTEMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PIPE_PROGRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RUN_PARTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_START_STOP_DAEMON is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_AWK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AWK_MATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DIFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PATCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_MAX_LEN=4096
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_8BIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_COLON is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_YANKMARK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SEARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_USE_SIGNALS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_DOT_CMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_READONLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_WIN_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FIND=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRINT0 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MTIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MMIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PERM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_TYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_XDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MAXDEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NEWER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_INUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_EXEC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_USER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_FEATURE_FIND_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PAREN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_SIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRUNE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DELETE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_REGEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GREP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_CONTEXT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_XARGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG_INIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_INITTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_REMOVED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_DELAY=0
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INIT_SCTTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EXTRA_QUIET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INITRD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HALT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SHADOWPASSWDS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_USE_BB_PWD_GRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_CHECK_NAMES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PAM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGIN_SCRIPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_NOLOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SECURETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRYPTPW is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SU_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SULOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VLOCK=y
+
+#
+# Linux Ext2 FS Progs
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHATTR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LSATTR is not set
+
+#
+# Linux Module Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MODPROBE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
+
+#
+# Options common to multiple modutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_2_4_MODULES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_2_6_MODULES=y
+
+#
+# Linux System Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DMESG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DMESG_PRETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FBSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFLUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFORMAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_WRITABLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AIX_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SGI_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUN_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_OSF_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FINDFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FREERAMDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFS_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEXDUMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HWCLOCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCRM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOSETUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKSWAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MORE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USE_TERMIOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VOLUMEID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_NFS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FLAGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FSTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIVOT_ROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RDATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READPROFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RTCWAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWAPONOFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWITCH_ROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UMOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_LOOP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADJTIMEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BBCONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHRT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CROND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRONTAB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEVFSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEVFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EJECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LAST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MAXLINES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_BRACKETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MARKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_REGEXP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HDPARM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MAKEDEVS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MICROCOM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MOUNTPOINT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RAIDAUTORUN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READAHEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNLEVEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STRINGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETSID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TASKSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TTYSIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IPV6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ARP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BRCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DNSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ETHER_WAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FAKEIDENTD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPGET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HTTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CGI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_HW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IFENSLAVE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INETD_RPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_LINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_TUNNEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RULE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCALC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NAMEIF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NETSTAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NSLOOKUP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PSCAN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SENDMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FETCHMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SLATTACH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TELNET_TTYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNETD_STANDALONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TFTP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TFTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TRACEROUTE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_DHCPRELAY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_DUMPLEASES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DHCPD_LEASES_FILE=""
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPC_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_PORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_8021Q is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WGET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_STATUSBAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_AUTHENTICATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ZCIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TCPSVD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDPSVD is not set
+
+#
+# Process Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FREE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILLALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KILLALL5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NMETER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PGREP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIDOF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PKILL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PS_WIDE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RENICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BB_SYSCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UPTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCH is not set
+
+#
+# Shells
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SH_IS_ASH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_MSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_NONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_JOB_CONTROL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_NCHARS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_TIMEOUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_GETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_CMDCMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_MAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_EXPAND_PRMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LASH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CTTYHACK is not set
+
+#
+# System Logging Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYSLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_REMOTE_LOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IPC_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGGER=y
+
+#
+# Runit Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SVLOGD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SOFTLIMIT is not set
+
+#
+# Print Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPQ is not set
+
diff --git a/quantenna/configs/topaz_dbdc_config b/quantenna/configs/topaz_dbdc_config
new file mode 100644
index 0000000..f365e0e
--- /dev/null
+++ b/quantenna/configs/topaz_dbdc_config
@@ -0,0 +1,1883 @@
+#
+# Platform
+#
+CONFIG_PLATFORM_ID=460
+CONFIG_PLATFORM_TYPE=topaz
+CONFIG_PLATFORM_DESCR="BBIC4 QV860"
+
+#
+# Filesystem & toolchain
+#
+#prefix0#buildroot/#
+BR2_HAVE_DOT_CONFIG=y
+#prefix0#buildroot/#
+# BR2_alpha is not set
+#prefix0#buildroot/#
+# BR2_arm is not set
+#prefix0#buildroot/#
+# BR2_armeb is not set
+#prefix0#buildroot/#
+# BR2_avr32 is not set
+#prefix0#buildroot/#
+# BR2_cris is not set
+#prefix0#buildroot/#
+# BR2_i386 is not set
+#prefix0#buildroot/#
+# BR2_m68k is not set
+#prefix0#buildroot/#
+# BR2_mips is not set
+#prefix0#buildroot/#
+# BR2_mipsel is not set
+#prefix0#buildroot/#
+# BR2_nios2 is not set
+#prefix0#buildroot/#
+# BR2_powerpc is not set
+#prefix0#buildroot/#
+# BR2_sh is not set
+#prefix0#buildroot/#
+# BR2_sh64 is not set
+#prefix0#buildroot/#
+# BR2_sparc is not set
+#prefix0#buildroot/#
+# BR2_x86_64 is not set
+#prefix0#buildroot/#
+BR2_arc=y
+#prefix0#buildroot/#
+BR2_ARCH="arc"
+
+#
+# Build options
+#
+#prefix0#buildroot/#
+BR2_WGET="wget --passive-ftp"
+#prefix0#buildroot/#
+BR2_SVN="svn co"
+#prefix0#buildroot/#
+BR2_ZCAT="zcat"
+#prefix0#buildroot/#
+BR2_BZCAT="bzcat"
+#prefix0#buildroot/#
+BR2_TAR_OPTIONS=""
+#prefix0#buildroot/#
+BR2_DL_DIR="$(BASE_DIR)/dl"
+#prefix0#buildroot/#
+BR2_SOURCEFORGE_MIRROR="easynews"
+#prefix0#buildroot/#
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+#prefix0#buildroot/#
+BR2_TOPDIR_PREFIX=""
+#prefix0#buildroot/#
+BR2_TOPDIR_SUFFIX=""
+#prefix0#buildroot/#
+BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
+#prefix0#buildroot/#
+BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+#prefix0#buildroot/#
+BR2_JLEVEL=1
+#prefix0#buildroot/#
+# BR2_PREFER_IMA is not set
+#prefix0#buildroot/#
+# BR2_DEPRECATED is not set
+#prefix0#buildroot/#
+# BR2_TOOLCHAIN_BUILDROOT is not set
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_HOST is not set
+#prefix0#buildroot/#
+BR2_LARGEFILE=y
+#prefix0#buildroot/#
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
+
+#
+# Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIB_C="libc.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIBS="libc.so.0 ld-uClibc.so libcrypt.so libresolv.so librt.so libpthread.so libdl.so libm.so libutil.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_STRIP=y
+#prefix0#buildroot/#
+BR2_KERNEL_HEADERS_LOCAL=y
+#prefix0#buildroot/#
+BR2_DEFAULT_KERNEL_HEADERS="local"
+#
+
+#
+# Gdb Options
+#
+
+#
+# Common Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PATH="/usr/local/ARC/gcc/"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PREFIX="arc-linux-uclibc"
+
+#
+# Package Selection for the target
+#
+
+#
+# The default minimal system
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX=y
+#prefix0#buildroot/#
+BR2_BUSYBOX_VERSION_1_10_3=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.2.2.1.config"
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_HIDE_OTHERS=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_BUSYBOX_SKELETON is not set
+
+#
+# The minimum needed to build a uClibc development system
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_BASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BZIP2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DIFFUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FLEX is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GCC_TARGET is not set
+#prefix0#buildroot/#
+BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS=""
+#prefix0#buildroot/#
+# BR2_PACKAGE_MAKE is not set
+
+#
+# Other development stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOCONF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOMAKE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BISON is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CCACHE_TARGET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CVS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DISTCC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMALLOC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_EXPAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FAKEROOT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GETTEXT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBINTL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBGMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBMPFR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_M4 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MPATROL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PKGCONFIG is not set
+#prefix0#buildroot/#
+# BR2_READLINE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VDEV is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_Q_PARSE_LOG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RFCALTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SSCLDBG is not set
+
+#
+# Other stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BERKELEYDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BSDIFF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CUSTOMIZE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FILE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_KEXEC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TESTIPC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBELF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBEVENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBFLOAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBSYSFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LSOF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTP-TESTSUITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MICROCOM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTAGE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SQLITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STRACE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SUDO is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_MACFW=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_DSPFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_UBOOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_AUCFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_LINUX_IMG is not set
+#prefix0#buildroot/#
+BR2_NETWORK_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_ARGUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AVAHI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BOA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BIND is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_BRIDGE=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IGMPPROXY is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NEMESIS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_RELAY is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_DHCP_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DNSMASQ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DROPBEAR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_ETHTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HASERL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HOSTAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPERF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_IPROUTE2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPSEC_TOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPTABLES is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_L2TP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGI is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_LIBCURL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_JSON_C=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QHARVEST=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGICC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBPCAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIGHTTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINKS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LRZSZ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MIIDL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MROUTED is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NBD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITBASE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITTELNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETPLUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETSNMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NFS_UTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NTP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_NTPCLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENNTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSH is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_OPENSSL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSL_TARGET_HEADERS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENVPN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSWAN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTMAP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_PHP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_PPPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PROFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RSYNC is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QWE_PAL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QWE_ADAPTER=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBIF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBCGIIF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBPHPIF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QWEBPHPIF24=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SAMBA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SOCAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STUNNEL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TCPDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TN5250 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TTCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VTUN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WIRELESS_TOOLS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_Q_UTILS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_MONITOR_RFENABLE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WLANCONFIG is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WPASUPPLICANT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_ZHOSTAPD=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QEVENTD=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SYSSTAT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MINIHTTPD=y
+#prefix0#buildroot/#
+BR2_BLOCKDEV_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DBUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMRAID is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_E2FSPROGS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HWDATA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IOSTAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBRAW1394 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBUSB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LVM2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MDADM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MEMTESTER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MKDOSFS is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD=y
+
+#
+# MTD package selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SNAPSHOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG_STRING="mtd_20050122.orig.tar.gz"
+
+#
+# MTD tools selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASE=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASEALL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_INFO=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_LOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_UNLOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASHCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_ERASE is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_JFFS2DUMP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_JFFS3DUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SUMTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_CHECK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTLDUMP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_MKFSJFFS2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MKFSJFFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDWRITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MTD_DEBUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOCFDISK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOC_LOADBIOS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PCIUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RAIDTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SETSERIAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SMARTMONTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBMOUNT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WIPE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_XFSPROGS is not set
+#prefix0#buildroot/#
+# BR2_AUDIO_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_GRAPHIC_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_COMPRESSOR_SUPPORT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_ZLIB=y
+#prefix0#buildroot/#
+# BR2_SCRIPTING_SUPPORT is not set
+
+#prefix0#buildroot/#
+# BR2_MSWBSP_SUPPORT is not set
+
+#
+# Target Options
+#
+
+#
+# filesystem for target device
+#
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CRAMFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CLOOP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_EXT2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_JFFS2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_SQUASHFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_TAR is not set
+#prefix0#buildroot/#
+BR2_TARGET_ROOTFS_CPIO=y
+
+#
+# bootloader for target device
+#
+
+#
+# Board Support Options
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINUX is not set
+#prefix0#buildroot/#
+BR2_INET_IPV6=y
+
+#
+# Atmel Target
+#
+
+#
+# Add Atmel Target here
+#
+#prefix0#buildroot/#
+# BR2_TARGET_UMS88K is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY=y
+
+#
+# Ruby filesystem configuration
+#
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_IPC_SUBNET="192.168.101"
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_NONE is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC1_ETH_IP_DHCP=y
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC2_ETH_IP_NONE=y
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_DHCP is not set
+
+#
+# Generic System Support
+#
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_ACCESS_POINT is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_FIREWALL is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_DEV_SYSTEM is not set
+
+#
+# Busybox configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NITPICK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DESKTOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SHOW_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_COMPRESS_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALLER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOCALE_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT_LONG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DEVPTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PIDFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SUID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUID_CONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SELINUX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STATIC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOMMU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUILD_LIBBUSYBOX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LFS is not set
+
+#
+# Debugging Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WERROR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NO_DEBUG_LIB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DMALLOC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EFENCE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INCLUDE_SUSv2=y
+
+#
+# Installation Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_NO_USR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_DONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PASSWORD_MINLEN=6
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5_SIZE_VS_SPEED=3
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FAST_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_VI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_HISTORY=15
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAB_COMPLETION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_COPYBUF_KB=4
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MONOTONIC_SYSCALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IOCTL_HEX2STR_ERROR=y
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_AR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUNZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG_DEB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GUNZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM2CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_CREATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_AUTODETECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_FROM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GNU_EXTENSIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNLZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNZIP is not set
+
+#
+# Common options for cpio and tar
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+
+#
+# Coreutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BASENAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CAL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CATV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHGRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHOWN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CKSUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_COMM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DATE_ISOFMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DF_INODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DIRNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DOS2UNIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIX2DOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ENV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FALSE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FOLD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEAD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_HEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HOSTID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LENGTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FILETYPES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_RECURSIVE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_SORTFILES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_USERNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LS_COLOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFIFO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKNOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PWD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_READLINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_READLINK_FOLLOW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_REALPATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SEQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SHA1SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_SLEEP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SORT_BIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SPLIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_STTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYNC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_TAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TEE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEST_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TOUCH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TRUE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNEXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_USLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UUDECODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UUENCODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WC_LARGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WHO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_WHOAMI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HUMAN_READABLE is not set
+
+#
+# Common options for md5sum, sha1sum
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CLEAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEALLOCVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DUMPKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KBD_MODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADFONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OPENVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RESET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETCONSOLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETKEYCODES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETLOGCONS is not set
+
+#
+# Debian Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKTEMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PIPE_PROGRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RUN_PARTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_START_STOP_DAEMON=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_AWK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AWK_MATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DIFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PATCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_MAX_LEN=4096
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_8BIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_COLON is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_YANKMARK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SEARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_USE_SIGNALS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_DOT_CMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_READONLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_WIN_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FIND=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRINT0 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MTIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MMIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PERM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_TYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_XDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MAXDEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NEWER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_INUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_EXEC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_USER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_FEATURE_FIND_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PAREN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_SIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRUNE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DELETE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_REGEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GREP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_CONTEXT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_XARGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG_INIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_INITTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_REMOVED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_DELAY=0
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INIT_SCTTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EXTRA_QUIET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INITRD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HALT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SHADOWPASSWDS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_USE_BB_PWD_GRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_CHECK_NAMES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PAM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGIN_SCRIPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_NOLOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SECURETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRYPTPW is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SU_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SULOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VLOCK=y
+
+#
+# Linux Ext2 FS Progs
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHATTR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LSATTR is not set
+
+#
+# Linux Module Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MODPROBE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
+
+#
+# Options common to multiple modutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_2_4_MODULES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_2_6_MODULES=y
+
+#
+# Linux System Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DMESG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DMESG_PRETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FBSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFLUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFORMAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_WRITABLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AIX_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SGI_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUN_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_OSF_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FINDFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FREERAMDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFS_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEXDUMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HWCLOCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCRM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOSETUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKSWAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MORE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USE_TERMIOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VOLUMEID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_NFS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FLAGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FSTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIVOT_ROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RDATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READPROFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RTCWAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWAPONOFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWITCH_ROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UMOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_LOOP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADJTIMEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BBCONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHRT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CROND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRONTAB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEVFSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEVFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EJECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LAST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MAXLINES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_BRACKETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MARKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_REGEXP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HDPARM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MAKEDEVS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MICROCOM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MOUNTPOINT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RAIDAUTORUN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READAHEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNLEVEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STRINGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETSID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TASKSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TTYSIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IPV6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BRCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DNSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ETHER_WAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FAKEIDENTD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPGET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HTTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CGI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_HW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IFENSLAVE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INETD_RPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_LINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_TUNNEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RULE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCALC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NAMEIF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NETSTAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NSLOOKUP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PSCAN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SENDMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FETCHMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SLATTACH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TELNET_TTYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNETD_STANDALONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TFTP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TFTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TRACEROUTE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_DHCPRELAY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_DUMPLEASES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DHCPD_LEASES_FILE=""
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPC_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_PORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_8021Q is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WGET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_STATUSBAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_AUTHENTICATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ZCIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TCPSVD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDPSVD is not set
+
+#
+# Process Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FREE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILLALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KILLALL5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NMETER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PGREP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIDOF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PKILL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PS_WIDE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RENICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BB_SYSCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UPTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCH is not set
+
+#
+# Shells
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SH_IS_ASH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_MSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_NONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_JOB_CONTROL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_NCHARS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_TIMEOUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_GETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_CMDCMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_MAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_EXPAND_PRMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LASH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CTTYHACK is not set
+
+#
+# System Logging Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYSLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_REMOTE_LOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IPC_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGGER=y
+
+#
+# Runit Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SVLOGD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SOFTLIMIT is not set
+
+#
+# Print Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPQ is not set
+
diff --git a/quantenna/configs/topaz_host_config b/quantenna/configs/topaz_host_config
new file mode 100644
index 0000000..5ec3112
--- /dev/null
+++ b/quantenna/configs/topaz_host_config
@@ -0,0 +1,1859 @@
+#
+# Platform
+#
+CONFIG_PLATFORM_ID=454
+CONFIG_PLATFORM_TYPE=topaz
+CONFIG_PLATFORM_DESCR="BBIC4 PCIe Host"
+
+#
+# Filesystem & toolchain
+#
+#prefix0#buildroot/#
+BR2_HAVE_DOT_CONFIG=y
+#prefix0#buildroot/#
+# BR2_alpha is not set
+#prefix0#buildroot/#
+# BR2_arm is not set
+#prefix0#buildroot/#
+# BR2_armeb is not set
+#prefix0#buildroot/#
+# BR2_avr32 is not set
+#prefix0#buildroot/#
+# BR2_cris is not set
+#prefix0#buildroot/#
+# BR2_i386 is not set
+#prefix0#buildroot/#
+# BR2_m68k is not set
+#prefix0#buildroot/#
+# BR2_mips is not set
+#prefix0#buildroot/#
+# BR2_mipsel is not set
+#prefix0#buildroot/#
+# BR2_nios2 is not set
+#prefix0#buildroot/#
+# BR2_powerpc is not set
+#prefix0#buildroot/#
+# BR2_sh is not set
+#prefix0#buildroot/#
+# BR2_sh64 is not set
+#prefix0#buildroot/#
+# BR2_sparc is not set
+#prefix0#buildroot/#
+# BR2_x86_64 is not set
+#prefix0#buildroot/#
+BR2_arc=y
+#prefix0#buildroot/#
+BR2_ARCH="arc"
+
+#
+# Build options
+#
+#prefix0#buildroot/#
+BR2_WGET="wget --passive-ftp"
+#prefix0#buildroot/#
+BR2_SVN="svn co"
+#prefix0#buildroot/#
+BR2_ZCAT="zcat"
+#prefix0#buildroot/#
+BR2_BZCAT="bzcat"
+#prefix0#buildroot/#
+BR2_TAR_OPTIONS=""
+#prefix0#buildroot/#
+BR2_DL_DIR="$(BASE_DIR)/dl"
+#prefix0#buildroot/#
+BR2_SOURCEFORGE_MIRROR="easynews"
+#prefix0#buildroot/#
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+#prefix0#buildroot/#
+BR2_TOPDIR_PREFIX=""
+#prefix0#buildroot/#
+BR2_TOPDIR_SUFFIX=""
+#prefix0#buildroot/#
+BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
+#prefix0#buildroot/#
+BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+#prefix0#buildroot/#
+BR2_JLEVEL=1
+#prefix0#buildroot/#
+# BR2_PREFER_IMA is not set
+#prefix0#buildroot/#
+# BR2_DEPRECATED is not set
+#prefix0#buildroot/#
+# BR2_TOOLCHAIN_BUILDROOT is not set
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_HOST is not set
+#prefix0#buildroot/#
+BR2_LARGEFILE=y
+#prefix0#buildroot/#
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
+
+#
+# Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIB_C="libc.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIBS="libc.so.0 ld-uClibc.so libcrypt.so libresolv.so librt.so libpthread.so libdl.so libm.so libutil.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_STRIP=y
+#prefix0#buildroot/#
+BR2_KERNEL_HEADERS_LOCAL=y
+#prefix0#buildroot/#
+BR2_DEFAULT_KERNEL_HEADERS="local"
+#
+
+#
+# Gdb Options
+#
+
+#
+# Common Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PATH="/usr/local/ARC/gcc/"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PREFIX="arc-linux-uclibc"
+
+#
+# Package Selection for the target
+#
+
+#
+# The default minimal system
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX=y
+#prefix0#buildroot/#
+BR2_BUSYBOX_VERSION_1_10_3=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.2.2.1.config"
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_HIDE_OTHERS=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_BUSYBOX_SKELETON is not set
+
+#
+# The minimum needed to build a uClibc development system
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_BASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BZIP2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DIFFUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FLEX is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GCC_TARGET is not set
+#prefix0#buildroot/#
+BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS=""
+#prefix0#buildroot/#
+# BR2_PACKAGE_MAKE is not set
+
+#
+# Other development stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOCONF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOMAKE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BISON is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CCACHE_TARGET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CVS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DISTCC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMALLOC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_EXPAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FAKEROOT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GETTEXT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBINTL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBGMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBMPFR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_M4 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MPATROL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PKGCONFIG is not set
+#prefix0#buildroot/#
+# BR2_READLINE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VDEV is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_Q_PARSE_LOG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RFCALTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SSCLDBG is not set
+
+#
+# Other stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BERKELEYDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BSDIFF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CUSTOMIZE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FILE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_KEXEC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TESTIPC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBELF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBEVENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBFLOAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBSYSFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LSOF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTP-TESTSUITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MICROCOM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTAGE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SQLITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STRACE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SUDO is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_MACFW is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_DSPFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_AUCFW is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_UBOOT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_LINUX_IMG=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_LINUX_IMG_CONFIG="topaz_pcie_config"
+#prefix0#buildroot/#
+BR2_NETWORK_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_ARGUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AVAHI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BOA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BIND is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_BRIDGE=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IGMPPROXY is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NEMESIS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_RELAY is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_DHCP_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DNSMASQ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DROPBEAR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_ETHTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HASERL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HOSTAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPERF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_IPROUTE2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPSEC_TOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPTABLES is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_L2TP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGICC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBPCAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIGHTTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINKS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LRZSZ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MIIDL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MROUTED is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NBD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITBASE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITTELNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETPLUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETSNMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NFS_UTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NTP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENNTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSL_TARGET_HEADERS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENVPN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSWAN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTMAP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_PHP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_PPPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PROFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RSYNC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBIF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBCGIIF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QWEBPHPIF=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SAMBA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SOCAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STUNNEL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TCPDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TN5250 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TTCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VTUN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WIRELESS_TOOLS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_Q_UTILS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI=y
+#prefix0#buildroot/#
+BR2_PACKAGE_CALL_QCSAPI_RPC_SOCKET_CLIENT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_CALL_QCSAPI_RPC_PCIE_CLIENT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_CALL_QCSAPI_RPC_RAW_SOCKET_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI_RPC_SOCKET_CLIENT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI_RPC_PCIE_CLIENT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI_RPC_RAW_SOCKET_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_MONITOR_RFENABLE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WLANCONFIG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WPASUPPLICANT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_ZHOSTAPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SYSSTAT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MINIHTTPD=y
+BR2_BLOCKDEV_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DBUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMRAID is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_E2FSPROGS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HWDATA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IOSTAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBRAW1394 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBUSB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LVM2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MDADM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MEMTESTER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MKDOSFS is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD=y
+
+#
+# MTD package selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SNAPSHOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG_STRING="mtd_20050122.orig.tar.gz"
+
+#
+# MTD tools selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASE=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASEALL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_INFO=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_LOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_UNLOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASHCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_ERASE is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_JFFS2DUMP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_JFFS3DUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SUMTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_CHECK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTLDUMP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_MKFSJFFS2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MKFSJFFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDWRITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MTD_DEBUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOCFDISK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOC_LOADBIOS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PCIUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RAIDTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SETSERIAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SMARTMONTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBMOUNT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WIPE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_XFSPROGS is not set
+#prefix0#buildroot/#
+# BR2_AUDIO_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_GRAPHIC_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_COMPRESSOR_SUPPORT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_ZLIB=y
+#prefix0#buildroot/#
+# BR2_SCRIPTING_SUPPORT is not set
+
+#prefix0#buildroot/#
+# BR2_MSWBSP_SUPPORT is not set
+
+#
+# Target Options
+#
+
+#
+# filesystem for target device
+#
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CRAMFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CLOOP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_EXT2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_JFFS2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_SQUASHFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_TAR is not set
+#prefix0#buildroot/#
+BR2_TARGET_ROOTFS_CPIO=y
+
+#
+# bootloader for target device
+#
+
+#
+# Board Support Options
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINUX is not set
+#prefix0#buildroot/#
+BR2_INET_IPV6=y
+
+#
+# Atmel Target
+#
+
+#
+# Add Atmel Target here
+#
+#prefix0#buildroot/#
+# BR2_TARGET_UMS88K is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY=y
+
+#
+# Ruby filesystem configuration
+#
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_IPC_SUBNET="192.168.101"
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_NONE is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC1_ETH_IP_DHCP=y
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC2_ETH_IP_NONE=y
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_DHCP is not set
+
+#
+# Generic System Support
+#
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_ACCESS_POINT is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_FIREWALL is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_DEV_SYSTEM is not set
+
+#
+# Busybox configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NITPICK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DESKTOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SHOW_USAGE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_COMPRESS_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALLER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOCALE_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT_LONG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DEVPTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PIDFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SUID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUID_CONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SELINUX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STATIC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOMMU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUILD_LIBBUSYBOX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LFS=y
+
+#
+# Debugging Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WERROR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NO_DEBUG_LIB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DMALLOC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EFENCE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INCLUDE_SUSv2=y
+
+#
+# Installation Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_NO_USR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_DONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PASSWORD_MINLEN=6
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5_SIZE_VS_SPEED=2
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FAST_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_VI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_HISTORY=15
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAB_COMPLETION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_COPYBUF_KB=4
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MONOTONIC_SYSCALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IOCTL_HEX2STR_ERROR=y
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_AR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUNZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG_DEB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GUNZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM2CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_CREATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_AUTODETECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_FROM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNLZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNZIP is not set
+
+#
+# Common options for cpio and tar
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+
+#
+# Coreutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BASENAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CAL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CATV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHGRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHOWN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CKSUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_COMM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DATE_ISOFMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DF_INODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DIRNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DOS2UNIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIX2DOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ENV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FALSE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FOLD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEAD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_HEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LENGTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FILETYPES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_RECURSIVE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_SORTFILES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_USERNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_COLOR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFIFO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKNOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PWD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_READLINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_READLINK_FOLLOW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_REALPATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SEQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SHA1SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_SLEEP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SORT_BIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SPLIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_STTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYNC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEST_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TOUCH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TRUE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNEXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNIQ=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_USLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UUDECODE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UUENCODE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WC_LARGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WHO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_WHOAMI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HUMAN_READABLE is not set
+
+#
+# Common options for md5sum, sha1sum
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CLEAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DEALLOCVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DUMPKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KBD_MODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADFONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_OPENVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RESET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETCONSOLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETKEYCODES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETLOGCONS is not set
+
+#
+# Debian Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKTEMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PIPE_PROGRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RUN_PARTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_START_STOP_DAEMON=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_AWK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AWK_MATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DIFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PATCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_MAX_LEN=4096
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_8BIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_COLON is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_YANKMARK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SEARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_USE_SIGNALS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_DOT_CMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_READONLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_WIN_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FIND=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRINT0 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MTIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MMIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PERM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_TYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_XDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MAXDEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NEWER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_INUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_EXEC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_USER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_FEATURE_FIND_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PAREN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_SIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRUNE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DELETE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_REGEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GREP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_CONTEXT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_XARGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG_INIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_INITTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_REMOVED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_DELAY=0
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INIT_SCTTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EXTRA_QUIET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INITRD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HALT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SHADOWPASSWDS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_USE_BB_PWD_GRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_CHECK_NAMES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PAM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGIN_SCRIPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_NOLOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SECURETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRYPTPW is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SU=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SU_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SU_CHECKS_SHELLS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SULOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VLOCK=y
+
+#
+# Linux Ext2 FS Progs
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHATTR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LSATTR is not set
+
+#
+# Linux Module Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MODPROBE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
+
+#
+# Options common to multiple modutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_2_4_MODULES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_2_6_MODULES=y
+
+#
+# Linux System Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DMESG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DMESG_PRETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FBSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFLUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFORMAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_WRITABLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AIX_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SGI_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUN_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_OSF_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FINDFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FREERAMDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFS_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEXDUMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HWCLOCK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCRM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOSETUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKSWAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MORE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_TERMIOS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VOLUMEID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_NFS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FLAGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FSTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIVOT_ROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RDATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READPROFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RTCWAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWAPONOFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWITCH_ROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UMOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_LOOP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADJTIMEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BBCONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHRT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CROND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRONTAB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEVFSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEVFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EJECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LAST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MAXLINES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_BRACKETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MARKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LESS_REGEXP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HDPARM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MAKEDEVS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MICROCOM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MOUNTPOINT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RAIDAUTORUN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READAHEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNLEVEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STRINGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETSID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TASKSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TTYSIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IPV6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BRCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DNSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ETHER_WAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FAKEIDENTD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPGET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HTTPD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_CGI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_HW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IFENSLAVE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INETD_RPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_LINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_TUNNEL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_RULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCALC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NAMEIF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NETSTAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NSLOOKUP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PING6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PSCAN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SENDMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FETCHMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SLATTACH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TELNET_TTYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNETD_STANDALONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TFTP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TFTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TRACEROUTE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPC_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_PORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_8021Q is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DHCPC_DEFAULT_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WGET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_STATUSBAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ZCIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TCPSVD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDPSVD is not set
+
+#
+# Process Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FREE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILLALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KILLALL5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NMETER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PGREP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIDOF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PKILL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PS_WIDE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RENICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BB_SYSCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UPTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCH is not set
+
+#
+# Shells
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SH_IS_ASH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_MSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_NONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_JOB_CONTROL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_NCHARS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_TIMEOUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_GETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_CMDCMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_MAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_EXPAND_PRMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LASH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CTTYHACK is not set
+
+#
+# System Logging Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYSLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_REMOTE_LOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IPC_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGGER=y
+
+#
+# Runit Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SVLOGD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SOFTLIMIT is not set
+
+#
+# Print Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPQ is not set
diff --git a/quantenna/configs/topaz_msft_config b/quantenna/configs/topaz_msft_config
new file mode 100755
index 0000000..a9dda31
--- /dev/null
+++ b/quantenna/configs/topaz_msft_config
@@ -0,0 +1,1877 @@
+#
+# Platform
+#
+CONFIG_PLATFORM_ID=425
+CONFIG_PLATFORM_TYPE=topaz
+CONFIG_PLATFORM_DESCR="BBIC4 Video Bridge with mswbsp"
+
+#
+# Filesystem & toolchain
+#
+#prefix0#buildroot/#
+BR2_HAVE_DOT_CONFIG=y
+#prefix0#buildroot/#
+# BR2_alpha is not set
+#prefix0#buildroot/#
+# BR2_arm is not set
+#prefix0#buildroot/#
+# BR2_armeb is not set
+#prefix0#buildroot/#
+# BR2_avr32 is not set
+#prefix0#buildroot/#
+# BR2_cris is not set
+#prefix0#buildroot/#
+# BR2_i386 is not set
+#prefix0#buildroot/#
+# BR2_m68k is not set
+#prefix0#buildroot/#
+# BR2_mips is not set
+#prefix0#buildroot/#
+# BR2_mipsel is not set
+#prefix0#buildroot/#
+# BR2_nios2 is not set
+#prefix0#buildroot/#
+# BR2_powerpc is not set
+#prefix0#buildroot/#
+# BR2_sh is not set
+#prefix0#buildroot/#
+# BR2_sh64 is not set
+#prefix0#buildroot/#
+# BR2_sparc is not set
+#prefix0#buildroot/#
+# BR2_x86_64 is not set
+#prefix0#buildroot/#
+BR2_arc=y
+#prefix0#buildroot/#
+BR2_ARCH="arc"
+
+#
+# Build options
+#
+#prefix0#buildroot/#
+BR2_WGET="wget --passive-ftp"
+#prefix0#buildroot/#
+BR2_SVN="svn co"
+#prefix0#buildroot/#
+BR2_ZCAT="zcat"
+#prefix0#buildroot/#
+BR2_BZCAT="bzcat"
+#prefix0#buildroot/#
+BR2_TAR_OPTIONS=""
+#prefix0#buildroot/#
+BR2_DL_DIR="$(BASE_DIR)/dl"
+#prefix0#buildroot/#
+BR2_SOURCEFORGE_MIRROR="easynews"
+#prefix0#buildroot/#
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+#prefix0#buildroot/#
+BR2_TOPDIR_PREFIX=""
+#prefix0#buildroot/#
+BR2_TOPDIR_SUFFIX=""
+#prefix0#buildroot/#
+BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
+#prefix0#buildroot/#
+BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+#prefix0#buildroot/#
+BR2_JLEVEL=1
+#prefix0#buildroot/#
+# BR2_PREFER_IMA is not set
+#prefix0#buildroot/#
+# BR2_DEPRECATED is not set
+#prefix0#buildroot/#
+# BR2_TOOLCHAIN_BUILDROOT is not set
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_HOST is not set
+#prefix0#buildroot/#
+BR2_LARGEFILE=y
+#prefix0#buildroot/#
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
+
+#
+# Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIB_C="libc.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIBS="libc.so.0 ld-uClibc.so libcrypt.so libresolv.so librt.so libpthread.so libdl.so libm.so libutil.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_STRIP=y
+#prefix0#buildroot/#
+BR2_KERNEL_HEADERS_LOCAL=y
+#prefix0#buildroot/#
+BR2_DEFAULT_KERNEL_HEADERS="local"
+#
+
+#
+# Gdb Options
+#
+
+#
+# Common Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PATH="/usr/local/ARC/gcc/"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PREFIX="arc-linux-uclibc"
+
+#
+# Package Selection for the target
+#
+
+#
+# The default minimal system
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX=y
+#prefix0#buildroot/#
+BR2_BUSYBOX_VERSION_1_10_3=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.2.2.1.config"
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_HIDE_OTHERS=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_BUSYBOX_SKELETON is not set
+
+#
+# The minimum needed to build a uClibc development system
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_BASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BZIP2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DIFFUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FLEX is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GCC_TARGET is not set
+#prefix0#buildroot/#
+BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS=""
+#prefix0#buildroot/#
+# BR2_PACKAGE_MAKE is not set
+
+#
+# Other development stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOCONF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOMAKE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BISON is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CCACHE_TARGET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CVS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DISTCC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMALLOC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_EXPAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FAKEROOT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GETTEXT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBINTL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBGMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBMPFR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_M4 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MPATROL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PKGCONFIG is not set
+#prefix0#buildroot/#
+# BR2_READLINE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VDEV is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_Q_PARSE_LOG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RFCALTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SSCLDBG is not set
+
+#
+# Other stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BERKELEYDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BSDIFF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CUSTOMIZE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FILE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_KEXEC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TESTIPC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBELF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBEVENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBFLOAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBSYSFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LSOF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTP-TESTSUITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MICROCOM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTAGE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SQLITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STRACE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SUDO is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_MACFW=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_DSPFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_UBOOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_AUCFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_LINUX_IMG is not set
+#prefix0#buildroot/#
+BR2_NETWORK_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_ARGUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AVAHI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BOA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BIND is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_BRIDGE=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IGMPPROXY is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NEMESIS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_RELAY is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_DHCP_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DNSMASQ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DROPBEAR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_ETHTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HASERL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HOSTAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPERF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_IPROUTE2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPSEC_TOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPTABLES is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_L2TP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCURL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_JSON_C is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QHARVEST is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGICC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBPCAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIGHTTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINKS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LRZSZ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MIIDL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MROUTED is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NBD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITBASE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITTELNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETPLUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETSNMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NFS_UTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NTP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_NTPCLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENNTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSH is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_OPENSSL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSL_TARGET_HEADERS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENVPN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSWAN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTMAP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_PHP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_PPPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PROFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RSYNC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBIF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBCGIIF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QWEBPHPIF=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SAMBA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SOCAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STUNNEL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TCPDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TN5250 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TTCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VTUN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WIRELESS_TOOLS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_Q_UTILS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_MONITOR_RFENABLE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WLANCONFIG is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WPASUPPLICANT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_ZHOSTAPD=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QEVENTD=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SYSSTAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MINIHTTPD is not set
+#prefix0#buildroot/#
+BR2_BLOCKDEV_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DBUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMRAID is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_E2FSPROGS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HWDATA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IOSTAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBRAW1394 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBUSB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LVM2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MDADM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MEMTESTER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MKDOSFS is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD=y
+
+#
+# MTD package selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SNAPSHOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG_STRING="mtd_20050122.orig.tar.gz"
+
+#
+# MTD tools selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASE=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASEALL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_INFO=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_LOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_UNLOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASHCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_ERASE is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_JFFS2DUMP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_JFFS3DUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SUMTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_CHECK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTLDUMP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_MKFSJFFS2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MKFSJFFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDWRITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MTD_DEBUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOCFDISK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOC_LOADBIOS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PCIUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RAIDTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SETSERIAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SMARTMONTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBMOUNT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WIPE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_XFSPROGS is not set
+#prefix0#buildroot/#
+# BR2_AUDIO_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_GRAPHIC_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_COMPRESSOR_SUPPORT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_ZLIB=y
+#prefix0#buildroot/#
+# BR2_SCRIPTING_SUPPORT is not set
+
+#prefix0#buildroot/#
+BR2_MSWBSP_SUPPORT=y
+
+#
+# Target Options
+#
+
+#
+# filesystem for target device
+#
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CRAMFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CLOOP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_EXT2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_JFFS2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_SQUASHFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_TAR is not set
+#prefix0#buildroot/#
+BR2_TARGET_ROOTFS_CPIO=y
+
+#
+# bootloader for target device
+#
+
+#
+# Board Support Options
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINUX is not set
+#prefix0#buildroot/#
+BR2_INET_IPV6=y
+
+#
+# Atmel Target
+#
+
+#
+# Add Atmel Target here
+#
+#prefix0#buildroot/#
+# BR2_TARGET_UMS88K is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY=y
+
+#
+# Ruby filesystem configuration
+#
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_IPC_SUBNET="192.168.101"
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_NONE is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC1_ETH_IP_DHCP=y
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC2_ETH_IP_NONE=y
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_DHCP is not set
+
+#
+# Generic System Support
+#
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_ACCESS_POINT is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_FIREWALL is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_DEV_SYSTEM is not set
+
+#
+# Busybox configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NITPICK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DESKTOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SHOW_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_COMPRESS_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALLER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOCALE_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT_LONG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DEVPTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PIDFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SUID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUID_CONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SELINUX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STATIC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOMMU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUILD_LIBBUSYBOX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LFS is not set
+
+#
+# Debugging Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WERROR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NO_DEBUG_LIB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DMALLOC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EFENCE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INCLUDE_SUSv2=y
+
+#
+# Installation Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_NO_USR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_DONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PASSWORD_MINLEN=6
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5_SIZE_VS_SPEED=3
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FAST_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_VI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_HISTORY=15
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAB_COMPLETION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_COPYBUF_KB=4
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MONOTONIC_SYSCALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IOCTL_HEX2STR_ERROR=y
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_AR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUNZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG_DEB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GUNZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM2CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_CREATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_AUTODETECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_FROM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GNU_EXTENSIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNLZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNZIP is not set
+
+#
+# Common options for cpio and tar
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+
+#
+# Coreutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BASENAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CAL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CATV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHGRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHOWN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CKSUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_COMM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DATE_ISOFMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DF_INODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DIRNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DOS2UNIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIX2DOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ENV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FALSE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FOLD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEAD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_HEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HOSTID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LENGTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FILETYPES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_RECURSIVE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_SORTFILES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_USERNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LS_COLOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFIFO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKNOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PWD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_READLINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_READLINK_FOLLOW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_REALPATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SEQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SHA1SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_SLEEP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SORT_BIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SPLIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_STTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYNC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_TAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TEE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEST_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TOUCH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TRUE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNEXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_USLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UUDECODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UUENCODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WC_LARGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WHO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_WHOAMI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HUMAN_READABLE is not set
+
+#
+# Common options for md5sum, sha1sum
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CLEAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEALLOCVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DUMPKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KBD_MODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADFONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OPENVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RESET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETCONSOLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETKEYCODES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETLOGCONS is not set
+
+#
+# Debian Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKTEMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PIPE_PROGRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RUN_PARTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_START_STOP_DAEMON is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_AWK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AWK_MATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DIFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PATCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_MAX_LEN=4096
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_8BIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_COLON is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_YANKMARK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SEARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_USE_SIGNALS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_DOT_CMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_READONLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_WIN_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FIND=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRINT0 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MTIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MMIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PERM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_TYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_XDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MAXDEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NEWER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_INUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_EXEC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_USER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_FEATURE_FIND_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PAREN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_SIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRUNE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DELETE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_REGEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GREP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_CONTEXT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_XARGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG_INIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_INITTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_REMOVED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_DELAY=0
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INIT_SCTTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EXTRA_QUIET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INITRD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HALT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SHADOWPASSWDS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_USE_BB_PWD_GRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_CHECK_NAMES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PAM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGIN_SCRIPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_NOLOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SECURETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRYPTPW is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SU_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SULOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VLOCK=y
+
+#
+# Linux Ext2 FS Progs
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHATTR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LSATTR is not set
+
+#
+# Linux Module Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MODPROBE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
+
+#
+# Options common to multiple modutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_2_4_MODULES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_2_6_MODULES=y
+
+#
+# Linux System Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DMESG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DMESG_PRETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FBSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFLUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFORMAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_WRITABLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AIX_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SGI_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUN_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_OSF_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FINDFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FREERAMDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFS_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEXDUMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HWCLOCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCRM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOSETUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKSWAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MORE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USE_TERMIOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VOLUMEID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_NFS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FLAGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FSTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIVOT_ROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RDATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READPROFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RTCWAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWAPONOFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWITCH_ROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UMOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_LOOP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADJTIMEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BBCONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHRT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CROND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRONTAB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEVFSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEVFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EJECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LAST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MAXLINES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_BRACKETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MARKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_REGEXP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HDPARM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MAKEDEVS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MICROCOM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MOUNTPOINT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RAIDAUTORUN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READAHEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNLEVEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STRINGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETSID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TASKSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TTYSIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IPV6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BRCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DNSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ETHER_WAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FAKEIDENTD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPGET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HTTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CGI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_HW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IFENSLAVE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INETD_RPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_LINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_TUNNEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RULE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCALC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NAMEIF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NETSTAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NSLOOKUP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PSCAN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SENDMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FETCHMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SLATTACH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TELNET_TTYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNETD_STANDALONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TFTP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TFTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TRACEROUTE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_DHCPRELAY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_DUMPLEASES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DHCPD_LEASES_FILE=""
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPC_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_PORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_8021Q is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WGET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_STATUSBAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_AUTHENTICATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ZCIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TCPSVD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDPSVD is not set
+
+#
+# Process Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FREE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILLALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KILLALL5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NMETER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PGREP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIDOF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PKILL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PS_WIDE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RENICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BB_SYSCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UPTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCH is not set
+
+#
+# Shells
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SH_IS_ASH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_MSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_NONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_JOB_CONTROL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_NCHARS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_TIMEOUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_GETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_CMDCMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_MAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_EXPAND_PRMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LASH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CTTYHACK is not set
+
+#
+# System Logging Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYSLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_REMOTE_LOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IPC_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGGER=y
+
+#
+# Runit Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SVLOGD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SOFTLIMIT is not set
+
+#
+# Print Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPQ is not set
+
diff --git a/quantenna/configs/topaz_msmr_config b/quantenna/configs/topaz_msmr_config
new file mode 100755
index 0000000..ec26568
--- /dev/null
+++ b/quantenna/configs/topaz_msmr_config
@@ -0,0 +1,1877 @@
+#
+# Platform
+#
+CONFIG_PLATFORM_ID=415
+CONFIG_PLATFORM_TYPE=topaz
+CONFIG_PLATFORM_DESCR="BBIC4 Video Bridge with mswbsp"
+
+#
+# Filesystem & toolchain
+#
+#prefix0#buildroot/#
+BR2_HAVE_DOT_CONFIG=y
+#prefix0#buildroot/#
+# BR2_alpha is not set
+#prefix0#buildroot/#
+# BR2_arm is not set
+#prefix0#buildroot/#
+# BR2_armeb is not set
+#prefix0#buildroot/#
+# BR2_avr32 is not set
+#prefix0#buildroot/#
+# BR2_cris is not set
+#prefix0#buildroot/#
+# BR2_i386 is not set
+#prefix0#buildroot/#
+# BR2_m68k is not set
+#prefix0#buildroot/#
+# BR2_mips is not set
+#prefix0#buildroot/#
+# BR2_mipsel is not set
+#prefix0#buildroot/#
+# BR2_nios2 is not set
+#prefix0#buildroot/#
+# BR2_powerpc is not set
+#prefix0#buildroot/#
+# BR2_sh is not set
+#prefix0#buildroot/#
+# BR2_sh64 is not set
+#prefix0#buildroot/#
+# BR2_sparc is not set
+#prefix0#buildroot/#
+# BR2_x86_64 is not set
+#prefix0#buildroot/#
+BR2_arc=y
+#prefix0#buildroot/#
+BR2_ARCH="arc"
+
+#
+# Build options
+#
+#prefix0#buildroot/#
+BR2_WGET="wget --passive-ftp"
+#prefix0#buildroot/#
+BR2_SVN="svn co"
+#prefix0#buildroot/#
+BR2_ZCAT="zcat"
+#prefix0#buildroot/#
+BR2_BZCAT="bzcat"
+#prefix0#buildroot/#
+BR2_TAR_OPTIONS=""
+#prefix0#buildroot/#
+BR2_DL_DIR="$(BASE_DIR)/dl"
+#prefix0#buildroot/#
+BR2_SOURCEFORGE_MIRROR="easynews"
+#prefix0#buildroot/#
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+#prefix0#buildroot/#
+BR2_TOPDIR_PREFIX=""
+#prefix0#buildroot/#
+BR2_TOPDIR_SUFFIX=""
+#prefix0#buildroot/#
+BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
+#prefix0#buildroot/#
+BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+#prefix0#buildroot/#
+BR2_JLEVEL=1
+#prefix0#buildroot/#
+# BR2_PREFER_IMA is not set
+#prefix0#buildroot/#
+# BR2_DEPRECATED is not set
+#prefix0#buildroot/#
+# BR2_TOOLCHAIN_BUILDROOT is not set
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_HOST is not set
+#prefix0#buildroot/#
+BR2_LARGEFILE=y
+#prefix0#buildroot/#
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
+
+#
+# Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIB_C="libc.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIBS="libc.so.0 ld-uClibc.so libcrypt.so libresolv.so librt.so libpthread.so libdl.so libm.so libutil.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_STRIP=y
+#prefix0#buildroot/#
+BR2_KERNEL_HEADERS_LOCAL=y
+#prefix0#buildroot/#
+BR2_DEFAULT_KERNEL_HEADERS="local"
+#
+
+#
+# Gdb Options
+#
+
+#
+# Common Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PATH="/usr/local/ARC/gcc/"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PREFIX="arc-linux-uclibc"
+
+#
+# Package Selection for the target
+#
+
+#
+# The default minimal system
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX=y
+#prefix0#buildroot/#
+BR2_BUSYBOX_VERSION_1_10_3=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.2.2.1.config"
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_HIDE_OTHERS=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_BUSYBOX_SKELETON is not set
+
+#
+# The minimum needed to build a uClibc development system
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_BASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BZIP2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DIFFUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FLEX is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GCC_TARGET is not set
+#prefix0#buildroot/#
+BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS=""
+#prefix0#buildroot/#
+# BR2_PACKAGE_MAKE is not set
+
+#
+# Other development stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOCONF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOMAKE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BISON is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CCACHE_TARGET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CVS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DISTCC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMALLOC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_EXPAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FAKEROOT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GETTEXT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBINTL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBGMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBMPFR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_M4 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MPATROL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PKGCONFIG is not set
+#prefix0#buildroot/#
+# BR2_READLINE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VDEV is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_Q_PARSE_LOG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RFCALTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SSCLDBG is not set
+
+#
+# Other stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BERKELEYDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BSDIFF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CUSTOMIZE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FILE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_KEXEC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TESTIPC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBELF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBEVENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBFLOAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBSYSFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LSOF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTP-TESTSUITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MICROCOM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTAGE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SQLITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STRACE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SUDO is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_MACFW=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_DSPFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_UBOOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_AUCFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_LINUX_IMG is not set
+#prefix0#buildroot/#
+BR2_NETWORK_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_ARGUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AVAHI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BOA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BIND is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_BRIDGE=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IGMPPROXY is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NEMESIS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_RELAY is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_DHCP_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DNSMASQ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DROPBEAR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_ETHTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HASERL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HOSTAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPERF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_IPROUTE2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPSEC_TOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPTABLES is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_L2TP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGI is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_LIBCURL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_JSON_C=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QHARVEST=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGICC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBPCAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIGHTTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINKS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LRZSZ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MIIDL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MROUTED is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NBD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITBASE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITTELNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETPLUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETSNMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NFS_UTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NTP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_NTPCLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENNTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSH is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_OPENSSL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSL_TARGET_HEADERS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENVPN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSWAN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTMAP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_PHP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_PPPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PROFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RSYNC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBIF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBCGIIF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QWEBPHPIF=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SAMBA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SOCAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STUNNEL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TCPDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TN5250 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TTCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VTUN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WIRELESS_TOOLS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_Q_UTILS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_MONITOR_RFENABLE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WLANCONFIG is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WPASUPPLICANT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_ZHOSTAPD=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QEVENTD=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SYSSTAT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MINIHTTPD=y
+#prefix0#buildroot/#
+BR2_BLOCKDEV_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DBUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMRAID is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_E2FSPROGS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HWDATA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IOSTAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBRAW1394 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBUSB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LVM2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MDADM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MEMTESTER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MKDOSFS is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD=y
+
+#
+# MTD package selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SNAPSHOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG_STRING="mtd_20050122.orig.tar.gz"
+
+#
+# MTD tools selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASE=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASEALL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_INFO=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_LOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_UNLOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASHCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_ERASE is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_JFFS2DUMP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_JFFS3DUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SUMTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_CHECK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTLDUMP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_MKFSJFFS2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MKFSJFFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDWRITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MTD_DEBUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOCFDISK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOC_LOADBIOS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PCIUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RAIDTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SETSERIAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SMARTMONTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBMOUNT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WIPE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_XFSPROGS is not set
+#prefix0#buildroot/#
+# BR2_AUDIO_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_GRAPHIC_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_COMPRESSOR_SUPPORT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_ZLIB=y
+#prefix0#buildroot/#
+# BR2_SCRIPTING_SUPPORT is not set
+
+#prefix0#buildroot/#
+BR2_MSWBSP_SUPPORT=y
+
+#
+# Target Options
+#
+
+#
+# filesystem for target device
+#
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CRAMFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CLOOP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_EXT2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_JFFS2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_SQUASHFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_TAR is not set
+#prefix0#buildroot/#
+BR2_TARGET_ROOTFS_CPIO=y
+
+#
+# bootloader for target device
+#
+
+#
+# Board Support Options
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINUX is not set
+#prefix0#buildroot/#
+BR2_INET_IPV6=y
+
+#
+# Atmel Target
+#
+
+#
+# Add Atmel Target here
+#
+#prefix0#buildroot/#
+# BR2_TARGET_UMS88K is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY=y
+
+#
+# Ruby filesystem configuration
+#
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_IPC_SUBNET="192.168.101"
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_NONE is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC1_ETH_IP_DHCP=y
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC2_ETH_IP_NONE=y
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_DHCP is not set
+
+#
+# Generic System Support
+#
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_ACCESS_POINT is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_FIREWALL is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_DEV_SYSTEM is not set
+
+#
+# Busybox configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NITPICK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DESKTOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SHOW_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_COMPRESS_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALLER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOCALE_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT_LONG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DEVPTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PIDFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SUID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUID_CONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SELINUX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STATIC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOMMU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUILD_LIBBUSYBOX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LFS is not set
+
+#
+# Debugging Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WERROR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NO_DEBUG_LIB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DMALLOC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EFENCE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INCLUDE_SUSv2=y
+
+#
+# Installation Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_NO_USR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_DONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PASSWORD_MINLEN=6
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5_SIZE_VS_SPEED=3
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FAST_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_VI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_HISTORY=15
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAB_COMPLETION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_COPYBUF_KB=4
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MONOTONIC_SYSCALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IOCTL_HEX2STR_ERROR=y
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_AR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUNZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG_DEB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GUNZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM2CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_CREATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_AUTODETECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_FROM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GNU_EXTENSIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNLZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNZIP is not set
+
+#
+# Common options for cpio and tar
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+
+#
+# Coreutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BASENAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CAL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CATV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHGRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHOWN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CKSUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_COMM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DATE_ISOFMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DF_INODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DIRNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DOS2UNIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIX2DOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ENV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FALSE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FOLD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEAD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_HEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HOSTID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LENGTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FILETYPES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_RECURSIVE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_SORTFILES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_USERNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LS_COLOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFIFO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKNOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PWD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_READLINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_READLINK_FOLLOW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_REALPATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SEQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SHA1SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_SLEEP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SORT_BIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SPLIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_STTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYNC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_TAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TEE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEST_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TOUCH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TRUE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNEXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_USLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UUDECODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UUENCODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WC_LARGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WHO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_WHOAMI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HUMAN_READABLE is not set
+
+#
+# Common options for md5sum, sha1sum
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CLEAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEALLOCVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DUMPKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KBD_MODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADFONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OPENVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RESET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETCONSOLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETKEYCODES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETLOGCONS is not set
+
+#
+# Debian Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKTEMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PIPE_PROGRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RUN_PARTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_START_STOP_DAEMON is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_AWK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AWK_MATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DIFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PATCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_MAX_LEN=4096
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_8BIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_COLON is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_YANKMARK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SEARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_USE_SIGNALS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_DOT_CMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_READONLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_WIN_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FIND=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRINT0 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MTIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MMIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PERM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_TYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_XDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MAXDEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NEWER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_INUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_EXEC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_USER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_FEATURE_FIND_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PAREN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_SIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRUNE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DELETE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_REGEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GREP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_CONTEXT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_XARGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG_INIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_INITTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_REMOVED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_DELAY=0
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INIT_SCTTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EXTRA_QUIET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INITRD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HALT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SHADOWPASSWDS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_USE_BB_PWD_GRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_CHECK_NAMES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PAM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGIN_SCRIPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_NOLOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SECURETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRYPTPW is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SU_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SULOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VLOCK=y
+
+#
+# Linux Ext2 FS Progs
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHATTR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LSATTR is not set
+
+#
+# Linux Module Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MODPROBE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
+
+#
+# Options common to multiple modutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_2_4_MODULES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_2_6_MODULES=y
+
+#
+# Linux System Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DMESG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DMESG_PRETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FBSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFLUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFORMAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_WRITABLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AIX_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SGI_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUN_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_OSF_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FINDFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FREERAMDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFS_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEXDUMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HWCLOCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCRM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOSETUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKSWAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MORE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USE_TERMIOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VOLUMEID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_NFS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FLAGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FSTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIVOT_ROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RDATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READPROFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RTCWAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWAPONOFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWITCH_ROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UMOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_LOOP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADJTIMEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BBCONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHRT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CROND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRONTAB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEVFSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEVFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EJECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LAST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MAXLINES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_BRACKETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MARKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_REGEXP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HDPARM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MAKEDEVS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MICROCOM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MOUNTPOINT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RAIDAUTORUN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READAHEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNLEVEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STRINGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETSID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TASKSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TTYSIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IPV6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BRCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DNSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ETHER_WAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FAKEIDENTD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPGET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HTTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CGI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_HW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IFENSLAVE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INETD_RPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_LINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_TUNNEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RULE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCALC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NAMEIF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NETSTAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NSLOOKUP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PSCAN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SENDMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FETCHMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SLATTACH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TELNET_TTYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNETD_STANDALONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TFTP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TFTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TRACEROUTE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_DHCPRELAY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_DUMPLEASES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DHCPD_LEASES_FILE=""
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPC_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_PORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_8021Q is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WGET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_STATUSBAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_AUTHENTICATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ZCIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TCPSVD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDPSVD is not set
+
+#
+# Process Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FREE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILLALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KILLALL5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NMETER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PGREP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIDOF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PKILL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PS_WIDE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RENICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BB_SYSCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UPTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCH is not set
+
+#
+# Shells
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SH_IS_ASH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_MSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_NONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_JOB_CONTROL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_NCHARS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_TIMEOUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_GETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_CMDCMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_MAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_EXPAND_PRMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LASH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CTTYHACK is not set
+
+#
+# System Logging Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYSLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_REMOTE_LOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IPC_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGGER=y
+
+#
+# Runit Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SVLOGD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SOFTLIMIT is not set
+
+#
+# Print Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPQ is not set
+
diff --git a/quantenna/configs/topaz_np_config b/quantenna/configs/topaz_np_config
new file mode 100644
index 0000000..bfb9fc2
--- /dev/null
+++ b/quantenna/configs/topaz_np_config
@@ -0,0 +1,1862 @@
+#
+# Platform
+#
+CONFIG_PLATFORM_ID=413
+CONFIG_PLATFORM_TYPE=topaz
+CONFIG_PLATFORM_DESCR="BBIC4 Network Processor"
+
+#
+# Filesystem & toolchain
+#
+#prefix0#buildroot/#
+BR2_HAVE_DOT_CONFIG=y
+#prefix0#buildroot/#
+# BR2_alpha is not set
+#prefix0#buildroot/#
+# BR2_arm is not set
+#prefix0#buildroot/#
+# BR2_armeb is not set
+#prefix0#buildroot/#
+# BR2_avr32 is not set
+#prefix0#buildroot/#
+# BR2_cris is not set
+#prefix0#buildroot/#
+# BR2_i386 is not set
+#prefix0#buildroot/#
+# BR2_m68k is not set
+#prefix0#buildroot/#
+# BR2_mips is not set
+#prefix0#buildroot/#
+# BR2_mipsel is not set
+#prefix0#buildroot/#
+# BR2_nios2 is not set
+#prefix0#buildroot/#
+# BR2_powerpc is not set
+#prefix0#buildroot/#
+# BR2_sh is not set
+#prefix0#buildroot/#
+# BR2_sh64 is not set
+#prefix0#buildroot/#
+# BR2_sparc is not set
+#prefix0#buildroot/#
+# BR2_x86_64 is not set
+#prefix0#buildroot/#
+BR2_arc=y
+#prefix0#buildroot/#
+BR2_ARCH="arc"
+
+#
+# Build options
+#
+#prefix0#buildroot/#
+BR2_WGET="wget --passive-ftp"
+#prefix0#buildroot/#
+BR2_SVN="svn co"
+#prefix0#buildroot/#
+BR2_ZCAT="zcat"
+#prefix0#buildroot/#
+BR2_BZCAT="bzcat"
+#prefix0#buildroot/#
+BR2_TAR_OPTIONS=""
+#prefix0#buildroot/#
+BR2_DL_DIR="$(BASE_DIR)/dl"
+#prefix0#buildroot/#
+BR2_SOURCEFORGE_MIRROR="easynews"
+#prefix0#buildroot/#
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+#prefix0#buildroot/#
+BR2_TOPDIR_PREFIX=""
+#prefix0#buildroot/#
+BR2_TOPDIR_SUFFIX=""
+#prefix0#buildroot/#
+BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
+#prefix0#buildroot/#
+BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+#prefix0#buildroot/#
+BR2_JLEVEL=1
+#prefix0#buildroot/#
+# BR2_PREFER_IMA is not set
+#prefix0#buildroot/#
+# BR2_DEPRECATED is not set
+#prefix0#buildroot/#
+# BR2_TOOLCHAIN_BUILDROOT is not set
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_HOST is not set
+#prefix0#buildroot/#
+BR2_LARGEFILE=y
+#prefix0#buildroot/#
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
+
+#
+# Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIB_C="libc.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIBS="libc.so.0 ld-uClibc.so libcrypt.so libresolv.so librt.so libpthread.so libdl.so libm.so libutil.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_STRIP=y
+#prefix0#buildroot/#
+BR2_KERNEL_HEADERS_LOCAL=y
+#prefix0#buildroot/#
+BR2_DEFAULT_KERNEL_HEADERS="local"
+#
+
+#
+# Gdb Options
+#
+
+#
+# Common Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PATH="/usr/local/ARC/gcc/"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PREFIX="arc-linux-uclibc"
+
+#
+# Package Selection for the target
+#
+
+#
+# The default minimal system
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX=y
+#prefix0#buildroot/#
+BR2_BUSYBOX_VERSION_1_10_3=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.2.2.1.config"
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_HIDE_OTHERS=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_BUSYBOX_SKELETON is not set
+
+#
+# The minimum needed to build a uClibc development system
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_BASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BZIP2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DIFFUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FLEX is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GCC_TARGET is not set
+#prefix0#buildroot/#
+BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS=""
+#prefix0#buildroot/#
+# BR2_PACKAGE_MAKE is not set
+
+#
+# Other development stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOCONF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOMAKE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BISON is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CCACHE_TARGET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CVS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DISTCC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMALLOC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_EXPAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FAKEROOT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GETTEXT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBINTL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBGMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBMPFR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_M4 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MPATROL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PKGCONFIG is not set
+#prefix0#buildroot/#
+# BR2_READLINE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VDEV is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_Q_PARSE_LOG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RFCALTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SSCLDBG is not set
+
+#
+# Other stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BERKELEYDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BSDIFF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CUSTOMIZE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FILE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_KEXEC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TESTIPC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBELF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBEVENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBFLOAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBSYSFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LSOF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTP-TESTSUITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MICROCOM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTAGE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SQLITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STRACE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SUDO is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_MACFW is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_DSPFW is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_UBOOT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_AUCFW is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_LINUX_IMG=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_LINUX_IMG_CONFIG="topaz_rgmii_config"
+#prefix0#buildroot/#
+BR2_NETWORK_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_ARGUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AVAHI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BOA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BIND is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_BRIDGE=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IGMPPROXY is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NEMESIS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_RELAY is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_DHCP_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DNSMASQ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DROPBEAR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_ETHTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HASERL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HOSTAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPERF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_IPROUTE2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPSEC_TOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPTABLES is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_L2TP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGICC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBPCAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIGHTTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINKS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LRZSZ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MIIDL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MROUTED is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NBD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITBASE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITTELNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETPLUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETSNMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NFS_UTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NTP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_NTPCLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENNTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSL_TARGET_HEADERS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENVPN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSWAN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_PORTMAP=y
+#prefix0#buildroot/#
+BR2_PACKAGE_PHP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_PPPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PROFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RSYNC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBIF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBCGIIF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QWEBPHPIF=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SAMBA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SOCAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STUNNEL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TCPDUMP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_TFTPD=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_TN5250 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TTCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VTUN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WIRELESS_TOOLS is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_Q_UTILS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI=y
+#prefix0#buildroot/#
+BR2_PACKAGE_CALL_QCSAPI_RPC_SOCKET_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_CALL_QCSAPI_RPC_RAW_SOCKET_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI_RPC_SOCKET_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI_RPC_RAW_SOCKET_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_MONITOR_RFENABLE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WLANCONFIG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WPASUPPLICANT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_ZHOSTAPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SYSSTAT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MINIHTTPD=y
+#prefix0#buildroot/#
+BR2_BLOCKDEV_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DBUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMRAID is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_E2FSPROGS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HWDATA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IOSTAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBRAW1394 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBUSB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LVM2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MDADM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MEMTESTER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MKDOSFS is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD=y
+
+#
+# MTD package selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SNAPSHOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG_STRING="mtd_20050122.orig.tar.gz"
+
+#
+# MTD tools selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASE=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASEALL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_INFO=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_LOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_UNLOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASHCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_ERASE is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_JFFS2DUMP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_JFFS3DUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SUMTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_CHECK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTLDUMP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_MKFSJFFS2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MKFSJFFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDWRITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MTD_DEBUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOCFDISK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOC_LOADBIOS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PCIUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RAIDTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SETSERIAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SMARTMONTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBMOUNT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WIPE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_XFSPROGS is not set
+#prefix0#buildroot/#
+# BR2_AUDIO_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_GRAPHIC_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_COMPRESSOR_SUPPORT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_ZLIB=y
+#prefix0#buildroot/#
+# BR2_SCRIPTING_SUPPORT is not set
+
+#prefix0#buildroot/#
+# BR2_MSWBSP_SUPPORT is not set
+
+#
+# Target Options
+#
+
+#
+# filesystem for target device
+#
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CRAMFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CLOOP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_EXT2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_JFFS2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_SQUASHFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_TAR is not set
+#prefix0#buildroot/#
+BR2_TARGET_ROOTFS_CPIO=y
+
+#
+# bootloader for target device
+#
+
+#
+# Board Support Options
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINUX is not set
+#prefix0#buildroot/#
+BR2_INET_IPV6=y
+
+#
+# Atmel Target
+#
+
+#
+# Add Atmel Target here
+#
+#prefix0#buildroot/#
+# BR2_TARGET_UMS88K is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY=y
+
+#
+# Ruby filesystem configuration
+#
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_IPC_SUBNET="192.168.101"
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_NONE is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC1_ETH_IP_DHCP=y
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC2_ETH_IP_NONE=y
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_DHCP is not set
+
+#
+# Generic System Support
+#
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_ACCESS_POINT is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_FIREWALL is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_DEV_SYSTEM is not set
+
+#
+# Busybox configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NITPICK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DESKTOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SHOW_USAGE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_COMPRESS_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALLER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOCALE_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT_LONG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DEVPTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PIDFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SUID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUID_CONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SELINUX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STATIC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOMMU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUILD_LIBBUSYBOX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LFS=y
+
+#
+# Debugging Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WERROR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NO_DEBUG_LIB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DMALLOC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EFENCE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INCLUDE_SUSv2=y
+
+#
+# Installation Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_NO_USR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_DONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PASSWORD_MINLEN=6
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5_SIZE_VS_SPEED=2
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FAST_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_VI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_HISTORY=15
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAB_COMPLETION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_COPYBUF_KB=4
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MONOTONIC_SYSCALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IOCTL_HEX2STR_ERROR=y
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_AR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUNZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG_DEB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GUNZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM2CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_CREATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_AUTODETECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_FROM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNLZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNZIP is not set
+
+#
+# Common options for cpio and tar
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+
+#
+# Coreutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BASENAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CAL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CATV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHGRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHOWN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CKSUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_COMM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DATE_ISOFMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DF_INODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DIRNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DOS2UNIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIX2DOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ENV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FALSE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FOLD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEAD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_HEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LENGTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FILETYPES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_RECURSIVE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_SORTFILES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_USERNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_COLOR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFIFO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKNOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PWD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_READLINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_READLINK_FOLLOW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_REALPATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SEQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SHA1SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_SLEEP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SORT_BIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SPLIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_STTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYNC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEST_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TOUCH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TRUE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNEXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNIQ=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_USLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UUDECODE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UUENCODE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WC_LARGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WHO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_WHOAMI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HUMAN_READABLE is not set
+
+#
+# Common options for md5sum, sha1sum
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CLEAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DEALLOCVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DUMPKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KBD_MODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADFONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_OPENVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RESET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETCONSOLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETKEYCODES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETLOGCONS is not set
+
+#
+# Debian Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKTEMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PIPE_PROGRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RUN_PARTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_START_STOP_DAEMON=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_AWK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AWK_MATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DIFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PATCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_MAX_LEN=4096
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_8BIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_COLON is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_YANKMARK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SEARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_USE_SIGNALS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_DOT_CMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_READONLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_WIN_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FIND=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRINT0 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MTIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MMIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PERM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_TYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_XDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MAXDEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NEWER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_INUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_EXEC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_USER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_FEATURE_FIND_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PAREN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_SIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRUNE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DELETE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_REGEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GREP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_CONTEXT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_XARGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG_INIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_INITTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_REMOVED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_DELAY=0
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INIT_SCTTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EXTRA_QUIET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INITRD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HALT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SHADOWPASSWDS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_USE_BB_PWD_GRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_CHECK_NAMES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PAM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGIN_SCRIPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_NOLOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SECURETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRYPTPW is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SU=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SU_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SU_CHECKS_SHELLS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SULOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VLOCK=y
+
+#
+# Linux Ext2 FS Progs
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHATTR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LSATTR is not set
+
+#
+# Linux Module Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MODPROBE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
+
+#
+# Options common to multiple modutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_2_4_MODULES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_2_6_MODULES=y
+
+#
+# Linux System Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DMESG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DMESG_PRETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FBSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFLUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFORMAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_WRITABLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AIX_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SGI_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUN_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_OSF_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FINDFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FREERAMDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFS_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEXDUMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HWCLOCK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCRM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOSETUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKSWAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MORE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_TERMIOS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VOLUMEID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_NFS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FLAGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FSTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIVOT_ROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RDATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READPROFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RTCWAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWAPONOFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWITCH_ROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UMOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_LOOP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADJTIMEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BBCONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHRT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CROND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRONTAB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEVFSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEVFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EJECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LAST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MAXLINES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_BRACKETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MARKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LESS_REGEXP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HDPARM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MAKEDEVS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MICROCOM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MOUNTPOINT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RAIDAUTORUN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READAHEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNLEVEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STRINGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETSID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TASKSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TTYSIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IPV6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BRCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DNSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ETHER_WAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FAKEIDENTD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPGET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HTTPD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_CGI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_HW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IFENSLAVE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INETD_RPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_LINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_TUNNEL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_RULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCALC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NAMEIF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NETSTAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NSLOOKUP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PING6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PSCAN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SENDMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FETCHMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SLATTACH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TELNET_TTYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNETD_STANDALONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TFTP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TFTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TRACEROUTE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPC_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_PORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_8021Q is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DHCPC_DEFAULT_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WGET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_STATUSBAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ZCIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TCPSVD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDPSVD is not set
+
+#
+# Process Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FREE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILLALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KILLALL5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NMETER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PGREP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIDOF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PKILL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PS_WIDE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RENICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BB_SYSCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UPTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCH is not set
+
+#
+# Shells
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SH_IS_ASH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_MSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_NONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_JOB_CONTROL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_NCHARS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_TIMEOUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_GETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_CMDCMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_MAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_EXPAND_PRMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LASH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CTTYHACK is not set
+
+#
+# System Logging Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYSLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_REMOTE_LOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IPC_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGGER=y
+
+#
+# Runit Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SVLOGD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SOFTLIMIT is not set
+
+#
+# Print Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPQ is not set
diff --git a/quantenna/configs/topaz_pcie_config b/quantenna/configs/topaz_pcie_config
new file mode 100644
index 0000000..1be45b8
--- /dev/null
+++ b/quantenna/configs/topaz_pcie_config
@@ -0,0 +1,1869 @@
+#
+# Platform
+#
+CONFIG_PLATFORM_ID=450
+CONFIG_PLATFORM_TYPE=topaz
+CONFIG_PLATFORM_DESCR="BBIC4 PCIe"
+
+#
+# Filesystem & toolchain
+#
+#prefix0#buildroot/#
+BR2_HAVE_DOT_CONFIG=y
+#prefix0#buildroot/#
+# BR2_alpha is not set
+#prefix0#buildroot/#
+# BR2_arm is not set
+#prefix0#buildroot/#
+# BR2_armeb is not set
+#prefix0#buildroot/#
+# BR2_avr32 is not set
+#prefix0#buildroot/#
+# BR2_cris is not set
+#prefix0#buildroot/#
+# BR2_i386 is not set
+#prefix0#buildroot/#
+# BR2_m68k is not set
+#prefix0#buildroot/#
+# BR2_mips is not set
+#prefix0#buildroot/#
+# BR2_mipsel is not set
+#prefix0#buildroot/#
+# BR2_nios2 is not set
+#prefix0#buildroot/#
+# BR2_powerpc is not set
+#prefix0#buildroot/#
+# BR2_sh is not set
+#prefix0#buildroot/#
+# BR2_sh64 is not set
+#prefix0#buildroot/#
+# BR2_sparc is not set
+#prefix0#buildroot/#
+# BR2_x86_64 is not set
+#prefix0#buildroot/#
+BR2_arc=y
+#prefix0#buildroot/#
+BR2_ARCH="arc"
+
+#
+# Build options
+#
+#prefix0#buildroot/#
+BR2_WGET="wget --passive-ftp"
+#prefix0#buildroot/#
+BR2_SVN="svn co"
+#prefix0#buildroot/#
+BR2_ZCAT="zcat"
+#prefix0#buildroot/#
+BR2_BZCAT="bzcat"
+#prefix0#buildroot/#
+BR2_TAR_OPTIONS=""
+#prefix0#buildroot/#
+BR2_DL_DIR="$(BASE_DIR)/dl"
+#prefix0#buildroot/#
+BR2_SOURCEFORGE_MIRROR="easynews"
+#prefix0#buildroot/#
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+#prefix0#buildroot/#
+BR2_TOPDIR_PREFIX=""
+#prefix0#buildroot/#
+BR2_TOPDIR_SUFFIX=""
+#prefix0#buildroot/#
+BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
+#prefix0#buildroot/#
+BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+#prefix0#buildroot/#
+BR2_JLEVEL=1
+#prefix0#buildroot/#
+# BR2_PREFER_IMA is not set
+#prefix0#buildroot/#
+# BR2_DEPRECATED is not set
+#prefix0#buildroot/#
+# BR2_TOOLCHAIN_BUILDROOT is not set
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_HOST is not set
+#prefix0#buildroot/#
+BR2_LARGEFILE=y
+#prefix0#buildroot/#
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
+
+#
+# Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIB_C="libc.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIBS="libc.so.0 ld-uClibc.so libcrypt.so libresolv.so librt.so libpthread.so libdl.so libm.so libutil.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_STRIP=y
+#prefix0#buildroot/#
+BR2_KERNEL_HEADERS_LOCAL=y
+#prefix0#buildroot/#
+BR2_DEFAULT_KERNEL_HEADERS="local"
+#
+
+#
+# Gdb Options
+#
+
+#
+# Common Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PATH="/usr/local/ARC/gcc/"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PREFIX="arc-linux-uclibc"
+
+#
+# Package Selection for the target
+#
+
+#
+# The default minimal system
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX=y
+#prefix0#buildroot/#
+BR2_BUSYBOX_VERSION_1_10_3=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.2.2.1.config"
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_HIDE_OTHERS=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_BUSYBOX_SKELETON is not set
+
+#
+# The minimum needed to build a uClibc development system
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_BASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BZIP2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DIFFUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FLEX is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GCC_TARGET is not set
+#prefix0#buildroot/#
+BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS=""
+#prefix0#buildroot/#
+# BR2_PACKAGE_MAKE is not set
+
+#
+# Other development stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOCONF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOMAKE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BISON is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CCACHE_TARGET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CVS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DISTCC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMALLOC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_EXPAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FAKEROOT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GETTEXT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBINTL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBGMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBMPFR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_M4 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MPATROL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PKGCONFIG is not set
+#prefix0#buildroot/#
+# BR2_READLINE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VDEV is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_Q_PARSE_LOG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RFCALTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SSCLDBG is not set
+
+#
+# Other stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BERKELEYDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BSDIFF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CUSTOMIZE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FILE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_KEXEC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TESTIPC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBELF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBEVENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBFLOAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBSYSFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LSOF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTP-TESTSUITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MICROCOM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTAGE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SQLITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STRACE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SUDO is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_MACFW=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_DSPFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_UBOOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_AUCFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_LINUX_IMG is not set
+#prefix0#buildroot/#
+BR2_NETWORK_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_ARGUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AVAHI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BOA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BIND is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_BRIDGE=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IGMPPROXY is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NEMESIS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_RELAY is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_DHCP_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DNSMASQ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DROPBEAR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_ETHTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HASERL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HOSTAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPERF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_IPROUTE2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPSEC_TOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPTABLES is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_L2TP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGI is not set
+#prefix0#buildroot/#
+#BR2_PACKAGE_LIBCURL=y
+#prefix0#buildroot/#
+#BR2_PACKAGE_JSON_C=y
+#prefix0#buildroot/#
+#BR2_PACKAGE_QHARVEST=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGICC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBPCAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIGHTTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINKS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LRZSZ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MIIDL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MROUTED is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NBD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITBASE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITTELNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETPLUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETSNMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NFS_UTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NTP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_NTPCLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENNTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSH is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_OPENSSL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSL_TARGET_HEADERS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENVPN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSWAN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_PORTMAP=y
+#prefix0#buildroot/#
+BR2_PACKAGE_PHP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_PPPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PROFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RSYNC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBIF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBCGIIF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QWEBPHPIF=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SAMBA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SOCAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STUNNEL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TCPDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TN5250 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TTCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VTUN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WIRELESS_TOOLS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_Q_UTILS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_CALL_QCSAPI_RPC_SERVER=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI_RPC_SERVER=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_MONITOR_RFENABLE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WLANCONFIG is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WPASUPPLICANT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_ZHOSTAPD=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QEVENTD=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SYSSTAT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MINIHTTPD=y
+BR2_BLOCKDEV_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DBUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMRAID is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_E2FSPROGS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HWDATA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IOSTAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBRAW1394 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBUSB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LVM2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MDADM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MEMTESTER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MKDOSFS is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD=y
+
+#
+# MTD package selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SNAPSHOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG_STRING="mtd_20050122.orig.tar.gz"
+
+#
+# MTD tools selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASE=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASEALL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_INFO=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_LOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_UNLOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASHCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_ERASE is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_JFFS2DUMP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_JFFS3DUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SUMTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_CHECK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTLDUMP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_MKFSJFFS2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MKFSJFFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDWRITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MTD_DEBUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOCFDISK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOC_LOADBIOS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PCIUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RAIDTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SETSERIAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SMARTMONTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBMOUNT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WIPE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_XFSPROGS is not set
+#prefix0#buildroot/#
+# BR2_AUDIO_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_GRAPHIC_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_COMPRESSOR_SUPPORT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_ZLIB=y
+#prefix0#buildroot/#
+# BR2_SCRIPTING_SUPPORT is not set
+
+#prefix0#buildroot/#
+# BR2_MSWBSP_SUPPORT is not set
+
+#
+# Target Options
+#
+
+#
+# filesystem for target device
+#
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CRAMFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CLOOP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_EXT2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_JFFS2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_SQUASHFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_TAR is not set
+#prefix0#buildroot/#
+BR2_TARGET_ROOTFS_CPIO=y
+
+#
+# bootloader for target device
+#
+
+#
+# Board Support Options
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINUX is not set
+#prefix0#buildroot/#
+BR2_INET_IPV6=y
+
+#
+# Atmel Target
+#
+
+#
+# Add Atmel Target here
+#
+#prefix0#buildroot/#
+# BR2_TARGET_UMS88K is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY=y
+
+#
+# Ruby filesystem configuration
+#
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_IPC_SUBNET="192.168.101"
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_NONE is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC1_ETH_IP_DHCP=y
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC2_ETH_IP_NONE=y
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_DHCP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_STATELESS is not set
+
+#
+# Generic System Support
+#
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_ACCESS_POINT is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_FIREWALL is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_DEV_SYSTEM is not set
+
+#
+# Busybox configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NITPICK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DESKTOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SHOW_USAGE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_COMPRESS_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALLER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOCALE_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT_LONG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DEVPTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PIDFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SUID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUID_CONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SELINUX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STATIC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOMMU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUILD_LIBBUSYBOX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LFS=y
+
+#
+# Debugging Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WERROR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NO_DEBUG_LIB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DMALLOC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EFENCE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INCLUDE_SUSv2=y
+
+#
+# Installation Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_NO_USR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_DONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PASSWORD_MINLEN=6
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5_SIZE_VS_SPEED=2
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FAST_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_VI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_HISTORY=15
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAB_COMPLETION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_COPYBUF_KB=4
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MONOTONIC_SYSCALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IOCTL_HEX2STR_ERROR=y
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_AR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUNZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG_DEB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GUNZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM2CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_CREATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_AUTODETECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_FROM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNLZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNZIP is not set
+
+#
+# Common options for cpio and tar
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+
+#
+# Coreutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BASENAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CAL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CATV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHGRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHOWN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CKSUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_COMM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DATE_ISOFMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DF_INODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DIRNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DOS2UNIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIX2DOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ENV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FALSE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FOLD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEAD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_HEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LENGTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FILETYPES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_RECURSIVE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_SORTFILES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_USERNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_COLOR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFIFO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKNOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PWD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_READLINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_READLINK_FOLLOW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_REALPATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SEQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SHA1SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_SLEEP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SORT_BIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SPLIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_STTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYNC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEST_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TOUCH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TRUE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNEXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNIQ=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_USLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UUDECODE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UUENCODE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WC_LARGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WHO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_WHOAMI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HUMAN_READABLE is not set
+
+#
+# Common options for md5sum, sha1sum
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CLEAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DEALLOCVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DUMPKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KBD_MODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADFONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_OPENVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RESET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETCONSOLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETKEYCODES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETLOGCONS is not set
+
+#
+# Debian Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKTEMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PIPE_PROGRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RUN_PARTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_START_STOP_DAEMON=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_AWK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AWK_MATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DIFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PATCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_MAX_LEN=4096
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_8BIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_COLON is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_YANKMARK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SEARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_USE_SIGNALS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_DOT_CMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_READONLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_WIN_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FIND=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRINT0 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MTIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MMIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PERM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_TYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_XDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MAXDEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NEWER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_INUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_EXEC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_USER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_FEATURE_FIND_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PAREN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_SIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRUNE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DELETE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_REGEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GREP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_CONTEXT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_XARGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG_INIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_INITTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_REMOVED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_DELAY=0
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INIT_SCTTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EXTRA_QUIET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INITRD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HALT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SHADOWPASSWDS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_USE_BB_PWD_GRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_CHECK_NAMES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PAM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGIN_SCRIPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_NOLOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SECURETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRYPTPW is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SU=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SU_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SU_CHECKS_SHELLS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SULOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VLOCK=y
+
+#
+# Linux Ext2 FS Progs
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHATTR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LSATTR is not set
+
+#
+# Linux Module Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MODPROBE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
+
+#
+# Options common to multiple modutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_2_4_MODULES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_2_6_MODULES=y
+
+#
+# Linux System Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DMESG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DMESG_PRETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FBSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFLUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFORMAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_WRITABLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AIX_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SGI_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUN_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_OSF_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FINDFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FREERAMDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFS_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEXDUMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HWCLOCK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCRM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOSETUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKSWAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MORE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_TERMIOS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VOLUMEID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_NFS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FLAGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FSTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIVOT_ROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RDATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READPROFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RTCWAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWAPONOFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWITCH_ROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UMOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_LOOP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADJTIMEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BBCONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHRT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CROND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRONTAB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEVFSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEVFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EJECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LAST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MAXLINES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_BRACKETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MARKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LESS_REGEXP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HDPARM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MAKEDEVS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MICROCOM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MOUNTPOINT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RAIDAUTORUN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READAHEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNLEVEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STRINGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETSID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TASKSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TTYSIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IPV6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BRCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DNSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ETHER_WAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FAKEIDENTD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPGET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HTTPD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_CGI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_HW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IFENSLAVE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INETD_RPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_LINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_TUNNEL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_RULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCALC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NAMEIF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NETSTAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NSLOOKUP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PING6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PSCAN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SENDMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FETCHMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SLATTACH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TELNET_TTYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNETD_STANDALONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TFTP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TFTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TRACEROUTE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPC_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_PORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_8021Q is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DHCPC_DEFAULT_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WGET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_STATUSBAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ZCIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TCPSVD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDPSVD is not set
+
+#
+# Process Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FREE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILLALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KILLALL5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NMETER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PGREP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIDOF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PKILL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PS_WIDE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RENICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BB_SYSCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UPTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCH is not set
+
+#
+# Shells
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SH_IS_ASH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_MSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_NONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_JOB_CONTROL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_NCHARS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_TIMEOUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_GETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_CMDCMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_MAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_EXPAND_PRMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LASH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CTTYHACK is not set
+
+#
+# System Logging Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYSLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_REMOTE_LOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IPC_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGGER=y
+
+#
+# Runit Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SVLOGD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SOFTLIMIT is not set
+
+#
+# Print Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPQ is not set
diff --git a/quantenna/configs/topaz_rfic6_config b/quantenna/configs/topaz_rfic6_config
new file mode 100644
index 0000000..46085b0
--- /dev/null
+++ b/quantenna/configs/topaz_rfic6_config
@@ -0,0 +1,1879 @@
+#
+# Platform
+#
+CONFIG_PLATFORM_ID=461
+CONFIG_PLATFORM_TYPE=topaz
+CONFIG_PLATFORM_DESCR="BBIC4 Video Bridge with 128MB DDR"
+
+#
+# Filesystem & toolchain
+#
+#prefix0#buildroot/#
+BR2_HAVE_DOT_CONFIG=y
+#prefix0#buildroot/#
+# BR2_alpha is not set
+#prefix0#buildroot/#
+# BR2_arm is not set
+#prefix0#buildroot/#
+# BR2_armeb is not set
+#prefix0#buildroot/#
+# BR2_avr32 is not set
+#prefix0#buildroot/#
+# BR2_cris is not set
+#prefix0#buildroot/#
+# BR2_i386 is not set
+#prefix0#buildroot/#
+# BR2_m68k is not set
+#prefix0#buildroot/#
+# BR2_mips is not set
+#prefix0#buildroot/#
+# BR2_mipsel is not set
+#prefix0#buildroot/#
+# BR2_nios2 is not set
+#prefix0#buildroot/#
+# BR2_powerpc is not set
+#prefix0#buildroot/#
+# BR2_sh is not set
+#prefix0#buildroot/#
+# BR2_sh64 is not set
+#prefix0#buildroot/#
+# BR2_sparc is not set
+#prefix0#buildroot/#
+# BR2_x86_64 is not set
+#prefix0#buildroot/#
+BR2_arc=y
+#prefix0#buildroot/#
+BR2_ARCH="arc"
+
+#
+# Build options
+#
+#prefix0#buildroot/#
+BR2_WGET="wget --passive-ftp"
+#prefix0#buildroot/#
+BR2_SVN="svn co"
+#prefix0#buildroot/#
+BR2_ZCAT="zcat"
+#prefix0#buildroot/#
+BR2_BZCAT="bzcat"
+#prefix0#buildroot/#
+BR2_TAR_OPTIONS=""
+#prefix0#buildroot/#
+BR2_DL_DIR="$(BASE_DIR)/dl"
+#prefix0#buildroot/#
+BR2_SOURCEFORGE_MIRROR="easynews"
+#prefix0#buildroot/#
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+#prefix0#buildroot/#
+BR2_TOPDIR_PREFIX=""
+#prefix0#buildroot/#
+BR2_TOPDIR_SUFFIX=""
+#prefix0#buildroot/#
+BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
+#prefix0#buildroot/#
+BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+#prefix0#buildroot/#
+BR2_JLEVEL=1
+#prefix0#buildroot/#
+# BR2_PREFER_IMA is not set
+#prefix0#buildroot/#
+# BR2_DEPRECATED is not set
+#prefix0#buildroot/#
+# BR2_TOOLCHAIN_BUILDROOT is not set
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_HOST is not set
+#prefix0#buildroot/#
+BR2_LARGEFILE=y
+#prefix0#buildroot/#
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
+
+#
+# Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIB_C="libc.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIBS="libc.so.0 ld-uClibc.so libcrypt.so libresolv.so librt.so libpthread.so libdl.so libm.so libutil.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_STRIP=y
+#prefix0#buildroot/#
+BR2_KERNEL_HEADERS_LOCAL=y
+#prefix0#buildroot/#
+BR2_DEFAULT_KERNEL_HEADERS="local"
+#
+
+#
+# Gdb Options
+#
+
+#
+# Common Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PATH="/usr/local/ARC/gcc/"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PREFIX="arc-linux-uclibc"
+
+#
+# Package Selection for the target
+#
+
+#
+# The default minimal system
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX=y
+#prefix0#buildroot/#
+BR2_BUSYBOX_VERSION_1_10_3=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.2.2.1.config"
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_HIDE_OTHERS=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_BUSYBOX_SKELETON is not set
+
+#
+# The minimum needed to build a uClibc development system
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_BASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BZIP2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DIFFUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FLEX is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GCC_TARGET is not set
+#prefix0#buildroot/#
+BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS=""
+#prefix0#buildroot/#
+# BR2_PACKAGE_MAKE is not set
+
+#
+# Other development stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOCONF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOMAKE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BISON is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CCACHE_TARGET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CVS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DISTCC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMALLOC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_EXPAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FAKEROOT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GETTEXT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBINTL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBGMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBMPFR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_M4 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MPATROL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PKGCONFIG is not set
+#prefix0#buildroot/#
+# BR2_READLINE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VDEV is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_Q_PARSE_LOG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RFCALTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SSCLDBG is not set
+
+#
+# Other stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BERKELEYDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BSDIFF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CUSTOMIZE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FILE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_KEXEC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TESTIPC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBELF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBEVENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBFLOAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBSYSFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LSOF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTP-TESTSUITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MICROCOM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTAGE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SQLITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STRACE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SUDO is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_MACFW=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_DSPFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_UBOOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_AUCFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_LINUX_IMG is not set
+#prefix0#buildroot/#
+BR2_NETWORK_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_ARGUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AVAHI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BOA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BIND is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_BRIDGE=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IGMPPROXY is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NEMESIS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_RELAY is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_DHCP_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DNSMASQ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DROPBEAR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_ETHTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HASERL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HOSTAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPERF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_IPROUTE2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPSEC_TOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPTABLES is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_L2TP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGI is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_LIBCURL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_JSON_C=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QHARVEST=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGICC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBPCAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIGHTTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINKS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LRZSZ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MIIDL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MROUTED is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NBD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITBASE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITTELNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETPLUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETSNMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NFS_UTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NTP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_NTPCLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENNTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSH is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_OPENSSL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSL_TARGET_HEADERS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENVPN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSWAN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTMAP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_PHP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_PPPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PROFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RSYNC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBIF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBCGIIF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QWEBPHPIF=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SAMBA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SOCAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STUNNEL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TCPDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TN5250 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TTCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VTUN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WIRELESS_TOOLS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_Q_UTILS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_SIGMA=y
+#prefix0#buildroot/#
+BR2_PACKAGE_SIGMA_CA_PORT=9000
+#prefix0#buildroot/#
+BR2_PACKAGE_SIGMA_DUT_PORT=6070
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_MONITOR_RFENABLE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WLANCONFIG is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WPASUPPLICANT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_ZHOSTAPD=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QEVENTD=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SYSSTAT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MINIHTTPD=y
+#prefix0#buildroot/#
+BR2_BLOCKDEV_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DBUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMRAID is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_E2FSPROGS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HWDATA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IOSTAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBRAW1394 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBUSB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LVM2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MDADM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MEMTESTER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MKDOSFS is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD=y
+
+#
+# MTD package selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SNAPSHOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG_STRING="mtd_20050122.orig.tar.gz"
+
+#
+# MTD tools selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASE=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASEALL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_INFO=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_LOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_UNLOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASHCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_ERASE is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_JFFS2DUMP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_JFFS3DUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SUMTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_CHECK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTLDUMP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_MKFSJFFS2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MKFSJFFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDWRITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MTD_DEBUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOCFDISK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOC_LOADBIOS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PCIUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RAIDTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SETSERIAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SMARTMONTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBMOUNT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WIPE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_XFSPROGS is not set
+#prefix0#buildroot/#
+# BR2_AUDIO_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_GRAPHIC_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_COMPRESSOR_SUPPORT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_ZLIB=y
+#prefix0#buildroot/#
+# BR2_SCRIPTING_SUPPORT is not set
+
+#prefix0#buildroot/#
+# BR2_MSWBSP_SUPPORT is not set
+
+#
+# Target Options
+#
+
+#
+# filesystem for target device
+#
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CRAMFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CLOOP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_EXT2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_JFFS2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_SQUASHFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_TAR is not set
+#prefix0#buildroot/#
+BR2_TARGET_ROOTFS_CPIO=y
+
+#
+# bootloader for target device
+#
+
+#
+# Board Support Options
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINUX is not set
+#prefix0#buildroot/#
+BR2_INET_IPV6=y
+
+#
+# Atmel Target
+#
+
+#
+# Add Atmel Target here
+#
+#prefix0#buildroot/#
+# BR2_TARGET_UMS88K is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY=y
+
+#
+# Ruby filesystem configuration
+#
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_IPC_SUBNET="192.168.101"
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_NONE is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC1_ETH_IP_DHCP=y
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC2_ETH_IP_NONE=y
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_DHCP is not set
+
+#
+# Generic System Support
+#
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_ACCESS_POINT is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_FIREWALL is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_DEV_SYSTEM is not set
+
+#
+# Busybox configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NITPICK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DESKTOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SHOW_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_COMPRESS_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALLER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOCALE_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT_LONG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DEVPTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PIDFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SUID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUID_CONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SELINUX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STATIC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOMMU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUILD_LIBBUSYBOX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LFS is not set
+
+#
+# Debugging Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WERROR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NO_DEBUG_LIB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DMALLOC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EFENCE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INCLUDE_SUSv2=y
+
+#
+# Installation Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_NO_USR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_DONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PASSWORD_MINLEN=6
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5_SIZE_VS_SPEED=3
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FAST_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_VI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_HISTORY=15
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAB_COMPLETION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_COPYBUF_KB=4
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MONOTONIC_SYSCALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IOCTL_HEX2STR_ERROR=y
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_AR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUNZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG_DEB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GUNZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM2CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_CREATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GZIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_AUTODETECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_FROM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_GNU_EXTENSIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNLZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNZIP is not set
+
+#
+# Common options for cpio and tar
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+
+#
+# Coreutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BASENAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CAL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CATV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHGRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHOWN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CKSUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_COMM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DATE_ISOFMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DF_INODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DIRNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DOS2UNIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIX2DOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ENV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FALSE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FOLD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEAD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_HEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HOSTID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LENGTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FILETYPES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_RECURSIVE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_SORTFILES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_USERNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LS_COLOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFIFO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKNOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PWD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_READLINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_READLINK_FOLLOW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_REALPATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SEQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SHA1SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_SLEEP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SORT_BIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SPLIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_STTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYNC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_TAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TEE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEST_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TOUCH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TRUE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNEXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNIQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_USLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UUDECODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UUENCODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WC_LARGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WHO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_WHOAMI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HUMAN_READABLE is not set
+
+#
+# Common options for md5sum, sha1sum
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CLEAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEALLOCVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DUMPKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KBD_MODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADFONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OPENVT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RESET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETCONSOLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETKEYCODES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETLOGCONS is not set
+
+#
+# Debian Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKTEMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PIPE_PROGRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RUN_PARTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_START_STOP_DAEMON is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_AWK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AWK_MATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DIFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PATCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_MAX_LEN=4096
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_8BIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_COLON is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_YANKMARK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SEARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_USE_SIGNALS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_DOT_CMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_READONLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_SET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_WIN_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FIND=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRINT0 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MTIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MMIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PERM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_TYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_XDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MAXDEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NEWER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_INUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_EXEC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_USER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+#CONFIG_FEATURE_FIND_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DEPTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PAREN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_SIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PRUNE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DELETE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_PATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_REGEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GREP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_CONTEXT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_XARGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG_INIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_INITTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_REMOVED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_DELAY=0
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INIT_SCTTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EXTRA_QUIET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INITRD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HALT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SHADOWPASSWDS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_USE_BB_PWD_GRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_CHECK_NAMES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PAM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGIN_SCRIPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_NOLOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SECURETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRYPTPW is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SU_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SULOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VLOCK=y
+
+#
+# Linux Ext2 FS Progs
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHATTR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LSATTR is not set
+
+#
+# Linux Module Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MODPROBE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
+
+#
+# Options common to multiple modutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_2_4_MODULES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_2_6_MODULES=y
+
+#
+# Linux System Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DMESG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DMESG_PRETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FBSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFLUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFORMAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_WRITABLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AIX_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SGI_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUN_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_OSF_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FINDFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FREERAMDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFS_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEXDUMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HWCLOCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCRM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOSETUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKSWAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MORE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USE_TERMIOS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VOLUMEID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_NFS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FLAGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FSTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIVOT_ROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RDATE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READPROFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RTCWAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWAPONOFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SWITCH_ROOT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UMOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_LOOP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADJTIMEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BBCONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHRT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CROND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRONTAB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEVFSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEVFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EJECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LAST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MAXLINES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_BRACKETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MARKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_REGEXP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HDPARM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MAKEDEVS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MICROCOM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MOUNTPOINT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RAIDAUTORUN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READAHEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNLEVEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STRINGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETSID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TASKSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TIME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TTYSIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IPV6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ARP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BRCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DNSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ETHER_WAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FAKEIDENTD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPGET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HTTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CGI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_HW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IFENSLAVE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INETD_RPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_LINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_TUNNEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RULE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCALC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NAMEIF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NETSTAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NSLOOKUP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PSCAN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SENDMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FETCHMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SLATTACH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TELNET_TTYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNETD_STANDALONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TFTP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TFTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TRACEROUTE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_DHCPRELAY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_DUMPLEASES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DHCPD_LEASES_FILE=""
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPC_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_PORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_8021Q is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WGET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_STATUSBAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_AUTHENTICATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ZCIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TCPSVD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDPSVD is not set
+
+#
+# Process Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FREE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILLALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KILLALL5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NMETER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PGREP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIDOF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PKILL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PS_WIDE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RENICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BB_SYSCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UPTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCH is not set
+
+#
+# Shells
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SH_IS_ASH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_MSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_NONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_JOB_CONTROL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_NCHARS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_TIMEOUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_GETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_CMDCMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_MAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_EXPAND_PRMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LASH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CTTYHACK is not set
+
+#
+# System Logging Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYSLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_REMOTE_LOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IPC_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGGER=y
+
+#
+# Runit Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SVLOGD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SOFTLIMIT is not set
+
+#
+# Print Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPQ is not set
+
diff --git a/quantenna/configs/topaz_rgmii_config b/quantenna/configs/topaz_rgmii_config
new file mode 100644
index 0000000..1824f48
--- /dev/null
+++ b/quantenna/configs/topaz_rgmii_config
@@ -0,0 +1,1864 @@
+#
+# Platform
+#
+CONFIG_PLATFORM_ID=432
+CONFIG_PLATFORM_TYPE=topaz
+CONFIG_PLATFORM_DESCR="BBIC4 RGMII with 64KB flash"
+
+#
+# Filesystem & toolchain
+#
+#prefix0#buildroot/#
+BR2_HAVE_DOT_CONFIG=y
+#prefix0#buildroot/#
+# BR2_alpha is not set
+#prefix0#buildroot/#
+# BR2_arm is not set
+#prefix0#buildroot/#
+# BR2_armeb is not set
+#prefix0#buildroot/#
+# BR2_avr32 is not set
+#prefix0#buildroot/#
+# BR2_cris is not set
+#prefix0#buildroot/#
+# BR2_i386 is not set
+#prefix0#buildroot/#
+# BR2_m68k is not set
+#prefix0#buildroot/#
+# BR2_mips is not set
+#prefix0#buildroot/#
+# BR2_mipsel is not set
+#prefix0#buildroot/#
+# BR2_nios2 is not set
+#prefix0#buildroot/#
+# BR2_powerpc is not set
+#prefix0#buildroot/#
+# BR2_sh is not set
+#prefix0#buildroot/#
+# BR2_sh64 is not set
+#prefix0#buildroot/#
+# BR2_sparc is not set
+#prefix0#buildroot/#
+# BR2_x86_64 is not set
+#prefix0#buildroot/#
+BR2_arc=y
+#prefix0#buildroot/#
+BR2_ARCH="arc"
+
+#
+# Build options
+#
+#prefix0#buildroot/#
+BR2_WGET="wget --passive-ftp"
+#prefix0#buildroot/#
+BR2_SVN="svn co"
+#prefix0#buildroot/#
+BR2_ZCAT="zcat"
+#prefix0#buildroot/#
+BR2_BZCAT="bzcat"
+#prefix0#buildroot/#
+BR2_TAR_OPTIONS=""
+#prefix0#buildroot/#
+BR2_DL_DIR="$(BASE_DIR)/dl"
+#prefix0#buildroot/#
+BR2_SOURCEFORGE_MIRROR="easynews"
+#prefix0#buildroot/#
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+#prefix0#buildroot/#
+BR2_TOPDIR_PREFIX=""
+#prefix0#buildroot/#
+BR2_TOPDIR_SUFFIX=""
+#prefix0#buildroot/#
+BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
+#prefix0#buildroot/#
+BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+#prefix0#buildroot/#
+BR2_JLEVEL=1
+#prefix0#buildroot/#
+# BR2_PREFER_IMA is not set
+#prefix0#buildroot/#
+# BR2_DEPRECATED is not set
+#prefix0#buildroot/#
+# BR2_TOOLCHAIN_BUILDROOT is not set
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_HOST is not set
+#prefix0#buildroot/#
+BR2_LARGEFILE=y
+#prefix0#buildroot/#
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
+
+#
+# Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIB_C="libc.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIBS="libc.so.0 ld-uClibc.so libcrypt.so libresolv.so librt.so libpthread.so libdl.so libm.so libutil.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_STRIP=y
+#prefix0#buildroot/#
+BR2_KERNEL_HEADERS_LOCAL=y
+#prefix0#buildroot/#
+BR2_DEFAULT_KERNEL_HEADERS="local"
+#
+
+#
+# Gdb Options
+#
+
+#
+# Common Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PATH="/usr/local/ARC/gcc/"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PREFIX="arc-linux-uclibc"
+
+#
+# Package Selection for the target
+#
+
+#
+# The default minimal system
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX=y
+#prefix0#buildroot/#
+BR2_BUSYBOX_VERSION_1_10_3=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.2.2.1.config"
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_HIDE_OTHERS=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_BUSYBOX_SKELETON is not set
+
+#
+# The minimum needed to build a uClibc development system
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_BASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BZIP2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DIFFUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FLEX is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GCC_TARGET is not set
+#prefix0#buildroot/#
+BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS=""
+#prefix0#buildroot/#
+# BR2_PACKAGE_MAKE is not set
+
+#
+# Other development stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOCONF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOMAKE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BISON is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CCACHE_TARGET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CVS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DISTCC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMALLOC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_EXPAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FAKEROOT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GETTEXT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBINTL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBGMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBMPFR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_M4 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MPATROL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PKGCONFIG is not set
+#prefix0#buildroot/#
+# BR2_READLINE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VDEV is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_Q_PARSE_LOG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RFCALTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SSCLDBG is not set
+
+#
+# Other stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BERKELEYDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BSDIFF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CUSTOMIZE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FILE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_KEXEC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TESTIPC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBELF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBEVENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBFLOAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBSYSFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LSOF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTP-TESTSUITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MICROCOM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTAGE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SQLITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STRACE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SUDO is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_MACFW=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_DSPFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_UBOOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_AUCFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_LINUX_IMG is not set
+#prefix0#buildroot/#
+BR2_NETWORK_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_ARGUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AVAHI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BOA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BIND is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_BRIDGE=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IGMPPROXY is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NEMESIS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_RELAY is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_DHCP_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DNSMASQ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DROPBEAR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_ETHTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HASERL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HOSTAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPERF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_IPROUTE2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPSEC_TOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPTABLES is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_L2TP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGI is not set
+#prefix0#buildroot/#
+#BR2_PACKAGE_LIBCURL=y
+#prefix0#buildroot/#
+#BR2_PACKAGE_JSON_C=y
+#prefix0#buildroot/#
+#BR2_PACKAGE_QHARVEST=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGICC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBPCAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIGHTTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINKS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LRZSZ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MIIDL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MROUTED is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NBD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITBASE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITTELNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETPLUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETSNMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NFS_UTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NTP is not set
+#prefix0#buildroot/#
+#BR2_PACKAGE_NTPCLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENNTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSH is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_OPENSSL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSL_TARGET_HEADERS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENVPN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSWAN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_PORTMAP=y
+#prefix0#buildroot/#
+BR2_PACKAGE_PHP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_PPPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PROFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RSYNC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBIF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBCGIIF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QWEBPHPIF=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SAMBA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SOCAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STUNNEL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TCPDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TN5250 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TTCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VTUN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WIRELESS_TOOLS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_Q_UTILS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_CALL_QCSAPI_RPC_SERVER=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI_RPC_SERVER=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI_SERVER is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI_MONITOR_RFENABLE=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_WLANCONFIG is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WPASUPPLICANT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_ZHOSTAPD=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QEVENTD=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SYSSTAT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MINIHTTPD=y
+#prefix0#buildroot/#
+BR2_BLOCKDEV_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DBUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMRAID is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_E2FSPROGS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HWDATA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IOSTAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBRAW1394 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBUSB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LVM2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MDADM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MEMTESTER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MKDOSFS is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD=y
+
+#
+# MTD package selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SNAPSHOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG_STRING="mtd_20050122.orig.tar.gz"
+
+#
+# MTD tools selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASE=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASEALL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_INFO=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_LOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_UNLOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASHCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_ERASE is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_JFFS2DUMP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_JFFS3DUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SUMTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_CHECK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTLDUMP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_MKFSJFFS2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MKFSJFFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDWRITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MTD_DEBUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOCFDISK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOC_LOADBIOS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PCIUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RAIDTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SETSERIAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SMARTMONTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBMOUNT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WIPE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_XFSPROGS is not set
+#prefix0#buildroot/#
+# BR2_AUDIO_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_GRAPHIC_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_COMPRESSOR_SUPPORT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_ZLIB=y
+#prefix0#buildroot/#
+# BR2_SCRIPTING_SUPPORT is not set
+
+#prefix0#buildroot/#
+# BR2_MSWBSP_SUPPORT is not set
+
+#
+# Target Options
+#
+
+#
+# filesystem for target device
+#
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CRAMFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CLOOP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_EXT2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_JFFS2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_SQUASHFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_TAR is not set
+#prefix0#buildroot/#
+BR2_TARGET_ROOTFS_CPIO=y
+
+#
+# bootloader for target device
+#
+
+#
+# Board Support Options
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINUX is not set
+
+#
+# Atmel Target
+#
+
+#
+# Add Atmel Target here
+#
+#prefix0#buildroot/#
+# BR2_TARGET_UMS88K is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY=y
+
+#
+# Ruby filesystem configuration
+#
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_IPC_SUBNET="192.168.101"
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_NONE is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC1_ETH_IP_DHCP=y
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC2_ETH_IP_NONE=y
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_DHCP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_STATELESS is not set
+
+#
+# Generic System Support
+#
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_ACCESS_POINT is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_FIREWALL is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_DEV_SYSTEM is not set
+
+#
+# Busybox configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NITPICK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DESKTOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SHOW_USAGE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VERBOSE_USAGE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_COMPRESS_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALLER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOCALE_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT_LONG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DEVPTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PIDFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SUID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUID_CONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SELINUX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STATIC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOMMU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUILD_LIBBUSYBOX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LFS=y
+
+#
+# Debugging Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WERROR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NO_DEBUG_LIB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DMALLOC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EFENCE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INCLUDE_SUSv2=y
+
+#
+# Installation Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_NO_USR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_DONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PASSWORD_MINLEN=6
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5_SIZE_VS_SPEED=2
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FAST_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_VI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_HISTORY=15
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAB_COMPLETION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_COPYBUF_KB=4
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MONOTONIC_SYSCALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IOCTL_HEX2STR_ERROR=y
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_AR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BUNZIP2=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG_DEB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GUNZIP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GZIP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM2CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_CREATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_GZIP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_BZIP2=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_AUTODETECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_FROM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNLZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNZIP=y
+
+#
+# Common options for cpio and tar
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+
+#
+# Coreutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BASENAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CAL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CATV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHGRP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHOWN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CKSUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_COMM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DATE_ISOFMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DF_INODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DIRNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DOS2UNIX=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNIX2DOS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DU=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ENV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FALSE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FOLD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEAD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_HEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LENGTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FILETYPES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_RECURSIVE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_SORTFILES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_USERNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_COLOR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFIFO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKNOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PWD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_READLINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_READLINK_FOLLOW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_REALPATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SEQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SHA1SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_SLEEP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SORT_BIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SPLIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_STTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYNC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEST_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TOUCH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TRUE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNEXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNIQ=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_USLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UUDECODE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UUENCODE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WC_LARGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WHO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WHOAMI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HUMAN_READABLE=y
+
+#
+# Common options for md5sum, sha1sum
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CLEAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DEALLOCVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DUMPKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KBD_MODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADFONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_OPENVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RESET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETCONSOLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETKEYCODES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETLOGCONS is not set
+
+#
+# Debian Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKTEMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PIPE_PROGRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RUN_PARTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_START_STOP_DAEMON=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_AWK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AWK_MATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DIFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PATCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_MAX_LEN=4096
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_8BIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_COLON=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_YANKMARK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_SEARCH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_USE_SIGNALS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_DOT_CMD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_READONLY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_SETOPTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_SET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_WIN_RESIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FIND=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_PRINT0=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_MTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MMIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_PERM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_TYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_XDEV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_MAXDEPTH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NEWER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_INUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_EXEC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_USER=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_GROUP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_NOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_DEPTH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_PAREN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_SIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_PRUNE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DELETE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_PATH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_REGEX=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GREP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_CONTEXT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_XARGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG_INIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_INITTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_REMOVED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_DELAY=0
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INIT_SCTTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EXTRA_QUIET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INITRD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HALT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SHADOWPASSWDS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_USE_BB_PWD_GRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_CHECK_NAMES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PAM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGIN_SCRIPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_NOLOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SECURETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRYPTPW is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SU=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SU_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SU_CHECKS_SHELLS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SULOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VLOCK=y
+
+#
+# Linux Ext2 FS Progs
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHATTR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LSATTR is not set
+
+#
+# Linux Module Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MODPROBE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
+
+#
+# Options common to multiple modutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_2_4_MODULES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_2_6_MODULES=y
+
+#
+# Linux System Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DMESG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DMESG_PRETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FBSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFLUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFORMAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_WRITABLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AIX_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SGI_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUN_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_OSF_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FINDFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FREERAMDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFS_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEXDUMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HWCLOCK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCRM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOSETUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKSWAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MORE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_TERMIOS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VOLUMEID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_NFS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FLAGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FSTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIVOT_ROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RDATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READPROFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RTCWAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SWAPONOFF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SWITCH_ROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UMOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_LOOP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADJTIMEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BBCONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHRT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CROND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRONTAB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEVFSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEVFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EJECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LAST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LESS_MAXLINES=9999999
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_BRACKETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MARKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LESS_REGEXP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HDPARM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MAKEDEVS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MICROCOM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MOUNTPOINT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RAIDAUTORUN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READAHEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNLEVEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_STRINGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETSID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TASKSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TTYSIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IPV6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ARP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BRCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DNSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ETHER_WAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FAKEIDENTD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPGET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HTTPD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_CGI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_HW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IFENSLAVE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INETD_RPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_LINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_TUNNEL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_RULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCALC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NAMEIF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NETSTAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NSLOOKUP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PING6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PSCAN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SENDMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FETCHMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SLATTACH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TELNET_TTYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNETD_STANDALONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TFTP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TFTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TRACEROUTE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPC_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_PORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DHCPC_DEFAULT_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WGET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_STATUSBAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ZCIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TCPSVD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDPSVD is not set
+
+#
+# Process Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FREE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILLALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KILLALL5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NMETER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PGREP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIDOF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PKILL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PS_WIDE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RENICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BB_SYSCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UPTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCH is not set
+
+#
+# Shells
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SH_IS_ASH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_MSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_NONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_JOB_CONTROL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_NCHARS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_TIMEOUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_GETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_CMDCMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_MAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_EXPAND_PRMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LASH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CTTYHACK is not set
+
+#
+# System Logging Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYSLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_REMOTE_LOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IPC_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGGER=y
+
+#
+# Runit Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SVLOGD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SOFTLIMIT is not set
+
+#
+# Print Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPQ is not set
diff --git a/quantenna/configs/topaz_vzn_config b/quantenna/configs/topaz_vzn_config
new file mode 100644
index 0000000..b14a87b
--- /dev/null
+++ b/quantenna/configs/topaz_vzn_config
@@ -0,0 +1,1864 @@
+#
+# Platform
+#
+CONFIG_PLATFORM_ID=464
+CONFIG_PLATFORM_TYPE=topaz
+CONFIG_PLATFORM_DESCR="BBIC4 RGMII with 64KB flash for Verizon"
+
+#
+# Filesystem & toolchain
+#
+#prefix0#buildroot/#
+BR2_HAVE_DOT_CONFIG=y
+#prefix0#buildroot/#
+# BR2_alpha is not set
+#prefix0#buildroot/#
+# BR2_arm is not set
+#prefix0#buildroot/#
+# BR2_armeb is not set
+#prefix0#buildroot/#
+# BR2_avr32 is not set
+#prefix0#buildroot/#
+# BR2_cris is not set
+#prefix0#buildroot/#
+# BR2_i386 is not set
+#prefix0#buildroot/#
+# BR2_m68k is not set
+#prefix0#buildroot/#
+# BR2_mips is not set
+#prefix0#buildroot/#
+# BR2_mipsel is not set
+#prefix0#buildroot/#
+# BR2_nios2 is not set
+#prefix0#buildroot/#
+# BR2_powerpc is not set
+#prefix0#buildroot/#
+# BR2_sh is not set
+#prefix0#buildroot/#
+# BR2_sh64 is not set
+#prefix0#buildroot/#
+# BR2_sparc is not set
+#prefix0#buildroot/#
+# BR2_x86_64 is not set
+#prefix0#buildroot/#
+BR2_arc=y
+#prefix0#buildroot/#
+BR2_ARCH="arc"
+
+#
+# Build options
+#
+#prefix0#buildroot/#
+BR2_WGET="wget --passive-ftp"
+#prefix0#buildroot/#
+BR2_SVN="svn co"
+#prefix0#buildroot/#
+BR2_ZCAT="zcat"
+#prefix0#buildroot/#
+BR2_BZCAT="bzcat"
+#prefix0#buildroot/#
+BR2_TAR_OPTIONS=""
+#prefix0#buildroot/#
+BR2_DL_DIR="$(BASE_DIR)/dl"
+#prefix0#buildroot/#
+BR2_SOURCEFORGE_MIRROR="easynews"
+#prefix0#buildroot/#
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+#prefix0#buildroot/#
+BR2_TOPDIR_PREFIX=""
+#prefix0#buildroot/#
+BR2_TOPDIR_SUFFIX=""
+#prefix0#buildroot/#
+BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
+#prefix0#buildroot/#
+BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+#prefix0#buildroot/#
+BR2_JLEVEL=1
+#prefix0#buildroot/#
+# BR2_PREFER_IMA is not set
+#prefix0#buildroot/#
+# BR2_DEPRECATED is not set
+#prefix0#buildroot/#
+# BR2_TOOLCHAIN_BUILDROOT is not set
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GDB_HOST is not set
+#prefix0#buildroot/#
+BR2_LARGEFILE=y
+#prefix0#buildroot/#
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
+
+#
+# Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIB_C="libc.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_LIBS="libc.so.0 ld-uClibc.so libcrypt.so libresolv.so librt.so libpthread.so libdl.so libm.so libutil.so"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_STRIP=y
+#prefix0#buildroot/#
+BR2_KERNEL_HEADERS_LOCAL=y
+#prefix0#buildroot/#
+BR2_DEFAULT_KERNEL_HEADERS="local"
+#
+
+#
+# Gdb Options
+#
+
+#
+# Common Toolchain Options
+#
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PATH="/usr/local/ARC/gcc/"
+#prefix0#buildroot/#
+BR2_TOOLCHAIN_EXTERNAL_PREFIX="arc-linux-uclibc"
+
+#
+# Package Selection for the target
+#
+
+#
+# The default minimal system
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX=y
+#prefix0#buildroot/#
+BR2_BUSYBOX_VERSION_1_10_3=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.2.2.1.config"
+#prefix0#buildroot/#
+BR2_PACKAGE_BUSYBOX_HIDE_OTHERS=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_BUSYBOX_SKELETON is not set
+
+#
+# The minimum needed to build a uClibc development system
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_BASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BZIP2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DIFFUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FLEX is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GCC_TARGET is not set
+#prefix0#buildroot/#
+BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS=""
+#prefix0#buildroot/#
+# BR2_PACKAGE_MAKE is not set
+
+#
+# Other development stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOCONF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AUTOMAKE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BISON is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CCACHE_TARGET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CVS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DISTCC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMALLOC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_EXPAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FAKEROOT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_GETTEXT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBINTL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBGMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBMPFR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_M4 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MPATROL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PKGCONFIG is not set
+#prefix0#buildroot/#
+# BR2_READLINE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VDEV is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_Q_PARSE_LOG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RFCALTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SSCLDBG is not set
+
+#
+# Other stuff
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_AT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BERKELEYDB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BSDIFF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CUSTOMIZE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DASH is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_FILE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_KEXEC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TESTIPC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBELF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBEVENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBFLOAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBSYSFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LSOF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTP-TESTSUITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LTT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MICROCOM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PORTAGE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SQLITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STRACE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SUDO is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_MACFW=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_DSPFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_UBOOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QTN_AUCFW=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QTN_LINUX_IMG is not set
+#prefix0#buildroot/#
+BR2_NETWORK_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_ARGUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_AVAHI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BOA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_BIND is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_BRIDGE=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IGMPPROXY is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NEMESIS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_SERVER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DHCP_RELAY is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_DHCP_CLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DNSMASQ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DROPBEAR is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_ETHTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HASERL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HOSTAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPERF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_IPROUTE2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPSEC_TOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IPTABLES is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_L2TP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGI is not set
+#prefix0#buildroot/#
+#BR2_PACKAGE_LIBCURL=y
+#prefix0#buildroot/#
+#BR2_PACKAGE_JSON_C=y
+#prefix0#buildroot/#
+#BR2_PACKAGE_QHARVEST=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBCGICC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBPCAP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIGHTTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINKS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LRZSZ is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MIIDL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MROUTED is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NBD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITBASE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETKITTELNET is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETPLUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NETSNMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NFS_UTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_NTP is not set
+#prefix0#buildroot/#
+#BR2_PACKAGE_NTPCLIENT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENNTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSH is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_OPENSSL=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSSL_TARGET_HEADERS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENVPN is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_OPENSWAN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_PORTMAP=y
+#prefix0#buildroot/#
+BR2_PACKAGE_PHP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_PPPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PROFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RSYNC is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBIF is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QWEBCGIIF is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QWEBPHPIF=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SAMBA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SOCAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_STUNNEL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TCPDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TFTPD is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TN5250 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_TTCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_VTUN is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WIRELESS_TOOLS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_Q_UTILS=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_CALL_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_CALL_QCSAPI_RPC_SERVER=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_PCIE_CLIENT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_QCSAPI_RPC_RAW_SOCKET_CLIENT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI_RPC_SERVER=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RMT_QCSAPI_SERVER is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_QCSAPI_MONITOR_RFENABLE=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_WLANCONFIG is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_WPASUPPLICANT=y
+#prefix0#buildroot/#
+BR2_PACKAGE_ZHOSTAPD=y
+#prefix0#buildroot/#
+BR2_PACKAGE_QEVENTD=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_SYSSTAT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MINIHTTPD=y
+#prefix0#buildroot/#
+BR2_BLOCKDEV_SUPPORT=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_DBUS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_DMRAID is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_E2FSPROGS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_HWDATA is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_IOSTAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBRAW1394 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LIBUSB is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_LVM2 is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MDADM is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MEMTESTER is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MKDOSFS is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD=y
+
+#
+# MTD package selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SNAPSHOT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_ORIG_STRING="mtd_20050122.orig.tar.gz"
+
+#
+# MTD tools selection
+#
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASE=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_ERASEALL=y
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_FLASH_INFO=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_LOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASH_UNLOCK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FLASHCP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_ERASE is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_JFFS2DUMP=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_JFFS3DUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_SUMTOOL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_CHECK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_FTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTL_FORMAT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NFTLDUMP is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_MTD_MKFSJFFS2=y
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MKFSJFFS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDDUMP is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_NANDWRITE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_MTD_DEBUG is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOCFDISK is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_MTD_DOC_LOADBIOS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_PCIUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_RAIDTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SETSERIAL is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_SMARTMONTOOLS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBMOUNT is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_USBUTILS is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_WIPE is not set
+#prefix0#buildroot/#
+# BR2_PACKAGE_XFSPROGS is not set
+#prefix0#buildroot/#
+# BR2_AUDIO_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_GRAPHIC_SUPPORT is not set
+#prefix0#buildroot/#
+# BR2_COMPRESSOR_SUPPORT is not set
+#prefix0#buildroot/#
+BR2_PACKAGE_ZLIB=y
+#prefix0#buildroot/#
+# BR2_SCRIPTING_SUPPORT is not set
+
+#prefix0#buildroot/#
+# BR2_MSWBSP_SUPPORT is not set
+
+#
+# Target Options
+#
+
+#
+# filesystem for target device
+#
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CRAMFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_CLOOP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_EXT2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_JFFS2 is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_SQUASHFS is not set
+#prefix0#buildroot/#
+# BR2_TARGET_ROOTFS_TAR is not set
+#prefix0#buildroot/#
+BR2_TARGET_ROOTFS_CPIO=y
+
+#
+# bootloader for target device
+#
+
+#
+# Board Support Options
+#
+#prefix0#buildroot/#
+# BR2_PACKAGE_LINUX is not set
+
+#
+# Atmel Target
+#
+
+#
+# Add Atmel Target here
+#
+#prefix0#buildroot/#
+# BR2_TARGET_UMS88K is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY=y
+
+#
+# Ruby filesystem configuration
+#
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_IPC_SUBNET="192.168.101"
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_NONE is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC1_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC1_ETH_IP_DHCP=y
+#prefix0#buildroot/#
+BR2_TARGET_RUBY_SOC2_ETH_IP_NONE=y
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_STATIC is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_SOC2_ETH_IP_DHCP is not set
+#prefix0#buildroot/#
+# BR2_TARGET_RUBY_STATELESS is not set
+
+#
+# Generic System Support
+#
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_ACCESS_POINT is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_FIREWALL is not set
+#prefix0#buildroot/#
+# BR2_TARGET_GENERIC_DEV_SYSTEM is not set
+
+#
+# Busybox configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NITPICK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DESKTOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SHOW_USAGE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VERBOSE_USAGE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_COMPRESS_USAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALLER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOCALE_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT_LONG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DEVPTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PIDFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SUID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUID_CONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SELINUX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STATIC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOMMU is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BUILD_LIBBUSYBOX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LFS=y
+
+#
+# Debugging Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WERROR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NO_DEBUG_LIB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DMALLOC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EFENCE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INCLUDE_SUSv2=y
+
+#
+# Installation Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_NO_USR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_INSTALL_APPLET_DONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PASSWORD_MINLEN=6
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5_SIZE_VS_SPEED=2
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FAST_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_VI is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_HISTORY=15
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAB_COMPLETION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_COPYBUF_KB=4
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MONOTONIC_SYSCALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IOCTL_HEX2STR_ERROR=y
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_AR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BUNZIP2=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BZIP2 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DPKG_DEB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GUNZIP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GZIP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM2CPIO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RPM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_CREATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_GZIP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_BZIP2=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_AUTODETECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_FROM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNCOMPRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNLZMA is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNZIP=y
+
+#
+# Common options for cpio and tar
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+
+#
+# Coreutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_BASENAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CAL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CATV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHGRP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHOWN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CKSUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_COMM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DATE_ISOFMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DF_INODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DIRNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DOS2UNIX=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNIX2DOS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DU=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ENV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_EXPR_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FALSE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FOLD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEAD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_HEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ID=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSTALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LENGTH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FILETYPES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_RECURSIVE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_SORTFILES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_USERNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_COLOR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MD5SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFIFO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKNOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NOHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_OD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PRINTF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PWD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_READLINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_READLINK_FOLLOW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_REALPATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMDIR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SEQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SHA1SUM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FANCY_SLEEP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SORT_BIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SPLIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_STAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_STTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYNC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TAC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_TAIL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TEST_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TOUCH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TRUE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UNEXPAND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UNIQ=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_USLEEP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UUDECODE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UUENCODE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WC_LARGE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WHO is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WHOAMI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HUMAN_READABLE=y
+
+#
+# Common options for md5sum, sha1sum
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CHVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CLEAR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DEALLOCVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DUMPKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KBD_MODE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADFONT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOADKMAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_OPENVT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RESET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RESIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETCONSOLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETKEYCODES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETLOGCONS is not set
+
+#
+# Debian Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MKTEMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PIPE_PROGRESS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RUN_PARTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_START_STOP_DAEMON=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_AWK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AWK_MATH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_CMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DIFF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PATCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_MAX_LEN=4096
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_8BIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_COLON=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_YANKMARK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_SEARCH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_USE_SIGNALS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_DOT_CMD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_READONLY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_SETOPTS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_SET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_WIN_RESIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FIND=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_PRINT0=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_MTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_MMIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_PERM=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_TYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_XDEV=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_MAXDEPTH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_NEWER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_INUM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_EXEC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_USER=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_GROUP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_NOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_DEPTH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_PAREN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_SIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_PRUNE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FIND_DELETE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_PATH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FIND_REGEX=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GREP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_GREP_CONTEXT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_XARGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INIT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEBUG_INIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_INITTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_REMOVED=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_KILL_DELAY=0
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INIT_SCTTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INIT_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_EXTRA_QUIET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INIT_COREDUMPS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INITRD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HALT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SHADOWPASSWDS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_USE_BB_PWD_GRP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELGROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_CHECK_NAMES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADDUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DELUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WTMP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PAM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOGIN_SCRIPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_NOLOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SECURETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRYPTPW is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPASSWD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SU=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SU_SYSLOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SU_CHECKS_SHELLS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SULOGIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VLOCK=y
+
+#
+# Linux Ext2 FS Progs
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHATTR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LSATTR is not set
+
+#
+# Linux Module Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RMMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LSMOD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MODPROBE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
+
+#
+# Options common to multiple modutils
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_2_4_MODULES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_2_6_MODULES=y
+
+#
+# Linux System Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DMESG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_DMESG_PRETTY=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FBSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFLUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDFORMAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_WRITABLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_AIX_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SGI_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SUN_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_OSF_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FINDFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FREERAMDISK is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FSCK_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKFS_MINIX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_GETOPT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HEXDUMP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HWCLOCK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCRM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LOSETUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MDEV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MKSWAP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MORE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_USE_TERMIOS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VOLUMEID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_NFS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FLAGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_FSTAB=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIVOT_ROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_RDATE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READPROFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RTCWAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETARCH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SWAPONOFF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SWITCH_ROOT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UMOUNT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_MOUNT_LOOP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ADJTIMEX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BBCONFIG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHAT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHRT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CROND is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CRONTAB is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_DC=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DEVFSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_DEVFS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_EJECT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LAST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LESS_MAXLINES=9999999
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_BRACKETS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_LESS_MARKS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_LESS_REGEXP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HDPARM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MAKEDEVS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MICROCOM is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MOUNTPOINT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_MT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RAIDAUTORUN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_READAHEAD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNLEVEL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RX is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_STRINGS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETSID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TASKSET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TTYSIZE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IPV6=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ARP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BRCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DNSD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ETHER_WAKE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FAKEIDENTD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPGET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FTPPUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HOSTNAME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_HTTPD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_CGI=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFCONFIG_HW=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IFENSLAVE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_INETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_INETD_RPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_IP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ADDRESS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_LINK=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_TUNNEL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_IP_RULE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_IPCALC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NAMEIF is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NETSTAT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_NSLOOKUP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PING6 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_FANCY_PING=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PSCAN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ROUTE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SENDMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FETCHMAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SLATTACH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_TELNET_TTYPE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TELNETD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_TELNETD_STANDALONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_TFTP=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TFTPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TRACEROUTE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_APP_UDHCPC is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCPC_ARPING is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_PORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_RFC3397 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_DHCPC_DEFAULT_SCRIPT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_VCONFIG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_WGET=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_STATUSBAR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ZCIP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TCPSVD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_UDPSVD is not set
+
+#
+# Process Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FREE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FUSER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KILLALL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_KILLALL5 is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_NMETER is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PGREP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PIDOF=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_PKILL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_PS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_PS_WIDE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RENICE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_BB_SYSCTL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_TOP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_UPTIME=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_WATCH is not set
+
+#
+# Shells
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_SH_IS_ASH=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_MSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_IS_NONE is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_JOB_CONTROL=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_NCHARS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_READ_TIMEOUT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_ALIAS=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_MATH_SUPPORT_64=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_GETOPTS is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_ECHO=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_BUILTIN_TEST=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_CMDCMD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_MAIL is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_ASH_EXPAND_PRMT=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_HUSH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LASH is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CTTYHACK is not set
+
+#
+# System Logging Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_SYSLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_FEATURE_REMOTE_LOG=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_FEATURE_IPC_SYSLOG is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_KLOGD=y
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+CONFIG_LOGGER=y
+
+#
+# Runit Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_RUNSVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SV is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SVLOGD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_CHPST is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SETUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVUIDGID is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_ENVDIR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_SOFTLIMIT is not set
+
+#
+# Print Utilities
+#
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPD is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPR is not set
+#prefix7#buildroot/package/busybox/busybox-1.10.3/#
+# CONFIG_LPQ is not set
diff --git a/quantenna/host/Makefile b/quantenna/host/Makefile
new file mode 100644
index 0000000..3eb0bee
--- /dev/null
+++ b/quantenna/host/Makefile
@@ -0,0 +1,56 @@
+#
+# (C) Copyright 2007 Quantenna Communications Inc.
+#
+
+modules := utilities
+modules_clean := $(patsubst %, %_clean, $(modules)) umsdl_clean qcsapi-client_clean pktlogger
+modules_distclean := $(patsubst %, %_distclean, $(modules)) umsdl_distclean qcsapi-client_distclean
+
+.PHONY: umsdl stat_parser struct-extract qcsapi-client qevt-client qregcheck \
+$(modules) $(modules_clean) $(modules_distclean)
+
+POST_ANALYSIS=pktlogger/post_analysis_tools.tar
+
+all: umsdl stat_parser struct-extract qcsapi-client qevt-client $(modules)
+
+clean: $(modules_clean)
+
+distclean: $(modules_distclean)
+
+umsdl:
+	make -C umsdl BUILD_TARBALL=y
+
+qcsapi-client:
+	make -C qcsapi-client clean zips
+
+qregcheck:
+	make -C qregcheck all
+
+qevt-client:
+	make -C qevt-client
+
+ifneq ($(modules),)
+$(modules):
+	make -C $@
+endif
+
+$(modules_clean):
+	make -C $(patsubst %_clean, %, $@) clean
+
+$(modules_distclean):
+	make -C $(patsubst %_distclean, %, $@) distclean
+
+stat_parser: ${POST_ANALYSIS}
+	make -C pktlogger all
+
+struct-extract:
+	if [ -d struct-extract ] ; then make -C struct-extract clean se_prepro nodeps ; fi
+
+ll_trace:
+	if [ -d ll_trace ] ; then
+		echo "LL trace"
+	fi
+
+${POST_ANALYSIS}: struct-extract
+	if [ -d struct-extract -a -d ${@D} ] ; then tar cfv $@ struct-extract/ ; fi
+
diff --git a/quantenna/host/board_utils/QTN_board_customer.txt b/quantenna/host/board_utils/QTN_board_customer.txt
new file mode 100644
index 0000000..0b38af3
--- /dev/null
+++ b/quantenna/host/board_utils/QTN_board_customer.txt
@@ -0,0 +1,70 @@
+//swdepot/bbic3/rel/rel_37_4_0_59/host/board_utils/QTN_board_customer_QHS840_5s1.txt#1 - branch change 42828 (text)
+//.txt for customer board provisioning and configurations
+//filename: board_customer.txt
+------------------ // every entry should start with this string
+0 //start, this id number needs to conform what is defined in qtn_hw_board_db.bin
+012345678 0
+------------------
+1  //bc_board_id:length
+BOARD_ID 2,65535,
+------------------
+2  //bc_name
+QHS840_5S1 0
+------------------
+3  //bc_ddr_type, 1 byte each
+DDR3_16_WINBOND 1,7
+------------------
+4  //bc_ddr_speed
+DDR3_500MHz 2,500
+------------------
+5  //bc_ddr_size
+DDR_128MB 4,134217728
+------------------
+6  //bc_emac0
+EMAC_RTL8363SB_RGMII_BONDED 4,1835027
+------------------
+7  //bc_emac1
+EMAC_RTL8363SB_RGMII_BONDED 4,1835027
+------------------
+8  //bc_phy0_addr
+EMAC_PHY_ADDR_SCAN 1,32
+------------------
+9  //bc_phy1_addr
+EMAC_PHY_ADDR_SCAN 1,32
+------------------
+10  //bc_spi1_enable
+SPI1_NOT_IN_USE 1,0
+------------------
+11  //bc_wifi_hw
+QTN_TPZ_SE5003L1 1,5
+------------------
+12 //bc_uart1
+UART1_NOT_IN_USE 1,0
+------------------
+13  //bc_pcie1
+PCIE_NOT_IN_USE 1,0
+------------------
+14 //bc_rgmii_timing
+RGMII_NODELAY 4,522133279
+------------------
+15  //bc_ln_gain
+LNA_gain_12dB 1,12
+------------------
+16 //bc_tx_antenna
+TX_ANTENNA_NUM_4 1,4
+------------------
+17 // bc_flash_cfg
+FLASH_SIZE_JEDEC 1,0
+------------------
+18 //antenna gain
+TX_ANTENNA_GAIN_1_1dB 2,4506 //unsigned short, 16.12 (4506 means 1.1)
+-------------------
+19  //bc_lna_bypass_gain, signed char
+LNA_gain_BYPASS_N5dB 4, -5
+-------------------
+20 //bc_rfic
+RFIC_V4_IN_USE 1,4
+-------------------
+21 //bc_tx_power_cal
+CALSTATE_VPD_LOG 1,0
+****************** //this string is necessory to indicate the end of .txt
diff --git a/quantenna/host/board_utils/QTN_board_database.txt b/quantenna/host/board_utils/QTN_board_database.txt
new file mode 100644
index 0000000..7db31b3
--- /dev/null
+++ b/quantenna/host/board_utils/QTN_board_database.txt
@@ -0,0 +1,211 @@
+// TLV for board provisioning and configurations
+// Automatically generated by './board_hw_db_txt_gen', DO NOT EDIT
+==================
+22	// total number of TLVs
+------------------
+0	// bc_start
+1
+012345678 1,0,
+------------------
+1	// bc_board_id
+1
+UNIVERSAL_ID 2,65535,
+------------------
+2	// bc_name
+1
+hw_QTN_test 1,0,
+------------------
+3	// bc_ddr_type
+10
+DDR_16_ETRON 1,2,
+DDR_32_MICRON 1,0,
+DDR_16_MICRON 1,1,
+DDR_32_ETRON 1,4,
+DDR_32_SAMSUNG 1,5,
+DDR_16_SAMSUNG 1,3,
+DDR_16_HYNIX 1,6,
+DDR3_16_WINBOND 1,7,
+DDR3_32_WINBOND 1,8,
+DEFAULT_DDR_CFG 1,1,
+------------------
+4	// bc_ddr_speed
+10
+DDR_160 1,160,
+DDR_250 1,250,
+DDR_320 2,320,
+DDR_400 2,400,
+DDR3_320MHz 2,320,
+DDR3_400MHz 2,400,
+DDR3_500MHz 2,500,
+DDR3_640MHz 2,640,
+DDR3_800MHz 2,800,
+DEFAULT_DDR_SPEED 1,160,
+------------------
+5	// bc_ddr_size
+6
+DDR_32MB 4,33554432,
+DDR_64MB 4,67108864,
+DDR_128MB 4,134217728,
+DDR_256MB 4,268435456,
+DDR_AUTO 1,0,
+DEFAULT_DDR_SIZE 4,67108864,
+------------------
+6	// bc_emac0
+20
+EMAC_IN_USE 1,1,
+EMAC_RGMII_AN 1,1,
+EMAC_NOT_IN_USE 1,0,
+EMAC_MII_AN 1,129,
+EMAC_MII_100M 1,139,
+EMAC_MII_100M_PHY 1,137,
+EMAC_AR8327_RGMII 2,531,
+EMAC_RTL8363S_RGMII 1,19,
+EMAC_RTL8363SB_RGMII_P0 4,262163,
+EMAC_RTL8363SB_RGMII_P1 4,524307,
+EMAC_RTL8363SB_RGMII_BONDED 4,1835027,
+EMAC_RTL8211E_RGMII 1,19,
+EMAC_88E6071_MII 2,12427,
+EMAC_B2B_RGMII 1,11,
+EMAC_B2B_RGMII_100M 1,11,
+EMAC_B2B_RGMII_1000M 1,19,
+EMAC_AR8236_MII 2,395,
+EMAC_MII_GPIO1_RST 2,1153,
+EMAC_MII_100M_GPIO13_RST 2,2185,
+DEFAULT_EMAC 1,0,
+------------------
+7	// bc_emac1
+20
+EMAC_IN_USE 1,1,
+EMAC_RGMII_AN 1,1,
+EMAC_NOT_IN_USE 1,0,
+EMAC_MII_AN 1,129,
+EMAC_MII_100M 1,139,
+EMAC_MII_100M_PHY 1,137,
+EMAC_AR8327_RGMII 2,531,
+EMAC_RTL8363S_RGMII 1,19,
+EMAC_RTL8363SB_RGMII_P0 4,262163,
+EMAC_RTL8363SB_RGMII_P1 4,524307,
+EMAC_RTL8363SB_RGMII_BONDED 4,1835027,
+EMAC_RTL8211E_RGMII 1,19,
+EMAC_88E6071_MII 2,12427,
+EMAC_B2B_RGMII 1,11,
+EMAC_B2B_RGMII_100M 1,11,
+EMAC_B2B_RGMII_1000M 1,19,
+EMAC_AR8236_MII 2,395,
+EMAC_MII_GPIO1_RST 2,1153,
+EMAC_MII_100M_GPIO13_RST 2,2185,
+DEFAULT_EMAC 1,0,
+------------------
+8	// bc_phy0_addr
+6
+24 1,24,
+31 1,31,
+EMAC_PHY_ADDR_SCAN 1,32,
+EMAC_PHY0_ADDR 1,1,
+EMAC_PHY1_ADDR 1,3,
+DEFAULT_PHY_ADDR 1,32,
+------------------
+9	// bc_phy1_addr
+6
+24 1,24,
+31 1,31,
+EMAC_PHY_ADDR_SCAN 1,32,
+EMAC_PHY0_ADDR 1,1,
+EMAC_PHY1_ADDR 1,3,
+DEFAULT_PHY_ADDR 1,32,
+------------------
+10	// bc_spi1
+2
+SPI1_IN_USE 1,1,
+SPI1_NOT_IN_USE 1,0,
+------------------
+11	// bc_wifi_hw
+19
+QTN_RUBY_BRINGUP_RWPA 1,0,
+QTN_RUBY_REF_RWPA 1,1,
+QTN_RUBY_SIGE 1,2,
+QTN_RUBY_WIFI_NONE 1,4,
+QTN_TPZ_SE5003L1 1,5,
+QTN_TPZ_SE5003L1_INV 1,6,
+QTN_TPZ_SKY85703 1,7,
+QTN_TPZ_DBS 1,9,
+QTN_TPZ_SKY85405_BPF840 1,8,
+QTN_TPZ_DBS 1,9,
+QTN_TPZ_SE5502L 1,10,
+QTN_TPZ_SKY85710_NG 1,11,
+QTN_TPZ_DBS_5591 1,13,
+QTN_TPZ_DBS_5591 1,13,
+QTN_TPZ_DBS_NXP_BGU7224_BGU7258 1,14,
+QTN_TPZ_2_4GHZ_NXP_BGU7224 1,15,
+QTN_TPZ_5GHZ_NXP_BGU7258 1,16,
+QTN_TPZ_5GHZ_SKY85728 1,17,
+DEFAULT_WIFI_HW 1,1,
+------------------
+12	// bc_uart1
+3
+UART1_NOT_IN_USE 1,0,
+UART1_IN_USE 1,1,
+DEFAULT_UART1 1,0,
+------------------
+13	// bc_pcie
+3
+PCIE_NOT_IN_USE 1,0,
+PCIE_ENDPOINT 1,3,
+PCIE_ROOTCOMPLEX 1,7,
+------------------
+14	// bc_rgmii_timing
+7
+RGMII_DEFAULT_S2p7ns_H1p1ns 4,-1886417009,
+RGMII_S2p4ns_H1p4ns 4,-1886548081,
+RGMII_S1p8ns_H1p9ns 4,-1886839009,
+RGMII_P1RX00TX0E 4,244195103,
+RGMII_710F 4,522133279,
+RGMII_NODELAY 4,522133279,
+DEFAULT_RGMII_TIMING 4,-1886417009,
+------------------
+15	// bc_ext_lna_gain
+2
+LNA_gain_12dB 1,12,
+DEFAULT_EXT_LNA_GAIN 1,12,
+------------------
+16	// bc_tx_antenna_num
+5
+TX_ANTENNA_NUM_1 1,1,
+TX_ANTENNA_NUM_2 1,2,
+TX_ANTENNA_NUM_3 1,3,
+TX_ANTENNA_NUM_4 1,4,
+DEFAULT_TX_ANTENNA_NUM 1,4,
+------------------
+17	// bc_flash_cfg
+7
+FLASH_SIZE_JEDEC 1,0,
+FLASH_32MB 4,33554432,
+FLASH_16MB 4,16777216,
+FLASH_8MB 4,8388608,
+FLASH_4MB 4,4194304,
+FLASH_2MB 4,2097152,
+DEFAULT_FLASH_SIZE 4,8388608,
+------------------
+18	// bc_tx_antenna_gain
+2
+TX_ANTENNA_GAIN_1_1dB 2,4506,
+DEFAULT_TX_ANTENNA_GAIN 2,4506,
+------------------
+19	// bc_ext_lna_bypass_gain
+2
+LNA_gain_BYPASS_N5dB 4,-5,
+DEFAULT_EXT_LNA_BYPASS_GAIN 4,-5,
+------------------
+20	// bc_rfic
+4
+RFIC_NOT_IN_USE 1,0,
+RFIC_V4_IN_USE 1,4,
+RFIC_V6_IN_USE 1,6,
+DEFAULT_RFIC 1,4,
+------------------
+21	// bc_tx_power_cal
+3
+CALSTATE_VPD_LOG 1,0,
+CALSTATE_VPD_LINEAR 1,1,
+DEFAULT_CALSTATE_VPD 1,0,
+*******************
diff --git a/quantenna/host/board_utils/board_hw_bin_customer b/quantenna/host/board_utils/board_hw_bin_customer
new file mode 100755
index 0000000..4c44bf4
--- /dev/null
+++ b/quantenna/host/board_utils/board_hw_bin_customer
Binary files differ
diff --git a/quantenna/host/board_utils/qtn_hw_board_db.bin b/quantenna/host/board_utils/qtn_hw_board_db.bin
new file mode 100644
index 0000000..e7e0101
--- /dev/null
+++ b/quantenna/host/board_utils/qtn_hw_board_db.bin
Binary files differ
diff --git a/quantenna/host/qcsapi-client/Makefile b/quantenna/host/qcsapi-client/Makefile
new file mode 100644
index 0000000..f2b7a97
--- /dev/null
+++ b/quantenna/host/qcsapi-client/Makefile
@@ -0,0 +1,28 @@
+
+.PHONY: all clean distclean zips
+
+QCSAPI_DIR = ../../buildroot/package/qcsapi/qcsapi-1.0.1/
+
+CALL_QCSAPI_SRCZIP = call_qcsapi_client_src.zip
+QCSAPI_CLIENT_SRCZIP = libqcsapi_client_src.zip
+
+ZIPS = $(CALL_QCSAPI_SRCZIP) $(QCSAPI_CLIENT_SRCZIP)
+DIRS = $(ZIPS:%.zip=%)
+
+all: $(ZIPS) $(DIRS)
+
+zips: $(ZIPS)
+
+%.zip:
+	make -C $(QCSAPI_DIR) ${@F}
+	cat $(QCSAPI_DIR)/${@F} > $@
+
+%: %.zip
+	rm -rf $@
+	mkdir $@
+	cd $@ && unzip ../$< && make
+
+clean:
+	rm -rf $(DIRS) $(ZIPS)
+
+distclean: clean
diff --git a/quantenna/host/qevt-client/Makefile b/quantenna/host/qevt-client/Makefile
new file mode 100644
index 0000000..c8d2518
--- /dev/null
+++ b/quantenna/host/qevt-client/Makefile
@@ -0,0 +1,11 @@
+PROG=qevt_client
+
+all: $(PROG)
+
+$(PROG): $(PROG).c
+	gcc $(PROG).c -Wall -Werror -o $(PROG)
+clean:
+	rm -f *.o $(PROG)
+
+distclean: clean
+
diff --git a/quantenna/host/qevt-client/qevt_client.c b/quantenna/host/qevt-client/qevt_client.c
new file mode 100644
index 0000000..2de8b96
--- /dev/null
+++ b/quantenna/host/qevt-client/qevt_client.c
@@ -0,0 +1,508 @@
+/**
+ * Copyright (c) 2014 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ **/
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <netinet/in.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <arpa/inet.h>
+
+#define QEVT_DEFAULT_PORT	3490
+#define QEVT_RX_BUF_SIZE	1024
+#define QEVT_CON_RETRY_DELAY	5U
+#define QEVT_MAX_LOG_SIZE	256
+#define QEVT_ID_LEN		4
+#define ENABLE_CONFIG_CMD	1
+#define ENABLE_CONFIG_EVENT_ID	2
+
+#define MAX_VERSION_LEN 5
+#define QEVT_CLIENT_VERSION "v1.10"
+#define QEVT_CONFIG "QEVT_CONFIG"
+#define QEVT_CONFIG_RESET QEVT_CONFIG"_RESET"
+#define QEVT_VERSION "QEVT_VERSION"
+#define QEVT_DEFAULT_CONFIG "WPACTRL3:-"
+#define QEVT_CONFIG_EVENT_ID "QEVT_CONFIG_EVENT_ID"
+#define QEVT_DEFAULT_CONFIG_EVENT_ID "default:+"
+
+char fpath[32] = "/tmp";
+const char * logname = "qtn5g.log";
+
+char fpath1[32] = "/tmp";
+const char * log1name = "qtn5g.log.1";
+
+int log_size = 5 * 1024;
+char * log_buf = NULL;
+
+struct qevt_client_config {
+	struct sockaddr_in	dest;
+	struct in_addr		ip_addr;
+	int			client_socket;
+	uint16_t		port;
+	int			fd;
+	char			rxbuffer[QEVT_RX_BUF_SIZE + 1];
+	char			*qevt_config_cmd;
+};
+
+static int qevt_write_log(int * fd, void * buf, int len)
+{
+	off_t file_off;
+	int bak_fd, log_bytes;
+	int log_fd = *fd;
+
+	if (log_fd > 0)
+		close(log_fd);
+
+	log_fd = open(fpath, O_RDWR | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR | S_IRGRP);
+
+	if (log_fd < 0) {
+		perror("fail to open qtn5g.log\n");
+		return log_fd;
+	}
+
+	file_off = lseek(log_fd, 0, SEEK_END);
+
+	if ((int)file_off + len > log_size) {
+		file_off = lseek(log_fd, 0, SEEK_SET);
+
+		log_bytes = read(log_fd, log_buf, log_size);
+		if (log_bytes < 0 ) {
+			perror("read error in qtn5g.log\n");
+			return log_bytes;
+		}
+		close(log_fd);
+		*fd = 0;
+
+		bak_fd = open(fpath1, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP);
+		if (bak_fd >= 0) {
+			if (log_bytes != write(bak_fd, log_buf, log_bytes)) {
+				perror ("fail to write qtn5g.log.1\n");
+			}
+			close (bak_fd);
+		} else
+			perror("fail to open qtn5g.log.1\n");
+
+		log_fd = open(fpath, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP);
+
+		if (log_fd < 0) {
+			perror("fail to open qtn5g.log after change log\n");
+			return log_fd;
+		}
+
+		*fd = log_fd;
+	}
+
+	log_bytes = write(log_fd, buf, len);
+
+	return log_bytes;
+
+}
+
+static int qevt_send_host(struct qevt_client_config *const cfg, const char *msg)
+{
+	int sent_bytes = 0;
+	int ret;
+
+	do {
+		ret = send(cfg->client_socket, msg + sent_bytes, strlen(msg) - sent_bytes, 0);
+
+		if (ret > 0) {
+			sent_bytes += ret;
+		} else if (errno == EINTR) {
+			continue;
+		} else {
+			break;
+		}
+	} while (sent_bytes < strlen(msg));
+
+	if (ret <= 0) {
+		fprintf(stderr, "%s: failure sending a message to event server\n", __func__);
+	}
+	return (ret > 0);
+}
+
+static int qevt_receive(struct qevt_client_config *const cfg)
+{
+	int received_bytes;
+
+	do {
+		received_bytes = recv(cfg->client_socket, cfg->rxbuffer, sizeof(cfg->rxbuffer) - 1, 0);
+
+		if (received_bytes > 0) {
+			cfg->rxbuffer[received_bytes] = '\0';
+		} else if (received_bytes == 0) {
+			printf("Connection closed\n");
+			break;
+		} else if (errno != EINTR && errno != ECONNREFUSED) {
+			perror("Receive failed");
+			break;
+		}
+	} while ((received_bytes < 0) && (errno == EINTR));
+
+	return received_bytes;
+}
+
+static char * qevt_config_cmd(struct qevt_client_config *const cfg, const int config_type)
+{
+	char *msg;
+	char *nl;
+
+	/* first, clear to initial settings */
+	if (!qevt_send_host(cfg, QEVT_CONFIG_RESET"\n")) {
+		return NULL;
+	}
+	if (qevt_receive(cfg) <= 0) {
+		return NULL;
+	}
+
+	/* then send config command */
+	if (!qevt_send_host(cfg, cfg->qevt_config_cmd)) {
+		return NULL;
+	}
+	if (qevt_receive(cfg) <= 0) {
+		return NULL;
+	}
+
+	msg = strstr(cfg->rxbuffer, (config_type != ENABLE_CONFIG_CMD) ?
+			QEVT_CONFIG_EVENT_ID" " : QEVT_CONFIG" ");
+	if (msg) {
+		msg = strstr(msg, " ");
+	}
+	if (msg && (nl = strstr(++msg, "\n"))) {
+		*nl = 0;
+	}
+
+	return msg;
+}
+
+static int qevt_check_version(struct qevt_client_config *const cfg, char** report, const int config_type)
+{
+	char *version;
+	char *nl;
+	const char *cmd = QEVT_VERSION" "QEVT_CLIENT_VERSION;
+
+	if (report) {
+		*report = "UNKNOWN";
+	}
+
+	if (!qevt_send_host(cfg, cmd) || (qevt_receive(cfg) < 0)) {
+		return 0;
+	}
+
+	version = strstr(cfg->rxbuffer, QEVT_VERSION);
+	if (!version) {
+		return 0;
+	}
+
+	version += sizeof(QEVT_VERSION) - 1;
+	version = strstr(version, "v");
+	if (!version) {
+		return 0;
+	}
+
+	nl = strstr(version, "\n");
+	if (nl) {
+		*nl = 0;
+	}
+
+	if (report) {
+		*report = version;
+	}
+
+	if ((strcmp(version, QEVT_CLIENT_VERSION) < 0) &&
+			config_type == ENABLE_CONFIG_EVENT_ID) {
+		printf("qevt_server[version %s] does not support -e option\n", version);
+		return 0;
+	}
+
+	return (strcmp(QEVT_CLIENT_VERSION, version) >= 0);
+}
+
+static void qevt_receiving_loop(struct qevt_client_config *const cfg)
+{
+	int received_bytes;
+	char *buffer = cfg->rxbuffer;
+
+	for (;;) {
+		received_bytes = qevt_receive(cfg);
+
+		if (received_bytes <= 0) {
+			break;
+		}
+		if (received_bytes != qevt_write_log(&(cfg->fd), (void *)buffer, received_bytes)) {
+			fprintf(stderr, "write log fail\n");
+		}
+		printf("%s", buffer);
+	}
+}
+
+static int qevt_client_init(struct qevt_client_config *const cfg)
+{
+	if (cfg->client_socket >= 0)
+		close(cfg->client_socket);
+
+	cfg->client_socket = socket(AF_INET, SOCK_STREAM, 0);
+	if (cfg->client_socket < 0) {
+		perror("Failed to create client socket");
+		return -1;
+	}
+
+	memset(&cfg->dest, 0, sizeof(cfg->dest));
+	cfg->dest.sin_family = AF_INET;
+	cfg->dest.sin_port = htons(cfg->port);
+	cfg->dest.sin_addr = cfg->ip_addr;
+	return 0;
+}
+
+static int qevt_connected_to_server(const struct qevt_client_config *const cfg)
+{
+	fd_set fdset;
+	struct timeval timeout = {.tv_sec = QEVT_CON_RETRY_DELAY, .tv_usec = 0};
+	int connected = 0;
+
+	FD_ZERO(&fdset);
+	FD_SET(cfg->client_socket, &fdset);
+
+	if (select(cfg->client_socket + 1, NULL, &fdset, NULL, &timeout) == 1) {
+		int so_error;
+		socklen_t so_len = sizeof(so_error);
+
+		getsockopt(cfg->client_socket, SOL_SOCKET, SO_ERROR, &so_error, &so_len);
+		if (!so_error) {
+			connected = 1;
+		}
+	}
+
+	return connected;
+}
+
+static void qevt_client_connect(struct qevt_client_config *const cfg)
+{
+	int ret;
+	int connected = 0;
+
+	while (!connected) {
+		fcntl(cfg->client_socket, F_SETFL, O_NONBLOCK);
+		ret = connect(cfg->client_socket, (struct sockaddr *)&cfg->dest,
+				sizeof(struct sockaddr));
+
+		if (ret < 0) {
+			switch (errno) {
+			case EINPROGRESS:
+				connected = qevt_connected_to_server(cfg);
+				if (connected)
+					break;
+				if (qevt_client_init(cfg) < 0) {
+					fprintf(stderr, "fail to create client\n");
+				}
+				/* Fall through */
+			case ECONNREFUSED:
+			case ETIMEDOUT:
+				fprintf(stderr,
+					"Cannot connect to the server. Trying again in %u secs.\n",
+						QEVT_CON_RETRY_DELAY);
+				sleep(QEVT_CON_RETRY_DELAY);
+				break;
+			case EINTR:
+				break;
+			default:
+				perror("Cannot connect");
+			}
+		}
+	}
+
+	fcntl(cfg->client_socket, F_SETFL, fcntl(cfg->client_socket, F_GETFL, 0) & ~O_NONBLOCK);
+	printf("Connection established\n");
+}
+
+static void qevt_usage(char *argv[])
+{
+	printf("Usage: %s [option]\n\t-h <host ip addr>\n\t-p <host ip port>"
+	       "\n\t-d <file directory>\n\t-k <file size, unit k>\n\t-c <qevt config>\n\t"
+	       "-e <event_id:->\n\t   <default:+/-event id:-/+ ...>\n\t   "
+	       "<default:+/-[event_range_start:event_range_end]:-/+>\n\n\t"
+	       "* -c and -e are mutually exclusive\n", argv[0]);
+}
+
+int main(int argc, char *argv[])
+{
+	static struct qevt_client_config client_cfg;
+	uint8_t config_type = 0;
+	int ch;
+	int status = EXIT_FAILURE;
+	char ip_addr[] = "255.255.255.255";
+
+	memset(&client_cfg ,0 ,sizeof(struct qevt_client_config));
+	client_cfg.port = QEVT_DEFAULT_PORT;
+
+	while ((ch = getopt(argc, argv, "h:p:d:k:c::e::")) != -1) {
+		switch (ch) {
+		case 'h':
+			strncpy(ip_addr, optarg, sizeof(ip_addr));
+			ip_addr[sizeof(ip_addr) -1] = '\0';
+			if (!inet_aton(optarg, &client_cfg.ip_addr)) {
+				fprintf(stderr, "IP address specified is not valid\n");
+				goto exit;
+			}
+			break;
+		case 'p':
+			client_cfg.port = atoi(optarg);
+			break;
+		case 'd':
+			if ((int)strlen(optarg) > ((int)sizeof(fpath) - (int)strlen(log1name) - 2)) {
+				printf("Directory path length should not exceed %d\n",
+						((int)sizeof(fpath) - (int)strlen(log1name) -2));
+				goto exit;
+			}
+
+			strncpy(fpath,optarg, strlen(optarg));
+			strncpy(fpath1,optarg,strlen(optarg));
+			break;
+		case 'k':
+			if (atoi(optarg) <= QEVT_MAX_LOG_SIZE) {
+				log_size = atoi(optarg) * 1024;
+			} else {
+				fprintf(stderr, "Log size cannot be larger than %d\n",
+					QEVT_MAX_LOG_SIZE);
+				goto exit;
+			}
+			break;
+		case 'c':
+			if (config_type) {
+				printf("Option -c an -e cannot be used together\n");
+				goto exit;
+			}
+
+			config_type = ENABLE_CONFIG_CMD;
+			if (!optarg)
+				optarg = QEVT_DEFAULT_CONFIG;
+			/* calculate the space needed (include extra for space and '\n') */
+			client_cfg.qevt_config_cmd = malloc(sizeof(QEVT_CONFIG) +
+							    strlen(optarg) + 4);
+
+			if (client_cfg.qevt_config_cmd) {
+				sprintf(client_cfg.qevt_config_cmd, QEVT_CONFIG" %s\n",
+					optarg);
+			} else {
+				fprintf(stderr, "fail to malloc memory %u bytes\n",
+						(unsigned int)(sizeof(QEVT_CONFIG) +
+						strlen(optarg) + 4));
+				goto exit;
+			}
+			break;
+		case 'e':
+			if (config_type) {
+				printf("Option -c an -e cannot be used together\n");
+				goto exit;
+			}
+
+			config_type = ENABLE_CONFIG_EVENT_ID;
+			if (!optarg)
+				optarg = QEVT_DEFAULT_CONFIG_EVENT_ID;
+
+			/* calculate the space needed (include extra for space and '\n') */
+			client_cfg.qevt_config_cmd = malloc(sizeof(QEVT_CONFIG_EVENT_ID)
+							+ strlen(optarg) + 4);
+			if (client_cfg.qevt_config_cmd) {
+				sprintf(client_cfg.qevt_config_cmd,
+					QEVT_CONFIG_EVENT_ID" %s", optarg);
+			} else {
+				fprintf(stderr, "Failed to allocate memory for %u bytes\n",
+					(unsigned int)(sizeof(QEVT_CONFIG_EVENT_ID) +
+					strlen(optarg) + 4));
+				goto exit;
+			}
+			break;
+		default:
+			qevt_usage(argv);
+			goto exit;
+		}
+	}
+
+	if (!strncmp("255.255.255.255", ip_addr, strlen(ip_addr))) {
+		fprintf(stderr, "please select a valid ip address\n");
+		goto exit;
+	}
+
+	strncat(fpath, "/",1);
+	strncat(fpath,logname,strlen(logname));
+	strncat(fpath1, "/",1);
+	strncat(fpath1,log1name,strlen(log1name));
+
+	client_cfg.client_socket = -1;
+
+	if (!client_cfg.qevt_config_cmd) {
+		printf("Not enough options provided, either -c or -e option is required\n");
+		goto exit;
+	}
+
+	if (qevt_client_init(&client_cfg) < 0) {
+		goto exit;
+	}
+
+	log_buf = malloc(log_size);
+
+	if(log_buf == NULL) {
+		fprintf(stderr, "fail to malloc memory %d bytes\n", log_size);
+		goto exit;
+	}
+
+	for (;;) {
+		char *report = NULL;
+		qevt_client_connect(&client_cfg);
+
+		if (!qevt_check_version(&client_cfg, &report, config_type)) {
+			fprintf(stderr, "incompatible client version '"QEVT_CLIENT_VERSION
+				"'/server version '%s'\n", report);
+			goto exit;
+		}
+
+		if ((report = qevt_config_cmd(&client_cfg, config_type))) {
+			printf("Server configuration '%s'\n", report);
+		} else {
+			fprintf(stderr, "unable to set/get config\n");
+			goto exit;
+		}
+
+		qevt_receiving_loop(&client_cfg);
+		qevt_client_init(&client_cfg);
+	}
+	/*
+	 * This point is only reached if the above loop exits (which it should not currently).
+	 * In case clean exit is added in future, exit with success status.
+	 */
+	status = EXIT_SUCCESS;
+
+exit:
+	if (log_buf) {
+		free(log_buf);
+	}
+	if (client_cfg.qevt_config_cmd) {
+		free(client_cfg.qevt_config_cmd);
+	}
+	return status;
+}
+
diff --git a/quantenna/host/region_utils/qtn_regulatory_db.bin b/quantenna/host/region_utils/qtn_regulatory_db.bin
new file mode 100644
index 0000000..50a91f6
--- /dev/null
+++ b/quantenna/host/region_utils/qtn_regulatory_db.bin
Binary files differ
diff --git a/quantenna/host/scripts/struct_get.sh b/quantenna/host/scripts/struct_get.sh
new file mode 100755
index 0000000..5aec759
--- /dev/null
+++ b/quantenna/host/scripts/struct_get.sh
@@ -0,0 +1,39 @@
+#!/bin/sed -f
+
+# Skip anything that is not a struct
+/^struct[ \t]/!d
+/;[ \t]*$/d
+
+# Add opening brace if not present on the 'struct' line
+/{/ 				!{ s/$/ {/ }
+
+:next_struct_line
+# Remove opening brace if present in column 1
+s/^{//
+
+# Split any single lines into multiple lines
+s/; /;\n/g
+
+# Delete macros (lines starting with #)
+s/\W*\#.*//
+
+# Delete C++ style comments (starting with //)
+s/\/\/.*//
+
+# Delete C style comments (/* ... */)
+# - skip this loop unless it contains the start of a C comment (/*)
+# - if '/*' is found, join lines until the corresponding '*/'
+# - on exiting the loop, delete the joined line
+/\/\*/ 				!{ b not_in_comment }
+:in_comment
+/\*\// 				!{ N; b in_comment }
+s/\/\*.*\*\///
+:not_in_comment
+
+# Read the next line of the struct
+/}/ 				!{n; b next_struct_line}
+
+# Remove special attributes
+s/}.*__attribute__.*;/};/
+
+# Finished reading a struct - print
diff --git a/quantenna/host/umsdl/Makefile b/quantenna/host/umsdl/Makefile
new file mode 100644
index 0000000..26c5bff
--- /dev/null
+++ b/quantenna/host/umsdl/Makefile
@@ -0,0 +1,33 @@
+#
+# (C) Copyright 2007 Quantenna Communications Inc.
+#
+
+umsdlsrcfiles := umsdl.c libumsdl.c
+umsfiles := $(umsdlsrcfiles) umsdl.h ums_platform.h Makefile bin2ums.c 
+
+.PHONY: umsdl bin2ums
+
+alltargets = bin2ums umsdl
+
+ifeq ($(BUILD_TARBALL),y)
+alltargets += umsdl-tarball
+endif
+
+all: $(alltargets)
+
+umsdl: ums_platform.h
+	gcc $(umsdlsrcfiles) -Wall -o umsdl	
+
+ums_platform.h:
+	cp ../../common/ums_platform.h .
+
+umsdl-tarball: ums_platform.h
+	tar czf umsdl.tar.gz $(umsfiles)
+	
+bin2ums:
+	gcc bin2ums.c libumsdl.c -Wall -o bin2ums	
+
+clean:
+	rm -f *.o umsdl bin2ums umsdl.tar.gz ums_platform.h
+
+distclean: clean
diff --git a/quantenna/host/umsdl/bin2ums.c b/quantenna/host/umsdl/bin2ums.c
new file mode 100644
index 0000000..f26b803
--- /dev/null
+++ b/quantenna/host/umsdl/bin2ums.c
@@ -0,0 +1,84 @@
+/*
+ *  host/bin2ums.c
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2007.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * An application for converting binary data into the UMS serial download
+ * format with an appropriate load address.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "umsdl.h"
+
+static void usage(void)
+{
+	fprintf(stderr,
+		"Usage1: cat <file> | bin2ums <address> > <outfile>\n"
+		"         to encode a data file for download\n"
+		"Usage2: bin2ums -r <address> > <outfile>\n"
+		"         to generate frame to jump to an execution address\n"
+		"Usage3: bin2ums -r <address> [bwl] <data> > <outfile>\n"
+		"         generates a byte/word/long write of data to address.\n"
+		"         Words are written as two byte writes, longs are\n"
+		"         written with a single write on the target.\n");
+}
+
+int main(int argc, char *argv[])
+{
+	unsigned long addr, val;
+	int rc, len;
+
+	if (argc < 2) {
+		usage();
+		return -1;
+	} else if (argc == 2) {
+		addr = strtoul(argv[1], NULL, 0);
+	} else if (((argc == 3) || (argc == 5)) && !strcmp(argv[1], "-r")) {
+		addr = strtoul(argv[2], NULL, 0);
+		if (argc == 3) {
+			rc = ums_exec(stdout, addr);
+		} else {
+			val = strtoul(argv[4], NULL, 0);
+			if (*argv[3] == 'b') {
+				len = 1;
+			} else if (*argv[3] == 'w') {
+				len = 2;
+			} else if (*argv[3] == 'l') {
+				len = 4;
+				if (addr & 3) {
+					fprintf(stderr, "Bad address alignment\n");
+					return -1;
+				}
+			} else {
+				usage();
+				return -1;
+			}
+			rc = ums_single_write(stdout, addr, len, val);
+		}
+		return !rc;
+	} else {
+		usage();
+		return -1;
+	}
+
+	return !bin2ums(stdin, stdout, addr);
+}
diff --git a/quantenna/host/umsdl/libumsdl.c b/quantenna/host/umsdl/libumsdl.c
new file mode 100644
index 0000000..e8184c0
--- /dev/null
+++ b/quantenna/host/umsdl/libumsdl.c
@@ -0,0 +1,220 @@
+/*
+ *  host/libumsdl.c
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2007.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * This library contains the core functions for converting binary data
+ * into UMS serial download data packets.  It is used by the umsdl and
+ * bin2ums programs.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "umsdl.h"
+
+static u8 crc_table[] = {
+	0x00, 0x07, 0x0E, 0x09, 0x1C, 0x1B, 0x12, 0x15,
+	0x38, 0x3F, 0x36, 0x31, 0x24, 0x23, 0x2A, 0x2D,
+	0x70, 0x77, 0x7E, 0x79, 0x6C, 0x6B, 0x62, 0x65,
+	0x48, 0x4F, 0x46, 0x41, 0x54, 0x53, 0x5A, 0x5D,
+	0xE0, 0xE7, 0xEE, 0xE9, 0xFC, 0xFB, 0xF2, 0xF5,
+	0xD8, 0xDF, 0xD6, 0xD1, 0xC4, 0xC3, 0xCA, 0xCD,
+	0x90, 0x97, 0x9E, 0x99, 0x8C, 0x8B, 0x82, 0x85,
+	0xA8, 0xAF, 0xA6, 0xA1, 0xB4, 0xB3, 0xBA, 0xBD,
+	0xC7, 0xC0, 0xC9, 0xCE, 0xDB, 0xDC, 0xD5, 0xD2,
+	0xFF, 0xF8, 0xF1, 0xF6, 0xE3, 0xE4, 0xED, 0xEA,
+	0xB7, 0xB0, 0xB9, 0xBE, 0xAB, 0xAC, 0xA5, 0xA2,
+	0x8F, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9D, 0x9A,
+	0x27, 0x20, 0x29, 0x2E, 0x3B, 0x3C, 0x35, 0x32,
+	0x1F, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0D, 0x0A,
+	0x57, 0x50, 0x59, 0x5E, 0x4B, 0x4C, 0x45, 0x42,
+	0x6F, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7D, 0x7A,
+	0x89, 0x8E, 0x87, 0x80, 0x95, 0x92, 0x9B, 0x9C,
+	0xB1, 0xB6, 0xBF, 0xB8, 0xAD, 0xAA, 0xA3, 0xA4,
+	0xF9, 0xFE, 0xF7, 0xF0, 0xE5, 0xE2, 0xEB, 0xEC,
+	0xC1, 0xC6, 0xCF, 0xC8, 0xDD, 0xDA, 0xD3, 0xD4,
+	0x69, 0x6E, 0x67, 0x60, 0x75, 0x72, 0x7B, 0x7C,
+	0x51, 0x56, 0x5F, 0x58, 0x4D, 0x4A, 0x43, 0x44,
+	0x19, 0x1E, 0x17, 0x10, 0x05, 0x02, 0x0B, 0x0C,
+	0x21, 0x26, 0x2F, 0x28, 0x3D, 0x3A, 0x33, 0x34,
+	0x4E, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5C, 0x5B,
+	0x76, 0x71, 0x78, 0x7F, 0x6A, 0x6D, 0x64, 0x63,
+	0x3E, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2C, 0x2B,
+	0x06, 0x01, 0x08, 0x0F, 0x1A, 0x1D, 0x14, 0x13,
+	0xAE, 0xA9, 0xA0, 0xA7, 0xB2, 0xB5, 0xBC, 0xBB,
+	0x96, 0x91, 0x98, 0x9F, 0x8A, 0x8D, 0x84, 0x83,
+	0xDE, 0xD9, 0xD0, 0xD7, 0xC2, 0xC5, 0xCC, 0xCB,
+	0xE6, 0xE1, 0xE8, 0xEF, 0xFA, 0xFD, 0xF4, 0xF3,
+};
+
+static u8 crc8(u8 ch)
+{
+	return crc_table[ch];
+}
+
+static int outchar(FILE *out, u8 ch)
+{
+	int rc;
+	
+	rc = fputc(ch, out);
+	if (rc == EOF) {
+		return 0;
+	}
+	return 1;
+}
+
+static int esc_outchar(FILE *out, u8 ch, u8 *pcrc)
+{
+	/* The FLAG character delimits frames and should not appear
+	 * in the general data.  FLAG characters in the data are
+	 * sent as <ESC><~FLAG> and ESC characters are sent as <ESC><~ESC>.
+	 */
+	int rc = 0;
+
+	if ((ch == FLAG_CHAR) || (ch == ESC_CHAR)) {
+		rc = outchar(out, ESC_CHAR) && outchar(out, ch ^ 0xff);
+	} else {
+		rc = outchar(out, ch);
+	}
+	if (pcrc) {
+		*pcrc = crc8(*pcrc ^ ch);
+	}
+	return rc;
+}
+
+static int write_header(FILE *out, u32 addr, int len, u8 *pdata)
+{
+	u8 crc;
+	int i, rc;
+
+	if (len > 0 && !pdata) {
+		return 0;
+	}
+	
+	crc = 0;
+	rc =	outchar(out, FLAG_CHAR) &&	
+		esc_outchar(out, (u8)addr, &crc) &&
+		esc_outchar(out, (u8)(addr >> 8), &crc) &&
+		esc_outchar(out, (u8)(addr >> 16), &crc) &&
+		esc_outchar(out, (u8)(addr >> 24), &crc) &&
+		esc_outchar(out, (u8)len, &crc);
+	
+	if (!rc) {
+		return rc;
+	}
+	
+	for (i = 0; i < len && i < 4; i++) {
+		if (!(rc = esc_outchar(out, *pdata++, &crc))) {
+			return rc;
+		}
+	}
+	for (; i < 4; i++) {
+		if (!(rc = esc_outchar(out, 0, &crc))) {
+			return rc;
+		}
+	}
+	return esc_outchar(out, crc, NULL);
+}
+
+static int write_data(FILE *out, u8 *pc, int len)
+{
+	int i, rc;
+	u8 dcrc;
+	
+	dcrc = 0;
+	rc = 1;
+	
+	for (i = 0; (i < len) && rc; i++) {
+		rc = esc_outchar(out, *pc++, &dcrc);
+	}
+	if (len > 0 && rc) {
+		rc = esc_outchar(out, dcrc, NULL);
+	}
+	return rc;
+}
+
+int ums_exec(FILE *out, u32 address)
+{
+	/* Create a "jump to address" command frame */
+	return write_header(out, address, 0, NULL);
+}
+
+int ums_single_write(FILE *out, u32 addr, int len, u32 data)
+{
+	/* Create a "write 8/16/32 bits" command frame */
+	u8 data1[4];
+	
+	if (len < 1 || len > 4 || len == 3) {
+		return 0;
+	}
+	
+	data1[0] = (unsigned char)data;
+	data1[1] = (unsigned char)(data >> 8);
+	data1[2] = (unsigned char)(data >> 16);
+	data1[3] = (unsigned char)(data >> 24);
+	return write_header(out, addr, len, &data1[0]);
+}
+
+int bin2ums(FILE *in, FILE *out, u32 addr)
+{
+	u8 data1[4];
+	u8 data2[UMS_MAX_DATA];
+	int ch, rc;
+	int pos, trailing;
+
+	rc = 1;
+	pos = 0;
+	
+	do {
+		ch = fgetc(in);
+		if (ch != EOF) {
+			if (pos < 4) {
+				data1[pos] = (u8)ch;
+			} else {
+				data2[pos - 4] = (u8)ch;
+			}
+			pos++;
+			if (pos == UMS_MAX_DATA + 4) {
+				/* A full buffer to go */
+				rc = write_header(out, addr, pos, &data1[0]) &&
+					write_data(out, &data2[0], pos - 4);
+				addr += pos;
+				pos = 0;
+			}
+		} else {
+			/* Run out of data - write what's left */
+			if (pos > 4) {
+				trailing = pos & 3;
+				pos = pos & ~3;
+				rc = write_header(out, addr, pos, &data1[0]) &&
+					write_data(out, &data2[0], pos - 4);
+				addr += pos;
+				if (trailing > 0 && rc) {
+					rc = write_header(out, addr, trailing,
+								&data2[pos - 4]);
+				}
+			} else if (pos > 0) {
+				rc = write_header(out, addr, pos, &data1[0]);
+			}
+		}
+	} while (ch != EOF && rc);
+	return rc;
+}
diff --git a/quantenna/host/umsdl/umsdl.c b/quantenna/host/umsdl/umsdl.c
new file mode 100644
index 0000000..2e9f50f
--- /dev/null
+++ b/quantenna/host/umsdl/umsdl.c
@@ -0,0 +1,791 @@
+/*
+ *  host/umsdl.c
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2007.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * An application for downloading images to Quantenna UMS devices via the
+ * serial port.  Frames that are not downloaded correctly are retried until
+ * they are accepted.
+ *
+ */
+
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/time.h>
+#include <signal.h>
+
+#include "umsdl.h"
+#include "ums_platform.h"
+
+/* Offset into the u-boot binary where the offset of the table holding
+ * the load, execute & DRAM initialisation information is.
+ */
+#define UBOOT_TABLE_PTR 0x14
+
+/* If no -c option is specified for u-boot image downloads, then the copy 
+ * of the image for FLASH programming purposes is made at the load address
+ * minus COPY_OFFSET.
+ */
+#define COPY_OFFSET (0x100000)
+
+struct uboot_info {
+	u8 magic[4]; 	/* "UBIS" */
+	u32 load;	/* Image load address */
+	u32 exec;	/* Image entry point */
+	u32 copy_addr;	/* Copy of u-boot image used for programming FLASH */
+	u32 ddr_start;	/* DDR controller values table start */
+	u32 ddr_end;	/* DDR controller values table end */
+	u32 name_len;	/* Size of DDR name field immediately following this */
+};
+
+static void register_handlers(int register_handlers);
+int verbose;
+int send_ctrlc = 0;
+
+static unsigned char init_frame[] = 
+		{ 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x39 };
+
+static void usage(void)
+{
+	fprintf(stderr, 
+		"Usage1: cat <file> | umsdl [options] <serial port device>\n"
+		"  <file> should be generated by bin2ums.\n"
+		"  -v print details of download (verbose mode).\n"
+		"  -b <value> specifies the baud rate to use.\n"
+		"  -t <value in ms> specifies the frame acknowledgement\n"
+		"      timeout before retrying a frame (default is 500ms).\n"
+		"  -p <value in ms> specifies the rebaud timeout.  If two\n"
+		"      consecutive frames fail, then umsdl waits for this\n"
+		"      period before resending.  This tells the receiver\n"
+		"      to redetect the sending baud rate (default is 2sec).\n"
+		"Usage2: umsdl [options] -f <binary file> -a <address> [-x <exec_addr>] <serial port device>\n"
+		"  <binary file> is a raw binary file to convert and send\n"
+		"  and <address> is the address to download it to.\n"
+		"  If the -x option is specified then umsdl will tell the target to execute\n"
+		"  the downloaded image at the address given.\n"
+		"Usage3: umsdl [options] [-c addr] -u <bootloader> <serial port device>\n"
+		"  <bootloader> is a raw binary bootloader file (u-boot.bin).\n"
+		"  This option automatically sets-up the target DRAM before\n"
+		"  downloading the bootloader into its normal location and\n"
+		"  running it.  The user can then program the bootloader into\n"
+		"  the target FLASH using the image copy made to the address\n"
+		"  specified by the -c option.  If no -c option is given, then\n"
+		"  the copy is made at the image load address minus 1MB.\n\n"
+		"  To send ctrl-c to a downloaded application, use ctrl-\\.\n"
+		);
+}
+
+static int poll_char(int serial_fd, unsigned long ms_timeout)
+{
+	struct timeval time;
+	unsigned char ch;
+	time_t seconds;
+	suseconds_t usec;
+	
+	seconds = ms_timeout / 1000;
+	usec = (ms_timeout - seconds * 1000) * 1000;
+
+	gettimeofday(&time, NULL);
+	usec += time.tv_usec;
+	seconds += time.tv_sec + (usec / 1000000);
+	usec %= 1000000;
+
+	while (read(serial_fd, &ch, 1) == 0) {
+		gettimeofday(&time, NULL);
+		if ((time.tv_sec > seconds) || 
+			((time.tv_sec == seconds) && (time.tv_usec >= usec))) {
+			return EOF;
+		}
+	}
+	return (unsigned int)ch;
+}
+
+static int baudrate_constant(int baud_rate)
+{
+	static struct { int baud; int speed; } bauds[] = {
+		{ 1200, B1200 },
+		{ 2400, B2400 },
+		{ 4800, B4800 },
+		{ 9600, B9600 },
+		{ 19200, B19200 },
+		{ 38400, B38400 },
+		{ 57600, B57600 },
+		{ 115200, B115200 },
+	};
+	int i;
+	
+	for (i = 0; i < sizeof(bauds) / sizeof(bauds[0]); i++) {
+		if (bauds[i].baud == baud_rate) {
+			return bauds[i].speed;
+		}
+	}
+	return -1;
+}
+
+static unsigned char get_escaped_char(unsigned char **ppc)
+{
+	unsigned char ch;
+	
+	ch = **ppc;
+	(*ppc)++;
+	if (ch == ESC_CHAR) {
+		ch = ~**ppc;
+		(*ppc)++;
+	}
+	return ch;
+}
+
+static void parse_frame_hdr(unsigned char *buf, u32 *paddr, u8 *plen)
+{
+	u8 len;
+	u32 addr;
+	unsigned char *p;
+	
+	p = buf;
+	addr = get_escaped_char(&p);
+	addr += (u32)get_escaped_char(&p) << 8;
+	addr += (u32)get_escaped_char(&p) << 16;
+	addr += (u32)get_escaped_char(&p) << 24;
+	
+	if (paddr) {
+		*paddr = addr;
+	}
+	
+	len = get_escaped_char(&p);
+	if (plen) {
+		*plen = len;
+	}
+}
+
+static int nonblock(int state, int flag)
+{
+	struct termios ttystate;
+	int lflag;
+	
+	tcgetattr(STDIN_FILENO, &ttystate);
+	if (state)
+	{
+		//turn off canonical mode
+		lflag = ttystate.c_lflag;
+		ttystate.c_lflag = lflag & ~ICANON & ~ECHO;
+		ttystate.c_cc[VMIN] = 1;
+	}
+	else
+	{
+		ttystate.c_lflag = flag;
+	}
+	tcsetattr(STDIN_FILENO, TCSANOW, &ttystate);
+	return (state) ? lflag : flag;
+}
+
+static int kbhit()
+{
+	struct timeval tv;
+	fd_set fds;
+	tv.tv_sec = 0;
+	tv.tv_usec = 0;
+	FD_ZERO(&fds);
+	FD_SET(STDIN_FILENO, &fds);
+	select(STDIN_FILENO+1, &fds, NULL, NULL, &tv);
+	return FD_ISSET(STDIN_FILENO, &fds);
+}
+
+static void poll_input_chars(int serial_fd)
+{
+	int ch;
+	
+	if (send_ctrlc) {
+		send_ctrlc = 0;
+		ch = 3; /* echo Ctrl-C to program */
+		write(serial_fd, &ch, 1);
+	}
+	if (kbhit()) {
+		if (read(STDIN_FILENO, &ch, 1) == 1) {
+			write(serial_fd, &ch, 1);
+		}
+	}
+}
+
+void signal_handler(int signum)
+{
+	send_ctrlc = 1;
+}
+
+static void register_handlers(int register_handlers)
+{
+	static void (*old_sigquit_handler)(int) = SIG_ERR;
+
+	if (register_handlers) {
+		old_sigquit_handler = signal(SIGQUIT, &signal_handler);
+	} else {
+		if (old_sigquit_handler != SIG_ERR) {
+			signal(SIGQUIT, old_sigquit_handler);
+		}
+	}
+}
+
+static int wait_until_exec_complete(int serial_fd, FILE *data)
+{
+	/* Print output from program running on the target until
+	 * it signals that it has finished by sending an unescaped
+	 * END_OF_PROGRAM character.
+	 * Accept input from stdin and pass it to the program, but
+	 * only if we are reading data from a file and not stdin.
+	 */
+	unsigned char ch;
+	int lflag;
+
+	send_ctrlc = 0;
+	register_handlers(1);
+
+	if (data != stdin) {
+		lflag = nonblock(1, 0);
+	}
+	do {
+		while (read(serial_fd, &ch, 1) != 1) {
+			if (data != stdin) {
+				poll_input_chars(serial_fd);
+			}
+		}
+		if (ch == ESC_CHAR) {
+			while (read(serial_fd, &ch, 1) != 1) {
+				if (data != stdin) {
+					poll_input_chars(serial_fd);
+				}
+			}
+			ch = ~ch;
+		}
+		if (ch != END_OF_PROGRAM_OK && ch != END_OF_PROGRAM_FAIL) {
+			putchar(ch);
+		} else if (verbose) {
+			puts("<Program completed>");
+		}
+	} while (ch != END_OF_PROGRAM_OK && ch != END_OF_PROGRAM_FAIL);
+	
+	if (data != stdin) {
+		nonblock(0, lflag);
+	}
+
+	register_handlers(0);	
+	return ch == END_OF_PROGRAM_OK;
+}
+
+static int get_uboot_info(FILE *in, struct uboot_info *info, char *name, int len, int *table_offset)
+{
+	u32 offset;
+	int ch;
+	
+	if (!in || !info) {
+		return -1;
+	}
+	if (fseek(in, UBOOT_TABLE_PTR, SEEK_SET) != 0) {
+		return -1;
+	}
+	offset = fgetc(in) + (fgetc(in) << 8) + (fgetc(in) << 16)
+							+ (fgetc(in) << 24);
+	if (feof(in) || (fseek(in, offset, SEEK_SET) != 0) || 
+				(fread(info, sizeof(struct uboot_info), 1, in) != 1)) {
+		return -1;
+	}
+	if (info->magic[0] != 'U' || info->magic[1] != 'B' ||
+		info->magic[2] != 'I' || info->magic[3] != 'S') {
+		return -2; /* No U-Boot table */
+	}
+	if (name) {
+		while (--len && (ch = fgetc(in)) != EOF && ch != '\0') {
+			*name++ = ch;
+		}
+		*name = '\0';
+		if (ch == EOF) {
+			return -3; /* Unexpected end of name string */
+		}
+	}
+	rewind(in);
+	info->ddr_start -= info->load;
+	info->ddr_end -= info->load;
+	if (table_offset) {
+		*table_offset = offset;
+	}
+	return 0;
+}
+
+static int add_init_ddr_cmds(FILE *in, struct uboot_info *info, FILE *out)
+{
+	/* Initialise target DDR based on */
+	u32 val, addr;
+	int rc, i;
+	
+	if (!in || !out || !info) {
+		return 0;
+	}
+	
+	/* Release DRAM block controller from reset */
+	rc = 
+		ums_single_write(out, UMS_REGS_SYSCTRL + SYSCTRL_RESET_MASK,
+			4, SYSCTRL_DDR_RUN) &&
+		ums_single_write(out, UMS_REGS_SYSCTRL + SYSCTRL_RESET, 4,
+			SYSCTRL_DDR_RUN) &&
+		ums_single_write(out, UMS_REGS_SYSCTRL + SYSCTRL_RESET_MASK,
+			4, 0);
+		
+	if (!rc) {
+		return 0;
+	}
+	
+	addr = UMS_REGS_DDR;
+	if (fseek(in, info->ddr_start, SEEK_SET)) {
+		return 0;
+	}
+	for (i = 0; i < (info->ddr_end - info->ddr_start) / sizeof(val); i++) {
+		if (fread(&val, sizeof(val), 1, in) != 1) {
+			return 0;
+		}
+		if (!ums_single_write(out, addr, 4, val)) {
+			return 0;
+		}
+		addr += 4;
+	}
+	/* Enable the controller & Map DDR at address 0 */
+	rc = 
+		ums_single_write(out, UMS_REGS_DDR + 0x14, 4, 0x110) &&
+		ums_single_write(out, UMS_REGS_SYSCTRL + SYSCTRL_CTRL_MASK, 4,
+				SYSCTRL_REMAP(3) | SYSCTRL_REMAP_SRAM) &&
+		ums_single_write(out, UMS_REGS_SYSCTRL + SYSCTRL_CTRL, 4, 0) &&
+		ums_single_write(out, UMS_REGS_SYSCTRL + SYSCTRL_CTRL_MASK, 4, 0);
+	
+	rewind(in);
+	return (rc) ? 1 : 0;
+}
+
+int main(int argc, char *argv[])
+{
+	/* Big enough to hold a frame allowing for worst case escaping
+	 * of the characters.
+	 */
+	unsigned char frame[1 + 2 * sizeof(struct umsdl_hdr) +
+					2 * (UMS_MAX_DATA + 1) + 2];
+	struct timespec long_pause;
+	struct timeval timeout;
+	struct termios serial_ios;
+	int c, i, j, failures, done, resp;
+	int addr_specified, copy_addr_specified, table_offset;
+	int exec_addr_specified;
+	long resp_timeout = 500;
+	long rebaud_pause = 2000;
+	unsigned char flag_chr = FLAG_CHAR;
+	const int max_consec_failures = 5;
+	int serial_fd, baud_rate, speed;
+	char *uboot_file, *bin_file, *infile, *pserial_port, ch;
+	u32 addr, copy_addr, exec_addr, ulen;
+	FILE *in, *out, *data;
+	struct uboot_info info;
+	char name[32];
+	u8 len;
+	
+	if (argc < 2) {
+		usage();
+		return -1;
+	}
+		
+	baud_rate = 115200;
+	verbose = 0;
+	uboot_file = NULL;
+	bin_file = NULL;
+	infile = NULL;
+	pserial_port = NULL;
+	in = NULL;
+	out = NULL;
+	copy_addr_specified = 0;
+	
+	addr_specified = 1;
+	exec_addr_specified = 1;
+	addr = 0x80000000;
+	exec_addr = 0x80000000;
+	
+	pserial_port = argv[argc - 1];
+	i = 1;
+	/* Parse all options */
+	while (i < argc - 1) {
+		if (argv[i][0] != '-') {
+			usage();
+			return -1;
+		}
+		
+		ch = argv[i++][1];
+		
+		/* Options needing no further arguments */
+		if (ch == 'v') {
+			verbose++;
+			continue;
+		}
+		
+		/* Options needing 1 further argument */
+		if (i + 1 >= argc) {
+			usage();
+			return -1;
+		}
+		
+		switch(ch) {
+		case 't':
+			resp_timeout = strtoul(argv[i], NULL, 0);
+			break;
+		case 'p':
+			rebaud_pause = strtoul(argv[i], NULL, 0);
+			break;
+		case 'b':
+			baud_rate = strtoul(argv[i], NULL, 0);
+			break;
+		case 'a':
+			addr = strtoul(argv[i], NULL, 0);
+			addr_specified = 1;
+			break;
+		case 'c':
+			copy_addr = strtoul(argv[i], NULL, 0);
+			copy_addr_specified = 1;
+			break;
+		case 'x':
+			exec_addr = strtoul(argv[i], NULL, 0);
+			exec_addr_specified = 1;
+			break;
+		case 'f':
+			bin_file = argv[i];
+			break;
+		case 'u':
+			uboot_file = argv[i];
+			break;
+		case '\0':
+			fprintf(stderr, "No option letter after -\n"); 
+			usage();
+			return -1;
+		default:
+			fprintf(stderr, "Unknown option %c\n", ch); 
+			usage();
+			return -1;
+		}
+		i++;
+	}
+	
+	if ((uboot_file && bin_file) || (bin_file && !addr_specified) ||
+						(!bin_file && addr_specified)) {
+		usage();
+		return -1;
+	}
+	if (uboot_file) {
+		infile = uboot_file;
+	}
+	if (bin_file) {
+		infile = bin_file;
+	}
+	
+	if (infile) {
+		if ((in = fopen(infile, "rb")) == NULL) {
+			fprintf(stderr, "Cannot open %s\n", infile);
+			return -1;
+		} else if ((out = tmpfile()) == NULL) {
+			fprintf(stderr, "Failed to open temporary file\n");
+			return -1;
+		} else {
+			if (uboot_file) {
+				/* For a bootloader (U-Boot) file we extract
+				 * the load/execution and DRAM setup info
+				 * directly from the image.  This allows us
+				 * to setup the DRAM, download the image and
+				 * run it.
+				 */
+				if (get_uboot_info(in, &info, name,
+							sizeof(name), &table_offset)) {
+					fprintf(stderr, 
+						"Cannot read U-Boot information"
+						" table (not a U-Boot binary?)\n");
+					return -1;
+				}
+				
+				fseek(in, 0L, SEEK_END);
+				ulen = ftell(in);
+				rewind(in);
+				if (copy_addr_specified) {
+					info.copy_addr = copy_addr & ~3;
+				} else {
+					info.copy_addr = (info.load & ~3) - COPY_OFFSET;
+				}
+				
+				printf( "DDR type    : %s\n"
+					"Byte length : 0x%08lx\n"
+					"Load addr   : 0x%08lx\n"
+					"Exec addr   : 0x%08lx\n"
+					"Copy addr   : 0x%08lx\n"
+					"Table offset: 0x%08lx\n"
+					"Table length: 0x%08lx\n",
+					name, ulen,
+					info.load, info.exec, info.copy_addr,
+					info.ddr_start,
+					info.ddr_end - info.ddr_start);
+				
+				if (!add_init_ddr_cmds(in, &info, out)) {
+					fprintf(stderr, 
+						"Failed to prepend DDR commands\n");
+					return -1;
+				}
+				
+				addr = info.load;
+			}
+
+			if (!bin2ums(in, out, addr)) {
+				fprintf(stderr, "Failed to convert file\n");
+				return -1;
+			}
+
+			/* Patch the U-Boot info structure in the downloaded image
+			 * with the user specified address of where to make a
+			 * copy of the image when u-boot runs.
+			 */
+			if (uboot_file && 
+				!ums_single_write(out, info.load +
+					table_offset + 
+					offsetof(struct uboot_info, copy_addr), 
+					sizeof(info.copy_addr),
+					info.copy_addr)) {
+				fprintf(stderr, "Failed to set copy address\n");
+				return -1;
+			}
+			
+			if (uboot_file && !ums_exec(out, info.exec)) {
+				fprintf(stderr, "Failed to add exec command\n");
+				return -1;
+			}
+			
+			if (bin_file && exec_addr_specified && !ums_exec(out, exec_addr)) {
+				fprintf(stderr, "Failed to add exec command\n");
+				return -1;
+			}
+		}
+	}
+	
+	if (pserial_port) {
+		/* Connect to the specified serial port */
+		serial_fd = open(pserial_port, O_RDWR | O_NOCTTY | O_NONBLOCK);
+		if (serial_fd < 0) {
+			fprintf(stderr, "Failed to open %s\n", pserial_port);
+			return -1;
+		}
+		if (tcgetattr(serial_fd, &serial_ios) < 0) {
+			fprintf(stderr, "Failed to get serial port "
+				"attributes for %s\n", pserial_port);
+			close(serial_fd);
+			return -1;
+		}
+		serial_ios.c_iflag = 0;
+		serial_ios.c_oflag = 0;
+		serial_ios.c_cflag = CS8 | CREAD | CLOCAL;
+		serial_ios.c_lflag = 0;
+		serial_ios.c_cc[VMIN] = 0;
+		serial_ios.c_cc[VTIME] = 0;
+		
+		/* Set the serial port speed */
+		speed = baudrate_constant(baud_rate);
+		
+		if (speed < 0) {
+			fprintf(stderr, "Unsupported baud rate %d\n", baud_rate);
+			close(serial_fd);
+			return -1;
+		}
+		if (cfsetispeed(&serial_ios, speed)) {
+			fprintf(stderr, "Failed to set input baud rate\n");
+			close(serial_fd);
+			return -1;
+		}
+		if (cfsetospeed(&serial_ios, speed)) {
+			fprintf(stderr, "Failed to set output baud rate\n");
+			close(serial_fd);
+			return -1;
+		}
+		
+		if (tcsetattr(serial_fd, TCSANOW, &serial_ios)) {
+			fprintf(stderr, "Cannot update serial port settings\n");
+			close(serial_fd);
+			return -1;
+		}
+	} else {
+		fprintf(stderr, "No serial port specified\n");
+		usage();
+		return -1;
+	}
+
+	
+	/* This pause needs to be long enough so that the receiver
+	 * sees the serial line is idle for > 128e6 AHB bus clock ticks
+	 * (about 1s to 1.6s depending on the chip clock selection).
+	 * The receiver will then re-enter the autobaud detection mode.
+	 * We do need to take account of any outgoing buffering that is
+	 * going on, so we push the delay up to 2s by default.
+	 */
+	long_pause.tv_sec = rebaud_pause / 1000;
+	long_pause.tv_nsec = (rebaud_pause - long_pause.tv_sec * 1000) * 1000000;
+	
+	/* How long to wait for a response from the receiver */
+	timeout.tv_sec = resp_timeout / 1000;
+	timeout.tv_usec = (resp_timeout - timeout.tv_sec * 1000) * 1000;
+
+	/* Make stdout non-buffered so we see the serial download progress */
+	setvbuf(stdout, (char *) NULL, _IONBF, 0);
+	
+	/* Tell chip to turn on its serial output.  The response is expected
+	 * to be 0xFF, PACKET_ACK with the possibility that the 0xFF gets
+	 * corrupted by the UART turn on.
+	 */
+	i = 3;
+	if (verbose) {
+		printf("Wait for initial response from target\n");
+	}
+	
+	do {
+		write(serial_fd, &flag_chr, 1);
+		write(serial_fd, &init_frame[0], sizeof(init_frame));
+		c = poll_char(serial_fd, rebaud_pause);
+		if (c == 0xff) {
+			c = poll_char(serial_fd, rebaud_pause);
+		}
+	} while ((c != PACKET_ACK) && --i);
+	
+	if (i == 0) {
+		fprintf(stderr, "Failed to sync with receiver\n");
+		return -1;
+	}
+
+	if (verbose) {
+		printf("Response received\n");
+	}
+
+	if (infile) {
+		data = out;
+		rewind(data);
+	} else {
+		data = stdin;
+	}
+	
+	c = fgetc(data);
+	do {
+		/* Read and send one frame at a time until done */
+		if (verbose) {
+			putchar('F');
+		}
+		if (c != FLAG_CHAR) {
+			fprintf(stderr, 
+				"Bad file format (Expected %04x, got %04x)\n",
+								FLAG_CHAR, c);
+			return -1;
+		}
+		frame[0] = c;
+		i = 1;
+		do {
+			c = fgetc(data);
+			done = (c == EOF) || (c == FLAG_CHAR);
+			if (!done) {
+				if (i >= sizeof(frame)) {
+					fprintf(stderr, 
+						"Overlength frame error\n");
+					return -1;
+				}
+				frame[i++] = (unsigned char)c;
+			}
+		} while (!done);
+
+		if (verbose) {
+			putchar('f');
+		}
+		failures = 0;
+		
+		do {
+			if (verbose) {
+				putchar('S');
+			}
+			
+			/* Send whole frame */
+			if (verbose > 1) {
+				printf("\n");
+				for (j = 0; j < i; j++) {
+					printf("%02x ", frame[j]);
+				}
+				printf("\n");
+			}
+			write(serial_fd, &frame[0], i);
+			if (verbose) {
+				putchar('s');
+			}
+			
+			/* Wait for receiver response */
+			resp = poll_char(serial_fd, resp_timeout);
+			if (resp != PACKET_ACK) {
+				if (resp == PACKET_NAK)
+				{
+					putchar('N');
+				} else if (resp == EOF) {
+					putchar('-');
+				} else {
+					if (verbose) {
+						printf("(%02x?)", resp);
+					} else {
+						putchar('_');
+					}
+				}
+				if (failures++ & 1) {
+					/* Try renegotiation of baud rate */
+					nanosleep(&long_pause, NULL);
+				}
+			} else {
+				putchar('.');
+				failures = 0;
+			}
+			
+			/* If we have just run a program on the target
+			 * we suspend the download and just report characters
+			 * sent back to us until the "program-finished"
+			 * character is received.
+			 */
+			parse_frame_hdr(&frame[1], &addr, &len);
+			if (verbose) {
+				printf("[Addr %08lx, Len %02x]\n", addr, len);
+			}
+			if (len == 0) {
+				if (!wait_until_exec_complete(serial_fd, data)) {
+					fprintf(stderr, "\nDownloaded program returned error. Exiting\n");
+					return -1;
+				}
+			}
+			
+		} while (resp != PACKET_ACK && failures < max_consec_failures);
+		
+		if (failures >= max_consec_failures) {
+			/* Abort download: excessive consecutive failures */
+			fprintf(stderr, "\nToo many consecutive errors.\n");
+			return -1;
+		}
+	} while (c != EOF);
+	printf("\n");
+	return 0;
+}	
+
diff --git a/quantenna/host/umsdl/umsdl.h b/quantenna/host/umsdl/umsdl.h
new file mode 100644
index 0000000..83bc1a4
--- /dev/null
+++ b/quantenna/host/umsdl/umsdl.h
@@ -0,0 +1,89 @@
+/*
+ *  host/umsdl.c
+ *
+ *  Copyright (c) Quantenna Communications Incorporated 2007.
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * Common definitions for the umsdl and bin2ums applications.
+ */
+ 
+#ifndef _HOST_UMSDL_H
+#define _HOST_UMSDL_H
+
+/* Special marker and escape characters in the serial download stream */
+#define FLAG_CHAR (0x80)
+#define ESC_CHAR (0x10)
+#define PACKET_ACK (0x2e)
+#define PACKET_NAK (0x78)
+
+/* Programs downloaded serially and run can signal to the download
+ * program that they have finished by sending an un-escaped Ctrl-Z
+ * back on the serial line.  The download program will then continue
+ * with other downloads it may have.
+ * If the program fails, then it returns NAK (ASCII 21) and the download
+ * will terminate.
+ */
+#define END_OF_PROGRAM_OK (26)
+#define END_OF_PROGRAM_FAIL (21)
+
+/* Frame specific definitions. The frame format is
+ *
+ * [FLAG_CHAR][header][data]
+ *
+ * The flag character acts as a frame delimiter.  If it appears in the
+ * header or data then it is escaped to a two byte sequence using ESC_CHAR
+ * followed by ~FLAG_CHAR.  Escape characters are sent as <ESC_CHAR><~ESC_CHAR>.
+ *
+ * The header structure is defined by umsdl_hdr and contains the first four
+ * bytes of any data.  If the frame contains more than four bytes then an 
+ * optional [data] section is added which contains 4 to UMS_MAX_DATA bytes,
+ * is a multiple of 4 bytes in size and is followed by a CRC-8 byte checksum
+ * (of the bytes in the data section only).  Any trailing bytes are handled by
+ * generating an additional frame.
+ * If a frame contains 4 or more bytes then these are written as words on
+ * the target system.  If the frame contains fewer than 4 bytes then they
+ * are written as bytes. 
+ * The target responds with one of three characters.  PACKET_ACK is sent when
+ * a frame (header & optional data) has been received correctly.  PACKET_NAK
+ * is sent if the header or data fails the CRC check, or if the header length
+ * field is > 4 but not a multiple of 4 bytes.  FLAG_NAK is sent if the target
+ * is expecting the start of a frame FLAG, but got some other character.
+ * All responses are sent immediately the error is detected, so the timeout
+ * on the sender for lost responses can be very short (i.e. ~ 2 characters).
+ *
+ */
+
+typedef unsigned char u8;
+typedef unsigned long u32;
+
+/* Header format of each frame, preceeded by a FLAG_CHAR */
+struct umsdl_hdr {
+	u8 addr[4]; /* Target physical address, addr[0]=lsb */
+	u8 length; /* Total bytes in header and any data section */
+	u8 data[4]; /* First 4 bytes of data, data[0] = first byte */
+	u8 crc; /* CRC-8 checksum of preceeding header bytes */
+};
+
+/* The maximum number of bytes in the data section of the frame */
+#define UMS_MAX_DATA (248)
+
+int ums_exec(FILE *out, u32 address);
+int ums_single_write(FILE *out, u32 address, int len, u32 data);
+int bin2ums(FILE *in, FILE *out, u32 addr);
+
+#endif
diff --git a/quantenna/host/utilities/Makefile b/quantenna/host/utilities/Makefile
new file mode 100644
index 0000000..a10e8ea
--- /dev/null
+++ b/quantenna/host/utilities/Makefile
@@ -0,0 +1,23 @@
+#
+# (C) Copyright 2007 Quantenna Communications Inc.
+#
+
+CFLAGS += -Wall -Werror
+
+.PHONY: bin2bin bin2hex ruby_mem_helper
+
+all: bin2bin bin2hex ruby_mem_helper
+
+bin2bin:
+	gcc $(CFLAGS) bin2bin.c -Wall -o bin2bin
+
+bin2hex:
+	gcc $(CFLAGS) bin2hex.c -Wall -o bin2hex
+
+ruby_mem_helper: ruby_mem_helper.c
+	gcc $(CFLAGS) -I../../common $< -o $@
+
+clean:
+	rm -f *.o bin2bin bin2hex ruby_mem_helper
+
+distclean: clean
diff --git a/quantenna/host/utilities/arcsymbols.pm b/quantenna/host/utilities/arcsymbols.pm
new file mode 100755
index 0000000..e762bda
--- /dev/null
+++ b/quantenna/host/utilities/arcsymbols.pm
@@ -0,0 +1,226 @@
+#!/usr/bin/perl -w
+package arcsymbols;
+use strict;
+use warnings;
+use List::Util qw[min max];
+
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
+
+require Exporter;
+
+@ISA = qw(Exporter);
+@EXPORT = qw();
+@EXPORT_OK = qw();
+$VERSION = '0.01';
+
+my $objdump = "/usr/local/ARC/gcc/bin/arc-linux-uclibc-objdump";
+
+sub new {
+	my $package = shift;
+	my $bin_path = shift;
+	my $section_addrs_ref = shift;
+	my $self = {};
+	&load_symbols($self, $bin_path, $section_addrs_ref);
+	return bless($self, $package);
+}
+
+sub find_symbol {
+	my $self = shift;
+	my $addr = shift;
+	my $sym = $self->find_symbol_address_dumb($addr);
+	if ($sym) {
+		return $self->{symbols_ref}->{$sym};
+	} else {
+		return undef;
+	}
+}
+
+sub get_sorted_addrs_ref {
+	my $self = shift;
+	return $self->{sorted_symbol_keys_ref};
+}
+
+sub get_symbol_by_key {
+	my $self = shift;
+	my $addr = shift;
+	return $self->{symbols_ref}->{$addr};
+}
+
+sub find_section {
+	my $self = shift;
+	my $addr = shift;
+
+	foreach my $section_addr (@{$self->{sorted_section_keys_ref}}) {
+		my $offset = $addr - $section_addr;
+		my $section_size = $self->{sections_ref}->{$section_addr}->{size};
+		if ($offset >= 0 && $offset < $section_size) {
+			return $self->{sections_ref}->{$section_addr};
+		}
+	}
+	return undef;
+}
+
+sub fixfunc {
+	my ($self, $name, $offset, $size) = @_;
+	# find symbol, compare sizes; some functions are omitted in kallsyms
+	my $changed = 0;
+	my $sym = undef;
+	#warn sprintf "\t\t%s+%x/%x %s\n", $name, $offset, $size, $self->{bin_path};
+	if ($self->{symbol_names_ref}->{$name}) {
+		#warn sprintf "$name in $self->{bin_path}\n"; 
+		$sym = $self->{symbol_names_ref}->{$name};
+		my $objdsize = $sym->{size};
+		my $origsize = $size;
+		$size = $objdsize;	# fix size regardless of oversize
+		my $reladdr = $sym->{addr};
+		if ($offset >= $size && $objdsize < $origsize) { 
+			#warn sprintf "function: %s oversize (%x > %x) and nonzero offset (%x), addr %x+%x/%x (%x), rs %x\n", $name, $origsize, $objdsize, $offset, $reladdr, $offset, $size, $reladdr + $offset, $objdsize;
+			if ($self->{symbols_ref}->{$reladdr + $offset}) {
+				my $newname = $self->{symbols_ref}->{$reladdr + $offset}->{name};
+				my $newsize = $self->{symbols_ref}->{$reladdr + $offset}->{size};
+				warn sprintf "%s+0x%x/0x%x (realsize 0x%x) changed for %s+0x%x/0x%x, binary %s\n", $name, $offset, $size, $objdsize, $newname, 0, $newsize, $self->{bin_path};
+				#warn sprintf "found match: $name at %x\n", $reladdr + $offset;
+				$name = $newname;
+				$size = $newsize;
+				$offset = 0;
+			} else {
+				# create a new name to distinguish this, even though
+				# we don't know exactly what it is
+				$name = sprintf("%s+0x%x", $name, $objdsize);
+			}
+		}
+		$changed = 1;
+	}
+	$size = 1 if ($size == 0);
+	return ($name, $offset, $size, $changed == 1, $sym);
+}
+
+sub find_symbol_address_tree {
+	my ($self, $addr) = @_;
+	my $symbol_addr;
+	my @symbol_addrs = @{$self->{sorted_symbol_keys_ref}};
+	# binary search to find symbol
+	my $min = 0;
+	my $max = $#symbol_addrs;
+	while ($max >= $min) {
+		my $this = int(($max + $min) / 2);
+		my $sym = $symbol_addrs[$this];
+		#warn sprintf("\n%d %d %d %x %x", $min, $this, $max, $sym, $addr);
+		if ($sym == $addr) {
+			$symbol_addr = $sym;
+			#warn "$sym == $addr";
+			last;
+		} elsif ($sym > $addr) {
+			if ($max == $this) {
+				$max--;
+			} else {
+				$max = $this;
+			}
+			#warn sprintf("%x > %x", $sym, $addr);
+		} else {
+			my $symbol_size = $self->{symbols_ref}->{$sym}->{size};
+			my $offset = $addr - $sym;
+			if ($offset < $symbol_size) {
+				#warn "found, offset $offset < $symbol_size";
+				$symbol_addr = $sym;
+				last;
+			} else {
+				#warn sprintf("%x + %x < %x", $sym, $symbol_size, $addr);
+				if ($min == $this) {
+					$min++;
+				} else {
+					$min = $this;
+				}
+			}
+		}
+	}
+
+	return $symbol_addr;
+}
+
+sub find_symbol_address_dumb {
+	my ($self, $addr) = @_;
+
+	foreach my $sym (@{$self->{sorted_symbol_keys_ref}}) {
+		my $offset = $addr - $sym;
+
+		my $symbol_size = $self->{symbols_ref}->{$sym}->{size};
+
+		if ($offset >= 0 && $offset < $symbol_size) {
+			return $sym;
+		}
+	}
+}
+
+sub load_symbols {
+	my $self = shift;
+	my $bin_path = shift;
+	my $section_addrs_ref = shift;
+
+	my $is_module = defined($section_addrs_ref);
+
+	my %names;
+	my %data;
+	my %sections;
+	my %section_start_offsets;
+
+	die "Could not find binary: $bin_path\n" unless ( -e $bin_path );
+
+	foreach (`$objdump -ht $bin_path`) {
+		if (/^([\w\d]+)\s+\w?\s+\w?\s+([\.\w]+)\s+([\w\d]+)\s+([\.\w]+)\s*$/) {
+			my $addr = hex($1);
+			my $section = $2;
+			my $size = hex($3);
+			my $name = $4;
+			my $origaddr = $addr;
+			my $found = 1;
+			if ($is_module) {
+				if ($section eq $name) {
+					$section_start_offsets{$section} = $addr;
+				}
+				if ($section_addrs_ref->{$section}) {
+					$addr = $addr - $section_start_offsets{$section} + $section_addrs_ref->{$section};
+				} else {
+					$found = 0;
+				}
+			}
+			if ($found) {
+				if ($size > 0) {
+					$data{$addr}->{addr} = $addr;
+					$data{$addr}->{size} = $size;
+					$data{$addr}->{name} = $name;
+					$data{$addr}->{section} = $section;
+					#warn sprintf("parsed %x: $name $section $size\n", $addr);
+				}
+				$names{$name}->{addr} = $addr;
+				$names{$name}->{size} = $size;
+				$names{$name}->{section} = $section;
+				#warn sprintf ("Sym: 0x%x (orig 0x%x, section $section) $name\n", $addr, $origaddr);
+			}
+		}
+		elsif (/^\s*\d+\s+([\.\w]+)\s+([\d\w]+)\s+([\d\w]+)\s+([\d\w]+)\s+([\d\w]+)\s+\d*\**\d*\s*$/) {
+			my $addr = hex($3);
+			my $size = hex($2);
+			my $section = $1;
+			$sections{$addr}->{addr} = $addr;
+			$sections{$addr}->{size} = $size;
+			$sections{$addr}->{section} = $section;
+		}
+	}
+
+	my @sorted_symbol_keys = sort keys %data;
+	$self->{sorted_symbol_keys_ref} = \@sorted_symbol_keys;
+	$self->{symbols_ref} = \%data;
+
+	my @sorted_section_keys = sort keys %sections;
+	$self->{sorted_section_keys_ref} = \@sorted_section_keys;
+	$self->{sections_ref} = \%sections;
+
+	my @sorted_names = sort keys %names;
+	$self->{sorted_symbol_names_ref} = \@sorted_names;
+	$self->{symbol_names_ref} = \%names;
+
+	$self->{bin_path} = $bin_path;
+}
+
+1;
diff --git a/quantenna/host/utilities/bin2bin.c b/quantenna/host/utilities/bin2bin.c
new file mode 100644
index 0000000..583a978
--- /dev/null
+++ b/quantenna/host/utilities/bin2bin.c
@@ -0,0 +1,49 @@
+#include <stdio.h>
+
+void printbin(unsigned long val);
+
+int main(int argc, char *argv[])
+{
+	FILE *handle;
+	unsigned int c;
+	unsigned long val;
+	int i;
+	
+	handle = fopen(argv[1], "rb");
+	if (handle == NULL) {
+		fprintf(stderr, "Cannot open %s\n", argv[1]);
+		return -1;
+	}
+
+	i = 0;
+	while ((c = fgetc(handle)) != EOF) {
+		if (i == 0) {
+			val = 0;
+		}
+		val += ((c & 0xff) << (i << 3));
+		if (i == 3) {
+			printbin(val);
+		}
+		if (++i == 4) {
+			i = 0;
+		}
+	}
+	
+	if (i != 0) {
+		fprintf(stderr, "File not an integral number of 32 bit words\n");
+		printbin(val);
+		return -2;
+	}
+	return 0;
+}
+
+void printbin(unsigned long val)
+{
+	int i;
+	
+	for (i = 31; i >= 0; i--) {
+		putchar('0' + ((val >> i) & 1));
+	}
+	printf("\n");
+}
+
diff --git a/quantenna/host/utilities/bin2hex.c b/quantenna/host/utilities/bin2hex.c
new file mode 100644
index 0000000..cc641b1
--- /dev/null
+++ b/quantenna/host/utilities/bin2hex.c
@@ -0,0 +1,37 @@
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+	FILE *handle;
+	unsigned int c;
+	unsigned long val;
+	int i;
+	
+	handle = fopen(argv[1], "rb");
+	if (handle == NULL) {
+		fprintf(stderr, "Cannot open %s\n", argv[1]);
+		return -1;
+	}
+
+	i = 0;
+	while ((c = fgetc(handle)) != EOF) {
+		if (i == 0) {
+			val = 0;
+		}
+		val += ((c & 0xff) << (i << 3));
+		if (i == 3) {
+			printf("%08lx\n", val);
+		}
+		if (++i == 4) {
+			i = 0;
+		}
+	}
+	
+	if (i != 0) {
+		fprintf(stderr, "File not an integral number of 32 bit words\n");
+		printf("%08lx\n", val);
+		return -2;
+	}
+	return 0;
+}
+
diff --git a/quantenna/host/utilities/check_lzma_image_size b/quantenna/host/utilities/check_lzma_image_size
new file mode 100755
index 0000000..2ce1a0f
--- /dev/null
+++ b/quantenna/host/utilities/check_lzma_image_size
@@ -0,0 +1,84 @@
+#!/usr/bin/perl -w
+use strict;
+use File::Temp qw/tempfile/;
+
+# check the lzma image size against the limit specified in common/ruby_partitions.h,
+# and complain loudly if it is too big
+
+my $header_file = "common/ruby_partitions.h";
+my $sizedef = "IMG_SIZE_LIMIT_PLATFORM";
+my $tmppath;
+my $csrc = "
+#include <stdio.h>
+#include <common/ruby_config.h>
+#include <$header_file>
+int main(int argc, char **argv)
+{
+	printf(\"0x%lx\\n\", (unsigned long)($sizedef));
+	return 0;
+}
+";
+
+END {
+	if ($tmppath) {
+		unlink ($tmppath);
+		unlink ($tmppath.".out");
+	}
+}
+
+my $image_file = `ls -1tr tftp/*-linux*lzma* | tail -n 1`;
+my $maxsize = 0;
+
+if ($#ARGV >= 0) {
+	$image_file = $ARGV[0];
+}
+$image_file =~ s/^\s*(.*?)\s*$/$1/g;
+
+if ($#ARGV >= 1) {
+	$maxsize = $ARGV[1];
+}
+
+unless (-e $image_file) {
+	die "Cannot find appropriate image file! $image_file\n";
+}
+unless (-e $header_file) {
+	die "Cannot find header file: $header_file\n";
+}
+my $imagesize = -s $image_file;
+if ($maxsize == 0) {
+	# create C file to get the preprocessor value
+	my ($fh, $tmppath) = tempfile();
+	print $fh $csrc or die "$0: could not write to $tmppath: $!\n";
+	close $fh;
+
+	my $val = `cat $tmppath | gcc -I. -xc - -o $tmppath.out && $tmppath.out`;
+	$val =~ s/^\s*(.*?)\s*$/$1/g;
+	$maxsize = hex($val);
+	unlink ($tmppath);
+	unlink ($tmppath.".out");
+
+}
+
+if (!($maxsize > 1)) {
+	die "Invalid max_size or could not find '$sizedef' in file '$header_file'\n";
+}
+
+my $diff = $maxsize - $imagesize;
+if ($diff < 0) {
+	warn "#############################################################################\n";
+	warn "#############################################################################\n";
+	warn "####\n";
+	warn "#### WARNING!!!! $image_file is oversize!\n";
+	warn "####\n";
+	warn "#### limit: $maxsize\n";
+	warn "#### size: $imagesize\n";
+	warn "#### difference: $diff\n";
+	warn "####\n";
+	warn "#############################################################################\n";
+	warn "#############################################################################\n";
+	die "\n";
+}
+else {
+	print "$0: $image_file fits, size: $imagesize < maxsize: $maxsize, spare: $diff\n";
+}
+
diff --git a/quantenna/host/utilities/create_fwupdate_sh.mk b/quantenna/host/utilities/create_fwupdate_sh.mk
new file mode 100644
index 0000000..df67054
--- /dev/null
+++ b/quantenna/host/utilities/create_fwupdate_sh.mk
@@ -0,0 +1,93 @@
+FLASHPART = /dev/mtd0
+
+%.update.sh: %
+	rm -f $@
+	echo	'#!/bin/sh'						>>$@
+	echo	''							>>$@
+	echo	'flashpart=$(FLASHPART)'				>>$@
+	echo	'newfw=${<F}'						>>$@
+	echo	'flashtmp=/tmp/flash.tmp'				>>$@
+	echo	'realsize='`cat $< | wc -c | awk '{print $$1}'`		>>$@
+	echo	'realmd5='`cat $< | md5sum | awk '{print $$1}'`		>>$@
+	echo	''							>>$@
+	echo	'getsize()'						>>$@
+	echo	'{'							>>$@
+	echo	"	cat \$$1 | wc -c | awk '{print \$$1}'"		>>$@
+	echo	'}'							>>$@
+	echo	''							>>$@
+	echo	'getmd5()'						>>$@
+	echo	'{'							>>$@
+	echo	"	cat \$$1 | md5sum | awk '{print \$$1}'"		>>$@
+	echo	'}'							>>$@
+	echo	''							>>$@
+	echo	'echo "$$0: Extracting $$newfw..."'			>>$@
+	echo	'uudecode > $$newfw <<EOF'				>>$@
+	cat $< | uuencode -m ${<F} >>$@
+	echo	'EOF'							>>$@
+	echo	''							>>$@
+	echo	'if [ ! -e $$flashpart -o ! -e $$newfw ] ; then'		>>$@
+	echo	'	echo Upgrade FAILED: files do not exist'	>>$@
+	echo	'	exit 2'						>>$@
+	echo	'fi'							>>$@
+	echo	''							>>$@
+	echo	'echo "$$0: Checking $$newfw..."'				>>$@
+	echo	'filesize=$$(getsize $$newfw)'				>>$@
+	echo	'if [ $$filesize -ne $$realsize ] ; then'		>>$@
+	echo	'	echo Upgrade FAILED: $$newfw should be size $$realsize'	>>$@
+	echo	'	exit 2'						>>$@
+	echo	'fi'							>>$@
+	echo	''							>>$@
+	echo	'echo "$$0: Checking $$flashpart..."'			>>$@
+	echo	'flashsize=$$(getsize $$flashpart)'			>>$@
+	echo	'if [ $$filesize -gt $$flashsize ] ; then'		>>$@
+	echo	'	echo Upgrade FAILED: $$flashpart too small for $$newfw'	>>$@
+	echo	'	exit 2'						>>$@
+	echo	'fi'							>>$@
+	echo	''							>>$@
+	echo	'if [ $$(($$filesize * 2)) -lt $$flashsize ] ; then'		>>$@
+	echo	'	echo Upgrade FAILED: $$newfw seems too small for $$flashpart... aborting'	>>$@
+	echo	'	exit 2'						>>$@
+	echo	'fi'							>>$@
+	echo	''							>>$@
+	echo	'filemd5=$$(getmd5 $$newfw)'				>>$@
+	echo	'if [ "$$filemd5" != "$$realmd5" ] ; then' 		>>$@
+	echo	'	echo Upgrade FAILED: md5sum incorrect'		>>$@
+	echo	'	exit 2'						>>$@
+	echo	'fi'							>>$@
+	echo	''							>>$@
+	echo	'dd if=$$flashpart bs=1 count=$$filesize of=$$flashtmp'	>>$@
+	echo	'if [ $$? -ne 0 ] ; then'				>>$@
+	echo	'	echo Upgrade FAILED: could not read $$flashpart'	>>$@
+	echo	'	exit 2'						>>$@
+	echo	'fi'							>>$@
+	echo	''							>>$@
+	echo	'flashmd5=$$(getmd5 $$flashtmp)'			>>$@
+	echo	'if [ "$$filemd5" == "$$flashmd5" ] ; then'		>>$@
+	echo	'	echo $$flashpart already matches $$newfw, no upgrade necessary'	>>$@
+	echo	'	exit 0'						>>$@
+	echo	'fi'							>>$@
+	echo	''							>>$@
+	echo	'echo "$$0: Writing $$newfw to $$flashpart..."'		>>$@
+	echo	'(sync					&& \'		>>$@
+	echo	'	flash_eraseall $$flashpart	&& \'		>>$@
+	echo	'	sleep 1				&& \'		>>$@
+	echo	'	cat $$newfw > $$flashpart		&& \'		>>$@
+	echo	'	sleep 1)			|| \'		>>$@
+	echo	'	(echo Upgrade FAILED, flash likely corrupt && exit 1)'	>>$@
+	echo	''							>>$@
+	echo	'echo "$$0: Verifying $$flashpart..."'			>>$@
+	echo	'dd if=$$flashpart bs=1 count=$$filesize of=$$flashtmp'	>>$@
+	echo	'if [ $$? -ne 0 ] ; then'				>>$@
+	echo	'	echo Verify FAILED: could not read $$flashpart'	>>$@
+	echo	'	exit 2'						>>$@
+	echo	'fi'							>>$@
+	echo	''							>>$@
+	echo	'flashmd5=$$(getmd5 $$flashtmp)'			>>$@
+	echo	'if [ "$$filemd5" != "$$flashmd5" ] ; then'		>>$@
+	echo	'	echo Verify FAILED: $$flashpart does not match $$newfw after write'	>>$@
+	echo	'	exit 1'						>>$@
+	echo	'fi'							>>$@
+	echo	''							>>$@
+	echo	'echo Upgrade and verify successful'			>>$@
+	chmod a+rx $@
+
diff --git a/quantenna/host/utilities/depmod b/quantenna/host/utilities/depmod
new file mode 100755
index 0000000..6ed6f70
--- /dev/null
+++ b/quantenna/host/utilities/depmod
Binary files differ
diff --git a/quantenna/host/utilities/eth_macaddr_gen.php b/quantenna/host/utilities/eth_macaddr_gen.php
new file mode 100644
index 0000000..c0d7d95
--- /dev/null
+++ b/quantenna/host/utilities/eth_macaddr_gen.php
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<?php
+	if(file_exists("eth_macaddrs.txt"))
+	{
+		$curr_wmacaddr = file_get_contents("eth_macaddrs.txt");
+
+        	list($new_wifi[0], $new_wifi[1], $new_wifi[2], $new_wifi[3], $new_wifi[4], $new_wifi[5]) = explode(":", $curr_wmacaddr);
+
+        	$new_wifi[5] = hexdec($new_wifi[5]);
+
+		if($new_wifi[5]  >= 255 )
+		{
+			$new_wifi[5] = 0;
+			$new_wifi[5] = sprintf("%02X", $new_wifi[5]);
+        		$new_wifi[4] = hexdec($new_wifi[4]);
+
+			if($new_wifi[4]  >= 255 )
+			{
+				$new_wifi[4] = 0;
+				$new_wifi[4] = sprintf("%02X", $new_wifi[4]);
+        			$new_wifi[3] = hexdec($new_wifi[3]);
+
+				if($new_wifi[3]  >= 255 )
+				{
+					$new_wifi[3] = 0;
+					$new_wifi[3] = sprintf("%02X", $new_wifi[3]);
+        				$new_wifi[2] = hexdec($new_wifi[2]);
+
+					if($new_wifi[2]  >= 255 )
+					{
+						$new_wifi[2] = 0;
+						$new_wifi[2] = sprintf("%02X", $new_wifi[2]);
+        					$new_wifi[1] = hexdec($new_wifi[1]);
+
+						if($new_wifi[1]  >= 255 )
+						{
+							$new_wifi[1] = 0;
+							$new_wifi[1] = sprintf("%02X", $new_wifi[1]);
+        						$new_wifi[0] = hexdec($new_wifi[0]);
+							$new_wifi[0] = $new_wifi[0] + 1;
+							$new_wifi[0] = sprintf("%02X", $new_wifi[0]);
+						}
+						else
+						{
+        						$new_wifi[1] = $new_wifi[1] + 1;
+							$new_wifi[1] = sprintf("%02X", $new_wifi[1]);
+						}
+					}
+					else
+					{
+        					$new_wifi[2] = $new_wifi[2] + 1;
+						$new_wifi[2] = sprintf("%02X", $new_wifi[2]);
+					}
+				}
+				else
+				{
+        				$new_wifi[3] = $new_wifi[3] + 1;
+					$new_wifi[3] = sprintf("%02X", $new_wifi[3]);
+				}
+			}
+			else
+			{
+				$new_wifi[4] = $new_wifi[4] + 1;
+				$new_wifi[4] = sprintf("%02X", $new_wifi[4]);
+			}
+		}
+		else
+		{
+        		$new_wifi[5] = $new_wifi[5] + 1;
+			$new_wifi[5] = sprintf("%02X", $new_wifi[5]);
+		}
+
+        	$arr = array($new_wifi[0], $new_wifi[1], $new_wifi[2], $new_wifi[3], $new_wifi[4], $new_wifi[5]);
+        	$new_wmacaddr1 = implode(":", $arr);
+		file_put_contents("eth_macaddrs.txt", $new_wmacaddr1);
+	}
+	else
+	{
+		//This is first time file is created
+		$first_wmacaddr = "00:26:86:00:00:00";
+		file_put_contents("eth_macaddrs.txt", $first_wmacaddr);
+	}
+?>
+</HTML>
diff --git a/quantenna/host/utilities/gwcomm b/quantenna/host/utilities/gwcomm
new file mode 100755
index 0000000..753a74f
--- /dev/null
+++ b/quantenna/host/utilities/gwcomm
@@ -0,0 +1,157 @@
+#!/usr/bin/python
+
+#
+# Talk to a GwInstek GPD-4303s benchtop power supply
+#
+
+import time
+import serial
+import getopt
+import sys
+import subprocess
+import re
+import curses
+
+def findDevice():
+	p = subprocess.Popen("dmesg", stdout = subprocess.PIPE, stderr = subprocess.PIPE)
+	pout, perr = p.communicate()
+	device = None
+	for line in pout.split("\n"):
+		if 'FTDI USB Serial Device converter now attached' in line:
+			device = '/dev/' + line.split()[-1]
+	return device
+
+def parseArgs(cfg):
+	try:
+		opts, args = getopt.getopt(sys.argv[1:], "hD:v", ["help", "device=", "port1=", "port2=", "port3=", "port4="])
+	except getopt.GetoptError, err:
+		print str(err)
+		print usage()
+		sys.exit(2)
+
+	device = None
+	for o, a in opts:
+		if o in ("-h", "--help"):
+			print usage()
+			sys.exit(0)
+		elif o in ("-D", "--device"):
+			device = a
+		elif o in ("--port1", "--port2", "--port3", "--port4"):
+			port = int(o[6:])
+			cfg['port'][port]['name'] = a
+		else:
+			assert False, "unhandled option"
+
+	if device == None:
+		device = findDevice()
+	if device == None:
+		print "Could not find serial device. Try -D argument"
+		sys.exit(2)
+
+	return device
+
+def numQuery(ser, string):
+	ser.write(string + "\n")
+	l = ser.readline()
+	# return only the number
+	return float(re.compile('[^\\d\\.]').sub('', l))
+
+def getCurrent(ser, port):
+	return numQuery(ser, "IOUT" + str(port) + "?")
+
+def getVoltage(ser, port):
+	return numQuery(ser, "VOUT" + str(port) + "?")
+
+def setup(ser, port, voltage):
+	ser.write("VSET" + str(port) + ":" + str(voltage) + "\n")
+
+def enableOutput(ser):
+	ser.write("OUT1\n")
+
+def getavg(samples, now, seconds):
+	r = [w for (t, w) in samples if t + seconds >= now]
+	return (seconds, sum(r), len(r))
+
+def getPort(cfg, ser, port):
+	voltage = cfg['port'][port]['voltage']
+	samples = cfg['port'][port]['samples']
+	history = cfg['history']
+	try:
+		current = getCurrent(ser, port)
+		watts = voltage * current
+		now = time.time()
+		samples.append((now, watts))
+		samples = [(t, w) for (t, w) in samples if t + max(history) >= now]
+		timeaverages = [(0, watts, 1)] + [getavg(samples, now, s) for s in history]
+		cfg['port'][port]['samples'] = samples
+		return ', '.join(["%ds: %1.4fW (%d)" % (s, w / l, l) for (s, w, l) in timeaverages])
+	except:
+		return ''
+
+
+def runLoop(cfg, ser, stdscr):
+	for port in cfg['ports']:
+		cfg['port'][port]['samples'] = []
+	running = True
+	while running:
+		stdscr.addstr(0, 0, cfg['id'] + ' (press \'q\' to quit)')
+		for port in cfg['ports']:
+			portname = cfg['port'][port]['name']
+			s = getPort(cfg, ser, port)
+			stdscr.addstr(port, 0, portname + ": " + s)
+		c = stdscr.getch()
+		if c in [27, ord('q')]:
+			running = False
+		stdscr.refresh()
+
+def initCurses():
+	stdscr = curses.initscr()
+	curses.noecho()
+	curses.cbreak()
+	curses.noqiflush()
+	stdscr.nodelay(True)
+	return stdscr
+
+def exitCurses():
+	curses.endwin()
+
+def run(cfg, ser):
+	stdscr = initCurses()
+	for port in cfg['ports']:
+		setup(ser, port, cfg['port'][port]['voltage'])
+	enableOutput(ser)
+	runLoop(cfg, ser, stdscr)
+	exitCurses()
+
+def runSerial(cfg, device):
+	ser = serial.Serial(
+			port = device,
+			baudrate = 9600,
+			parity = serial.PARITY_NONE,
+			stopbits = serial.STOPBITS_ONE,
+			bytesize = serial.EIGHTBITS,
+			timeout = 2)
+	ser.open()
+	if ser.isOpen():
+		ser.write("*IDN?\n")
+		id = ser.readline()
+		if "GW INSTEK" in id:
+			print "Connected to: " + id,
+			cfg['id'] = id.strip()
+			run(cfg, ser)
+		else:
+			print "Power supply not found on " + device
+	ser.close()
+
+if __name__ == '__main__':
+	cfg = {}
+	cfg['port'] = {}
+	cfg['ports'] = [1, 2]
+	cfg['history'] = [1, 10, 60]	#seconds
+	for port in cfg['ports']:
+		cfg['port'][port] = {}
+		cfg['port'][port]['voltage'] = 5.000
+		cfg['port'][port]['name'] = 'port' + str(port)
+	device = parseArgs(cfg)
+	runSerial(cfg, device)
+
diff --git a/quantenna/host/utilities/kernel_base_util.c b/quantenna/host/utilities/kernel_base_util.c
new file mode 100644
index 0000000..63ceda8
--- /dev/null
+++ b/quantenna/host/utilities/kernel_base_util.c
@@ -0,0 +1,26 @@
+/*
+ * (C) Copyright 2013 Quantenna Communications, Inc.
+ *
+ * Script to print the kernel base address.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include "ruby_mem.h"
+
+int main(int argc, char **argv)
+{
+	const char *prog = argv[0];
+
+	if (argc == 2 && strcmp(argv[1], "-e") == 0) {
+		fprintf(stdout, "0x%08x", RUBY_DRAM_BEGIN + CONFIG_ARC_KERNEL_BASE);
+	} else if (argc == 2 && strcmp(argv[1], "-a") == 0) {
+		fprintf(stdout, "0x%08x", RUBY_DRAM_BEGIN + CONFIG_ARC_KERNEL_BOOT_BASE);
+	} else {
+		fprintf(stderr, "Usage, %s {-a | -e}\n", prog);
+		return 1;
+	}
+
+	return 0;
+}
+
diff --git a/quantenna/host/utilities/lzma b/quantenna/host/utilities/lzma
new file mode 100755
index 0000000..ca5804f
--- /dev/null
+++ b/quantenna/host/utilities/lzma
Binary files differ
diff --git a/quantenna/host/utilities/mac_addr.h b/quantenna/host/utilities/mac_addr.h
new file mode 100644
index 0000000..6071341
--- /dev/null
+++ b/quantenna/host/utilities/mac_addr.h
@@ -0,0 +1,25 @@
+#ifndef _MAC_ADDR_TARGET_H_
+#define _MAC_ADDR_TARGET_H_
+
+/* error return codes */
+#define EQDRV_NOT_LOADED         	-2
+#define ENO_MAC_ADDR_FILE           -3
+#define ENO_DEFAULT_MAC_ADDR_FILE   -4 
+
+/* Data Structures */
+struct mac_addr_block {
+	unsigned char	mac0_addr[6];
+	unsigned char	mac1_addr[6];
+	unsigned char	mac2_addr[6];
+	unsigned char	mac3_addr[6];
+};
+
+/* prototypes */
+
+static int init();
+static int clean_up(void);
+static int read_mac_addr_file(void);
+static int read_mac_addr(void);
+static int set_mac_address(void);
+
+#endif /* _MAC_ADDR_TARGET_H_ */
diff --git a/quantenna/host/utilities/mac_inventory.bin b/quantenna/host/utilities/mac_inventory.bin
new file mode 100644
index 0000000..8b32737
--- /dev/null
+++ b/quantenna/host/utilities/mac_inventory.bin
Binary files differ
diff --git a/quantenna/host/utilities/macaddr.c b/quantenna/host/utilities/macaddr.c
new file mode 100644
index 0000000..c6a6951
--- /dev/null
+++ b/quantenna/host/utilities/macaddr.c
@@ -0,0 +1,131 @@
+#include <stdio.h>
+#include <string.h>
+#include "mac_addr.h"
+
+static const char* mac_addr_file_loc = "wifi_mac_addrs";
+static const char* inventory_mac_addr_file_loc = "mac_inventory.bin";
+
+static void build_mac_database(void);
+
+struct mac_addr_block default_blk;
+
+int main()
+{
+	FILE *mac_inv;
+	FILE *mac_addrs;
+	struct mac_addr_block blk;
+
+	mac_inv = fopen(inventory_mac_addr_file_loc, "r");
+	if(mac_inv == NULL)
+	{
+		build_mac_database();
+		mac_inv = fopen(inventory_mac_addr_file_loc, "w+");
+		if(mac_inv)
+		{
+			fwrite(&default_blk, sizeof(struct mac_addr_block), 1, mac_inv); 
+			fclose(mac_inv);
+		}
+		else
+			return; //File opening error
+	}
+
+	mac_addrs = fopen(mac_addr_file_loc, "r");
+	if(mac_addrs == NULL)
+	{
+		mac_inv = fopen(inventory_mac_addr_file_loc, "r+");
+		if(mac_inv == NULL)
+			return; //File opening error
+		mac_addrs = fopen(mac_addr_file_loc, "w+");
+		if(mac_addrs)
+		{
+			rewind(mac_inv);
+			fread(&blk, sizeof(struct mac_addr_block), 1, mac_inv); 
+			
+			if((blk.mac0_addr[0]+4) > 126)
+			{
+				blk.mac0_addr[0] = 2;
+				blk.mac0_addr[1]++;
+
+				blk.mac1_addr[0] = blk.mac0_addr[0] + 1;
+				blk.mac2_addr[0] = blk.mac0_addr[0] + 2;
+				blk.mac3_addr[0] = blk.mac0_addr[0] + 3;
+
+				blk.mac1_addr[1] = blk.mac0_addr[1];
+				blk.mac2_addr[1] = blk.mac0_addr[1];
+				blk.mac3_addr[1] = blk.mac0_addr[1];
+			}
+			else
+			{
+				blk.mac0_addr[0] +=4;
+				blk.mac1_addr[0] = blk.mac0_addr[0] + 1;
+				blk.mac2_addr[0] = blk.mac0_addr[0] + 2;
+				blk.mac3_addr[0] = blk.mac0_addr[0] + 3;
+			}
+
+			fprintf(mac_addrs, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
+			blk.mac0_addr[5],blk.mac0_addr[4],
+			blk.mac0_addr[3],blk.mac0_addr[2],
+			blk.mac0_addr[1],blk.mac0_addr[0]);
+			fflush(mac_addrs);
+
+			fprintf(mac_addrs, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
+			blk.mac1_addr[5],blk.mac1_addr[4],
+			blk.mac1_addr[3],blk.mac1_addr[2],
+			blk.mac1_addr[1],blk.mac1_addr[0]);
+			fflush(mac_addrs);
+
+			fprintf(mac_addrs, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
+			blk.mac2_addr[5],blk.mac2_addr[4],
+			blk.mac2_addr[3],blk.mac2_addr[2],
+			blk.mac2_addr[1],blk.mac2_addr[0]);
+			fflush(mac_addrs);
+
+			fprintf(mac_addrs, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x",
+			blk.mac3_addr[5],blk.mac3_addr[4],
+			blk.mac3_addr[3],blk.mac3_addr[2],
+			blk.mac3_addr[1],blk.mac3_addr[0]);
+			fflush(mac_addrs);
+
+			fclose(mac_addrs);
+	
+			/* Update the database as well */
+			rewind(mac_inv);
+			fwrite(&blk, sizeof(struct mac_addr_block), 1, mac_inv); 
+		}
+		else
+			printf("Couldn't open mac_addr file\n");
+
+		fclose(mac_inv);
+	}
+
+}
+
+static void build_mac_database(void)
+{
+	unsigned int low_addr;
+	unsigned int high_addr;
+
+	low_addr = 0x16171902;
+	high_addr = 0x1415;
+
+	memcpy(default_blk.mac0_addr, &low_addr, 4);
+	memcpy((default_blk.mac0_addr+4), &high_addr, 2);
+
+	low_addr = 0x16171903;
+	high_addr = 0x1415;
+
+	memcpy(default_blk.mac1_addr, &low_addr, 4);
+	memcpy(default_blk.mac1_addr+4, &high_addr, 2);
+
+	low_addr = 0x16171904;
+	high_addr = 0x1415;
+
+	memcpy(default_blk.mac2_addr, &low_addr, 4);
+	memcpy(default_blk.mac2_addr+4, &high_addr, 2);
+
+	low_addr = 0x16171905;
+	high_addr = 0x1415;
+
+	memcpy(default_blk.mac3_addr, &low_addr, 4);
+	memcpy(default_blk.mac3_addr+4, &high_addr, 2);
+}
diff --git a/quantenna/host/utilities/md_random_read.pl b/quantenna/host/utilities/md_random_read.pl
new file mode 100755
index 0000000..d00a3d5
--- /dev/null
+++ b/quantenna/host/utilities/md_random_read.pl
@@ -0,0 +1,74 @@
+#!/usr/bin/perl -w
+# Script for testing mem_dbg.ko 
+
+$| = 1;
+use strict;
+use Net::Telnet;
+
+my $target_addr = "192.168.1.200";
+my $clycles = 0; # 0 = infinite number of cycles
+my $param;
+
+my $max_block_count = 0xFF; # Maximun number of 4 byte blocks to read
+my @safe_regions = ([0x70000000,0x90000000 - $max_block_count]);
+                   # [0xE0000000,0xFA000000]); # The end of the last region might be exceeded
+my $safe_regions_count = @safe_regions;
+my $current_region = 0;
+
+sub generate_read_address {
+	my $addr = int(rand($safe_regions[$current_region][1] - $safe_regions[$current_region][0])) + $safe_regions[$current_region][0];
+	if(++ $current_region == $safe_regions_count) {
+		$current_region = 0;
+	}
+	return $addr;
+}
+
+while($param = shift) {
+	if($param eq "-a" ) {
+		if(!($target_addr = shift)) {
+			print "Target address of target board should be specified after -a switch\n";
+			exit 1;
+		}
+	}
+	if($param eq "-c" ) {
+		if(!($clycles = shift)) {
+			print "Cycles count must be specified after -c switch\n";
+			exit 1;
+		}
+	}
+}
+
+my $telnet_session = new Net::Telnet (Timeout => 25,errmode => "return");
+
+while(1)
+{
+	my $read_addr = generate_read_address();
+	print "Connecting to the target... ";
+	if($telnet_session->open($target_addr)) {
+		print "ok\n";
+
+		$telnet_session->buffer_empty();
+		$telnet_session->waitfor("/login/i");
+		$telnet_session->print("root");
+		$telnet_session->waitfor("/quantenna/i");
+
+		my $read_addr = generate_read_address();
+
+		my $cmd = sprintf("md 0x%08X 0x%08X",$read_addr,int(rand($max_block_count)));
+		print "Executing cmd \"$cmd\"... ";
+		$telnet_session->print($cmd);
+		if($telnet_session->waitfor(String => "quantenna #", Timeout => 10)) {
+			printf "success\n";
+		} else {
+			printf "timeout\n";
+		}
+
+		$telnet_session->close();
+		
+		if($clycles > 0 && --$clycles == 0) {
+			exit 0;
+		}
+	} else {
+		print "timeout\n";
+	}
+}
diff --git a/quantenna/host/utilities/most_recent_version.pl b/quantenna/host/utilities/most_recent_version.pl
new file mode 100755
index 0000000..fa35236
--- /dev/null
+++ b/quantenna/host/utilities/most_recent_version.pl
@@ -0,0 +1,41 @@
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+use List::Util qw(max); 
+use Cwd qw(abs_path getcwd); 
+use File::Spec; 
+
+my $cwd = getcwd(); 
+
+my @allfiles;
+my @allversions;
+
+if ($#ARGV < 0) {
+	warn "$0, finds the most recent perforce version from files provided as arguments\n";
+	warn "Usage: $0 <files>\n";
+	die "\n";
+}
+
+# get all filenames, converting them to real path; allows use of symlinks which p4 doesn't allow
+for (my $i = 0; $i <= $#ARGV; $i++) {
+	my $filename = $ARGV[$i];
+	unless (-e $filename) { 
+		die "File: $filename doesnt exist\n";
+	}
+	my $relfile = File::Spec->abs2rel(abs_path($filename), $cwd);
+	push (@allfiles, $relfile);
+}
+
+# extract versions from 'p4 files' 
+my @p4output = `p4 files @allfiles`;
+foreach my $p4line (@p4output) {
+	my $version = $p4line; 
+	$version =~ s/^.*\s+\b(\d+)\b\s+.*?\s*$/$1/g;
+	#print "$p4line has version $version\n";
+	push(@allversions, $version);
+}
+
+my $max = max(@allversions);
+print "$max\n";
+
+
diff --git a/quantenna/host/utilities/parsedump b/quantenna/host/utilities/parsedump
new file mode 100755
index 0000000..afa9a1a
--- /dev/null
+++ b/quantenna/host/utilities/parsedump
@@ -0,0 +1,111 @@
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+
+my $instructions = "
+$0
+Usage:
+	cat dump | $0 --bin u-boot/u-boot	# read from stdin, using u-boot for symbols
+	$0 --bin linux/vmlinux dump		# read from file 'dump' using linux for symbols
+
+take any fragment of text that has pointers in it from a file or stdin; 
+load symbol table of desired file through objdump, then convert hex pointers to symbols.
+
+Arguments:	--bin <file>	executable to read symbol table from.
+";
+
+use File::Basename;
+use File::Spec;
+use Getopt::Long;
+use Cwd 'abs_path';
+BEGIN { push(@INC, abs_path(dirname(__FILE__))); }
+use arcsymbols;
+my $script_path = dirname(__FILE__);
+
+if (!caller) {
+	&main;
+}
+
+sub main {
+	my $help = undef;
+	my $bin_path = "$script_path/../../macfw/qtn_ruby";
+	my $result = GetOptions(
+		"help"		=> \$help,
+		"bin=s"		=> \$bin_path,
+	);
+
+	if ($help) {
+		die "$instructions\n";
+	}
+
+	&convert_lines($bin_path);
+}
+
+sub convert_lines {
+	my $bin_path = shift;
+
+	my @symbol_stores;
+
+	push @symbol_stores, new arcsymbols($bin_path);
+
+	if ($#ARGV >= 0) {
+		foreach my $dump_file (@ARGV) {
+			open(F, $dump_file) or die "Could not load dump file: $dump_file: $!\n";
+			read_file_convert(*F, \@symbol_stores);
+			close(F);
+		}
+	} else {
+		read_file_convert(*STDIN, \@symbol_stores);
+	}
+}
+
+sub read_file_convert {
+	my ($fh, $symbols_ref) = @_;
+
+	my @symbol_stores = @{$symbols_ref};
+
+	my $last_saw_parsedump_helper = 0;
+	my $parsedump_helper_sections = {};
+
+	while(<$fh>) {
+		if ( /^parsedump\s+([\w_]+)\s+([\.\w_]+)\s+(0x[a-fA-F0-9]+)\s*$/ ) {
+			my $module_name = $1;
+			my $section_name = $2;
+			my $section_addr = hex($3);
+			$parsedump_helper_sections->{$module_name}->{$section_name} = $section_addr;
+			$last_saw_parsedump_helper = 1;
+		} else {
+			if ($last_saw_parsedump_helper) {
+				foreach my $module_name (sort keys %{$parsedump_helper_sections}) {
+					foreach my $mod_path (<$script_path/../../drivers/*/$module_name.ko>) {
+						my $mod_rel = File::Spec->abs2rel(abs_path($mod_path));
+						warn "$0: Loading symbols from '$mod_rel'\n";
+						push @symbol_stores, new arcsymbols($mod_rel, $parsedump_helper_sections->{$module_name});
+					}
+				}
+				$last_saw_parsedump_helper = 0;
+				$parsedump_helper_sections = {};
+			}
+			s/\b(0x[\d\w]+)\b/fix_hex($1, \@symbol_stores)/eg;
+			print;
+		}
+	}
+}
+
+sub fix_hex {
+	my ($addr_str, $symbol_stores_ref) = @_;
+
+	my $addr = hex($addr_str);
+	foreach my $store (@{$symbol_stores_ref}) {
+		my $symbol = $store->find_symbol($addr);
+
+		if ($symbol) {
+			my $symbol_name = $symbol->{name};
+			my $offset = $addr - $symbol->{addr};
+			return sprintf("%s (%s+0x%x)", $addr_str, $symbol_name, $offset);
+		}
+	}
+
+	return $addr_str;
+}
+
diff --git a/quantenna/host/utilities/prof.pl b/quantenna/host/utilities/prof.pl
new file mode 100755
index 0000000..31f2af4
--- /dev/null
+++ b/quantenna/host/utilities/prof.pl
@@ -0,0 +1,297 @@
+#!/usr/bin/perl -w
+my $instructions = "
+Usage: $0 <file> to read statistics from a file. Use '-' to read from stdin.
+
+Options:
+	--depth	<n>	Show n levels of call graph edges, default = 1
+
+	--calledby	Show the callers for each entry
+";
+
+use strict;
+use warnings;
+use Math::BigInt;
+use Math::BigFloat;
+use Getopt::Long;
+use File::Basename;
+use List::Util qw[min max];
+BEGIN {
+	push @INC, dirname(__FILE__);
+}       
+use arcsymbols;
+
+my $swdepot = dirname(__FILE__)."/../..";
+
+my $muc = undef;
+my $csv = undef;
+my $help = undef;
+my $clockrate = 400000000;
+my $objdump = "/usr/local/ARC/gcc/bin/arc-linux-uclibc-objdump";
+my $muc_path = "$swdepot/macfw/qtn_ruby";
+my $sort_field = "cycles_exc_callees";
+my $maxdepth = 1;
+my $calledby = undef;
+my @all_objs = `echo $swdepot/linux/vmlinux ; find $swdepot/drivers -name \*.ko`;
+
+my %allsyms;
+foreach (@all_objs) {
+	chomp;chomp;
+	$allsyms{$_} = new arcsymbols($_);
+}
+
+sub fixfunc {
+	my ($name, $offset, $size) = @_;
+	if ($offset > 0) {
+		# find symbol, compare sizes; some functions are omitted in kallsyms
+		foreach my $bin (reverse sort keys %allsyms) {
+			my $changed = undef;
+			($name, $offset, $size, $changed) = $allsyms{$bin}->fixfunc($name, $offset, $size);
+			if ($changed == 1) {
+				last;
+			}
+		}
+	}	
+	return ($name, $offset, $size);
+}
+
+
+my $result = GetOptions(
+	"csv"		=> \$csv,
+	"help"		=> \$help,
+	"clockrate=s"	=> \$clockrate,
+	"muc_bin"	=> \$muc_path,
+	"sort=s"	=> \$sort_field,
+	"depth=s"	=> \$maxdepth,
+	"calledby"	=> \$calledby,
+);
+
+$clockrate = int($clockrate);
+if ($help || $#ARGV < 0) {
+	die $instructions;
+}
+
+my %funcs = parsedata(readfile($ARGV[0]));
+
+if ($csv) {
+	$" = ", ";
+	my @fields = (
+		"Function",
+		"Module",
+		"Cycles w/o subs",
+		"Cycles w/ subs",
+		"Call count",
+		"Cycles w/o subs per iter",
+		"Offsets",
+		"Pct% time w/o subs",
+		"Function size",
+		"Blockiness (cyc/iter/size)",
+		"Time w/o subs (".($clockrate / 1000000)." MHz)",
+	);
+
+	print "@fields\n";
+
+	foreach my $func (sort { $funcs{$b}->{$sort_field} <=> $funcs{$a}->{$sort_field} } keys %funcs) {
+		my $f = $funcs{$func};
+		my @data = (
+			$func,
+			$f->{module},
+			$f->{cycles_exc_callees},
+			$f->{cycles_inc_callees},
+			$f->{calls},
+			$f->{cycles_per_iter_exc_callees},
+			$f->{offsets},
+			$f->{percent},
+			$f->{size},
+			$f->{blockiness},
+			$f->{time_exc_callees});
+		print "@data\n";
+	}
+} else {
+	my $pattern = "%-9s %14s %16s %8s %7s %4s  %10s %8s %8s %s %s\n";
+	printf($pattern, "Dpth", "Cycles w/o subs", "Cycles w/ subs", "Calls", "cwospi", "Ofs", "Pct%", "FuncSize", "blocky", "Func", "", "");
+	my @sorted_funcs = sort { $funcs{$b}->{$sort_field} <=> $funcs{$a}->{$sort_field} } keys %funcs;
+	foreach my $func (@sorted_funcs) {
+		recursive_print_func($pattern, $func, 0, $maxdepth, \@sorted_funcs);
+	}
+}
+
+sub recursive_print_func {
+	my ($pattern, $func, $depth, $max_depth, $sorted_funcs_ref) = @_;
+	return if ($depth >= $max_depth);
+	print_func_line($pattern, $func, $funcs{$func}, $depth);
+	foreach my $nextfunc (@{$sorted_funcs_ref}) {
+		if ($funcs{$nextfunc}->{parents}->{$func}) {
+			recursive_print_func($pattern, $nextfunc, $depth+1, $max_depth, $sorted_funcs_ref);
+		}
+	}
+
+	if ($depth == 0 && $calledby) {
+		# add called by lines...
+		my @parents_sorted = sort { 
+			$funcs{$func}->{parents}->{$b}->{$sort_field} <=> $funcs{$func}->{parents}->{$a}->{$sort_field} 
+		} keys %{$funcs{$func}->{parents}};
+		foreach my $parent_name (@parents_sorted) {
+			print_func_line($pattern, "   << $parent_name", $funcs{$func}->{parents}->{$parent_name}, -1);
+		}
+	}
+}
+
+sub print_func_line {
+	my ($pattern, $func, $f, $depth) = @_;
+	my $func_str = "";
+	my $indent = "";
+	if ($depth > 0) {
+		for (my $i = 0; $i < $depth; $i++) {
+			$func_str .= "   ";
+			$indent .= "  ";
+		}
+		$func_str .= " |__ ";
+		$indent .= "|__";
+	} elsif ($depth == 0) {
+		$indent = "#_";
+	} else {
+		$func_str = "  < ";
+		$indent .= "  < ";
+	}	
+
+	$func_str .= $f->{name};
+
+	my $cwospi = $f->{cycles_per_iter_exc_callees} || 0;
+	my $percent = $f->{percent} || 0;
+	my $blockiness = $f->{blockiness} || 0;
+	my $offsets = $f->{offsets} || 0;
+	printf $pattern,
+	$indent,
+	#sprintf($depth),
+	sprintf($f->{cycles_exc_callees}),
+	sprintf($f->{cycles_inc_callees}),
+	sprintf($f->{calls}),
+	sprintf($cwospi),
+	sprintf($offsets),
+	sprintf("%2.4g", $percent),
+	sprintf($f->{size}),
+	sprintf("%2.4g", $blockiness),
+	$func_str,
+	$f->{module};
+}
+
+
+
+sub readfile {
+	my $file = shift;
+	my @data;
+	if ($file eq "-") {
+		while(<STDIN>) {
+			push(@data, $_);
+		}
+	} else {
+		open(F, $file) or die "Could not open file '$file': $!\n";
+		while(<F>) {
+			push(@data, $_);
+		}
+		close(F);
+	}
+	return @data;
+}
+
+sub load_syms {
+	my $path = shift;
+	my %data;
+	unless ( -e $path ) {
+		warn "Could not find binary: $path, no function size data available\n";
+		return %data;
+	}
+
+	foreach (`$objdump -t $path`) {
+		if (/^([\w\d]+)\s+.*?\bF\b\s+\.\w+\s+([\w\d]+)\s+(\w+)\s*$/) {
+			my $addr = hex($1);
+			my $size = hex($2);
+			my $name = $3;
+			$data{$name}->{addr} = $addr;
+			$data{$name}->{size} = $size;
+			$data{$addr}->{name} = $name;
+			$data{$addr}->{size} = $size;
+		}
+	}
+
+	return %data;	
+}
+
+sub parsedata {
+	my @data = @_;
+	my %mucdata;
+	my %funcs;
+	my $total_cycles = 0;
+	foreach my $line (@data) {
+		$line =~ /^\s*([\w\d_]+)\+?(0x[\w\d]+|)\/?(0x[\w\d]+|)\s+(\[\w+\]\s+|)([\w\d_]+)\+?(0x[\w\d]+|)\/?(0x[\w\d]+|)\s+(\[\w+\]\s+|)(\d+)\s+(0x[\w\d]+)\s+(0x[\w\d]+)\s+(0x[\w\d]+)\s+(0x[\w\d]+)\s*.*?\s*$/;
+		my $funcname = $1;
+		my $offset = $2 ? hex($2) : 0;
+		my $funcsize = $3 ? hex($3) : 0;
+		my $module = $4 ? $4 : "";
+		my $calling_funcname = $5;
+		my $calling_offset = $6 ? hex($6) : 0;
+		my $calling_funcsize = $7 ? hex($7) : 0;
+		my $calling_module = $8 ? $8 : "";
+		my $calls = $9 ? int($9) : 0;
+		my $time_inc_callees = Math::BigInt->from_hex($10);
+		$time_inc_callees->blsft(32);
+		$time_inc_callees->bior(Math::BigInt->from_hex($11));
+		my $time_exc_callees = Math::BigInt->from_hex($12);
+		$time_exc_callees->blsft(32);
+		$time_exc_callees->bior(Math::BigInt->from_hex($13));
+
+		($funcname, $offset, $funcsize) = fixfunc($funcname, $offset, $funcsize);
+		($calling_funcname, $calling_offset, $calling_funcsize) = fixfunc($calling_funcname, $calling_offset, $calling_funcsize);
+		#print "FFFF $line\nAAAA $funcname $offset $funcsize $module $calls $time_inc_callees $time_exc_callees\n";
+		if ($funcsize == 0) {
+			$muc = 1;
+			%mucdata = &load_syms($muc_path) unless %mucdata;
+		}
+
+		if ($funcname && defined($time_inc_callees)) {
+			if ($muc && $mucdata{$funcname}->{size}) {
+				$funcsize = $mucdata{$funcname}->{size};
+			}
+			$funcs{$funcname}->{name} = $funcname;
+			$funcs{$funcname}->{parents}->{$calling_funcname}->{name} = $calling_funcname;
+			$funcs{$funcname}->{parents}->{$calling_funcname}->{calls} = $calls;
+			$funcs{$funcname}->{parents}->{$calling_funcname}->{cycles_inc_callees} = $time_inc_callees;
+			$funcs{$funcname}->{parents}->{$calling_funcname}->{cycles_exc_callees} = $time_exc_callees;
+			$funcs{$funcname}->{parents}->{$calling_funcname}->{offset} = $calling_offset;
+			$funcs{$funcname}->{parents}->{$calling_funcname}->{size} = $calling_funcsize;
+			$funcs{$funcname}->{parents}->{$calling_funcname}->{module} = $calling_module;
+			$funcs{$funcname}->{offset} = $offset;
+			$funcs{$funcname}->{size} = $funcsize;
+			$funcs{$funcname}->{module} = $module;
+			$funcs{$funcname}->{calls} += $calls;
+			$funcs{$funcname}->{offsets} += 1;
+			$funcs{$funcname}->{cycles_inc_callees} += $time_inc_callees;
+			$funcs{$funcname}->{cycles_exc_callees} += $time_exc_callees;
+			$total_cycles += $time_exc_callees;
+		} else {
+			warn "Error parsing line: $line";
+		}
+	}
+	foreach my $func (keys %funcs) {
+		my $f = Math::BigFloat->new(sprintf($funcs{$func}->{cycles_exc_callees}));
+		$f->bdiv(Math::BigFloat->new(sprintf($total_cycles)));
+		$f->bmul(100);
+		$funcs{$func}->{percent} = $f;
+
+		$f = Math::BigInt->new(sprintf($funcs{$func}->{cycles_exc_callees}));
+		$f->bdiv($funcs{$func}->{calls});
+		$funcs{$func}->{cycles_per_iter_exc_callees} = sprintf($f);
+
+		if ($funcs{$func}->{size} == 0) {
+			$funcs{$func}->{blockiness} = 0;
+		} else {
+			$funcs{$func}->{blockiness} = $funcs{$func}->{cycles_per_iter_exc_callees} / $funcs{$func}->{size};
+		}
+
+		$f = Math::BigFloat->new(sprintf($funcs{$func}->{cycles_exc_callees}));
+		$f->bdiv($clockrate);
+		$funcs{$func}->{time_exc_callees} = sprintf($f);
+	}
+	return %funcs;
+}
+
diff --git a/quantenna/host/utilities/prof_dcache.pl b/quantenna/host/utilities/prof_dcache.pl
new file mode 100755
index 0000000..a517339
--- /dev/null
+++ b/quantenna/host/utilities/prof_dcache.pl
@@ -0,0 +1,144 @@
+#!/usr/bin/perl -w
+my $instructions = "
+$0
+Usage:
+	cat dump | $0 --bin u-boot/u-boot	# read from stdin, using u-boot for symbols
+	$0 --bin linux/vmlinux dump		# read from file 'dump' using linux for symbols
+
+Takes output from dcache sampling code, sort by use and display with symbol data information.
+
+Arguments:	--bin <file>	executable to read symbol table from.
+";
+
+use strict;
+use warnings;
+use Getopt::Long;
+use File::Basename;
+BEGIN {
+	push @INC, dirname(__FILE__);
+}
+use arcsymbols;
+
+my $swdepot = dirname(__FILE__)."/../..";
+
+my $CACHE_LINE_BYTES = 32;
+
+if (!caller) {
+	&main;
+}
+
+sub main {
+	my $help = undef;
+	my $bin_path = "$swdepot/macfw/qtn_ruby";
+	my $result = GetOptions(
+		"help"		=> \$help,
+		"bin=s"		=> \$bin_path,
+	);
+
+	if ($help) {
+		die "$instructions\n";
+	}
+
+	my $symbols = new arcsymbols($bin_path);
+
+	my ($cache_samples, $cache_syms);
+
+	if ($#ARGV > 0) {
+		die "$instructions\n";
+	} elsif ($#ARGV == 0) {
+		foreach my $dump_file (@ARGV) {
+			open(F, $dump_file) or die "Could not load dump file: $dump_file: $!\n";
+			($cache_samples, $cache_syms) = &read_file_convert(*F, $symbols);
+			close(F);
+		}
+	} else {
+		($cache_samples, $cache_syms) = &read_file_convert(*STDIN, $symbols);
+	}
+
+	&display_cache_residency($cache_samples, $cache_syms);
+}
+
+sub cache_align {
+	my $addr = shift;
+	return ($addr & (0xffffffff & ~($CACHE_LINE_BYTES-1)));
+}	
+
+sub read_file_convert {
+	my ($fh, $symbols) = @_;
+
+	my %samples;
+	my %usedsyms;
+	while(<$fh>) {
+		/^(0x[\w\d]+)\s+(0x[\w\d]+)/g;
+		my $addr = hex($1);
+		my $uses = hex($2);
+		$samples{$addr}->{uses} = $uses;
+		$samples{$addr}->{syms} = {};
+	}
+
+	# now match sorted samples with symbol table
+	my @active_symbol_addrs;
+	my @sorted_sample_addrs = sort keys %samples;
+	my @sorted_symbol_addrs = @{$symbols->get_sorted_addrs_ref()};
+
+	my $done = 0;
+	my $sym_index = 0;
+	my $sample_index = 0;
+	foreach my $addr (@sorted_symbol_addrs) {
+		my $sym = $symbols->get_symbol_by_key($addr);
+		my $size = $sym->{size};
+		for ($a = cache_align($addr); $a < $addr + $size; $a += $CACHE_LINE_BYTES) {
+			if ($samples{$a}) {
+				$samples{$a}->{syms}->{$addr} = $sym;
+				$samples{$a}->{used} = 1;
+				$usedsyms{$sym}->{samples}->{$a} = $samples{$a};
+				$usedsyms{$sym}->{pts} += 1;
+				$usedsyms{$sym}->{uses} += $samples{$a}->{uses};
+				$usedsyms{$sym}->{usedp} = $usedsyms{$sym}->{uses} / $usedsyms{$sym}->{pts};
+				$usedsyms{$sym}->{addr} = $addr;
+				$usedsyms{$sym}->{size} = $size;
+				$usedsyms{$sym}->{section} = $sym->{section};
+				$usedsyms{$sym}->{name} = $sym->{name};
+				#my @k = keys %{$samples{$a}->{syms}};
+				#printf "sample at addr: %x fits sym: %s %x %x, matches %d\n", $a, $sym->{name}, $sym->{addr}, $sym->{size}, $#k+1;
+			}
+		}
+	}
+
+	return (\%samples, \%usedsyms);
+}
+
+sub display_cache_residency {
+	my ($samples, $syms) = @_;
+
+	# add unknown samples into other data, based on usedp sort
+	my %all_addrs;
+	foreach my $addr (keys %$samples) {
+		unless ($samples->{$addr}->{used}) {
+			$syms->{$addr}->{uses} = $samples->{$addr}->{uses};
+			$syms->{$addr}->{pts} = 1;
+			$syms->{$addr}->{usedp} = $samples->{$addr}->{uses};
+			$syms->{$addr}->{addr} = $addr;
+			$syms->{$addr}->{size} = $CACHE_LINE_BYTES;
+			$syms->{$addr}->{section} = "";
+			$syms->{$addr}->{name} = "";
+		}
+	}
+	my $pattern = "%10s %10s %10s %5s %9s %10s %8s %-12s %s";
+	printf "$pattern\n", "CAddrMin", "CAddrMax", "Uses", "Lines", "Used/L", "Sym Addr", "Sym Size", "Section", "Name";
+	foreach my $s (sort { $syms->{$b}->{usedp} <=> $syms->{$a}->{usedp} } keys %$syms) {
+		my $saddr = cache_align($syms->{$s}->{addr});
+		my $eaddr = cache_align($syms->{$s}->{addr} + $syms->{$s}->{size});
+		my $lines = ($eaddr - $saddr) / $CACHE_LINE_BYTES;
+		printf "$pattern\n", (
+			sprintf("%x", $saddr),
+			sprintf("%x", $eaddr),
+			sprintf("%d", $syms->{$s}->{uses}),
+			sprintf("%d", $lines),
+			sprintf("%d", $syms->{$s}->{usedp}),
+			sprintf("%x", $syms->{$s}->{addr}),
+			sprintf("0x%x", $syms->{$s}->{size}),
+			sprintf("%s", $syms->{$s}->{section}),
+			sprintf("%s", $syms->{$s}->{name}));
+	}
+}
diff --git a/quantenna/host/utilities/prof_iptr.pl b/quantenna/host/utilities/prof_iptr.pl
new file mode 100755
index 0000000..e4ee3b5
--- /dev/null
+++ b/quantenna/host/utilities/prof_iptr.pl
@@ -0,0 +1,203 @@
+#!/usr/bin/perl -w
+my $instructions = "
+$0
+Usage:
+	cat dump | $0 --bin u-boot/u-boot	# read from stdin, using u-boot for symbols
+	$0 --bin linux/vmlinux dump		# read from file 'dump' using linux for symbols
+
+Takes output from iptr sampling code, aggregate functions, sort by use and display with symbol data information.
+
+Arguments:	--bin <file>	executable to read symbol table from.
+
+		--subsamples	show distribution of subsample counters for each function
+";
+
+use strict;
+use warnings;
+use Getopt::Long;
+use File::Basename;
+use File::Spec;
+use Cwd 'abs_path';
+BEGIN {
+	push @INC, dirname(__FILE__);
+}	
+use arcsymbols;
+my $script_path = dirname(__FILE__);
+my $swdepot = dirname(__FILE__)."/../..";
+
+if (!caller) {
+	&main;
+}
+
+sub fixfunc {
+	my ($syms, $name, $offset, $size) = @_;
+	my $sym = undef;
+	if ($offset > 0) {
+		# find symbol, compare sizes; some functions are omitted in kallsyms
+		foreach my $bin (reverse sort keys %$syms) {
+			my $changed = undef;
+			($name, $offset, $size, $changed, $sym) = $syms->{$bin}->fixfunc($name, $offset, $size);
+			if ($changed == 1) {
+				last;
+			}
+		}
+	}
+	return ($name, $offset, $size, $sym);
+}
+
+sub main {
+	my $help = undef;
+	my @bin_path;
+	my @def_bin_path = `find $swdepot/drivers/ -name \*.ko`;
+	push(@def_bin_path, "$swdepot/linux/vmlinux");
+	my $subsamples = undef;
+	my $sort = "szweight";
+	my $result = GetOptions(
+		"help"		=> \$help,
+		"bin=s"		=> \@bin_path,
+		"subsamples"	=> \$subsamples,
+		"sort=s"	=> \$sort,
+	);
+
+	if ($help) {
+		die "$instructions\n";
+	}
+
+	my @allsyms;
+	if ($#bin_path < 0) {
+		@bin_path = @def_bin_path;
+	}
+	foreach (@bin_path) {
+		chomp;chomp;
+		push @allsyms, new arcsymbols($_);
+	}
+
+	my $iptr_data;
+
+	if ($#ARGV > 0) {
+		die "$instructions\n";
+	} elsif ($#ARGV == 0) {
+		foreach my $dump_file (@ARGV) {
+			open(F, $dump_file) or die "Could not load dump file: $dump_file: $!\n";
+			$iptr_data = &read_file_convert(*F, \@allsyms);
+			close(F);
+		}
+	} else {
+		$iptr_data = &read_file_convert(*STDIN, \@allsyms);
+	}
+
+	&display_iptr_samples($iptr_data, $subsamples, $sort);
+}
+
+sub getfunc {
+	my ($syms, $addr) = @_;
+	foreach my $bin (reverse sort keys %$syms) {
+		my $sym = $syms->{$bin}->find_symbol($addr);
+		if ($sym) {
+			return ($sym->{name}, $addr - $sym->{addr}, $sym->{size});
+		}
+	}
+	warn sprintf "could not find sym for addr: %x\n", $addr;
+	return (sprintf(" -unknown_0x%x", $addr), 0, 1);
+}
+
+sub read_file_convert {
+	my ($fh, $syms) = @_;
+
+	my $last_saw_parsedump_helper = 0;
+	my $parsedump_helper_sections = {};
+
+	my %samples;
+	my $total_uses = 0;
+	while(<$fh>) {
+		if ( /^parsedump\s+([\w_]+)\s+([\.\w_]+)\s+(0x[a-fA-F0-9]+)\s*$/ ) {
+			my $module_name = $1;
+			my $section_name = $2;
+			my $section_addr = hex($3);
+			$parsedump_helper_sections->{$module_name}->{$section_name} = $section_addr;
+			$last_saw_parsedump_helper = 1;
+		} else {
+			if ($last_saw_parsedump_helper) {
+				foreach my $module_name (sort keys %{$parsedump_helper_sections}) {
+					foreach my $mod_path (<$script_path/../../drivers/*/$module_name.ko>) {
+						my $mod_rel = File::Spec->abs2rel(abs_path($mod_path));
+						warn "$0: Loading symbols from '$mod_rel'\n";
+						push @{$syms}, new arcsymbols($mod_rel, $parsedump_helper_sections->{$module_name});
+					}
+				}
+				$last_saw_parsedump_helper = 0;
+				$parsedump_helper_sections = {};
+			}
+			
+		if (/^(0x[\w\d]+)\s+(0x[\w\d]+)\s+([\w_][_\w\d]+|)\+?(0x[\w\d]+|)\/?(0x[\w\d]+|)/) {
+			my $addr = hex($1);
+			my $uses = hex($2);
+
+				foreach my $store (@{$syms}) {
+					my $symbol = $store->find_symbol($addr);
+
+					if ($symbol) {
+						my $func = $symbol->{name};
+						my $offset = $addr - $symbol->{addr};
+						my $size = $symbol->{size};
+
+				$samples{$func}->{addr} = $addr - $offset;
+				$samples{$func}->{size} = $size;
+				$samples{$func}->{samples}->{$addr}->{offset} = $offset;
+				$samples{$func}->{samples}->{$addr}->{uses} = $uses;
+				$samples{$func}->{uses} += $uses;
+				$samples{$func}->{pts} += 1;
+				$samples{$func}->{ptweight} = $samples{$func}->{uses} / $samples{$func}->{pts};
+				$samples{$func}->{szweight} = $samples{$func}->{uses} / $samples{$func}->{size};
+				$total_uses += $uses;
+			}
+		}
+	}
+		}
+	}
+
+	foreach my $func (keys %samples) {
+		$samples{$func}->{percentage} = $samples{$func}->{uses} * 100.0 / $total_uses;
+	}
+
+	return \%samples;
+}
+
+sub display_iptr_samples {
+	my ($data_ref, $subsamples, $sort) = @_;
+	my %data = %{$data_ref};
+
+	my $pattern = "%10s %10s %10s %10s %10s %10s %6s %s";
+	printf "$pattern\n", "Total Uses", "Addr", "Pts", "ptweight", "szweight", "%Pct", "Size", "Name";
+	foreach my $func (sort { $data{$b}->{$sort} <=> $data{$a}->{$sort} } keys %data) {
+		printf "$pattern\n", (
+			sprintf("%d", $data{$func}->{uses}),
+			sprintf("%x", $data{$func}->{addr}),
+			sprintf("%d", $data{$func}->{pts}),
+			sprintf("%-2.4g", $data{$func}->{ptweight}),
+			sprintf("%-2.4g", $data{$func}->{szweight}),
+			sprintf("%-2.4g", $data{$func}->{percentage}),
+			sprintf("%x", $data{$func}->{size}),
+			$func);
+		if ($subsamples) {
+			foreach my $addr (sort keys %{$data{$func}->{samples}}) {
+				my $uses = $data{$func}->{samples}->{$addr}->{uses};
+				my $objaddr;
+				my $offset = $addr - $data{$func}->{addr};
+				if ($data{$func}->{sym}) {
+					$objaddr = $addr - $data{$func}->{addr} + $data{$func}->{sym}->{addr};
+					$offset = $objaddr - $data{$func}->{sym}->{addr};
+				}
+				printf "$pattern\n", (
+					sprintf("%d", $uses),
+					sprintf("%x", $objaddr ? $objaddr : $addr),
+					sprintf("%x", $offset),
+					"",
+					"",
+					"",
+					"",
+					"");
+			}
+		}
+	}
+}
diff --git a/quantenna/host/utilities/ruby_mem_helper.c b/quantenna/host/utilities/ruby_mem_helper.c
new file mode 100644
index 0000000..881bef9
--- /dev/null
+++ b/quantenna/host/utilities/ruby_mem_helper.c
@@ -0,0 +1,165 @@
+/*
+ * (C) Copyright 2014 Quantenna Communications, Inc.
+ *
+ * Program to print memory map defines.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdint.h>
+#include "ruby_mem.h"
+
+struct ruby_mem_symbol {
+	char *name;
+	uint32_t addr;
+};
+
+struct ruby_mem_symbol ruby_mem_symbols[] = {
+	{ "RUBY_SRAM_UNIFIED_BEGIN", RUBY_SRAM_UNIFIED_BEGIN },
+	{ "RUBY_SRAM_UNIFIED_NOCACHE_BEGIN", RUBY_SRAM_UNIFIED_NOCACHE_BEGIN },
+	{ "RUBY_SRAM_FLIP_BEGIN", RUBY_SRAM_FLIP_BEGIN },
+	{ "RUBY_SRAM_FLIP_NOCACHE_BEGIN", RUBY_SRAM_FLIP_NOCACHE_BEGIN },
+	{ "RUBY_SRAM_NOFLIP_BEGIN", RUBY_SRAM_NOFLIP_BEGIN },
+	{ "RUBY_SRAM_NOFLIP_NOCACHE_BEGIN", RUBY_SRAM_NOFLIP_NOCACHE_BEGIN },
+	{ "RUBY_SRAM_BANK_SIZE", RUBY_SRAM_BANK_SIZE },
+	{ "RUBY_SRAM_SIZE", RUBY_SRAM_SIZE },
+	{ "RUBY_SRAM_BANK_SAFE_SIZE", RUBY_SRAM_BANK_SAFE_SIZE },
+	{ "RUBY_DRAM_UNIFIED_BEGIN", RUBY_DRAM_UNIFIED_BEGIN },
+	{ "RUBY_DRAM_UNIFIED_NOCACHE_BEGIN", RUBY_DRAM_UNIFIED_NOCACHE_BEGIN },
+	{ "RUBY_DRAM_FLIP_BEGIN", RUBY_DRAM_FLIP_BEGIN },
+	{ "RUBY_DRAM_FLIP_NOCACHE_BEGIN", RUBY_DRAM_FLIP_NOCACHE_BEGIN },
+	{ "RUBY_DRAM_NOFLIP_BEGIN", RUBY_DRAM_NOFLIP_BEGIN },
+	{ "RUBY_DRAM_NOFLIP_NOCACHE_BEGIN", RUBY_DRAM_NOFLIP_NOCACHE_BEGIN },
+	{ "RUBY_MAX_DRAM_SIZE", RUBY_MAX_DRAM_SIZE },
+	{ "RUBY_MIN_DRAM_SIZE", RUBY_MIN_DRAM_SIZE },
+	{ "RUBY_SRAM_BEGIN", RUBY_SRAM_BEGIN },
+	{ "RUBY_SRAM_BUS_BEGIN", RUBY_SRAM_BUS_BEGIN },
+	{ "RUBY_SRAM_NOCACHE_BEGIN", RUBY_SRAM_NOCACHE_BEGIN },
+	{ "RUBY_DRAM_BEGIN", RUBY_DRAM_BEGIN },
+	{ "RUBY_DRAM_BUS_BEGIN", RUBY_DRAM_BUS_BEGIN },
+	{ "RUBY_DRAM_NOCACHE_BEGIN", RUBY_DRAM_NOCACHE_BEGIN },
+	{ "RUBY_SPI_FLASH_ADDR", RUBY_SPI_FLASH_ADDR },
+	{ "RUBY_HARDWARE_BEGIN", RUBY_HARDWARE_BEGIN },
+	{ "CONFIG_ARC_CONF_SIZE", CONFIG_ARC_CONF_SIZE },
+	{ "CONFIG_ARC_CONF_BASE", CONFIG_ARC_CONF_BASE },
+	{ "CONFIG_ARC_KERNEL_PAGE_SIZE", CONFIG_ARC_KERNEL_PAGE_SIZE },
+	{ "RUBY_KERNEL_LOAD_DRAM_BEGIN", RUBY_KERNEL_LOAD_DRAM_BEGIN },
+	{ "CONFIG_ARC_NULL_BASE", CONFIG_ARC_NULL_BASE },
+	{ "CONFIG_ARC_NULL_SIZE", CONFIG_ARC_NULL_SIZE },
+	{ "CONFIG_ARC_NULL_END", CONFIG_ARC_NULL_END },
+	{ "CONFIG_ARC_PCIE_BASE", CONFIG_ARC_PCIE_BASE },
+	{ "CONFIG_ARC_PCIE_SIZE", CONFIG_ARC_PCIE_SIZE },
+	{ "CONFIG_ARC_MUC_STACK_SIZE", CONFIG_ARC_MUC_STACK_SIZE },
+	{ "RUBY_CRUMBS_MAGIC", RUBY_CRUMBS_MAGIC },
+	{ "NO_RUBY_WEAK", NO_RUBY_WEAK },
+	{ "RUBY_BAD_BUS_ADDR", RUBY_BAD_BUS_ADDR },
+	{ "RUBY_ERROR_ADDR", RUBY_ERROR_ADDR },
+	{ "RUBY_DSP_XYMEM_BEGIN", RUBY_DSP_XYMEM_BEGIN },
+	{ "RUBY_DSP_XYMEM_END", RUBY_DSP_XYMEM_END },
+	{ "RUBY_CRUMBS_SIZE", RUBY_CRUMBS_SIZE },
+	{ "CONFIG_ARC_KERNEL_SRAM_B1_BASE", CONFIG_ARC_KERNEL_SRAM_B1_BASE },
+	{ "CONFIG_ARC_KERNEL_SRAM_B1_SIZE", CONFIG_ARC_KERNEL_SRAM_B1_SIZE },
+	{ "CONFIG_ARC_KERNEL_SRAM_B1_END", CONFIG_ARC_KERNEL_SRAM_B1_END },
+	{ "CONFIG_ARC_KERNEL_SRAM_B2_BASE", CONFIG_ARC_KERNEL_SRAM_B2_BASE },
+	{ "CONFIG_ARC_KERNEL_SRAM_B2_END", CONFIG_ARC_KERNEL_SRAM_B2_END },
+	{ "CONFIG_ARC_KERNEL_SRAM_B2_SIZE", CONFIG_ARC_KERNEL_SRAM_B2_SIZE },
+	{ "CONFIG_ARC_MUC_SRAM_B1_BASE", CONFIG_ARC_MUC_SRAM_B1_BASE },
+	{ "CONFIG_ARC_MUC_SRAM_B1_END", CONFIG_ARC_MUC_SRAM_B1_END },
+	{ "CONFIG_ARC_MUC_SRAM_B1_SIZE", CONFIG_ARC_MUC_SRAM_B1_SIZE },
+	{ "CONFIG_ARC_MUC_SRAM_B2_BASE", CONFIG_ARC_MUC_SRAM_B2_BASE },
+	{ "CONFIG_ARC_MUC_SRAM_B2_SIZE", CONFIG_ARC_MUC_SRAM_B2_SIZE },
+	{ "CONFIG_ARC_MUC_SRAM_B2_END", CONFIG_ARC_MUC_SRAM_B2_END },
+	{ "CONFIG_ARC_MUC_STACK_OFFSET", CONFIG_ARC_MUC_STACK_OFFSET },
+	{ "CONFIG_ARC_MUC_STACK_INIT", CONFIG_ARC_MUC_STACK_INIT },
+	{ "RUBY_CRUMBS_OFFSET", RUBY_CRUMBS_OFFSET },
+	{ "RUBY_CRUMBS_ADDR", RUBY_CRUMBS_ADDR },
+	{ "CONFIG_ARC_PCIE_RSVD_SIZE", CONFIG_ARC_PCIE_RSVD_SIZE },
+	{ "CONFIG_ARC_DSP_BASE", CONFIG_ARC_DSP_BASE },
+	{ "CONFIG_ARC_DSP_SIZE", CONFIG_ARC_DSP_SIZE },
+	{ "CONFIG_ARC_DSP_END", CONFIG_ARC_DSP_END },
+	{ "CONFIG_ARC_MUC_BASE", CONFIG_ARC_MUC_BASE },
+	{ "CONFIG_ARC_MUC_SIZE", CONFIG_ARC_MUC_SIZE },
+	{ "CONFIG_ARC_MUC_END", CONFIG_ARC_MUC_END },
+	{ "CONFIG_ARC_MUC_MAPPED_BASE", CONFIG_ARC_MUC_MAPPED_BASE },
+	{ "CONFIG_ARC_MUC_MAPPED_SIZE", CONFIG_ARC_MUC_MAPPED_SIZE },
+	{ "CONFIG_ARC_KERNEL_MEM_BASE", CONFIG_ARC_KERNEL_MEM_BASE },
+	{ "CONFIG_ARC_UBOOT_RESERVED_SPACE", CONFIG_ARC_UBOOT_RESERVED_SPACE },
+	{ "CONFIG_ARC_KERNEL_BOOT_BASE", CONFIG_ARC_KERNEL_BOOT_BASE },
+	{ "CONFIG_ARC_KERNEL_BASE", CONFIG_ARC_KERNEL_BASE },
+	{ "CONFIG_ARC_KERNEL_MAX_SIZE", CONFIG_ARC_KERNEL_MAX_SIZE },
+	{ "CONFIG_ARC_KERNEL_MIN_SIZE", CONFIG_ARC_KERNEL_MIN_SIZE },
+	{ "TOPAZ_AUC_IMEM_ADDR", TOPAZ_AUC_IMEM_ADDR },
+	{ "TOPAZ_AUC_IMEM_SIZE", TOPAZ_AUC_IMEM_SIZE },
+	{ "TOPAZ_AUC_DMEM_ADDR", TOPAZ_AUC_DMEM_ADDR },
+	{ "TOPAZ_AUC_DMEM_SIZE", TOPAZ_AUC_DMEM_SIZE },
+	{ "RUBY_SYS_CTL_SAFE_READ_REGISTER", RUBY_SYS_CTL_SAFE_READ_REGISTER },
+	{ "TOPAZ_CACHE_WAR_OFFSET", TOPAZ_CACHE_WAR_OFFSET },
+	{ "TOPAZ_HBM_BUF_EMAC_RX_COUNT", TOPAZ_HBM_BUF_EMAC_RX_COUNT },
+	{ "TOPAZ_HBM_BUF_WMAC_RX_COUNT", TOPAZ_HBM_BUF_WMAC_RX_COUNT },
+	{ "TOPAZ_HBM_EMAC_TX_DONE_COUNT", TOPAZ_HBM_EMAC_TX_DONE_COUNT },
+	{ "TOPAZ_HBM_POOL_PTR_SIZE", TOPAZ_HBM_POOL_PTR_SIZE },
+	{ "TOPAZ_HBM_POOL_EMAC_RX_START", TOPAZ_HBM_POOL_EMAC_RX_START },
+	{ "TOPAZ_HBM_POOL_EMAC_RX_SIZE", TOPAZ_HBM_POOL_EMAC_RX_SIZE },
+	{ "TOPAZ_HBM_POOL_EMAC_RX_END", TOPAZ_HBM_POOL_EMAC_RX_END },
+	{ "TOPAZ_HBM_POOL_WMAC_RX_START", TOPAZ_HBM_POOL_WMAC_RX_START },
+	{ "TOPAZ_HBM_POOL_WMAC_RX_SIZE", TOPAZ_HBM_POOL_WMAC_RX_SIZE },
+	{ "TOPAZ_HBM_POOL_WMAC_RX_END", TOPAZ_HBM_POOL_WMAC_RX_END },
+	{ "TOPAZ_HBM_POOL_EMAC_TX_DONE_START", TOPAZ_HBM_POOL_EMAC_TX_DONE_START },
+	{ "TOPAZ_HBM_POOL_EMAC_TX_DONE_SIZE", TOPAZ_HBM_POOL_EMAC_TX_DONE_SIZE },
+	{ "TOPAZ_HBM_POOL_EMAC_TX_DONE_END", TOPAZ_HBM_POOL_EMAC_TX_DONE_END },
+	{ "TOPAZ_HBM_BUF_ALIGN", TOPAZ_HBM_BUF_ALIGN },
+	{ "TOPAZ_HBM_BUF_EMAC_RX_POOL", TOPAZ_HBM_BUF_EMAC_RX_POOL },
+	{ "TOPAZ_HBM_BUF_WMAC_RX_POOL", TOPAZ_HBM_BUF_WMAC_RX_POOL },
+	{ "TOPAZ_HBM_AUC_FEEDBACK_POOL", TOPAZ_HBM_AUC_FEEDBACK_POOL },
+	{ "TOPAZ_HBM_EMAC_TX_DONE_POOL", TOPAZ_HBM_EMAC_TX_DONE_POOL },
+	{ "TOPAZ_HBM_BUF_EMAC_RX_SIZE", TOPAZ_HBM_BUF_EMAC_RX_SIZE },
+	{ "TOPAZ_HBM_BUF_WMAC_RX_SIZE", TOPAZ_HBM_BUF_WMAC_RX_SIZE },
+	{ "TOPAZ_HBM_BUF_EMAC_RX_TOTAL", TOPAZ_HBM_BUF_EMAC_RX_TOTAL },
+	{ "TOPAZ_HBM_BUF_WMAC_RX_TOTAL", TOPAZ_HBM_BUF_WMAC_RX_TOTAL },
+	{ "TOPAZ_HBM_BUF_EMAC_RX_BASE", TOPAZ_HBM_BUF_EMAC_RX_BASE },
+	{ "TOPAZ_HBM_BUF_EMAC_RX_END", TOPAZ_HBM_BUF_EMAC_RX_END },
+	{ "TOPAZ_HBM_BUF_WMAC_RX_BASE", TOPAZ_HBM_BUF_WMAC_RX_BASE },
+	{ "TOPAZ_HBM_BUF_WMAC_RX_END", TOPAZ_HBM_BUF_WMAC_RX_END },
+	{ "TOPAZ_FWT_SW_START", TOPAZ_FWT_SW_START },
+	{ "TOPAZ_FWT_SW_SIZE", TOPAZ_FWT_SW_SIZE },
+	{ "TOPAZ_FWT_SW_END", TOPAZ_FWT_SW_END },
+	{ "TOPAZ_FWT_MCAST_ENTRIES", TOPAZ_FWT_MCAST_ENTRIES },
+	{ "TOPAZ_FWT_MCAST_FF_ENTRIES", TOPAZ_FWT_MCAST_FF_ENTRIES },
+	{ "TOPAZ_FWT_MCAST_IPMAP_ENT_SIZE", TOPAZ_FWT_MCAST_IPMAP_ENT_SIZE },
+	{ "TOPAZ_FWT_MCAST_TQE_ENT_SIZE", TOPAZ_FWT_MCAST_TQE_ENT_SIZE },
+	{ "TOPAZ_FWT_MCAST_IPMAP_SIZE", TOPAZ_FWT_MCAST_IPMAP_SIZE },
+	{ "TOPAZ_FWT_MCAST_TQE_SIZE", TOPAZ_FWT_MCAST_TQE_SIZE },
+	{ "TOPAZ_FWT_MCAST_TQE_FF_SIZE", TOPAZ_FWT_MCAST_TQE_FF_SIZE },
+	{ "TOPAZ_FWT_MCAST_IPMAP_BASE", TOPAZ_FWT_MCAST_IPMAP_BASE },
+	{ "TOPAZ_FWT_MCAST_IPMAP_END", TOPAZ_FWT_MCAST_IPMAP_END },
+	{ "TOPAZ_FWT_MCAST_TQE_BASE", TOPAZ_FWT_MCAST_TQE_BASE },
+	{ "TOPAZ_FWT_MCAST_TQE_END", TOPAZ_FWT_MCAST_TQE_END },
+	{ "TOPAZ_FWT_MCAST_TQE_FF_BASE", TOPAZ_FWT_MCAST_TQE_FF_BASE },
+	{ "TOPAZ_FWT_MCAST_TQE_FF_END", TOPAZ_FWT_MCAST_TQE_FF_END },
+	{ "TOPAZ_FWT_MCAST_END", TOPAZ_FWT_MCAST_END },
+	{ "CONFIG_ARC_KERNEL_SRAM_B1_BASE", CONFIG_ARC_KERNEL_SRAM_B1_BASE },
+	{ "CONFIG_ARC_KERNEL_SRAM_B1_END", CONFIG_ARC_KERNEL_SRAM_B1_END },
+	{ "CONFIG_ARC_KERNEL_SRAM_B2_BASE", CONFIG_ARC_KERNEL_SRAM_B2_BASE },
+	{ "CONFIG_ARC_KERNEL_SRAM_B2_END", CONFIG_ARC_KERNEL_SRAM_B2_END },
+	{ "CONFIG_ARC_MUC_SRAM_B1_BASE", CONFIG_ARC_MUC_SRAM_B1_BASE },
+	{ "CONFIG_ARC_MUC_SRAM_B1_END", CONFIG_ARC_MUC_SRAM_B1_END },
+	{ "CONFIG_ARC_AUC_SRAM_BASE", CONFIG_ARC_AUC_SRAM_BASE },
+	{ "CONFIG_ARC_AUC_SRAM_SIZE", CONFIG_ARC_AUC_SRAM_SIZE },
+	{ "CONFIG_ARC_AUC_SRAM_END", CONFIG_ARC_AUC_SRAM_END },
+	{ "CONFIG_ARC_AUC_BASE", CONFIG_ARC_AUC_BASE },
+	{ "CONFIG_ARC_AUC_SIZE", CONFIG_ARC_AUC_SIZE },
+	{ "CONFIG_ARC_AUC_END", CONFIG_ARC_AUC_END },
+	{ "CONFIG_ARC_SRAM_END", CONFIG_ARC_SRAM_END },
+};
+
+#define ARRAY_SIZE(a)	(sizeof(a) / sizeof(a[0]))
+
+int main(int argc, char const *argv[])
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(ruby_mem_symbols); ++i)
+		printf("%-40s 0x%08X\n", ruby_mem_symbols[i].name, ruby_mem_symbols[i].addr);
+
+	return 0;
+}
diff --git a/quantenna/host/utilities/sparse/Makefile b/quantenna/host/utilities/sparse/Makefile
new file mode 100644
index 0000000..7298fe5
--- /dev/null
+++ b/quantenna/host/utilities/sparse/Makefile
@@ -0,0 +1,10 @@
+
+all: install
+
+install: src
+	(cd src && make && make install PREFIX=../install)
+
+src:
+	mkdir src
+	(cd src && git clone git://git.kernel.org/pub/scm/devel/sparse/sparse.git .)
+
diff --git a/quantenna/host/utilities/struct_check.pl b/quantenna/host/utilities/struct_check.pl
new file mode 100755
index 0000000..22c2868
--- /dev/null
+++ b/quantenna/host/utilities/struct_check.pl
@@ -0,0 +1,174 @@
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+use Getopt::Long;
+
+my $instructions = "
+$0
+
+Automatically generate some C code which runs various checks on a structure. 
+This fragment can then be placed on MuC, LHost, or target userspace programs 
+compiled with both gcc and mcc.
+
+ALWAYS MANUALLY INSPECT THE OUTPUT. This tool just helps to avoid repetetive
+grunt work when creating these test files, it will has bugs and corner cases.
+
+Usage:	$0 [--main] [--copts=\"-Iinclude/\"] header1 [header2...]
+	--main		Generate a main function and includes so this 
+			can be used as a standalone program.
+
+	--copts		C options to be passed to the C preprocessor 
+			whan parsing the headers
+
+";
+
+my $copts = "";
+my $main = undef;
+
+GetOptions(
+	"main" => \$main,
+	"copts=s" => \$copts,
+);
+
+my @headers = @ARGV;
+if ($#headers < 0) {
+	die $instructions;
+}
+
+print make_main_header(\@headers) if $main;
+print make_test_file(parse_headers());
+print make_main_footer(\@headers) if $main;
+
+sub parse_headers {
+	my %structure_fields;
+	my @structure_names;
+
+	foreach my $header (@headers) {
+		my $current_struct = undef;
+		foreach (`gcc -E -dD $header`) {
+			chomp;chomp;
+			if ((!defined($current_struct)) && /^struct\s+\b(\w+)\b\s*/ ) {
+				$current_struct = $1;
+				push(@structure_names, $current_struct);
+				#warn "Structure '$current_struct' from line $_\n";
+			} 
+			elsif (defined($current_struct) && /\b(\w+)\b\s*(\[.*\]|)\s*\;/ && !(/\:/) ) {
+				push(@{$structure_fields{$current_struct}}, $1);
+				#warn "Field '$current_struct.$1' from line $_\n";
+			}
+			elsif ( /\}/ ) {
+				$current_struct = undef;
+			}
+		}
+	}
+	return (\%structure_fields, \@structure_names);
+}
+
+sub make_test_file {
+	my ($structure_fields, $structure_names) = @_;
+	my $output = "\n\n";
+	$output .= "/********************************************************************/\n";
+	$output .= "/********************************************************************/\n";
+	$output .= "/********************************************************************/\n";
+	$output .= "/********************************************************************/\n";
+	$output .= "/** Generated by $0 **/\n";
+	$output .= "
+#if defined(MUC_BUILD)
+# define printf PRINTF
+# define sprintf uc_sprintf
+#endif
+";
+	$output .= c_utilities();
+	$output .= struct_check_func_header();
+	foreach my $structure_name (@$structure_names) {
+		$output .= struct_test($structure_name, $structure_fields->{$structure_name});
+	}
+	$output .= struct_check_func_footer();
+	$output .= "/** End generated by $0 **/\n";
+	$output .= "/********************************************************************/\n";
+	$output .= "/********************************************************************/\n";
+	$output .= "/********************************************************************/\n\n";
+	return $output;
+}
+
+sub check_line {
+	my $a = shift;
+	return "\thash = struct_check_func(hash, \"$a\", $a);\n";
+}
+
+sub struct_test {
+	my ($name, $fields_ref) = @_;
+	my $output = "";
+	$output .= check_line("sizeof(struct $name)");
+	foreach my $field (@$fields_ref) {
+		$output .= check_line("offsetof(struct $name, $field)");
+	}
+	$output .= "\n";
+	return $output;
+}
+
+sub c_utilities {
+	return "
+
+static __inline__ unsigned long struct_check_hash(const unsigned long hash, const char* str)
+{
+	unsigned long h = hash;
+	const char* p;
+	for (p = str; p && *p; p++)
+       		h = ((h * 3571) + *p) * 1531;
+	return h;
+}
+
+static __inline__ unsigned long struct_check_func(const unsigned long hash, const char* check_str, unsigned long value)
+{
+	char buf[128];
+	sprintf(buf, \"%s == %d\\n\", check_str, (int)value);
+	printf(\"%s\", buf);
+	return struct_check_hash(hash, buf);
+}
+
+";
+}
+sub struct_check_func_header {
+	return "
+static __inline__ void struct_check_all(void)
+{
+	unsigned long hash = 1;
+";
+}
+sub struct_check_func_footer {
+	return "
+	printf(\"Final hash: %d\\n\", (int)hash);
+}
+";
+}
+
+sub make_main_header {
+	my $headers_ref = shift;
+	my $output = "
+#include <stdio.h>
+#include <stddef.h>
+typedef unsigned int	u32;
+typedef signed int	s32;
+typedef unsigned short	u16;
+typedef signed short	s16;
+typedef unsigned char	u8;
+typedef signed char	s8;
+";
+	for my $header (@$headers_ref) {
+		$output .= "#include \"$header\"\n";
+	}
+	return $output;
+}
+
+sub make_main_footer {
+	return "
+int main(int argc, char **argv)
+{
+	(void)argc;
+	(void)argv;
+	struct_check_all();
+	return 0;
+}
+";
+}
diff --git a/quantenna/host/utilities/tar_mac_gen b/quantenna/host/utilities/tar_mac_gen
new file mode 100755
index 0000000..774e789
--- /dev/null
+++ b/quantenna/host/utilities/tar_mac_gen
@@ -0,0 +1,2 @@
+./mac_gen
+mv wifi_mac_addrs ../../buildroot/target/device/Quantenna/UMS88K/scripts
diff --git a/quantenna/host/utilities/wifi_macaddr_gen.php b/quantenna/host/utilities/wifi_macaddr_gen.php
new file mode 100644
index 0000000..4231cc5
--- /dev/null
+++ b/quantenna/host/utilities/wifi_macaddr_gen.php
@@ -0,0 +1,86 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<?php
+	if(file_exists("wifi_mac_addrs.txt"))
+	{
+		$curr_wmacaddr = file_get_contents("wifi_mac_addrs.txt");
+        //exec("echo $new_wmacaddr > /mnt/jffs2/wifi_mac_addrs");
+
+        	list($new_wifi[0], $new_wifi[1], $new_wifi[2], $new_wifi[3], $new_wifi[4], $new_wifi[5]) = explode(":", $curr_wmacaddr);
+
+        	$new_wifi[5] = hexdec($new_wifi[5]);
+
+		if($new_wifi[5]  >= 255 )
+		{
+			$new_wifi[5] = 0;
+			$new_wifi[5] = sprintf("%02X", $new_wifi[5]);
+        		$new_wifi[4] = hexdec($new_wifi[4]);
+
+			if($new_wifi[4]  >= 255 )
+			{
+				$new_wifi[4] = 0;
+				$new_wifi[4] = sprintf("%02X", $new_wifi[4]);
+        			$new_wifi[3] = hexdec($new_wifi[3]);
+
+				if($new_wifi[3]  >= 255 )
+				{
+					$new_wifi[3] = 0;
+					$new_wifi[3] = sprintf("%02X", $new_wifi[3]);
+        				$new_wifi[2] = hexdec($new_wifi[2]);
+
+					if($new_wifi[2]  >= 255 )
+					{
+						$new_wifi[2] = 0;
+						$new_wifi[2] = sprintf("%02X", $new_wifi[2]);
+        					$new_wifi[1] = hexdec($new_wifi[1]);
+
+						if($new_wifi[1]  >= 255 )
+						{
+							$new_wifi[1] = 0;
+							$new_wifi[1] = sprintf("%02X", $new_wifi[1]);
+        						$new_wifi[0] = hexdec($new_wifi[0]);
+							$new_wifi[0] = $new_wifi[0] + 1;
+							$new_wifi[0] = sprintf("%02X", $new_wifi[0]);
+						}
+						else
+						{
+        						$new_wifi[1] = $new_wifi[1] + 1;
+							$new_wifi[1] = sprintf("%02X", $new_wifi[1]);
+						}
+					}
+					else
+					{
+        					$new_wifi[2] = $new_wifi[2] + 1;
+						$new_wifi[2] = sprintf("%02X", $new_wifi[2]);
+					}
+				}
+				else
+				{
+        				$new_wifi[3] = $new_wifi[3] + 1;
+					$new_wifi[3] = sprintf("%02X", $new_wifi[3]);
+				}
+			}
+			else
+			{
+				$new_wifi[4] = $new_wifi[4] + 1;
+				$new_wifi[4] = sprintf("%02X", $new_wifi[4]);
+			}
+		}
+		else
+		{
+        		$new_wifi[5] = $new_wifi[5] + 1;
+			$new_wifi[5] = sprintf("%02X", $new_wifi[5]);
+		}
+
+        	$arr = array($new_wifi[0], $new_wifi[1], $new_wifi[2], $new_wifi[3], $new_wifi[4], $new_wifi[5]);
+        	$new_wmacaddr1 = implode(":", $arr);
+		file_put_contents("wifi_mac_addrs.txt", $new_wmacaddr1);
+	}
+	else
+	{
+		//This is first time file is created
+		$first_wmacaddr = "00:26:86:00:10:00";
+		file_put_contents("wifi_mac_addrs.txt", $first_wmacaddr);
+	}
+?>
+</HTML>
diff --git a/quantenna/include/qtn/Makefile b/quantenna/include/qtn/Makefile
new file mode 100644
index 0000000..97415c3
--- /dev/null
+++ b/quantenna/include/qtn/Makefile
@@ -0,0 +1,23 @@
+#
+# Copyright (C)2014 Quantenna Communications
+#
+
+TOPDIR=../..
+
+MUC_STATS_HEADER=./muc_txrx_stats.h
+MUC_COMMON_STAT_HEADER=./qtn_muc_stats_print.h
+
+.PHONY: FORCE
+
+all: ${MUC_COMMON_STAT_HEADER}
+
+${MUC_COMMON_STAT_HEADER}: ${MUC_STATS_HEADER} ${MUC_STATS_HEADER}.raw
+
+${MUC_STATS_HEADER}: ${MUC_STATS_HEADER}.raw
+
+${MUC_STATS_HEADER}.raw: FORCE
+	@cat ${MUC_STATS_HEADER} | \
+		${TOPDIR}/host/scripts/struct_get.sh | \
+		grep -v "^[[:blank:]]*$$" > $@
+	./muc_dbg_parse
+
diff --git a/quantenna/include/qtn/auc_debug_stats.h b/quantenna/include/qtn/auc_debug_stats.h
new file mode 100755
index 0000000..fd26ce5
--- /dev/null
+++ b/quantenna/include/qtn/auc_debug_stats.h
@@ -0,0 +1,198 @@
+/*
+ * Copyright (c) 2013 Quantenna Communications, Inc.
+ */
+
+#ifndef _AUC_DEBUG_STATS_H_
+#define _AUC_DEBUG_STATS_H_
+
+#include <qtn/auc_share_def.h>
+
+/*
+ * Firmware updates counters through such macros as AUC_DBG_INC(), AUC_DBG_INC_OFFSET(), AUC_DBG_INC_COND(), etc.
+ * Other CPU (e.g. Lhost) can read structure and dump counters.
+ * Feel free to add more counters here.
+ * Good to have counters organized and grouped using name prefix.
+ */
+struct auc_dbg_counters
+{
+	/* pktlogger expects task_alive_counters to be the first member of this struct */
+	uint32_t task_alive_counters[AUC_TID_NUM];
+	uint32_t task_false_trigger[AUC_TID_NUM];
+	uint32_t tqew_ac[4];
+	uint32_t tqew_ac_avail[4];
+	uint32_t tqew_air_humble;
+	uint32_t tqew_air_suppress;
+	uint32_t tqew_air_use_idletime;
+	uint32_t tqew_air_dequeue_only;
+	uint32_t tqew_pkt_pending_for_txdone;
+	uint32_t tqew_descr_alloc_fail;
+	uint32_t tqew_ring_alloc_fail;
+	uint32_t tqew_pop_alloc_fail;
+	uint32_t tqew_pop_sw_limit;
+	uint32_t tqew_pop_empty;
+	uint32_t tqew_available_set;
+	uint32_t tqew_available_reset;
+	uint32_t tqew_rx;
+	uint32_t tqew_drop;
+	uint32_t tqew_free;
+	uint32_t tqew_buf_invalid;
+	uint32_t wmac_tx_done[4];
+	uint32_t agg_aggregate_flag;
+	uint32_t agg_aggressive_agg;
+	uint32_t hdrs_available_recent_min;
+	uint32_t agg_states[QTN_AUC_TID_TX_STATE_MAX + 1];
+	uint32_t ethq_push;
+	uint32_t ethq_pop;
+	uint32_t agg_aggregate_mpdu;
+	uint32_t agg_aggregate_msdu;
+	uint32_t agg_singleton_mpdu;
+	uint32_t agg_singleton_mgmt;
+	uint32_t agg_singleton_ctl;
+	uint32_t agg_singleton_probe;
+	uint32_t agg_4K_amsdu;
+	uint32_t agg_8K_amsdu;
+	uint32_t agg_11K_amsdu;
+	uint32_t tx_feedback_success;
+	uint32_t tx_feedback_fail;
+	uint32_t tx_done_status_success;
+	uint32_t tx_done_status_timeout;
+	uint32_t tx_done_status_xretry;
+	uint32_t tx_done_status_timeout_xretry;
+	uint32_t tx_done_pkt_chain_reset;
+	uint32_t tx_done_pkt_chain_success;
+	uint32_t tx_done_pkt_chain_drop_tid_down;
+	uint32_t tx_done_pkt_chain_drop_xattempts;
+	uint32_t tx_done_singleton_finish;
+	uint32_t tx_done_singleton_swretry;
+	uint32_t tx_done_aggregate_finish;
+	uint32_t tx_done_aggregate_hwretry;
+	uint32_t tx_done_aggregate_swretry;
+	uint32_t tx_done_mpdu_swretry;
+	uint32_t tx_sample;
+	uint32_t tx_bw_sample;
+	uint32_t tx_swretry_lower_bw;
+	uint32_t tx_swretry_agg_exceed;
+	uint32_t tx_scale_base_20m;
+	uint32_t tx_scale_base_40m;
+	uint32_t tx_scale_base_80m;
+	uint32_t tx_scale_max;
+	uint32_t tx_scale_overstep;
+	uint32_t alloc_tqew_fast;
+	uint32_t free_tqew_fast;
+	uint32_t alloc_tqew_slow;
+	uint32_t free_tqew_slow;
+	uint32_t alloc_tqew_local;
+	uint32_t free_tqew_local;
+	uint32_t alloc_hdr_fast;
+	uint32_t free_hdr_fast;
+	uint32_t alloc_hdr_slow;
+	uint32_t free_hdr_slow;
+	uint32_t alloc_msdu_hdr_failed;
+	uint32_t alloc_mpdu_hdr_failed;
+	uint32_t alloc_tid_superfast;
+	uint32_t free_tid_superfast;
+	uint32_t alloc_tid_fast;
+	uint32_t free_tid_fast;
+	uint32_t alloc_tid_slow;
+	uint32_t free_tid_slow;
+	uint32_t alloc_node_rate_fast;
+	uint32_t free_node_rate_fast;
+	uint32_t alloc_node_rate_slow;
+	uint32_t free_node_rate_slow;
+	uint32_t alloc_node_superfast;
+	uint32_t free_node_superfast;
+	uint32_t alloc_node_fast;
+	uint32_t free_node_fast;
+	uint32_t alloc_fcs;
+	uint32_t free_fcs;
+	uint32_t alloc_mac_descr;
+	uint32_t free_mac_descr;
+	uint32_t tx_mac_push;
+	uint32_t tx_mac_idle;
+	uint32_t tx_mac_rts;
+	uint32_t tx_mac_cts2self;
+	uint32_t tx_vlan_drop;
+	uint32_t tx_acm_drop;
+	uint32_t tx_ps_drop;
+	uint32_t ocs_tx_suspend;
+	uint32_t ocs_tx_resume;
+	uint32_t ocs_singleton_suspend;
+	uint32_t ocs_ampdu_suspend;
+	uint32_t ocs_frame_created;
+	uint32_t pwr_mgmt_awake;
+	uint32_t pwr_mgmt_sleep;
+	uint32_t pwr_mgmt_tx;
+	uint32_t pspoll_rx;
+	uint32_t dtim_q_push;
+	uint32_t dtim_q_pop;
+	uint32_t dtim_trigger;
+	uint32_t dtim_q_overflow;
+	uint32_t tx_restrict_dropped;
+	uint32_t tx_throt_dropped;
+	uint32_t tx_block_singleton;
+	uint32_t tx_force_unblock_tid;
+	uint32_t tx_ctl_pkt_hbm_alloc_fails;
+	uint32_t tx_ctl_pkt_alloc_descr_fails;
+	uint32_t tx_bar_alloc_ctl_pkt_fails;
+	uint32_t tx_valid_bit_not_set;
+
+	uint32_t wmm_ps_tx;
+	uint32_t wmm_ps_tx_null_frames;
+	uint32_t wmm_ps_tx_more_data_frames;
+	uint32_t wmm_ps_tx_eosp_frames;
+
+	/*
+	 * Mu Tx & Done & Retry
+	 */
+	uint32_t mu_tx_su_count;	/* Can't find buddy, and this AMPDU be sent as SU */
+
+	uint32_t mu_tx_send_mu_fail;	/* Can't be sent as MU, send them as SU */
+
+	uint32_t mu_tx_push_count;
+	uint32_t mu_tx_done_count;
+
+	uint32_t mu_tx_done_succ;	/* The succ/fail counter of AMPDU which be sent via WMAC1 */
+	uint32_t mu_tx_done_fail;
+	uint32_t mu_tx_sample;            /* mu sampling phy rate count */
+	uint32_t mu_bar_bitmap_non_zero;
+	uint32_t mu_bar_bitmap_zero;
+	uint32_t mu_mac_wmac1_ipc_push;
+	uint32_t mu_mac_wmac1_auc_push;
+	uint32_t mu_wmac1_resets;
+
+	uint32_t mu_tx_swretry_agg_exceed;
+
+	uint32_t mu_tx_buddy_try;
+	uint32_t mu_tx_buddy_fail_wmac;
+	uint32_t mu_tx_buddy_fail_ptid;
+	uint32_t mu_tx_buddy_fail_rate;
+	uint32_t mu_tx_buddy_fail_create_agg;
+
+	uint32_t mu_tx_buddy_mu_only_timeout;
+
+	uint32_t mu_tx_another_q_push_succ;
+	uint32_t mu_tx_another_q_push_fail;	/* If current cont_q is not ready, try another cont_q */
+	uint32_t mu_tx_buddy_multi_tid;
+
+	/* For debug, remove it before submitting */
+	uint32_t mu_tx_wmac_0_done_count;
+	uint32_t mu_tx_wmac_0_bitmap_non_zero;
+	uint32_t mu_tx_wmac_0_bitmap_zero;
+	uint32_t mu_tx_wmac_0_done_timeout;
+	uint32_t mu_tx_wmac_0_done_succ;
+	uint32_t mu_tx_wmac_0_done_fail;
+
+	uint32_t mu_tx_wmac_1_done_succ;
+	uint32_t mu_tx_wmac_1_done_fail;
+
+	uint32_t mu_tx_wmac_0_mpdu_total;
+	uint32_t mu_tx_wmac_0_mpdu_succ;
+
+	uint32_t mu_tx_wmac_1_mpdu_total;
+	uint32_t mu_tx_wmac_1_mpdu_succ;
+
+	uint32_t mu_tx_qnum[AUC_FW_WMAC_TX_QNUM];
+	uint32_t tqe_sema_fails;
+};
+#endif // #ifndef _AUC_DEBUG_STATS_H_
+
diff --git a/quantenna/include/qtn/auc_share_def.h b/quantenna/include/qtn/auc_share_def.h
new file mode 100755
index 0000000..3fc17e3
--- /dev/null
+++ b/quantenna/include/qtn/auc_share_def.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2013 Quantenna Communications, Inc.
+ */
+
+#ifndef _AUC_SHARE_DEF_H_
+#define _AUC_SHARE_DEF_H_
+
+/* Define how many TIDs have and which is timer TID */
+#define AUC_TID_FIRST			0
+#define AUC_TID_NUM			20
+#define AUC_TID_TIMER			19
+
+#ifndef __ASSEMBLY__
+/* WMAC parameters */
+#define AUC_FW_WMAC_TX_QNUM		4
+#define AUC_FW_WMAC_TX_QDEEP		4
+
+#define AUC_FW_WMAC_RX_Q_MGMT		0
+#define AUC_FW_WMAC_RX_Q_CTRL		1
+#define AUC_FW_WMAC_RX_Q_DATA		2
+#define AUC_FW_WMAC_RX_QNUM		3
+#define AUC_FW_WMAC_RX_QDEEP_MGMT		8
+#define AUC_FW_WMAC_RX_QDEEP_CTRL		8
+#define AUC_FW_WMAC_RX_QDEEP_DATA		64
+#define AUC_FW_WMAC_RX_DESC_NUM	(AUC_FW_WMAC_RX_QDEEP_MGMT + \
+	AUC_FW_WMAC_RX_QDEEP_CTRL + AUC_FW_WMAC_RX_QDEEP_DATA)
+#endif
+
+/* Used to define 'state' field of qtn_auc_per_tid_data */
+#define QTN_AUC_TID_TX_STATE_IDLE			0		/* idle state, this is init state, please keep zero value */
+#define QTN_AUC_TID_TX_STATE_RUN			1		/* sending state */
+#define QTN_AUC_TID_TX_STATE_WAIT_TIMER_AGG		2		/* waiting on agg timer firing */
+#define QTN_AUC_TID_TX_STATE_WAIT_TX_DONE		3		/* waiting on tx done firing */
+#define QTN_AUC_TID_TX_STATE_WAIT_TX_RESUME		4		/* waiting on ocs tx resume */
+#define QTN_AUC_TID_TX_STATE_MAX			4		/* maximum value of tx states */
+
+/* Used to define 'tqew_state' field of qtn_auc_per_tid_data */
+#define QTN_AUC_TID_TQEW_STATE_RUN			0
+#define QTN_AUC_TID_TQEW_STATE_WAIT_TX_DONE		1
+#define QTN_AUC_TID_TQEW_STATE_MAX			1
+
+#endif // #ifndef _AUC_SHARE_DEF_H_
+
diff --git a/quantenna/include/qtn/bootcfg.h b/quantenna/include/qtn/bootcfg.h
new file mode 100644
index 0000000..966720a
--- /dev/null
+++ b/quantenna/include/qtn/bootcfg.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2009 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ *  Syscfg module - uses config sector for common filesytem between linux and
+ *  uboot.
+ */
+
+
+typedef u32 bootcfg_t;
+
+/******************************************************************************
+	Function:   bootcfg_create
+	Purpose:	create file
+ 	Returns:	0 if successful			
+  	Note:  	    if size is zero, the proc entry is created but
+  	            no data is allocated until the first write
+ *****************************************************************************/
+int bootcfg_create(const char *filename,u32 size);
+
+/******************************************************************************
+	Function:   bootcfg_delete
+	Purpose:	delete file
+ 	Returns:	0 if successful			
+  	Note:  	    
+ *****************************************************************************/
+int bootcfg_delete(const char *token);
+
+/******************************************************************************
+   Function:    bootcfg_get_var
+   Purpose:     Get variable from environment
+   Returns:     NULL if variable not found, pointer to storage otherwise
+   Note:        variable value copied to storage
+ *****************************************************************************/
+char* bootcfg_get_var(const char *variable, char *storage);
+
+/******************************************************************************
+   Function:    bootcfg_set_var
+   Purpose:     Set variable to environment
+   Returns:     NULL if variable not found, pointer to storage otherwise
+   Note:        variable value copied to storage
+ *****************************************************************************/
+int bootcfg_set_var(const char *var, const char *value);
+
diff --git a/quantenna/include/qtn/dmautil.h b/quantenna/include/qtn/dmautil.h
new file mode 100644
index 0000000..26cceba
--- /dev/null
+++ b/quantenna/include/qtn/dmautil.h
@@ -0,0 +1,107 @@
+/*
+ *  Copyright (c) Quantenna Communications, Inc. 2012
+ *  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef __QTN_DMA_UTIL_H
+#define __QTN_DMA_UTIL_H
+
+#ifndef __ASSEMBLY__
+
+#include <linux/types.h>
+#include <linux/dma-mapping.h>
+#include <asm/dma-mapping.h>
+#include <asm/cacheflush.h>
+
+#define ALIGNED_DMA_DESC(typeq, type)		\
+	struct aligned_dma_##type {		\
+		uint32_t desc_count;		\
+		typeq type *descs;		\
+		unsigned long aligned_vdescs;	\
+		unsigned long unaligned_vdescs;	\
+		unsigned long descs_dma_addr;	\
+	}
+
+typedef ALIGNED_DMA_DESC(, void) aligned_dma_descs;
+
+#define ALIGNED_DMA_DESC_ALLOC(_ptr, _count, _align, _is_sram)			\
+	dmautil_aligned_dma_desc_alloc((aligned_dma_descs *)(_ptr),		\
+			sizeof((_ptr)->descs[0]), (_count), (_align), (_is_sram))
+int dmautil_aligned_dma_desc_alloc(aligned_dma_descs *d,
+		unsigned int desc_size, unsigned int desc_count,
+		unsigned int align, bool is_sram);
+
+#define ALIGNED_DMA_DESC_FREE(_ptr)	dmautil_aligned_dma_desc_free((aligned_dma_descs *)(_ptr))
+void dmautil_aligned_dma_desc_free(aligned_dma_descs *d);
+
+/*
+ * Alignment helpers
+ */
+__always_inline static unsigned long align_val_up(unsigned long val, unsigned long step)
+{
+	return ((val + step - 1) & (~(step - 1)));
+}
+__always_inline static unsigned long align_val_down(unsigned long val, unsigned long step)
+{
+	return (val & (~(step - 1)));
+}
+__always_inline static void* align_buf_dma(void *addr)
+{
+	return (void*)align_val_up((unsigned long)addr, dma_get_cache_alignment());
+}
+__always_inline static unsigned long align_buf_dma_offset(void *addr)
+{
+	return ((char *)align_buf_dma(addr) - (char *)addr);
+}
+__always_inline static void* align_buf_cache(void *addr)
+{
+	return (void*)align_val_down((unsigned long)addr, dma_get_cache_alignment());
+}
+__always_inline static unsigned long align_buf_cache_offset(void *addr)
+{
+	return ((char *)addr - (char *)align_buf_cache(addr));
+}
+__always_inline static unsigned long align_buf_cache_size(void *addr, unsigned long size)
+{
+	return align_val_up(size + align_buf_cache_offset(addr), dma_get_cache_alignment());
+}
+
+__always_inline static void flush_dcache_sizerange_safe(void *p, size_t size)
+{
+	uintptr_t op_start = (uintptr_t) align_buf_cache(p);
+	size_t op_size = align_buf_cache_size(p, size);
+	flush_dcache_range(op_start, op_start + op_size);
+}
+
+__always_inline static void flush_and_inv_dcache_sizerange_safe(void *p, size_t size)
+{
+	uintptr_t op_start = (uintptr_t) align_buf_cache(p);
+	size_t op_size = align_buf_cache_size(p, size);
+	flush_and_inv_dcache_range(op_start, op_start + op_size);
+}
+
+__always_inline static void inv_dcache_sizerange_safe(void *p, size_t size)
+{
+	uintptr_t op_start = (uintptr_t) align_buf_cache(p);
+	size_t op_size = align_buf_cache_size(p, size);
+	inv_dcache_range(op_start, op_start + op_size);
+}
+
+#endif	// __ASSEMBLY__
+#endif	// __QTN_DMA_UTIL_H
+
diff --git a/quantenna/include/qtn/emac_debug.h b/quantenna/include/qtn/emac_debug.h
new file mode 100644
index 0000000..6de7aee
--- /dev/null
+++ b/quantenna/include/qtn/emac_debug.h
@@ -0,0 +1,31 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef _QTN_EMAC_DEBUG_H
+#define _QTN_EMAC_DEBUG_H
+
+#include <qtn/skb_recycle.h>
+
+uint32_t qtn_eth_rx_lost_get(struct net_device *dev);
+
+#endif	// _QTN_EMAC_DEBUG_H
+
diff --git a/quantenna/include/qtn/hardware_revision.h b/quantenna/include/qtn/hardware_revision.h
new file mode 100644
index 0000000..d754fbd
--- /dev/null
+++ b/quantenna/include/qtn/hardware_revision.h
@@ -0,0 +1,74 @@
+/*
+ * (C) Copyright 2011 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __RUBY_VERSION_H
+#define __RUBY_VERSION_H
+
+#ifndef __ASSEMBLY__
+
+#include "mproc_sync_base.h"
+
+RUBY_INLINE int get_hardware_revision(void)
+{
+	volatile struct shared_params* sp = qtn_mproc_sync_shared_params_get();
+	if (sp) {
+		return sp->hardware_revision;
+	} else {
+		return HARDWARE_REVISION_UNKNOWN;
+	}
+}
+
+#ifdef __KERNEL__
+RUBY_INLINE int _read_hardware_revision(void)
+{
+	int ret = HARDWARE_REVISION_UNKNOWN;
+	uint32_t board_rev = readl(RUBY_SYS_CTL_CSR);
+
+	if ((board_rev & CHIP_ID_MASK) == CHIP_ID_RUBY) {
+		uint32_t spare1 = readl(RUBY_QT3_BB_TD_SPARE_1);
+		if ((spare1 & CHIP_REV_ID_MASK)  == REV_ID_RUBY_A) {
+			ret = HARDWARE_REVISION_RUBY_A;
+		} else if ((spare1 & CHIP_REV_ID_MASK) == REV_ID_RUBY_B) {
+			ret = HARDWARE_REVISION_RUBY_B;
+		} else if ((spare1 & CHIP_REV_ID_MASK) == REV_ID_RUBY_D){
+			ret = HARDWARE_REVISION_RUBY_D;
+		}
+	} else if ((board_rev & CHIP_ID_MASK) == CHIP_ID_TOPAZ) {
+		switch (board_rev & CHIP_REV_ID_MASK) {
+			case REV_ID_TOPAZ_A:
+				ret = HARDWARE_REVISION_TOPAZ_A;
+				break;
+			case REV_ID_TOPAZ_B:
+				ret = HARDWARE_REVISION_TOPAZ_B;
+				break;
+			case REV_ID_TOPAZ_A2:
+				ret = HARDWARE_REVISION_TOPAZ_A2;
+				break;
+		}
+	}
+	return ret;
+}
+#endif //__KERNEL__
+
+#endif	// __ASSEMBLY__
+#endif	// __RUBY_VERSION_H
+
diff --git a/quantenna/include/qtn/iputil.h b/quantenna/include/qtn/iputil.h
new file mode 100644
index 0000000..39ff354
--- /dev/null
+++ b/quantenna/include/qtn/iputil.h
@@ -0,0 +1,359 @@
+/*SH1
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2012 Quantenna Communications. Inc.                 **
+**                            All Rights Reserved                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH1*/
+
+#ifndef _IPUTIL_H_
+#define _IPUTIL_H_
+
+#include <linux/inetdevice.h>
+#include <linux/if_arp.h>
+#include <linux/ip.h>
+#include <net/ip.h>
+#include <net80211/if_ethersubr.h>
+#if defined(CONFIG_IPV6)
+#include <net/ipv6.h>
+#include <linux/in6.h>
+#include <linux/inet.h>
+#include <net/addrconf.h>
+#endif
+
+#define IPUTIL_HDR_VER_4	4
+#define IPUTIL_HDR_VER_6	6
+
+#define IPUTIL_V4_ADDR_SSDP		htonl(0xEFFFFFFA) /* 239.255.255.250 */
+#define IPUTIL_V4_ADDR_MULTICAST(_addr)	\
+	((_addr & htonl(0xF0000000)) == htonl(0xE0000000)) /* 224.0.0.0/4 */
+#define IPUTIL_V6_ADDR_MULTICAST(_addr)	\
+	((_addr & htonl(0xFF000000)) == htonl(0xFF000000)) /* ff00::/8 - see __ipv6_addr_type() */
+#define IPUTIL_V4_ADDR_LNCB(_addr)	\
+	((_addr & htonl(0xFFFFFF00)) == htonl(0xE0000000)) /* 224.0.0.0/24 */
+
+#define IPUTIL_V4_FRAG_OFFSET(_fh)	(ntohs(_fh->frag_off) & ~0x7)
+#define IPUTIL_V4_FRAG_MF(_fh)		(ntohs(_fh->frag_off) & IP6_MF)
+
+#define IPUTIL_V6_FRAG_OFFSET(_fh)	(ntohs(_fh->frag_off) & ~0x7)
+#define IPUTIL_V6_FRAG_MF(_fh)		(ntohs(_fh->frag_off) & IP6_MF)
+
+#define NIPV6OCTA_FMT "%pI6"
+#define NIPV6OCTA(_ipv6_addr_) _ipv6_addr_
+
+#define IPUTIL_V4_ADDR_LEN 4
+
+#ifdef CONFIG_IPV6
+int iputil_v6_skip_exthdr(const struct ipv6hdr *ipv6h, int start, uint8_t *nexthdrp,
+				int total_len, __be32 *ip_id, uint8_t *more_frags);
+int iputil_v6_ntop(char *buf, const struct in6_addr *addr);
+int iputil_v6_ntop_port(char *buf, const struct in6_addr *addr, __be16 port);
+int iputil_eth_is_v6_mld(void *iphdr, uint32_t data_len);
+
+int iputil_ipv6_is_neigh_msg(struct ipv6hdr *ipv6, struct icmp6hdr *icmpv6);
+int iputil_ipv6_is_neigh_sol_msg(uint8_t dad, struct nd_msg *msg, struct ipv6hdr *ipv6);
+#endif
+
+int iputil_v4_pton(const char *ip_str, __be32 *ipaddr);
+int iputil_v4_ntop_port(char *buf, __be32 addr, __be16 port);
+
+/*
+ * IPv6 broadcasts are scoped multicast.
+ * +--------+----+----+---------------------------------------------+
+ * | 8      | 4  | 4  |                 112 bits                    |
+ * +------ -+----+----+---------------------------------------------+
+ * |11111111|flgs|scop|                 group ID                    |
+ * +--------+----+----+---------------------------------------------+
+ *
+ *  Scope:
+ *  1: Interface-Local (loopback)
+ *  2: Link-Local
+ *  4: Admin-Local
+ *  5: Site-Local
+ *  8: Organization-Local
+ *  E: Global
+ *  0,3,F: reserved
+ *  others: unassigned, are available for administrators to define additional multicast regions.
+ *
+ *  RFC4291 http://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xml
+ */
+#ifdef CONFIG_IPV6
+static inline int iputil_mac_is_v6_local(struct ipv6hdr *ipv6h)
+{
+	struct in6_addr *ipaddr = &ipv6h->daddr;
+
+	return ((ipaddr->in6_u.u6_addr8[0] == 0xff) &&
+		(ipaddr->in6_u.u6_addr8[1] > 0x01) &&
+		(ipaddr->in6_u.u6_addr8[1] < 0x0E));
+}
+#endif
+
+static inline int iputil_is_v4_ssdp(const void *addr, void *iph)
+{
+	static const char ssdp_addr[] = {0x01, 0x00, 0x5E, 0x7F, 0xFF, 0xFA};
+
+	if (unlikely(!memcmp(addr, ssdp_addr, sizeof(ssdp_addr)))) {
+		struct iphdr *ipv4h = iph;
+		uint32_t daddr = get_unaligned((uint32_t *)&ipv4h->daddr);
+
+		if (daddr == IPUTIL_V4_ADDR_SSDP) {
+			return 1;
+		}
+	}
+
+	return 0;
+}
+
+#ifdef CONFIG_IPV6
+/*
+ * IPv6 SSDP is 0xff0?::c
+ */
+static inline int iputil_is_v6_ssdp(const unsigned char *dest, struct ipv6hdr *ipv6h)
+{
+	static const uint8_t ssdp6_addr[ETH_ALEN] = {0x33, 0x33, 0x00, 0x00, 0x00, 0x0c};
+	struct in6_addr *ipaddr = &ipv6h->daddr;
+
+	return ((memcmp(dest, &ssdp6_addr, sizeof(ssdp6_addr)) == 0) &&
+		((__constant_ntohl(ipaddr->in6_u.u6_addr32[0]) & 0xfff0ffff) == 0xff000000) &&
+		(ipaddr->in6_u.u6_addr32[1] == 0) && (ipaddr->in6_u.u6_addr32[2] == 0) &&
+		(ipaddr->in6_u.u6_addr32[3] == __constant_htonl(0xc)));
+}
+#endif
+
+static inline int iputil_is_ssdp(const void *addr, void *iph)
+{
+	if (iputil_is_v4_ssdp(addr, iph)) {
+		return 1;
+	}
+
+#ifdef CONFIG_IPV6
+	if (unlikely(iputil_is_v6_ssdp(addr, iph))) {
+		return 1;
+	}
+#endif
+	return 0;
+}
+
+#ifdef CONFIG_IPV6
+/*
+ * IPv6 all-nodes multicast address
+ * the link-local scope address to reach all nodes is 0xff02::1
+ */
+static inline int iputil_ipv6_is_ll_all_nodes_mc(const unsigned char *dest, void *iph)
+{
+	struct ipv6hdr *ipv6h = (struct ipv6hdr *)iph;
+	static const uint8_t ll_all_nodes_mac_addr[ETH_ALEN] = {0x33, 0x33, 0x00, 0x00, 0x00, 0x01};
+	struct in6_addr *ipaddr = &ipv6h->daddr;
+
+	return ((memcmp(dest, ll_all_nodes_mac_addr, sizeof(ll_all_nodes_mac_addr)) == 0) &&
+		(__constant_ntohl(ipaddr->in6_u.u6_addr32[0]) == 0xff020000) &&
+		(ipaddr->in6_u.u6_addr32[1] == 0) && (ipaddr->in6_u.u6_addr32[2] == 0) &&
+		(ipaddr->in6_u.u6_addr32[3] == __constant_htonl(0x1)));
+}
+#endif
+
+/* Check for a local network control block MAC address */
+static inline int iputil_is_lncb(const uint8_t *addr, const void *iph)
+{
+	static const char lncb_addr[] = {0x01, 0x00, 0x5E, 0x00, 0x00};
+
+	if (unlikely(!memcmp(addr, lncb_addr, sizeof(lncb_addr)))) {
+		const struct iphdr *ipv4h = iph;
+		uint32_t daddr = get_unaligned((uint32_t *)&ipv4h->daddr);
+
+		if (IPUTIL_V4_ADDR_LNCB(daddr)) {
+			return 1;
+		}
+	}
+	return 0;
+}
+
+static inline int iputil_is_multicast(void *iph)
+{
+	const struct iphdr *ipv4h = iph;
+
+	if (ipv4h->version == 4) {
+		uint32_t daddr = get_unaligned((uint32_t *)&ipv4h->daddr);
+
+		return IPUTIL_V4_ADDR_MULTICAST(daddr);
+	}
+
+#ifdef CONFIG_IPV6
+	if (ipv4h->version == 6) {
+		struct ipv6hdr *ipv6h = iph;
+		__be32 daddr = get_unaligned(ipv6h->daddr.s6_addr32);
+
+		return IPUTIL_V6_ADDR_MULTICAST(daddr);
+	}
+#endif
+	return 0;
+}
+
+static inline size_t iputil_hdrlen(void *iph, uint32_t data_len)
+{
+	const struct iphdr *ipv4h = iph;
+#ifdef CONFIG_IPV6
+	const struct ipv6hdr *ip6hdr_p = iph;
+	uint8_t nexthdr;
+	int nhdr_off;
+#endif
+
+	if (likely(ipv4h->version == 4)) {
+		return (ipv4h->ihl << 2);
+	}
+
+#ifdef CONFIG_IPV6
+	/*
+	 * This is the base IPv6 header. If the next header is an option header, its length must be
+	 * accounted for explicitly elsewhere.
+	 */
+	if (ipv4h->version == 6) {
+		nhdr_off = iputil_v6_skip_exthdr(ip6hdr_p,
+			sizeof(struct ipv6hdr),
+			&nexthdr, data_len, NULL, NULL);
+		return nhdr_off;
+	}
+#endif
+	return 0;
+}
+
+static inline int iputil_mac_is_v6_multicast(const uint8_t *mac)
+{
+	const char ipmc6_addr[] = {0x33, 0x33};
+
+	return mac[0] == ipmc6_addr[0] &&
+		mac[1] == ipmc6_addr[1];
+}
+
+static inline int iputil_mac_is_v4_multicast(const uint8_t *mac)
+{
+	const char ipmc4_addr[] = {0x01, 0x00, 0x5E};
+
+	return mac[0] == ipmc4_addr[0] &&
+		mac[1] == ipmc4_addr[1] &&
+		mac[2] == ipmc4_addr[2];
+}
+
+static inline int iputil_eth_is_type(const struct ether_header *eh, const uint16_t ether_type)
+{
+	if (eh->ether_type == __constant_htons(ETH_P_8021Q)) {
+		return (*(&eh->ether_type + 2) == ether_type);
+	}
+
+	return (eh->ether_type == ether_type);
+}
+
+static inline int iputil_eth_is_v6_multicast(const struct ether_header *eh)
+{
+
+	return iputil_eth_is_type(eh, __constant_htons(ETH_P_IPV6)) &&
+		iputil_mac_is_v6_multicast(eh->ether_dhost);
+}
+
+static inline int iputil_eth_is_v4_multicast(const struct ether_header *eh)
+{
+	return iputil_eth_is_type(eh, __constant_htons(ETH_P_IP)) &&
+		iputil_mac_is_v4_multicast(eh->ether_dhost);
+}
+
+static inline int iputil_eth_is_multicast(const struct ether_header *eh)
+{
+	if (iputil_eth_is_v4_multicast(eh)) {
+		return 1;
+	}
+
+#ifdef CONFIG_IPV6
+	if (iputil_eth_is_v6_multicast(eh)) {
+		return 1;
+	}
+#endif
+	return 0;
+}
+
+static inline int iputil_eth_is_ipv4or6(uint16_t ether_type)
+{
+	return ether_type == __constant_htons(ETH_P_IP) ||
+		ether_type == __constant_htons(ETH_P_IPV6);
+}
+
+/* Multicast data traffic, with the most common types of non-streaming mc filtered out */
+static inline int iputil_is_mc_data(const struct ether_header *eh, void *iph)
+{
+	return iputil_eth_is_multicast(eh) &&
+		!iputil_is_lncb(eh->ether_dhost, iph) &&
+		!iputil_is_ssdp(eh->ether_dhost, iph);
+}
+
+uint8_t iputil_proto_info(void *iph, void *data,
+	void **proto_data, uint32_t *ip_id, uint8_t *more_frags);
+
+static inline struct igmphdr *iputil_igmp_hdr(struct iphdr *p_iphdr)
+{
+	return (struct igmphdr *)((unsigned int*)p_iphdr + p_iphdr->ihl);
+}
+
+struct dhcp_message {
+	uint8_t op;
+	uint8_t htype;
+	uint8_t hlen;
+	uint8_t hops;
+	uint32_t xid;
+	uint16_t secs;
+	uint16_t flags;
+	uint32_t ciaddr;
+	uint32_t yiaddr;
+	uint32_t siaddr;
+	uint32_t giaddr;
+	uint8_t chaddr[16];
+	uint8_t sname[64];
+	uint8_t file[128];
+	uint32_t cookie;
+	uint8_t options[0];
+}__attribute__ ((packed));
+
+#define DHCPSERVER_PORT		67
+#define DHCPCLIENT_PORT		68
+
+#define DHCPV6SERVER_PORT	547
+#define DHCPV6CLIENT_PORT	546
+
+#define BOOTREQUEST		1
+#define DHCPREQUEST		3
+#define ARPHRD_ETHER		1
+#define DHCP_BROADCAST_FLAG	0x8000
+
+#endif
diff --git a/quantenna/include/qtn/lhost_muc_comm.h b/quantenna/include/qtn/lhost_muc_comm.h
new file mode 100644
index 0000000..160b054
--- /dev/null
+++ b/quantenna/include/qtn/lhost_muc_comm.h
@@ -0,0 +1,1057 @@
+/*
+ * Copyright (c) 2011 Quantenna Communications, Inc.
+ */
+
+/*
+ * This file contains host definitions which are common between the
+ * host driver and the microcontroller/MAC code.
+ */
+#ifndef _LHOST_MUC_COMM_H
+#define _LHOST_MUC_COMM_H
+
+#include "qtn_uc_comm.h"
+#include "qtn_cca.h"
+#include "qtn_wmm_ac.h"
+#include "net80211/ieee80211.h"
+#include "net80211/ieee80211_crypto.h"
+#include "muc_txrx_stats.h"
+#include "qtn/qvsp_common.h"
+#include "qtn/shared_defs.h"
+#include "qtn/txbf_common.h"
+
+/* packed definitions for each compiler */
+#if defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD)
+# define PACKED	__packed
+# define LM(a,b)	(b)
+# define lhost_volatile
+# define muc_volatile	volatile
+#else
+# define PACKED __attribute__ ((packed))
+# define LM(a,b)	(a)
+# define lhost_volatile	volatile
+# define muc_volatile
+#endif // #if defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD)
+
+#define HOST_TXD_NUMSEG		2
+
+#define QTN_BBIC_11N		0x30
+#define QTN_BBIC_11AC		0x40
+
+#define QTN_VSP_STATS_TID_NUM	4
+
+#define QTN_VSP_TIDS	{ 6, 5, 0, 1 }
+#define QTN_VSP_STATS_TID2IDX	{0, 1, -1, -1, -1, 2, 3, -1}	/* make sure no tids using same index */
+
+struct qtn_vsp_per_node_stats {
+	struct qtn_per_tid_stats per_tid_stats[QTN_VSP_STATS_TID_NUM];
+};
+
+struct qtn_vsp_stats {
+#define QVSP_FAT_MAX		1000
+#define QVSP_FAT_NONE		((uint32_t)(-1))
+	uint32_t	fat;		/* free airtime */
+	uint32_t	intf_ms;	/* interference */
+#if TOPAZ_QTM
+	struct qtn_vsp_per_node_stats per_node_stats[QTN_NCIDX_MAX];
+#endif
+};
+
+/**
+ * \brief This enumeration represents the mode in use on the device.
+ *
+ * This enumeration is used to set the correct bandwidth.
+ */
+
+enum {
+        QTN_11NAC_DISABLE  = 0,
+        QTN_11NAC_ENABLE = 1,
+};
+
+/* Host tx descriptor */
+struct host_txdesc {
+	uint32_t	hd_version:8;	/* Descriptor version */
+	uint32_t	hd_tid:4;	/* packet tid */
+	uint32_t	hd_txstatus:2;	/* Transmit status: 1 sent to MuC, 2 tx success */
+#define QTN_TXSTATUS_TX_ON_MUC 1
+#define QTN_TXSTATUS_TX_SUCCESS 2
+	uint32_t	hd_wmmac:2;	/* Reserved for WMM AC*/
+	uint32_t	hd_pktlen:16;	/* Pkt len (incl. all headers) */
+	uint32_t	hd_node_idx;	/* local node index */
+	uint16_t	hd_seglen[HOST_TXD_NUMSEG];	/* Segment lenghts */
+	uint32_t	hd_segaddr[HOST_TXD_NUMSEG];	/* Phys addr of each seg */
+	uint32_t	hd_ts;		/* Timestamp of the pkt */
+	uint32_t	hd_nextpa;	/* Phys addr of next host tx descr in fwd dir */
+	uint32_t	hd_nextpa_rev;	/* Phys addr of next host tx descr in rev dir */
+	void		*hd_nextva_rev;	/* Virtual addr (LHOST view) of next host tx descr in rev dir */
+	uint32_t	hd_pa;		/* Physical addr of this host tx descr */
+	void		*hd_va;		/* Virtual addr (LHOST view) of this host tx descr */
+	uint32_t		hd_status;	/* Status of HTxD */
+	void		(*hd_muc_txdone_cb)(void *, uint32_t, uint32_t); /* MuC callback after txdone */
+	uint32_t	hd_muc_cb_arg1; /* parameter for hd_muc_txdone_cb */
+	uint32_t	hd_muc_cb_arg2; /* parameter for hd_muc_txdone_cb */
+	uint32_t	hd_txtsf;	/* record the tsf_lo on that frame was sent successfully */
+	uint8_t		hd_mpdu[128];
+	uint8_t		hd_msdu[128];
+	uint8_t		hd_dma[128];
+#define	HTXD_FLAG_AMSDU_DEST_CAPABLE	0x00000002	/* Can be used for AMSDU destination (append to) */
+#define	HTXD_FLAG_AMSDU_SRC_CAPABLE	0x00000004	/* Can be used for AMSDU (copy from) */
+#define HTXD_FLAG_NO_UPDATE_NAV		0x00000008	/* Don't update NAV for this frame */
+#define HTXD_FLAG_NO_RETRY		0x00000010	/* Don't retry this frame if tx failed */
+#define HTXD_FLAG_NO_RETURN		0x00000020	/* Don't return txdesc from MuC to lhost */
+#define HTXD_FLAG_IMM_RETURN		0x00000040	/* Immediately return txdesc from Muc to lhost */
+	uint32_t	hd_flags;
+};
+
+#define QTN_AMSDU_DEST_CAPABLE_SIZE		ETHER_MAX_LEN
+#define QTN_AMSDU_DEST_CAPABLE_GUARD_SIZE	64
+#define QTN_AMSDU_SRC_FRAME_SIZE		(QTN_AMSDU_DEST_CAPABLE_SIZE / 10)
+#define QTN_AMSDU_DEST_CAPABLE_OCCUPY_SIZE	(QTN_AMSDU_DEST_CAPABLE_SIZE / 3 * 2)
+
+#define HTXD_FLAG_SET(_htxd, _flag) \
+	(((struct host_txdesc *)(_htxd))->hd_flags |= (_flag))
+#define	HTXD_FLAG_CLR(_htxd, _flag) \
+	(((struct host_txdesc *)(_htxd))->hd_flags &= ~(_flag))
+#define	HTXD_FLAG_GET(_htxd, _flag) \
+	(((struct host_txdesc *)(_htxd))->hd_flags & (_flag))
+#define	HTXD_FLAG_ISSET(_htxd, _flag) \
+	(!!(((struct host_txdesc *)(_htxd))->hd_flags & (_flag)))
+#define HTXD_FLAG_KEEP_ONLY(_htxd, _flag) \
+	(((struct host_txdesc *)(_htxd))->hd_flags &= (_flag))
+
+
+/* host_ioctl_hifinfo */
+
+#define NAMESIZE		16
+#define VERSION_SIZE		16
+#define MAC_ADDR_LEN		6
+#define MAC_STR_BUF_SIZE	18
+
+#define	HOST_NUM_IOCTLQ		1	/* Number of ioctl q's */
+/*
+ * LHost -> MuC TX queues are per node to allow variable backpressure per node.
+ * One universal management data frame tx mailbox, and one ioctl mailbox
+ */
+#define HOST_NUM_MGMTQ			1
+#define	HOST_NUM_DATAQ			(QTN_NCIDX_MAX)
+#define HOST_NUM_DATASEM		1
+
+#define HOST_IOCTL_INDEX_BASE		0
+#define HOST_MGMT_INDEX_BASE		(HOST_IOCTL_INDEX_BASE + HOST_NUM_IOCTLQ)
+#define HOST_DATA_INDEX_BASE		(HOST_MGMT_INDEX_BASE + HOST_NUM_MGMTQ)
+#define	HOST_NUM_HOSTIFQ		(HOST_NUM_DATAQ + HOST_NUM_IOCTLQ + HOST_NUM_MGMTQ)
+#define HOST_MBOX_SIZE			(sizeof(uint32_t) * HOST_NUM_HOSTIFQ)
+
+#define QTN_PHY_RATE_PROP_SCALE		1024
+#define QTN_MUC_NODE_PKT_LIMIT_MIN	16
+#define QTN_MUC_NODE_PKT_LIMIT_DEFAULT	64
+#define QTN_MUC_NODE_PKT_LIMIT_MAX	128
+
+#define IEEE80211_TXPOW_ENCODE(x)	((255 * 65536) + (x * 256) + 1)
+#define IEEE80211_TXPOW_DECODE(x)	(((x) - (255 * 65536) - 1) / 256)
+#define RF_MIXER_VAL_HI		0x1
+#define RF_MIXER_VAL_LO		0x7
+#define RF_PGA_VAL_HI		0x3
+#define RF_PGA_VAL_LO		0x0
+#define IEEE80211_LOWGAIN_TXPOW_MAX	10
+#define IEEE80211_LOWGAIN_TXPOW_MIN	9
+
+#define IEEE80211_CHAN_SEC_SHIFT	4
+#define IEEE80211_24G_CHAN_SEC_SHIFT	1
+
+struct host_ioctl_hifinfo {
+	uint32_t	hi_mboxstart;			/* Start address for mbox */
+	uint32_t	hi_rxdoneirq;			/* IRQ map for rx done */
+	uint32_t	hi_txdoneirq;			/* IRQ map for tx done */
+	uint32_t	hi_rxfifo;			/* Rx FIFO location */
+	uint32_t	hi_scanirq;			/* IRQ map for Scan */
+	uint32_t	hi_scanfifo;			/* Scan FIFO location */
+	uint32_t	hi_dspgpios;
+	uint32_t	hi_vsp_stats_phys;
+	uint32_t	hi_vapnode_idx;			/* node_idx of the vap node for tx */
+	uint8_t		hi_vapid;
+	char		hi_name[NAMESIZE];		/* Device name */
+	char		hi_version[VERSION_SIZE];	/* basic firmware version */
+	char		hi_algover[VERSION_SIZE];	/* calibration algorithm version */
+	uint8_t		hi_macaddr[MAC_ADDR_LEN];
+	uint8_t		hi_semmap[HOST_NUM_HOSTIFQ];	/* Mapping of semaphores */
+};
+
+typedef int (*scan_done_fn)(int sc_devid, void *chan, int type, int status);
+
+struct host_scandesc {
+	uint8_t	sd_type;
+	uint8_t	sd_devid;
+	uint8_t	status;
+	uint8_t	____pad;
+	uint8_t*	sd_data;
+	scan_done_fn *sd_ppfn;
+	struct host_scandesc *sd_next;
+};
+
+struct host_rxdesc {
+	uint8_t			hw_desc[128]; /* need to be aligned on 8 bytes */
+	uint8_t			*skbuff;
+	uint8_t			*rd_buffer;
+	uint32_t		rs_statword;
+	struct host_rxdesc	*rd_next;
+	struct host_rxdesc	*rd_pa;
+	struct host_rxdesc	*rd_va;
+	void			*node;		/* Where the frame was from */
+	uint8_t			gain_db;
+};
+
+struct host_descfifo {
+	struct host_rxdesc	*df_fifo;		/* Pointer to first descriptor in linked list */
+	volatile uint32_t	df_numelems;		/* Num elems on fifo */
+	volatile uint32_t	df_size;		/* Size of fifo */
+	struct host_rxdesc * volatile hrdstart; /* the ptr to the host_rxdesc linked list  ready for indication */
+};
+
+struct host_scanfifo {
+	uint32_t	sf_req;	/* Pointer to request mailbox */
+	uint32_t	sf_res;	/* Pointer to result mailbox */
+	uint8_t	sf_sem;	/* Semaphore for Scan fifo */
+	uint8_t	tx_sem; /* Semaphore for Scan fifo */
+	uint8_t	____pad[2];
+};
+
+struct host_rxfifo {
+	struct host_descfifo *rf_fifo;	/* Data Descriptor fifo */
+	uint8_t	rf_sem;		/* Semaphore for rx fifo */
+	uint8_t	____pad[3];
+};
+
+struct host_ndp_mesg {
+	uint8_t	macaddr_ta[6];
+	uint8_t	bw;
+	uint8_t	rxgain;
+	uint8_t	mcs;
+	uint8_t	____pad[3];
+};
+
+
+struct host_ioctl {
+	lhost_volatile uint32_t	ioctl_dev;	/* Device to run IOCTL on */
+	lhost_volatile uint32_t	ioctl_command;	/* Command type */
+	lhost_volatile uint32_t	ioctl_arg1;	/* Single valued arg 1 */
+	lhost_volatile uint32_t	ioctl_arg2;	/* Single valued arg 2 */
+	volatile uint32_t		ioctl_argp;	/* Argument payload pointer */
+	volatile uint32_t		ioctl_status;	/* Status from other side */
+	volatile uint32_t		ioctl_rc;	/* Command return code */
+	lhost_volatile struct host_ioctl *ioctl_next;	/* link to next msg in chain */
+};
+
+struct qtn_vap_args {
+	char vap_name[17];
+	uint8_t vap_id;
+	uint8_t vap_macaddr[IEEE80211_ADDR_LEN];
+};
+
+struct qtn_setparams_args
+{
+	int	ni_param;
+	int	ni_value;
+	int	ni_len;
+	unsigned char ni_data[64];
+};
+
+struct qtn_baparams_args {
+	unsigned char ni_addr[8];
+	enum ieee80211_ba_state	state;
+	int	tid;
+	int	type;
+	int	start_seq_num;
+	int	window_size;
+	int	lifetime;
+	uint16_t flags;
+};
+
+#define QTN_HLINK_RC_DONE		0x00000001
+#define QTN_HLINK_RC_ERR		0x00000002
+#define QTN_HLINK_STATUS_AVAIL		1
+
+#define	IOCTL_DEV_VAPCREATE		4	/* Create a vap */
+#define IOCTL_DEV_DEVOPEN		5	/* Bring the device up */
+#define IOCTL_DEV_BEACON_START		6	/* Start Beacon */
+#define	IOCTL_DEV_NEWASSOC		7	/* New associated node */
+#define	IOCTL_DEV_NEWBSSID		8	/* New associated node */
+#define IOCTL_DEV_SEND_NDP_ANNOUNCEMENT	10	/* Send NDP announcement */
+#define IOCTL_DEV_SETPARAMS		11	/* Configure Parameters */
+#define IOCTL_DEV_GETPARAMS		12	/* Configure Parameters */
+#define IOCTL_DEV_BA_ADDED_TX		13
+#define IOCTL_DEV_BA_ADDED_RX		14
+#define IOCTL_DEV_BA_REMOVED_TX		15
+#define IOCTL_DEV_BA_REMOVED_RX		16
+#define	IOCTL_DEV_CHANGE_CHANNEL	17
+#define	IOCTL_DEV_SETKEY		18
+#define IOCTL_DEV_CALCMD		19	/* Send the cal cmd */
+#define	IOCTL_DEV_DELKEY		20
+#define	IOCTL_DEV_CMD			21	/* General commands */
+#define IOCTL_DEV_DISASSOC		22	/* Configure node */
+#define	IOCTL_DEV_SMPS			23	/* MIMO power save mode change */
+#define	IOCTL_DEV_FORCEMICERROR		24
+#define IOCTL_DEV_SET_SCANMODE		25
+#define IOCTL_DEV_XMITCTL		26	/* transmission control (turning on or off) */
+#define IOCTL_DEV_BEACON_STOP		27	/* Stop transmitting beacons */
+#define IOCTL_DEV_SET_MACADDR		30
+#define IOCTL_DEV_KILL_MUC		31
+#define IOCTL_DEV_DUMP_LOG		32
+#define IOCTL_DEV_SET_HRFLAGS		33
+#define IOCTL_DEV_SAMPLE_CHANNEL	34
+#define	IOCTL_DEV_CHANGE_CHAN_DEFERRED	35
+#define	IOCTL_DEV_WMM_PARAMS		36
+#define IOCTL_DEV_VAPDELETE		37	/* Delete a vap */
+#define IOCTL_DEV_STORE_TXPOW		38	/* Store the Tx power, short-range workaround*/
+#define IOCTL_DEV_USE_RTS_CTS		39	/* Enable-disable RTS-CTS */
+#define IOCTL_DEV_RST_QUEUE_DEPTH	40
+#define IOCTL_DEV_SET_POWER_SAVE	41	/* send request to MuC to change power save level */
+#define IOCTL_DEV_VSP			42	/* Configure QVSP */
+#define IOCTL_DEV_SET_11G_ERP           43      /* set 11bg ERP on/off */
+#define IOCTL_DEV_BGSCAN_CHANNEL	44
+#define IOCTL_DEV_SET_OCAC		46
+#define IOCTL_DEV_MEAS_CHANNEL		47	/* notify MUC to execute measurement */
+#define IOCTL_DEV_GET_LINK_MARGIN_INFO	48	/* get rssi info */
+#define	IOCTL_DEV_SET_TDLS_PARAM	49	/* set tdls related paramters */
+#define	IOCTL_DEV_GET_TDLS_PARAM	50	/* set tdls related paramters */
+#define	IOCTL_DEV_POWER_SAVE		51	/* enter/leave power save state */
+#define	IOCTL_DEV_REMAIN_CHANNEL	52	/* Remain on target channel */
+#define IOCTL_DEV_SCS_UPDATE_SCAN_STATS	53
+#define IOCTL_DEV_SET_SCANMODE_STA	54
+#define IOCTL_DEV_GET_MU_GRP		55	/* get MU groups other releated data */
+#define IOCTL_DEV_SET_RX_GAIN_PARAMS	56	/* Set RX gain params */
+#define IOCTL_DEV_GET_MU_ENABLE		57	/* get MU enable flag */
+#define IOCTL_DEV_GET_PRECODE_ENABLE	58	/* get MU precode enable flag */
+#define IOCTL_DEV_GET_MU_USE_EQ		59	/* get EQ enable flag */
+#define IOCTL_DEV_SET_CHAN_POWER_TABLE	60	/* Set MuC power table */
+#define	IOCTL_DEV_ENABLE_VLAN		61	/* Set Global Vlan mode */
+#define	IOCTL_DEV_NODE_UPDATE		62	/* Update node information again after association */
+#define IOCTL_DEV_AIRTIME_CONTROL       63      /* control node tx airtime accumulation start|stop */
+#define IOCTL_DEV_SUSPEND_OFF_CHANNEL   64      /* suspend/resume all off-channel mechanisms globally */
+#define IOCTL_DEV_MU_GROUP_UPDATE	65	/* Update MU groups: nodes and qmats */
+#define IOCTL_DEV_FLUSH_DATA		66	/* periodically flush data */
+#define IOCTL_DEV_GET_TX_MAXAMSDU	67	/* get the TX max msdu size */
+
+#define IOCTL_DEV_CMD_MEMDBG_DUMP	1	/* Dump MuC memory */
+#define IOCTL_DEV_CMD_MEMDBG_DUMPCFG	2	/* Configuration for dumping MuC memory */
+#define IOCTL_DEV_CMD_MEMDBG_DUMPNODES	3	/* Configuration for dumping MuC nodes */
+#define IOCTL_DEV_CMD_SET_DRV_DBG	4	/* Set MUC debug message level*/
+#define IOCTL_DEV_CMD_GET_DRV_DBG	5	/* Get MUC debug message level*/
+#define IOCTL_DEV_CMD_RF_REG_DUMP	6	/* Dump Rfic6 write fegister */
+
+#define	IOCTL_DEVATTACH_DEVFLAG_MASK			0xFFFF0000
+#define	IOCTL_DEVATTACH_DEVFLAG_MASK_S			16
+#define	IOCTL_DEVATTACH_DEVID_MASK			0x000000FF
+#define	IOCTL_DEVATTACH_DEV_RFCHIP_FREQID_MASK		0x00000F00
+#define	IOCTL_DEVATTACH_DEV_RFCHIP_FREQID_MASK_S	8
+#define	IOCTL_DEVATTACH_DEV_RFCHIP_VERID_MASK		0x0000F000
+#define	IOCTL_DEVATTACH_DEV_RFCHIP_VERID_MASK_S		12
+#define	IOCTL_DEVATTACH_IRQNUM				0x000000FF
+#define	IOCTL_DEVATTACH_IRQREG				0x00000F00
+#define	IOCTL_DEVATTACH_IRQREG_S			8
+#define	IOCTL_DEVATTACH_NMBOX_MASK			0x000000FF
+
+#define QTN_CHAN_IEEE			(0xFF << 0)
+#define QTN_CHAN_IEEE_S			(0)
+#define QTN_CHAN_PWR			(0xFF << 8)
+#define QTN_CHAN_PWR_S			(8)
+
+#define QTNCHAN_TO_IEEENUM(chan)	(MS(chan, QTN_CHAN_IEEE))
+
+#define QTN_CHAN_FLG_DFS		0x20000000
+#define QTN_CHAN_FLG_HT40		0x40000000
+#define QTN_CHAN_FLG_PRI_HI		0x80000000
+#define QTN_CHAN_FLG_RSV01		0x01000000
+#define QTN_CHAN_FLG_RSV02		0x02000000
+#define QTN_CHAN_FLG_RSV04		0x04000000
+#define QTN_CHAN_FLG_RSV08		0x08000000
+#define QTN_CHAN_FLG_RSV10		0x10000000
+
+#define QTN_CHAN_FLG_VHT80		0x00800000
+
+#define QTN_BAND_FREQ			(0xFF << 0)
+#define QTN_BAND_FREQ_S			(0)
+
+#define	IOCTL_HLINK_DEVATTACH		1	/* Attach device */
+#define	IOCTL_HLINK_DEVDETACH		2	/* Detach device */
+#define	IOCTL_HLINK_DEVCHANGE		3	/* Change device state/flags */
+#define IOCTL_HLINK_LOGATTACH		4	/* Attach Log */
+#define IOCTL_HLINK_TEMP_ATTACH		5	/* Share temperature struct */
+#define IOCTL_HLINK_SVCERRATTACH	6	/* Attach svcerr */
+#define IOCTL_HLINK_RTNLEVENT		7	/* RTNL event */
+#define IOCTL_HLINK_NDP_FRAME		8	/* NDP frame */
+#define IOCTL_HLINK_FOPS_REQ		9	/* Recv File I/O req */
+#define IOCTL_HLINK_MIC_ERR		10	/* TKIP MIC failure detected */
+#define IOCTL_HLINK_BOOTED		11	/* MuC boot complete */
+#define IOCTL_HLINK_DROP_BA		12	/* drop BA */
+#define IOCTL_HLINK_DISASSOC_STA	13	/* disassociate station with a given aid */
+#define IOCTL_HLINK_RFIC_CAUSED_REBOOT  14      /* detected RFIC abnormal reset, reboot the system */
+#define IOCTL_HLINK_BA_ADD_START	15	/* start Tx ADDBA REQ sequence */
+#define IOCTL_HLINK_PEER_RTS		16	/* Peer RTS enable or disable */
+#define IOCTL_HLINK_DYN_WMM		17	/* Dynamic WMM enable or disable */
+#define IOCTL_HLINK_TDLS_EVENTS		18	/* TDLS Events from MuCfw */
+#define IOCTL_HLINK_RATE_TRAIN		19	/* Per-node rate training hash */
+
+enum {
+	BW_INVALID = 0,
+	BW_HT20 = 20,
+	BW_HT40 = 40,
+	BW_HT80 = 80,
+	BW_HT160 = 160
+};
+
+/* Fixed bw command offset */
+#define QTN_BW_FIXED_BW		0x3
+#define QTN_BW_FIXED_BW_S	0
+#define QTN_BW_FIXED_EN		0x10
+#define QTN_BW_FIXED_EN_S	4
+
+struct qtn_csa_info {
+	uint64_t	req_tsf;		/* aim to change channels at this tsf */
+	uint64_t	switch_tsf;		/* tsf just after channel change completed */
+	uint32_t	pre_notification_tu;	/* pre-switch notification to lhost in TU */
+	uint32_t	post_notification_tu;	/* post channel change notification */
+	uint32_t	freq_band;		/* freqency band info */
+	uint32_t	channel;		/* channel to switch to */
+	uint8_t		sta_dfs_strict_mode;
+#define QTN_CSA_STATUS_MUC_SCHEDULED		0x00000001
+#define QTN_CSA_STATUS_MUC_ERROR_SCHED		0x00000010
+#define QTN_CSA_STATUS_MUC_PRE			0x00000002
+#define QTN_CSA_STATUS_MUC_SWITCHED		0x00000004
+#define QTN_CSA_STATUS_MUC_POST			0x00000008
+#define QTN_CSA_STATUS_MUC_ERROR_SW		0x00000010
+#define QTN_CSA_STATUS_MUC_CANCELLED		0x00000020
+#define QTN_CSA_STATUS_MUC_COMPLETE		0x00000040
+	uint32_t	muc_status;		/* status written by MuC */
+
+#define QTN_CSA_RESTART_QUEUE			0x00000001
+#define QTN_CSA_STATUS_LHOST_PRE_DONE		0x00000002
+#define QTN_CSA_STATUS_LHOST_SWITCH_DONE	0x00000004
+#define QTN_CSA_STATUS_LHOST_POST_DONE		0x00000008
+#define QTN_CSA_CANCEL				0x00000010
+#define QTN_CSA_STATUS_LHOST_ACTIVE		0x00000020
+#define QTN_CSA_STATUS_LHOST_UNITS_OFFSET	0x00000040
+	uint32_t	lhost_status;		/* flags written by lhost */
+};
+
+#define MEAS_RPI_HISTOGRAM_SIZE		8
+
+enum meas_reason {
+	QTN_MEAS_REASON_SUCC = 0,
+	QTN_MEAS_REASON_OFF_CHANNEL_UNSUPPORT,
+	QTN_MEAS_REASON_DURATION_TOO_SHORT,
+	QTN_MEAS_REASON_TIMER_SCHED_FAIL,
+	QTN_MEAS_REASON_TYPE_UNSUPPORT,
+	QTN_MEAS_REASON_MAX,
+};
+
+enum meas_type {
+	QTN_MEAS_TYPE_BASIC = 0,
+	QTN_MEAS_TYPE_CCA,
+	QTN_MEAS_TYPE_RPI,
+	QTN_MEAS_TYPE_CHAN_LOAD,
+	QTN_MEAS_TYPE_NOISE_HIS,
+	QTN_MEAS_TYPE_MAX,
+};
+
+struct meas_time_slice {
+	uint32_t meas_slice;	/* time slice */
+	uint32_t meas_time_pri;	/* prime time count based on meas_slice */
+	uint32_t meas_time_sec; /* secondary time count based on meas_slice */
+};
+
+struct qtn_meas_chan_info {
+	uint32_t work_channel;			/* working channel to return to */
+	int32_t	meas_type;			/* measurement type */
+	int32_t	meas_reason;			/* measurement reason */
+	struct meas_time_slice time_slice;	/* time slice for measurement long duration */
+	uint32_t meas_channel;
+	uint64_t meas_start_tsf;
+	uint32_t meas_dur_ms;
+	union {
+		struct {
+			uint32_t cca_busy_cnt;
+			uint32_t cca_try_cnt;
+			uint32_t cca_try_ms;
+			uint32_t cca_busy_ms;
+		} cca_and_chanload;
+		uint8_t rpi_counts[MEAS_RPI_HISTOGRAM_SIZE];
+		int32_t basic_radar_num;
+		uint8_t basic;
+	} inter_data;
+};
+
+enum scs_lot_tsf_pos {
+	SCS_LOG_TSF_POS_LHOST_TASK_KICKOFF,
+	SCS_LOG_TSF_POS_LHOST_IOCTL2MUC,
+	SCS_LOG_TSF_POS_MUC_POLL_IOCTL_FROM_LHOST,
+	SCS_LOG_TSF_POS_MUC_QOSNULL_SENT,
+	SCS_LOG_TSF_POS_MUC_SMPL_START_BEFORE_CHAN_CHG,
+	SCS_LOG_TSF_POS_MUC_SMPL_START_AFTER_CHAN_CHG,
+	SCS_LOG_TSF_POS_MUC_SMPL_FINISH_BEFORE_CHAN_CHG,
+	SCS_LOG_TSF_POS_MUC_SMPL_FINISH_AFTER_CHAN_CHG,
+	SCS_LOG_TSF_POS_LHOST_CCA_INTR,
+	SCS_LOG_TSF_POS_LHOST_CCA_WORK,
+	SCS_LOG_TSF_POS_NUM
+};
+
+#define IEEE80211_SCS_LOG_TSF(_ic, _sample, _pos)	((_ic)->ic_get_tsf(&((_sample)->tsf[(_pos)])))
+#define QDRV_SCS_LOG_TSF(_sample, _pos)			(hal_get_tsf(&((_sample)->tsf[(_pos)])))
+#define MUC_SCS_LOG_TSF(_qh, _sample, _pos)		(hal_get_tsf((_qh), &((_sample)->tsf[(_pos)])))
+
+struct qtn_samp_chan_info {
+	struct out_cca_info	result;		/* results structure for CCA measurement */
+	uint32_t		freq_band;
+	uint32_t		samp_channel;	/* The channel on which sample will be taken */
+	uint32_t		duration_msecs;	/* Duration in milliseconds to stay on off channel */
+	uint64_t		start_tsf;	/* tsf at which to start sampling */
+
+#define QTN_CCA_STATUS_IDLE		0x0
+#define QTN_CCA_STATUS_HOST_IOCTL_SENT	0x1
+#define QTN_CCA_STATUS_MUC_SCHEDULED	0x2
+#define QTN_CCA_STATUS_MUC_STARTED	0x3
+#define QTN_CCA_STATUS_MUC_COMPLETE	0x4
+#define QTN_CCA_STATUS_MUC_CANCELLED	0x5
+	uint32_t		status;
+
+#define QTN_CCA_TYPE_BACKGROUND		0x1
+#define QTN_CCA_TYPE_DIRECTLY		0x2
+	uint32_t		type;
+
+	uint32_t		qosnull_txdesc_host;	/* qosnull frame for channel sampling */
+	uint32_t		qosnull_txdesc_bus;	/* qosnull frame in phyaddr */
+	uint16_t		qosnull_frame_len;	/* the frame length of qosnull */
+	uint16_t		tx_node_idx;		/* the node index that qosnull frame to */
+	uint32_t		qosnull_txtsf;		/* the tsf_lo read from MAC on that qosnull frame was sent successfully */
+	uint32_t		qosnull_nav;		/* the large NAV in qosnull frame */
+	uint64_t		tsf[SCS_LOG_TSF_POS_NUM];	/* timestamps used for precise time control and profiling */
+};
+
+#define QTN_SCS_ASSOC_STA_MAX	12
+
+struct qtn_scs_vsp_node_stats {
+	uint32_t ni_associd;
+	uint32_t tx_usecs;
+	uint32_t rx_usecs;
+};
+
+struct qtn_scs_vsp_info {
+	uint32_t	num_of_assoc;
+	struct  qtn_scs_vsp_node_stats scs_vsp_node_stats[QTN_SCS_ASSOC_STA_MAX];
+};
+
+struct qtn_scs_scan_info {
+	uint32_t	bw_sel;
+	uint32_t	cca_idle;
+	uint32_t	cca_busy;
+	uint32_t	cca_tx;
+	uint32_t	cca_intf;
+	uint32_t	cca_try;
+	uint32_t	bcn_rcvd;
+	uint32_t	crc_err;
+	uint32_t	lpre_err;
+	uint32_t	spre_err;
+};
+
+#define QTN_SCS_MAX_OC_INFO	32
+struct qtn_scs_data_history {
+#define QTN_SCS_FILTER_WINDOW_SZ	5
+#define QTN_SCS_FILTER_MEDIAN_IDX	(QTN_SCS_FILTER_WINDOW_SZ / 2)
+	uint32_t idx;
+	uint32_t buffer[QTN_SCS_FILTER_WINDOW_SZ];
+};
+
+struct qtn_scs_stats_history {
+	struct qtn_scs_data_history lp_errs[QTN_SCS_MAX_OC_INFO];
+	struct qtn_scs_data_history sp_errs[QTN_SCS_MAX_OC_INFO];
+};
+
+struct qtn_scs_oc_info {
+	uint32_t	off_channel;
+	uint32_t	off_chan_bw_sel;
+	uint32_t	off_chan_cca_busy;
+	uint32_t	off_chan_cca_sample_cnt;
+	uint32_t	off_chan_cca_try_cnt;
+	uint32_t	off_chan_beacon_recvd;
+	uint32_t	off_chan_crc_errs;
+	uint32_t	off_chan_sp_errs;
+	uint32_t	off_chan_lp_errs;
+};
+/* Smart channel selection data shared between Lhost and MuC */
+struct qtn_scs_info {
+	uint32_t	oc_info_count;
+	struct qtn_scs_oc_info oc_info[QTN_SCS_MAX_OC_INFO];
+	uint32_t	bw_sel;
+	uint32_t	cca_try;
+	uint32_t	cca_busy;
+	uint32_t	cca_idle;
+	uint32_t	cca_tx;
+	uint32_t	cca_interference;
+	uint32_t	beacon_recvd;
+	uint32_t	tx_usecs;
+	uint32_t	rx_usecs;
+	struct qtn_scs_vsp_info scs_vsp_info;
+};
+
+struct qtn_scs_info_set {
+	uint32_t	valid_index; /* 0 or 1 */
+	struct qtn_scs_info scs_info[2];
+	struct qtn_scs_scan_info scan_info[IEEE80211_CHAN_MAX];
+	struct qtn_scs_stats_history stats_history;
+};
+
+struct qtn_remain_chan_info {
+	uint32_t chipid;
+	uint32_t data_channel;		/* Data channel to return to */
+	uint32_t off_channel;		/* The required remain channel */
+	uint32_t duration_usecs;	/* Duration in microseconds to stay on remain channel */
+	uint64_t start_tsf;		/* tsf at which to switch to remain channel */
+
+#define QTN_REM_CHAN_STATUS_IDLE		0x0
+#define QTN_REM_CHAN_STATUS_HOST_IOCTL_SENT	0x1
+#define QTN_REM_CHAN_STATUS_MUC_SCHEDULED	0x2
+#define QTN_REM_CHAN_STATUS_MUC_STARTED	0x3
+#define QTN_REM_CHAN_STATUS_MUC_COMPLETE	0x4
+#define QTN_REM_CHAN_STATUS_MUC_CANCELLED	0x5
+	uint32_t status;		/* channel switch status */
+
+	uint8_t peer_mac[IEEE80211_ADDR_LEN];	/* peer node mac address */
+};
+
+
+#define QTN_CCA_CNT2MS(_cnt)   RUBY_TIMER_MUC_CCA_CNT2MS(_cnt)
+#define QTN_CCA_INTV           RUBY_TIMER_MUC_CCA_INTV
+
+enum scan_chan_tsf_pos {
+	SCAN_CHAN_TSF_LHOST_HOSTLINK_IOCTL = 0,
+	SCAN_CHAN_TSF_MUC_IOCTL_PROCESS,
+	SCAN_CHAN_TSF_MUC_SEND_START_FRM,
+	SCAN_CHAN_TSF_MUC_SEND_START_FRM_DONE,
+	SCAN_CHAN_TSF_MUC_GOTO_OFF_CHAN,
+	SCAN_CHAN_TSF_MUC_GOTO_OFF_CHAN_DONE,
+	SCAN_CHAN_TSF_MUC_SEND_PRBREQ_FRM,
+	SCAN_CHAN_TSF_MUC_SEND_PRBREQ_FRM_DONE,
+	SCAN_CHAN_TSF_MUC_GOTO_DATA_CHAN,
+	SCAN_CHAN_TSF_MUC_GOTO_DATA_CHAN_DONE,
+	SCAN_CHAN_TSF_MUC_SEND_FINISH_FRM,
+	SCAN_CHAN_TSF_MUC_SEND_FINISH_FRM_DONE,
+	SCAN_CHAN_TSF_LHOST_INTERRUPT,
+	SCAN_CHAN_TSF_LHOST_SCANWORK,
+	SCAN_CHAN_TSF_LOG_NUM
+};
+
+struct scan_chan_tsf_dbg {
+	int pos_index;
+	char *log_name;
+};
+
+#define QDRV_SCAN_LOG_TSF(_scan, _pos)		(hal_get_tsf(&((_scan)->tsf[(_pos)])))
+#define MUC_SCAN_LOG_TSF(_qh, _scan, _pos)	(hal_get_tsf((_qh), &((_scan)->tsf[(_pos)])))
+
+struct qtn_scan_chan_info {
+	uint32_t	freq_band;
+	uint32_t	scan_channel;		/* The channel on which sample will be taken */
+#define TIME_MARGIN_BEFORE_STARTFRM	3000	/* microseconds, time overhead for others before start frame is sent*/
+#define TIME_MARGIN_AFTER_STARTFRM	1000	/* microseconds, time overhead for others after start frame is sent*/
+#define TIME_OFFSET_SEND_PROBE_REQ	3000	/* microseconds, the time offset for sending probe_req frame
+						 * after switching to off channel*/
+#define TIME_OFFSET_SEND_START_FRM	5000	/* microseconds, the time offset for sending start frame
+						 * after set NETDEV_F_PAUSE_TX flag */
+#define TIME_DUR_FOR_ALL_BEACONS	25000	/* microseconds, the time duration for transmitting all beacons */
+#define TIME_MIN_WAIT_PROBE_REP		5000	/* microseconds, the minimal time for waiting for the probe
+						 * response frame on scanning channel */
+	uint32_t	dwell_msecs;		/* Duration in milliseconds to stay on scanning channel */
+#define QTN_SCAN_CHAN_MUC_IDLE			0x0
+#define QTN_SCAN_CHAN_MUC_STARTED		0x1
+#define QTN_SCAN_CHAN_MUC_PROBING		0x2
+#define QTN_SCAN_CHAN_MUC_COMPLETED		0x3
+#define QTN_SCAN_CHAN_MUC_FAILED		0x4
+#define QTN_SCAN_CHAN_MUC_SCHEDULED		0x5
+	uint32_t	muc_status;		/* written only by MuC */
+#define QTN_SCAN_CHAN_FLAG_ACTIVE		0x00000001
+#define QTN_SCNA_CHAN_FLAG_PASSIVE_FAST		0x00000002
+#define QTN_SCNA_CHAN_FLAG_PASSIVE_NORMAL	0x00000004
+#define QTN_SCNA_CHAN_FLAG_PASSIVE_SLOW		0x00000008
+#define QTN_SCAN_CHAN_TURNOFF_RF		0x00000010
+	uint32_t	scan_flags;
+	uint32_t	start_txdesc_host;	/* The frame sent before go scan channel,
+						 * e.g. pwrsav frame in STA mode */
+	uint32_t	start_txdesc_bus;	/* Start frame in phyaddr */
+	uint16_t	start_node_idx;		/* the node index that frame to */
+	uint16_t	start_frame_len;	/* frame length */
+	uint32_t	prbreq_txdesc_host;	/* probe request frame for active scanning */
+	uint32_t	prbreq_txdesc_bus;	/* probe request frame in phyaddr */
+	uint16_t	prbreq_node_idx;	/* the node index that frame to */
+	uint16_t	prbreq_frame_len;	/* frame length */
+	uint32_t	finish_txdesc_host;	/* The frame sent after back data channel,
+						 * e.g. the frame to announce waking up in STA mode */
+	uint32_t	finish_txdesc_bus;	/* Complete frame in phyaddr */
+	uint16_t	finish_node_idx;		/* the node index that frame to */
+	uint16_t	finish_frame_len;	/* frame length */
+	uint64_t	tsf[SCAN_CHAN_TSF_LOG_NUM];
+};
+
+enum qtn_ocac_tsf_log {
+	OCAC_TSF_LOG_GOTO_OFF_CHAN = 0,
+	OCAC_TSF_LOG_GOTO_OFF_CHAN_DONE,
+	OCAC_TSF_LOG_GOTO_DATA_CHAN,
+	OCAC_TSF_LOG_GOTO_DATA_CHAN_DONE,
+	OCAC_TSF_LOG_NUM
+};
+
+struct qtn_ocac_info {
+	uint32_t		freq_band;	/* frequency band, written by lhost */
+	uint32_t		off_channel;	/* The off channel, "0" means to stop ocac in MuC, written by lhost*/
+	uint32_t		qosnull_txdesc_host;	/* qosnull frame in virtual address, written by lhost */
+	uint32_t		qosnull_txdesc_bus;	/* qosnull frame in physical address, written by lhost */
+	uint16_t		qosnull_frame_len;	/* the frame length of qosnull */
+	uint16_t		tx_node_idx;		/* the node index that qosnull frame to */
+	uint16_t		dwell_time;	/* the required time on off channel in one beacon interval, written by lhost */
+	uint16_t		secure_dwell;	/* milliseconds, the time on off channel within on off-channel action, using
+							qosnull frame with large NAV to protect the traffic */
+	uint16_t		threshold_fat;	/* the fat threshold to run off-channel CAC, written by lhost */
+	uint16_t		threshold_traffic;	/* the traffic threshold to run off-channel CAC, written by lhost */
+	uint16_t		threshold_fat_dec;	/* the threshold for consecutive fat decrease, written by lhost */
+	uint16_t		traffic_ctrl;	/* whether to send qosnull or not, written by lhost */
+	uint16_t		offset_txhalt;	/* milliseconds, the offset after beacon to halt tx, written by lhost */
+	uint16_t		offset_offchan;	/* milliseconds, the offset after halt tx to switch off channel, written by lhost */
+
+#define QTN_OCAC_ON_DATA_CHAN	0x1
+#define QTN_OCAC_ON_OFF_CHAN	0x2
+	uint16_t		chan_status;	/* current on which channel, written by MuC */
+	uint16_t		actual_dwell_time;	/* the actual time on off channel, written by MuC */
+	uint64_t		tsf_log[OCAC_TSF_LOG_NUM];	/* event tsf log, written by MuC */
+};
+
+enum bmps_state_e {
+	BMPS_STATE_OFF		= 0,		/* STA exits BMPS mode */
+	BMPS_STATE_WAKE		= 1,		/* in BMPS mode, and is fully powered on */
+						/* with PM set to 0 */
+	BMPS_STATE_SLEEP	= 2,		/* in BMPS mode, and is fully powered off */
+						/* with PM set to 1 */
+	BMPS_STATE_WAKE_TO_SLEEP	= 3,	/* in BMPS mode, and is transitting from */
+						/* power-on to power-off by sending Null frame */
+						/* with PM=1 to AP */
+	BMPS_STATE_LEAK_WINDOW	= 4,		/* in BMPS mode, and Null frame with PM=1 */
+						/* has been sent, TX path is paused, */
+						/* but RX patgh is still running to */
+						/* receive packets from leaky AP */
+	BMPS_STATE_SLEEP_TO_WAKE	= 5,	/* in BMPS mode, and is transitting from */
+						/* power-off to power-on by sending */
+						/* Null frame with PM=0 to AP */
+	BMPS_STATE_BEACON_SNOOP	= 6,		/* in BMPS mode, and RX chain is powered up */
+						/* to receive beacon */
+	BMPS_STATE_MAX		= BMPS_STATE_BEACON_SNOOP,
+};
+
+struct qtn_bmps_info {
+	uint32_t	null_txdesc_host;	/* null frame in virtual address */
+	uint32_t	null_txdesc_bus;	/* null frame in physical address */
+	uint16_t	null_frame_len;		/* the frame length of null */
+	uint16_t	tx_node_idx;		/* the node index that null frame to */
+	enum bmps_state_e	state;		/* shared BMPS status */
+};
+
+struct qtn_rf_rxgain_params
+{
+	uint8_t lna_on_indx;
+	uint8_t max_gain_idx;
+	int16_t cs_thresh_dbm;
+	int16_t cca_prim_dbm;
+	int16_t cca_sec_scs_off_dbm;
+	int16_t cca_sec_scs_on_dbm;
+};
+
+/* MuC fops requst */
+#define MUC_FOPS_MAX_FNAME_SIZE (50)
+enum {
+	MUC_FOPS_OPEN = 0,
+	MUC_FOPS_READ,
+	MUC_FOPS_WRITE,
+	MUC_FOPS_LSEEK,
+	MUC_FOPS_CLOSE,
+};
+
+enum {
+	MUC_FOPS_PENDING = 0x011ADDED,
+	MUC_FOPS_DONE    = 0xF035D0DE,
+};
+
+enum {
+	MUC_FOPS_RDONLY = 0x0,
+	MUC_FOPS_WRONLY = 0x1,
+	MUC_FOPS_RDWR 	= 0x2,
+	MUC_FOPS_APPEND = 0x4,
+};
+
+struct muc_fops_req	{
+	volatile int32_t ret_val;
+	volatile int32_t fd;
+	volatile uint32_t req_state;
+	volatile char *data_buff;
+};
+
+enum qdrv_cmd_muc_memdbgcnf_s {
+	QDRV_CMD_MUC_MEMDBG_STATUS,
+	QDRV_CMD_MUC_MEMDBG_FD_MAX,
+	QDRV_CMD_MUC_MEMDBG_NODE_MAX,
+	QDRV_CMD_MUC_MEMDBG_DUMP_MAX,
+	QDRV_CMD_MUC_MEMDBG_RATETBL,
+	QDRV_CMD_MUC_MEMDBG_MSG_SEND,
+	QDRV_CMD_MUC_MEMDBG_TRACE,
+	QDRV_CMD_MUC_MEMDBG_LAST
+};
+
+/* The following file indexes and file lists must all be kept in sync */
+#define FOPS_FD_EP_SAMPLES		9
+#define FOPS_FD_DCACHE_SAMPLES		10
+#ifdef PROFILE_MUC_SAMPLE_IPTR_AUC
+#define FOPS_FD_IPTR_SAMPLES		15
+#else
+#define FOPS_FD_IPTR_SAMPLES		11
+#endif
+#define FOPS_FD_UBOOT_ENV		12
+
+#ifdef TOPAZ_RFIC6_PLATFORM
+#define LHOST_CAL_FILES         {       \
+        NULL,                           \
+        "/proc/bootcfg/bf_factor",      \
+        "/tmp/txpower.txt",             \
+        "/proc/bootcfg/txpower.cal",    \
+        "/proc/bootcfg/dc_iq.cal",      \
+        "/mnt/jffs2/mon.out",           \
+        "/mnt/jffs2/gmon.out",          \
+        "/mnt/jffs2/pecount.out",       \
+        "/proc/bootcfg/pdetector.cal",  \
+        "/mnt/jffs2/profile_ep_muc",    \
+        "/mnt/jffs2/profile_dcache_muc",\
+        "/mnt/jffs2/profile_iptr_muc",  \
+        "/proc/bootcfg/env",            \
+        "/etc/mtest",           \
+        "/proc/bootcfg/rx_iq.cal", \
+				"/mnt/jffs2/profile_iptr_auc",	\
+				"/proc/bootcfg/bf_factor_2g",	\
+				"/tmp/txpower_2g.txt",		\
+				"/proc/bootcfg/dc_iq_2g.cal",	\
+				"/proc/bootcfg/pdetector_2g.cal",\
+				"/tmp/bond_opt.txt",	         \
+}
+#else
+#define LHOST_CAL_FILES		{	\
+	NULL,				\
+	"/proc/bootcfg/bf_factor",	\
+	"/tmp/txpower.txt",		\
+	"/proc/bootcfg/txpower.cal",	\
+	"/proc/bootcfg/dc_iq.cal",	\
+	"/mnt/jffs2/mon.out",		\
+	"/mnt/jffs2/gmon.out",		\
+	"/mnt/jffs2/pecount.out",	\
+	"/proc/bootcfg/pdetector.cal",	\
+	"/mnt/jffs2/profile_ep_muc",	\
+	"/mnt/jffs2/profile_dcache_muc",\
+	"/mnt/jffs2/profile_iptr_muc",	\
+	"/proc/bootcfg/env",		\
+  "/etc/mtest",           \
+	"/proc/bootcfg/rx_iq.cal",	\
+	"/mnt/jffs2/profile_iptr_auc",	\
+}
+#endif
+
+#define MUC_CAL_FILES		{	\
+	NULL,				\
+	NULL,				\
+	NULL,				\
+	NULL,				\
+	NULL,				\
+	"mon.out",			\
+	"gmon.out",			\
+	NULL,				\
+	NULL,				\
+	NULL,				\
+	NULL,				\
+	NULL,				\
+	NULL,				\
+}
+
+enum tdls_ioctl_params {
+	IOCTL_TDLS_STATUS = 1,
+	IOCTL_TDLS_UAPSD_IND_WND,
+	IOCTL_TDLS_PTI_CTRL,
+	IOCTL_TDLS_PTI,
+	IOCTL_TDLS_PTI_PENDING,
+	IOCTL_TDLS_DBG_LEVEL,
+	IOCTL_TDLS_PTI_DELAY,
+	IOCTL_TDLS_PTI_EVENT = 100
+};
+
+struct qtn_tdls_args {
+	uint8_t		ni_macaddr[IEEE80211_ADDR_LEN];
+	uint16_t	ni_ncidx;
+	uint32_t	tdls_cmd;
+	uint32_t	tdls_params;
+};
+
+struct qtn_node_args
+{
+	/* header */
+	uint8_t	ni_macaddr[IEEE80211_ADDR_LEN];
+	uint8_t	ni_bssid[IEEE80211_ADDR_LEN];
+	uint8_t	ni_nrates;
+	uint8_t	ni_rates[IEEE80211_RATE_MAXSIZE];
+	uint8_t	ni_htnrates;
+	uint8_t	ni_htrates[IEEE80211_HT_RATE_MAXSIZE];
+	uint16_t	ni_associd;	/* assoc response */
+	uint16_t	ni_node_idx;
+	uint16_t	ni_flags;	/* special-purpose state */
+	struct wmm_params	wmm_params[WME_NUM_AC];
+	uint8_t	ni_implicit_ba_rx; /* The RX side of the implicit BA. Zero for no implicit RX BA */
+	uint8_t	ni_implicit_ba_tx; /* The TX side of the implicit BA. Zero for no implicit TX BA */
+	uint16_t	ni_raw_bintval;		/* raw beacon interval */
+	uint16_t	ni_implicit_ba_size; /* Size of the implicit BAs */
+	uint8_t	ni_qtn_ie_flags;
+	uint8_t ni_vendor;
+	uint8_t ni_bbf_disallowed;      /* flag to disallow BBF */
+	uint8_t ni_std_bf_disallowed;      /* flag to disallow standard BF */
+	uint8_t ni_uapsd;	/* U-APSD per-node flags matching WMM STA Qos Info field */
+	uint8_t	ni_htcap[sizeof(struct ieee80211_htcap)];	/* Processed HT capabilities */
+	uint8_t	ni_htinfo[sizeof(struct ieee80211_htinfo)];	/* Processed HT info */
+	uint8_t	ni_vhtcap[sizeof(struct ieee80211_vhtcap)];	/* Processed VHT capabilities */
+	uint8_t	ni_vhtop[sizeof(struct ieee80211_vhtop)];	/* Processed VHT operational info */
+	struct qtn_node_shared_stats *ni_shared_stats;
+	uint32_t	ni_ver_sw;
+	uint32_t	ni_qtn_flags;
+	uint32_t	ni_tdls_status;
+	uint8_t		ni_mu_grp[sizeof(struct ieee80211_vht_mu_grp)];
+	uint16_t	ni_rsn_caps;		/* optional rsn capabilities */
+	uint8_t		rsn_ucastcipher;	/* selected unicast cipher */
+	uint16_t	tdls_peer_associd;	/* tdls peer AID allocated by AP, unique in BSS */
+	uint32_t	ni_rate_train;
+	uint32_t	ni_rate_train_peer;
+};
+
+struct qtn_beacon_args
+{
+	struct wmm_params		wmm_params[WME_NUM_AC];
+	uint32_t			bintval;
+	uint32_t			bo_tim_len;
+	uint32_t			bo_htcap;
+	uint32_t			bo_htinfo;
+	uint32_t			bo_vhtcap;
+	uint32_t			bo_vhtop;
+	uint32_t			bc_ie_head;
+};
+
+struct qtn_key {
+	u_int8_t wk_keylen;		/* key length in bytes */
+	u_int8_t wk_flags;
+#define IEEE80211_KEY_XMIT	0x01	/* key used for xmit */
+#define IEEE80211_KEY_RECV	0x02	/* key used for recv */
+#define IEEE80211_KEY_GROUP	0x04	/* key used for WPA group operation */
+#define IEEE80211_KEY_SWCRYPT	0x10	/* host-based encrypt/decrypt */
+#define IEEE80211_KEY_SWMIC	0x20	/* host-based enmic/demic */
+	u_int16_t wk_keyix;		/* key index */
+	u_int8_t wk_key[IEEE80211_KEYBUF_SIZE + IEEE80211_MICBUF_SIZE];
+#define wk_txmic    wk_key + IEEE80211_KEYBUF_SIZE + 0  /* XXX can't () right */
+#define wk_rxmic    wk_key + IEEE80211_KEYBUF_SIZE + 8  /* XXX can't () right */
+	u_int64_t wk_keyrsc[IEEE80211_TID_SIZE];    /* key receive sequence counter */
+	u_int64_t wk_keytsc;		/* key transmit sequence counter */
+	u_int32_t wk_cipher;		/* cipher */
+	u_int32_t wk_ncidx;		/* node cache index */
+};
+#define IEEE80211_KEY_COMMON		/* common flags passed in by apps */\
+	(IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV | IEEE80211_KEY_GROUP)
+
+struct qtn_key_args
+{
+	struct qtn_key	key;
+	uint8_t	wk_addr[IEEE80211_ADDR_LEN];
+};
+
+struct qtn_power_save_args
+{
+	uint32_t enable;
+	uint8_t ni_addr[IEEE80211_ADDR_LEN];
+};
+
+struct lhost_txdesc
+{
+	struct host_txdesc	hw_desc;	/* shared between muc and lhost */
+	struct sk_buff		*skb;
+	struct lhost_txdesc	*next;
+};
+
+#define MUC_TXSTATUS_READY		0x0
+#define MUC_TXSTATUS_DONE		0x1
+
+#define MUC_RXSTATUS_DONE		0x1
+
+#define MUC_RXSTATUS_MIC_ERR		0x00000002
+#define MUC_RXSTATUS_MIC_ERR_S		1
+#define MUC_RXSTATUS_NCIDX		0x00000FFC
+#define MUC_RXSTATUS_NCIDX_S		2
+#define MUC_RXSTATUS_RXLEN		0xFFFF0000
+#define MUC_RXSTATUS_RXLEN_S		16
+
+struct qtn_link_margin_info {
+	uint32_t	mcs;
+	uint32_t	bw;
+	int		rssi_avg;
+	int		reason;
+#define QTN_LINK_MARGIN_REASON_SUCC		0
+#define QTN_LINK_MARGIN_REASON_NOSUCHNODE	1
+	uint8_t		mac_addr[IEEE80211_ADDR_LEN];
+};
+
+#define QTN_RESERVED_DEVIDS		2
+#define QTN_WLANID_FROM_DEVID(devid)	\
+	((devid < QTN_RESERVED_DEVIDS)? 0 : (devid - QTN_RESERVED_DEVIDS))
+
+struct qtn_mu_grp_args {
+	/* MU group ID. 0 means the group is not used and grp_ni is empty*/
+	uint8_t grp_id;
+	/* mu QMat installation status */
+	/* QMat is not installed and not used */
+#define MU_QMAT_DISABLED	0
+	/* QMat is installed and used */
+#define MU_QMAT_ENABLED		1
+	/* QMat is installed, used but not updated */
+#define MU_QMAT_FREEZED		2
+	/* QMat is installed, not used and not updated */
+#define MU_QMAT_NOT_USED	3
+	uint8_t qmat_installed;
+	/* the index of the grp_ni[], is also the user position */
+	uint16_t aid[IEEE80211_MU_GRP_NODES_MAX];
+	uint8_t ncidx[IEEE80211_MU_GRP_NODES_MAX];
+	/* matrix addr offsets in sram */
+	unsigned int u0_1ss_u1_1ss;
+	unsigned int u0_2ss_u1_1ss;
+	unsigned int u0_3ss_u1_1ss;
+	unsigned int u0_1ss_u1_2ss;
+	unsigned int u0_1ss_u1_3ss;
+	unsigned int u0_2ss_u1_2ss;
+	/* stats */
+	uint32_t upd_cnt;
+	int32_t rank;
+};
+
+enum grp_op {
+	MU_GRP_NONE = 0,
+	MU_GRP_INST,
+	MU_GRP_DELE,
+};
+
+struct qtn_mu_group_update_args {
+	enum grp_op op;
+	struct upd_grp {
+		int grp_id;
+		unsigned int ap_devid;
+		uint8_t ap_macaddr[IEEE80211_ADDR_LEN];
+		struct upd_nodes {
+			int as_sta;
+			struct ieee80211_vht_mu_grp grp;
+			uint8_t macaddr[IEEE80211_ADDR_LEN];
+		} nodes[QTN_MU_NODES_PER_GROUP];
+	} groups[QTN_MU_QMAT_MAX_SLOTS];
+};
+
+#endif	// _LHOST_MUC_COMM_H
+
diff --git a/quantenna/include/qtn/log_table/1024_10log10_table.txt b/quantenna/include/qtn/log_table/1024_10log10_table.txt
new file mode 100644
index 0000000..e95c1b3
--- /dev/null
+++ b/quantenna/include/qtn/log_table/1024_10log10_table.txt
@@ -0,0 +1,4096 @@
+0,
+3083,
+4886,
+6166,
+7158,
+7969,
+8654,
+9248,
+9772,
+10240,
+10664,
+11051,
+11407,
+11737,
+12044,
+12331,
+12600,
+12854,
+13095,
+13323,
+13540,
+13747,
+13945,
+14134,
+14315,
+14490,
+14658,
+14819,
+14975,
+15126,
+15272,
+15413,
+15550,
+15683,
+15812,
+15937,
+16059,
+16177,
+16293,
+16406,
+16515,
+16623,
+16727,
+16829,
+16929,
+17027,
+17123,
+17216,
+17308,
+17398,
+17486,
+17572,
+17657,
+17740,
+17822,
+17902,
+17981,
+18058,
+18134,
+18209,
+18282,
+18355,
+18426,
+18496,
+18565,
+18633,
+18700,
+18765,
+18830,
+18894,
+18957,
+19020,
+19081,
+19141,
+19201,
+19260,
+19318,
+19376,
+19432,
+19488,
+19543,
+19598,
+19652,
+19705,
+19758,
+19810,
+19861,
+19912,
+19962,
+20012,
+20061,
+20110,
+20158,
+20205,
+20252,
+20299,
+20345,
+20391,
+20436,
+20480,
+20525,
+20569,
+20612,
+20655,
+20697,
+20740,
+20781,
+20823,
+20864,
+20904,
+20945,
+20984,
+21024,
+21063,
+21102,
+21141,
+21179,
+21217,
+21254,
+21291,
+21328,
+21365,
+21401,
+21437,
+21473,
+21508,
+21543,
+21578,
+21613,
+21647,
+21681,
+21715,
+21749,
+21782,
+21815,
+21848,
+21881,
+21913,
+21945,
+21977,
+22009,
+22040,
+22071,
+22102,
+22133,
+22163,
+22194,
+22224,
+22254,
+22284,
+22313,
+22343,
+22372,
+22401,
+22429,
+22458,
+22487,
+22515,
+22543,
+22571,
+22598,
+22626,
+22653,
+22681,
+22708,
+22734,
+22761,
+22788,
+22814,
+22840,
+22866,
+22892,
+22918,
+22944,
+22969,
+22995,
+23020,
+23045,
+23070,
+23094,
+23119,
+23144,
+23168,
+23192,
+23216,
+23240,
+23264,
+23288,
+23311,
+23335,
+23358,
+23382,
+23405,
+23428,
+23450,
+23473,
+23496,
+23518,
+23541,
+23563,
+23585,
+23607,
+23629,
+23651,
+23673,
+23695,
+23716,
+23737,
+23759,
+23780,
+23801,
+23822,
+23843,
+23864,
+23885,
+23905,
+23926,
+23946,
+23967,
+23987,
+24007,
+24027,
+24047,
+24067,
+24087,
+24107,
+24126,
+24146,
+24165,
+24185,
+24204,
+24223,
+24242,
+24261,
+24280,
+24299,
+24318,
+24337,
+24355,
+24374,
+24392,
+24411,
+24429,
+24447,
+24466,
+24484,
+24502,
+24520,
+24538,
+24555,
+24573,
+24591,
+24608,
+24626,
+24643,
+24661,
+24678,
+24695,
+24713,
+24730,
+24747,
+24764,
+24781,
+24798,
+24815,
+24831,
+24848,
+24865,
+24881,
+24898,
+24914,
+24930,
+24947,
+24963,
+24979,
+24995,
+25011,
+25028,
+25043,
+25059,
+25075,
+25091,
+25107,
+25122,
+25138,
+25154,
+25169,
+25185,
+25200,
+25215,
+25231,
+25246,
+25261,
+25276,
+25291,
+25307,
+25322,
+25336,
+25351,
+25366,
+25381,
+25396,
+25410,
+25425,
+25440,
+25454,
+25469,
+25483,
+25498,
+25512,
+25526,
+25541,
+25555,
+25569,
+25583,
+25597,
+25611,
+25625,
+25639,
+25653,
+25667,
+25681,
+25695,
+25708,
+25722,
+25736,
+25749,
+25763,
+25777,
+25790,
+25804,
+25817,
+25830,
+25844,
+25857,
+25870,
+25883,
+25897,
+25910,
+25923,
+25936,
+25949,
+25962,
+25975,
+25988,
+26001,
+26013,
+26026,
+26039,
+26052,
+26064,
+26077,
+26090,
+26102,
+26115,
+26127,
+26140,
+26152,
+26165,
+26177,
+26189,
+26202,
+26214,
+26226,
+26238,
+26251,
+26263,
+26275,
+26287,
+26299,
+26311,
+26323,
+26335,
+26347,
+26359,
+26370,
+26382,
+26394,
+26406,
+26417,
+26429,
+26441,
+26452,
+26464,
+26476,
+26487,
+26499,
+26510,
+26522,
+26533,
+26544,
+26556,
+26567,
+26578,
+26590,
+26601,
+26612,
+26623,
+26634,
+26646,
+26657,
+26668,
+26679,
+26690,
+26701,
+26712,
+26723,
+26734,
+26745,
+26755,
+26766,
+26777,
+26788,
+26799,
+26809,
+26820,
+26831,
+26841,
+26852,
+26863,
+26873,
+26884,
+26894,
+26905,
+26915,
+26926,
+26936,
+26946,
+26957,
+26967,
+26978,
+26988,
+26998,
+27008,
+27019,
+27029,
+27039,
+27049,
+27059,
+27069,
+27080,
+27090,
+27100,
+27110,
+27120,
+27130,
+27140,
+27150,
+27160,
+27169,
+27179,
+27189,
+27199,
+27209,
+27219,
+27228,
+27238,
+27248,
+27257,
+27267,
+27277,
+27286,
+27296,
+27306,
+27315,
+27325,
+27334,
+27344,
+27353,
+27363,
+27372,
+27382,
+27391,
+27400,
+27410,
+27419,
+27429,
+27438,
+27447,
+27456,
+27466,
+27475,
+27484,
+27493,
+27502,
+27512,
+27521,
+27530,
+27539,
+27548,
+27557,
+27566,
+27575,
+27584,
+27593,
+27602,
+27611,
+27620,
+27629,
+27638,
+27647,
+27656,
+27665,
+27673,
+27682,
+27691,
+27700,
+27709,
+27717,
+27726,
+27735,
+27743,
+27752,
+27761,
+27769,
+27778,
+27787,
+27795,
+27804,
+27812,
+27821,
+27829,
+27838,
+27846,
+27855,
+27863,
+27872,
+27880,
+27889,
+27897,
+27905,
+27914,
+27922,
+27931,
+27939,
+27947,
+27955,
+27964,
+27972,
+27980,
+27988,
+27997,
+28005,
+28013,
+28021,
+28029,
+28037,
+28046,
+28054,
+28062,
+28070,
+28078,
+28086,
+28094,
+28102,
+28110,
+28118,
+28126,
+28134,
+28142,
+28150,
+28158,
+28166,
+28174,
+28181,
+28189,
+28197,
+28205,
+28213,
+28221,
+28228,
+28236,
+28244,
+28252,
+28259,
+28267,
+28275,
+28283,
+28290,
+28298,
+28306,
+28313,
+28321,
+28329,
+28336,
+28344,
+28351,
+28359,
+28366,
+28374,
+28382,
+28389,
+28397,
+28404,
+28412,
+28419,
+28426,
+28434,
+28441,
+28449,
+28456,
+28464,
+28471,
+28478,
+28486,
+28493,
+28500,
+28508,
+28515,
+28522,
+28530,
+28537,
+28544,
+28551,
+28559,
+28566,
+28573,
+28580,
+28587,
+28595,
+28602,
+28609,
+28616,
+28623,
+28630,
+28637,
+28645,
+28652,
+28659,
+28666,
+28673,
+28680,
+28687,
+28694,
+28701,
+28708,
+28715,
+28722,
+28729,
+28736,
+28743,
+28750,
+28757,
+28763,
+28770,
+28777,
+28784,
+28791,
+28798,
+28805,
+28812,
+28818,
+28825,
+28832,
+28839,
+28846,
+28852,
+28859,
+28866,
+28873,
+28879,
+28886,
+28893,
+28900,
+28906,
+28913,
+28920,
+28926,
+28933,
+28940,
+28946,
+28953,
+28959,
+28966,
+28973,
+28979,
+28986,
+28992,
+28999,
+29005,
+29012,
+29018,
+29025,
+29031,
+29038,
+29044,
+29051,
+29057,
+29064,
+29070,
+29077,
+29083,
+29090,
+29096,
+29102,
+29109,
+29115,
+29122,
+29128,
+29134,
+29141,
+29147,
+29153,
+29160,
+29166,
+29172,
+29179,
+29185,
+29191,
+29197,
+29204,
+29210,
+29216,
+29222,
+29229,
+29235,
+29241,
+29247,
+29253,
+29260,
+29266,
+29272,
+29278,
+29284,
+29290,
+29296,
+29303,
+29309,
+29315,
+29321,
+29327,
+29333,
+29339,
+29345,
+29351,
+29357,
+29363,
+29369,
+29375,
+29381,
+29387,
+29393,
+29399,
+29405,
+29411,
+29417,
+29423,
+29429,
+29435,
+29441,
+29447,
+29453,
+29459,
+29465,
+29471,
+29477,
+29482,
+29488,
+29494,
+29500,
+29506,
+29512,
+29518,
+29523,
+29529,
+29535,
+29541,
+29547,
+29552,
+29558,
+29564,
+29570,
+29575,
+29581,
+29587,
+29593,
+29598,
+29604,
+29610,
+29616,
+29621,
+29627,
+29633,
+29638,
+29644,
+29650,
+29655,
+29661,
+29667,
+29672,
+29678,
+29683,
+29689,
+29695,
+29700,
+29706,
+29711,
+29717,
+29723,
+29728,
+29734,
+29739,
+29745,
+29750,
+29756,
+29761,
+29767,
+29772,
+29778,
+29783,
+29789,
+29794,
+29800,
+29805,
+29811,
+29816,
+29822,
+29827,
+29833,
+29838,
+29843,
+29849,
+29854,
+29860,
+29865,
+29870,
+29876,
+29881,
+29886,
+29892,
+29897,
+29903,
+29908,
+29913,
+29919,
+29924,
+29929,
+29935,
+29940,
+29945,
+29950,
+29956,
+29961,
+29966,
+29972,
+29977,
+29982,
+29987,
+29993,
+29998,
+30003,
+30008,
+30013,
+30019,
+30024,
+30029,
+30034,
+30039,
+30045,
+30050,
+30055,
+30060,
+30065,
+30070,
+30076,
+30081,
+30086,
+30091,
+30096,
+30101,
+30106,
+30111,
+30116,
+30122,
+30127,
+30132,
+30137,
+30142,
+30147,
+30152,
+30157,
+30162,
+30167,
+30172,
+30177,
+30182,
+30187,
+30192,
+30197,
+30202,
+30207,
+30212,
+30217,
+30222,
+30227,
+30232,
+30237,
+30242,
+30247,
+30252,
+30257,
+30262,
+30267,
+30272,
+30277,
+30281,
+30286,
+30291,
+30296,
+30301,
+30306,
+30311,
+30316,
+30321,
+30325,
+30330,
+30335,
+30340,
+30345,
+30350,
+30355,
+30359,
+30364,
+30369,
+30374,
+30379,
+30383,
+30388,
+30393,
+30398,
+30403,
+30407,
+30412,
+30417,
+30422,
+30426,
+30431,
+30436,
+30441,
+30445,
+30450,
+30455,
+30459,
+30464,
+30469,
+30474,
+30478,
+30483,
+30488,
+30492,
+30497,
+30502,
+30506,
+30511,
+30516,
+30520,
+30525,
+30530,
+30534,
+30539,
+30544,
+30548,
+30553,
+30557,
+30562,
+30567,
+30571,
+30576,
+30580,
+30585,
+30590,
+30594,
+30599,
+30603,
+30608,
+30612,
+30617,
+30622,
+30626,
+30631,
+30635,
+30640,
+30644,
+30649,
+30653,
+30658,
+30662,
+30667,
+30671,
+30676,
+30680,
+30685,
+30689,
+30694,
+30698,
+30703,
+30707,
+30712,
+30716,
+30720,
+30725,
+30729,
+30734,
+30738,
+30743,
+30747,
+30752,
+30756,
+30760,
+30765,
+30769,
+30774,
+30778,
+30782,
+30787,
+30791,
+30795,
+30800,
+30804,
+30809,
+30813,
+30817,
+30822,
+30826,
+30830,
+30835,
+30839,
+30843,
+30848,
+30852,
+30856,
+30861,
+30865,
+30869,
+30873,
+30878,
+30882,
+30886,
+30891,
+30895,
+30899,
+30903,
+30908,
+30912,
+30916,
+30921,
+30925,
+30929,
+30933,
+30937,
+30942,
+30946,
+30950,
+30954,
+30959,
+30963,
+30967,
+30971,
+30975,
+30980,
+30984,
+30988,
+30992,
+30996,
+31001,
+31005,
+31009,
+31013,
+31017,
+31021,
+31026,
+31030,
+31034,
+31038,
+31042,
+31046,
+31050,
+31055,
+31059,
+31063,
+31067,
+31071,
+31075,
+31079,
+31083,
+31087,
+31091,
+31096,
+31100,
+31104,
+31108,
+31112,
+31116,
+31120,
+31124,
+31128,
+31132,
+31136,
+31140,
+31144,
+31148,
+31152,
+31156,
+31161,
+31165,
+31169,
+31173,
+31177,
+31181,
+31185,
+31189,
+31193,
+31197,
+31201,
+31205,
+31209,
+31213,
+31217,
+31221,
+31224,
+31228,
+31232,
+31236,
+31240,
+31244,
+31248,
+31252,
+31256,
+31260,
+31264,
+31268,
+31272,
+31276,
+31280,
+31284,
+31288,
+31291,
+31295,
+31299,
+31303,
+31307,
+31311,
+31315,
+31319,
+31323,
+31327,
+31330,
+31334,
+31338,
+31342,
+31346,
+31350,
+31354,
+31357,
+31361,
+31365,
+31369,
+31373,
+31377,
+31381,
+31384,
+31388,
+31392,
+31396,
+31400,
+31403,
+31407,
+31411,
+31415,
+31419,
+31423,
+31426,
+31430,
+31434,
+31438,
+31441,
+31445,
+31449,
+31453,
+31457,
+31460,
+31464,
+31468,
+31472,
+31475,
+31479,
+31483,
+31487,
+31490,
+31494,
+31498,
+31502,
+31505,
+31509,
+31513,
+31516,
+31520,
+31524,
+31528,
+31531,
+31535,
+31539,
+31542,
+31546,
+31550,
+31553,
+31557,
+31561,
+31565,
+31568,
+31572,
+31576,
+31579,
+31583,
+31587,
+31590,
+31594,
+31598,
+31601,
+31605,
+31608,
+31612,
+31616,
+31619,
+31623,
+31627,
+31630,
+31634,
+31638,
+31641,
+31645,
+31648,
+31652,
+31656,
+31659,
+31663,
+31666,
+31670,
+31674,
+31677,
+31681,
+31684,
+31688,
+31691,
+31695,
+31699,
+31702,
+31706,
+31709,
+31713,
+31716,
+31720,
+31724,
+31727,
+31731,
+31734,
+31738,
+31741,
+31745,
+31748,
+31752,
+31755,
+31759,
+31762,
+31766,
+31769,
+31773,
+31776,
+31780,
+31783,
+31787,
+31790,
+31794,
+31797,
+31801,
+31804,
+31808,
+31811,
+31815,
+31818,
+31822,
+31825,
+31829,
+31832,
+31836,
+31839,
+31843,
+31846,
+31849,
+31853,
+31856,
+31860,
+31863,
+31867,
+31870,
+31874,
+31877,
+31880,
+31884,
+31887,
+31891,
+31894,
+31898,
+31901,
+31904,
+31908,
+31911,
+31915,
+31918,
+31921,
+31925,
+31928,
+31932,
+31935,
+31938,
+31942,
+31945,
+31948,
+31952,
+31955,
+31959,
+31962,
+31965,
+31969,
+31972,
+31975,
+31979,
+31982,
+31985,
+31989,
+31992,
+31995,
+31999,
+32002,
+32005,
+32009,
+32012,
+32015,
+32019,
+32022,
+32025,
+32029,
+32032,
+32035,
+32039,
+32042,
+32045,
+32049,
+32052,
+32055,
+32058,
+32062,
+32065,
+32068,
+32072,
+32075,
+32078,
+32081,
+32085,
+32088,
+32091,
+32094,
+32098,
+32101,
+32104,
+32108,
+32111,
+32114,
+32117,
+32121,
+32124,
+32127,
+32130,
+32133,
+32137,
+32140,
+32143,
+32146,
+32150,
+32153,
+32156,
+32159,
+32163,
+32166,
+32169,
+32172,
+32175,
+32179,
+32182,
+32185,
+32188,
+32191,
+32195,
+32198,
+32201,
+32204,
+32207,
+32210,
+32214,
+32217,
+32220,
+32223,
+32226,
+32230,
+32233,
+32236,
+32239,
+32242,
+32245,
+32249,
+32252,
+32255,
+32258,
+32261,
+32264,
+32267,
+32271,
+32274,
+32277,
+32280,
+32283,
+32286,
+32289,
+32292,
+32296,
+32299,
+32302,
+32305,
+32308,
+32311,
+32314,
+32317,
+32320,
+32324,
+32327,
+32330,
+32333,
+32336,
+32339,
+32342,
+32345,
+32348,
+32351,
+32354,
+32358,
+32361,
+32364,
+32367,
+32370,
+32373,
+32376,
+32379,
+32382,
+32385,
+32388,
+32391,
+32394,
+32397,
+32400,
+32403,
+32407,
+32410,
+32413,
+32416,
+32419,
+32422,
+32425,
+32428,
+32431,
+32434,
+32437,
+32440,
+32443,
+32446,
+32449,
+32452,
+32455,
+32458,
+32461,
+32464,
+32467,
+32470,
+32473,
+32476,
+32479,
+32482,
+32485,
+32488,
+32491,
+32494,
+32497,
+32500,
+32503,
+32506,
+32509,
+32512,
+32515,
+32518,
+32521,
+32524,
+32527,
+32530,
+32533,
+32536,
+32538,
+32541,
+32544,
+32547,
+32550,
+32553,
+32556,
+32559,
+32562,
+32565,
+32568,
+32571,
+32574,
+32577,
+32580,
+32583,
+32586,
+32588,
+32591,
+32594,
+32597,
+32600,
+32603,
+32606,
+32609,
+32612,
+32615,
+32618,
+32620,
+32623,
+32626,
+32629,
+32632,
+32635,
+32638,
+32641,
+32644,
+32646,
+32649,
+32652,
+32655,
+32658,
+32661,
+32664,
+32667,
+32669,
+32672,
+32675,
+32678,
+32681,
+32684,
+32687,
+32690,
+32692,
+32695,
+32698,
+32701,
+32704,
+32707,
+32709,
+32712,
+32715,
+32718,
+32721,
+32724,
+32727,
+32729,
+32732,
+32735,
+32738,
+32741,
+32743,
+32746,
+32749,
+32752,
+32755,
+32758,
+32760,
+32763,
+32766,
+32769,
+32772,
+32774,
+32777,
+32780,
+32783,
+32786,
+32788,
+32791,
+32794,
+32797,
+32800,
+32802,
+32805,
+32808,
+32811,
+32813,
+32816,
+32819,
+32822,
+32825,
+32827,
+32830,
+32833,
+32836,
+32838,
+32841,
+32844,
+32847,
+32849,
+32852,
+32855,
+32858,
+32860,
+32863,
+32866,
+32869,
+32871,
+32874,
+32877,
+32880,
+32882,
+32885,
+32888,
+32891,
+32893,
+32896,
+32899,
+32901,
+32904,
+32907,
+32910,
+32912,
+32915,
+32918,
+32921,
+32923,
+32926,
+32929,
+32931,
+32934,
+32937,
+32939,
+32942,
+32945,
+32948,
+32950,
+32953,
+32956,
+32958,
+32961,
+32964,
+32966,
+32969,
+32972,
+32974,
+32977,
+32980,
+32982,
+32985,
+32988,
+32990,
+32993,
+32996,
+32998,
+33001,
+33004,
+33006,
+33009,
+33012,
+33014,
+33017,
+33020,
+33022,
+33025,
+33028,
+33030,
+33033,
+33036,
+33038,
+33041,
+33044,
+33046,
+33049,
+33051,
+33054,
+33057,
+33059,
+33062,
+33065,
+33067,
+33070,
+33072,
+33075,
+33078,
+33080,
+33083,
+33086,
+33088,
+33091,
+33093,
+33096,
+33099,
+33101,
+33104,
+33106,
+33109,
+33112,
+33114,
+33117,
+33119,
+33122,
+33125,
+33127,
+33130,
+33132,
+33135,
+33137,
+33140,
+33143,
+33145,
+33148,
+33150,
+33153,
+33156,
+33158,
+33161,
+33163,
+33166,
+33168,
+33171,
+33173,
+33176,
+33179,
+33181,
+33184,
+33186,
+33189,
+33191,
+33194,
+33196,
+33199,
+33202,
+33204,
+33207,
+33209,
+33212,
+33214,
+33217,
+33219,
+33222,
+33224,
+33227,
+33229,
+33232,
+33235,
+33237,
+33240,
+33242,
+33245,
+33247,
+33250,
+33252,
+33255,
+33257,
+33260,
+33262,
+33265,
+33267,
+33270,
+33272,
+33275,
+33277,
+33280,
+33282,
+33285,
+33287,
+33290,
+33292,
+33295,
+33297,
+33300,
+33302,
+33305,
+33307,
+33310,
+33312,
+33315,
+33317,
+33320,
+33322,
+33325,
+33327,
+33330,
+33332,
+33334,
+33337,
+33339,
+33342,
+33344,
+33347,
+33349,
+33352,
+33354,
+33357,
+33359,
+33362,
+33364,
+33366,
+33369,
+33371,
+33374,
+33376,
+33379,
+33381,
+33384,
+33386,
+33389,
+33391,
+33393,
+33396,
+33398,
+33401,
+33403,
+33406,
+33408,
+33410,
+33413,
+33415,
+33418,
+33420,
+33423,
+33425,
+33427,
+33430,
+33432,
+33435,
+33437,
+33439,
+33442,
+33444,
+33447,
+33449,
+33452,
+33454,
+33456,
+33459,
+33461,
+33464,
+33466,
+33468,
+33471,
+33473,
+33476,
+33478,
+33480,
+33483,
+33485,
+33487,
+33490,
+33492,
+33495,
+33497,
+33499,
+33502,
+33504,
+33507,
+33509,
+33511,
+33514,
+33516,
+33518,
+33521,
+33523,
+33526,
+33528,
+33530,
+33533,
+33535,
+33537,
+33540,
+33542,
+33544,
+33547,
+33549,
+33551,
+33554,
+33556,
+33559,
+33561,
+33563,
+33566,
+33568,
+33570,
+33573,
+33575,
+33577,
+33580,
+33582,
+33584,
+33587,
+33589,
+33591,
+33594,
+33596,
+33598,
+33601,
+33603,
+33605,
+33608,
+33610,
+33612,
+33615,
+33617,
+33619,
+33622,
+33624,
+33626,
+33628,
+33631,
+33633,
+33635,
+33638,
+33640,
+33642,
+33645,
+33647,
+33649,
+33652,
+33654,
+33656,
+33658,
+33661,
+33663,
+33665,
+33668,
+33670,
+33672,
+33674,
+33677,
+33679,
+33681,
+33684,
+33686,
+33688,
+33690,
+33693,
+33695,
+33697,
+33700,
+33702,
+33704,
+33706,
+33709,
+33711,
+33713,
+33715,
+33718,
+33720,
+33722,
+33725,
+33727,
+33729,
+33731,
+33734,
+33736,
+33738,
+33740,
+33743,
+33745,
+33747,
+33749,
+33752,
+33754,
+33756,
+33758,
+33761,
+33763,
+33765,
+33767,
+33770,
+33772,
+33774,
+33776,
+33779,
+33781,
+33783,
+33785,
+33787,
+33790,
+33792,
+33794,
+33796,
+33799,
+33801,
+33803,
+33805,
+33807,
+33810,
+33812,
+33814,
+33816,
+33819,
+33821,
+33823,
+33825,
+33827,
+33830,
+33832,
+33834,
+33836,
+33838,
+33841,
+33843,
+33845,
+33847,
+33849,
+33852,
+33854,
+33856,
+33858,
+33860,
+33863,
+33865,
+33867,
+33869,
+33871,
+33874,
+33876,
+33878,
+33880,
+33882,
+33885,
+33887,
+33889,
+33891,
+33893,
+33895,
+33898,
+33900,
+33902,
+33904,
+33906,
+33909,
+33911,
+33913,
+33915,
+33917,
+33919,
+33922,
+33924,
+33926,
+33928,
+33930,
+33932,
+33935,
+33937,
+33939,
+33941,
+33943,
+33945,
+33947,
+33950,
+33952,
+33954,
+33956,
+33958,
+33960,
+33962,
+33965,
+33967,
+33969,
+33971,
+33973,
+33975,
+33977,
+33980,
+33982,
+33984,
+33986,
+33988,
+33990,
+33992,
+33995,
+33997,
+33999,
+34001,
+34003,
+34005,
+34007,
+34009,
+34012,
+34014,
+34016,
+34018,
+34020,
+34022,
+34024,
+34026,
+34028,
+34031,
+34033,
+34035,
+34037,
+34039,
+34041,
+34043,
+34045,
+34047,
+34050,
+34052,
+34054,
+34056,
+34058,
+34060,
+34062,
+34064,
+34066,
+34068,
+34071,
+34073,
+34075,
+34077,
+34079,
+34081,
+34083,
+34085,
+34087,
+34089,
+34091,
+34094,
+34096,
+34098,
+34100,
+34102,
+34104,
+34106,
+34108,
+34110,
+34112,
+34114,
+34116,
+34118,
+34121,
+34123,
+34125,
+34127,
+34129,
+34131,
+34133,
+34135,
+34137,
+34139,
+34141,
+34143,
+34145,
+34147,
+34149,
+34151,
+34154,
+34156,
+34158,
+34160,
+34162,
+34164,
+34166,
+34168,
+34170,
+34172,
+34174,
+34176,
+34178,
+34180,
+34182,
+34184,
+34186,
+34188,
+34190,
+34192,
+34194,
+34196,
+34199,
+34201,
+34203,
+34205,
+34207,
+34209,
+34211,
+34213,
+34215,
+34217,
+34219,
+34221,
+34223,
+34225,
+34227,
+34229,
+34231,
+34233,
+34235,
+34237,
+34239,
+34241,
+34243,
+34245,
+34247,
+34249,
+34251,
+34253,
+34255,
+34257,
+34259,
+34261,
+34263,
+34265,
+34267,
+34269,
+34271,
+34273,
+34275,
+34277,
+34279,
+34281,
+34283,
+34285,
+34287,
+34289,
+34291,
+34293,
+34295,
+34297,
+34299,
+34301,
+34303,
+34305,
+34307,
+34309,
+34311,
+34313,
+34315,
+34317,
+34319,
+34321,
+34323,
+34325,
+34327,
+34329,
+34331,
+34333,
+34335,
+34337,
+34339,
+34341,
+34343,
+34345,
+34347,
+34349,
+34351,
+34352,
+34354,
+34356,
+34358,
+34360,
+34362,
+34364,
+34366,
+34368,
+34370,
+34372,
+34374,
+34376,
+34378,
+34380,
+34382,
+34384,
+34386,
+34388,
+34390,
+34392,
+34394,
+34395,
+34397,
+34399,
+34401,
+34403,
+34405,
+34407,
+34409,
+34411,
+34413,
+34415,
+34417,
+34419,
+34421,
+34423,
+34425,
+34427,
+34428,
+34430,
+34432,
+34434,
+34436,
+34438,
+34440,
+34442,
+34444,
+34446,
+34448,
+34450,
+34452,
+34454,
+34455,
+34457,
+34459,
+34461,
+34463,
+34465,
+34467,
+34469,
+34471,
+34473,
+34475,
+34476,
+34478,
+34480,
+34482,
+34484,
+34486,
+34488,
+34490,
+34492,
+34494,
+34496,
+34497,
+34499,
+34501,
+34503,
+34505,
+34507,
+34509,
+34511,
+34513,
+34515,
+34516,
+34518,
+34520,
+34522,
+34524,
+34526,
+34528,
+34530,
+34532,
+34533,
+34535,
+34537,
+34539,
+34541,
+34543,
+34545,
+34547,
+34549,
+34550,
+34552,
+34554,
+34556,
+34558,
+34560,
+34562,
+34564,
+34565,
+34567,
+34569,
+34571,
+34573,
+34575,
+34577,
+34579,
+34580,
+34582,
+34584,
+34586,
+34588,
+34590,
+34592,
+34593,
+34595,
+34597,
+34599,
+34601,
+34603,
+34605,
+34606,
+34608,
+34610,
+34612,
+34614,
+34616,
+34618,
+34619,
+34621,
+34623,
+34625,
+34627,
+34629,
+34631,
+34632,
+34634,
+34636,
+34638,
+34640,
+34642,
+34643,
+34645,
+34647,
+34649,
+34651,
+34653,
+34654,
+34656,
+34658,
+34660,
+34662,
+34664,
+34665,
+34667,
+34669,
+34671,
+34673,
+34675,
+34676,
+34678,
+34680,
+34682,
+34684,
+34686,
+34687,
+34689,
+34691,
+34693,
+34695,
+34696,
+34698,
+34700,
+34702,
+34704,
+34706,
+34707,
+34709,
+34711,
+34713,
+34715,
+34716,
+34718,
+34720,
+34722,
+34724,
+34725,
+34727,
+34729,
+34731,
+34733,
+34735,
+34736,
+34738,
+34740,
+34742,
+34744,
+34745,
+34747,
+34749,
+34751,
+34753,
+34754,
+34756,
+34758,
+34760,
+34761,
+34763,
+34765,
+34767,
+34769,
+34770,
+34772,
+34774,
+34776,
+34778,
+34779,
+34781,
+34783,
+34785,
+34787,
+34788,
+34790,
+34792,
+34794,
+34795,
+34797,
+34799,
+34801,
+34803,
+34804,
+34806,
+34808,
+34810,
+34811,
+34813,
+34815,
+34817,
+34818,
+34820,
+34822,
+34824,
+34826,
+34827,
+34829,
+34831,
+34833,
+34834,
+34836,
+34838,
+34840,
+34841,
+34843,
+34845,
+34847,
+34848,
+34850,
+34852,
+34854,
+34855,
+34857,
+34859,
+34861,
+34862,
+34864,
+34866,
+34868,
+34869,
+34871,
+34873,
+34875,
+34876,
+34878,
+34880,
+34882,
+34883,
+34885,
+34887,
+34889,
+34890,
+34892,
+34894,
+34896,
+34897,
+34899,
+34901,
+34903,
+34904,
+34906,
+34908,
+34910,
+34911,
+34913,
+34915,
+34916,
+34918,
+34920,
+34922,
+34923,
+34925,
+34927,
+34929,
+34930,
+34932,
+34934,
+34935,
+34937,
+34939,
+34941,
+34942,
+34944,
+34946,
+34948,
+34949,
+34951,
+34953,
+34954,
+34956,
+34958,
+34960,
+34961,
+34963,
+34965,
+34966,
+34968,
+34970,
+34972,
+34973,
+34975,
+34977,
+34978,
+34980,
+34982,
+34983,
+34985,
+34987,
+34989,
+34990,
+34992,
+34994,
+34995,
+34997,
+34999,
+35001,
+35002,
+35004,
+35006,
+35007,
+35009,
+35011,
+35012,
+35014,
+35016,
+35017,
+35019,
+35021,
+35023,
+35024,
+35026,
+35028,
+35029,
+35031,
+35033,
+35034,
+35036,
+35038,
+35039,
+35041,
+35043,
+35044,
+35046,
+35048,
+35050,
+35051,
+35053,
+35055,
+35056,
+35058,
+35060,
+35061,
+35063,
+35065,
+35066,
+35068,
+35070,
+35071,
+35073,
+35075,
+35076,
+35078,
+35080,
+35081,
+35083,
+35085,
+35086,
+35088,
+35090,
+35091,
+35093,
+35095,
+35096,
+35098,
+35100,
+35101,
+35103,
+35105,
+35106,
+35108,
+35110,
+35111,
+35113,
+35115,
+35116,
+35118,
+35120,
+35121,
+35123,
+35124,
+35126,
+35128,
+35129,
+35131,
+35133,
+35134,
+35136,
+35138,
+35139,
+35141,
+35143,
+35144,
+35146,
+35148,
+35149,
+35151,
+35152,
+35154,
+35156,
+35157,
+35159,
+35161,
+35162,
+35164,
+35166,
+35167,
+35169,
+35170,
+35172,
+35174,
+35175,
+35177,
+35179,
+35180,
+35182,
+35184,
+35185,
+35187,
+35188,
+35190,
+35192,
+35193,
+35195,
+35197,
+35198,
+35200,
+35201,
+35203,
+35205,
+35206,
+35208,
+35210,
+35211,
+35213,
+35214,
+35216,
+35218,
+35219,
+35221,
+35222,
+35224,
+35226,
+35227,
+35229,
+35231,
+35232,
+35234,
+35235,
+35237,
+35239,
+35240,
+35242,
+35243,
+35245,
+35247,
+35248,
+35250,
+35251,
+35253,
+35255,
+35256,
+35258,
+35260,
+35261,
+35263,
+35264,
+35266,
+35268,
+35269,
+35271,
+35272,
+35274,
+35276,
+35277,
+35279,
+35280,
+35282,
+35283,
+35285,
+35287,
+35288,
+35290,
+35291,
+35293,
+35295,
+35296,
+35298,
+35299,
+35301,
+35303,
+35304,
+35306,
+35307,
+35309,
+35311,
+35312,
+35314,
+35315,
+35317,
+35318,
+35320,
+35322,
+35323,
+35325,
+35326,
+35328,
+35329,
+35331,
+35333,
+35334,
+35336,
+35337,
+35339,
+35341,
+35342,
+35344,
+35345,
+35347,
+35348,
+35350,
+35352,
+35353,
+35355,
+35356,
+35358,
+35359,
+35361,
+35362,
+35364,
+35366,
+35367,
+35369,
+35370,
+35372,
+35373,
+35375,
+35377,
+35378,
+35380,
+35381,
+35383,
+35384,
+35386,
+35387,
+35389,
+35391,
+35392,
+35394,
+35395,
+35397,
+35398,
+35400,
+35401,
+35403,
+35405,
+35406,
+35408,
+35409,
+35411,
+35412,
+35414,
+35415,
+35417,
+35418,
+35420,
+35422,
+35423,
+35425,
+35426,
+35428,
+35429,
+35431,
+35432,
+35434,
+35435,
+35437,
+35439,
+35440,
+35442,
+35443,
+35445,
+35446,
+35448,
+35449,
+35451,
+35452,
+35454,
+35455,
+35457,
+35459,
+35460,
+35462,
+35463,
+35465,
+35466,
+35468,
+35469,
+35471,
+35472,
+35474,
+35475,
+35477,
+35478,
+35480,
+35481,
+35483,
+35484,
+35486,
+35488,
+35489,
+35491,
+35492,
+35494,
+35495,
+35497,
+35498,
+35500,
+35501,
+35503,
+35504,
+35506,
+35507,
+35509,
+35510,
+35512,
+35513,
+35515,
+35516,
+35518,
+35519,
+35521,
+35522,
+35524,
+35525,
+35527,
+35528,
+35530,
+35531,
+35533,
+35534,
+35536,
+35538,
+35539,
+35541,
+35542,
+35544,
+35545,
+35547,
+35548,
+35550,
+35551,
+35553,
+35554,
+35556,
+35557,
+35559,
+35560,
+35562,
+35563,
+35565,
+35566,
+35568,
+35569,
+35571,
+35572,
+35573,
+35575,
+35576,
+35578,
+35579,
+35581,
+35582,
+35584,
+35585,
+35587,
+35588,
+35590,
+35591,
+35593,
+35594,
+35596,
+35597,
+35599,
+35600,
+35602,
+35603,
+35605,
+35606,
+35608,
+35609,
+35611,
+35612,
+35614,
+35615,
+35617,
+35618,
+35620,
+35621,
+35622,
+35624,
+35625,
+35627,
+35628,
+35630,
+35631,
+35633,
+35634,
+35636,
+35637,
+35639,
+35640,
+35642,
+35643,
+35645,
+35646,
+35648,
+35649,
+35650,
+35652,
+35653,
+35655,
+35656,
+35658,
+35659,
+35661,
+35662,
+35664,
+35665,
+35667,
+35668,
+35670,
+35671,
+35672,
+35674,
+35675,
+35677,
+35678,
+35680,
+35681,
+35683,
+35684,
+35686,
+35687,
+35688,
+35690,
+35691,
+35693,
+35694,
+35696,
+35697,
+35699,
+35700,
+35702,
+35703,
+35704,
+35706,
+35707,
+35709,
+35710,
+35712,
+35713,
+35715,
+35716,
+35717,
+35719,
+35720,
+35722,
+35723,
+35725,
+35726,
+35728,
+35729,
+35730,
+35732,
+35733,
+35735,
+35736,
+35738,
+35739,
+35741,
+35742,
+35743,
+35745,
+35746,
+35748,
+35749,
+35751,
+35752,
+35753,
+35755,
+35756,
+35758,
+35759,
+35761,
+35762,
+35764,
+35765,
+35766,
+35768,
+35769,
+35771,
+35772,
+35774,
+35775,
+35776,
+35778,
+35779,
+35781,
+35782,
+35783,
+35785,
+35786,
+35788,
+35789,
+35791,
+35792,
+35793,
+35795,
+35796,
+35798,
+35799,
+35801,
+35802,
+35803,
+35805,
+35806,
+35808,
+35809,
+35810,
+35812,
+35813,
+35815,
+35816,
+35818,
+35819,
+35820,
+35822,
+35823,
+35825,
+35826,
+35827,
+35829,
+35830,
+35832,
+35833,
+35834,
+35836,
+35837,
+35839,
+35840,
+35842,
+35843,
+35844,
+35846,
+35847,
+35849,
+35850,
+35851,
+35853,
+35854,
+35856,
+35857,
+35858,
+35860,
+35861,
+35863,
+35864,
+35865,
+35867,
+35868,
+35870,
+35871,
+35872,
+35874,
+35875,
+35877,
+35878,
+35879,
+35881,
+35882,
+35883,
+35885,
+35886,
+35888,
+35889,
+35890,
+35892,
+35893,
+35895,
+35896,
+35897,
+35899,
+35900,
+35902,
+35903,
+35904,
+35906,
+35907,
+35908,
+35910,
+35911,
+35913,
+35914,
+35915,
+35917,
+35918,
+35920,
+35921,
+35922,
+35924,
+35925,
+35926,
+35928,
+35929,
+35931,
+35932,
+35933,
+35935,
+35936,
+35937,
+35939,
+35940,
+35942,
+35943,
+35944,
+35946,
+35947,
+35948,
+35950,
+35951,
+35953,
+35954,
+35955,
+35957,
+35958,
+35959,
+35961,
+35962,
+35964,
+35965,
+35966,
+35968,
+35969,
+35970,
+35972,
+35973,
+35974,
+35976,
+35977,
+35979,
+35980,
+35981,
+35983,
+35984,
+35985,
+35987,
+35988,
+35989,
+35991,
+35992,
+35994,
+35995,
+35996,
+35998,
+35999,
+36000,
+36002,
+36003,
+36004,
+36006,
+36007,
+36008,
+36010,
+36011,
+36013,
+36014,
+36015,
+36017,
+36018,
+36019,
+36021,
+36022,
+36023,
+36025,
+36026,
+36027,
+36029,
+36030,
+36031,
+36033,
+36034,
+36035,
+36037,
+36038,
+36040,
+36041,
+36042,
+36044,
+36045,
+36046,
+36048,
+36049,
+36050,
+36052,
+36053,
+36054,
+36056,
+36057,
+36058,
+36060,
+36061,
+36062,
+36064,
+36065,
+36066,
+36068,
+36069,
+36070,
+36072,
+36073,
+36074,
+36076,
+36077,
+36078,
+36080,
+36081,
+36082,
+36084,
+36085,
+36086,
+36088,
+36089,
+36090,
+36092,
+36093,
+36094,
+36096,
+36097,
+36098,
+36100,
+36101,
+36102,
+36104,
+36105,
+36106,
+36108,
+36109,
+36110,
+36112,
+36113,
+36114,
+36116,
+36117,
+36118,
+36119,
+36121,
+36122,
+36123,
+36125,
+36126,
+36127,
+36129,
+36130,
+36131,
+36133,
+36134,
+36135,
+36137,
+36138,
+36139,
+36141,
+36142,
+36143,
+36144,
+36146,
+36147,
+36148,
+36150,
+36151,
+36152,
+36154,
+36155,
+36156,
+36158,
+36159,
+36160,
+36162,
+36163,
+36164,
+36165,
+36167,
+36168,
+36169,
+36171,
+36172,
+36173,
+36175,
+36176,
+36177,
+36179,
+36180,
+36181,
+36182,
+36184,
+36185,
+36186,
+36188,
+36189,
+36190,
+36192,
+36193,
+36194,
+36195,
+36197,
+36198,
+36199,
+36201,
+36202,
+36203,
+36205,
+36206,
+36207,
+36208,
+36210,
+36211,
+36212,
+36214,
+36215,
+36216,
+36217,
+36219,
+36220,
+36221,
+36223,
+36224,
+36225,
+36226,
+36228,
+36229,
+36230,
+36232,
+36233,
+36234,
+36235,
+36237,
+36238,
+36239,
+36241,
+36242,
+36243,
+36244,
+36246,
+36247,
+36248,
+36250,
+36251,
+36252,
+36253,
+36255,
+36256,
+36257,
+36259,
+36260,
+36261,
+36262,
+36264,
+36265,
+36266,
+36268,
+36269,
+36270,
+36271,
+36273,
+36274,
+36275,
+36276,
+36278,
+36279,
+36280,
+36282,
+36283,
+36284,
+36285,
+36287,
+36288,
+36289,
+36290,
+36292,
+36293,
+36294,
+36296,
+36297,
+36298,
+36299,
+36301,
+36302,
+36303,
+36304,
+36306,
+36307,
+36308,
+36310,
+36311,
+36312,
+36313,
+36315,
+36316,
+36317,
+36318,
+36320,
+36321,
+36322,
+36323,
+36325,
+36326,
+36327,
+36328,
+36330,
+36331,
+36332,
+36333,
+36335,
+36336,
+36337,
+36339,
+36340,
+36341,
+36342,
+36344,
+36345,
+36346,
+36347,
+36349,
+36350,
+36351,
+36352,
+36354,
+36355,
+36356,
+36357,
+36359,
+36360,
+36361,
+36362,
+36364,
+36365,
+36366,
+36367,
+36369,
+36370,
+36371,
+36372,
+36374,
+36375,
+36376,
+36377,
+36379,
+36380,
+36381,
+36382,
+36384,
+36385,
+36386,
+36387,
+36389,
+36390,
+36391,
+36392,
+36394,
+36395,
+36396,
+36397,
+36398,
+36400,
+36401,
+36402,
+36403,
+36405,
+36406,
+36407,
+36408,
+36410,
+36411,
+36412,
+36413,
+36415,
+36416,
+36417,
+36418,
+36420,
+36421,
+36422,
+36423,
+36424,
+36426,
+36427,
+36428,
+36429,
+36431,
+36432,
+36433,
+36434,
+36436,
+36437,
+36438,
+36439,
+36440,
+36442,
+36443,
+36444,
+36445,
+36447,
+36448,
+36449,
+36450,
+36451,
+36453,
+36454,
+36455,
+36456,
+36458,
+36459,
+36460,
+36461,
+36463,
+36464,
+36465,
+36466,
+36467,
+36469,
+36470,
+36471,
+36472,
+36474,
+36475,
+36476,
+36477,
+36478,
+36480,
+36481,
+36482,
+36483,
+36484,
+36486,
+36487,
+36488,
+36489,
+36491,
+36492,
+36493,
+36494,
+36495,
+36497,
+36498,
+36499,
+36500,
+36501,
+36503,
+36504,
+36505,
+36506,
+36508,
+36509,
+36510,
+36511,
+36512,
+36514,
+36515,
+36516,
+36517,
+36518,
+36520,
+36521,
+36522,
+36523,
+36524,
+36526,
+36527,
+36528,
+36529,
+36530,
+36532,
+36533,
+36534,
+36535,
+36536,
+36538,
+36539,
+36540,
+36541,
+36542,
+36544,
+36545,
+36546,
+36547,
+36548,
+36550,
+36551,
+36552,
+36553,
+36554,
+36556,
+36557,
+36558,
+36559,
+36560,
+36562,
+36563,
+36564,
+36565,
+36566,
+36568,
+36569,
+36570,
+36571,
+36572,
+36574,
+36575,
+36576,
+36577,
+36578,
+36580,
+36581,
+36582,
+36583,
+36584,
+36586,
+36587,
+36588,
+36589,
+36590,
+36591,
+36593,
+36594,
+36595,
+36596,
+36597,
+36599,
+36600,
+36601,
+36602,
+36603,
+36605,
+36606,
+36607,
+36608,
+36609,
+36610,
+36612,
+36613,
+36614,
+36615,
+36616,
+36618,
+36619,
+36620,
+36621,
+36622,
+36623,
+36625,
+36626,
+36627,
+36628,
+36629,
+36630,
+36632,
+36633,
+36634,
+36635,
+36636,
+36638,
+36639,
+36640,
+36641,
+36642,
+36643,
+36645,
+36646,
+36647,
+36648,
+36649,
+36650,
+36652,
+36653,
+36654,
+36655,
+36656,
+36657,
+36659,
+36660,
+36661,
+36662,
+36663,
+36665,
+36666,
+36667,
+36668,
+36669,
+36670,
+36672,
+36673,
+36674,
+36675,
+36676,
+36677,
+36678,
+36680,
+36681,
+36682,
+36683,
+36684,
+36685,
+36687,
+36688,
+36689,
+36690,
+36691,
+36692,
+36694,
+36695,
+36696,
+36697,
+36698,
+36699,
+36701,
+36702,
+36703,
+36704,
+36705,
+36706,
+36708,
+36709,
+36710,
+36711,
+36712,
+36713,
+36714,
+36716,
+36717,
+36718,
+36719,
+36720,
+36721,
+36723,
+36724,
+36725,
+36726,
+36727,
+36728,
+36729,
+36731,
+36732,
+36733,
+36734,
+36735,
+36736,
+36738,
+36739,
+36740,
+36741,
+36742,
+36743,
+36744,
+36746,
+36747,
+36748,
+36749,
+36750,
+36751,
+36752,
+36754,
+36755,
+36756,
+36757,
+36758,
+36759,
+36760,
+36762,
+36763,
+36764,
+36765,
+36766,
+36767,
+36768,
+36770,
+36771,
+36772,
+36773,
+36774,
+36775,
+36776,
+36778,
+36779,
+36780,
+36781,
+36782,
+36783,
+36784,
+36786,
+36787,
+36788,
+36789,
+36790,
+36791,
+36792,
+36793,
+36795,
+36796,
+36797,
+36798,
+36799,
+36800,
+36801,
+36803,
+36804,
+36805,
+36806,
+36807,
+36808,
+36809,
+36810,
+36812,
+36813,
+36814,
+36815,
+36816,
+36817,
+36818,
+36820,
+36821,
+36822,
+36823,
+36824,
+36825,
+36826,
+36827,
+36829,
+36830,
+36831,
+36832,
+36833,
+36834,
+36835,
+36836,
+36838,
+36839,
+36840,
+36841,
+36842,
+36843,
+36844,
+36845,
+36847,
+36848,
+36849,
+36850,
+36851,
+36852,
+36853,
+36854,
+36855,
+36857,
+36858,
+36859,
+36860,
+36861,
+36862,
+36863,
+36864,
+36866,
+36867,
+36868,
+36869,
+36870,
+36871,
+36872,
+36873,
+36874,
+36876,
+36877,
+36878,
+36879,
+36880,
+36881,
+36882,
+36883,
+36884,
+36886,
+36887,
+36888,
+36889,
+36890,
+36891,
+36892,
+36893,
+36894,
+36896,
+36897,
+36898,
+36899,
+36900,
+36901,
+36902,
+36903,
+36904,
+36906,
+36907,
+36908,
+36909,
+36910,
+36911,
+36912,
+36913,
+36914,
+36916,
+36917,
+36918,
+36919,
+36920,
+36921,
+36922,
+36923,
+36924,
+36925,
+36927,
+36928,
+36929,
+36930,
+36931,
+36932,
+36933,
+36934,
+36935,
+36936,
+36938,
+36939,
+36940,
+36941,
+36942,
+36943,
+36944,
+36945,
+36946,
+36947,
+36949,
+36950,
+36951,
+36952,
+36953,
+36954,
+36955,
+36956,
+36957,
+36958,
+36959,
+36961,
+36962,
+36963,
+36964,
+36965,
+36966,
+36967,
+36968,
+36969,
+36970,
+36971,
+36973,
+36974,
+36975,
+36976,
+36977,
+36978,
+36979,
+36980,
+36981,
+36982,
+36983,
+36985,
+36986,
+36987,
+36988,
+36989,
+36990,
+36991,
diff --git a/quantenna/include/qtn/mproc_sync.h b/quantenna/include/qtn/mproc_sync.h
new file mode 100644
index 0000000..8c5e3f5
--- /dev/null
+++ b/quantenna/include/qtn/mproc_sync.h
@@ -0,0 +1,724 @@
+/*
+ * (C) Copyright 2011 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __QTN_MPROC_SYNC_H
+#define __QTN_MPROC_SYNC_H
+
+#ifdef __KERNEL__
+#include <linux/sched.h>
+#endif
+
+#include "mproc_sync_base.h"
+#include "semaphores.h"
+#include "shared_params.h"
+#include "topaz_tqe_cpuif.h"
+
+#ifndef __ASSEMBLY__
+
+#define QTN_MPROC_TIMEOUT	(6 * HZ)
+
+/*
+ * NOTE: functions started from "__" are internal, and must not be used by client code.
+ */
+
+/* Enum represents each CPU in system */
+typedef enum _QTN_SOC_CPU
+{
+	QTN_LHOST_SOC_CPU = (1 << 0),
+	QTN_MUC_SOC_CPU   = (1 << 1),
+	QTN_DSP_SOC_CPU   = (1 << 2)
+} QTN_SOC_CPU;
+
+#if QTN_SEM_TRACE
+#define QTN_SEM_TRACE_NUM    12
+#define QTN_SEM_TRACE_DEPTH  2
+
+#define SEM_TRACE_CPU_LHOST     0
+#define SEM_TRACE_CPU_MUC       1
+#define SEM_TRACE_CPU_DSP       2
+#define SEM_TRACE_CPU_AUC       3
+#define SEM_TRACE_CPU_NUM       4
+
+enum qtn_sem_state {
+	QTN_SEM_STARTLOCK = 0,
+	QTN_SEM_LOCKED = 1,
+	QTN_SEM_UNLOCKED = 2,
+};
+
+struct qtn_sem_trace_entry {
+	volatile uint32_t    pos;
+	volatile uint64_t    jiffies;        /* per cpu jiffies: lhost: 32b jiffies; mus: 64b jiffies; dsp: no jiffies */
+	volatile uint32_t    state;
+	volatile uint32_t    caller_file[QTN_SEM_TRACE_DEPTH];
+	volatile uint32_t    caller_line[QTN_SEM_TRACE_DEPTH];
+};
+struct qtn_sem_trace_log {
+	volatile uint32_t trace_pos[SEM_TRACE_CPU_NUM];
+	volatile uint32_t trace_idx[SEM_TRACE_CPU_NUM];
+	volatile uint32_t last_dump_pos[SEM_TRACE_CPU_NUM];
+	struct qtn_sem_trace_entry traces[SEM_TRACE_CPU_NUM][QTN_SEM_TRACE_NUM];
+};
+
+#if defined(DSP_BUILD)
+#define PER_CPU_CLK    0
+#else
+#define PER_CPU_CLK    jiffies    /* Lhost, MuC and AuC has different HZ */
+#endif
+
+#endif /* QTN_SEM_TRACE */
+
+#if defined(AUC_BUILD)
+#define PER_CPU_PRINTK                auc_os_printf
+#elif defined(MUC_BUILD)
+#define PER_CPU_PRINTK                uc_printk
+#elif !defined(DSP_BUILD)
+#define PER_CPU_PRINTK                printk
+#endif
+
+#define	HAL_REG_READ_RAW(_r)	(uint32_t)(*((volatile uint32_t *)(_r)))
+
+#if defined(CONFIG_RUBY_PCIE_TARGET)
+/*
+ * Trashed L2M_SEM_REG(0xE0000094) will lead to semaphore deadlock in Muc.
+ * We still don't know who/where/why the register been trashed.
+ * Proposal a workaround as following:
+ * Record a software copy of the L2M and M2L semaphore register, and set/clear/update
+ * the register(L2M and M2L) according to it's software copy.
+ */
+#define	CONFIG_PCIE_TARGET_SEM_TRASHED_WORKAROUND	(1)
+#define	QTN_SYNC_MAX_RW_CHECK_NUM					(10000)
+#endif
+
+#define QTN_ALL_SOC_CPU	(QTN_LHOST_SOC_CPU | QTN_MUC_SOC_CPU | QTN_DSP_SOC_CPU)
+#define QTN_MULTI_PROCESS_TQE_SEMA		0xf
+#define QTN_MULTI_PROCESSOR_SEMA_KEY_SHIFT	28
+
+/*
+ * This multi-processor semaphore register supports up to 7 semaphores,
+ * which is implemented by dedicated flops, not memory. Reading them is as slow or even slower
+ * than reading SRAM.
+ * Currently, the first semaphore is used for TQE and the other 6 semaphores are unused.
+ * However enabling other semaphores could introduce more wait cycles to each other.
+ * The semaphore lock process are:
+ * 1. Try to lock with write CPUID | CPUID << 24 to semaphore register.
+ * 2. Return immediately if successfully lock with passing read verify, otherwise step 3.
+ * 3. Read semaphore and wait for free to lock, then step 1 or timeout with a failure.
+ */
+RUBY_INLINE int
+_qtn_mproc_3way_tqe_sem_down(enum topaz_mproc_tqe_sem_id cpuid)
+{
+	const uint32_t  set_value = ((cpuid << QTN_MULTI_PROCESSOR_SEMA_KEY_SHIFT) | cpuid);
+	uint32_t        sem_set_cnt = 0;
+
+	do {
+		/*
+		 * The semaphore bits [3:0] can be set successfully only when it is unset or already
+		 * owned by current cpuid, otherwise the write has no effect.
+		 */
+		qtn_mproc_sync_mem_write(TOPAZ_MPROC_SEMA, set_value);
+		if ((qtn_mproc_sync_mem_read(TOPAZ_MPROC_SEMA) &
+				QTN_MULTI_PROCESS_TQE_SEMA) == cpuid) {
+			return 1;
+		}
+	} while (++sem_set_cnt < TQE_SEMA_GET_MAX);
+
+	return 0;
+}
+
+/*
+ * Returns 1 mean success.
+ * Returns 0 if the processor did not hold the semaphore.
+ */
+RUBY_INLINE int
+_qtn_mproc_3way_tqe_sem_up(enum topaz_mproc_tqe_sem_id cpuid)
+{
+	uint32_t	value;
+
+	value = qtn_mproc_sync_mem_read(TOPAZ_MPROC_SEMA);
+	value &= QTN_MULTI_PROCESS_TQE_SEMA;
+	if (value != cpuid)
+		return 0;
+	/* Write current ID back to release HW semaphore */
+	qtn_mproc_sync_mem_write(TOPAZ_MPROC_SEMA, value << QTN_MULTI_PROCESSOR_SEMA_KEY_SHIFT);
+
+	return 1;
+}
+
+RUBY_INLINE void
+__qtn_mproc_refcnt_inc(volatile u_int32_t *refcnt)
+{
+	*refcnt = *refcnt + 1;
+	qtn_addr_wmb(qtn_mproc_sync_addr(refcnt));
+}
+
+RUBY_INLINE void
+__qtn_mproc_refcnt_dec(volatile u_int32_t *refcnt)
+{
+	u_int32_t tmp = *refcnt;
+	if (tmp == 0) {
+		qtn_mproc_sync_log("ref counter dec broken");
+	} else {
+		*refcnt = tmp - 1;
+		qtn_addr_wmb(qtn_mproc_sync_addr(refcnt));
+	}
+}
+
+RUBY_INLINE u_int32_t
+__qtn_mproc_sync_hw_sem1_addr(QTN_SOC_CPU current_cpu, QTN_SOC_CPU peer_cpu_set)
+{
+	switch (current_cpu)
+	{
+	case QTN_LHOST_SOC_CPU:
+		if (QTN_DSP_SOC_CPU & peer_cpu_set) {
+			return RUBY_SYS_CTL_L2D_SEM;
+		}
+		break;
+
+	case QTN_MUC_SOC_CPU:
+		if (QTN_DSP_SOC_CPU & peer_cpu_set) {
+			return RUBY_SYS_CTL_M2D_SEM;
+		}
+		break;
+
+	case QTN_DSP_SOC_CPU:
+		if (QTN_MUC_SOC_CPU & peer_cpu_set) {
+			return RUBY_SYS_CTL_D2M_SEM;
+		}
+		break;
+	}
+
+	return RUBY_BAD_BUS_ADDR;
+}
+
+RUBY_INLINE u_int32_t
+__qtn_mproc_sync_hw_sem2_addr(QTN_SOC_CPU current_cpu, QTN_SOC_CPU peer_cpu_set)
+{
+	switch (current_cpu)
+	{
+	case QTN_LHOST_SOC_CPU:
+		if (QTN_MUC_SOC_CPU & peer_cpu_set) {
+			return RUBY_SYS_CTL_L2M_SEM;
+		}
+		break;
+
+	case QTN_MUC_SOC_CPU:
+		if (QTN_LHOST_SOC_CPU & peer_cpu_set) {
+			return RUBY_SYS_CTL_M2L_SEM;
+		}
+		break;
+
+	case QTN_DSP_SOC_CPU:
+		if (QTN_LHOST_SOC_CPU & peer_cpu_set) {
+			return RUBY_SYS_CTL_D2L_SEM;
+		}
+		break;
+	}
+
+	return RUBY_BAD_BUS_ADDR;
+}
+
+RUBY_INLINE u_int32_t
+__qtn_mproc_sync_hw_sem_bit(u_int32_t which_sem)
+{
+	return (1 << which_sem);
+}
+
+RUBY_INLINE int
+__qtn_mproc_sync_set_hw_sem(u_int32_t sem_addr, u_int32_t which_sem)
+{
+	int ret = 0;
+#if defined(CONFIG_PCIE_TARGET_SEM_TRASHED_WORKAROUND)
+	/* check counter */
+	int check_counter = 0;
+#endif
+
+	if (sem_addr == RUBY_BAD_BUS_ADDR) {
+		ret = 1;
+	} else {
+		u_int32_t sem_bit = __qtn_mproc_sync_hw_sem_bit(which_sem);
+		u_int32_t sem_val = qtn_mproc_sync_mem_read(sem_addr);
+
+#if defined(CONFIG_PCIE_TARGET_SEM_TRASHED_WORKAROUND)
+		while (sem_val != qtn_mproc_sync_mem_read(sem_addr)) {
+			if(++check_counter > QTN_SYNC_MAX_RW_CHECK_NUM) {
+				qtn_mproc_sync_log("__qtn_mproc_sync_set_hw_sem: read semaphore mismatch...");
+				return ret;
+			} else {
+				sem_val = qtn_mproc_sync_mem_read(sem_addr);
+			}
+		}
+#endif	/* CONFIG_PCIE_TARGET_SEM_TRASHED_WORKAROUND */
+		sem_val |= sem_bit;
+
+		if (qtn_mproc_sync_mem_write_wmb(sem_addr, sem_val) & sem_bit) {
+			ret = 1;
+		}
+	}
+	return ret;
+}
+
+RUBY_INLINE void
+__qtn_mproc_sync_clear_hw_sem(u_int32_t sem_addr, u_int32_t which_sem)
+{
+#if defined(CONFIG_PCIE_TARGET_SEM_TRASHED_WORKAROUND)
+	/* check counter */
+	int check_counter = 0;
+#endif
+
+	if (sem_addr != RUBY_BAD_BUS_ADDR) {
+		u_int32_t sem_bit = __qtn_mproc_sync_hw_sem_bit(which_sem);
+		u_int32_t sem_val = qtn_mproc_sync_mem_read(sem_addr);
+
+#if defined(CONFIG_PCIE_TARGET_SEM_TRASHED_WORKAROUND)
+		while (sem_val != qtn_mproc_sync_mem_read(sem_addr)) {
+			if(++check_counter > QTN_SYNC_MAX_RW_CHECK_NUM) {
+				check_counter = 0;
+				qtn_mproc_sync_log("__qtn_mproc_sync_clear_hw_sem: read semaphore mismatch...");
+			}
+			sem_val = qtn_mproc_sync_mem_read(sem_addr);
+		}
+#endif	/* CONFIG_PCIE_TARGET_SEM_TRASHED_WORKAROUND */
+		sem_val &= ~sem_bit;
+
+		qtn_mproc_sync_mem_write_wmb(sem_addr, sem_val);
+	}
+}
+
+RUBY_INLINE int
+__qtn_mproc_sync_spin_try_lock(QTN_SOC_CPU current_cpu, QTN_SOC_CPU peer_cpu_set,
+	u_int32_t which_sem, unsigned long *flags, uint32_t *fail_sem)
+{
+	u_int32_t sem1_addr = __qtn_mproc_sync_hw_sem1_addr(current_cpu, peer_cpu_set);
+	u_int32_t sem2_addr = __qtn_mproc_sync_hw_sem2_addr(current_cpu, peer_cpu_set);
+
+	local_irq_save(*flags);
+
+	if(!__qtn_mproc_sync_set_hw_sem(sem1_addr, which_sem)) {
+		*fail_sem = sem1_addr;
+		goto unlock1;
+	}
+
+	if(!__qtn_mproc_sync_set_hw_sem(sem2_addr, which_sem)) {
+		*fail_sem = sem2_addr;
+		goto unlock2;
+	}
+
+	return 1;
+
+unlock2:
+	__qtn_mproc_sync_clear_hw_sem(sem1_addr, which_sem);
+unlock1:
+	local_irq_restore(*flags);
+	return 0;
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_spin_lock_reg_dump(void)
+{
+#if !defined(DSP_BUILD)
+	uint32_t reg;
+
+	PER_CPU_PRINTK("Dump semaphore registers:\n");
+	for (reg = RUBY_SYS_CTL_L2M_SEM; reg <= RUBY_SYS_CTL_D2M_SEM; reg += 4) {
+		PER_CPU_PRINTK("reg 0x%08x=0x%08x\n", reg, HAL_REG_READ_RAW(reg));
+	}
+#endif
+}
+
+#if QTN_SEM_TRACE
+RUBY_INLINE struct qtn_sem_trace_log *qtn_mproc_sync_get_sem_trace_log(void)
+{
+	struct shared_params *sp = qtn_mproc_sync_shared_params_get();
+	struct qtn_sem_trace_log *log;
+
+#if defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD)
+	log = sp->sem_trace_log_bus;
+#else
+	log = sp->sem_trace_log_lhost;
+#endif
+	return log;
+}
+
+RUBY_INLINE void qtn_sem_trace_log(int state, char *caller0_file, int caller0_line, char *caller1_file, int caller1_line)
+{
+#if !defined(DSP_BUILD) || (QTN_SEM_TRACE_DSP)
+	struct qtn_sem_trace_log *log = qtn_mproc_sync_get_sem_trace_log();
+#if defined(MUC_BUILD)
+	int cpu = SEM_TRACE_CPU_MUC;
+#elif defined(DSP_BUILD)
+	int cpu = SEM_TRACE_CPU_DSP;
+#elif defined(AUC_BUILD)
+	int cpu = SEM_TRACE_CPU_AUC;
+#else
+	int cpu = SEM_TRACE_CPU_LHOST;
+#endif
+	int idx;
+	uint32_t flags;
+
+	local_irq_save(flags);
+
+	idx = log->trace_idx[cpu];
+
+	log->traces[cpu][idx].pos = log->trace_pos[cpu];
+	log->traces[cpu][idx].jiffies = PER_CPU_CLK;
+	log->traces[cpu][idx].state = state;
+	log->traces[cpu][idx].caller_file[0] = (unsigned int)caller0_file;
+	log->traces[cpu][idx].caller_line[0] = caller0_line;
+	log->traces[cpu][idx].caller_file[1] = (unsigned int)caller1_file;
+	log->traces[cpu][idx].caller_line[1] = caller1_line;
+	log->trace_pos[cpu]++;
+	log->trace_idx[cpu] = (log->trace_pos[cpu]) % QTN_SEM_TRACE_NUM;
+
+	local_irq_restore(flags);
+#endif
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_spin_lock_log_dump(void)
+{
+#if !defined(DSP_BUILD)
+	struct qtn_sem_trace_log *log = qtn_mproc_sync_get_sem_trace_log();
+	int i, j, idx;
+	struct qtn_sem_trace_entry *e;
+	unsigned int file[QTN_SEM_TRACE_DEPTH];
+
+	PER_CPU_PRINTK("Dump semaphore trace log at jiffies=%u\n", (unsigned int)jiffies);
+	for (idx = 0; idx < SEM_TRACE_CPU_NUM; idx++) {
+#if !QTN_SEM_TRACE_DSP
+		if (idx == SEM_TRACE_CPU_DSP) {
+			PER_CPU_PRINTK("CPU %d semaphore trace log is not available in this build\n", idx);
+			continue;
+		}
+#endif
+		PER_CPU_PRINTK("CPU %d semaphore trace log: pos=%u, last_dump_pos=%u\n",
+				idx, log->trace_pos[idx], log->last_dump_pos[idx]);
+		for (i = 0; i < QTN_SEM_TRACE_NUM; i++) {
+			e = &log->traces[idx][i];
+			for (j = 0; j < QTN_SEM_TRACE_DEPTH; j++) {
+				file[j] = 0;
+				if (e->caller_file[j]) {
+					file[j] = e->caller_file[j];
+#if defined(MUC_BUILD)
+					if (idx != SEM_TRACE_CPU_MUC) {
+						/* have no reliable way to convert lhost/dsp/auc string addr to muc */
+						file[j] = 0;
+					}
+#elif defined(AUC_BUILD)
+					if (idx != SEM_TRACE_CPU_AUC) {
+						/* have no reliable way to convert lhost/dsp/muc string addr to auc */
+						file[j] = 0;
+					}
+#else
+					/* lhost */
+					if (idx != SEM_TRACE_CPU_LHOST) {
+						file[j] = (unsigned int)bus_to_virt(file[j]);
+					}
+#endif
+				}
+			}
+			PER_CPU_PRINTK("%d pos=%u, jiffies=%u_%u, state=%u, "
+					"caller0=0x%x %s %d, caller1=0x%x %s %d\n",
+					i, e->pos, U64_HIGH32(e->jiffies), U64_LOW32(e->jiffies),
+					e->state,
+					(unsigned int)e->caller_file[0],
+					file[0] ? (char*)file[0] : "N/A",
+					e->caller_line[0],
+					(unsigned int)e->caller_file[1],
+					file[1] ? (char*)file[1] : "N/A",
+					e->caller_line[1]
+					);
+		}
+		log->last_dump_pos[idx] = log->trace_pos[idx];
+	}
+#endif
+}
+#endif /* QTN_SEM_TRACE */
+
+RUBY_INLINE int
+__qtn_mproc_sync_spin_lock_wait(QTN_SOC_CPU current_cpu)
+{
+	int wait_shift = 0;
+	u_int32_t pm_lock_addr = qtn_mproc_sync_addr(&qtn_mproc_sync_shared_params_get()->pm_duty_lock);
+	int i;
+
+	if (unlikely(qtn_mproc_sync_mem_read(pm_lock_addr))) {
+		wait_shift = 2;
+	}
+
+	for (i = 0; i < (10 << (wait_shift + current_cpu)); ++i) {
+		qtn_pipeline_drain();
+	}
+
+	return wait_shift;
+}
+
+#if QTN_SEM_TRACE
+#define __qtn_mproc_sync_spin_lock(_cpu, _peer, _sem, _flags)  \
+	__qtn_mproc_sync_spin_lock_dbg(_cpu, _peer, _sem, _flags, __FILE__, __LINE__, caller, caller_line)
+
+RUBY_INLINE void
+__qtn_mproc_sync_spin_lock_dbg(QTN_SOC_CPU current_cpu, QTN_SOC_CPU peer_cpu_set,
+	u_int32_t which_sem, unsigned long *flags,
+	char *caller0_file, int caller0_line,
+	char *caller1_file, int caller1_line)
+#else
+RUBY_INLINE void
+__qtn_mproc_sync_spin_lock(QTN_SOC_CPU current_cpu, QTN_SOC_CPU peer_cpu_set,
+	u_int32_t which_sem, unsigned long *flags)
+#endif
+{
+	/* Help to detect lockups */
+	unsigned log_counter = 0;
+	unsigned log_max_counter = 10000;
+#define LOG_MAX_COUNTER_PANIC    320000
+	int log_success = 0;
+	uint32_t fail_sem = 0;
+	int dumped =0;
+#ifdef __KERNEL__
+	unsigned long timeout_jiff;
+#endif
+
+#if QTN_SEM_TRACE
+	qtn_sem_trace_log(QTN_SEM_STARTLOCK, caller0_file, caller0_line, caller1_file, caller1_line);
+#endif
+
+	/*
+	 * We have 3 interlocked hw semaphores to be used for mutual exclusion in 3 CPU pairs.
+	 * Doesn't matter which semaphore be locked first and which second,
+	 * we can easily enters dead-lock state.
+	 * To prevent dead-locking let's rollback if locking of whole set of 3 mutexes is failed
+	 * at any stage.
+	 * Also let's add per-processor delays after failed locking, so in case of collision
+	 * it will be resolved faster.
+	 *
+	 * I think, that hw design of hw interlocked semaphores is not very lucky.
+	 * It would be much better if we have 3 registers, 1 per CPU.
+	 * And all 3 (not 2 as now) registers be interlocked.
+	 */
+	while (!__qtn_mproc_sync_spin_try_lock(current_cpu, peer_cpu_set, which_sem, flags, &fail_sem)) {
+		unsigned int i;
+		for (i = 0; i < 10 * (current_cpu + 1); ++i) {
+			qtn_pipeline_drain();
+		}
+		if(unlikely(!__qtn_mproc_sync_spin_lock_wait(current_cpu) &&
+				(++log_counter >= log_max_counter))) {
+			log_counter = 0;
+			log_max_counter = (log_max_counter << 1);
+			if (unlikely(!log_max_counter)) {
+				log_max_counter = 1;
+			}
+			qtn_mproc_sync_log("qtn_mproc_sync: waiting for semaphore ...");
+			if ((log_max_counter >= LOG_MAX_COUNTER_PANIC) && (!dumped)) {
+				/* Don't make false alert for PM/COC feature */
+#if QTN_SEM_TRACE
+				qtn_mproc_sync_spin_lock_log_dump();
+#endif
+				qtn_mproc_sync_spin_lock_reg_dump();
+#ifdef __KERNEL__
+				timeout_jiff = jiffies + QTN_MPROC_TIMEOUT;
+				while (time_before(jiffies, timeout_jiff)) {
+					schedule();
+				}
+
+				panic("Semaphore hang detected at clk %u: cpu=%x peer=%x sem=%x flags=%x fail_sem=%x\n",
+					(unsigned int)jiffies, current_cpu, peer_cpu_set, which_sem,
+					(unsigned int)*flags, fail_sem);
+#endif
+				dumped = 1;
+			}
+			log_success = 1;
+		}
+	}
+#if QTN_SEM_TRACE
+	qtn_sem_trace_log(QTN_SEM_LOCKED, caller0_file, caller0_line, caller1_file, caller1_line);
+#endif
+	if (unlikely(log_success)) {
+		qtn_mproc_sync_log("qtn_mproc_sync: wait succeeded");
+	}
+}
+
+#if QTN_SEM_TRACE
+#define __qtn_mproc_sync_spin_unlock(_cpu, _peer, _sem, _flags)  \
+	__qtn_mproc_sync_spin_unlock_dbg(_cpu, _peer, _sem, _flags, __FILE__, __LINE__, caller, caller_line)
+
+RUBY_INLINE void
+__qtn_mproc_sync_spin_unlock_dbg(QTN_SOC_CPU current_cpu, QTN_SOC_CPU peer_cpu_set,
+	u_int32_t which_sem, unsigned long *flags,
+	char *caller0_file, int caller0_line,
+	char *caller1_file, int caller1_line)
+#else
+RUBY_INLINE void
+__qtn_mproc_sync_spin_unlock(QTN_SOC_CPU current_cpu, QTN_SOC_CPU peer_cpu_set,
+	u_int32_t which_sem, unsigned long *flags)
+#endif
+{
+	/* Caller must ensure that it hold spinlock. */
+
+	__qtn_mproc_sync_clear_hw_sem(
+		__qtn_mproc_sync_hw_sem2_addr(current_cpu, peer_cpu_set),
+		which_sem);
+	__qtn_mproc_sync_clear_hw_sem(
+		__qtn_mproc_sync_hw_sem1_addr(current_cpu, peer_cpu_set),
+		which_sem);
+
+#if QTN_SEM_TRACE
+	qtn_sem_trace_log(QTN_SEM_UNLOCKED, caller0_file, caller0_line, caller1_file, caller1_line);
+#endif
+
+	local_irq_restore(*flags);
+}
+
+RUBY_INLINE int
+qtn_mproc_sync_set_hw_sem(u_int32_t sem_addr, u_int32_t which_sem)
+{
+	unsigned long flags;
+	int ret;
+
+	local_irq_save(flags);
+	ret = __qtn_mproc_sync_set_hw_sem(sem_addr, which_sem);
+	local_irq_restore(flags);
+
+	return ret;
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_clear_hw_sem(u_int32_t sem_addr, u_int32_t which_sem)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	__qtn_mproc_sync_clear_hw_sem(sem_addr, which_sem);
+	local_irq_restore(flags);
+}
+
+
+/*
+ * Try lock interprocessor spinlock. Spinlock is not recoursive.
+ */
+RUBY_WEAK(qtn_mproc_sync_spin_try_lock) int
+qtn_mproc_sync_spin_try_lock(QTN_SOC_CPU current_cpu, QTN_SOC_CPU peer_cpu_set, u_int32_t which_sem)
+{
+	unsigned long flags;
+	uint32_t fail_sem;
+	if (__qtn_mproc_sync_spin_try_lock(current_cpu, peer_cpu_set, which_sem, &flags, &fail_sem)) {
+		local_irq_restore(flags);
+		return 1;
+	}
+	return 0;
+}
+
+/*
+  * Lock interprocessor spinlock. Spinlock is not recoursive.
+ */
+#if QTN_SEM_TRACE
+RUBY_WEAK(qtn_mproc_sync_spin_lock) void
+qtn_mproc_sync_spin_lock(QTN_SOC_CPU current_cpu, QTN_SOC_CPU peer_cpu_set, u_int32_t which_sem, char *caller, int caller_line)
+#else
+RUBY_WEAK(qtn_mproc_sync_spin_lock) void
+qtn_mproc_sync_spin_lock(QTN_SOC_CPU current_cpu, QTN_SOC_CPU peer_cpu_set, u_int32_t which_sem)
+#endif
+{
+	unsigned long flags;
+	__qtn_mproc_sync_spin_lock(current_cpu, peer_cpu_set, which_sem, &flags);
+	local_irq_restore(flags);
+}
+
+/*
+ * Unlock interprocessor spinlock. Spinlock is not recoursive.
+ */
+#if QTN_SEM_TRACE
+RUBY_WEAK(qtn_mproc_sync_spin_unlock) void
+qtn_mproc_sync_spin_unlock(QTN_SOC_CPU current_cpu, QTN_SOC_CPU peer_cpu_set, u_int32_t which_sem, char *caller, int caller_line)
+#else
+RUBY_WEAK(qtn_mproc_sync_spin_unlock) void
+qtn_mproc_sync_spin_unlock(QTN_SOC_CPU current_cpu, QTN_SOC_CPU peer_cpu_set, u_int32_t which_sem)
+#endif
+{
+	unsigned long flags;
+	local_irq_save(flags);
+	__qtn_mproc_sync_spin_unlock(current_cpu, peer_cpu_set, which_sem, &flags);
+}
+
+RUBY_INLINE volatile u_int32_t*
+qtn_mproc_sync_irq_fixup_data(u_int32_t irq_reg)
+{
+#if CONFIG_RUBY_BROKEN_IPC_IRQS
+	if (irq_reg == RUBY_SYS_CTL_M2L_INT) {
+		return &qtn_mproc_sync_shared_params_get()->m2l_irq[0];
+	}
+#endif
+	return RUBY_BAD_VIRT_ADDR;
+}
+
+RUBY_INLINE volatile u_int32_t*
+qtn_mproc_sync_irq_fixup_data_ack(u_int32_t irq_reg)
+{
+#if !defined(MUC_BUILD) && !defined(DSP_BUILD)
+	return qtn_mproc_sync_irq_fixup_data(irq_reg);
+#else
+	return RUBY_BAD_VIRT_ADDR;
+#endif
+}
+
+RUBY_INLINE volatile u_int32_t*
+qtn_mproc_sync_irq_fixup_data_trigger(u_int32_t irq_reg)
+{
+#if defined(MUC_BUILD)
+	return qtn_mproc_sync_irq_fixup_data(irq_reg);
+#else
+	return RUBY_BAD_VIRT_ADDR;
+#endif
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_irq_trigger(u_int32_t irq_reg, u_int32_t irqno)
+{
+	u_int32_t req = (1 << (irqno + 16)) | (1 << irqno);
+	qtn_mproc_sync_mem_write_wmb(irq_reg, req);
+}
+
+RUBY_INLINE u_int32_t
+qtn_mproc_sync_irq_ack_nolock(u_int32_t irq_reg, u_int32_t mask)
+{
+	u_int32_t status = qtn_mproc_sync_mem_read(irq_reg) & (mask << 16);
+	u_int32_t ret = (status >> 16);
+	if (likely(ret)) {
+		qtn_mproc_sync_mem_write_wmb(irq_reg, status & 0xFFFF0000);
+	}
+	return ret;
+}
+
+RUBY_INLINE u_int32_t
+qtn_mproc_sync_irq_ack(u_int32_t irq_reg, u_int32_t mask)
+{
+	return qtn_mproc_sync_irq_ack_nolock(irq_reg, mask);
+}
+
+RUBY_INLINE u_int32_t
+qtn_mproc_sync_irq_ack_all(u_int32_t irq_reg)
+{
+	return qtn_mproc_sync_irq_ack(irq_reg, 0xFFFFFFFF);
+}
+
+#endif // #ifndef __ASSEMBLY__
+
+#endif // #ifndef __QTN_MPROC_SYNC_H
diff --git a/quantenna/include/qtn/mproc_sync_base.h b/quantenna/include/qtn/mproc_sync_base.h
new file mode 100644
index 0000000..3c5a5c9
--- /dev/null
+++ b/quantenna/include/qtn/mproc_sync_base.h
@@ -0,0 +1,167 @@
+/*
+ * (C) Copyright 2011 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __QTN_MPROC_SYNC_BASE_H
+#define __QTN_MPROC_SYNC_BASE_H
+
+#ifndef __ASSEMBLY__
+
+#include "../common/ruby_mem.h"
+#include "../common/topaz_platform.h"
+
+/*
+ * Functions from this module use local_irq_save()/local_irq_restore()
+ * as synchronization primitives within CPU.
+ * This works only for uniprocessor systems.
+ * If we would ever use SMP inside our SoC, we must
+ * switch to something like spin_lock_irqsave()/spin_lock_irqrestore().
+ */
+#if defined(MUC_BUILD) || defined(DSP_BUILD)
+	#include "os/os_arch_arc.h"
+	#define local_irq_save(_flags)		do { (_flags) = _save_disable_all(); } while(0)
+	#define local_irq_restore(_flags)	do { _restore_enable((_flags)); } while(0)
+#elif defined(AUC_BUILD)
+	/* AuC now has no user-defined ISR. No need to synchronize. */
+	#define local_irq_save(_flags)		do { (void)_flags; } while(0)
+	#define local_irq_restore(_flags)	do { (void)_flags; } while(0)
+#else
+	/* Linux target. Functions defined here already. */
+#endif // #if defined(MUC_BUILD) || defined(DSP_BUILD)
+
+
+RUBY_INLINE void
+qtn_mproc_sync_log(const char *msg)
+{
+#if defined(MUC_BUILD)
+	extern int uc_printk(const char *fmt, ...);
+	uc_printk("MuC: %s\n", msg);
+#elif defined(DSP_BUILD)
+	#ifdef DSP_DEBUG
+	extern void dsp_serial_puts(const char *str);
+	dsp_serial_puts("DSP: ");
+	dsp_serial_puts(msg);
+	dsp_serial_puts("\n");
+	#endif
+#elif defined(AUC_BUILD)
+	extern int auc_os_printf(const char *fmt, ...);
+	auc_os_printf("AuC: %s\n", msg);
+#elif defined(ARCSHELL)
+#elif defined(__KERNEL__) && !defined(UBOOT_BUILD)
+	/* Linux target */
+	printk(KERN_INFO"LHOST: %s : %s : %s\n", KBUILD_MODNAME, KBUILD_BASENAME, msg);
+#else
+	printf("LHOST: %s\n", msg);
+#endif // #if defined(MUC_BUILD)
+}
+
+RUBY_INLINE void*
+qtn_mproc_sync_nocache(void *ptr)
+{
+#if defined(MUC_BUILD)
+	return muc_to_nocache(ptr);
+#else
+	return ptr;
+#endif
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_mem_write_16(u_int32_t addr, u_int16_t val)
+{
+	/*
+	 * Rely on fact that this operation is atomic,
+	 * that single bus transaction handles write.
+	 */
+	*((volatile u_int16_t*)addr) = val;
+}
+
+RUBY_INLINE u_int16_t
+qtn_mproc_sync_mem_read_16(u_int32_t addr)
+{
+	/*
+	 * Rely on fact that this operation is atomic,
+	 * that single bus transaction handles read.
+	 */
+	return *((volatile u_int16_t*)addr);
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_mem_write(u_int32_t addr, u_int32_t val)
+{
+	/*
+	 * Rely on fact that this operation is atomic,
+	 * that single bus transaction handles write.
+	 */
+	*((volatile u_int32_t*)addr) = val;
+}
+
+RUBY_INLINE u_int32_t
+qtn_mproc_sync_mem_read(u_int32_t addr)
+{
+	/*
+	 * Rely on fact that this operation is atomic,
+	 * that single bus transaction handles read.
+	 */
+	return *((volatile u_int32_t*)addr);
+}
+
+RUBY_INLINE u_int32_t
+qtn_mproc_sync_mem_write_wmb(u_int32_t addr, u_int32_t val)
+{
+	qtn_mproc_sync_mem_write(addr, val);
+	return qtn_addr_wmb(addr);
+}
+
+RUBY_INLINE u_int32_t
+qtn_mproc_sync_addr(volatile void *addr)
+{
+	return (u_int32_t)addr;
+}
+
+#if defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD)
+	RUBY_INLINE struct shared_params*
+	qtn_mproc_sync_shared_params_get(void)
+	{
+		return (struct shared_params*)qtn_mproc_sync_nocache((void*)
+			qtn_mproc_sync_mem_read(RUBY_SYS_CTL_SPARE));
+	}
+#else
+	extern struct shared_params *soc_shared_params;
+
+	RUBY_INLINE struct shared_params*
+	qtn_mproc_sync_shared_params_get(void)
+	{
+		return soc_shared_params;
+	}
+
+	/* Has to be used by Linux only */
+	RUBY_INLINE void
+	qtn_mproc_sync_shared_params_set(struct shared_params *params)
+	{
+		qtn_mproc_sync_mem_write_wmb(RUBY_SYS_CTL_SPARE, (u_int32_t)params);
+	}
+#endif // #if defined(MUC_BUILD) || defined(DSP_BUILD)
+
+#endif // #ifndef __ASSEMBLY__
+
+#endif // #ifndef __QTN_MPROC_SYNC_BASE_H
+
+
diff --git a/quantenna/include/qtn/mproc_sync_mutex.h b/quantenna/include/qtn/mproc_sync_mutex.h
new file mode 100644
index 0000000..83c2473
--- /dev/null
+++ b/quantenna/include/qtn/mproc_sync_mutex.h
@@ -0,0 +1,149 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ * This is implementation of Peterson's algorithm for mutual exclusion for 2 processes.
+ * Implemented for little endian system only now.
+ *
+ *		//flag[] is boolean array; and turn is an integer
+ *		flag[0]   = false;
+ *		flag[1]   = false;
+ *		turn;
+ *
+ *		P0: flag[0] = true;
+ *		turn = 1;
+ *		while (flag[1] == true && turn == 1)
+ *		{
+ *			// busy wait
+ *		}
+ *		// critical section
+ *		...
+ *		// end of critical section
+ *		flag[0] = false;
+ *
+ *		P1: flag[1] = true;
+ *		turn = 0;
+ *		while (flag[0] == true && turn == 0)
+ *		{
+ *			// busy wait
+ *		}
+ *		// critical section
+ *		...
+ *		// end of critical section
+ *		flag[1] = false;
+ *
+ */
+
+#ifndef __QTN_MPROC_SYNC_MUTEX_H
+#define __QTN_MPROC_SYNC_MUTEX_H
+
+#include "mproc_sync_base.h"
+
+#ifndef __ASSEMBLY__
+
+/* Initial value must be zero. */
+typedef union __qtn_mproc_sync_mutex
+{
+	uint32_t dword;
+	struct
+	{
+		uint16_t raw_w0;
+		uint16_t raw_w1;
+	} words;
+	struct
+	{
+		uint8_t __reserved0;
+		uint8_t flag1;
+		uint8_t turn;
+		uint8_t flag0;
+	} bytes;
+} qtn_mproc_sync_mutex;
+
+RUBY_INLINE void
+qtn_mproc_sync_mutex_init(volatile qtn_mproc_sync_mutex *mutex)
+{
+	mutex->dword = 0;
+}
+
+#if !defined(__GNUC__) && defined(_ARC)
+_Inline _Asm void
+__qtn_mproc_sync_mutex_relax(int count)
+{
+	% reg count;
+	mov_s	%r12, count;
+1:
+	sub.f	%r12, %r12, 1;
+	bnz_s	1b;
+}
+RUBY_INLINE void
+qtn_mproc_sync_mutex_relax(int count)
+{
+	if (count) {
+		__qtn_mproc_sync_mutex_relax(count);
+	}
+}
+#else
+RUBY_INLINE void
+qtn_mproc_sync_mutex_relax(int count)
+{
+	int i;
+	for (i = 0; i < count; ++i) {
+		qtn_pipeline_drain();
+	}
+}
+#endif // #if !defined(__GNUC__) && defined(_ARC)
+
+RUBY_INLINE void
+qtn_mproc_sync_mutex0_lock(volatile qtn_mproc_sync_mutex *mutex, int relax_count)
+{
+	mutex->words.raw_w1 = 0x0101;
+
+	while ((mutex->dword & 0x00FFFF00) == 0x00010100) {
+		qtn_mproc_sync_mutex_relax(relax_count);
+	}
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_mutex0_unlock(volatile qtn_mproc_sync_mutex *mutex)
+{
+	mutex->bytes.flag0 = 0;
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_mutex1_lock(volatile qtn_mproc_sync_mutex *mutex, int relax_count)
+{
+	mutex->bytes.flag1 = 1;
+	mutex->bytes.turn = 0;
+
+	while (mutex->words.raw_w1 == 0x0100) {
+		qtn_mproc_sync_mutex_relax(relax_count);
+	}
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_mutex1_unlock(volatile qtn_mproc_sync_mutex *mutex)
+{
+	mutex->bytes.flag1 = 0;
+}
+
+#endif // #ifndef __ASSEMBLY__
+
+#endif // #ifndef __QTN_MPROC_SYNC_MUTEX_H
+
diff --git a/quantenna/include/qtn/muc_dbg_parse b/quantenna/include/qtn/muc_dbg_parse
new file mode 100755
index 0000000..98174b8
--- /dev/null
+++ b/quantenna/include/qtn/muc_dbg_parse
@@ -0,0 +1,79 @@
+#!/usr/bin/perl
+
+$stats_header_file = 'qtn_muc_stats_print.h';
+$dbg_header_file = "muc_txrx_stats.h.raw";
+
+$in_tx_struct=0;
+$tx_stats_content = "";
+$in_rx_struct=0;
+$rx_stats_content = "";
+$rxq_num = 0;
+
+foreach my $line (`cat muc_share_def.h`) {
+	if ($line =~ /^\#define\s+QTN_FW_WMAC_RX_QNUM\s+(\d+).*$/) {
+		$rxq_num = $1;
+	}
+}
+
+if ($rxq_num == 0) {
+	die("muc_dbg_parse: fail to find macro QTN_FW_WMAC_RX_QNUM\n");
+}
+
+open(HDRFILE,"$dbg_header_file");
+while (<HDRFILE>) {
+
+	if (/\}/) {
+		if ($in_tx_struct == 1) {
+			$tx_stats_content .= "}";
+			$in_tx_struct=0;
+		}
+		if ($in_rx_struct == 1) {
+			$rx_stats_content .= "}";
+			$in_rx_struct=0;
+		}
+	}
+
+	if ($in_tx_struct) {
+		if(/(\w+)\;/){
+			$strtmp = $1;
+			$tx_stats_content .= "	\"$strtmp\", \\\n";
+		} else {
+			die("muc_dbg_parse: fail to process tx stats item \"$_\"");
+		}
+	}
+
+	if ($in_rx_struct) {
+		if (/(\w+)\;/) {
+			$strtmp = $1;
+			$rx_stats_content .= "	\"$strtmp\", \\\n";
+		} elsif (/(rxq_\w+)\[\w+\]\;/) {
+			$strtmp = $1;
+			for (my $i = 0; $i < $rxq_num; $i++) {
+				$rx_stats_content .= "	\"$strtmp"."[$i]\", \\\n";
+			}
+		} else {
+			die("muc_dbg_parse: fail to process rx stats item \"$_\"");
+		}
+	}
+
+	if (/^\s*struct\s+muc_tx_stats\s*\{/) {
+		$in_tx_struct=1;
+		$tx_stats_content .= "#define MUC_TX_STATS_NAMES_TABLE { \\\n";
+	}
+
+	if (/^\s*struct\s+muc_rx_stats\s*\{/) {
+		$in_rx_struct=1;
+		$rx_stats_content .= "#define MUC_RX_STATS_NAMES_TABLE { \\\n";
+	}
+
+}
+close(HDRFILE);
+
+unlink($stats_header_file);
+open(headfile,">>$stats_header_file");
+print headfile "/* autogenerated */\n\n";
+print headfile $tx_stats_content;
+print headfile "\n\n";
+print headfile $rx_stats_content;
+print headfile "\n";
+close(headfile);
diff --git a/quantenna/include/qtn/muc_phy_stats.h b/quantenna/include/qtn/muc_phy_stats.h
new file mode 100644
index 0000000..c0734b6
--- /dev/null
+++ b/quantenna/include/qtn/muc_phy_stats.h
@@ -0,0 +1,358 @@
+#ifndef  _MUC_PHY_STATS_H
+#define _MUC_PHY_STATS_H
+
+#include "../common/ruby_mem.h"
+#include "../common/queue.h"
+
+#define NUM_ANT 4
+#define NUM_LOG_BUFFS 0x8
+
+#define MUC_PHY_STATS_ALTERNATE		0
+#define MUC_PHY_STATS_RSSI_RCPI_ONLY	1
+#define MUC_PHY_STATS_ERROR_SUM_ONLY	2
+
+#define MUC_PHY_ERR_SUM_NOT_AVAIL	0xffffffff
+
+#define MUC_PHY_RSSI_NOT_AVAIL		(-1000)
+
+#include <qtn/muc_txrx_stats.h>
+
+/**
+ * \defgroup PHYSTATS PHY generated statistics
+ */
+/** @{ */
+
+#define QTN_STATS_MCS_SGI	0x40000000
+#define QTN_STATS_MCS_BW40	0x80000000
+
+#define QTN_PHY_STATS_MCS_PHYRATE	0xFFFF0000
+#define QTN_PHY_STATS_MCS_PHYRATE_S	16
+#define QTN_PHY_STATS_MCS_NSS	0xf000
+#define QTN_PHY_STATS_MCS_NSS_S	12
+#define QTN_PHY_STATS_MCS_BW		0xC00
+#define QTN_PHY_STATS_MCS_BW_S	10
+#define QTN_PHY_STATS_MCS_MODE		0x380
+#define QTN_PHY_STATS_MCS_MODE_S	7
+#define QTN_STATS_MCS_RATE_MASK	0x7f
+#define QTN_STATS_MCS_RATE_MASK_S 0
+
+#define QTN_PHY_STATS_MODE_11N	1
+#define QTN_PHY_STATS_MODE_11AC	2
+
+
+#define QTN_PER_NODE_STATS_POOL_SIZE	QTN_NODE_TBL_SIZE_LHOST
+
+#define EVM_TIME_MEAN_SHIFT	4
+#define EVM_TIME_MEAN_COUNT	(1 << EVM_TIME_MEAN_SHIFT)
+#define RSSI_TIME_MEAN_SHIFT	4
+#define RSSI_TIME_MEAN_COUNT	(1 << RSSI_TIME_MEAN_SHIFT)
+#define PHY_RATE_MEAN_SHIFT	4
+#define PHY_RATE_MEAN_COUNT	(1 << PHY_RATE_MEAN_SHIFT)
+
+struct qtn_node_shared_stats_tx {
+	uint32_t max_queue;
+	/*
+	 * last_mcs are used as bitmask value
+	 * bit[31:16]		rate		(Mbps)
+	 * bit[15:12]		nss		(1~4)
+	 * bit[11:10]		bw		(0 - 20; 1-40; 2-80; 3-unknow)
+	 * bit[9:7]		mode		(1-11n, 2-11ac others-unknow)
+	 * bit[6:0]		mcs		([0,76] for 11n, [0,9] [33,76] for 11ac)
+	 */
+	uint32_t last_mcs;
+	uint32_t last_tx_scale;
+	uint32_t ralg_inv_phy_rate;
+	uint32_t avg_rssi_dbm;
+	uint32_t cost;
+	uint32_t pkts;
+	uint32_t txdone_failed_cum;
+	uint32_t avg_per;
+	uint32_t pkts_per_sec;
+	uint32_t avg_tx_phy_rate;
+	uint32_t acks;
+	uint32_t tx_airtime;
+	uint32_t tx_accum_airtime;
+	/*
+	 * The number of data packets transmitted through
+	 * wireless media for each traffic category(TC).
+	 */
+#define WMM_AC_NUM 4
+	uint32_t tx_sent_data_msdu[WMM_AC_NUM];
+};
+
+struct qtn_node_shared_stats_rx {
+	uint32_t last_rssi_dbm[NUM_ANT + 1];
+	uint32_t rssi_dbm_smoothed[NUM_ANT + 1];
+	uint32_t last_rcpi_dbm[NUM_ANT + 1];
+	uint32_t rcpi_dbm_smoothed[NUM_ANT + 1];
+	uint32_t last_evm_dbm[NUM_ANT + 1];
+	uint32_t evm_dbm_smoothed[NUM_ANT + 1];
+	uint32_t last_hw_noise[NUM_ANT + 1];
+	uint32_t last_rxsym;
+	/*
+	 * last_mcs are used as bitmask value
+	 * bit[31:16]		rate		(Mbps)
+	 * bit[15:12]		nss		(1~4)
+	 * bit[11:10]		bw		(0 - 20; 1-40; 2-80; 3-unknow)
+	 * bit[9:7]		mode		(1-11n, 2-11ac others-unknow)
+	 * bit[6:0]		mcs		([0,76] for 11n, [0,9] [33,76] for 11ac)
+	 */
+	uint32_t last_mcs;
+	uint32_t pkts;
+	uint32_t pkts_cum;
+	uint32_t inv_phy_rate_smoothed;
+	uint32_t cost;
+	uint32_t rx_airtime;
+	uint32_t rx_accum_airtime;
+};
+
+/**
+ * Per node values and statistics; updated periodically
+ * with each invocation of qtn_stats_sample, based on
+ * MuC per node stats
+ */
+struct qtn_node_shared_stats {
+	/* 0 for SU, 1 for MU */
+#define STATS_MIN	0
+#define STATS_SU	STATS_MIN
+#define STATS_MU	1
+#define STATS_MAX	2
+	struct qtn_node_shared_stats_tx tx[STATS_MAX];
+	struct qtn_node_shared_stats_rx rx[STATS_MAX];
+	uint64_t beacon_tbtt;
+	uint64_t beacon_tbtt_jiffies;
+	uint64_t last_rx_jiffies;
+	uint64_t dtim_tbtt;
+	uint32_t tim_set;
+	uint32_t dtim_set;
+	uint16_t beacon_interval;
+	TAILQ_ENTRY(qtn_node_shared_stats) next;
+};
+
+/**
+ * \brief PHY receive statistics
+ *
+ * These statistics are either read directly from the PHY or are generated
+ * based on PHY inputs (eg, RX vector or other structures).
+ */
+struct qtn_rx_stats {
+	/**
+	 * The count of the number of packets the PHY has received and passed
+	 * up. This is the total of the number of singleton packets (MPDU, MMPDU, control frames),
+	 * plus the total of subframes within AMPDUs, plus the number of AMSDUs which have been
+	 * passed up from the PHY.
+	 *
+	 * \note On BBIC4, it just counts single AMPDU rather than the subframes in AMPDU.
+	 */
+	u_int32_t num_pkts;
+
+	/**
+	 * count of packets with A-MSDU flag set
+	 */
+	u_int32_t num_amsdu;
+
+	/**
+	 * The average RX gain used on the previously received packet
+	 * (MMPDU, MPDU, AMPDU or singleton AMSDU).
+	 */
+	u_int32_t avg_rxgain;
+
+	/**
+	 * The number of packets received by the PHY with invalid CRC.
+	 */
+	u_int32_t cnt_mac_crc;
+
+	/**
+	 * The number of short preamble failures reported by the PHY.
+	 */
+	u_int32_t cnt_sp_fail;
+
+	/**
+	 * The number of long preamble failures reported by the PHY.
+	 */
+	u_int32_t cnt_lp_fail;
+
+	u_int32_t hw_noise;
+
+	u_int32_t max_init_gain;
+
+	/**
+	 * The current temperature of the system.
+	 */
+	u_int32_t sys_temp;
+
+	/**
+	 * The mode of the last received packet.
+	 * 1 - 11n
+	 * 2 - 11ac
+	 * others - unknow
+	 */
+	u_int32_t last_rx_mode;
+
+	/**
+	 * The bandwidth of the last received packet.
+	 * 0 - 20MHZ
+	 * 1 - 40MHZ
+	 * 2 - 80MHZ
+	 * others - unknow
+	 */
+	u_int32_t last_rx_bw;
+
+	/**
+	 * The MCS index of the last received packet.
+	 */
+	u_int32_t last_rx_mcs;
+
+	/**
+	 * Debug information.
+	 */
+	u_int32_t rx_gain_fields;
+
+	/**
+	 * RSSI / RCPI / EVM for frames
+	 */
+	u_int32_t last_rssi_evm[NUM_ANT];
+
+	u_int32_t last_rssi_all;
+
+	u_int32_t last_rxsym;
+};
+
+/**
+ * \brief PHY transmit statistics
+ *
+ * These statistics are either read directly from the PHY or are generated
+ * based on PHY values.
+ */
+struct qtn_tx_stats {
+	/**
+	 * The count of the number of packets (MMPDU, MPDU, AMSDU, and one for each
+	 * subframe in an AMPDU) sent to the PHY.
+	 *
+	 * \note On BBIC4, it just counts single AMPDU rather than the subframes in AMPDU.
+	 */
+	u_int32_t num_pkts;
+
+	/**
+	 * The number of times transmitted packets were deferred due to CCA.
+	 */
+	u_int32_t num_defers;
+
+	/**
+	 * The number of times packets were timed out - spent too long inside the MAC.
+	 */
+	u_int32_t num_timeouts;
+
+	/**
+	 * The number of retries - singleton retransmissions, full AMPDU retransmissions,
+	 * or partial AMPDU retransmissions.
+	 */
+	u_int32_t num_retries;
+
+	/**
+	 * The transmit power scale index used for the last packet
+	 *
+	 * \note On BBIC4, This variable is not available.
+	 */
+	u_int32_t last_tx_scale;
+
+	/**
+	 * The mode of the last transmit packet.
+	 * 1 - 11n
+	 * 2 - 11ac
+	 * others - unknow
+	 */
+	u_int32_t last_tx_mode;
+
+	/**
+	 * The bandwidth of the last transmit packet.
+	 * 0 - 20MHZ
+	 * 1 - 40MHZ
+	 * 2 - 80MHZ
+	 */
+	u_int32_t last_tx_bw;
+
+	/**
+	 * The MCS index of the last acknowledged transmit packet.
+	 */
+	u_int32_t last_tx_mcs;
+
+	/**
+	 * Rate adaptations current best throughput rate
+	 */
+	u_int32_t rate;		/* this field must be last for stat_parser.pl */
+};
+
+/** @} */
+
+struct qtn_stats {
+	u_int32_t tstamp;
+	struct qtn_rx_stats rx_phy_stats;
+	struct qtn_rx_stats mu_rx_phy_stats;
+	struct qtn_tx_stats tx_phy_stats;
+	struct qtn_tx_stats mu_tx_phy_stats;
+};
+
+struct qtn_stats_log {
+	int curr_buff; /* Indx of the buffer with latest data */
+	struct qtn_stats stat_buffs[NUM_LOG_BUFFS];
+	struct muc_rx_stats *rx_muc_stats;
+	struct muc_rx_rates *rx_muc_rates;
+	struct muc_rx_bf_stats *rx_muc_bf_stats;
+	struct muc_tx_stats *tx_muc_stats;
+	struct qtn_rate_tx_stats_per_sec *tx_muc_rates;
+	uint32_t *muc_su_rate_stats_read;
+	uint32_t *muc_mu_rate_stats_read;
+	uint32_t *scs_cnt;
+	uint32_t pad[7]; /* Ensure the pad makes this structure a multiple of ARC cache line size */
+};
+
+/*
+ * Micro stats: provide stats in micro view along the time axis
+ * Can be used for off-channel and other debug purpose.
+ */
+#define QTN_MICRO_STATS_GRANULARITY	1	/* ms, for trace burst in traffic */
+#define QTN_MICRO_STATS_NUM		32	/* enough for max off-channel duration */
+struct qtn_micro_stats {
+	/*
+	 * tx msdu: collected in tx done. With average 1.5ms aggregation timeout, this is accurate
+	 * enough for off-channel use.
+	 */
+	uint32_t tx_msdu;
+	/*
+	 * rx msdu: collected after rx reorder and mpdu decap, and amsdu decap if existing.
+	 * - Delay in rx reorder lead to different instantaneous pkt rate from what is in the
+	 *   air in ms level granularity.
+	 * - If amsdu decap is done in lhost, bbic3 or bbic4 sdp, this value is not correct.
+	 */
+	uint32_t rx_msdu;
+};
+
+struct qtn_micro_stats_log {
+	struct qtn_micro_stats latest_stats;
+	/* snapshot */
+	uint32_t curr_idx;
+	struct qtn_micro_stats micro_stats[QTN_MICRO_STATS_NUM];
+};
+
+RUBY_INLINE int qtn_select_rssi_over_error_sums(u_int32_t timestamp, int muc_phy_stats_mode)
+{
+	int	retval = 0;
+
+	switch (muc_phy_stats_mode) {
+	case MUC_PHY_STATS_RSSI_RCPI_ONLY:
+		retval = 1;
+		break;
+	case MUC_PHY_STATS_ERROR_SUM_ONLY:
+		retval = 0;
+		break;
+	case MUC_PHY_STATS_ALTERNATE:
+	default:
+		retval = (timestamp & 0x01);
+		break;
+	}
+
+	return( retval );
+}
+
+#endif
diff --git a/quantenna/include/qtn/muc_share_def.h b/quantenna/include/qtn/muc_share_def.h
new file mode 100755
index 0000000..2b4c64d
--- /dev/null
+++ b/quantenna/include/qtn/muc_share_def.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2014 Quantenna Communications, Inc.
+ */
+
+#ifndef _MUC_SHARE_DEF_H_
+#define _MUUC_SHARE_DEF_H_
+
+#include "../common/ruby_mem.h"
+
+#define QTN_FW_WMAC_RX_Q_MGMT		0
+#define QTN_FW_WMAC_RX_Q_CTRL		1
+#define QTN_FW_WMAC_RX_Q_DATA		2
+#define QTN_FW_WMAC_RX_QNUM		3
+#define QTN_FW_WMAC_RX_QDEEP_MGMT	9
+#define QTN_FW_WMAC_RX_QDEEP_CTRL	9
+#define QTN_FW_WMAC_RX_QDEEP_DATA	394
+#define QTN_FW_WMAC_RX_DESC_NUM	(QTN_FW_WMAC_RX_QDEEP_MGMT + \
+	QTN_FW_WMAC_RX_QDEEP_CTRL + QTN_FW_WMAC_RX_QDEEP_DATA)
+
+#endif // #ifndef _MUC_SHARE_DEF_H_
+
diff --git a/quantenna/include/qtn/muc_txrx_stats.h b/quantenna/include/qtn/muc_txrx_stats.h
new file mode 100644
index 0000000..2445a86
--- /dev/null
+++ b/quantenna/include/qtn/muc_txrx_stats.h
@@ -0,0 +1,886 @@
+/*
+ * Copyright (c) 2008-2012 Quantenna Communications, Inc.
+ */
+
+/*
+ * This file contains host definitions which are common between the
+ * host driver and the microcontroller/MAC code.
+ */
+
+/**
+ * The host tx descriptor for an ethernet packet
+ */
+
+#ifndef _MUC_TXRX_STATS_H_
+#define _MUC_TXRX_STATS_H_
+
+#include <qtn/muc_share_def.h>
+
+#ifdef ENABLE_STATS
+#define MUC_UPDATE_STATS(_a, _b)	(_a += _b)
+#define MUC_SETSTAT(_a, _b)		(_a = _b)
+#else
+#define MUC_UPDATE_STATS(_a, _b)
+#define MUC_SETSTAT(_a, _b)
+#endif
+
+/**
+ * \defgroup MUCSTATS MuC generated statistics
+ */
+/** @{ */
+
+/**
+ * \brief MuC transmit statistics
+ *
+ * These statistics are generated on the MuC, mainly on the transmit datapath.
+ */
+struct muc_tx_stats {
+	/**
+	 * The number of times the software failed to enqueue a beacon to the
+	 * hardware.
+	 *
+	 * \note If this value is non-zero it could indicate a very congested
+	 * medium.
+	 */
+	u_int32_t	bcn_enq_failed;
+
+	/**
+	 * The number of times the TX status bit is set.
+	 */
+	u_int32_t	tx_status_set;
+
+	/**
+	 * The number of packets received from the LHost.
+	 */
+	u_int32_t	pkt_from_host;
+
+	/**
+	 * The number of interrupts from the host to indicate data is ready for
+	 * transmit.
+	 *
+	 * \note This number will generally be quite low, as the LHost->MuC
+	 * data path is poll driven rather than interrupt driven.
+	 */
+	u_int32_t	host_intr;
+	u_int32_t	netbuf_alloc_failed;
+
+	/**
+	 * The number of management packets prior to encapsulation.
+	 *
+	 * \note This number should be the same as mgm_after_encap when the system
+	 * is idle.
+	 */
+	u_int32_t	mgm_before_encap;
+
+	/**
+	 * The number of management packets after encapsulation.
+	 *
+	 * \note This number should be the same as mgm_before_encap when the system
+	 * is idle.
+	 */
+	u_int32_t	mgm_after_encap;
+	u_int32_t	pkt_before_encap;
+	u_int32_t	pkt_after_encap;
+
+	/**
+	 * The number of packets held, waiting for BA to complete.
+	 */
+	u_int32_t	pkt_push_back;
+
+	u_int32_t	pkt_to_hw;
+	u_int32_t	pkt_to_hw_deferred;
+	u_int32_t	fd_absent;
+	u_int32_t	fd_not_ready;
+	u_int32_t	pkt_fd_available;
+	u_int32_t	pkt_add_node;
+	u_int32_t	pkt_add_q;
+	u_int32_t	pkt_qtn_hardstart;
+	u_int32_t	tx_reserved;
+	u_int32_t	tx_reserve_fail;
+	u_int32_t	txalert_mu_ndp_update;
+	u_int32_t	txalert_mu_rpt_poll;
+	u_int32_t	txalert_mu_queue_full;
+	u_int32_t	txalert_mu_queue_fail;
+	u_int32_t	sample_rate_mu;
+	u_int32_t	sample_bw_mu;
+	u_int32_t	txdone_intr;
+	u_int32_t	txalert_intr;
+	u_int32_t	txalert_tasklet;
+	u_int32_t	txalert_bcn_update;
+	u_int32_t	txalert_ndp_update;
+	u_int32_t	tx_ndp_q_occupied;
+	u_int32_t	tx_ndp_start;
+	u_int32_t	tx_pwr;
+	u_int32_t	bcn_scheme_power_save;
+	u_int32_t	bcn_scheme;
+
+	/**
+	 * This counter shows the number of multicast frames sent while a
+	 * client is in powersave. Multicast frames with powersave are sent
+	 * after the DTIM beacon.
+	 */
+	u_int32_t	tx_mcast_pwr;
+
+	/**
+	 * This counter shows the number of multicast frames queued for
+	 * deferred (DTIM beacon) transmission.
+	 *
+	 * Multicast packets are deferred until the DTIM beacon when we have
+	 * at least one power save client associated.
+	 */
+	u_int32_t	tx_mcast_defer;
+	u_int32_t	tx_mcast_defer_hwq;
+	u_int32_t	tx_limit_drop;
+	u_int32_t	fd_acquire;
+	u_int32_t	fd_release;
+	u_int32_t	fd_acq_fail;
+	u_int32_t	fd_acq_fail_frms;
+	u_int32_t	fd_acq_hal_fail;
+	u_int32_t	fd_acq_hal_fail_frms;
+	u_int32_t	ba_send;
+	u_int32_t	ba_del;
+	u_int32_t	fd_free_nodeclean;
+	u_int32_t	msdu_expired;
+	u_int32_t	tx_window_locked;
+	u_int32_t	tx_window_failed;
+	u_int32_t	tx_restrict_probe;
+	u_int32_t	tx_restrict_mode;
+	u_int32_t	tx_restrict_drop;
+	u_int32_t	tx_restrict_delay;
+	u_int32_t	tx_restrict_send;
+	u_int32_t	tx_sample_pkts;
+	u_int32_t	tx_sample_bytes;
+	u_int32_t	tx_underflow;
+	u_int32_t	tx_hal_enqueued;
+	u_int32_t	txbf_mode;
+	u_int32_t	psel_matrix;
+	u_int32_t	sample_rate;
+	u_int32_t	sample_bw;
+	uint32_t	ra_flags;
+	u_int32_t	fd_balance;
+	uint32_t	invalid_delay;
+	uint32_t	halt_tx;
+	uint32_t	resume_tx;
+	uint32_t	rfctrl_on;
+	uint32_t	rfctrl_off;
+	uint32_t	go_offchan;
+	uint32_t	go_datachan;
+	uint32_t	defer_cc;
+	uint32_t	deferred_cc_done;
+	uint32_t	off_chan_sample;
+	uint32_t	off_chan_scan;
+	uint32_t	off_chan_cac;
+	uint32_t	cca_pri;
+	uint32_t	cca_sec;
+	uint32_t	cca_sec40;
+	uint32_t	cca_busy;
+	uint32_t	cca_fat;
+	uint32_t	cca_intf;
+	uint32_t	cca_trfc;
+	/**
+	 * These counter show the information of MU frames.
+	 */
+	uint32_t	mu_prec_snd_tx;
+	uint32_t	mu_prec_snd_wait_done;
+	uint32_t	mu_grp_sel_snd_tx;
+	uint32_t	mu_grp_sel_snd_wait_done;
+
+	uint32_t	oc_auctx_timeout;
+	uint32_t	oc_auctx_overwrite;
+	uint32_t	oc_auctx_fail;
+	uint32_t	gi_cnt;			/* times GI has been set for any node */
+	uint32_t	gi_ncidx;		/* last node to have GI set */
+	uint32_t	gi_val;			/* SGI enabled state for this node */
+	uint32_t	select_state_ncidx;	/* last node to have qn_select state set */
+	uint32_t	select_state_val;	/* PPPC state for this node */
+	uint32_t	pppc_scale_cnt;		/* times Tx gain scaling has been set for any node */
+	uint32_t	pppc_scale_ncidx;	/* last node to have Tx gain scaling set */
+	uint32_t	pppc_scale_val;		/* Tx gain scaling for this node (0 is max) */
+	uint32_t	pppc_scale_last_gput;		/* The last goodput used by PPPC */
+	uint32_t	pppc_scale_last_gput_idx;	/* The PPPC index of the last goodput value */
+	uint32_t	pppc_scale_base_cnt;		/* times Tx gain scaling base has been set for any node */
+	uint32_t	pppc_scale_base_20m;	/* Combined tx scale bases for different bf/nss cases in 20MHz */
+	uint32_t	pppc_scale_base_40m;	/* Combined tx scale bases for different bf/nss cases in 40MHz */
+	uint32_t	pppc_scale_base_80m;	/* Combined tx scale bases for different bf/nss cases in 80MHz */
+	uint32_t	pppc_scale_base_copy;	/* combined the flags indicating the tx scale bases are copied bfoff 1ss cases */
+	uint32_t	pppc_scale_overstep;	/* tx scale exceed the maximum scale indices */
+	uint32_t	pppc_scale_rollback;	/* tx scale roll back because scale index over step */
+	uint32_t	pppc_0_gput;		/* times pppc comparing goodput and both are zero */
+	uint32_t	tx_max_power;
+	uint32_t	nc_csr_read_count;	/* number of times Node Cache was read */
+	uint32_t	nc_csr_write_count;	/* number of times Node Cache was written to */
+	uint32_t	nc_csr_done_watermark;	/* Node cache done retries high watermark */
+	uint32_t	nc_csr_watermark_count; /* Number of times read retries reached max */
+	uint32_t	auc_dtim_notify;
+	uint32_t	auc_ps_notify;
+	uint32_t	tx_beacon_done;
+	uint32_t	sfs_peer_rts;
+	uint32_t	sfs_peer_rts_flags;
+	uint32_t	sfs_local_rts;
+	uint32_t	sfs_local_rts_flags;
+	uint32_t	sfs_dyn_wmm;
+	uint32_t	sfs_dyn_wmm_flags;
+	uint32_t	auc_wmm_ps_notify;
+	uint32_t	tx_wmm_ps_null_frames;
+	uint32_t	qtn_bcn_stop;
+	uint32_t	mu_grp_snd_queue_is_not_empty;
+	uint32_t	mu_prec_snd_queue_is_not_empty;
+	uint32_t	mu_group_delete;
+	uint32_t	mu_group_install;
+	uint32_t	mu_group_rate_node_updates;
+	uint32_t	mu_update_rates_mu;
+	uint32_t	mu_update_rates_su;
+	uint32_t	autocs_sample_bits;
+	uint32_t	autocs_adjust_bits;
+	uint32_t	autocs_step_size;
+	uint32_t	autocs_cs_thresh;
+	uint32_t	autocs_min_rssi;
+	uint32_t	bmps_null_tx_success;
+	uint32_t	bmps_null_tx_fail;
+	uint32_t	bmps_null_tx_timeout;
+	uint32_t	txqueue_g1q0_deadline_frozen;	/* beacon deadline register frozen counter */
+	uint32_t	auc_ipc_retry;
+	uint32_t	auc_ipc_hwm;
+	uint32_t	auc_ipc_send_delay;
+	uint32_t	auc_ipc_send_delay_hwm;
+};
+
+/**
+ * \brief MuC receive statistics
+ *
+ * These statistics are generated on the MuC, mainly on the receive datapath. This set of statistics
+ * also include low-level debugging facilities used internally.
+ */
+struct muc_rx_stats {
+	/**
+	 * This counter shows the number of descriptors taken from the host,
+	 * 'popped' from the top of the list.
+	 */
+	u_int32_t	rxdesc_pop_from_host;
+
+	/**
+	 * This counter shows the number of descriptors pushed to the hardware
+	 * for receive buffers.
+	 */
+	u_int32_t	rxdesc_get_from_queue;
+	u_int32_t	rxdesc_push_to_host;
+	u_int32_t	rxdesc_non_aggr_push_to_host;
+	u_int32_t	rxdesc_flush_to_host;
+	u_int32_t	rxdesc_reuse_push;
+	u_int32_t	rxdesc_reuse_pop;
+
+	/**
+	 * This counter shows the number of packets received with a bad duration.
+	 * A bad duration is where the duration field is all 1's - that is,
+	 * a packet which violates the 802.11 standard.
+	 */
+	u_int32_t	rxdesc_status_bad_dur;
+	u_int32_t	rxdesc_status_bad_len;
+	u_int32_t	rxdesc_slow_status;
+	u_int32_t	rxdesc_fast_status;
+	u_int32_t	rxdesc_status_crc_err;
+	u_int32_t	rxdesc_status_cmic_err;
+	u_int32_t	rxdesc_status_cmic_no_crc_err;
+	u_int32_t	rxdesc_status_retry;
+	u_int32_t	agg_stored;
+	u_int32_t	agg_duplicate;
+
+	u_int32_t	accel_mpdu;
+	u_int32_t	accel_msdu;
+	u_int32_t	accel_no_buffer;
+	u_int32_t	accel_fwt_lu_timeout;
+	u_int32_t	accel_mcast_send;
+	u_int32_t	accel_mcast_drop;
+	u_int32_t	accel_no_match;
+	u_int32_t	accel_drop;
+	u_int32_t	accel_err;
+
+	u_int32_t	rate_train_chk;
+	u_int32_t	rate_train_err;
+	u_int32_t	rate_train_delay;
+	u_int32_t	rate_train_none;
+	u_int32_t	rate_train_hash_bad;
+	u_int32_t	rate_train_hash_good;
+
+	/**
+	 * This counter shows the number of MPDUs within an AMPDU that have been
+	 * discarded due to the sequence number being outside ('below') the current
+	 * receive sequence window.
+	 */
+	u_int32_t	agg_oldpkts;
+
+	/**
+	 * This counter shows the number of MPDUs within an AMPDU that have been
+	 * discarded due to the sequence number being off by > 2047 (half the sequence
+	 * space).
+	 */
+	u_int32_t	agg_very_oldpkts;
+	u_int32_t	agg_evict_in_order;
+	u_int32_t	agg_evict_in_move;
+
+	/**
+	 * This counter shows the number of received subframes within the
+	 * receive window that are missing when the window is moved.
+	 *
+	 * This counter represents one source receive packet loss.
+	 */
+	u_int32_t	agg_evict_empty;
+
+	/**
+	 * This counter shows the number of received subframes within the
+	 * receive window that are evicted due to timeout. Timeout is used
+	 * to ensure we don't sit with a stuck receive aggregate window when
+	 * the transmitter has stopped re-transmitting a given subframe.
+	 */
+	u_int32_t	agg_timeout;
+	u_int32_t	agg_rxwin_reset;
+	u_int32_t	rx_qnum_err;
+	u_int32_t	rx_mgmt;
+	u_int32_t	rx_ctrl;
+	u_int32_t	rx_pspoll;
+	u_int32_t	rx_pwr_mgmt;
+	u_int32_t	rx_delba;
+	/**
+	 * This counter shows the number of times the powersave bit is set
+	 * in the frame control field of packets received.
+	 *
+	 * \note This counter will generally be one greater than rx_pwr_mgmt_reset
+	 * when we have a single PS client associated and in power save.
+	 *
+	 * \sa rx_pwr_mgmt_reset
+	 */
+	u_int32_t	rx_pwr_mgmt_set;
+
+	/**
+	 * This counter shows the number of times the powersave bit of a
+	 * currently power save client is reset.
+	 *
+	 * \note This counter will generally be one less than rx_pwr_mgmt_set
+	 * when we have a single PS client associated and in power save mode.
+	 *
+	 * \sa rx_pwr_mgmt_set
+	 */
+	u_int32_t	rx_pwr_mgmt_reset;
+
+	/**
+	 * \internal
+	 *
+	 * We have 2-stage process of pushing rx descriptors to the MAC:
+	 *
+	 * 1) On tasklet level we prepare descriptors and save these prepared
+	 * descriptors into intermediate buffer "rxdesc_cache"
+	 *
+	 * 2) In RX ISR context we get buffer from "rxdesc_cache" and push it
+	 * to hardware. Same procedure can be sometimes called within tasklet
+	 * level too. It is because if we failed (e.g. no free descriptors) to
+	 * push descriptor to hw in ISR context, likely we would not receive any
+	 * RX interrupts anymore, so tasklet scheduled which would reschedule
+	 * itself until succeed.
+	 *
+	 * rx_emergency counter incremented if (2) replenishing procedure found
+	 * that hw rx queue have slot for descriptors and fail to retrieve
+	 * descriptor from "rxdesc_cache" to replenish hw queue.
+	 *
+	 * Spike of rx_emergency does not look good.
+	 *
+	 * It's like tasklet was scheduled to replenish hw queue and fail it,
+	 * reschedule itself and fail again and again.
+	 *
+	 * Generally, rx_emergency increasing is legitimate case, for example
+	 * if the system is overloaded by incoming traffic. However, it also can
+	 * be a sign of something bad, like processing of rx frames is stuck somewhere.
+	 */
+	u_int32_t	rx_emergency;
+	u_int32_t	rx_underflow;
+	u_int32_t	rx_desc_underflow;
+	u_int32_t	rx_desc_linkerr;
+	u_int32_t	rx_notify;
+	u_int32_t	rx_df_numelems;
+	u_int32_t	last_recv_seq;
+
+	/**
+	 * This counter shows the number of packets received for an unknown
+	 * node - that is - one which we do not have an association with.
+	 */
+	u_int32_t	rx_node_not_found;
+
+	/**
+	 * This counter shows the number of duplicates of non-QoS packets we
+	 * received and discarded.
+	 */
+	u_int32_t	rx_non_qos_duplicate;
+
+	/**
+	 * This counter shows the number of received NDPs.
+	 */
+	u_int32_t	rx_11n_ndp;
+	u_int32_t	rx_11ac_ndp;
+	u_int32_t	rx_ndp_inv_slot;
+	u_int32_t	rx_11n_ndp_no_capt;
+	u_int32_t	rx_ndp_sw_processed;
+	u_int32_t	rx_ndp_lockup;
+	u_int32_t	rx_11n_bf_act;
+	u_int32_t	rx_11ac_bf_act;
+	u_int32_t	rx_bf_act_inv_slot;
+
+	/**
+	 * This counter shows the number of received AMSDUs. This counter does
+	 * not count the number of subframes within the AMSDU.
+	 */
+	u_int32_t	rx_amsdu;
+	u_int32_t	rx_data;
+	u_int32_t	prev_rx_data;
+	u_int32_t	rx_recv_qnull;
+	u_int32_t	rx_recv_act;
+	u_int32_t	rx_recv_bcn;
+	u_int32_t	rx_recv_auth;
+	u_int32_t	rx_recv_assoc_req;
+	u_int32_t	rx_recv_assoc_res;
+	u_int32_t	rx_recv_deauth;
+	u_int32_t	rx_recv_disassoc;
+
+	/**
+	 * This counter shows the number of packets received where the MCS as
+	 * indicated in the PLCP is invalid (> 76).
+	 */
+	u_int32_t	rx_mcs_gt_76;
+	u_int32_t	tkip_keys;		/* Keep count of TKIP keys installed - for debug */
+	u_int32_t	rx_tkip_mic_err;	/* Number of TKIP packets RX with MIC error - the number reported to the higher layers */
+	u_int32_t	icv_errs; /* The number of raw ICV errors reported by the hardware */
+	u_int32_t	tmic_errs; /* The number of raw TMIC errors reported by the hardware */
+	u_int32_t	cmic_errs;
+	u_int32_t	crc_errs;
+
+	/**
+	 * This counter shows the number of transmit block ACK agreements
+	 * installed.
+	 *
+	 * If the upper bit is set, at least one implicit block ACK has been
+	 * established with a Quantenna peer.
+	 *
+	 * \note This number only increments - when block ACK agreements are
+	 * removed, this counter does not decrement.
+	 */
+	u_int32_t	ba_tx;
+
+	/**
+	 * This counter shows the number of receive block ACK agreements
+	 * installed.
+	 *
+	 * If the upper bit is set, at least one implicit block ACK has been
+	 * established with a Quantenna peer.
+	 *
+	 * \note This number only increments - when block ACK agreements are
+	 * removed, this counter does not decrement.
+	 */
+	u_int32_t	ba_rx;
+
+	/**
+	 * The number of times a block ACK has been rejected due to an out of
+	 * resource situation.
+	 */
+	u_int32_t	ba_rx_fail;
+	u_int32_t	sec_oflow;
+	u_int32_t	str_oflow;
+	u_int32_t	oflow_fixup_timeout;
+	u_int32_t	rxdone_intr;
+	u_int32_t	rxtypedone_intr;
+	u_int32_t	ipc_a2m_intr;
+	u_int32_t	tqe_intr;
+	u_int32_t	tqe_in_port_lhost;
+	u_int32_t	tqe_in_port_bad;
+	u_int32_t	tqe_a2m_type_txfb;
+	u_int32_t	tqe_a2m_type_rxpkt;
+	u_int32_t	tqe_a2m_type_unknown;
+	u_int32_t	tqe_reschedule_task;
+	u_int32_t	tqe_desc_unowned;
+
+	/**
+	 * \internal
+	 *
+	 * The number of interrupts from the baseband to the MuC.
+	 *
+	 * \note This should not be distributed externally - the following
+	 * fields are for internal debugging ONLY.
+	 */
+	u_int32_t	bb_intr;
+
+	/**
+	 * \internal
+	 *
+	 * The number of DLEAF overflow interrupts from the baseband.
+	 */
+	u_int32_t	bb_irq_dleaf_oflow;
+	u_int32_t	bb_irq_leaf_uflow;
+	u_int32_t	bb_irq_leaf_ldpc_uflow;
+	u_int32_t	bb_irq_tx_td_oflow_intr;
+	u_int32_t	bb_irq_tx_td_uflow_intr;
+	u_int32_t	bb_irq_rx_sm_wdg_intr;
+	/* BB spends more than 6.8ms (short GI)/7.55ms (long GI) to receive one packet */
+	u_int32_t	bb_irq_rx_long_dur;
+        /* BB spends more than 5.4ms (standard defined limit) to receive one 11ac packet. */
+	u_int32_t	bb_irq_rx_11ac_timeout;
+	u_int32_t	bb_irq_tx_sm_wdg_intr;
+
+	/**
+	 * \internal
+	 *
+	 * The number of BB state machine watchdogs that have kicked in.
+	 */
+	u_int32_t	bb_irq_main_sm_wdg_intr;
+	u_int32_t	bb_irq_hready_wdg_intr;
+	u_int32_t	mac_irq_rx_sec_buff_oflow;
+	u_int32_t	mac_irq_rx_strq_oflow;
+	u_int32_t	mac_irq_rx_bb_uflow_intr;
+	u_int32_t	mac_irq_rx_bb_oflow_intr;
+	u_int32_t	bb_irq_hready_wdg_reset;
+
+	/**
+	 * \internal
+	 *
+	 * This counter is incremented once at the start of the main watchdog state machine.
+	 *
+	 * \sa sreset_wdg_end
+	 */
+	u_int32_t	sreset_wdg_begin;
+
+	/**
+	 * \internal
+	 *
+	 * This counter is incremented once at the end of the main watchdog state machine.
+	 *
+	 * \sa sreset_wdg_begin
+	 */
+	u_int32_t	sreset_wdg_end;
+	u_int32_t	sreset_wdg_in_place;
+	u_int32_t	sreset_wdg_tx_beacon_hang;
+
+	/**
+	 * \internal
+	 *
+	 * The number of transmit hangs causing soft reset.
+	 *
+	 * Transmit hang is between 400 to 900ms from the time of sending a packet to the hardware
+	 * without receiving a tx done interrupt.
+	 */
+	u_int32_t	sreset_wdg_tx_hang;
+
+	/**
+	 * \internal
+	 *
+	 * The number of packet memory corruption causing soft reset.
+	 *
+	 * For unknown reason, packet memory may be corrupted. When packet memory corruption is detected,
+	 * soft reset is triggered, and this counter incremented once.
+	 */
+	u_int32_t	sreset_wdg_pm_corrupt;
+
+	/**
+	 * \internal
+	 *
+	 * The number of packet transmit control memory corruption causing soft reset.
+	 *
+	 * For unknown reason, transmit control memory may be corrupted. When transmit control memory corruption is detected,
+	 * soft reset is triggered, and this counter incremented once.
+	 */
+	u_int32_t	sreset_wdg_tcm_corrupt;
+
+	/**
+	 * \internal
+	 *
+	 * The number of receive hangs causing a soft reset.
+	 *
+	 * Receive hang is > 70s without receiving a single packet.
+	 *
+	 * Note that this can trigger in idle situations, but should not affect anything because
+	 * the link is idle.
+	 */
+	u_int32_t	sreset_wdg_rx_done;
+	u_int32_t	sreset_wdg_in_place_try;
+	u_int32_t	sreset_wdg_tasklet_sched_1;
+	u_int32_t	sreset_wdg_tasklet_sched_2;
+	u_int32_t	sreset_tasklet_sched;
+	u_int32_t	sreset_tasklet_begin;
+	u_int32_t	sreset_tasklet_end;
+
+	/**
+	 * \internal
+	 *
+	 * This counter is incremented when a BB hard reset is requested
+	 * to occur in the middle of a soft reset sequence
+	 */
+	u_int32_t	hreset_req;
+
+	/**
+	 * \internal
+	 *
+	 * This counter is incremented at the start of a soft reset.
+	 *
+	 * There should always be a corresponding increment in the sreset_end
+	 * counter, or there is a problem.
+	 *
+	 * \sa sreset_end
+	 */
+	u_int32_t	sreset_begin;
+
+	/**
+	 * \internal
+	 *
+	 * This counter is incremented at the end of a soft reset.
+	 *
+	 * The should always being a corresponding increment in the sreset_begin
+	 * counter, or there is a problem.
+	 *
+	 * \sa sreset_begin
+	 */
+	u_int32_t	sreset_end;
+
+	/**
+	 * \internal
+	 *
+	 * This counter is incremented each time DMA RX is in progress when a
+	 * soft reset is triggered.
+	 */
+	u_int32_t	sreset_dma_rx_inprog;
+
+	/**
+	 * \internal
+	 *
+	 * This counter is incremented each time DMA TX is in progress when a
+	 * soft reset is triggered.
+	 */
+	u_int32_t	sreset_dma_tx_inprog;
+	u_int32_t	sreset_dma_rx_max_wait;
+	u_int32_t	sreset_dma_tx_max_wait;
+	u_int32_t	sreset_dma_tx_hang;
+	u_int32_t	sreset_dma_rx_hang;
+	u_int32_t	sreset_dma_rx_wait_timeout;
+	u_int32_t	sreset_dma_tx_wait_timeout;
+	u_int32_t	sreset_drop_not_valid;
+	u_int32_t	sreset_drop_bad_addr;
+	u_int32_t	rf_cmpvtune_out;
+	u_int32_t	rf_cal_freq;
+	u_int32_t	ac_max;
+	u_int32_t	ac_min;
+	u_int32_t	ac_cur;
+	u_int32_t	ac_adj;
+	u_int32_t	rx_gain;
+	u_int32_t	rd_cache_indx;
+	u_int32_t	logger_sreset_wmac1_dma_rx_inprog;
+	u_int32_t	logger_sreset_wmac1_dma_tx_inprog;
+	u_int32_t	logger_sreset_wmac1_dma_rx_max_wait;
+	u_int32_t	logger_sreset_wmac1_dma_tx_max_wait;
+	u_int32_t	logger_sreset_wmac1_dma_tx_hang;
+	u_int32_t	logger_sreset_wmac1_dma_rx_hang;
+	u_int32_t	logger_sreset_wmac1_dma_rx_wait_timeout;
+	u_int32_t	logger_sreset_wmac1_dma_tx_wait_timeout;
+	/**
+	 * These counter show the information of MU frames.
+	 */
+	u_int32_t	mu_rx_pkt;
+
+	/**
+	 * \internal
+	 *
+	 * These counters monitor power duty cycling
+	 */
+	u_int32_t	pduty_sleep;
+	u_int32_t	pduty_rxoff;
+	u_int32_t	pduty_period;
+	u_int32_t	pduty_pct;
+
+	/**
+	 * \internal
+	 *
+	 * These counter are incremented when a soft-ring operation is triggered
+	 */
+	u_int32_t	soft_ring_push_to_tqe;
+	u_int32_t	soft_ring_empty;
+	u_int32_t	soft_ring_not_empty;
+	u_int32_t	soft_ring_add_force;
+	u_int32_t	soft_ring_add_to_head;
+	u_int32_t	soft_ring_add_continue;
+	u_int32_t	soft_ring_free_pool_empty;
+	u_int32_t	mimo_ps_mode_switch;	/* times STA switch MIMO power-save mode by HT action */
+
+	u_int32_t	rx_vlan_drop;
+	u_int32_t	auto_cca_state;
+	u_int32_t	auto_cca_th;
+	u_int32_t	auto_cca_spre;
+	u_int32_t	auto_cca_intf;
+
+	/**
+	 * \internal
+	 *
+	 * These counters are monitor memory allocation.
+	 */
+	u_int32_t	total_dmem_alloc;
+	u_int32_t	total_dram_alloc;
+	u_int32_t	dmem_alloc_fails;
+	u_int32_t	dram_alloc_fails;
+	u_int32_t	total_dmem_free;
+	u_int32_t	total_dram_free;
+
+	/* RX frames BW mode*/
+	u_int32_t	rx_bw_80;
+	u_int32_t	rx_bw_40;
+	u_int32_t	rx_bw_20;
+
+	/* U-APSD rx stats */
+	uint32_t	rx_wmm_ps_trigger;
+	uint32_t	rx_wmm_ps_set;
+	uint32_t	rx_wmm_ps_reset;
+
+	uint32_t	rx_intr_next_ptr_0;
+	uint32_t	rx_hbm_pool_depleted;
+
+	uint32_t	rxq_intr[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_fill[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_nobuf[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_stop[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_pkt[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_bad_status[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_pkt_oversize[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_pkt_delivered[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_status_hole_chk_num[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_status_hole_chk_step_sum[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_status_hole_chk_step_max[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_status_hole[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_status_hole_max_size[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_process_max[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_process_sum[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_process_num[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_process_limited[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rxq_desc_chain_empty[QTN_FW_WMAC_RX_QNUM];
+	uint32_t	rx_data_last_seqfrag;
+	uint32_t	rx_data_last_ip_id;
+	uint32_t	rx_opmode_notify;
+
+	/**
+	 * This counter is incremented once per packet which is sent via the
+	 * external filter (HotSpot functionality).
+	 */
+	uint32_t	accel_l2_ext_filter;
+	uint32_t	accel_mc_send_l2_ext_filter;
+
+	/**
+	 * This counter is incremented once per multicast packet dropped without
+	 * forwording to the external filter (HotSpot functionality).
+	 */
+	uint32_t	accel_mc_drop_l2_ext_filter;
+
+	uint32_t	rx_frame_addressed_to_wrong_bss;
+};
+
+#define MUC_LEGACY_NUM_RATES	12
+#define MUC_HT_NUM_RATES	77
+#define MUC_VHT_NUM_RATES	40
+struct muc_rx_rates {
+	u_int32_t rx_mcs[MUC_HT_NUM_RATES];
+	u_int32_t rx_mcs_11ac[MUC_VHT_NUM_RATES];
+};
+
+#define QTN_STATS_NUM_BF_SLOTS	10
+struct muc_rx_bf_stats {
+	u_int32_t	rx_bf_valid[QTN_STATS_NUM_BF_SLOTS];
+	u_int32_t	rx_bf_aid[QTN_STATS_NUM_BF_SLOTS];
+	u_int32_t	rx_bf_ng[QTN_STATS_NUM_BF_SLOTS];
+	u_int32_t	rx_bf_11n_ndp[QTN_STATS_NUM_BF_SLOTS];
+	u_int32_t	rx_bf_11ac_ndp[QTN_STATS_NUM_BF_SLOTS];
+	u_int32_t	rx_bf_11n_act[QTN_STATS_NUM_BF_SLOTS];
+	/* Total number of 11ac BF feedbacks */
+	u_int32_t	rx_bf_11ac_act[QTN_STATS_NUM_BF_SLOTS];
+	/* Number of MU group selection BF feedbacks */
+	u_int32_t	rx_bf_11ac_grp_sel[QTN_STATS_NUM_BF_SLOTS];
+	/* Number of MU precoding BF feedbacks */
+	u_int32_t	rx_bf_11ac_prec[QTN_STATS_NUM_BF_SLOTS];
+	/* Number of SU BF feedbacks */
+	u_int32_t	rx_bf_11ac_su[QTN_STATS_NUM_BF_SLOTS];
+	/* Number of corrupted BF feedbacks */
+	u_int32_t	rx_bf_11ac_bad[QTN_STATS_NUM_BF_SLOTS];
+	/* Number of MuC to DSP IPC failures while sending BF feedbacks */
+	u_int32_t	rx_bf_11ac_dsp_fail[QTN_STATS_NUM_BF_SLOTS];
+	/* Number of times QMat for this node has been updated (the node was added to MU group) */
+	u_int32_t	mu_grp_add[QTN_STATS_NUM_BF_SLOTS];
+	/* Number of times the node was removed from MU group */
+	u_int32_t	mu_grp_del[QTN_STATS_NUM_BF_SLOTS];
+	u_int32_t	msg_buf_alloc_fail;
+};
+
+/** @} */
+
+extern struct muc_rx_stats uc_rx_stats;
+extern struct muc_rx_rates uc_rx_rates;
+extern struct muc_rx_bf_stats uc_rx_bf_stats;
+extern struct muc_tx_stats uc_tx_stats;
+extern struct qtn_rate_tx_stats_per_sec uc_tx_rates;
+extern uint32_t uc_su_rate_stats_read;
+extern uint32_t uc_mu_rate_stats_read;
+
+/*
+ * Rate adaption data collected for packet logger
+ * NOTE: Any changes to these definitions will require changes to stat_parser.pl
+ */
+#define RATES_STATS_NUM_ADAPTATIONS	16
+#define RATES_STATS_NUM_TX_RATES	6
+#define RATES_STATS_NUM_RX_RATES	8	/* Must be a multiple of word size */
+#define RATES_STATS_EVM_CNT		4
+
+/*
+ * Currently only two user positions are supported for MU group
+ * the following define should be aligned
+ * with IEEE80211_MU_GRP_NODES_MAX (4) in future.
+ * for now we don't want to take care about 2x extra zero-filled
+ * huge arrays in rate stats
+ */
+#define RATES_STATS_MAX_USER_IN_GROUP   2
+
+/**
+ * \addtogroup MUCSTATS
+ */
+/** @{ */
+struct qtn_rate_stats_mcs_data {
+	uint16_t	mcs_rate;
+	uint16_t	rate_index;
+	uint16_t	state;
+	uint16_t	pkt_total;
+	uint16_t	pkt_error;
+	uint16_t	pkt_hw_retry;
+	uint16_t	pkt_sample;
+	uint16_t	avg_per;
+} __attribute__((packed));
+
+struct qtn_rate_su_tx_stats {
+	uint32_t			seq_no;
+	uint32_t			timestamp;
+	uint32_t			flags;
+	uint16_t			sampling_index;
+	uint16_t			sampling_rate;
+	struct qtn_rate_stats_mcs_data	mcs_data[RATES_STATS_NUM_TX_RATES];
+} __attribute__((packed));
+
+struct qtn_rate_mu_tx_stats {
+	struct qtn_rate_su_tx_stats group_stats[RATES_STATS_MAX_USER_IN_GROUP];
+} __attribute__((packed));
+
+struct qtn_rate_gen_stats {
+	u_int16_t   rx_mcs_rates[RATES_STATS_NUM_RX_RATES];
+	u_int32_t  rx_mcs[RATES_STATS_NUM_RX_RATES];
+	u_int32_t  rx_crc;
+	u_int32_t  rx_sp_errors;
+	u_int32_t  rx_lp_errors;
+	u_int32_t  rx_evm[RATES_STATS_EVM_CNT];
+	u_int32_t  tx_subframe_success;
+	u_int32_t  tx_subframe_fail;
+	u_int32_t  tx_mgmt_success;
+	u_int32_t  tx_hw_retry;
+	u_int32_t  tx_sw_retry;
+} __attribute__((packed));
+
+struct qtn_rate_tx_stats_per_sec {
+	struct qtn_rate_su_tx_stats  stats_su[RATES_STATS_NUM_ADAPTATIONS];
+	struct qtn_rate_mu_tx_stats  stats_mu[RATES_STATS_NUM_ADAPTATIONS];
+};
+/** @} */
+
+#endif	/* _STATS_H_ */
diff --git a/quantenna/include/qtn/qdrv_sch.h b/quantenna/include/qtn/qdrv_sch.h
new file mode 100644
index 0000000..e761234
--- /dev/null
+++ b/quantenna/include/qtn/qdrv_sch.h
@@ -0,0 +1,499 @@
+/*SH0
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2011 - 2012 Quantenna Communications, Inc.          **
+**                            All Rights Reserved                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH0*/
+
+#ifndef __QDRV_SCH_H
+#define __QDRV_SCH_H
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/skbuff.h>
+#include <linux/ip.h>
+#ifdef CONFIG_IPV6
+#include <linux/ipv6.h>
+#endif
+#include <net/pkt_sched.h>
+
+#include "net80211/if_ethersubr.h"
+#include "net80211/if_llc.h"
+
+#include <linux/if_vlan.h>
+
+#include <qtn/qtn_global.h>
+
+#include <qtn/qdrv_sch_data.h>
+#include "qdrv_sch_const.h"
+#include <qtn/iputil.h>
+#include <qtn/qtn_net_packet.h>
+#include <qtn/topaz_tqe_cpuif.h>
+#include <qtn/topaz_vlan_cpuif.h>
+#include <common/topaz_emac.h>
+#include <asm/hardware.h>
+#define ETHER_TYPE_UNKNOWN			0XFFFF
+#define IPTOS_PREC_SHIFT			5
+
+#define IP_DSCP_SHIFT		2
+#define IP_DSCP(_pri)           (((_pri) & 0xFF) >> IP_DSCP_SHIFT)
+#define IP_DSCP_MAPPING_SIZE	IP_DSCP_NUM >> 1
+#define VLANID_INDEX_INITVAL	4096
+/* 4-bits are used to store TID */
+#define QDRV_IP_DSCP_MAPPING_SHIFT	4
+#define QDRV_IP_DSCP_INDEX_SHIFT	3
+
+#define QDRV_SCH_RESERVED_TOKEN_PER_USER	64
+
+#define QDRV_SCH_EMAC0_IN_USE	1
+#define QDRV_SCH_EMAC1_IN_USE	2
+
+int qdrv_sch_module_init(void);
+void qdrv_sch_module_exit(void);
+
+extern __sram_data uint8_t qdrv_sch_tos2ac[];
+extern __sram_data uint8_t qdrv_sch_dscp2dot1p[];
+extern __sram_data uint8_t qdrv_vap_vlan_max;
+extern __sram_data uint8_t qdrv_sch_dscp2tid[QTN_MAX_BSS_VAPS][IP_DSCP_MAPPING_SIZE];
+extern __sram_data uint16_t qdrv_sch_vlan2index[QTN_MAX_BSS_VAPS];
+
+/*
+ * Refactoring of emac_wr(struct emac_common *arapc, int reg, u32 val)
+ * We can't visit the emac_common structure here.
+ */
+__always_inline static void qtn_emac_wr(uint32_t vbase, int reg, u32 val)
+{
+	writel(val, IO_ADDRESS(vbase + reg));
+	/* HW bug workaround - dummy access breaks up bus transactions. */
+	readl(RUBY_SYS_CTL_BASE_ADDR);
+}
+
+__always_inline static uint32_t qtn_emac_rd(uint32_t vbase, int reg)
+{
+	/*
+	 *HW bug workaround , sometimes we can't get the correct register value
+	 * so we need to do an extra readl
+	 */
+	readl(RUBY_SYS_CTL_BASE_ADDR);
+	return readl(IO_ADDRESS(vbase + reg));
+}
+
+static inline struct Qdisc *qdrv_tx_sch_vap_get_qdisc(const struct net_device *dev)
+{
+	/* This assumes 1 tx netdev queue per vap */
+	return netdev_get_tx_queue(dev, 0)->qdisc;
+}
+
+static inline int qdrv_sch_tclass_to_ac(const uint8_t dscp)
+{
+	int wme_ac;
+	uint8_t dot1p_up;
+
+	dot1p_up = qdrv_sch_dscp2dot1p[IP_DSCP(dscp)];
+	if (dot1p_up < IEEE8021P_PRIORITY_NUM)
+		wme_ac = qdrv_sch_tos2ac[dot1p_up];
+	else
+		wme_ac = qdrv_sch_tos2ac[IPTOS_PREC(dscp) >> IPTOS_PREC_SHIFT];
+
+	return wme_ac;
+}
+
+static inline uint32_t qdrv_sch_classify_ipv4(struct sk_buff *skb, struct iphdr *iphdr_p)
+{
+	int wme_ac;
+
+	wme_ac = qdrv_sch_tclass_to_ac(iphdr_p->tos);
+
+	QTN_SKB_CB_IPPROTO(skb) = iphdr_p->protocol;
+
+	return wme_ac;
+}
+
+#ifdef CONFIG_IPV6
+static inline uint32_t qdrv_sch_classify_ipv6(struct sk_buff *skb, struct ipv6hdr *ipv6hdr_p)
+{
+	int wme_ac;
+	uint8_t t_class = 0;
+	uint8_t nexthdr;
+
+	t_class = (ipv6hdr_p->priority << 4) | (ipv6hdr_p->flow_lbl[0] >> 4);
+	wme_ac = qdrv_sch_tclass_to_ac(t_class);
+
+	iputil_v6_skip_exthdr(ipv6hdr_p, sizeof(struct ipv6hdr), &nexthdr,
+				(skb->len - ((uint8_t *)ipv6hdr_p - skb->data)), NULL, NULL);
+	QTN_SKB_CB_IPPROTO(skb) = nexthdr;
+
+	return wme_ac;
+}
+#endif
+
+static inline uint32_t qdrv_sch_classify_vlan_tag(struct sk_buff *skb)
+{
+	int wme_ac = WME_AC_BE;
+	struct vlan_ethhdr *vlan_eth = (struct vlan_ethhdr *) skb->data;
+	uint8_t v_pri;
+
+	v_pri = (ntohs(get_unaligned(&vlan_eth->h_vlan_TCI)) >> VLAN_PRI_SHIFT) & VLAN_PRI_MASK;
+	wme_ac = qdrv_sch_tos2ac[v_pri];
+
+	return wme_ac;
+}
+
+/*
+ * Get the max priority between vlan priority and 11p priority
+ */
+static inline uint8_t
+qdrv_sch_get_max_priority(uint8_t vlan_ac, uint8_t ip_ac)
+{
+	uint8_t max_ac = WME_AC_BE;
+
+	if ((vlan_ac <= WME_AC_BK) && (ip_ac <= WME_AC_BK))
+		max_ac = min(vlan_ac, ip_ac);
+	else
+		max_ac = max(vlan_ac, ip_ac);
+
+	return max_ac;
+}
+
+static inline int
+qdrv_sch_classify_ctrl(struct sk_buff *skb)
+{
+	uint16_t ether_type = QTN_SKB_CB_ETHERTYPE(skb);
+	uint8_t ip_protocol;
+
+	if (likely(iputil_eth_is_ipv4or6(ether_type))) {
+		ip_protocol = QTN_SKB_CB_IPPROTO(skb);
+		if (unlikely((ip_protocol == IPPROTO_ICMP) ||
+				(ip_protocol == IPPROTO_ICMPV6) ||
+				(ip_protocol == IPPROTO_IGMP))) {
+			return 1;
+		}
+	} else if ((ether_type == __constant_htons(ETH_P_ARP)) ||
+			(ether_type == __constant_htons(ETH_P_PAE))) {
+		return 1;
+	}
+
+	return 0;
+}
+
+#define qdrv_vlan_tx_tag_present(__skb)      ((__skb)->vlan_tci)
+
+static inline void
+qdrv_sch_classify(struct sk_buff *skb, uint16_t ether_type, uint8_t *data_start)
+{
+	struct iphdr *iphdr_p = (struct iphdr *)data_start;
+	uint8_t wme_ac = WME_AC_BE;
+	uint8_t vlan_wme_ac = WME_AC_BE;
+
+	if (M_FLAG_ISSET(skb, M_CLASSIFY)) {
+		return;
+	}
+	M_FLAG_SET(skb, M_CLASSIFY);
+
+	QTN_SKB_CB_ETHERTYPE(skb) = ether_type;
+
+	if (likely(ether_type == __constant_htons(ETH_P_IP))) {
+		if ((skb->len >= (data_start - skb->data) + sizeof(*iphdr_p)) &&
+				(iphdr_p->version == 4)) {
+			wme_ac = qdrv_sch_classify_ipv4(skb, iphdr_p);
+		}
+	}
+
+#ifdef CONFIG_IPV6
+	if (ether_type == __constant_htons(ETH_P_IPV6)) {
+		if (skb->len >= (data_start - skb->data) + sizeof(struct ipv6hdr) &&
+				(iphdr_p->version == 6)) {
+			wme_ac = qdrv_sch_classify_ipv6(skb, (struct ipv6hdr *)data_start);
+		}
+	}
+#endif
+	if (qdrv_sch_classify_ctrl(skb)) {
+		wme_ac = QTN_AC_MGMT;
+	}
+
+	if (qdrv_vlan_tx_tag_present(skb)) {
+		vlan_wme_ac = qdrv_sch_classify_vlan_tag(skb);
+		wme_ac = qdrv_sch_get_max_priority(vlan_wme_ac, wme_ac);
+	}
+
+	skb->priority = wme_ac;
+}
+
+static inline void
+qdrv_sch_classify_bk(struct sk_buff *skb)
+{
+	M_FLAG_SET(skb, M_CLASSIFY);
+	skb->priority = QDRV_BAND_AC_BK;
+}
+
+/*
+ * Skip over L2 headers in a buffer
+ *   Returns Ethernet type and a pointer to the payload
+ */
+static inline void *
+qdrv_sch_find_data_start(struct sk_buff *skb,
+		struct ether_header *eh, u16 *ether_type)
+{
+	struct llc *llc_p;
+	struct vlan_ethhdr *vlan_ethhdr_p;
+
+	if (ntohs(eh->ether_type) < ETHER_MAX_LEN) {
+		llc_p = (struct llc *)(eh + 1);
+		if ((skb->len >= LLC_SNAPFRAMELEN) &&
+		    (llc_p->llc_dsap == LLC_SNAP_LSAP) &&
+		    (llc_p->llc_ssap == LLC_SNAP_LSAP)) {
+			*ether_type = llc_p->llc_un.type_snap.ether_type;
+			return (void *)((char *)(eh + 1) - sizeof(ether_type) + LLC_SNAPFRAMELEN);
+		} else {
+			*ether_type = ETHER_TYPE_UNKNOWN;
+			return (void *)(eh + 1);
+		}
+	} else if (ntohs(eh->ether_type) == ETH_P_8021Q) {
+		vlan_ethhdr_p = (struct vlan_ethhdr *)eh;
+		*ether_type = vlan_ethhdr_p->h_vlan_encapsulated_proto;
+		skb->vlan_tci = ntohs(get_unaligned((__be16 *)(&vlan_ethhdr_p->h_vlan_TCI)));
+		return (void *)(vlan_ethhdr_p + 1);
+	} else {
+		*ether_type = eh->ether_type;
+		return (void *)(eh + 1);
+	}
+}
+
+static inline uint8_t qdrv_dscp2tid_default(const uint8_t dscp)
+{
+	const uint8_t tclass = dscp << IP_DSCP_SHIFT;
+	const uint8_t ac = qdrv_sch_tclass_to_ac(tclass);
+	const uint8_t tid = WME_AC_TO_TID(ac);
+
+	return tid;
+}
+
+/* Each byte contains 2 4-bit DSCP mapping values */
+static inline void qdrv_dscp2tid_setvalue(uint8_t ifindex , uint8_t dscp, uint8_t tid)
+{
+	uint8_t curval = 0;
+	uint8_t index = 0;
+
+	index = dscp >> 1;
+	curval = qdrv_sch_dscp2tid[ifindex][index];
+
+	if (dscp & 0x1) {
+		qdrv_sch_dscp2tid[ifindex][index] = (curval & ~0xf) | tid;
+	} else {
+		qdrv_sch_dscp2tid[ifindex][index] = (curval & ~(0xf << QDRV_IP_DSCP_MAPPING_SHIFT)) |
+			(tid << QDRV_IP_DSCP_MAPPING_SHIFT);
+	}
+}
+
+static inline void qdrv_dscp2tid_map_init(void)
+{
+	uint8_t ifindex;
+	uint8_t dscp;
+	uint8_t tid = 0;
+
+	for (dscp = 0; dscp < IP_DSCP_NUM; dscp++) {
+		tid =  qdrv_dscp2tid_default(dscp);
+		qdrv_dscp2tid_setvalue(0, dscp, tid);
+	}
+
+	for (ifindex = 1; ifindex < QTN_MAX_BSS_VAPS; ifindex++) {
+		memcpy(&qdrv_sch_dscp2tid[ifindex][0], &qdrv_sch_dscp2tid[0][0], sizeof(qdrv_sch_dscp2tid[0]));
+	}
+}
+
+#if !defined(CONFIG_TOPAZ_PCIE_HOST) && !defined(CONFIG_TOPAZ_PCIE_TARGET)
+/* conversion is only needed for tables that are different to the first table */
+static inline void qdrv_sch_set_vlanpath(void)
+{
+	int i;
+	union topaz_vlan_entry vlan_entry;
+	uint16_t vid;
+
+	/*
+	 * This comparison must be done again if the user changes wifi0 config to
+	 * be the same as some other interfaces.
+	 */
+	for (i = 1; i < QTN_MAX_BSS_VAPS; i++) {
+		vid = qdrv_sch_vlan2index[i];
+		if (vid == VLANID_INDEX_INITVAL) {
+			continue;
+		}
+
+		vlan_entry = topaz_vlan_get_entry(vid);
+		if (memcmp(&qdrv_sch_dscp2tid[0][0], &qdrv_sch_dscp2tid[i][0], sizeof(qdrv_sch_dscp2tid[0]))) {
+			vlan_entry.data.valid = 1;
+			vlan_entry.data.out_port = TOPAZ_TQE_LHOST_PORT;
+		} else {
+			vlan_entry.data.valid = 0;
+		}
+		topaz_vlan_clear_entry(vid);
+		topaz_vlan_set_entry(vid, vlan_entry);
+	}
+}
+
+/*
+ * Configure the HW DSCP to TID table, which is used for wifi0
+ * and any other TIDs that use the same config.
+ */
+static inline void qdrv_sch_set_dscp_hwtbl(uint8_t dscp, uint8_t tid, uint32_t reg_base)
+{
+	uint32_t dscp_reg_val = 0;
+	uint8_t dscp_reg_index = dscp >> QDRV_IP_DSCP_INDEX_SHIFT;
+	uint8_t dscp_nibble_index = dscp - (dscp_reg_index << QDRV_IP_DSCP_INDEX_SHIFT);
+
+	dscp_reg_val = qtn_emac_rd(reg_base, TOPAZ_EMAC_RXP_IP_DIFF_SRV_TID_REG(dscp_reg_index));
+
+	dscp_reg_val &= ~(0xF <<
+		(dscp_nibble_index << TOPAZ_EMAC_IPDSCP_HWT_SHIFT));
+	dscp_reg_val |= (tid & 0xF) <<
+		(dscp_nibble_index << TOPAZ_EMAC_IPDSCP_HWT_SHIFT);
+
+	qtn_emac_wr(reg_base, TOPAZ_EMAC_RXP_IP_DIFF_SRV_TID_REG(dscp_reg_index), dscp_reg_val);
+}
+#endif
+
+static inline void qdrv_sch_mask_settid(uint8_t ifindex, uint8_t dscp, uint8_t tid,
+		uint32_t emac_in_use)
+{
+	qdrv_dscp2tid_setvalue(ifindex, dscp, tid);
+#if !defined(CONFIG_TOPAZ_PCIE_HOST) && !defined(CONFIG_TOPAZ_PCIE_TARGET)
+	qdrv_sch_set_vlanpath();
+	if (ifindex == 0) {
+		if (emac_in_use & QDRV_SCH_EMAC0_IN_USE) {
+			qdrv_sch_set_dscp_hwtbl(dscp, tid, RUBY_ENET0_BASE_ADDR);
+		}
+		if (emac_in_use & QDRV_SCH_EMAC1_IN_USE) {
+			qdrv_sch_set_dscp_hwtbl(dscp, tid, RUBY_ENET1_BASE_ADDR);
+		}
+	}
+#endif
+}
+
+static inline uint8_t qdrv_sch_mask_gettid(uint8_t ifindex, uint8_t dscp)
+{
+	uint8_t index;
+	uint32_t curval;
+	uint8_t	tid;
+
+	index = (dscp >> 1);
+	curval = qdrv_sch_dscp2tid[ifindex][index];
+
+	if (dscp & 0x1)
+		tid  = (curval & 0xf);
+	else
+		tid = (curval >> QDRV_IP_DSCP_MAPPING_SHIFT) & 0xf;
+
+	return tid;
+}
+
+/* Multiple VLAN tags are not currently supported */
+static inline void topaz_tqe_vlan_gettid(void *data, uint8_t *tid, uint8_t *vlan_index)
+{
+	struct vlan_ethhdr *vhd;
+	uint16_t vid = 0;
+	uint8_t ip_dscp = 0;
+	int i;
+	const void *iphdr = NULL;
+	const struct ether_header *eh = bus_to_virt((uintptr_t) data);
+	const uint16_t *ether_type = &eh->ether_type;
+
+	*vlan_index = 0;
+	if (*ether_type == __constant_htons(ETH_P_8021Q)) {
+		ether_type += 2;
+		vhd = bus_to_virt((uintptr_t) data);
+		vid = __constant_htons(vhd->h_vlan_TCI) & VLAN_VID_MASK;
+		for (i = 0; i < qdrv_vap_vlan_max; i++) {
+			if (qdrv_sch_vlan2index[i] == vid) {
+				*vlan_index = i;
+				break;
+			}
+		}
+	}
+
+	iphdr = ether_type + 1;
+	if (*ether_type == __constant_htons(ETH_P_IP)) {
+		const struct qtn_ipv4 *ipv4 = (const struct qtn_ipv4 *) iphdr;
+		ip_dscp = IP_DSCP(ipv4->dscp);
+	} else if (*ether_type == __constant_htons(ETH_P_IPV6)) {
+		const struct qtn_ipv6 *ipv6 = (const struct qtn_ipv6 *) iphdr;
+		ip_dscp = qtn_ipv6_tclass(ipv6);
+	} else if ((*ether_type == __constant_htons(ETH_P_ARP)) || (*ether_type == __constant_htons(ETH_P_PAE))) {
+		*tid = WME_AC_TO_TID(WMM_AC_VO);
+		return;
+	} else {
+		*tid = WME_AC_TO_TID(WMM_AC_BE);
+		return;
+	}
+
+	*tid = qdrv_sch_mask_gettid(*vlan_index, ip_dscp);
+}
+int qdrv_sch_node_is_active(const struct qdrv_sch_node_band_data *nbd,
+				const struct qdrv_sch_node_data *nd, uint8_t band);
+int qdrv_sch_enqueue_node(struct qdrv_sch_node_data *nd, struct sk_buff *skb,
+				bool is_over_quota, bool is_low_rate);
+
+void qdrv_sch_complete(struct qdrv_sch_node_data *nd, struct sk_buff *skb,
+					uint8_t under_quota);
+/*
+ * If qdrv_sch_dequeue_nostat is called, accounting in the qdisc
+ * is not complete until qdrv_sch_complete is called
+ */
+struct sk_buff *qdrv_sch_dequeue_nostat(struct qdrv_sch_shared_data *sd, struct Qdisc* sch);
+int qdrv_sch_flush_node(struct qdrv_sch_node_data *nd);
+int qdrv_sch_requeue(struct qdrv_sch_shared_data *sd, struct sk_buff *skb, struct Qdisc *sch);
+
+const char *qdrv_sch_tos2ac_str(int tos);
+void qdrv_sch_set_ac_map(int tos, int aid);
+void qdrv_sch_set_8021p_map(uint8_t ip_dscp, uint8_t dot1p_up);
+uint8_t qdrv_sch_get_8021p_map(uint8_t ip_dscp);
+
+int qdrv_sch_set_dscp2ac_map(const uint8_t vapid, uint8_t *ip_dscp, uint8_t listlen, uint8_t ac);
+int qdrv_sch_get_dscp2ac_map(const uint8_t vapid, uint8_t *dscp2ac);
+
+void qdrv_sch_set_dscp2tid_map(const uint8_t vapid, const uint8_t *dscp2tid);
+void qdrv_sch_get_dscp2tid_map(const uint8_t vapid, uint8_t *dscp2tid);
+
+void qdrv_tx_sch_node_data_init(struct Qdisc *sch, struct qdrv_sch_shared_data *sd,
+				struct qdrv_sch_node_data *nd, uint32_t users);
+void qdrv_tx_sch_node_data_exit(struct qdrv_sch_node_data *nd, uint32_t users);
+struct qdrv_sch_shared_data *qdrv_sch_shared_data_init(int16_t tokens, uint16_t rdt);
+void qdrv_sch_shared_data_exit(struct qdrv_sch_shared_data *sd);
+
+#endif
+
diff --git a/quantenna/include/qtn/qtn_arc_processor.h b/quantenna/include/qtn/qtn_arc_processor.h
new file mode 100644
index 0000000..8091de5
--- /dev/null
+++ b/quantenna/include/qtn/qtn_arc_processor.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2011 Quantenna Communications, Inc.
+ * All rights reserved.
+ */
+
+#ifndef _QTN_ARC_PROCESSOR_H_
+#define _QTN_ARC_PROCESSOR_H_
+
+#if defined(STATIC_CHECK)
+uint32_t get_sp(void);
+uint32_t get_ilink1(void);
+uint32_t get_ilink2(void);
+uint32_t get_blink(void);
+uint32_t get_status32(void);
+uint8_t arc_read_uncached_8(const uint8_t *addr);
+void arc_write_uncached_8(uint8_t *addr, uint8_t value);
+uint16_t arc_read_uncached_16(const uint16_t *addr);
+void arc_write_uncached_16(uint16_t *addr, uint32_t value);
+uint32_t arc_read_uncached_32(const uint32_t *addr);
+void arc_write_uncached_32(uint32_t *addr, uint32_t value);
+#elif defined(_ARC)
+
+_Inline _Asm uint32_t get_sp(void)
+{
+	mov %r0, %r28
+}
+
+_Inline _Asm uint32_t get_ilink1(void)
+{
+	mov %r0, %r29
+}
+
+_Inline _Asm uint32_t get_ilink2(void)
+{
+	mov %r0, %r30
+}
+
+_Inline _Asm uint32_t get_blink(void)
+{
+	mov %r0, %r31
+}
+
+_Inline _Asm uint32_t get_status32(void)
+{
+	lr %r0, [%status32]
+}
+
+_Inline _Asm uint8_t arc_read_uncached_8(const uint8_t *addr)
+{
+	%reg addr
+	ldb.di %r0, [addr]
+}
+
+_Inline _Asm void arc_write_uncached_8(uint8_t *addr, uint8_t value)
+{
+	%reg addr, value
+	stb.di value, [addr]
+}
+
+_Inline _Asm uint16_t arc_read_uncached_16(const uint16_t *addr)
+{
+	%reg addr
+	ldw.di %r0, [addr]
+}
+
+_Inline _Asm void arc_write_uncached_16(uint16_t *addr, uint32_t value)
+{
+	%reg addr, value
+	stw.di value, [addr]
+}
+
+_Inline _Asm uint32_t arc_read_uncached_32(const uint32_t *addr)
+{
+	%reg addr
+	ld.di %r0, [addr]
+}
+
+_Inline _Asm void arc_write_uncached_32(uint32_t *addr, uint32_t value)
+{
+	%reg addr, value
+	st.di value, [addr]
+}
+
+#else
+/* implementations provided elsewhere */
+#endif	// STATIC_CHECK
+#endif	// _QTN_ARC_PROCESSOR_H_
diff --git a/quantenna/include/qtn/qtn_auc_stats_fields.h b/quantenna/include/qtn/qtn_auc_stats_fields.h
new file mode 100644
index 0000000..070c7ad
--- /dev/null
+++ b/quantenna/include/qtn/qtn_auc_stats_fields.h
@@ -0,0 +1,235 @@
+	{ 0xe510124c, "sleep" },
+	{ 0xe5101284, "jiffies" },
+	{ 0xe51033c8, "IRQ_0" },
+	{ 0xe51033cc, "IRQ_1" },
+	{ 0xe51033d0, "IRQ_2" },
+	{ 0xe51033d4, "IRQ_3" },
+	{ 0xe51033d8, "IRQ_4" },
+	{ 0xe51033dc, "IRQ_5" },
+	{ 0xe51033e0, "IRQ_6" },
+	{ 0xe51033e4, "IRQ_7" },
+	{ 0xe51033e8, "IRQ_8" },
+	{ 0xe51033ec, "IRQ_9" },
+	{ 0xe51033f0, "IRQ_10" },
+	{ 0xe51033f4, "IRQ_11" },
+	{ 0xe51033f8, "IRQ_12" },
+	{ 0xe51033fc, "IRQ_13" },
+	{ 0xe5103400, "IRQ_14" },
+	{ 0xe5103404, "IRQ_15" },
+	{ 0xe5103408, "IRQ_16" },
+	{ 0xe510340c, "IRQ_17" },
+	{ 0xe5103410, "IRQ_18" },
+	{ 0xe5103414, "IRQ_19" },
+	{ 0xe5103424,	"task_alive_counters[0]" },
+	{ 0xe5103428,	"task_alive_counters[1]" },
+	{ 0xe510342c,	"task_alive_counters[2]" },
+	{ 0xe5103430,	"task_alive_counters[3]" },
+	{ 0xe5103434,	"task_alive_counters[4]" },
+	{ 0xe5103438,	"task_alive_counters[5]" },
+	{ 0xe510343c,	"task_alive_counters[6]" },
+	{ 0xe5103440,	"task_alive_counters[7]" },
+	{ 0xe5103444,	"task_alive_counters[8]" },
+	{ 0xe5103448,	"task_alive_counters[9]" },
+	{ 0xe510344c,	"task_alive_counters[10]" },
+	{ 0xe5103450,	"task_alive_counters[11]" },
+	{ 0xe5103454,	"task_alive_counters[12]" },
+	{ 0xe5103458,	"task_alive_counters[13]" },
+	{ 0xe510345c,	"task_alive_counters[14]" },
+	{ 0xe5103460,	"task_alive_counters[15]" },
+	{ 0xe5103464,	"task_alive_counters[16]" },
+	{ 0xe5103468,	"task_alive_counters[17]" },
+	{ 0xe510346c,	"task_alive_counters[18]" },
+	{ 0xe5103470,	"task_alive_counters[19]" },
+	{ 0xe5103474,	"task_false_trigger[0]" },
+	{ 0xe5103478,	"task_false_trigger[1]" },
+	{ 0xe510347c,	"task_false_trigger[2]" },
+	{ 0xe5103480,	"task_false_trigger[3]" },
+	{ 0xe5103484,	"task_false_trigger[4]" },
+	{ 0xe5103488,	"task_false_trigger[5]" },
+	{ 0xe510348c,	"task_false_trigger[6]" },
+	{ 0xe5103490,	"task_false_trigger[7]" },
+	{ 0xe5103494,	"task_false_trigger[8]" },
+	{ 0xe5103498,	"task_false_trigger[9]" },
+	{ 0xe510349c,	"task_false_trigger[10]" },
+	{ 0xe51034a0,	"task_false_trigger[11]" },
+	{ 0xe51034a4,	"task_false_trigger[12]" },
+	{ 0xe51034a8,	"task_false_trigger[13]" },
+	{ 0xe51034ac,	"task_false_trigger[14]" },
+	{ 0xe51034b0,	"task_false_trigger[15]" },
+	{ 0xe51034b4,	"task_false_trigger[16]" },
+	{ 0xe51034b8,	"task_false_trigger[17]" },
+	{ 0xe51034bc,	"task_false_trigger[18]" },
+	{ 0xe51034c0,	"task_false_trigger[19]" },
+	{ 0xe51034c4,	"tqew_ac[0]" },
+	{ 0xe51034c8,	"tqew_ac[1]" },
+	{ 0xe51034cc,	"tqew_ac[2]" },
+	{ 0xe51034d0,	"tqew_ac[3]" },
+	{ 0xe51034d4,	"tqew_ac_avail[0]" },
+	{ 0xe51034d8,	"tqew_ac_avail[1]" },
+	{ 0xe51034dc,	"tqew_ac_avail[2]" },
+	{ 0xe51034e0,	"tqew_ac_avail[3]" },
+	{ 0xe51034e4,	"tqew_air_humble" },
+	{ 0xe51034e8,	"tqew_air_suppress" },
+	{ 0xe51034ec,	"tqew_air_use_idletime" },
+	{ 0xe51034f0,	"tqew_air_dequeue_only" },
+	{ 0xe51034f4,	"tqew_pkt_pending_for_txdone" },
+	{ 0xe51034f8,	"tqew_descr_alloc_fail" },
+	{ 0xe51034fc,	"tqew_ring_alloc_fail" },
+	{ 0xe5103500,	"tqew_pop_alloc_fail" },
+	{ 0xe5103504,	"tqew_pop_sw_limit" },
+	{ 0xe5103508,	"tqew_pop_empty" },
+	{ 0xe510350c,	"tqew_available_set" },
+	{ 0xe5103510,	"tqew_available_reset" },
+	{ 0xe5103514,	"tqew_rx" },
+	{ 0xe5103518,	"tqew_drop" },
+	{ 0xe510351c,	"tqew_free" },
+	{ 0xe5103520,	"tqew_buf_invalid" },
+	{ 0xe5103524,	"wmac_tx_done[0]" },
+	{ 0xe5103528,	"wmac_tx_done[1]" },
+	{ 0xe510352c,	"wmac_tx_done[2]" },
+	{ 0xe5103530,	"wmac_tx_done[3]" },
+	{ 0xe5103534,	"agg_aggregate_flag" },
+	{ 0xe5103538,	"agg_aggressive_agg" },
+	{ 0xe510353c,	"hdrs_available_recent_min" },
+	{ 0xe5103540,	"agg_states[0]" },
+	{ 0xe5103544,	"agg_states[1]" },
+	{ 0xe5103548,	"agg_states[2]" },
+	{ 0xe510354c,	"agg_states[3]" },
+	{ 0xe5103550,	"agg_states[4]" },
+	{ 0xe5103554,	"ethq_push" },
+	{ 0xe5103558,	"ethq_pop" },
+	{ 0xe510355c,	"agg_aggregate_mpdu" },
+	{ 0xe5103560,	"agg_aggregate_msdu" },
+	{ 0xe5103564,	"agg_singleton_mpdu" },
+	{ 0xe5103568,	"agg_singleton_mgmt" },
+	{ 0xe510356c,	"agg_singleton_ctl" },
+	{ 0xe5103570,	"agg_singleton_probe" },
+	{ 0xe5103574,	"agg_4K_amsdu" },
+	{ 0xe5103578,	"agg_8K_amsdu" },
+	{ 0xe510357c,	"agg_11K_amsdu" },
+	{ 0xe5103580,	"tx_feedback_success" },
+	{ 0xe5103584,	"tx_feedback_fail" },
+	{ 0xe5103588,	"tx_done_status_success" },
+	{ 0xe510358c,	"tx_done_status_timeout" },
+	{ 0xe5103590,	"tx_done_status_xretry" },
+	{ 0xe5103594,	"tx_done_status_timeout_xretry" },
+	{ 0xe5103598,	"tx_done_pkt_chain_reset" },
+	{ 0xe510359c,	"tx_done_pkt_chain_success" },
+	{ 0xe51035a0,	"tx_done_pkt_chain_drop_tid_down" },
+	{ 0xe51035a4,	"tx_done_pkt_chain_drop_xattempts" },
+	{ 0xe51035a8,	"tx_done_singleton_finish" },
+	{ 0xe51035ac,	"tx_done_singleton_swretry" },
+	{ 0xe51035b0,	"tx_done_aggregate_finish" },
+	{ 0xe51035b4,	"tx_done_aggregate_hwretry" },
+	{ 0xe51035b8,	"tx_done_aggregate_swretry" },
+	{ 0xe51035bc,	"tx_done_mpdu_swretry" },
+	{ 0xe51035c0,	"tx_sample" },
+	{ 0xe51035c4,	"tx_bw_sample" },
+	{ 0xe51035c8,	"tx_swretry_lower_bw" },
+	{ 0xe51035cc,	"tx_swretry_agg_exceed" },
+	{ 0xe51035d0,	"tx_scale_base_20m" },
+	{ 0xe51035d4,	"tx_scale_base_40m" },
+	{ 0xe51035d8,	"tx_scale_base_80m" },
+	{ 0xe51035dc,	"tx_scale_max" },
+	{ 0xe51035e0,	"tx_scale_overstep" },
+	{ 0xe51035e4,	"alloc_tqew_fast" },
+	{ 0xe51035e8,	"free_tqew_fast" },
+	{ 0xe51035ec,	"alloc_tqew_slow" },
+	{ 0xe51035f0,	"free_tqew_slow" },
+	{ 0xe51035f4,	"alloc_tqew_local" },
+	{ 0xe51035f8,	"free_tqew_local" },
+	{ 0xe51035fc,	"alloc_hdr_fast" },
+	{ 0xe5103600,	"free_hdr_fast" },
+	{ 0xe5103604,	"alloc_hdr_slow" },
+	{ 0xe5103608,	"free_hdr_slow" },
+	{ 0xe510360c,	"alloc_msdu_hdr_failed" },
+	{ 0xe5103610,	"alloc_mpdu_hdr_failed" },
+	{ 0xe5103614,	"alloc_tid_superfast" },
+	{ 0xe5103618,	"free_tid_superfast" },
+	{ 0xe510361c,	"alloc_tid_fast" },
+	{ 0xe5103620,	"free_tid_fast" },
+	{ 0xe5103624,	"alloc_tid_slow" },
+	{ 0xe5103628,	"free_tid_slow" },
+	{ 0xe510362c,	"alloc_node_rate_fast" },
+	{ 0xe5103630,	"free_node_rate_fast" },
+	{ 0xe5103634,	"alloc_node_rate_slow" },
+	{ 0xe5103638,	"free_node_rate_slow" },
+	{ 0xe510363c,	"alloc_node_superfast" },
+	{ 0xe5103640,	"free_node_superfast" },
+	{ 0xe5103644,	"alloc_node_fast" },
+	{ 0xe5103648,	"free_node_fast" },
+	{ 0xe510364c,	"alloc_fcs" },
+	{ 0xe5103650,	"free_fcs" },
+	{ 0xe5103654,	"alloc_mac_descr" },
+	{ 0xe5103658,	"free_mac_descr" },
+	{ 0xe510365c,	"tx_mac_push" },
+	{ 0xe5103660,	"tx_mac_idle" },
+	{ 0xe5103664,	"tx_mac_rts" },
+	{ 0xe5103668,	"tx_mac_cts2self" },
+	{ 0xe510366c,	"tx_vlan_drop" },
+	{ 0xe5103670,	"tx_acm_drop" },
+	{ 0xe5103674,	"tx_ps_drop" },
+	{ 0xe5103678,	"ocs_tx_suspend" },
+	{ 0xe510367c,	"ocs_tx_resume" },
+	{ 0xe5103680,	"ocs_singleton_suspend" },
+	{ 0xe5103684,	"ocs_ampdu_suspend" },
+	{ 0xe5103688,	"ocs_frame_created" },
+	{ 0xe510368c,	"pwr_mgmt_awake" },
+	{ 0xe5103690,	"pwr_mgmt_sleep" },
+	{ 0xe5103694,	"pwr_mgmt_tx" },
+	{ 0xe5103698,	"pspoll_rx" },
+	{ 0xe510369c,	"dtim_q_push" },
+	{ 0xe51036a0,	"dtim_q_pop" },
+	{ 0xe51036a4,	"dtim_trigger" },
+	{ 0xe51036a8,	"dtim_q_overflow" },
+	{ 0xe51036ac,	"tx_restrict_dropped" },
+	{ 0xe51036b0,	"tx_throt_dropped" },
+	{ 0xe51036b4,	"tx_block_singleton" },
+	{ 0xe51036b8,	"tx_force_unblock_tid" },
+	{ 0xe51036bc,	"tx_ctl_pkt_hbm_alloc_fails" },
+	{ 0xe51036c0,	"tx_ctl_pkt_alloc_descr_fails" },
+	{ 0xe51036c4,	"tx_bar_alloc_ctl_pkt_fails" },
+	{ 0xe51036c8,	"tx_valid_bit_not_set" },
+	{ 0xe51036cc,	"wmm_ps_tx" },
+	{ 0xe51036d0,	"wmm_ps_tx_null_frames" },
+	{ 0xe51036d4,	"wmm_ps_tx_more_data_frames" },
+	{ 0xe51036d8,	"wmm_ps_tx_eosp_frames" },
+	{ 0xe51036dc,	"mu_tx_su_count" },
+	{ 0xe51036e0,	"mu_tx_send_mu_fail" },
+	{ 0xe51036e4,	"mu_tx_push_count" },
+	{ 0xe51036e8,	"mu_tx_done_count" },
+	{ 0xe51036ec,	"mu_tx_done_succ" },
+	{ 0xe51036f0,	"mu_tx_done_fail" },
+	{ 0xe51036f4,	"mu_tx_sample" },
+	{ 0xe51036f8,	"mu_bar_bitmap_non_zero" },
+	{ 0xe51036fc,	"mu_bar_bitmap_zero" },
+	{ 0xe5103700,	"mu_mac_wmac1_ipc_push" },
+	{ 0xe5103704,	"mu_mac_wmac1_auc_push" },
+	{ 0xe5103708,	"mu_wmac1_resets" },
+	{ 0xe510370c,	"mu_tx_swretry_agg_exceed" },
+	{ 0xe5103710,	"mu_tx_buddy_try" },
+	{ 0xe5103714,	"mu_tx_buddy_fail_wmac" },
+	{ 0xe5103718,	"mu_tx_buddy_fail_ptid" },
+	{ 0xe510371c,	"mu_tx_buddy_fail_rate" },
+	{ 0xe5103720,	"mu_tx_buddy_fail_create_agg" },
+	{ 0xe5103724,	"mu_tx_buddy_mu_only_timeout" },
+	{ 0xe5103728,	"mu_tx_another_q_push_succ" },
+	{ 0xe510372c,	"mu_tx_another_q_push_fail" },
+	{ 0xe5103730,	"mu_tx_buddy_multi_tid" },
+	{ 0xe5103734,	"mu_tx_wmac_0_done_count" },
+	{ 0xe5103738,	"mu_tx_wmac_0_bitmap_non_zero" },
+	{ 0xe510373c,	"mu_tx_wmac_0_bitmap_zero" },
+	{ 0xe5103740,	"mu_tx_wmac_0_done_timeout" },
+	{ 0xe5103744,	"mu_tx_wmac_0_done_succ" },
+	{ 0xe5103748,	"mu_tx_wmac_0_done_fail" },
+	{ 0xe510374c,	"mu_tx_wmac_1_done_succ" },
+	{ 0xe5103750,	"mu_tx_wmac_1_done_fail" },
+	{ 0xe5103754,	"mu_tx_wmac_0_mpdu_total" },
+	{ 0xe5103758,	"mu_tx_wmac_0_mpdu_succ" },
+	{ 0xe510375c,	"mu_tx_wmac_1_mpdu_total" },
+	{ 0xe5103760,	"mu_tx_wmac_1_mpdu_succ" },
+	{ 0xe5103764,	"mu_tx_qnum[0]" },
+	{ 0xe5103768,	"mu_tx_qnum[1]" },
+	{ 0xe510376c,	"mu_tx_qnum[2]" },
+	{ 0xe5103770,	"mu_tx_qnum[3]" },
+	{ 0xe5103774,	"tqe_sema_fails" },
diff --git a/quantenna/include/qtn/qtn_bb_mutex.h b/quantenna/include/qtn/qtn_bb_mutex.h
new file mode 100644
index 0000000..6606a85
--- /dev/null
+++ b/quantenna/include/qtn/qtn_bb_mutex.h
@@ -0,0 +1,222 @@
+/*
+ * (C) Copyright 2011 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __QTN_BB_MUTEX_H
+#define __QTN_BB_MUTEX_H
+
+#include "mproc_sync.h"
+
+#ifndef __ASSEMBLY__
+
+#define QTN_BB_RESET_REGISTER_VAL		0x7A200
+#define QTN_BB_HRESET_REGISTER_VAL		0x10000
+
+struct qtn_bb_mutex
+{
+	volatile u_int32_t ref_counter;
+	volatile u_int32_t collision_counter;
+	volatile u_int32_t enter_counter;
+};
+
+RUBY_INLINE struct qtn_bb_mutex*
+qtn_bb_mutex_get(void)
+{
+#if defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD)
+	return (struct qtn_bb_mutex*)qtn_mproc_sync_nocache
+		(qtn_mproc_sync_shared_params_get()->bb_mutex_bus);
+#else
+	/* Linux target */
+	return qtn_mproc_sync_shared_params_get()->bb_mutex_lhost;
+#endif
+}
+
+/*
+ * Atomically increase reference counter, acquiring reader mutex if not previously held
+ */
+#if QTN_SEM_TRACE
+#define qtn_bb_mutex_enter(_cpu)    qtn_bb_mutex_enter_dbg(_cpu, __FILE__, __LINE__)
+RUBY_WEAK(qtn_bb_mutex_enter_dbg) int
+qtn_bb_mutex_enter_dbg(QTN_SOC_CPU current_cpu, char *caller, int caller_line)
+#else
+RUBY_WEAK(qtn_bb_mutex_enter) int
+qtn_bb_mutex_enter(QTN_SOC_CPU current_cpu)
+#endif
+{
+	struct qtn_bb_mutex *bb_mutex = qtn_bb_mutex_get();
+	unsigned long flags;
+
+	__qtn_mproc_sync_spin_lock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, &flags);
+	if (bb_mutex->ref_counter == 0) {
+		++(bb_mutex->enter_counter);
+	} else {
+		++(bb_mutex->collision_counter);
+	}
+	__qtn_mproc_refcnt_inc(&bb_mutex->ref_counter);
+	__qtn_mproc_sync_spin_unlock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, &flags);
+
+	return 0;
+}
+
+/*
+ * Atomically decrease reference counter, releasing reader mutex if transitioning to 0
+ */
+#if QTN_SEM_TRACE
+#define qtn_bb_mutex_leave(_cpu)    qtn_bb_mutex_leave_dbg(_cpu, __FILE__, __LINE__)
+RUBY_WEAK(qtn_bb_mutex_leave_dbg) int
+qtn_bb_mutex_leave_dbg(QTN_SOC_CPU current_cpu, char *caller, int caller_line)
+#else
+RUBY_WEAK(qtn_bb_mutex_leave) int
+qtn_bb_mutex_leave(QTN_SOC_CPU current_cpu)
+#endif
+{
+	struct qtn_bb_mutex *bb_mutex = qtn_bb_mutex_get();
+	unsigned long flags;
+
+	__qtn_mproc_sync_spin_lock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, &flags);
+	__qtn_mproc_refcnt_dec(&bb_mutex->ref_counter);
+	__qtn_mproc_sync_spin_unlock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, &flags);
+
+	return 0;
+}
+
+/*
+ * Enable RIFS mode. Safe to call using any processor.
+ * Make sure that SoC support this mode before calling.
+ */
+#if QTN_SEM_TRACE
+#define qtn_rifs_mode_enable(_cpu)   qtn_rifs_mode_enable_dbg(_cpu, __FILE__, __LINE__)
+RUBY_WEAK(qtn_rifs_mode_enable_dbg) void
+qtn_rifs_mode_enable_dbg(QTN_SOC_CPU current_cpu, char *caller, int caller_line)
+#else
+RUBY_WEAK(qtn_rifs_mode_enable) void
+qtn_rifs_mode_enable(QTN_SOC_CPU current_cpu)
+#endif
+{
+	unsigned long flags;
+
+	__qtn_mproc_sync_spin_lock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, &flags);
+	qtn_mproc_sync_mem_write(RUBY_QT3_BB_GLBL_PREG_RIF_ENABLE, RUBY_QT3_BB_GLBL_PREG_RIF_ENABLE_ON);
+	__qtn_mproc_sync_spin_unlock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, &flags);
+}
+
+/*
+ * Disable RIFS mode. Safe to call using any processor.
+ * Make sure that SoC support this mode before calling.
+ */
+#if QTN_SEM_TRACE
+#define qtn_rifs_mode_disable(_cpu)   qtn_rifs_mode_disable_dbg(_cpu, __FILE__, __LINE__)
+RUBY_WEAK(qtn_rifs_mode_disable_dbg) void
+qtn_rifs_mode_disable_dbg(QTN_SOC_CPU current_cpu, char *caller, int caller_line)
+#else
+RUBY_WEAK(qtn_rifs_mode_disable) void
+qtn_rifs_mode_disable(QTN_SOC_CPU current_cpu)
+#endif
+{
+	unsigned long flags;
+
+	__qtn_mproc_sync_spin_lock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, &flags);
+	qtn_mproc_sync_mem_write(RUBY_QT3_BB_GLBL_PREG_RIF_ENABLE, RUBY_QT3_BB_GLBL_PREG_RIF_ENABLE_OFF);
+	__qtn_mproc_sync_spin_unlock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, &flags);
+}
+
+/*
+ * Acquiring writer mutex
+ */
+#if QTN_SEM_TRACE
+#define qtn_bb_mutex_reset_enter(_cpu, _flags)   qtn_bb_mutex_reset_enter_dbg(_cpu, _flags, __FILE__, __LINE__)
+RUBY_WEAK(qtn_bb_mutex_reset_enter_dbg) void
+qtn_bb_mutex_reset_enter_dbg(QTN_SOC_CPU current_cpu, unsigned long *flags, char *caller, int caller_line)
+#else
+RUBY_WEAK(qtn_bb_mutex_reset_enter) void
+qtn_bb_mutex_reset_enter(QTN_SOC_CPU current_cpu, unsigned long *flags)
+#endif
+{
+	struct qtn_bb_mutex *bb_mutex = qtn_bb_mutex_get();
+
+	while (1) {
+		__qtn_mproc_sync_spin_lock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, flags);
+		if (bb_mutex->ref_counter == 0) {
+			break;
+		}
+		__qtn_mproc_sync_spin_unlock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, flags);
+	}
+}
+
+/*
+ * Try to acquire writer mutex (to release qtn_bb_mutex_reset_leave() must be called)
+ */
+#if QTN_SEM_TRACE
+#define qtn_bb_mutex_reset_try_enter(_cpu, _flags)   qtn_bb_mutex_reset_try_enter_dbg(_cpu, _flags, __FILE__, __LINE__)
+RUBY_WEAK(qtn_bb_mutex_reset_try_enter_dbg) int
+qtn_bb_mutex_reset_try_enter_dbg(QTN_SOC_CPU current_cpu, unsigned long *flags, char *caller, int caller_line)
+#else
+RUBY_WEAK(qtn_bb_mutex_reset_try_enter) int
+qtn_bb_mutex_reset_try_enter(QTN_SOC_CPU current_cpu, unsigned long *flags)
+#endif
+{
+	int ret = 0;
+	struct qtn_bb_mutex *bb_mutex = qtn_bb_mutex_get();
+
+	__qtn_mproc_sync_spin_lock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, flags);
+	if (bb_mutex->ref_counter == 0) {
+		ret = 1;
+	} else {
+		__qtn_mproc_sync_spin_unlock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, flags);
+	}
+
+	return ret;
+}
+
+/*
+ * Release writer mutex
+ */
+#if QTN_SEM_TRACE
+#define qtn_bb_mutex_reset_leave(_cpu, _flags)   qtn_bb_mutex_reset_leave_dbg(_cpu, _flags, __FILE__, __LINE__)
+RUBY_WEAK(qtn_bb_mutex_reset_leave_dbg) void
+qtn_bb_mutex_reset_leave_dbg(QTN_SOC_CPU current_cpu, unsigned long *flags, char *caller, int caller_line)
+#else
+RUBY_WEAK(qtn_bb_mutex_reset_leave) void
+qtn_bb_mutex_reset_leave(QTN_SOC_CPU current_cpu, unsigned long *flags)
+#endif
+{
+	__qtn_mproc_sync_spin_unlock(current_cpu, QTN_ALL_SOC_CPU, QTN_SEM_BB_MUTEX_SEMNUM, flags);
+}
+
+/*
+ * Return true if reset needed.
+ */
+RUBY_INLINE int
+qtn_bb_mutex_is_reset(QTN_SOC_CPU current_cpu, u_int32_t status)
+{
+	return (status & QTN_BB_RESET_REGISTER_VAL);
+}
+
+RUBY_INLINE int
+qtn_bb_mutex_is_hreset(QTN_SOC_CPU current_cpu, u_int32_t status)
+{
+	return (status & QTN_BB_HRESET_REGISTER_VAL);
+}
+
+#endif // #ifndef __ASSEMBLY__
+
+#endif // #ifndef __QTN_BB_MUTEX_H
+
diff --git a/quantenna/include/qtn/qtn_buffers.h b/quantenna/include/qtn/qtn_buffers.h
new file mode 100644
index 0000000..a037e66
--- /dev/null
+++ b/quantenna/include/qtn/qtn_buffers.h
@@ -0,0 +1,105 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __QTN_BUFFERS_H
+#define __QTN_BUFFERS_H
+
+#include <common/topaz_config.h>
+
+#define QTN_BUF_USE_11AC_SIZE			1
+#define TOPAZ_HBM_SKB_ALLOCATOR_DEFAULT		1
+
+#define TOPAZ_HBM_SKB_ALLOCATOR			2
+
+#if TOPAZ_HBM_SKB_ALLOCATOR_DEFAULT
+	/*
+	 * Buffer allocation in Topaz when using the switch must be extremely
+	 * careful such that the sum of all possible buffer pileup does not
+	 * exceed the number of possible payloads. Otherwise the hardware will
+	 * start processing null pointers.
+	 */
+	#define TOPAZ_HBM_PAYLOAD_COUNT_S	TOPAZ_HBM_BUF_EMAC_RX_COUNT_S
+	#define QTN_BUFS_EMAC_TX_RING_S		9
+	#define QDRV_MAX_QUEUED_MGMT_FRAMES	256
+	#define QTN_BUFS_WMAC_RX_RING_S		10
+	#define QTN_BUFS_WMAC_TX_NON_LHOST_S	9
+	#define QTN_BUFS_WMAC_TX_QDISC_S	10
+	#define QDRV_TX_SCH_RED_MASK		((1 << 7) - 1)
+#elif QTN_BUF_USE_11AC_SIZE
+	/* Topaz with 11ac buffers, no acceleration */
+	#define TOPAZ_HBM_PAYLOAD_COUNT_S	TOPAZ_HBM_BUF_EMAC_RX_COUNT_S
+	#define QTN_BUFS_EMAC_TX_RING_S		9
+	#define QDRV_MAX_QUEUED_MGMT_FRAMES	256
+	#define QTN_BUFS_WMAC_RX_RING_S		10
+	#define QTN_BUFS_WMAC_TX_NON_LHOST_S	9
+	#define QTN_BUFS_WMAC_TX_QDISC_S	11
+	#define QDRV_TX_SCH_RED_MASK		((1 << 7) - 1)
+#else
+	/* Ruby or Topaz with 11n buffers no acceleration */
+	#define TOPAZ_HBM_PAYLOAD_COUNT_S	12
+	#define QTN_BUFS_EMAC_TX_RING_S		7
+	#define QDRV_MAX_QUEUED_MGMT_FRAMES	512
+	#define QTN_BUFS_WMAC_RX_RING_S		11
+	#define QTN_BUFS_WMAC_TX_NON_LHOST_S	9
+	#define QTN_BUFS_WMAC_TX_QDISC_S	11
+	#define QDRV_TX_SCH_RED_MASK		((1 << 7) - 1)
+#endif
+
+#define TOPAZ_HBM_PAYLOAD_COUNT		(1 << TOPAZ_HBM_PAYLOAD_COUNT_S)
+
+#ifdef QTN_RC_ENABLE_HDP
+#define QTN_BUFS_EMAC_RX_RING_S		12
+#else
+#define QTN_BUFS_EMAC_RX_RING_S		8
+#endif
+#define QTN_BUFS_EMAC_TX_QDISC_S	7
+#define QTN_BUFS_PCIE_TQE_RX_RING_S	12
+#if defined (CONFIG_TOPAZ_PCIE_TARGET)
+#define QTN_BUFS_LHOST_TQE_RX_RING_S	8
+#elif defined (CONFIG_TOPAZ_PCIE_HOST)
+#define QTN_BUFS_LHOST_TQE_RX_RING_S	10
+#elif defined(TOPAZ_VB_CONFIG) || defined(TOPAZ_RGMII_CONFIG) || defined(TOPAZ_VZN_CONFIG)
+#define QTN_BUFS_LHOST_TQE_RX_RING_S	11
+#else
+#define QTN_BUFS_LHOST_TQE_RX_RING_S	9
+#endif
+
+#define QTN_BUFS_LHOST_TQE_RX_RING	(1 << QTN_BUFS_LHOST_TQE_RX_RING_S)
+#define QTN_BUFS_EMAC_RX_RING		(1 << QTN_BUFS_EMAC_RX_RING_S)
+#define QTN_BUFS_EMAC_TX_RING		(1 << QTN_BUFS_EMAC_TX_RING_S)
+#define QTN_BUFS_EMAC_TX_QDISC		(1 << QTN_BUFS_EMAC_TX_QDISC_S)
+#define QTN_BUFS_WMAC_RX_RING		(1 << QTN_BUFS_WMAC_RX_RING_S)
+#define QTN_BUFS_WMAC_TX_NON_LHOST	(1 << QTN_BUFS_WMAC_TX_NON_LHOST_S)
+#define QTN_BUFS_WMAC_TX_QDISC		(1 << QTN_BUFS_WMAC_TX_QDISC_S)
+#define QTN_BUFS_PCIE_TQE_RX_RING	(1 << QTN_BUFS_PCIE_TQE_RX_RING_S)
+
+#define QTN_BUFS_CPUS_TOTAL		(1 * (QTN_BUFS_LHOST_TQE_RX_RING))
+#define QTN_BUFS_EMAC_TOTAL		(2 * (QTN_BUFS_EMAC_RX_RING + QTN_BUFS_EMAC_TX_RING + QTN_BUFS_EMAC_TX_QDISC))
+#define QTN_BUFS_WMAC_TOTAL		(1 * (QTN_BUFS_WMAC_RX_RING + QTN_BUFS_WMAC_TX_NON_LHOST + QTN_BUFS_WMAC_TX_QDISC + QDRV_MAX_QUEUED_MGMT_FRAMES))
+#define QTN_BUFS_ALLOC_TOTAL		(QTN_BUFS_CPUS_TOTAL /*+ QTN_BUFS_EMAC_TOTAL*/ + QTN_BUFS_WMAC_TOTAL)
+
+#if TOPAZ_HBM_SKB_ALLOCATOR_DEFAULT && (TOPAZ_HBM_PAYLOAD_COUNT <= QTN_BUFS_ALLOC_TOTAL)
+	#error "Payload buffers distribution error"
+#endif
+
+#endif	// __QTN_BUFFERS_H
+
diff --git a/quantenna/include/qtn/qtn_cca.h b/quantenna/include/qtn/qtn_cca.h
new file mode 100644
index 0000000..1520931
--- /dev/null
+++ b/quantenna/include/qtn/qtn_cca.h
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2011 Quantenna Communications, Inc.
+ *
+ * Shared datastructure between lhost, MuC and ADM module for CCA measurement
+ */
+
+#ifndef _QTN_CCA_H
+#define _QTN_CCA_H
+
+struct out_cca_info {
+	u_int64_t	start_tsf;
+	u_int64_t	end_tsf;
+	u_int32_t	cnt_pri_cca;
+	u_int32_t	cnt_sec_cca;
+	u_int32_t	cca_sample_cnt;
+};
+
+#endif	// _QTN_CCA_H
+
diff --git a/quantenna/include/qtn/qtn_debug.h b/quantenna/include/qtn/qtn_debug.h
new file mode 100644
index 0000000..3f1b55e
--- /dev/null
+++ b/quantenna/include/qtn/qtn_debug.h
@@ -0,0 +1,240 @@
+/*SH1
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2008 - 2012 Quantenna Communications, Inc           **
+**                            All Rights Reserved                            **
+**                                                                           **
+**  Date        : 21/03/12                                                   **
+**  File        : qtn_debug.c                                                **
+**  Description :                                                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH1*/
+
+#ifndef QTN_DEBUG_H_
+#define QTN_DEBUG_H_
+
+/* When set to 1 LHOST formats AuC print output. It is not possible to use %s and %pM
+conversion specifiers. Also the number of arguments printed are limited to 8 and therefore
+stack size is limited to 32.
+When set to 0 AuC formats the output, pass the formatted line to the LHOST that
+prints it. */
+#define AUC_LHOST_PRINT_FORMAT	1
+#define PRINT_STACK_SIZE	32
+
+#if defined(MUC_BUILD)
+#define	DBGFN		uc_printk
+#elif defined(AUC_BUILD)
+#define	DBGFN		auc_os_printf
+#else
+#define	DBGFN		printk
+#endif
+
+#ifndef __GNUC__
+#define __FUNCTION__	""
+#endif
+
+#define DBGFMT  "%s: "
+#define DBGEFMT "%s: ERROR - "
+#define DBGWFMT "%s: WARNING - "
+#define DBGARG  __func__
+#define DBGMACVAR "%02x:%02x:%02x:%02x:%02x:%02x"
+#define DBGMACFMT(a) \
+	(a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
+#define DBGMACFMT_LE(a) \
+	(a)[5], (a)[4], (a)[3], (a)[2], (a)[1], (a)[0]
+
+#define DBGFMT_BYTEFLD3_P	"%u.%u.%u"
+#define DBGFMT_BYTEFLD3_V(_v)	(_v >> 16) & 0xff, (_v >> 8) & 0xff, _v & 0xff
+#define DBGFMT_BYTEFLD4_P	"%u.%u.%u.%u"
+#define DBGFMT_BYTEFLD4_V(_v)	(_v >> 24) & 0xff, (_v >> 16) & 0xff, (_v >> 8) & 0xff, _v & 0xff
+
+#ifndef BIT
+#define BIT(x) (1 << (x))
+#endif
+
+typedef enum {
+	DBG_LM_QDRV = 1,
+	DBG_LM_QPCIE,
+	DBG_LM_QRADAR,
+	DBG_LM_QBOOTCFG,
+	DBG_LM_QADM,
+	DBG_LM_QWLAN,
+	DBG_LM_QMACFW,
+	DBG_LM_MAX
+} dbg_log_module;
+
+typedef const struct
+{
+	dbg_log_module dbg_module_id;
+	const char *dbg_module_name;
+} dbg_module_table_t;
+extern unsigned int g_dbg_log_module;
+
+#if defined(MUC_BUILD)
+extern unsigned int g_dbg_log_level;
+extern unsigned int g_dbg_log_func;
+#else
+extern unsigned int g_dbg_log_level[DBG_LM_MAX];
+extern unsigned int g_dbg_log_func[DBG_LM_MAX];
+#endif
+extern dbg_module_table_t dbg_module_name_entry[];
+
+#define DBG_LL_EMERG					0
+#define DBG_LL_ALERT					1
+#define DBG_LL_ERR					2
+#define DBG_LL_WARNING					3
+#define DBG_LL_CRIT					4
+#define DBG_LL_NOTICE					5
+#define DBG_LL_INFO					6
+#define DBG_LL_HIDDEN					7
+#define DBG_LL_DEBUG					8
+#define DBG_LL_TRIAL					9
+#define DBG_LL_ALL					10
+
+#define DBG_LF_00					0x00000001
+#define DBG_LF_01					0x00000002
+#define DBG_LF_02					0x00000004
+#define DBG_LF_03					0x00000008
+#define DBG_LF_04					0x00000010
+#define DBG_LF_05					0x00000020
+#define DBG_LF_06					0x00000040
+#define DBG_LF_07					0x00000080
+#define DBG_LF_08					0x00000100
+#define DBG_LF_09					0x00000200
+#define DBG_LF_10					0x00000400
+#define DBG_LF_11					0x00000800
+#define DBG_LF_12					0x00001000
+#define DBG_LF_13					0x00002000
+#define DBG_LF_14					0x00004000
+#define DBG_LF_15					0x00008000
+#define DBG_LF_16					0x00010000
+#define DBG_LF_17					0x00020000
+#define DBG_LF_18					0x00040000
+#define DBG_LF_19					0x00080000
+#define DBG_LF_20					0x00100000
+#define DBG_LF_21					0x00200000
+#define DBG_LF_22					0x00400000
+#define DBG_LF_23					0x00800000
+#define DBG_LF_24					0x01000000
+#define DBG_LF_25					0x02000000
+#define DBG_LF_26					0x04000000
+#define DBG_LF_27					0x08000000
+#define DBG_LF_28					0x10000000
+#define DBG_LF_29					0x20000000
+#define DBG_LF_30					0x40000000
+#define DBG_LF_31					0x80000000
+#define DBG_LF_ALL					0xFFFFFFFF
+
+#define DBG_LOG_FUNC (g_dbg_log_func[DBG_LM - 1])
+#define DBG_LOG_LEVEL (g_dbg_log_level[DBG_LM - 1])
+#define DBG_LOG_FUNC_TEST(flag) (g_dbg_log_func[DBG_LM - 1] & (flag))
+
+#if defined(QTN_DEBUG)
+
+#define DBGPRINTF_RAW(ll, lf, fmt, ...)						\
+	do {									\
+		if((g_dbg_log_module & (BIT(DBG_LM - 1))) &&			\
+				(DBG_LOG_LEVEL >= (ll)) &&			\
+				(DBG_LOG_FUNC_TEST(lf))) {			\
+			DBGFN(fmt, ##__VA_ARGS__);				\
+		}								\
+	} while(0)
+
+#define DBGPRINTF(ll, lf, fmt, ...)						\
+	do {									\
+		if((g_dbg_log_module & (BIT(DBG_LM - 1))) &&			\
+				(DBG_LOG_LEVEL >= (ll)) &&			\
+				(DBG_LOG_FUNC_TEST(lf))) {			\
+			DBGFN(DBGFMT fmt, DBGARG, ##__VA_ARGS__);		\
+		}								\
+	} while(0)
+
+#define DBGPRINTF_E(fmt, ...)							\
+	do {									\
+		if (DBG_LOG_LEVEL >= DBG_LL_ERR)				\
+			DBGFN(DBGEFMT fmt, DBGARG, ##__VA_ARGS__);		\
+	} while(0)
+
+#define DBGPRINTF_W(fmt, ...)							\
+	do {									\
+		if (DBG_LOG_LEVEL >= DBG_LL_WARNING)				\
+			DBGFN(DBGWFMT fmt, DBGARG, ##__VA_ARGS__);		\
+	} while(0)
+
+#define DBGPRINTF_N(fmt, ...)							\
+	DBGFN(fmt, ##__VA_ARGS__);
+
+#define DBGPRINTF_LIMIT_E(fmt, ...)						\
+	do {									\
+		if ((DBG_LOG_LEVEL >= DBG_LL_ERR) && (net_ratelimit()))		\
+			DBGFN(DBGEFMT fmt, DBGARG, ##__VA_ARGS__);		\
+	} while(0)
+
+#define DBGPRINTF_LIMIT(ll, lf, fmt, ...)					\
+	do {									\
+		if ((g_dbg_log_module & BIT(DBG_LM - 1)) &&			\
+			DBG_LOG_FUNC_TEST(lf) &&				\
+			DBG_LOG_LEVEL >= (ll) && (net_ratelimit()))		\
+			DBGFN(DBGFMT fmt, DBGARG, ##__VA_ARGS__);		\
+	} while(0)
+#else
+#define DBGPRINTF(ll, lf, fmt, args...)
+#define DBGPRINTF_E(fmt, args...)
+#define DBGPRINTF_W(fmt, args...)
+#define DBGPRINTF_LIMIT_E(fmt, args...)
+#define DBGPRINTF_LIMIT(ll, lf, fmt, args...)
+#endif
+
+#define HERE(x) do {							\
+	DBGFN("%s:%d:%s %s = %d 0x%x\n",				\
+			__FILE__, __LINE__, __FUNCTION__, (#x),		\
+			(int) (x), (unsigned int) (x));			\
+} while(0)
+
+#define HERES(x) do {							\
+	DBGFN("%s:%d:%s %s = '%s'\n",					\
+			__FILE__, __LINE__, __FUNCTION__, (#x), (x));	\
+} while(0)
+
+#define HERE_REG(addr)	do {						\
+	DBGFN("%s:%d:%s reg 0x%08lx = 0x%08lx (%s)\n",			\
+			__FILE__, __LINE__, __FUNCTION__,		\
+			(unsigned long) (addr),				\
+			(unsigned long) readl(addr), (#addr));		\
+} while(0)
+
+#endif /* QTN_DEBUG_H_ */
diff --git a/quantenna/include/qtn/qtn_decap.h b/quantenna/include/qtn/qtn_decap.h
new file mode 100644
index 0000000..90d9bc1
--- /dev/null
+++ b/quantenna/include/qtn/qtn_decap.h
@@ -0,0 +1,356 @@
+#ifndef __QTN_DECAP_H__
+#define __QTN_DECAP_H__
+
+#include <net80211/ieee80211.h>
+#include <net80211/if_ethersubr.h>
+#include <net80211/if_llc.h>
+
+#include <qtn/qtn_net_packet.h>
+#include <qtn/qtn_vlan.h>
+
+/*
+ * Length of received frame that requires dcache invalidate on receive.
+ * The amount that must be read is:
+ * - VLAN encap case: MAX_VLANS * (LLC + 2b) + LLC
+ * - 802.11 MPDU, no amsdu: LLC + max l3 depth
+ * - 802.11 AMSDU: msdu header + LLC + max l3 depth
+ *
+ * The max of these three is the VLAN case. There is also an assumption
+ * here that if VLANs are processed, there is no need to process L3 header
+ */
+#define QTN_RX_LLC_DCACHE_INV_LEN	(((LLC_SNAPFRAMELEN + 2) * QTN_MAX_VLANS) + LLC_SNAPFRAMELEN)
+#define QTN_RX_MPDU_DCACHE_INV_LEN	(QTN_RX_LLC_DCACHE_INV_LEN + sizeof(struct ieee80211_qosframe_addr4))
+#define QTN_RX_MSDU_DCACHE_INV_LEN	(QTN_RX_LLC_DCACHE_INV_LEN + sizeof(struct ether_header))
+
+struct qtn_rx_decap_info {
+	void		*start;
+	uint16_t	len;
+	struct ether_header eh;			/* the eth header to be written to the packet */
+	uint32_t	vlanh[QTN_MAX_VLANS];	/* space for vlan headers (must be after eh) */
+	const void	*l3hdr;			/* pointer to layer 3 header in the payload */
+	uint16_t	l3_ether_type;		/* l3 header type (may not match eh.ether_type for 802.3 */
+	int8_t		tid;
+	int8_t		nvlans;
+	uint16_t	vlanid;			/* to which VLAN te msdu belongs */
+	uint8_t		first_msdu	:1,	/* first msdu in an amsdu */
+			last_msdu	:1,	/* last msdu in an amsdu */
+			decapped	:1,	/* start is decapped eh, not wireless header */
+			check_3addr_br	:1;	/* requires 3 address bridge dest mac set */
+};
+
+static __inline__ uint16_t
+qtn_rx_decap_newhdr_size(const struct qtn_rx_decap_info *const di)
+{
+	return sizeof(struct ether_header) + (sizeof(struct qtn_8021q) * di->nvlans);
+}
+
+static __inline__ const struct qtn_8021q *
+qtn_rx_decap_vlan(const struct qtn_rx_decap_info *const di, int8_t index)
+{
+	const struct qtn_8021q *v = (const void *) &di->eh.ether_type;
+	return &v[index];
+}
+
+static __inline__ uint16_t qtn_rx_decap_header_size(const struct ieee80211_qosframe_addr4 *const wh)
+{
+	uint16_t size;
+	const uint8_t dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK;
+
+	size = sizeof(struct ieee80211_frame);
+
+	if (dir == IEEE80211_FC1_DIR_DSTODS)
+		size += IEEE80211_ADDR_LEN;
+	if (IEEE80211_QOS_HAS_SEQ(wh)) {
+		size += sizeof(uint16_t);
+		if ((wh->i_fc[1] & IEEE80211_FC1_ORDER) == IEEE80211_FC1_ORDER)
+			/* Frame has HT control field in the header */
+			size += sizeof(uint32_t);
+	}
+
+	return size;
+}
+
+#define LLC_ENCAP_RFC1042	0x0
+#define LLC_ENCAP_BRIDGE_TUNNEL	0xF8
+
+/*
+ * Remove the LLC/SNAP header (if present) and replace with an Ethernet header
+ *
+ * See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation.
+ *   Ethernet-II SNAP header (RFC1042 for most Ethertypes)
+ *   Bridge-Tunnel header (for Ethertypes ETH_P_AARP and ETH_P_IPX
+ *   No encapsulation header if Ethertype < 0x600 (=length)
+ */
+static __inline__ void *
+qtn_rx_decap_set_eth_hdr(struct qtn_rx_decap_info *di, const uint8_t *llc, const uint16_t llclen,
+				uint16_t pvid, struct qtn_vlan_info *vlan_info, uint8_t vlan_enabled,
+				void *token, void **rate_train)
+{
+	uint16_t *newhdrp = &di->eh.ether_type;
+	int8_t llc_l3_gap = 0;
+	uint16_t ether_type_l3;
+
+	uint8_t last_byte = llc[5];
+	uint16_t ether_type_eh;
+	bool is_llc_snap_e;
+	uint8_t vlan_hdr = 0;
+	int tagrx;
+
+	ether_type_l3 = (llc[6] << 0) | (llc[7] << 8);
+	ether_type_eh = ether_type_l3;
+
+	di->nvlans = 0;
+	di->vlanid = 0;
+
+	if (ether_type_l3 == htons(ETHERTYPE_8021Q)) {
+		pvid = ((llc[9] << 0) | (llc[8] << 8)) & QVLAN_MASK_VID;
+	}
+
+	/*
+	 * For EAPOL and VLAN frames we do not want to add 802.1Q header.
+	 * Otherwise, the frame won't go through a driver.
+	 */
+	if (vlan_enabled) {
+		di->vlanid = pvid;
+		tagrx = qtn_vlan_get_tagrx(vlan_info->vlan_tagrx_bitmap, pvid);
+
+		if (tagrx == QVLAN_TAGRX_TAG) {
+			if (ether_type_l3 != htons(ETHERTYPE_8021Q) &&
+					ether_type_l3 != htons(ETHERTYPE_PAE)) {
+				*newhdrp++ = htons(ETHERTYPE_8021Q);
+				*newhdrp++ = htons(pvid);
+				di->nvlans++;
+			}
+		} else if (tagrx == QVLAN_TAGRX_STRIP) {
+			if (ether_type_l3 == htons(ETHERTYPE_8021Q)) {
+				ether_type_l3 = ((llc[10] << 0) | (llc[11] << 8));
+				ether_type_eh = ether_type_l3;
+				vlan_hdr = 4;
+			}
+		}
+	}
+
+	/*
+	* Common part of the header - RFC1042 (final byte is 0x0) or
+	* bridge tunnel encapsulation (final byte is 0xF8)
+	*/
+	is_llc_snap_e = llc[0] == LLC_SNAP_LSAP && llc[1] == LLC_SNAP_LSAP &&
+		llc[2] == LLC_UI && llc[3] == 0x0 && llc[4] == 0x0;
+
+	if (likely(is_llc_snap_e &&
+				((last_byte == LLC_ENCAP_BRIDGE_TUNNEL) ||
+				 (last_byte == LLC_ENCAP_RFC1042 &&
+				  ether_type_eh != htons(ETHERTYPE_AARP) &&
+				  ether_type_eh != htons(ETHERTYPE_IPX))))) {
+		if (last_byte == LLC_ENCAP_RFC1042 && ether_type_eh == htons(ETHERTYPE_802A)) {
+			struct oui_extended_ethertype *pe = (struct oui_extended_ethertype *)&llc[8];
+			if (pe->oui[0] == (QTN_OUI & 0xff) &&
+					pe->oui[1] == ((QTN_OUI >> 8) & 0xff) &&
+					pe->oui[2] == ((QTN_OUI >> 16) & 0xff) &&
+					pe->type == ntohs(QTN_OUIE_TYPE_TRAINING)) {
+				/* Pass back pointer to start of training data */
+				if (rate_train)
+					*rate_train = (pe + 1);
+				return NULL;
+			}
+		}
+
+		llc += (LLC_SNAPFRAMELEN + vlan_hdr);
+		*newhdrp++ = ether_type_eh;
+	} else {
+		ether_type_eh = htons(llclen);
+		*newhdrp++ = ether_type_eh;
+		llc_l3_gap = LLC_SNAPFRAMELEN;
+	}
+
+	di->l3hdr = llc + llc_l3_gap;
+	di->l3_ether_type = ether_type_l3;
+	di->start = (void *) (llc - qtn_rx_decap_newhdr_size(di));
+
+	return di->start;
+}
+
+
+typedef int (*decap_handler_t)(struct qtn_rx_decap_info *, void *);
+
+#define QTN_RX_DECAP_AMSDU	(0)
+#define QTN_RX_DECAP_MPDU	(-1)
+#define QTN_RX_DECAP_TRAINING	(-2)
+#define QTN_RX_DECAP_NOT_DATA	(-3)
+#define QTN_RX_DECAP_RUNT	(-4)
+#define QTN_RX_DECAP_ABORTED	(-5)
+#define QTN_RX_DECAP_ERROR(x)	((x) <= QTN_RX_DECAP_NOT_DATA)
+
+#ifndef QTN_RX_DECAP_FNQUAL
+#ifdef __KERNEL__
+#define QTN_RX_DECAP_FNQUAL	static __sram_text
+#define	qtn_rx_decap_inv_dcache_safe(a,b)
+#else
+#define QTN_RX_DECAP_FNQUAL	static __inline__
+#define	qtn_rx_decap_inv_dcache_safe	invalidate_dcache_range_safe
+#endif
+#endif
+
+QTN_RX_DECAP_FNQUAL int qtn_rx_decap(const struct ieee80211_qosframe_addr4 *const wh_copy,
+		const void *const rxdata, const uint16_t rxlen,
+		uint16_t pvid, struct qtn_vlan_info *vlan_info, uint8_t vlan_enabled,
+		decap_handler_t handler, void *token, void **rate_train)
+{
+	const uint8_t *llc;
+	const uint8_t type = wh_copy->i_fc[0] & IEEE80211_FC0_TYPE_MASK;
+	const uint8_t subtype = wh_copy->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK;
+	const uint8_t dir = wh_copy->i_fc[1] & IEEE80211_FC1_DIR_MASK;
+	uint8_t qosctrl0 = 0;
+	int8_t tid;
+	bool is_amsdu = false;
+	size_t header_size;
+	int msdu;
+	struct qtn_rx_decap_info __di[2];
+	int dii	= 0;
+	uint8_t *decap_start;
+
+	/* only attempt to decap data frames */
+	if (unlikely(type != IEEE80211_FC0_TYPE_DATA ||
+				!(subtype == IEEE80211_FC0_SUBTYPE_DATA ||
+				  subtype == IEEE80211_FC0_SUBTYPE_QOS))) {
+		return QTN_RX_DECAP_NOT_DATA;
+	}
+
+	/* find qos ctrl field */
+	if (IEEE80211_QOS_HAS_SEQ(wh_copy)){
+		if (IEEE80211_IS_4ADDRESS(wh_copy)) {
+			qosctrl0 = ((struct ieee80211_qosframe_addr4 *) wh_copy)->i_qos[0];
+		} else {
+			qosctrl0 = ((struct ieee80211_qosframe *) wh_copy)->i_qos[0];
+		}
+		tid = qosctrl0 & IEEE80211_QOS_TID;
+		if (qosctrl0 & IEEE80211_QOS_A_MSDU_PRESENT) {
+			is_amsdu = true;
+		}
+	} else {
+		tid = WME_TID_NONQOS;
+	}
+
+	header_size = qtn_rx_decap_header_size(wh_copy);
+
+	if (unlikely(header_size >= rxlen)) {
+		return QTN_RX_DECAP_RUNT;
+	}
+
+	if (!is_amsdu) {
+		const uint8_t *wh_eth_src;
+		const uint8_t *wh_eth_dest;
+		struct qtn_rx_decap_info *di = &__di[dii];
+
+		switch (dir) {
+		case IEEE80211_FC1_DIR_DSTODS:
+			wh_eth_dest = wh_copy->i_addr3;
+			wh_eth_src = wh_copy->i_addr4;
+			if (IEEE80211_ADDR_EQ(wh_copy->i_addr1, wh_copy->i_addr3))
+				di->check_3addr_br = 1;
+			break;
+		case IEEE80211_FC1_DIR_TODS:
+			wh_eth_dest = wh_copy->i_addr3;
+			wh_eth_src = wh_copy->i_addr2;
+			break;
+		case IEEE80211_FC1_DIR_NODS:
+			wh_eth_dest = wh_copy->i_addr1;
+			wh_eth_src = wh_copy->i_addr2;
+			break;
+		case IEEE80211_FC1_DIR_FROMDS:
+			wh_eth_src = wh_copy->i_addr3;
+			wh_eth_dest = wh_copy->i_addr1;
+			di->check_3addr_br = 1;
+			break;
+		default:
+			return QTN_RX_DECAP_ABORTED;
+		}
+
+		IEEE80211_ADDR_COPY(di->eh.ether_dhost, wh_eth_dest);
+		IEEE80211_ADDR_COPY(di->eh.ether_shost, wh_eth_src);
+		llc = ((uint8_t *) rxdata) + header_size;
+		decap_start = qtn_rx_decap_set_eth_hdr(di, llc, rxlen - header_size,
+							pvid, vlan_info, vlan_enabled, token, rate_train);
+		if (unlikely(!decap_start)) {
+			return QTN_RX_DECAP_TRAINING;
+		}
+
+		di->len = (((uint8_t *) rxdata) + rxlen) - decap_start;
+		di->tid = tid;
+		di->first_msdu = 1;
+		di->last_msdu = 1;
+		di->decapped = 1;
+
+		if (handler(di, token)) {
+			return QTN_RX_DECAP_ABORTED;
+		}
+
+		return QTN_RX_DECAP_MPDU;
+	} else {
+		/* amsdu */
+		struct ether_header *msdu_header;
+		struct ether_header *next_msdu_header;
+		struct qtn_rx_decap_info *prev_di = NULL;
+		uint16_t msdu_len;
+		uint16_t subframe_len;
+		uint16_t subframe_padding;
+		uint16_t total_decapped_len = header_size;
+
+		MUC_UPDATE_STATS(uc_rx_stats.rx_amsdu, 1);
+		next_msdu_header = (struct ether_header *)(((uint8_t *)rxdata) + header_size);
+		for (msdu = 0; total_decapped_len < rxlen; msdu++) {
+			struct qtn_rx_decap_info *di = &__di[dii];
+
+			msdu_header = next_msdu_header;
+			llc = (uint8_t *)(msdu_header + 1);
+			qtn_rx_decap_inv_dcache_safe(msdu_header, QTN_RX_MSDU_DCACHE_INV_LEN);
+			msdu_len = ntohs(msdu_header->ether_type);
+			subframe_len = sizeof(*msdu_header) + msdu_len;
+			if (subframe_len < sizeof(*msdu_header) ||
+					subframe_len > (rxlen - total_decapped_len) ||
+					subframe_len > (ETHER_JUMBO_MAX_LEN + LLC_SNAPFRAMELEN)) {
+				break;
+			}
+			subframe_padding = ((subframe_len + 0x3) & ~0x3) - subframe_len;
+			next_msdu_header = (struct ether_header *)(llc + msdu_len + subframe_padding);
+			/* decapped length includes subframe padding */
+			total_decapped_len = ((uint8_t *)next_msdu_header) - ((uint8_t *)rxdata);
+
+			decap_start = qtn_rx_decap_set_eth_hdr(di, llc, msdu_len, pvid, vlan_info, vlan_enabled,
+								token, rate_train);
+			if (unlikely(!decap_start)) {
+				return QTN_RX_DECAP_TRAINING;
+			}
+
+			if (prev_di) {
+				if (handler(prev_di, token)) {
+					return QTN_RX_DECAP_ABORTED;
+				}
+			}
+
+			IEEE80211_ADDR_COPY(di->eh.ether_dhost, msdu_header->ether_dhost);
+			IEEE80211_ADDR_COPY(di->eh.ether_shost, msdu_header->ether_shost);
+			di->len = ((uint8_t *)next_msdu_header - decap_start) - subframe_padding;
+			di->tid = tid;
+			di->first_msdu = (prev_di == NULL);
+			di->last_msdu = 0;
+			di->decapped = 1;
+			di->check_3addr_br = 0;
+			prev_di = di;
+			dii = !dii;
+		}
+		if (prev_di) {
+			prev_di->last_msdu = 1;
+			if (handler(prev_di, token)) {
+				return QTN_RX_DECAP_ABORTED;
+			}
+		} else {
+			return QTN_RX_DECAP_ABORTED;
+		}
+
+		return QTN_RX_DECAP_AMSDU;
+	}
+}
+
+#endif	// __QTN_DECAP_H__
+
diff --git a/quantenna/include/qtn/qtn_global.h b/quantenna/include/qtn/qtn_global.h
new file mode 100644
index 0000000..8f4852f
--- /dev/null
+++ b/quantenna/include/qtn/qtn_global.h
@@ -0,0 +1,487 @@
+/*
+ * Copyright (c) 2011-2012 Quantenna Communications, Inc.
+ * All rights reserved.
+ */
+
+#ifndef _QTN_GLOBAL_H
+#define _QTN_GLOBAL_H
+
+#define QTN_DEFAULT_LEGACY_RETRY_COUNT 4
+
+#define QTN_GLOBAL_INIT_SELECT_GI_ENABLE	2
+#define QTN_GLOBAL_INIT_SELECT_PPPC_ENABLE	1
+
+#define QTN_GLOBAL_PSEL_MATRIX_ENABLE		1
+#define QTN_GLOBAL_INIT_DEF_MATRIX		1
+
+#define QTN_AC_BE_INHERIT_VO_NO_STA		4
+#define QTN_AC_BE_INHERIT_VI_NO_STA		3
+#define QTN_AC_BE_INHERIT_VO			2
+#define QTN_AC_BE_INHERIT_VI			1
+#define QTN_AC_BE_INHERIT_DISABLE		0
+#define QTN_AC_BE_INHERIT_Q2Q_ENABLE		1
+#define QTN_AC_BE_INHERIT_Q2Q_DISABLE		0
+#define QTN_TXBF_IOT_DISABLE                    0
+#define QTN_TXBF_IOT_ENABLE                     1
+#define QTN_GLOBAL_MU_ENABLE			1
+#define QTN_GLOBAL_MU_DISABLE			0
+#define QTN_GLOBAL_MU_INITIAL_STATE		QTN_GLOBAL_MU_DISABLE
+
+#define QTN_AUTO_CS_ENABLE			1
+#define QTN_AUTO_CS_DISABLE			0
+
+/*
+ * The MuC TX Queuing algorithm is selected by setting
+ * g_tx_queuing_alg. Values are:
+ * 0 = Round robin
+ * 1 = Equal airtime
+ * 2 = Greedy best
+ * 3 = Round robin (filling to make a power of 4)
+ * x >= 4: algorithm chosen by (val % 4), with airtime
+ * debugs enabled, printed every (val) seconds.
+ */
+#define QTN_TX_QUEUING_ALG_ROUND_ROBIN		0
+#define QTN_TX_QUEUING_ALG_EQUAL_AIRTIME	1
+#define QTN_TX_QUEUING_ALG_GREEDY_BEST		2
+#define QTN_TX_QUEUING_ALGS			4
+#if QTN_TX_QUEUING_ALGS & (QTN_TX_QUEUING_ALGS - 1)
+	#error QTN_TX_QUEUING_ALGS should be a power of 2
+#endif
+#define QTN_GLOBAL_INIT_TX_QUEUING_ALG		QTN_TX_QUEUING_ALG_ROUND_ROBIN
+
+#define QTN_TX_AIRTIME_XMIT_BUMP_USECS		100
+
+#define QTN_TX_BUF_RETURN_MIN			100
+/* must be greater than the above to prevent stalling */
+#define QDRV_TX_LOW_RATE_TOKENS_MAX		QTN_TX_BUF_RETURN_MIN + 28
+
+#define QTN_GLOBAL_RATE_NSS_MAX		4
+#define QTN_2X2_GLOBAL_RATE_NSS_MAX	2
+#define QTN_3X3_GLOBAL_RATE_NSS_MAX	3
+#define QTN_RX_REORDER_BUF_TIMEOUT_US		200000
+#define QTN_RX_REORDER_BUF_TIMEOUT_US_VI	800000
+#define QTN_PROBE_RES_MAX_RETRY_COUNT	4
+#define QTN_TX_SWRETRY_AGG_MAX		8	/* high value for zero PER */
+#define QTN_TX_SWRETRY_NOAGG_MAX	1	/* add tx restrict check if this is increased */
+#define QTN_TX_SWRETRY_SUSPEND_XMIT	4	/* sw retry when the sending frames are suspended */
+#define QTN_TX_MSDU_EXPIRY		0	/* allow MSDUs to time out? */
+#define QTN_TX_AGGREGATION		1	/* allow aggregation? */
+#define QTN_CALSTATE_CALIB		1
+#define QTN_CALSTATE_PROD		3
+#define QTN_CALSTATE_DEFAULT		QTN_CALSTATE_PROD
+#define QTN_CALSTATE_IS_PROD()		(likely(g_qtn_params.g_calstate == QTN_CALSTATE_PROD))
+#define QTN_CALSTATE_VPD_LOG		0
+#define QTN_CALSTATE_VPD_LINEAR		1
+#define QTN_CALSTATE_MIN_TX_POWER	7
+#define QTN_CALSTATE_MAX_TX_POWER	23
+#define QTN_EMI_POWER_SWITCH_ENABLE	1
+
+#define QTN_TX_AMSDU_DISABLED		0
+#define QTN_TX_AMSDU_ADAPTIVE		1
+#define QTN_TX_AMSDU_FIXED		0xff
+
+#define QTN_SEL_PPPC_STEP_DEF		1
+#define QTN_SEL_PPPC_MAX_STEPS		4
+
+#define QTN_TX_AUC_DEFAULT		1
+
+#define QTN_INST_1SS_DEF_MAT_THRESH_DEFAULT	2	/* dbm */
+
+#define QTN_FLAG_ACT_FRAME_RTS_CTS		0x00000001
+#define QTN_FLAG_ACT_FRAME_NO_LDPC		0x00000002
+#define QTN_FLAG_MCS_UEQM_DISABLE		0x00000004
+#define QTN_FLAG_AUC_TX				0x00000008
+#define QTN_FLAG_RA_BW_SWITCHING_ENABLE_11N	0x00000010
+#define QTN_FLAG_RA_BW_SWITCHING_ENABLE_11AC	0x00000020
+#define QTN_GLOBAL_MUC_FLAGS_DEFAULT		QTN_FLAG_RA_BW_SWITCHING_ENABLE_11N | \
+						QTN_FLAG_RA_BW_SWITCHING_ENABLE_11AC
+#define QTN_NDPA_IN_HT_VHT_FORMAT	0
+#define QTN_NDPA_IN_LEGACY_FORMAT	1
+
+#define QTN_DBG_MODE_SEND_PWR_MGT		0x00000001
+#define QTN_DBG_MODE_ACCEPT_PWR_MGT		0x00000002
+#define QTN_DBG_MODE_TX_PKT_LOSS		0x00000004
+#define QTN_DBG_MODE_DELBA_ON_TX_PKT_LOSS	0x00000008
+#define QTN_DBG_MODE_CCA_FORCE			0x00000010
+#define QTN_DBG_MODE_INJECT_INV_NDP		0x00000020
+
+#define QTN_DBG_FD_CHECK_PERIODIC	0x00000001
+#define QTN_DBG_FD_DUMP_OLD		0x00000002
+#define QTN_DBG_FD_CHECK_ONESHOT	0x00000004
+#define QTN_DBG_FD_DUMP_BCN_FAIL	0x00000008
+#define QTN_DBG_FD_DUMP_VERBOSE	0x00000010 /* + top byte is the FD to dump */
+#define QTN_DBG_DUMP_SC		0x00000020
+#define QTN_DBG_DUMP_AGEQ		0x00000040
+#define QTN_DBG_FD_FLAG_MASK		0x0000FFFF
+
+#define QTN_HW_UPDATE_NDPA_DUR  0x0
+#define	QTN_SU_TXBF_TX_CNT_DEF_THRSHLD 2
+#define QTN_MU_TXBF_TX_CNT_DEF_THRSHLD 2
+
+#define QTN_RX_BAR_SYNC_DISABLE	0
+#define QTN_RX_BAR_SYNC_QTN	1
+#define QTN_RX_BAR_SYNC_ALL	2
+
+#if (defined(MUC_BUILD) || defined(SYSTEM_BUILD))
+
+#define QTN_RX_GAIN_MIN_THRESHOLD		16
+#define QTN_RX_GAIN_MAX_THRESHOLD		44
+#define QTN_RX_GAIN_TIMER_INTV			1000 /* msecs */
+/* counter for delay in RFIC6 500Mhz */
+#define QTN_RFIC6_DELAY_MICRO_S			500
+#define QTN_RFIC6_DELAY_MILI_S			QTN_RFIC6_DELAY_MICRO_S * 1000
+
+#define SIZE_D1(x)	(sizeof(x)/sizeof(x[0]))
+#define SIZE_D2(x)	(sizeof(x[0])/sizeof(x[0][0]))
+
+struct qtn_gain_settings {
+	uint8_t	gain_flags;
+/* Enable SW workaround for short range association */
+#define QTN_AUTO_PWR_ADJUST_EN		0x1
+/* Hardware supports automatic RX gain */
+#define QTN_SHORTRANGE_SCANCNT_HW	0x2
+	uint32_t	gain_cumulative; /* Cumulative gain for all rx pkts */
+	uint32_t	gain_num_pkts;	 /* Number of pkts for which cumulative gain was considered */
+	uint32_t	gain_timer;
+	uint32_t	gain_min_thresh;
+	uint32_t	gain_max_thresh;
+	uint32_t	gain_timer_intv;
+	uint32_t	gain_low_txpow;
+	int		ext_lna_gain;
+	int		ext_lna_bypass_gain;
+};
+
+#define QTN_SCS_MAX_OC_STATS	32
+/* off channel params */
+struct qtn_scs_oc_stats {
+	uint32_t	oc_pri_chan;
+	uint32_t	oc_bw_sel;
+	uint32_t	oc_crc_cnt;
+	uint32_t	oc_lp_cnt;
+	uint32_t	oc_sp_cnt;
+	uint32_t	oc_cca_pri;
+	uint32_t	oc_cca_sec;
+	uint32_t	oc_cca_sec40;
+	uint32_t	oc_cca_busy;
+	uint32_t	oc_cca_smpl;
+	uint32_t	oc_cca_try;
+	uint32_t	oc_bcn_recvd;
+};
+
+struct qtn_cca_counts {
+	uint32_t	cca_pri_cnt;
+	uint32_t	cca_sec_cnt;
+	uint32_t	cca_sec40_cnt;
+	uint32_t	cca_busy_cnt;
+	uint32_t	cca_sample_cnt;
+	uint32_t	cca_try_cnt;
+	uint32_t	cca_csw_cnt;
+	uint32_t	cca_off_pri_cnt;
+	uint32_t	cca_off_sec_cnt;
+	uint32_t	cca_off_sec40_cnt;
+	uint32_t	cca_off_busy_cnt;
+	uint32_t	cca_off_sample_cnt;
+	uint32_t	cca_off_res_cnt;
+	uint32_t	cca_off_try_cnt;
+	uint32_t	cca_meas_cnt;
+};
+
+struct qtn_cca_stats {
+	uint32_t	cca_sample_period;
+	uint32_t	cca_pri_cnt;
+	uint32_t	cca_sec_cnt;
+	uint32_t	cca_sec40_cnt;
+	uint32_t	cca_sample_cnt;
+	uint32_t	cca_try_cnt;
+	uint32_t	cca_csw_cnt;
+	uint32_t	cca_off_try_cnt;
+	uint32_t	cca_meas_cnt;
+	uint32_t	cca_busy_cnt;
+	uint32_t	cca_idle_cnt;
+	uint32_t	cca_tx_cnt;
+	uint32_t	rx_time_cnt;
+	uint32_t	tx_time_cnt;
+	uint32_t	cca_pri;
+	uint32_t	cca_sec;
+	uint32_t	cca_sec40;
+	uint32_t	cca_busy;
+	uint32_t	cca_fat;
+	uint32_t	cca_intf;
+	uint32_t	cca_trfc;
+};
+
+struct qtn_scs_params {
+	uint32_t	cca_pri_cnt;
+	uint32_t	cca_sec_cnt;
+	uint32_t	cca_sec40_cnt;
+	uint32_t	cca_busy_cnt;
+	uint32_t	cca_sample_cnt;
+	uint32_t	cca_try_cnt;
+	uint32_t	cca_csw_cnt;
+	uint32_t	cca_off_res_cnt;
+	uint32_t	cca_off_try_cnt;
+	uint32_t	cca_meas_cnt;
+	uint32_t	tx_usecs;
+	uint32_t	rx_usecs;
+	uint32_t	bcn_recvd;
+	uint32_t	oc_stats_index;
+	struct qtn_scs_oc_stats oc_stats[QTN_SCS_MAX_OC_STATS];
+};
+
+struct qtn_vsp_params {
+	uint32_t	vsp_flags;
+#define QTN_VSP_VSP_EN		0x01
+#define QTN_VSP_FAT_DEBUG	0x02
+#define QTN_VSP_NDCST_DEBUG	0x04
+#define QTN_VSP_INTF_DEBUG	0x08
+#define QTN_VSP_RTS_CTS_IN_USE	0x10
+	uint32_t	timer_intv;
+	uint32_t	check_secs;
+	uint32_t	check_scale;
+	uint32_t	fat_last;
+	uint32_t	intf_ms;
+	uint32_t	cca_pri_cnt;
+	uint32_t	cca_sec_cnt;
+	uint32_t	cca_sec40_cnt;
+	uint32_t	cca_busy_cnt;
+	uint32_t	cca_sample_cnt;
+	uint32_t	cca_try_cnt;
+	uint32_t	cca_csw_cnt;
+	uint32_t	cca_off_res_cnt;
+	uint32_t	cca_off_try_cnt;
+	uint32_t	cca_meas_cnt;
+	uint32_t	tot_tx_ms;
+};
+
+
+#define QTN_AUTO_CCA_SHORT_PREAMBLE_THRESHOLD	15000	/* If higher than this value, increase the CCA threshold */
+#define QTN_AUTO_CCA_INTF_THRESHOLD		250	/* If higher than this value, increase the CCA threshold */
+
+#define QTN_AUTO_CCA_THRESHOLD_MAX		0x10000	/* The max cca threshold we can set */
+
+
+struct qtn_auto_cca_params {
+#define QTN_AUTO_CCA_FLAGS_DISABLE			0x0
+#define QTN_AUTO_CCA_FLAGS_ENABLE			0x1
+#define QTN_AUTO_CCA_FLAGS_DEBUG			0x2
+#define QTN_AUTO_CCA_FLAGS_SAMPLE_ONLY			0x4
+	uint32_t	flags;
+
+	uint32_t	spre_threshold;
+	uint32_t	cca_intf_threshold;
+	uint32_t	cca_threshold_max;
+};
+
+struct qtn_wowlan_params {
+	uint16_t	host_state;
+	uint16_t	wowlan_match;
+	uint16_t	l2_ether_type;
+	uint16_t	l3_udp_port;
+};
+
+#define QTN_AUTO_CCA_PARARMS_DEFAULT		\
+	{ QTN_AUTO_CCA_FLAGS_ENABLE, QTN_AUTO_CCA_SHORT_PREAMBLE_THRESHOLD, \
+		QTN_AUTO_CCA_INTF_THRESHOLD, QTN_AUTO_CCA_THRESHOLD_MAX}
+
+struct qtn_global_param {
+	uint32_t	g_legacy_retry_count;
+	uint32_t	g_dbg_check_flags;
+	uint32_t	g_dbg_stop_flags;
+	uint32_t	g_dbg_mode_flags;
+	uint8_t		g_select_gi_enable;
+	uint8_t		g_select_pppc_enable;
+	uint8_t		g_rate_ht_nss_max;
+	uint8_t		g_rate_vht_nss_max;
+	uint32_t	g_rx_agg_timeout;
+	uint32_t	g_muc_flags;
+	uint32_t	g_probe_res_retries;
+	struct qtn_scs_params scs_params;
+	struct qtn_vsp_params vsp_params;
+	uint8_t		g_slow_eth_war;
+	uint8_t		g_tx_swretry_agg_max;
+	uint8_t		g_tx_swretry_noagg_max;
+	uint8_t		g_tx_swretry_suspend_xmit;
+	uint8_t		g_tx_msdu_expiry;
+	uint8_t		g_tx_aggregation;
+	uint32_t	g_iot_tweaks;
+	uint8_t		g_calstate;
+	uint8_t		g_psel_mat_enable;
+	uint32_t	g_ack_policy;
+	uint32_t	g_dbg_fd_flags;
+	uint32_t	g_qtn_disassoc_fd_threshold;
+	uint32_t	g_qtn_qn_fd_threshold;
+	int32_t         g_2_tx_chains_mimo_mode;
+	uint8_t		g_calstate_tx_power;
+	uint8_t		g_min_tx_power;
+	uint8_t		g_max_tx_power;
+	uint8_t		g_emi_power_switch_enable;
+	uint8_t		g_dyn_agg_timeout;
+	int32_t		g_sifs_mode;
+	uint8_t		g_tx_amsdu;
+	uint32_t	g_ralg_dbg_aid;
+	uint8_t		g_select_pppc_step_option;
+	uint8_t         g_11g_erp;
+	uint8_t		g_single_agg_queuing;
+	uint8_t		g_def_matrix;
+	uint32_t	g_tx_restrict;
+	uint32_t	g_tx_restrict_fd_limit;
+	uint32_t	g_tx_restrict_rate;	/* Max packets per second in Tx restrict mode */
+	uint32_t	g_tx_restrict_attempts;
+	uint32_t        g_rts_threshold;        /* RTS threshold */
+	uint8_t		g_tx_queuing_alg;
+	uint8_t         g_1bit_enable;          /* enable/disable 1bit */
+	uint32_t        g_carrier_id;		/* Get/Set carrier ID */
+	uint8_t		g_rx_accelerate;
+	uint8_t		g_rx_accel_lu_sa;
+	uint8_t		g_tx_auc;
+	uint8_t		g_tx_ac_inheritance;	/* promote AC_BE traffic to vo/vi */
+	uint8_t         g_txbf_iot;             /* turn on/off TxBF IOT with non QTN node */
+	uint8_t		g_tx_ac_q2q_inheritance;/* promote AC_BE traffic to vo/vi */
+	uint8_t		g_tx_1ss_amsdu_supp;	/* enable-disable 1ss AMSDU support - Non-qtn clients */
+	uint32_t        g_vht_ndpa_dur;         /* manual update VHT NDPA duration, if it is 0, then HW auto update */
+	uint32_t        g_su_txbf_pkt_cnt;      /* Tx operation count threshold to a SU TxBF station */
+	uint32_t        g_mu_txbf_pkt_cnt;      /* Tx operation count threshold to a MU TxBF station */
+	struct qtn_auto_cca_params	g_auto_cca_params;
+	struct qtn_wowlan_params wowlan_params;
+	uint8_t		g_rx_optim;
+	uint8_t		g_airfair;
+	uint8_t		g_cca_fixed;
+	uint8_t		g_ndpa_legacy_format;	/* Configure HT-VHT / Legacy frame format for NDP announcements */
+	uint8_t		g_inst_1ss_def_mat_en;		/* enable default 1ss matrix feature */
+	uint8_t		g_inst_1ss_def_mat_thresh;	/* the threshold to install defalut 1ss matrix */
+	uint32_t        g_mu_enable;            /* enable/disable MU Tx */
+	uint8_t		g_l2_ext_filter;	/* L2 external filter */
+	uint8_t		g_l2_ext_filter_port;	/* L2 external filter port */
+	uint8_t		g_rate_train_dbg;
+	uint8_t		g_rx_optim_pkt_stats;
+	uint8_t		g_mrc_enable;
+	uint32_t	g_auto_cs_enable;	/* enable/disable auto cs threshold */
+	uint8_t		g_beaconing_scheme;
+	uint32_t	g_muc_sys_dbg;
+	uint32_t	g_rx_bar_sync;		/* sync rx reorder window on receiving BAR */
+	char		*g_last_field;		/* Add all new fields before this one */
+};
+
+/* Please keep this structure in sync with qtn_global_param */
+#define G_PARAMS_INIT	{			\
+	QTN_DEFAULT_LEGACY_RETRY_COUNT,		\
+	0,					\
+	0,					\
+	0,					\
+	QTN_GLOBAL_INIT_SELECT_GI_ENABLE,	\
+	QTN_GLOBAL_INIT_SELECT_PPPC_ENABLE,	\
+	QTN_GLOBAL_RATE_NSS_MAX,		\
+	QTN_GLOBAL_RATE_NSS_MAX,		\
+	QTN_RX_REORDER_BUF_TIMEOUT_US,		\
+	QTN_GLOBAL_MUC_FLAGS_DEFAULT,		\
+	QTN_PROBE_RES_MAX_RETRY_COUNT,		\
+	{0,},					\
+	{0,},					\
+	0,					\
+	QTN_TX_SWRETRY_AGG_MAX,			\
+	QTN_TX_SWRETRY_NOAGG_MAX,		\
+	QTN_TX_SWRETRY_SUSPEND_XMIT,		\
+	QTN_TX_MSDU_EXPIRY,			\
+	QTN_TX_AGGREGATION,			\
+	QTN_IOT_DEFAULT_TWEAK,			\
+	QTN_CALSTATE_DEFAULT,			\
+	QTN_GLOBAL_PSEL_MATRIX_ENABLE,		\
+	1,					\
+	0,					\
+	50,					\
+	64,					\
+	1,					\
+	QTN_CALSTATE_VPD_LOG,			\
+	QTN_CALSTATE_MIN_TX_POWER,		\
+	QTN_CALSTATE_MAX_TX_POWER,		\
+	QTN_EMI_POWER_SWITCH_ENABLE,		\
+	0,					\
+	2,					\
+	QTN_TX_AMSDU_ADAPTIVE,			\
+	0,					\
+	QTN_SEL_PPPC_STEP_DEF,			\
+	0,					\
+	0,					\
+	QTN_GLOBAL_INIT_DEF_MATRIX,		\
+	1,					\
+	IEEE80211_NODE_TX_RESTRICT_LIMIT,	\
+	IEEE80211_TX_RESTRICT_RATE,		\
+	IEEE80211_NODE_TX_RESTRICT_RETRY,	\
+	IEEE80211_RTS_THRESH_OFF,		\
+	QTN_GLOBAL_INIT_TX_QUEUING_ALG,		\
+	1,					\
+	0,					\
+	1,					\
+	1,					\
+	QTN_TX_AUC_DEFAULT,			\
+	QTN_AC_BE_INHERIT_VO,			\
+	QTN_TXBF_IOT_ENABLE,			\
+	QTN_AC_BE_INHERIT_Q2Q_ENABLE,		\
+	QTN_TX_AMSDU_DISABLED,			\
+	QTN_HW_UPDATE_NDPA_DUR,			\
+	QTN_SU_TXBF_TX_CNT_DEF_THRSHLD,	        \
+	QTN_MU_TXBF_TX_CNT_DEF_THRSHLD,	        \
+	QTN_AUTO_CCA_PARARMS_DEFAULT,		\
+	{0, 0, 0x0842, 0xffff},			\
+	0,					\
+	QTN_AUC_AIRFAIR_DFT,			\
+	0,					\
+	QTN_NDPA_IN_LEGACY_FORMAT,		\
+	1,					\
+	QTN_INST_1SS_DEF_MAT_THRESH_DEFAULT,	\
+	QTN_GLOBAL_MU_INITIAL_STATE,		\
+	0,					\
+	TOPAZ_TQE_EMAC_0_PORT,			\
+	0,					\
+	0,					\
+	1,					\
+	QTN_AUTO_CS_ENABLE,			\
+	0,					\
+	0,					\
+	QTN_RX_BAR_SYNC_QTN,			\
+	"end"					\
+}
+
+extern struct qtn_global_param g_qtn_params;
+extern volatile __uncached__ struct qtn_gain_settings g_gain;
+extern struct qtn_cca_counts g_cca_counts;
+extern struct qtn_cca_stats g_qtn_cca_stats;
+extern uint32_t g_qtn_rxtime_usecs;
+extern uint32_t g_qtn_txtime_usecs;
+extern uint8_t g_rf_mixer_gain;
+extern uint8_t g_afe_pga_gain; 
+extern uint32_t g_rf_xmit_status;
+extern int vlan_enabled_bus;
+
+#endif	/* defined(MUC_BUILD) */
+
+/*
+ * SKBs on the power save queue are tagged with an age and timed out.  We reuse the
+ * hardware checksum field in the mbuf packet header to store this data.
+ */
+#define skb_age csum_offset
+
+#define M_AGE_SET(skb,v)	(skb->skb_age = v)
+#define M_AGE_GET(skb)		(skb->skb_age)
+#define M_AGE_SUB(skb,adj)	(skb->skb_age -= adj)
+
+#define QTN_2G_FIRST_OPERATING_CHAN 1
+#define QTN_2G_LAST_OPERATING_CHAN  14
+#define QTN_5G_FIRST_OPERATING_CHAN 36
+#define QTN_5G_LAST_UNII1_OPERATING_CHAN 48
+#define QTN_5G_LAST_UNII2_OPERATING_CHAN 140
+#define QTN_5G_LAST_OPERATING_CHAN  169
+
+/* RFIC chip ID */
+#define RFIC5_EAGLE_PROJ_ID (2)
+#define RFIC6_PROJ_ID (3)
+
+/* MU-MIMO WMAC index */
+enum {
+	WMAC_ID_0	= 0,
+	WMAC_ID_1	= 1,
+	WMAC_ID_MAX
+};
+
+#endif	/* _QTN_GLOBAL_MUC_H */
+
diff --git a/quantenna/include/qtn/qtn_math.h b/quantenna/include/qtn/qtn_math.h
new file mode 100644
index 0000000..14630d1
--- /dev/null
+++ b/quantenna/include/qtn/qtn_math.h
@@ -0,0 +1,57 @@
+/*SH0
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2008 - 2008 Quantenna Communications Inc            **
+**                            All Rights Reserved                            **
+**                                                                           **
+**  Author      : Quantenna                                                  **
+**  Date        : 12/04/08                                                   **
+**  File        : qdrv_math.c                                                **
+**  Description :                                                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH0*/
+#ifndef _QDRV_MATH_H
+#define _QDRV_MATH_H
+
+#ifndef ABS
+#define ABS(x) (((x) > 0) ? (x) : 0 -(x))
+#endif
+
+void convert_evm_db(u_int32_t evm_reg, int n_sym, int *evm_int, int *evm_frac);
+void average_evm_db(const uint32_t *evm_array, int n_sym, int *evm_int, int *evm_frac);
+
+#endif
diff --git a/quantenna/include/qtn/qtn_math.inl b/quantenna/include/qtn/qtn_math.inl
new file mode 100644
index 0000000..2fd8ea5
--- /dev/null
+++ b/quantenna/include/qtn/qtn_math.inl
@@ -0,0 +1,455 @@
+/*SH0
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2008 - 2008 Quantenna Communications Inc            **
+**                            All Rights Reserved                            **
+**                                                                           **
+**  Author      : Quantenna                                                  **
+**  Date        : 12/04/08                                                   **
+**  File        : qdrv_math.c                                                **
+**  Description :                                                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH0*/
+
+#include <qtn/qtn_math.h>
+#include <qtn/muc_phy_stats.h>
+
+#ifndef MAX
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#endif
+#ifndef MIN
+#define MIN(a, b) (((a) > (b)) ? (b) : (a))
+#endif
+
+#define NUM_VALID_ONE_STREAM 1
+#define NUM_VALID_TWO_STREAM 2
+#define NUM_VALID_THREE_STREAM 3
+#define NUM_VALID_FOUR_STREAM 4
+
+#define NUM_BITS_FOR_FRACTION 4
+#define NUM_BITS_EVM_MANT_ONE 2048
+#define NUM_BITS_EVM_MANT_SHIFT 12
+#define NUM_BITS_EVM_EXP_SHIFT 16
+#define NUM_BITS_GUARD_TINY_SHIFT 7
+
+static const u_int16_t lut_1024_10log10[] = {
+	#include "./log_table/1024_10log10_table.txt"
+};
+
+u_int8_t highest_one_bit_pos(u_int32_t val)
+{
+	u_int32_t shift;
+	u_int32_t pos = 0;
+
+	if (val == 0) return 0;
+
+	shift = (val & 0xFFFF0000) ? 16 : 0; val >>= shift; pos |= shift;
+	shift = (val & 0xFF00    ) ?  8 : 0; val >>= shift; pos |= shift;
+	shift = (val & 0xF0      ) ?  4 : 0; val >>= shift; pos |= shift;
+	shift = (val & 0xC       ) ?  2 : 0; val >>= shift; pos |= shift;
+	shift = (val & 0x2       ) ?  1 : 0;                pos |= shift;
+	pos++;
+	return (u_int8_t) pos;
+}
+
+u_int32_t rshift_round(u_int32_t x, int shift)
+{
+	u_int32_t z;
+		
+	if (shift == 0)
+		return x;
+
+	z = x >> (shift - 1);
+	z += (z & 1);
+	z >>= 1;
+	return z;
+}
+
+int linear_to_10log10(u_int32_t x, int8_t nbit_frac_in, int8_t nbit_frac_out)
+{
+	u_int8_t shift;
+
+	if (x <= 0)
+		return (int)0x80000001;  // 10*log10(0) = -infinity
+
+	shift = MAX(highest_one_bit_pos(x) - 8, 0);
+
+	//printk("shift = %d , x = %d, lut_1024_10log10[(x >> shift) - 1] = %d \n\n", shift, x, lut_1024_10log10[(x >> shift) - 1]);
+
+	// y = round((1024*10*log10(x/2^shift) + (shift-nbit_frac_in)*1024*10*log10(2)) / 2^(10-nbit_frac_out))
+	// 49321 = round(16*1024*10*log10(2))
+	return rshift_round((int)(lut_1024_10log10[(x >> shift) - 1] + (((shift - nbit_frac_in) * 49321) >> 4)), 10 - nbit_frac_out) ;
+}
+
+int divide_by_16_x_10000(int x)
+{
+	return (x * 625); //10000/16
+};
+
+
+u_int16_t conv_linear_mantissa(long val, short se)
+{
+	u_int16_t evm_out;
+	short     sht_count;
+	long shift_mask;
+
+	if (val == 0) return 0;
+
+	if (se < 1 || se > 32)
+		return 0; // se is in [1:32]
+
+	shift_mask = 0x000007FF; // MSB mask for 2048
+
+	if (se > NUM_BITS_EVM_MANT_SHIFT ) {
+		sht_count = se - NUM_BITS_EVM_MANT_SHIFT  ;
+		shift_mask = shift_mask << sht_count;
+		evm_out = (u_int16_t) (val & shift_mask) >> sht_count;
+	} else {
+		sht_count = NUM_BITS_EVM_MANT_SHIFT  - se ;
+		shift_mask = shift_mask >> sht_count;
+		evm_out = (u_int16_t) (val & shift_mask) << sht_count;
+	}
+
+	return  (evm_out);
+}
+
+void average_evm_db(const uint32_t *evm_array, int n_sym, int *evm_int, int *evm_frac)
+{
+	int  man[4], exp[4], evm_exp_val[4];
+	int  y, x, evm_4bit_fraction, fraction, db_sign = 0;
+	int  k, valid_evm_cnt = 0, min_exp_val =0, guard_bit_shift = 0;
+	int  evm_exp_sum=0, evm_exp_mul=0, evm_mant_sum=0, evm_mant_mul=0;
+	long evm_tmp_sum=0, evm_tmp_mul=0, linear_evm_val[4] ={0,0,0,0};
+
+	if (n_sym < 3)
+		return;
+
+	for ( k = 0; k < 4; k++) {
+		if (evm_array[k] != MUC_PHY_ERR_SUM_NOT_AVAIL) {// invalid EVM values
+
+			valid_evm_cnt++;
+			man[k] = (u_int32_t)(evm_array[k] >> 5);
+			exp[k] = (evm_array[k] - man[k] * 32);
+			man[k] += NUM_BITS_EVM_MANT_ONE;
+
+			if ( exp[k] > NUM_BITS_EVM_EXP_SHIFT )
+				linear_evm_val[k] =  (man[k]) << (exp[k] - NUM_BITS_EVM_EXP_SHIFT );
+			else
+				linear_evm_val[k] = (man[k]) >> (NUM_BITS_EVM_EXP_SHIFT - exp[k]);
+
+			exp[k] = exp[k] - NUM_BITS_EVM_EXP_SHIFT;
+
+			//printk("reg=%x, man = %d, exp = %d, n_sym=%d\n", evm_array[k], man[k], exp[k], n_sym);
+		}
+	}
+
+	if ( valid_evm_cnt == NUM_VALID_ONE_STREAM ) { // only one stream
+		y = linear_to_10log10((man[0]), 0, NUM_BITS_FOR_FRACTION)  +
+			((exp[0] - 11) * linear_to_10log10(2, 0, NUM_BITS_FOR_FRACTION)) ;
+	} else {
+
+		switch (valid_evm_cnt) {
+
+			case NUM_VALID_TWO_STREAM: //log(b+a) - log(a*b)
+				// get log(a + b)
+				evm_mant_sum = (long) (linear_evm_val[0]);
+				evm_mant_sum += (long) (linear_evm_val[1]);
+				evm_exp_sum = (int) highest_one_bit_pos(evm_mant_sum );
+				evm_mant_sum = conv_linear_mantissa(evm_mant_sum, evm_exp_sum);
+				evm_exp_sum -= NUM_BITS_EVM_MANT_SHIFT ;
+				// get log(a*b)
+				evm_tmp_mul = (long) (man[0]*man[1]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+
+				evm_exp_mul = (int) highest_one_bit_pos( evm_mant_mul );
+				evm_mant_mul = conv_linear_mantissa(evm_mant_mul, evm_exp_mul);
+				evm_exp_mul =  (1) + (evm_exp_mul - NUM_BITS_EVM_MANT_SHIFT );  // 1 time shift 12 bits
+				evm_exp_mul += (exp[0]+exp[1]);
+
+				break;
+
+			case NUM_VALID_THREE_STREAM: // log(bc+ab+ac) -log(abc)
+				// get 3 terms product: bc
+				evm_tmp_mul = (long) (man[1]*man[2]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+				evm_exp_val[0] = 1+(exp[1]+exp[2]);
+
+				min_exp_val = MIN(evm_exp_val[0], min_exp_val);
+				linear_evm_val[0] = (evm_mant_mul);
+
+				// get 3 terms product: ac
+				evm_tmp_mul = (long) (man[0]*man[2]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+				evm_exp_val[1] = 1+(exp[0]+exp[2]);
+
+				min_exp_val = MIN(evm_exp_val[1], min_exp_val);
+				linear_evm_val[1] = (evm_mant_mul);
+
+				// get 3 terms product: ab
+				evm_tmp_mul = (long) (man[0]*man[1]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+				evm_exp_val[2] = 1+(exp[0]+exp[1]);
+
+				min_exp_val = MIN(evm_exp_val[2], min_exp_val);
+				linear_evm_val[2] = (evm_mant_mul);
+
+				// check the tiny input cases
+				guard_bit_shift = min_exp_val + NUM_BITS_EVM_MANT_SHIFT;
+
+				if ( guard_bit_shift < NUM_BITS_GUARD_TINY_SHIFT )
+				       // min 7 bits for log table
+				       guard_bit_shift  = (-min_exp_val - NUM_BITS_EVM_MANT_SHIFT) + NUM_BITS_GUARD_TINY_SHIFT;
+				else   guard_bit_shift = 0;
+
+				// left-shift up to bit 30
+				guard_bit_shift = MIN(guard_bit_shift, (30-NUM_BITS_EVM_MANT_SHIFT));
+
+				for ( k = 0; k < valid_evm_cnt ; k++) {
+				  linear_evm_val[k] = (long)(linear_evm_val[k]) << guard_bit_shift;
+				  if ( evm_exp_val[k] >= 0 )
+				    linear_evm_val[k] <<=  (evm_exp_val[k]);
+				  else
+				    linear_evm_val[k] >>=  (-evm_exp_val[k]);
+				}
+
+
+				// get summatioon of t2 terms products: bc + ac +ab
+				evm_tmp_sum = (long) (linear_evm_val[0]);
+				evm_tmp_sum += (long) (linear_evm_val[1]);
+				evm_tmp_sum += (long) (linear_evm_val[2]);
+				evm_exp_sum = (int) highest_one_bit_pos( evm_tmp_sum );
+				evm_mant_sum = conv_linear_mantissa(evm_tmp_sum, evm_exp_sum);
+				evm_exp_sum -= (NUM_BITS_EVM_MANT_SHIFT  + guard_bit_shift);
+
+				// get 3 term products : a*b*c
+				evm_tmp_mul = (long) (man[0]*man[1]) ;
+				evm_mant_mul = (int) ( evm_tmp_mul) >> NUM_BITS_EVM_MANT_SHIFT ;
+				evm_tmp_mul = (long) (evm_mant_mul * man[2]);
+				evm_mant_mul = (int) ( evm_tmp_mul) >> NUM_BITS_EVM_MANT_SHIFT ;
+
+				evm_exp_mul = (int) highest_one_bit_pos( evm_mant_mul );
+				evm_mant_mul = conv_linear_mantissa(evm_mant_mul, evm_exp_mul);
+				evm_exp_mul =  (2) + (evm_exp_mul - NUM_BITS_EVM_MANT_SHIFT );  // 2 times shift 12 bits 
+				evm_exp_mul += (exp[0]+exp[1]+exp[2]);
+
+				break;
+
+			case NUM_VALID_FOUR_STREAM: // log(bcd+acd+abd+abc) -log(abcd)
+
+				// get 3 terms product: bcd
+				evm_tmp_mul = (long) (man[1]*man[2]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+				evm_tmp_mul = (long) evm_mant_mul * (man[3]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+
+				evm_exp_val[0] = 2+(exp[1]+exp[2]+exp[3]);
+				min_exp_val = MIN(evm_exp_val[0], min_exp_val);
+				linear_evm_val[0] = (long) (evm_mant_mul);
+
+
+				// get 3 terms product: acd
+				evm_tmp_mul = (long) (man[0]*man[2]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+				evm_tmp_mul = (long) evm_mant_mul * (man[3]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+
+				evm_exp_val[1] = 2+(exp[0]+exp[2]+exp[3]);
+				min_exp_val = MIN(evm_exp_val[1], min_exp_val);
+				linear_evm_val[1] = (long) (evm_mant_mul);
+
+				// get 3 terms product: abd
+				evm_tmp_mul = (long) (man[0]*man[1]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+				evm_tmp_mul = (long) evm_mant_mul * (man[3]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+
+				evm_exp_val[2] = 2+(exp[0]+exp[1]+exp[3]);
+				min_exp_val = MIN(evm_exp_val[2], min_exp_val);
+				linear_evm_val[2] = (long) (evm_mant_mul);
+
+				// get 3 terms product: abc
+				evm_tmp_mul = (long) (man[0]*man[1]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+				evm_tmp_mul = (long) evm_mant_mul * (man[2]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+
+				evm_exp_val[3] = 2+(exp[0]+exp[1]+exp[2]);
+				min_exp_val = MIN(evm_exp_val[3], min_exp_val);
+				linear_evm_val[3] = (long) (evm_mant_mul);
+
+				// check the tiny input cases
+				guard_bit_shift = min_exp_val + NUM_BITS_EVM_MANT_SHIFT;
+
+				if ( guard_bit_shift < NUM_BITS_GUARD_TINY_SHIFT )
+				       // min 7 bits for log table
+				       guard_bit_shift  = (-min_exp_val - NUM_BITS_EVM_MANT_SHIFT) + NUM_BITS_GUARD_TINY_SHIFT;
+				else   guard_bit_shift = 0;
+
+				// left-shift up to bit 30
+				guard_bit_shift = MIN(guard_bit_shift, (30-NUM_BITS_EVM_MANT_SHIFT));
+
+				for ( k = 0; k < valid_evm_cnt ; k++) {
+				  linear_evm_val[k] = (long)(linear_evm_val[k]) << guard_bit_shift;
+				  if ( evm_exp_val[k] >= 0 )
+				    linear_evm_val[k] <<=  (evm_exp_val[k]);
+				  else
+				    linear_evm_val[k] >>=  (-evm_exp_val[k]);
+				}
+
+
+				// summation of 3 term products : bcd+acd+abd+abc
+				evm_mant_sum  = (long) (linear_evm_val[0]);
+				evm_mant_sum += (long) (linear_evm_val[1]);
+				evm_mant_sum += (long) (linear_evm_val[2]);
+				evm_mant_sum += (long) (linear_evm_val[3]);
+
+				evm_exp_sum = (int) highest_one_bit_pos( evm_mant_sum );
+				evm_mant_sum = conv_linear_mantissa(evm_mant_sum, evm_exp_sum);
+				evm_exp_sum -= (NUM_BITS_EVM_MANT_SHIFT +  guard_bit_shift);
+
+				// get 4 terms products : a*b*c*d
+				evm_tmp_mul = (long) (man[0]*man[1]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+				evm_tmp_mul = (long) evm_mant_mul * (man[2]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+				evm_tmp_mul = (long) evm_mant_mul * (man[3]);
+				evm_mant_mul = (int) evm_tmp_mul >> NUM_BITS_EVM_MANT_SHIFT ;
+
+				evm_exp_mul = (int) highest_one_bit_pos( evm_mant_mul );
+				evm_mant_mul = conv_linear_mantissa(evm_mant_mul, evm_exp_mul);
+				evm_exp_mul =  (3) + (evm_exp_mul - NUM_BITS_EVM_MANT_SHIFT );  // 3 times shift 12 bits 
+				evm_exp_mul += (exp[0]+exp[1]+exp[2]+exp[3]);
+
+				break;
+		}
+
+		//printk("sum   = (%d, %d)\n", evm_mant_sum, evm_exp_sum);
+		//printk("prod  = (%d, %d)\n", (int) evm_mant_mul, evm_exp_mul);
+
+		y  = -linear_to_10log10((evm_mant_sum + NUM_BITS_EVM_MANT_ONE), 0, NUM_BITS_FOR_FRACTION);
+		y -=  (evm_exp_sum) * linear_to_10log10(2, 0, NUM_BITS_FOR_FRACTION);
+
+		y +=  linear_to_10log10((evm_mant_mul + NUM_BITS_EVM_MANT_ONE), 0, NUM_BITS_FOR_FRACTION);
+		y +=  (evm_exp_mul) * linear_to_10log10(2, 0, NUM_BITS_FOR_FRACTION);
+	}
+
+	x = linear_to_10log10(n_sym-3, 0, NUM_BITS_FOR_FRACTION);
+
+	evm_4bit_fraction = y - x;
+
+	// fix bug: negative dB shift error
+	if ( evm_4bit_fraction < 0 ) {
+		db_sign = 1;
+		evm_4bit_fraction = ABS(evm_4bit_fraction);
+	}
+
+	y = (evm_4bit_fraction >> NUM_BITS_FOR_FRACTION);
+	fraction = evm_4bit_fraction - (y << NUM_BITS_FOR_FRACTION);
+
+	if ( db_sign ==1 )
+		*evm_int = -y;
+	else
+		*evm_int = y;
+
+	*evm_frac = divide_by_16_x_10000(fraction);
+
+	//printk("int = %d, frac = %d\n", *evm_int, *evm_frac);
+}
+
+void convert_evm_db(u_int32_t evm_reg, int n_sym, int *evm_int, int *evm_frac)
+{
+	int man, exp, log_table_index, y, x, evm_4bit_fraction, fraction,db_sign = 0;
+
+	if (n_sym < 3)
+		return;
+
+	man = (u_int32_t)(evm_reg >> 5);
+	exp = (evm_reg - man * 32);
+
+	//printk("man = %d, exp = %d\n", man, exp);
+
+
+	log_table_index = (2048 + man) ;
+
+	y = linear_to_10log10(log_table_index, 0, NUM_BITS_FOR_FRACTION);
+	y += ((exp - 16) * linear_to_10log10(2, 0, NUM_BITS_FOR_FRACTION));
+	y -= (11 * linear_to_10log10(2, 0, NUM_BITS_FOR_FRACTION));
+	x = linear_to_10log10(n_sym-3, 0, NUM_BITS_FOR_FRACTION);
+
+	//printk("y = %d, x = %d\n", y, x);
+
+	evm_4bit_fraction = y - x;
+
+	// fix bug: negative dB shift error
+	if ( evm_4bit_fraction < 0 ) {
+		db_sign = 1;
+		evm_4bit_fraction = ABS(evm_4bit_fraction);
+	}
+
+	y = (evm_4bit_fraction >> NUM_BITS_FOR_FRACTION);
+	fraction = evm_4bit_fraction - (y << NUM_BITS_FOR_FRACTION);
+
+	if ( db_sign==1 )
+		*evm_int = -y;
+	else
+		*evm_int =  y;
+
+	*evm_frac = divide_by_16_x_10000(fraction);
+
+	//printk("int = %d, frac = %d\n", *evm_int, *evm_frac);
+}
+
+#ifdef FLOAT_SUPPORT
+inline double pow_int(int x, int y)
+{
+	unsigned int n;
+	double z;
+
+	if (y >= 0)
+		n = (unsigned int)y;
+	else
+		n = (unsigned int)(-y);
+
+	for (z = 1; ; x *= x) {
+		if ((n & 1) != 0)
+			z *= x;
+		if ((n >>= 1) == 0)
+			return (y < 0 ? 1 / z : z);
+	}
+};
+#endif //#ifdef FLOAT_SUPPORT
+
diff --git a/quantenna/include/qtn/qtn_muc_stats_print.h b/quantenna/include/qtn/qtn_muc_stats_print.h
new file mode 100644
index 0000000..cfbec57
--- /dev/null
+++ b/quantenna/include/qtn/qtn_muc_stats_print.h
@@ -0,0 +1,408 @@
+/* autogenerated */
+
+#define MUC_TX_STATS_NAMES_TABLE { \
+	"bcn_enq_failed", \
+	"tx_status_set", \
+	"pkt_from_host", \
+	"host_intr", \
+	"netbuf_alloc_failed", \
+	"mgm_before_encap", \
+	"mgm_after_encap", \
+	"pkt_before_encap", \
+	"pkt_after_encap", \
+	"pkt_push_back", \
+	"pkt_to_hw", \
+	"pkt_to_hw_deferred", \
+	"fd_absent", \
+	"fd_not_ready", \
+	"pkt_fd_available", \
+	"pkt_add_node", \
+	"pkt_add_q", \
+	"pkt_qtn_hardstart", \
+	"tx_reserved", \
+	"tx_reserve_fail", \
+	"txalert_mu_ndp_update", \
+	"txalert_mu_rpt_poll", \
+	"txalert_mu_queue_full", \
+	"txalert_mu_queue_fail", \
+	"sample_rate_mu", \
+	"sample_bw_mu", \
+	"txdone_intr", \
+	"txalert_intr", \
+	"txalert_tasklet", \
+	"txalert_bcn_update", \
+	"txalert_ndp_update", \
+	"tx_ndp_q_occupied", \
+	"tx_ndp_start", \
+	"tx_pwr", \
+	"bcn_scheme_power_save", \
+	"bcn_scheme", \
+	"tx_mcast_pwr", \
+	"tx_mcast_defer", \
+	"tx_mcast_defer_hwq", \
+	"tx_limit_drop", \
+	"fd_acquire", \
+	"fd_release", \
+	"fd_acq_fail", \
+	"fd_acq_fail_frms", \
+	"fd_acq_hal_fail", \
+	"fd_acq_hal_fail_frms", \
+	"ba_send", \
+	"ba_del", \
+	"fd_free_nodeclean", \
+	"msdu_expired", \
+	"tx_window_locked", \
+	"tx_window_failed", \
+	"tx_restrict_probe", \
+	"tx_restrict_mode", \
+	"tx_restrict_drop", \
+	"tx_restrict_delay", \
+	"tx_restrict_send", \
+	"tx_sample_pkts", \
+	"tx_sample_bytes", \
+	"tx_underflow", \
+	"tx_hal_enqueued", \
+	"txbf_mode", \
+	"psel_matrix", \
+	"sample_rate", \
+	"sample_bw", \
+	"ra_flags", \
+	"fd_balance", \
+	"invalid_delay", \
+	"halt_tx", \
+	"resume_tx", \
+	"rfctrl_on", \
+	"rfctrl_off", \
+	"go_offchan", \
+	"go_datachan", \
+	"defer_cc", \
+	"deferred_cc_done", \
+	"off_chan_sample", \
+	"off_chan_scan", \
+	"off_chan_cac", \
+	"cca_pri", \
+	"cca_sec", \
+	"cca_sec40", \
+	"cca_busy", \
+	"cca_fat", \
+	"cca_intf", \
+	"cca_trfc", \
+	"mu_prec_snd_tx", \
+	"mu_prec_snd_wait_done", \
+	"mu_grp_sel_snd_tx", \
+	"mu_grp_sel_snd_wait_done", \
+	"oc_auctx_timeout", \
+	"oc_auctx_overwrite", \
+	"oc_auctx_fail", \
+	"gi_cnt", \
+	"gi_ncidx", \
+	"gi_val", \
+	"select_state_ncidx", \
+	"select_state_val", \
+	"pppc_scale_cnt", \
+	"pppc_scale_ncidx", \
+	"pppc_scale_val", \
+	"pppc_scale_last_gput", \
+	"pppc_scale_last_gput_idx", \
+	"pppc_scale_base_cnt", \
+	"pppc_scale_base_20m", \
+	"pppc_scale_base_40m", \
+	"pppc_scale_base_80m", \
+	"pppc_scale_base_copy", \
+	"pppc_scale_overstep", \
+	"pppc_scale_rollback", \
+	"pppc_0_gput", \
+	"tx_max_power", \
+	"nc_csr_read_count", \
+	"nc_csr_write_count", \
+	"nc_csr_done_watermark", \
+	"nc_csr_watermark_count", \
+	"auc_dtim_notify", \
+	"auc_ps_notify", \
+	"tx_beacon_done", \
+	"sfs_peer_rts", \
+	"sfs_peer_rts_flags", \
+	"sfs_local_rts", \
+	"sfs_local_rts_flags", \
+	"sfs_dyn_wmm", \
+	"sfs_dyn_wmm_flags", \
+	"auc_wmm_ps_notify", \
+	"tx_wmm_ps_null_frames", \
+	"qtn_bcn_stop", \
+	"mu_grp_snd_queue_is_not_empty", \
+	"mu_prec_snd_queue_is_not_empty", \
+	"mu_group_delete", \
+	"mu_group_install", \
+	"mu_group_rate_node_updates", \
+	"mu_update_rates_mu", \
+	"mu_update_rates_su", \
+	"autocs_sample_bits", \
+	"autocs_adjust_bits", \
+	"autocs_step_size", \
+	"autocs_cs_thresh", \
+	"autocs_min_rssi", \
+	"bmps_null_tx_success", \
+	"bmps_null_tx_fail", \
+	"bmps_null_tx_timeout", \
+	"txqueue_g1q0_deadline_frozen", \
+	"auc_ipc_retry", \
+	"auc_ipc_hwm", \
+	"auc_ipc_send_delay", \
+	"auc_ipc_send_delay_hwm", \
+}
+
+#define MUC_RX_STATS_NAMES_TABLE { \
+	"rxdesc_pop_from_host", \
+	"rxdesc_get_from_queue", \
+	"rxdesc_push_to_host", \
+	"rxdesc_non_aggr_push_to_host", \
+	"rxdesc_flush_to_host", \
+	"rxdesc_reuse_push", \
+	"rxdesc_reuse_pop", \
+	"rxdesc_status_bad_dur", \
+	"rxdesc_status_bad_len", \
+	"rxdesc_slow_status", \
+	"rxdesc_fast_status", \
+	"rxdesc_status_crc_err", \
+	"rxdesc_status_cmic_err", \
+	"rxdesc_status_cmic_no_crc_err", \
+	"rxdesc_status_retry", \
+	"agg_stored", \
+	"agg_duplicate", \
+	"accel_mpdu", \
+	"accel_msdu", \
+	"accel_no_buffer", \
+	"accel_fwt_lu_timeout", \
+	"accel_mcast_send", \
+	"accel_mcast_drop", \
+	"accel_no_match", \
+	"accel_drop", \
+	"accel_err", \
+	"rate_train_chk", \
+	"rate_train_err", \
+	"rate_train_delay", \
+	"rate_train_none", \
+	"rate_train_hash_bad", \
+	"rate_train_hash_good", \
+	"agg_oldpkts", \
+	"agg_very_oldpkts", \
+	"agg_evict_in_order", \
+	"agg_evict_in_move", \
+	"agg_evict_empty", \
+	"agg_timeout", \
+	"agg_rxwin_reset", \
+	"rx_qnum_err", \
+	"rx_mgmt", \
+	"rx_ctrl", \
+	"rx_pspoll", \
+	"rx_pwr_mgmt", \
+	"rx_delba", \
+	"rx_pwr_mgmt_set", \
+	"rx_pwr_mgmt_reset", \
+	"rx_emergency", \
+	"rx_underflow", \
+	"rx_desc_underflow", \
+	"rx_desc_linkerr", \
+	"rx_notify", \
+	"rx_df_numelems", \
+	"last_recv_seq", \
+	"rx_node_not_found", \
+	"rx_non_qos_duplicate", \
+	"rx_11n_ndp", \
+	"rx_11ac_ndp", \
+	"rx_ndp_inv_slot", \
+	"rx_11n_ndp_no_capt", \
+	"rx_ndp_sw_processed", \
+	"rx_ndp_lockup", \
+	"rx_11n_bf_act", \
+	"rx_11ac_bf_act", \
+	"rx_bf_act_inv_slot", \
+	"rx_amsdu", \
+	"rx_data", \
+	"prev_rx_data", \
+	"rx_recv_qnull", \
+	"rx_recv_act", \
+	"rx_recv_bcn", \
+	"rx_recv_auth", \
+	"rx_recv_assoc_req", \
+	"rx_recv_assoc_res", \
+	"rx_recv_deauth", \
+	"rx_recv_disassoc", \
+	"rx_mcs_gt_76", \
+	"tkip_keys", \
+	"rx_tkip_mic_err", \
+	"icv_errs", \
+	"tmic_errs", \
+	"cmic_errs", \
+	"crc_errs", \
+	"ba_tx", \
+	"ba_rx", \
+	"ba_rx_fail", \
+	"sec_oflow", \
+	"str_oflow", \
+	"oflow_fixup_timeout", \
+	"rxdone_intr", \
+	"rxtypedone_intr", \
+	"ipc_a2m_intr", \
+	"tqe_intr", \
+	"tqe_in_port_lhost", \
+	"tqe_in_port_bad", \
+	"tqe_a2m_type_txfb", \
+	"tqe_a2m_type_rxpkt", \
+	"tqe_a2m_type_unknown", \
+	"tqe_reschedule_task", \
+	"tqe_desc_unowned", \
+	"bb_intr", \
+	"bb_irq_dleaf_oflow", \
+	"bb_irq_leaf_uflow", \
+	"bb_irq_leaf_ldpc_uflow", \
+	"bb_irq_tx_td_oflow_intr", \
+	"bb_irq_tx_td_uflow_intr", \
+	"bb_irq_rx_sm_wdg_intr", \
+	"bb_irq_rx_long_dur", \
+	"bb_irq_rx_11ac_timeout", \
+	"bb_irq_tx_sm_wdg_intr", \
+	"bb_irq_main_sm_wdg_intr", \
+	"bb_irq_hready_wdg_intr", \
+	"mac_irq_rx_sec_buff_oflow", \
+	"mac_irq_rx_strq_oflow", \
+	"mac_irq_rx_bb_uflow_intr", \
+	"mac_irq_rx_bb_oflow_intr", \
+	"bb_irq_hready_wdg_reset", \
+	"sreset_wdg_begin", \
+	"sreset_wdg_end", \
+	"sreset_wdg_in_place", \
+	"sreset_wdg_tx_beacon_hang", \
+	"sreset_wdg_tx_hang", \
+	"sreset_wdg_pm_corrupt", \
+	"sreset_wdg_tcm_corrupt", \
+	"sreset_wdg_rx_done", \
+	"sreset_wdg_in_place_try", \
+	"sreset_wdg_tasklet_sched_1", \
+	"sreset_wdg_tasklet_sched_2", \
+	"sreset_tasklet_sched", \
+	"sreset_tasklet_begin", \
+	"sreset_tasklet_end", \
+	"hreset_req", \
+	"sreset_begin", \
+	"sreset_end", \
+	"sreset_dma_rx_inprog", \
+	"sreset_dma_tx_inprog", \
+	"sreset_dma_rx_max_wait", \
+	"sreset_dma_tx_max_wait", \
+	"sreset_dma_tx_hang", \
+	"sreset_dma_rx_hang", \
+	"sreset_dma_rx_wait_timeout", \
+	"sreset_dma_tx_wait_timeout", \
+	"sreset_drop_not_valid", \
+	"sreset_drop_bad_addr", \
+	"rf_cmpvtune_out", \
+	"rf_cal_freq", \
+	"ac_max", \
+	"ac_min", \
+	"ac_cur", \
+	"ac_adj", \
+	"rx_gain", \
+	"rd_cache_indx", \
+	"logger_sreset_wmac1_dma_rx_inprog", \
+	"logger_sreset_wmac1_dma_tx_inprog", \
+	"logger_sreset_wmac1_dma_rx_max_wait", \
+	"logger_sreset_wmac1_dma_tx_max_wait", \
+	"logger_sreset_wmac1_dma_tx_hang", \
+	"logger_sreset_wmac1_dma_rx_hang", \
+	"logger_sreset_wmac1_dma_rx_wait_timeout", \
+	"logger_sreset_wmac1_dma_tx_wait_timeout", \
+	"mu_rx_pkt", \
+	"pduty_sleep", \
+	"pduty_rxoff", \
+	"pduty_period", \
+	"pduty_pct", \
+	"soft_ring_push_to_tqe", \
+	"soft_ring_empty", \
+	"soft_ring_not_empty", \
+	"soft_ring_add_force", \
+	"soft_ring_add_to_head", \
+	"soft_ring_add_continue", \
+	"soft_ring_free_pool_empty", \
+	"mimo_ps_mode_switch", \
+	"rx_vlan_drop", \
+	"auto_cca_state", \
+	"auto_cca_th", \
+	"auto_cca_spre", \
+	"auto_cca_intf", \
+	"total_dmem_alloc", \
+	"total_dram_alloc", \
+	"dmem_alloc_fails", \
+	"dram_alloc_fails", \
+	"total_dmem_free", \
+	"total_dram_free", \
+	"rx_bw_80", \
+	"rx_bw_40", \
+	"rx_bw_20", \
+	"rx_wmm_ps_trigger", \
+	"rx_wmm_ps_set", \
+	"rx_wmm_ps_reset", \
+	"rx_intr_next_ptr_0", \
+	"rx_hbm_pool_depleted", \
+	"rxq_intr[0]", \
+	"rxq_intr[1]", \
+	"rxq_intr[2]", \
+	"rxq_fill[0]", \
+	"rxq_fill[1]", \
+	"rxq_fill[2]", \
+	"rxq_nobuf[0]", \
+	"rxq_nobuf[1]", \
+	"rxq_nobuf[2]", \
+	"rxq_stop[0]", \
+	"rxq_stop[1]", \
+	"rxq_stop[2]", \
+	"rxq_pkt[0]", \
+	"rxq_pkt[1]", \
+	"rxq_pkt[2]", \
+	"rxq_bad_status[0]", \
+	"rxq_bad_status[1]", \
+	"rxq_bad_status[2]", \
+	"rxq_pkt_oversize[0]", \
+	"rxq_pkt_oversize[1]", \
+	"rxq_pkt_oversize[2]", \
+	"rxq_pkt_delivered[0]", \
+	"rxq_pkt_delivered[1]", \
+	"rxq_pkt_delivered[2]", \
+	"rxq_status_hole_chk_num[0]", \
+	"rxq_status_hole_chk_num[1]", \
+	"rxq_status_hole_chk_num[2]", \
+	"rxq_status_hole_chk_step_sum[0]", \
+	"rxq_status_hole_chk_step_sum[1]", \
+	"rxq_status_hole_chk_step_sum[2]", \
+	"rxq_status_hole_chk_step_max[0]", \
+	"rxq_status_hole_chk_step_max[1]", \
+	"rxq_status_hole_chk_step_max[2]", \
+	"rxq_status_hole[0]", \
+	"rxq_status_hole[1]", \
+	"rxq_status_hole[2]", \
+	"rxq_status_hole_max_size[0]", \
+	"rxq_status_hole_max_size[1]", \
+	"rxq_status_hole_max_size[2]", \
+	"rxq_process_max[0]", \
+	"rxq_process_max[1]", \
+	"rxq_process_max[2]", \
+	"rxq_process_sum[0]", \
+	"rxq_process_sum[1]", \
+	"rxq_process_sum[2]", \
+	"rxq_process_num[0]", \
+	"rxq_process_num[1]", \
+	"rxq_process_num[2]", \
+	"rxq_process_limited[0]", \
+	"rxq_process_limited[1]", \
+	"rxq_process_limited[2]", \
+	"rxq_desc_chain_empty[0]", \
+	"rxq_desc_chain_empty[1]", \
+	"rxq_desc_chain_empty[2]", \
+	"rx_data_last_seqfrag", \
+	"rx_data_last_ip_id", \
+	"rx_opmode_notify", \
+	"accel_l2_ext_filter", \
+	"accel_mc_send_l2_ext_filter", \
+	"accel_mc_drop_l2_ext_filter", \
+	"rx_frame_addressed_to_wrong_bss", \
+}
diff --git a/quantenna/include/qtn/qtn_net_packet.h b/quantenna/include/qtn/qtn_net_packet.h
new file mode 100644
index 0000000..3ebc872
--- /dev/null
+++ b/quantenna/include/qtn/qtn_net_packet.h
@@ -0,0 +1,171 @@
+#ifndef __QTN_NET_PACKET_H__
+#define __QTN_NET_PACKET_H__
+
+#include <qtn/qtn_global.h>
+
+#ifndef ETHERTYPE_ARP
+#define	ETHERTYPE_ARP	0x0806		/* ARP protocol */
+#endif
+
+#ifndef ETHERTYPE_AARP
+#define ETHERTYPE_AARP	0x80f3		/* Appletalk AARP */
+#endif
+
+#ifndef ETHERTYPE_PAE
+#define	ETHERTYPE_PAE	0x888e		/* EAPOL PAE/802.1x */
+#endif
+
+#ifndef ETHERTYPE_IP
+#define	ETHERTYPE_IP	0x0800		/* IP protocol */
+#endif
+
+#ifndef ETHERTYPE_IPV6
+#define	ETHERTYPE_IPV6	0x86DD		/* IPv6 protocol */
+#endif
+
+#ifndef ETHERTYPE_IPX
+#define ETHERTYPE_IPX	0x8137		/* IPX over DIX */
+#endif
+
+#ifndef ETHERTYPE_802A
+#define ETHERTYPE_802A	0x88B7
+#endif
+
+#ifndef ETHERTYPE_8021Q
+#define	ETHERTYPE_8021Q	0x8100          /* 802.1Q VLAN header */
+#endif
+
+#ifndef ETHERTYPE_8021AD
+#define ETHERTYPE_8021AD	0x88A8  /* 802.1AD VLAN S-TAG header */
+#endif
+
+#ifndef ETHERTYPE_WAKE_ON_LAN
+#define ETHERTYPE_WAKE_ON_LAN	0X0842
+#endif
+
+union qtn_ipv4_addr {
+	uint32_t ip32;
+	uint16_t ip16[2];
+	uint8_t ip8[4];
+};
+
+struct qtn_ipv4 {
+	uint8_t	vers_ihl;
+	uint8_t dscp;
+	uint16_t length;
+	uint16_t ident;
+	uint16_t flags:3,
+		 fragoffset:13;
+	uint8_t ttl;
+	uint8_t proto;
+	uint16_t csum;
+	union qtn_ipv4_addr srcip;
+	union qtn_ipv4_addr dstip;
+	uint32_t opt[0];
+};
+
+union qtn_ipv6_addr {
+	uint64_t ip64[2];
+	uint32_t ip32[4];
+	uint16_t ip16[8];
+	uint8_t ip8[16];
+};
+
+struct qtn_ipv6 {
+	uint16_t vers_tclass_flowlabel[2];
+	uint16_t length;
+	uint8_t next_hdr;
+	uint8_t hop_limit;
+	union qtn_ipv6_addr srcip;
+	union qtn_ipv6_addr dstip;
+};
+
+RUBY_INLINE uint8_t qtn_ipv6_tclass(const struct qtn_ipv6 *ipv6)
+{
+	return ((ipv6->vers_tclass_flowlabel[0]) >> 4) & 0xFF;
+}
+
+#define QTN_IP_PROTO_ICMP	1
+#define QTN_IP_PROTO_IGMP	2
+#define QTN_IP_PROTO_TCP	6
+#define QTN_IP_PROTO_UDP	17
+#define QTN_IP_PROTO_IPV6FRAG	44
+#define QTN_IP_PROTO_ICMPV6	58
+#define QTN_IP_PROTO_RAW	255
+
+#define QTN_MAX_VLANS	4
+
+struct qtn_8021q {
+	uint16_t tpid;
+	uint16_t tci;
+};
+
+struct qtn_udp {
+	uint16_t src_port;
+	uint16_t dst_port;
+	uint16_t length;
+	uint16_t csum;
+};
+
+RUBY_INLINE void qtn_mcast_ipv4_to_mac(uint8_t *const mac_be,
+		const uint8_t *const ipv4)
+{
+	mac_be[0] = 0x01;
+	mac_be[1] = 0x00;
+	mac_be[2] = 0x5E;
+	mac_be[3] = ipv4[1] & 0x7F;
+	mac_be[4] = ipv4[2];
+	mac_be[5] = ipv4[3];
+}
+
+RUBY_INLINE void qtn_mcast_ipv6_to_mac(uint8_t *const mac_be,
+		const uint8_t *const ipv6)
+{
+	mac_be[0] = 0x33;
+	mac_be[1] = 0x33;
+	mac_be[2] = ipv6[12];
+	mac_be[3] = ipv6[13];
+	mac_be[4] = ipv6[14];
+	mac_be[5] = ipv6[15];
+}
+
+RUBY_INLINE void qtn_mcast_mac_to_ipv4(uint8_t *const ipv4,
+		const uint8_t *const mac_be, const uint8_t ip_map)
+{
+	ipv4[0] = ((ip_map >> 1) & 0xF) | (0xE << 4);
+	ipv4[1] = (mac_be[3] & 0x7F) | ((ip_map & 1) << 7);
+	ipv4[2] = mac_be[4];
+	ipv4[3] = mac_be[5];
+}
+
+RUBY_INLINE void qtn_mcast_to_mac(uint8_t *mac_be, const void *addr, uint16_t ether_type)
+{
+	if (ether_type == htons(ETHERTYPE_IP)) {
+		qtn_mcast_ipv4_to_mac(mac_be, addr);
+	} else if (ether_type == htons(ETHERTYPE_IPV6)) {
+		qtn_mcast_ipv6_to_mac(mac_be, addr);
+	} else {
+		/* invalid address family */
+	}
+}
+
+/*
+ * IPV4 extra metadata per entry
+ * Size derive from ipv4 address[27:23]
+ * ipv4[0] is always 0xe followed by 5 bits that define the ipv4
+ * table size so in this way we can differentiate between similar multicast mac addresses
+ * the other 23 bits assemble the mac multicast id.
+ */
+RUBY_INLINE uint8_t qtn_mcast_ipv4_alias(const uint8_t *ipv4)
+{
+	return ((ipv4[1] >> 7) | (ipv4[0] & 0xF) << 1);
+}
+
+RUBY_INLINE uint8_t qtn_ether_type_is_vlan(const uint16_t type)
+{
+	return ((type == htons(ETHERTYPE_8021Q))
+			|| (type == htons(ETHERTYPE_8021AD)));
+}
+
+#endif	// __QTN_NET_PACKET_H__
+
diff --git a/quantenna/include/qtn/qtn_pcap.h b/quantenna/include/qtn/qtn_pcap.h
new file mode 100644
index 0000000..300905a
--- /dev/null
+++ b/quantenna/include/qtn/qtn_pcap.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2013 Quantenna Communications, Inc.
+ * All rights reserved.
+ */
+
+#ifndef __QTN_PCAP_H__
+#define __QTN_PCAP_H__
+
+#define QTN_GENPCAP	0
+
+#ifdef MUC_BUILD
+	#define qtn_pcap_memcpy uc_memcpy
+	extern struct qtn_genpcap *g_qtn_genpcap_state;
+#else
+	#define qtn_pcap_memcpy memcpy
+#endif	/* MUC_BUILD */
+
+struct qtn_genpcap {
+	uint8_t active;
+	uint8_t payloads_count_s;
+	uint8_t payload_size_s;
+	uint8_t ___pad;
+	uint8_t *payloads_vaddr;
+	uint8_t *payloads_paddr;
+	unsigned long payloads_written;
+};
+
+struct qtn_genpcap_args {
+	void *vaddr;
+	dma_addr_t paddr;
+};
+
+
+struct qtn_pcap_hdr {
+	uint64_t tsf;
+	uint16_t incl;
+	uint16_t orig;
+};
+
+static __inline__ unsigned long qtn_pcap_max_payload(const struct qtn_genpcap *state)
+{
+	return (1 << state->payload_size_s) - sizeof(struct qtn_pcap_hdr);
+}
+
+static __inline__ struct qtn_pcap_hdr *
+qtn_pcap_add_packet_start(struct qtn_genpcap *state, uint64_t tsf)
+{
+	unsigned int pkt_index;
+	struct qtn_pcap_hdr *hdr;
+
+	pkt_index = state->payloads_written % (1 << state->payloads_count_s);
+	state->payloads_written++;
+
+	hdr = (void *) (state->payloads_paddr + ((1 << state->payload_size_s) * pkt_index));
+	hdr->tsf = tsf;
+
+	return hdr;
+}
+
+static __inline__ void qtn_pcap_add_packet(struct qtn_genpcap *state,
+		const void *payload, uint16_t len, uint64_t tsf)
+{
+	struct qtn_pcap_hdr *hdr;
+
+	hdr = qtn_pcap_add_packet_start(state, tsf);
+	hdr->orig = len;
+	if (len >= qtn_pcap_max_payload(state))
+		hdr->incl = qtn_pcap_max_payload(state);
+	else
+		hdr->incl = len;
+
+	qtn_pcap_memcpy((hdr + 1), payload, hdr->incl);
+}
+
+#endif	/* __QTN_PCAP_H__ */
+
diff --git a/quantenna/include/qtn/qtn_pcap_public.h b/quantenna/include/qtn/qtn_pcap_public.h
new file mode 100644
index 0000000..d43b1b1
--- /dev/null
+++ b/quantenna/include/qtn/qtn_pcap_public.h
@@ -0,0 +1,83 @@
+/*SH1
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2013 Quantenna Communications Inc                   **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH1*/
+
+#ifndef _QDRV_PCAP_PUBLIC_H
+#define _QDRV_PCAP_PUBLIC_H
+
+struct pcap_hdr {
+	uint32_t magic_number;
+	uint16_t version_major;	/* major version number */
+	uint16_t version_minor;	/* minor version number */
+	int32_t thiszone;	/* GMT to local correction */
+	uint32_t sigfigs;	/* accuracy of timestamps */
+	uint32_t snaplen;	/* max length of captured packets, in octets */
+	uint32_t network;	/* data link type */
+};
+#define PCAP_HDR_MAGIC			0xa1b2c3d4
+#define PCAP_HDR_LINKTYPE_ETHER		1
+#define PCAP_HDR_LINKTYPE_80211		105
+#define PCAP_HDR_LINKTYPE_80211_RTAP	127
+
+struct pcaprec_hdr {
+	uint32_t ts_sec;
+	uint32_t ts_usec;
+	uint32_t incl_len;
+	uint32_t orig_len;
+};
+
+static __inline__ struct pcap_hdr qtn_pcap_mkhdr(uint32_t max_pkt)
+{
+	struct pcap_hdr h;
+
+	h.magic_number = PCAP_HDR_MAGIC;
+	h.version_major = 2;
+	h.version_minor = 4;
+	h.thiszone = 0;
+	h.sigfigs = 0;
+	h.snaplen = max_pkt;
+	h.network = PCAP_HDR_LINKTYPE_80211;
+
+	return h;
+}
+
+
+#endif	/* _QDRV_PCAP_PUBLIC_H */
+
diff --git a/quantenna/include/qtn/qtn_skb_cb.h b/quantenna/include/qtn/qtn_skb_cb.h
new file mode 100644
index 0000000..eed19e2
--- /dev/null
+++ b/quantenna/include/qtn/qtn_skb_cb.h
@@ -0,0 +1,69 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __QTN_SKB_CB_H
+#define __QTN_SKB_CB_H
+
+struct qtn_skb_cb {
+	uint8_t		encap;		/* Encapsulation type */
+	uint8_t		ip_protocol;	/* IP protocol */
+	uint16_t	ether_type;	/* Ethernet Type */
+	void		*ni;		/* Node structure pointer */
+	uint32_t	flags;
+#define M_LINK0			0x0001	/* frame needs WEP encryption */
+#define M_FF			0x0002	/* fast frame */
+#define M_PWR_SAV		0x0004	/* bypass powersave handling */
+#define M_UAPSD			0x0008	/* frame flagged for u-apsd handling */
+#define M_RAW			0x0010
+#define M_CLASSIFY		0x0020	/* Packet has been classified */
+#define M_VSP_CHK		0x0040	/* VSP check done */
+#define M_VSP_NOT_FOUND		0x0080	/* VSP stream not found - usually first pkts from Eth */
+#define M_VSP_RX_BSS		0x0100	/* VSP stream originating from the BSS */
+#define M_RATE_TRAINING		0x0200	/* Empty data frame used to do rate training */
+#define M_NO_AMSDU		0x0400	/* AMSDU is prohibited for this frame */
+#define M_ENQUEUED_SCH		0x0800	/* Enqueued in qdrv_sch */
+#define M_ENQUEUED_MUC		0x1000	/* Enqueued to MuC */
+#define	M_TX_DONE_IMM_INT	0x2000	/* Immediately interrupt lhost when tx done */
+#define M_VLAN_TAGGED		0x4000	/* skb belongs to some VLAN */
+#define M_ORIG_OUTSIDE		0x8000	/* skb is not from local protocol stack */
+#define M_ORIG_BR		0x10000	/* skb is sent from bridge interfaces */
+#define M_NO_L2_LRN		0x20000	/* MAC learning disabled */
+};
+
+#define QTN_SKB_ENCAP_ETH		0
+#define QTN_SKB_ENCAP_80211_MGMT	1
+#define QTN_SKB_ENCAP_80211_DATA	2
+#define QTN_SKB_ENCAP(_skb)		((_skb)->qtn_cb.encap)
+#define QTN_SKB_ENCAP_IS_80211(_skb)	((_skb)->qtn_cb.encap > 0)
+#define QTN_SKB_ENCAP_IS_80211_MGMT(_skb) \
+					((_skb)->qtn_cb.encap == QTN_SKB_ENCAP_80211_MGMT)
+
+#define QTN_SKB_CB_NI(_skb)		((_skb)->qtn_cb.ni)
+#define QTN_SKB_CB_ETHERTYPE(_skb)	((_skb)->qtn_cb.ether_type)
+#define QTN_SKB_CB_IPPROTO(_skb)	((_skb)->qtn_cb.ip_protocol)
+
+#define M_FLAG_SET(_skb, _flag)		((_skb)->qtn_cb.flags |= _flag)
+#define M_FLAG_CLR(_skb, _flag)		((_skb)->qtn_cb.flags &= ~_flag)
+#define M_FLAG_GET(_skb, _flag)		((_skb)->qtn_cb.flags & _flag)
+#define M_FLAG_ISSET(_skb, _flag)	(!!((_skb)->qtn_cb.flags & _flag))
+#define M_FLAG_KEEP_ONLY(_skb, _flag)	((_skb)->qtn_cb.flags &= _flag)
+
+#define M_PWR_SAV_SET(skb)		M_FLAG_SET((skb), M_PWR_SAV)
+#define M_PWR_SAV_CLR(skb)		M_FLAG_CLR((skb), M_PWR_SAV)
+#define M_PWR_SAV_GET(skb)		M_FLAG_GET((skb), M_PWR_SAV)
+
+#endif /* #ifndef __QTN_SKB_CB_H */
diff --git a/quantenna/include/qtn/qtn_skb_size.h b/quantenna/include/qtn/qtn_skb_size.h
new file mode 100644
index 0000000..7733127
--- /dev/null
+++ b/quantenna/include/qtn/qtn_skb_size.h
@@ -0,0 +1,51 @@
+/*
+ * (C) Copyright 2011 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __QTN_SKB_SIZE_H
+#define __QTN_SKB_SIZE_H
+
+#include "qtn_buffers.h"
+
+#define RX_BUF_SIZE_PAYLOAD	(4400)
+
+/*
+ * sk_buff size for Ruby qdrv and arasan driver.
+ * These should be the same since they share the same recycle list.
+ *
+ * In Topaz, HBM is used for buffer allocation
+ */
+#define RX_BUF_SIZE		(RX_BUF_SIZE_PAYLOAD + 2 * L1_CACHE_BYTES - 1)
+
+/*
+ * Optimization for buffer allocation.
+ * Used to modify kernel to have kmalloc() cache entry of this size.
+ */
+#define RX_BUF_SIZE_KMALLOC	(roundup((RX_BUF_SIZE) + 256, 256))
+
+/*
+ * EMAC buffer limits for software rx/tx, not hardware rxp/txp
+ */
+#define RUBY_EMAC_NUM_TX_BUFFERS	(1 << 8)
+#define RUBY_EMAC_NUM_RX_BUFFERS	(1 << 10)
+
+#endif // #ifndef __QTN_SKB_SIZE_H
+
diff --git a/quantenna/include/qtn/qtn_trace.h b/quantenna/include/qtn/qtn_trace.h
new file mode 100644
index 0000000..2c9855e
--- /dev/null
+++ b/quantenna/include/qtn/qtn_trace.h
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2011 Quantenna Communications, Inc.
+ * All rights reserved.
+ */
+
+
+#ifndef _IF_QTN_TRACE_H_
+#define _IF_QTN_TRACE_H_
+
+enum qtn_trace_types {
+	QTN_TRACE_EV_NONE		= 0x00000000,
+	QTN_TRACE_EV_TX_PKT		= 0x01000001,
+	QTN_TRACE_EV_TX_PKT_SZ		= 0x01000002,
+	QTN_TRACE_EV_TX_PKT_BA		= 0x01000003,
+	QTN_TRACE_EV_RX_PKT		= 0x02000001,
+	QTN_TRACE_EV_RX_BAD_PKT		= 0x02000002,
+	QTN_TRACE_EV_RX_NOT_VALID	= 0x02000003,
+	QTN_TRACE_EV_RX_MAX_DUR		= 0x02000004,
+	QTN_TRACE_EV_RX_BAD_LEN		= 0x02000005,
+	QTN_TRACE_EV_RX_BAD_MCS_1	= 0x02000006,
+	QTN_TRACE_EV_RX_BAD_MCS_2	= 0x02000008,
+	QTN_TRACE_EV_RX_BAD_MCS_3	= 0x02000009,
+	QTN_TRACE_EV_RX_BAD_MCS_4	= 0x0200000a,
+	QTN_TRACE_EV_RX_BAD_MCS_5	= 0x0200000b,
+	QTN_TRACE_EV_RX_PS_POLL		= 0x02000007,
+	QTN_TRACE_EV_RX_INTR_SECOVRFL	= 0x03000001,
+	QTN_TRACE_EV_RX_INTR_STRQOFLOW	= 0x03000002,
+	QTN_TRACE_EV_RST_BCN		= 0x04000001,
+	QTN_TRACE_EV_RST_TX		= 0x04000002,
+	QTN_TRACE_EV_RST_RX		= 0x04000003,
+	QTN_TRACE_EV_RST_PM		= 0x04000004,
+	QTN_TRACE_EV_RST_SCHED1		= 0x04000005,
+	QTN_TRACE_EV_RST_SCHED2		= 0x04000006,
+	QTN_TRACE_EV_RST_START		= 0x04000007,
+	QTN_TRACE_EV_RST_END		= 0x04000008,
+	QTN_TRACE_EV_BB_INT		= 0x05000001,
+	QTN_TRACE_EV_RX_DONE_INT	= 0x06000001,
+	QTN_TRACE_EV_RX_TYPEDONE_INT	= 0x06000002,
+	QTN_TRACE_EV_TX_DONE_INT	= 0x07000001,
+	QTN_TRACE_EV_TX_DONE_DEPTH	= 0x07000002,
+	QTN_TRACE_EV_TX_DONE_INHW	= 0x07000003,
+	QTN_TRACE_EV_TX_DONE_CNT	= 0x07000004,
+	QTN_TRACE_EV_TX_XATTEMPTS	= 0x07000005,
+	QTN_TRACE_EV_TX_PROBE_RESP	= 0x07000006,
+	QTN_TRACE_EV_WDOG_TX_START	= 0x08000001,
+	QTN_TRACE_EV_WDOG_TX_DONE	= 0x08000002,
+	QTN_TRACE_EV_MCST_DEFER		= 0x09000001,
+	QTN_TRACE_EV_HW_WDOG_WARN	= 0x0A000001,
+	QTN_TRACE_EV_PROBE_STATE	= 0x0B000001,
+	QTN_TRACE_EV_PROBE_PPPC_START	= 0x0B000002,
+	QTN_TRACE_EV_PROBE_PPPC_END	= 0x0B000003,
+	QTN_TRACE_EV_PROBE_SGI_START	= 0x0B000004,
+	QTN_TRACE_EV_PROBE_SGI_END	= 0x0B000005,
+	QTN_TRACE_EV_PPPC_PWR_INDEX	= 0x0B000003,
+	QTN_TRACE_EV_RA_START		= 0x0C000001,
+	QTN_TRACE_EV_RA_END		= 0x0C000002,
+	QTN_TRACE_EV_RA_MCS_SAMPLE	= 0x0C000003,
+	QTN_TRACE_EV_RF_TXPWR_CAL_START	= 0x0D000001,
+	QTN_TRACE_EV_RF_TXPWR_CAL_END	= 0x0D000002,
+	QTN_TRACE_EV_RF_TXPD_CAL_START	= 0x0D000003,
+	QTN_TRACE_EV_RF_TXPD_CAL_END	= 0x0D000004,
+	QTN_TRACE_EV_RF_VCO_CAL_START	= 0x0D000005,
+	QTN_TRACE_EV_RF_VCO_CAL_END	= 0x0D000006,
+	QTN_TRACE_EV_RF_GAIN_AD_START	= 0x0D000007,
+	QTN_TRACE_EV_RF_GAIN_AD_END	= 0x0D000008,
+	QTN_TRACE_EV_PS_STATE		= 0x0E000001,
+	QTN_TRACE_EV_RST_TCM		= 0x0E000002,
+};
+
+enum qtn_trace_trigger {
+	QTN_TRACE_TRIGGER_DROP_QDRV_SCH = 0x00000001,
+};
+
+#if QTN_ENABLE_TRACE_BUFFER
+/* Debugs for tracing activity */
+
+#define QTN_TRACE_BUF_SIZE	75
+
+extern uint32_t qtn_trace_index;
+struct qtn_trace_record {
+	uint32_t	tsf;
+	uint32_t	event;
+	uint32_t	data;
+};
+extern struct qtn_trace_record qtn_trace_buffer[QTN_TRACE_BUF_SIZE];
+
+#define QTN_TRACE(sc, event, data)	qtn_trace((sc), (event), (uint32_t)(data))
+
+#define QTN_TRACE_SET(field, value)	do { (field) = (value); } while(0)
+
+# ifdef MUC_BUILD
+#  include "qtn/if_qtnvar.h"
+# endif
+
+static __inline__
+# ifdef MUC_BUILD
+void qtn_trace(struct qtn_softc *sc, uint32_t event, uint32_t data)
+{
+	qtn_trace_index++;
+	if (qtn_trace_index >= QTN_TRACE_BUF_SIZE) {
+		qtn_trace_index = 0;
+	}
+	qtn_trace_buffer[qtn_trace_index].tsf = hal_get_tsf_lo(sc->sc_qh);
+	qtn_trace_buffer[qtn_trace_index].event = event;
+	qtn_trace_buffer[qtn_trace_index].data = data;
+}
+# else
+void qtn_trace(struct qdrv_mac *mac, uint32_t event, uint32_t data)
+{
+	qtn_trace_index++;
+	if (qtn_trace_index >= QTN_TRACE_BUF_SIZE) {
+		qtn_trace_index = 0;
+	}
+	qtn_trace_buffer[qtn_trace_index].tsf = jiffies; /* FIXME: hal_get_tsf_lo(sc->sc_qh); */
+	qtn_trace_buffer[qtn_trace_index].event = event;
+	qtn_trace_buffer[qtn_trace_index].data = data;
+}
+# endif //MUC_BUILD
+
+#else //QTN_ENABLE_TRACE_BUFFER
+
+#define QTN_TRACE(sc, type, data)	do {} while(0)
+
+#define QTN_TRACE_SET(field, value)	do {} while(0)
+
+#endif //QTN_ENABLE_TRACE_BUFFER
+
+
+#endif /* _IF_QTN_TRACE_H_ */
+
diff --git a/quantenna/include/qtn/qtn_uc_comm.h b/quantenna/include/qtn/qtn_uc_comm.h
new file mode 100644
index 0000000..3c35434
--- /dev/null
+++ b/quantenna/include/qtn/qtn_uc_comm.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2012 Quantenna Communications, Inc.
+ */
+
+#ifndef _QTN_UC_COMM_H
+#define _QTN_UC_COMM_H
+
+#define MAC_UNITS		1
+
+#if defined(TOPAZ_128_NODE_MODE)
+#define QTN_NCIDX_MAX			128
+#define QTN_NODE_TBL_SIZE_LHOST		118
+#define QTN_NODETID_NODE_SHIFT		7
+#else
+#define QTN_NCIDX_MAX			64
+#define QTN_NODE_TBL_SIZE_LHOST		56
+#define QTN_NODETID_NODE_SHIFT		6
+#endif
+#define QTN_MAX_BSS_VAPS		8
+#define QTN_MAX_WDS_VAPS		8
+#define QTN_MAX_VAPS			((QTN_MAX_BSS_VAPS) + (QTN_MAX_WDS_VAPS))
+#define QTN_NODE_TBL_MUC_HEADRM		3 /* Allow for delayed delete on MUC */
+#define QTN_NODE_TBL_SIZE_MUC		((QTN_NODE_TBL_SIZE_LHOST) + (QTN_NODE_TBL_MUC_HEADRM))
+#define QTN_ASSOC_LIMIT			((QTN_NODE_TBL_SIZE_LHOST) - (QTN_MAX_VAPS))
+
+#endif // #ifndef _QTN_UC_COMM_H
+
diff --git a/quantenna/include/qtn/qtn_vlan.h b/quantenna/include/qtn/qtn_vlan.h
new file mode 100644
index 0000000..ca1c220
--- /dev/null
+++ b/quantenna/include/qtn/qtn_vlan.h
@@ -0,0 +1,394 @@
+/*
+ * Copyright (c) 2014 Quantenna Communications, Inc.
+ * All rights reserved.
+ */
+
+#ifndef _QTN_VLAN_H_
+#define _QTN_VLAN_H_
+
+#include "../common/ruby_mem.h"
+#include <qtn/qtn_debug.h>
+#include <qtn/qtn_uc_comm.h>
+#include <qtn/qtn_net_packet.h>
+#if defined(__KERNEL__) || defined(MUC_BUILD) || defined(AUC_BUILD)
+#include <qtn/topaz_tqe_cpuif.h>
+#endif
+#if defined(__KERNEL__)
+#include <qtn/dmautil.h>
+#endif
+
+#define QVLAN_MODE_ACCESS		0
+#define QVLAN_MODE_TRUNK		1
+#define QVLAN_MODE_HYBRID		2
+#define QVLAN_MODE_DYNAMIC		3
+#define QVLAN_MODE_MAX			QVLAN_MODE_DYNAMIC
+#define QVLAN_MODE_DISABLED		(QVLAN_MODE_MAX + 1)
+#define QVLAN_SHIFT_MODE		16
+#define QVLAN_MASK_MODE			0xffff0000
+#define QVLAN_MASK_VID			0x00000fff
+
+#define QVLAN_MODE(x)			(uint16_t)((x) >> QVLAN_SHIFT_MODE)
+#define QVLAN_VID(x)			(uint16_t)((x) & QVLAN_MASK_VID)
+
+#define QVLAN_MODE_STR_ACCESS	"Access mode"
+#define QVLAN_MODE_STR_TRUNK	"Trunk mode"
+#define QVLAN_MODE_STR_HYBRID	"Hybrid mode"
+#define QVLAN_MODE_STR_DYNAMIC	"Dynamic mode"
+
+/* default port vlan id */
+#define QVLAN_DEF_PVID			1
+
+#define QVLAN_VID_MAX			4096
+#define QVLAN_VID_MAX_S			12
+#define QVLAN_VID_ALL			0xffff
+
+#ifndef NBBY
+#define NBBY		8
+#endif
+
+#ifndef NBDW
+#define NBDW		32
+#endif
+
+#ifdef CONFIG_TOPAZ_DBDC_HOST
+#define VLAN_INTERFACE_MAX	(QTN_MAX_VAPS + 2 + MAX_QFP_NETDEV)
+#define QFP_VDEV_IDX(dev_id)	(QTN_MAX_VAPS + 2 + (dev_id))
+#else
+#define VLAN_INTERFACE_MAX	(QTN_MAX_VAPS + 2)
+#endif
+#define WMAC_VDEV_IDX_MAX	QTN_MAX_VAPS
+#define EMAC_VDEV_IDX(port)	(QTN_MAX_VAPS + (port))
+#define PCIE_VDEV_IDX		(QTN_MAX_VAPS + 0)
+
+#ifndef howmany
+#define howmany(x, y)			(((x) + ((y) - 1)) / (y))
+#endif
+
+#define bitsz_var(var)			(sizeof(var) * 8)
+#define bitsz_ptr(ptr)			bitsz_var((ptr)[0])
+
+#define set_bit_a(a, i)			((a)[(i) / bitsz_ptr(a)] |= 1 << ((i) % bitsz_ptr(a)))
+#define clr_bit_a(a, i)			((a)[(i) / bitsz_ptr(a)] &= ~(1 << ((i) % bitsz_ptr(a))))
+#define is_set_a(a, i)			((a)[(i) / bitsz_ptr(a)] & (1 << ((i) % bitsz_ptr(a))))
+#define is_clr_a(a, i)			(is_set_a(a, i) == 0)
+
+struct qtn_vlan_stats {
+	uint32_t lhost;
+	uint32_t auc;
+	uint32_t muc;
+};
+
+struct qtn_vlan_user_interface {
+	unsigned long bus_addr;
+	uint8_t mode;
+};
+
+struct qtn_vlan_dev {
+	uint8_t		idx;
+	uint8_t		port;
+	uint16_t	pvid;
+#define QVLAN_DEV_F_DYNAMIC	BIT(0)
+	uint32_t	flags;
+	unsigned long	bus_addr;
+	int		ifindex;
+	union {
+		uint32_t	member_bitmap[howmany(QVLAN_VID_MAX, NBDW)];
+		uint16_t	node_vlan[QTN_NCIDX_MAX];
+	}u;
+	uint32_t	tag_bitmap[howmany(QVLAN_VID_MAX, NBDW)];
+	struct qtn_vlan_stats ig_pass;
+	struct qtn_vlan_stats ig_drop;
+	struct qtn_vlan_stats eg_pass;
+	struct qtn_vlan_stats eg_drop;
+	struct qtn_vlan_stats magic_invalid;
+	void		*user_data;
+};
+#define QVLAN_IS_DYNAMIC(vdev)		((vdev)->flags & QVLAN_DEV_F_DYNAMIC)
+
+struct qtn_vlan_pkt {
+#define QVLAN_PKT_MAGIC			0x1234
+	uint16_t	magic;
+#define QVLAN_TAGGED			0x8000
+#define QVLAN_SKIP_CHECK		0x4000
+	uint16_t	vlan_info;
+} __packed;
+
+#define QVLAN_PKTCTRL_LEN	sizeof(struct qtn_vlan_pkt)
+
+struct qtn_vlan_info {
+#define QVLAN_TAGRX_UNTOUCH		0
+#define QVLAN_TAGRX_STRIP		1
+#define QVLAN_TAGRX_TAG			2
+#define QVLAN_TAGRX_BITMASK		0x3
+#define QVLAN_TAGRX_BITWIDTH		2
+#define QVLAN_TAGRX_BITSHIFT		1
+#define QVLAN_TAGRX_NUM_PER_DW		(32 / QVLAN_TAGRX_BITWIDTH)
+#define QVLAN_TAGRX_NUM_PER_DW_S	4
+	uint32_t vlan_tagrx_bitmap[howmany(QVLAN_VID_MAX * QVLAN_TAGRX_BITWIDTH, NBDW)];
+};
+
+RUBY_INLINE int qvlan_tagrx_index(int vid)
+{
+	return (vid >> QVLAN_TAGRX_NUM_PER_DW_S);
+}
+
+RUBY_INLINE int qvlan_tagrx_shift(int vid)
+{
+	int shift;
+
+	shift = vid & (QVLAN_TAGRX_NUM_PER_DW - 1);
+	return (shift << QVLAN_TAGRX_BITSHIFT);
+}
+
+/*
+ * Must be in sync with qcsapi_vlan_config in qcsapi.h
+ *  -- Whenever 'struct qtn_vlan_config' changes, qcsapi.h changes as well
+ */
+struct qtn_vlan_config {
+	uint32_t	vlan_cfg;
+	union {
+		struct vlan_dev_config {
+			uint32_t	member_bitmap[howmany(QVLAN_VID_MAX, NBDW)];
+			uint32_t	tag_bitmap[howmany(QVLAN_VID_MAX, NBDW)];
+		} dev_config;
+		uint32_t	tagrx_config[howmany(QVLAN_VID_MAX * QVLAN_TAGRX_BITWIDTH, NBDW)];
+	} u;
+};
+
+/*
+* VLAN forward/drop table
+*|	traffic direction	|  frame	|  Access(MBSS/Dynamic mode)	  | Trunk(Passthrough mode)
+*|--------------------------------------------------------------------------------------------------------------
+*|	wifi tx			|  no vlan	|  drop				  | forward
+*|--------------------------------------------------------------------------------------------------------------
+*|				|  vlan tagged	| compare tag with PVID:	  | compare tag against VID list
+*|				|		| 1.equal:untag and forward	  | 1.Found:forward
+*|				|		| 2.not equal:drop		  | 2.Not found:drop
+*|--------------------------------------------------------------------------------------------------------------
+*|	wifi rx			|  no vlan	| Add PVID tag and forward	  | forward
+*|--------------------------------------------------------------------------------------------------------------
+*|				|  vlan tagged	| Compare tag with PVID:	  | compare tag against VID list
+*|				|		| 1.equal:forward		  | 1. Found:forward
+*|				|		| 2.not equal:drop		  | 2. Not found:drop
+*|--------------------------------------------------------------------------------------------------------------
+*/
+
+#define QVLAN_BYTES_PER_VID		((QTN_MAX_BSS_VAPS + NBBY - 1) / NBBY)
+#define QVLAN_BYTES_PER_VID_SHIFT	0
+
+RUBY_INLINE int
+qtn_vlan_is_valid(int vid)
+{
+	/* VLAN ID 0 is reserved */
+	return (vid > 0 && vid < QVLAN_VID_MAX);
+}
+
+RUBY_INLINE int
+qtn_vlan_is_member(volatile struct qtn_vlan_dev *vdev, uint16_t vid)
+{
+	return !!is_set_a(vdev->u.member_bitmap, vid);
+}
+
+RUBY_INLINE int
+qtn_vlan_is_tagged_member(volatile struct qtn_vlan_dev *vdev, uint16_t vid)
+{
+	return !!is_set_a(vdev->tag_bitmap, vid);
+}
+
+RUBY_INLINE int
+qtn_vlan_is_pvid(volatile struct qtn_vlan_dev *vdev, uint16_t vid)
+{
+	return vdev->pvid == vid;
+}
+
+RUBY_INLINE int
+qtn_vlan_is_mode(volatile struct qtn_vlan_dev *vdev, uint16_t mode)
+{
+	return ((struct qtn_vlan_user_interface *)vdev->user_data)->mode == mode;
+}
+
+#if defined(__KERNEL__) || defined(MUC_BUILD) || defined(AUC_BUILD)
+RUBY_INLINE int
+qtn_vlan_port_indexable(uint8_t port)
+{
+	return ((port == TOPAZ_TQE_EMAC_0_PORT)
+		|| (port == TOPAZ_TQE_EMAC_1_PORT)
+		|| (port == TOPAZ_TQE_PCIE_PORT)
+		|| (port == TOPAZ_TQE_DSP_PORT));
+}
+#endif
+
+RUBY_INLINE int
+qtn_vlan_get_tagrx(uint32_t *tagrx_bitmap, uint16_t vlanid)
+{
+	return (tagrx_bitmap[vlanid >> QVLAN_TAGRX_NUM_PER_DW_S] >>
+				((vlanid & (QVLAN_TAGRX_NUM_PER_DW - 1)) << QVLAN_TAGRX_BITSHIFT)) &
+		QVLAN_TAGRX_BITMASK;
+}
+
+RUBY_INLINE void
+qtn_vlan_gen_group_addr(uint8_t *mac, uint16_t vid, uint8_t vapid)
+{
+	uint16_t encode;
+
+	mac[0] = 0xff;
+	mac[1] = 0xff;
+	mac[2] = 0xff;
+	mac[3] = 0xff;
+
+	encode = ((uint16_t)vapid << QVLAN_VID_MAX_S) | vid;
+	mac[4] = encode >> 8;
+	mac[5] = (uint8_t)(encode & 0xff);
+}
+
+RUBY_INLINE int
+qtn_vlan_is_group_addr(const uint8_t *mac)
+{
+	return (mac[0] == 0xff && mac[1] == 0xff
+		&& mac[2] == 0xff && mac[3] == 0xff
+		&& mac[4] != 0xff);
+}
+
+#if defined(__KERNEL__) || defined(MUC_BUILD) || defined(AUC_BUILD)
+RUBY_INLINE struct qtn_vlan_pkt*
+qtn_vlan_get_info(const void *data)
+{
+	struct qtn_vlan_pkt *pkt;
+#if defined(AUC_BUILD)
+#pragma Off(Behaved)
+#endif
+	pkt = (struct qtn_vlan_pkt *)((const uint8_t *)data - QVLAN_PKTCTRL_LEN);
+#if defined(AUC_BUILD)
+#pragma On(Behaved)
+#endif
+	return pkt;
+}
+
+RUBY_INLINE void
+qtn_vlan_inc_stats(struct qtn_vlan_stats *stats) {
+#if defined(__KERNEL__)
+	stats->lhost++;
+#elif defined(AUC_BUILD)
+	stats->auc++;
+#elif defined(MUC_BUILD)
+	stats->muc++;
+#endif
+}
+
+RUBY_INLINE int
+qtn_vlan_magic_check(struct qtn_vlan_dev *outdev, struct qtn_vlan_pkt *pkt)
+{
+	if (unlikely(pkt->magic != QVLAN_PKT_MAGIC)) {
+		qtn_vlan_inc_stats(&outdev->magic_invalid);
+		return 0;
+	}
+
+	return 1;
+}
+
+RUBY_INLINE int
+qtn_vlan_vlanid_check(struct qtn_vlan_dev *vdev, uint16_t ncidx, uint16_t vlanid)
+{
+	if (QVLAN_IS_DYNAMIC(vdev))
+		return (vdev->u.node_vlan[ncidx] == vlanid);
+	else
+		return qtn_vlan_is_member(vdev, vlanid);
+}
+
+RUBY_INLINE int
+qtn_vlan_egress(struct qtn_vlan_dev *outdev, uint16_t ncidx, void *data)
+{
+	struct qtn_vlan_pkt *pkt = qtn_vlan_get_info(data);
+
+	if (!qtn_vlan_magic_check(outdev, pkt)
+			|| (pkt->vlan_info & QVLAN_SKIP_CHECK)
+			|| qtn_vlan_vlanid_check(outdev, ncidx, pkt->vlan_info & QVLAN_MASK_VID)) {
+		qtn_vlan_inc_stats(&outdev->eg_pass);
+		return 1;
+	}
+
+	qtn_vlan_inc_stats(&outdev->eg_drop);
+	return 0;
+}
+#endif
+
+#if defined(__KERNEL__) || defined(MUC_BUILD)
+RUBY_INLINE int
+qtn_vlan_ingress(struct qtn_vlan_dev *indev, uint16_t ncidx,
+		void *data, uint16_t known_vlanid, uint8_t cache_op)
+{
+	struct ether_header *eh = (struct ether_header *)data;
+	struct qtn_vlan_pkt *pkt = qtn_vlan_get_info(data);
+	uint16_t vlanid;
+	const uint16_t magic = QVLAN_PKT_MAGIC;
+
+	if (eh->ether_type == htons(ETHERTYPE_8021Q)) {
+		vlanid = ntohs(*(uint16_t *)(eh + 1)) & QVLAN_MASK_VID;
+
+		if (!qtn_vlan_vlanid_check(indev, ncidx, vlanid)) {
+			qtn_vlan_inc_stats(&indev->ig_drop);
+			return 0;
+		}
+
+		vlanid |= QVLAN_TAGGED;
+	} else if (known_vlanid) {
+		vlanid = known_vlanid;
+
+		if (!qtn_vlan_vlanid_check(indev, ncidx, vlanid)) {
+			qtn_vlan_inc_stats(&indev->ig_drop);
+			return 0;
+		}
+	} else {
+		vlanid = indev->pvid;
+	}
+
+	pkt->magic = magic;
+	pkt->vlan_info = vlanid;
+
+	if (cache_op) {
+#if defined(__KERNEL__)
+		flush_and_inv_dcache_sizerange_safe(pkt, QVLAN_PKTCTRL_LEN);
+#elif defined(MUC_BUILD)
+		flush_and_inv_dcache_range_safe(pkt, QVLAN_PKTCTRL_LEN);
+#endif
+	}
+
+	qtn_vlan_inc_stats(&indev->ig_pass);
+	return 1;
+}
+#endif
+
+#if defined(__KERNEL__)
+extern uint8_t vlan_enabled;
+extern struct qtn_vlan_dev *vdev_tbl_lhost[VLAN_INTERFACE_MAX];
+extern struct qtn_vlan_dev *vdev_tbl_bus[VLAN_INTERFACE_MAX];
+extern struct qtn_vlan_dev *vport_tbl_lhost[TOPAZ_TQE_NUM_PORTS];
+extern struct qtn_vlan_dev *vport_tbl_bus[TOPAZ_TQE_NUM_PORTS];
+extern struct qtn_vlan_info qtn_vlan_info;
+
+extern struct qtn_vlan_dev *switch_alloc_vlan_dev(uint8_t port, uint8_t idx, int ifindex);
+extern void switch_free_vlan_dev(struct qtn_vlan_dev *dev);
+extern void switch_free_vlan_dev_by_idx(uint8_t idx);
+extern struct qtn_vlan_dev *switch_vlan_dev_get_by_port(uint8_t port);
+extern struct qtn_vlan_dev *switch_vlan_dev_get_by_idx(uint8_t idx);
+
+extern int switch_vlan_add_member(struct qtn_vlan_dev *vdev, uint16_t vid, uint8_t tag);
+extern int switch_vlan_del_member(struct qtn_vlan_dev *vdev, uint16_t vid);
+extern int switch_vlan_tag_member(struct qtn_vlan_dev *vdev, uint16_t vid);
+extern int switch_vlan_untag_member(struct qtn_vlan_dev *vdev, uint16_t vid);
+extern int switch_vlan_set_pvid(struct qtn_vlan_dev *vdev, uint16_t vid);
+
+/* dynamic VLAN support */
+extern void switch_vlan_dyn_enable(struct qtn_vlan_dev *vdev);
+extern void switch_vlan_dyn_disable(struct qtn_vlan_dev *vdev);
+extern int switch_vlan_set_node(struct qtn_vlan_dev *vdev, uint16_t ncidx, uint16_t vlan);
+extern int switch_vlan_clr_node(struct qtn_vlan_dev *vdev, uint16_t ncidx);
+
+extern struct sk_buff *switch_vlan_to_proto_stack(struct sk_buff *, int copy);
+extern struct sk_buff *switch_vlan_from_proto_stack(struct sk_buff *, struct qtn_vlan_dev *, uint16_t ncidx, int copy);
+extern void switch_vlan_reset(void);
+extern void switch_vlan_dev_reset(struct qtn_vlan_dev *vdev, uint8_t mode);
+extern void switch_vlan_emac_to_lhost(uint32_t enable);
+#endif
+
+#endif
diff --git a/quantenna/include/qtn/qtn_wmm_ac.h b/quantenna/include/qtn/qtn_wmm_ac.h
new file mode 100644
index 0000000..bab24ee
--- /dev/null
+++ b/quantenna/include/qtn/qtn_wmm_ac.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2013 Quantenna Communications, Inc.
+ */
+
+#ifndef _QTN_WMM_AC_H
+#define _QTN_WMM_AC_H
+
+#define WMM_AC_BE	0
+#define WMM_AC_BK	1
+#define WMM_AC_VI	2
+#define WMM_AC_VO	3
+#define WMM_AC_NUM	4
+#define QTN_AC_MGMT	WMM_AC_VO
+#define WMM_AC_INVALID	WMM_AC_NUM
+
+#define QTN_AC_ORDER	{ WMM_AC_VO, WMM_AC_VI, WMM_AC_BE, WMM_AC_BK }
+
+#define QTN_TID_BE	0
+#define QTN_TID_BK	1
+#define QTN_TID_2	2
+#define QTN_TID_3	3
+#define QTN_TID_WLAN	4	/* 802.11 encap'ed data from wlan driver */
+#define QTN_TID_VI	5
+#define QTN_TID_VO	6
+#define QTN_TID_MGMT	7
+#define QTN_TID_IS_80211(tid)	((tid == QTN_TID_MGMT) || (tid == QTN_TID_WLAN))
+
+#define QTN_TID_ORDER	{ \
+	QTN_TID_MGMT,	\
+	QTN_TID_WLAN,	\
+	QTN_TID_VO,	\
+	QTN_TID_VI,	\
+	QTN_TID_BE,	\
+	QTN_TID_BK	\
+}
+
+#define QTN_TID_ORDER_DATA { \
+	QTN_TID_VO,	\
+	QTN_TID_VI,	\
+	QTN_TID_BE,	\
+	QTN_TID_BK	\
+}
+
+#define QTN_TID_ORDER_POLL { \
+	QTN_TID_VO,	\
+	QTN_TID_VI,	\
+	QTN_TID_BE,	\
+	QTN_TID_BK,	\
+	QTN_TID_WLAN,	\
+	QTN_TID_MGMT	\
+}
+
+#define WMM_AC_TO_TID(_ac) (			\
+	(_ac == WMM_AC_VO) ? QTN_TID_VO :	\
+	(_ac == WMM_AC_VI) ? QTN_TID_VI :	\
+	(_ac == WMM_AC_BK) ? QTN_TID_BK :	\
+	QTN_TID_BE)
+
+#define TID_TO_WMM_AC(_tid) (		\
+	(_tid == QTN_TID_BK)	? WMM_AC_BK :	\
+	(_tid == QTN_TID_VI)	? WMM_AC_VI :	\
+	(_tid == QTN_TID_VO)	? WMM_AC_VO :	\
+	(_tid == QTN_TID_WLAN)	? QTN_AC_MGMT :	\
+	(_tid == QTN_TID_MGMT)	? QTN_AC_MGMT :	\
+	WMM_AC_BE)
+
+#define QTN_TID_COLLAPSE(_tid)	WMM_AC_TO_TID(TID_TO_WMM_AC(_tid))
+
+#define AC_TO_QTN_QNUM(_ac)		\
+	(((_ac) == WME_AC_BE) ? 1 :	\
+	 ((_ac) == WME_AC_BK) ? 0 :	\
+	  (_ac))
+
+#define QTN_TID_MAP_UNUSED(_tid) ( \
+	(_tid == QTN_TID_2) ? QTN_TID_BK : \
+	(_tid == QTN_TID_3) ? QTN_TID_BE : \
+	(_tid))
+
+#endif	/* _QTN_WMM_AC_H */
diff --git a/quantenna/include/qtn/qtn_wowlan.h b/quantenna/include/qtn/qtn_wowlan.h
new file mode 100644
index 0000000..cf15486
--- /dev/null
+++ b/quantenna/include/qtn/qtn_wowlan.h
@@ -0,0 +1,55 @@
+#ifndef __QTN_WOWLAN_H__
+#define __QTN_WOWLAN_H__
+
+#include <qtn/qtn_net_packet.h>
+#define WOWLAN_MATCH_TYPE_DEFAULT	0
+#define WOWLAN_MATCH_TYPE_L2		1
+#define WOWLAN_MATCH_TYPE_UDP		2
+
+#ifndef IEEE80211_ADDR_BCAST
+#define	IEEE80211_ADDR_BCAST(a)	((a)[0] == 0xff && (a)[1] == 0xff && (a)[2] == 0xff && \
+					(a)[3] == 0xff && (a)[4] == 0xff && (a)[5] == 0xff)
+#endif
+RUBY_INLINE uint16_t get_udp_dst_port(const void *iphdr)
+{
+	const struct qtn_ipv4 *ipv4 = (const struct qtn_ipv4 *)iphdr;
+	const uint8_t proto = ipv4->proto;
+
+	if (proto == QTN_IP_PROTO_UDP) {
+		const struct qtn_udp *udp = (struct qtn_udp *)((uint8_t *)ipv4 + sizeof(struct qtn_ipv4));
+		return udp->dst_port;
+	}
+	return 0;
+}
+
+RUBY_INLINE uint8_t wowlan_is_magic_packet(uint16_t ether_type, const void *eth_hdr, const void *iphdr,
+		uint16_t wowlan_match_type, uint16_t config_ether_type, uint16_t config_udp_port)
+{
+	const struct ether_header *eh = (struct ether_header *)eth_hdr;
+
+	if (wowlan_match_type == WOWLAN_MATCH_TYPE_DEFAULT) {
+		if (IEEE80211_ADDR_BCAST(eh->ether_dhost))/*broadcast*/
+			return 1;
+		if (ether_type == htons(ETHERTYPE_WAKE_ON_LAN))/* ehter type is 0x0842*/
+			return 1;
+		if (ether_type == htons(ETHERTYPE_IP)) {
+			uint16_t udp_dst = get_udp_dst_port(iphdr);
+			if (udp_dst == htons(7) || udp_dst == htons(9))
+				return 1;
+		}
+	} else if (wowlan_match_type == WOWLAN_MATCH_TYPE_L2) {
+		if (ether_type == htons(config_ether_type))/* ehter type is 0x0842 or user defined*/
+			return 1;
+	} else if (wowlan_match_type == WOWLAN_MATCH_TYPE_UDP) {
+		if (ether_type == htons(ETHERTYPE_IP)) {
+			uint16_t udp_dst = get_udp_dst_port(iphdr);
+			if (((config_udp_port == 0xffff) && (udp_dst == htons(7) || udp_dst == htons(9))) ||
+						(udp_dst == htons(config_udp_port)))
+				return 1;
+
+		}
+	}
+
+	return 0;
+}
+#endif
diff --git a/quantenna/include/qtn/qvsp.h b/quantenna/include/qtn/qvsp.h
new file mode 100644
index 0000000..9c52eb3
--- /dev/null
+++ b/quantenna/include/qtn/qvsp.h
@@ -0,0 +1,156 @@
+/*SH0
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2011-2013 Quantenna Communications, Inc             **
+**                            All Rights Reserved                            **
+**                                                                           **
+*******************************************************************************
+EH0*/
+
+#ifndef _QVSP_DRV_H_
+#define _QVSP_DRV_H_
+
+#ifdef CONFIG_QVSP
+
+#include <linux/netdevice.h>
+#include <linux/skbuff.h>
+#include <linux/ip.h>
+
+#include <net80211/if_ethersubr.h>
+
+#include "qtn/qvsp_data.h"
+#include "qtn/shared_defs.h"
+
+#define QVSP_BA_THROT_TIMER_INTV	25	/* unit: ms */
+
+struct qvsp_s;
+struct qvsp_strm;
+struct qvsp_ext_s;
+struct ieee80211_node;
+struct qdrv_wlan;
+
+enum qdrv_vsp_check_type {
+	QDRV_VSP_CHECK_ENABLE,
+};
+
+#define QVSP_CHECK_FUNC_PROTOTYPE(_fn)			\
+	int (_fn)(struct qvsp_ext_s *qvsp,		\
+			enum qvsp_if_e qvsp_if,		\
+			struct sk_buff *skb,		\
+			void *data_start,		\
+			uint32_t pktlen,		\
+			uint8_t ac)
+
+typedef void (*_fn_qvsp_inactive_flags_changed_handler)(struct qvsp_ext_s *qvsp_ext);
+
+/* This definition must be kept in sync with QVSP_INACTIVE_REASON */
+struct qvsp_ext_s {
+
+#define QVSP_INACTIVE_CFG	0x00000001
+#define QVSP_INACTIVE_WDS	0x00000002
+#define QVSP_INACTIVE_COC	0x00000004
+	uint32_t				inactive_flags;
+	_fn_qvsp_inactive_flags_changed_handler	flags_changed;
+};
+
+struct qvsp_wrapper {
+	struct qvsp_ext_s	*qvsp;
+	QVSP_CHECK_FUNC_PROTOTYPE(*qvsp_check_func);
+};
+
+static inline void
+__qvsp_inactive_flag_update(struct qvsp_ext_s *qvsp_ext, uint32_t flag, int set)
+{
+	unsigned long irq_flags;
+	unsigned long old_flags;
+	unsigned long update = 0;
+
+	if (qvsp_ext && flag) {
+		local_irq_save(irq_flags);
+
+		old_flags = qvsp_ext->inactive_flags;
+		if (set) {
+			qvsp_ext->inactive_flags |= flag;
+		} else {
+			qvsp_ext->inactive_flags &= ~flag;
+		}
+
+		local_irq_restore(irq_flags);
+
+		update = ((old_flags == 0) != (qvsp_ext->inactive_flags == 0));
+		if (update && qvsp_ext->flags_changed) {
+			qvsp_ext->flags_changed(qvsp_ext);
+		}
+	}
+}
+
+#define qvsp_inactive_flag_set(_qvsp, _flag) \
+		__qvsp_inactive_flag_update((struct qvsp_ext_s *)(_qvsp), (_flag), 1)
+
+#define qvsp_inactive_flag_clear(_qvsp, _flag) \
+		__qvsp_inactive_flag_update((struct qvsp_ext_s *)(_qvsp), (_flag), 0)
+
+static __always_inline int
+__qvsp_is_active(struct qvsp_ext_s *qvsp_ext)
+{
+	return (qvsp_ext && (qvsp_ext->inactive_flags == 0));
+}
+#define qvsp_is_active(_qvsp)  __qvsp_is_active((struct qvsp_ext_s *)(_qvsp))
+
+static __always_inline int
+__qvsp_is_enabled(struct qvsp_ext_s *qvsp_ext)
+{
+	return (qvsp_ext && ((qvsp_ext->inactive_flags & QVSP_INACTIVE_CFG) == 0));
+}
+#define qvsp_is_enabled(_qvsp) \
+		__qvsp_is_enabled((struct qvsp_ext_s *)(_qvsp))
+
+
+
+int qvsp_strm_check_add(struct qvsp_s *qvsp, enum qvsp_if_e qvsp_if, struct ieee80211_node *ni,
+			struct sk_buff *skb, struct ether_header *eh, struct iphdr *iphdr_p,
+			int pktlen, uint8_t ac, int32_t tid);
+void qvsp_cmd_strm_state_set(struct qvsp_s *qvsp, uint8_t strm_state,
+			const struct ieee80211_qvsp_strm_id *strm_id, struct ieee80211_qvsp_strm_dis_attr *attr);
+void qvsp_cmd_vsp_configure(struct qvsp_s *qvsp, uint32_t index, uint32_t value);
+void qvsp_fat_set(struct qvsp_s *qvsp, uint32_t fat, uint32_t intf_ms, uint8_t chan);
+void qvsp_node_del(struct qvsp_s *qvsp, struct ieee80211_node *ni);
+void qvsp_reset(struct qvsp_s *qvsp);
+void qvsp_change_stamode(struct qvsp_s *qvsp, uint8_t stamode);
+int qvsp_netdbg_init(struct qvsp_s *qvsp,
+		void (*cb_logger)(void *token, void *vsp_data, uint32_t size),
+		uint32_t interval);
+void qvsp_netdbg_exit(struct qvsp_s *qvsp);
+void qvsp_disable(struct qvsp_s *qvsp);
+struct qvsp_s *qvsp_init(int (*ioctl_fn)(void *token, uint32_t param, uint32_t value),
+			void *ioctl_fn_token, struct net_device *dev, uint8_t stamode,
+			void (*cb_cfg)(void *token, uint32_t index, uint32_t value),
+			void (*cb_strm_ctrl)(void *token, struct ieee80211_node *ni, uint8_t strm_state,
+				struct ieee80211_qvsp_strm_id *strm_id, struct ieee80211_qvsp_strm_dis_attr *attr),
+			void (*cb_strm_ext_throttler)(void *token, struct ieee80211_node *node,
+				uint8_t strm_state, const struct ieee80211_qvsp_strm_id *strm_id,
+				struct ieee80211_qvsp_strm_dis_attr *attr, uint32_t throt_intvl),
+			uint32_t ieee80211node_size, uint32_t ieee80211vap_size
+			);
+void qvsp_exit(struct qvsp_s **qvsp, struct net_device *dev);
+
+void qvsp_wrapper_init(struct qvsp_ext_s *qvsp_ext, QVSP_CHECK_FUNC_PROTOTYPE(fn));
+void qvsp_wrapper_exit(void);
+void qvsp_node_init(struct ieee80211_node *ni);
+
+void qvsp_3rdpt_register_cb(struct qvsp_s *qvsp,
+		void *wme_token,
+		int (*cb_3rdpt_get_method)(struct ieee80211_node *ni, uint8_t *throt_session_dur, uint8_t *throt_winsize),
+		int (*cb_ba_throt)(struct ieee80211_node *ni, int32_t tid, int intv, int dur, int win_size),
+		int (*cb_wme_throt)(void *qw, uint32_t ac, uint32_t enable,
+					uint32_t aifs, uint32_t cwmin, uint32_t cwmax, uint32_t txoplimit,
+					uint32_t add_qwme_ie)
+		);
+
+#if TOPAZ_QTM
+void qvsp_strm_tid_check_add(struct qvsp_s *qvsp, struct ieee80211_node *ni, uint8_t node, uint8_t tid,
+		uint32_t pkts, uint32_t bytes, uint32_t sent_pkts, uint32_t sent_bytes);
+#endif
+#endif /* CONFIG_QVSP */
+
+#endif
diff --git a/quantenna/include/qtn/qvsp_common.h b/quantenna/include/qtn/qvsp_common.h
new file mode 100644
index 0000000..2dc41dd
--- /dev/null
+++ b/quantenna/include/qtn/qvsp_common.h
@@ -0,0 +1,36 @@
+/*
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2012 Quantenna Communications Inc                   **
+**                            All Rights Reserved                            **
+**                                                                           **
+**  Author      : Quantenna Communications, Inc.                             **
+**  File        : qvsp_common.h                                              **
+**  Description : Video Screen Protection                                    **
+**                                                                           **
+*******************************************************************************
+*/
+
+#ifndef _QVSP_COMMON_H_
+#define _QVSP_COMMON_H_
+
+/*
+ * Default stream airtime cost in msec per sec to send or receive at 8 Mbps.
+ * Constants are binary for efficiency and do not need to be accurate.  They only need to
+ * scale so that stream cost roughly equates to used airtime, in order to estimate the
+ * affect of disabling or re-enabling a stream.
+ */
+#define BYTES_PER_KIB			(1024)		/* Kibibytes */
+#define BYTES_PER_MIB			(1024 * 1024)	/* Mebibytes */
+#define QVSP_STRM_COST_UNIT_MIB		(8)		/* arbitrary (optimised) cost unit */
+#define QVSP_STRM_COST_UNIT_BYTES	(QVSP_STRM_COST_UNIT_MIB * BYTES_PER_MIB)
+#define QVSP_NODE_COST_DFLT		(1000)
+
+struct qtn_per_tid_stats {
+	uint32_t tx_throt_pkts;
+	uint32_t tx_throt_bytes;
+	uint32_t tx_sent_pkts;
+	uint32_t tx_sent_bytes;
+};
+
+#endif
diff --git a/quantenna/include/qtn/registers.h b/quantenna/include/qtn/registers.h
new file mode 100644
index 0000000..8cac133
--- /dev/null
+++ b/quantenna/include/qtn/registers.h
@@ -0,0 +1,320 @@
+/*SH1
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2008 - 2010 Quantenna Communications Inc            **
+**                            All Rights Reserved                            **
+**                                                                           **
+**  Author      : Quantenna Communications Inc                               **
+**  File        : registers.h                                                **
+**  Description :                                                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH1*/
+
+#ifndef _QTN_REGISTERS_H
+#define _QTN_REGISTERS_H
+
+#include <asm/io.h>
+
+#if defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD)
+#include <qtn/registers_muc.h>
+#endif
+
+#if (CONFIG_ARCH_ARC)
+# define CONFIG_RUBY 1
+#else
+# define CONFIG_ENVY 1
+#endif
+
+#define QTN_BIT(_i)				(1L << (_i))
+
+#define SYS_REG_BASE		0xE0000000
+#define SYS_RESET_VECTOR_MASK	(SYS_REG_BASE + 0x0)
+#define SYS_RESET_VECTOR	(SYS_REG_BASE + 0x4)
+#define SYS_CONTROL_MASK	(SYS_REG_BASE + 0x8)
+#define SYS_CONTROL_REG		(SYS_REG_BASE + 0xC)
+
+#define ULA_RESET_VECTOR_MASK 0xE0000000
+#define ULA_RESET_VECTOR 0xE0000004
+
+#define NDP_PKT_SRC_BBO (0xE60B0000)
+#define NDP_PKT_SRC_BB1 (0xE68B0000)
+
+#define DSP_MASTER_GPIO_ENABLE (1<<15)
+
+#define MUC_BASE_ADDR 0xE5000000
+#define MUC_OFFSET_CTRL_REG 0x42000
+
+#define MUC_CTRL_REG_SIZE 0xFF
+
+/* Interrupts */
+#define MUC_INT0  0
+#define MUC_INT1  1
+#define MUC_INT2  2
+#define MUC_INT3  3
+#define MUC_INT4  4
+#define MUC_INT5  5
+#define MUC_INT6  6
+#define MUC_INT7  7
+#define MUC_INT8  8
+#define MUC_INT9  9
+#define MUC_INT10 10
+#define MUC_INT11 11
+#define MUC_INT12 12
+#define MUC_INT13 13
+#define MUC_INT14 14
+
+/* UMS reset Masks */
+#define ARMSS_RESET 0x00000001   
+#define EBI_RESET   0x00000002
+#define DRAM_RESET  0x00000004   
+#define SRAM_RESET  0x00000008   
+#define DSPSS_RESET 0x00000010   
+#define DSP_RESET   0x00000020   
+#define MUC_RESET   0x00000040   
+#define NETSS_RESET 0x00000080   
+#define MMC_RESET   0x00000100   
+#define ENET_RESET  0x00000200   
+#define IOSS_RESET  0x00000400   
+#define PCI_RESET   0x00000800   
+#define SDIO_RESET  0x00001000   
+#define USB_RESET   0x00002000 
+#define BB_RESET    0x00004000  
+#define MB_RESET    0x00008000  
+#define ULA_RESET   0x00010000  
+
+struct muc_ctrl_reg
+{
+	volatile u32 int_mask;
+	volatile u32 int_status;
+	volatile u32 host_sem0;
+	volatile u32 host_sem1;
+	volatile u32 uc_sem0;
+	volatile u32 uc_sem1;
+	volatile u32 mac0_host_int_pri;
+	volatile u32 mac0_host_int_mask;
+	volatile u32 mac0_host_int_status;
+	volatile u32 mac0_host_int_gen;
+	volatile u32 mac1_host_int_pri; //Not in Ruby
+	volatile u32 mac1_host_int_mask; //Not in Ruby
+	volatile u32 mac1_host_int_status; //Not in Ruby
+	volatile u32 mac1_host_int_gen; //Not in Ruby
+	volatile u32 soft_rst;
+	volatile u32 lpbck_cntl; //Not in Ruby
+#if CONFIG_RUBY
+	volatile u32 global_tim0;
+	volatile u32 global_tim1;
+	volatile u32 global_csr;
+	volatile u32 mac_debug_sel;
+#endif
+} __attribute__ ((packed));
+
+struct ruby_sys_ctrl_reg
+{
+	volatile u32 reset_vector_mask; /* 0xE0000000 */
+	volatile u32 reset_vector;
+	volatile u32 system_control_mask;
+	volatile u32 system_control;
+	volatile u32 reset_cause;       /* 0xE0000010 */
+	volatile u32 csr;
+	volatile u32 debug_select;
+	volatile u32 l2m_int;
+	volatile u32 l2m_int_mask;      /* 0xE0000020 */
+	volatile u32 l2d_int;
+	volatile u32 l2d_int_mask;
+	volatile u32 m2l_int;
+	volatile u32 m2l_int_mask;      /* 0xE0000030 */
+	volatile u32 m2d_int;
+	volatile u32 m2d_int_mask;
+	volatile u32 d2l_int;
+	volatile u32 d2l_int_mask;      /* 0xE0000040 */
+	volatile u32 d2m_int;
+	volatile u32 d2m_int_mask;
+	volatile u32 lhost_int_en;
+	volatile u32 muc_int_en;        /* 0xE0000050 */
+	volatile u32 dsp_int_en;
+	volatile u32 lhost_int_or_en;
+	volatile u32 muc_int_or_en;
+	volatile u32 dsp_int_or_en;     /* 0xE0000060 */
+	volatile u32 muc_remap;
+	volatile u32 dsp_remap;
+	volatile u32 pcie_cfg_0;
+	volatile u32 pcie_cfg_1;        /* 0xE0000070 */
+	volatile u32 pcie_cfg_2;
+	volatile u32 pcie_cfg_3;
+	volatile u32 pcie_cfg_4;
+	volatile u32 pll0_ctrl;         /* 0xE0000080 */
+	volatile u32 pll1_ctrl;
+	volatile u32 proc_id;
+	volatile u32 pll2_ctrl;
+	volatile u32 reserved1;         /* 0xE0000090 */
+	volatile u32 l2m_sem;
+	volatile u32 m2l_sem;
+	volatile u32 l2d_sem;
+	volatile u32 d2l_sem;           /* 0xE00000A0 */
+	volatile u32 m2d_sem;
+	volatile u32 d2m_sem;
+	volatile u32 intr_inv0;
+	volatile u32 intr_inv1;         /* 0xE00000B0 */
+	volatile u32 gmii_clkdll;
+	volatile u32 debug_bus;
+	volatile u32 spare;
+	volatile u32 pcie_int_mask;     /* 0xE00000C0 */
+} __attribute__ ((packed));
+
+#define NETDEV_F_ALLOC		0x0001	/* dev allocated */
+#define	NETDEV_F_VALID		0x0002	/* dev is valid */
+#define	NETDEV_F_RUNNING	0x0004	/* dev is running */
+#define	NETDEV_F_PROMISC	0x0008	/* dev is in promiscuous mode */
+#define	NETDEV_F_ALLMULTI	0x0010
+#define	NETDEV_F_UP		0x0020	/* dev is up */
+#define	NETDEV_F_EXTERNAL	0x0040	/* dev is exposed to tcp/ip stack */
+
+#define SCAN_BASEBAND_RESET	0x0000
+#define SCAN_CHAN_CHANGE	0x0001
+
+extern void enable_host_irq(int devid, int irq);
+extern void disable_host_irq(int devid, int irq);
+
+#define BB_BASE_ADDR(_i)	(0xE6000000 + (_i * 0x800000))
+
+#define BB_SPI_BASE(_i)		(BB_BASE_ADDR(_i) + 0x40000)
+#define BB_RF_BASE(_i)		(BB_BASE_ADDR(_i) + 0x70000)
+#define BB_RDR_BASE(_i)		(BB_BASE_ADDR(_i) + 0x80000)
+
+/*
+ * Define RFIC version register.
+ * Expected to map across multiple versions of the RFIC
+ */
+
+#define RFIC_VERSION				(BB_SPI_BASE(0) + 0X0018)
+
+/*Define SPI registers */
+
+#define SPI_VCO_FREQ_CC_OUTPUT(_i)		(BB_SPI_BASE(_i) + 0X0004)
+#define SPI_LX_PLL_COUNTER_DATA_LSB(_i)		(BB_SPI_BASE(_i) + 0X0008)
+#define SPI_LX_PLL_COUNTER_DATA_MSB(_i)		(BB_SPI_BASE(_i) + 0X000C)
+#define SPI_RC_TUNING_DATA_OUT(_i)		(BB_SPI_BASE(_i) + 0X0010)
+#define SPI_CTRL_DATA_AGC_TST(_i)		(BB_SPI_BASE(_i) + 0X00C4)
+#define SPI_READ_AGC_RX1(_i)			(BB_SPI_BASE(_i) + 0X00C8)
+#define SPI_READ_AGC_RX2(_i)			(BB_SPI_BASE(_i) + 0X00CC)
+#define SPI_RX12_AGC_OUT(_i)			(BB_SPI_BASE(_i) + 0X00D0)
+#define SPI_ET_DAC_TX12(_i)			(BB_SPI_BASE(_i) + 0X00D4)
+#define SPI_RX1_DAC_I(_i)			(BB_SPI_BASE(_i) + 0X00D8)
+#define SPI_RX1_DAC_Q(_i)			(BB_SPI_BASE(_i) + 0X00DC)
+#define SPI_RX2_DAC_I(_i)			(BB_SPI_BASE(_i) + 0X00E0)
+#define SPI_RX2_DAC_Q(_i)			(BB_SPI_BASE(_i) + 0X00E4)
+#define SPI_PDN_RX_BUS_CTRL_BUS_1(_i)		(BB_SPI_BASE(_i) + 0X00E8)
+#define SPI_PDN_RX_BUS_CTRL_BUS_2(_i)		(BB_SPI_BASE(_i) + 0X00EC)
+#define SPI_PDN_RX_BUS_CTRL_BUS_3(_i)		(BB_SPI_BASE(_i) + 0x00F0)
+#define SPI_PDN_RX_BUS_CTRL_BUS_4(_i)		(BB_SPI_BASE(_i) + 0x00F4)
+#define SPI_MUX_IN(_i)				(BB_SPI_BASE(_i) + 0x00F8)
+#define SPI_MUX_OUT(_i)				(BB_SPI_BASE(_i) + 0x00FC)
+#define SPI_DAC_RX1TB1_I(_i)			(BB_SPI_BASE(_i) + 0x0100)
+#define SPI_DAC_RX1TB2_I(_i)			(BB_SPI_BASE(_i) + 0x0104)
+#define SPI_DAC_RX1TB3_I(_i)			(BB_SPI_BASE(_i) + 0x0108)
+#define SPI_DAC_RX1TB4_I(_i)			(BB_SPI_BASE(_i) + 0x010C)
+#define SPI_DAC_RX1TB1_Q(_i)			(BB_SPI_BASE(_i) + 0x0110)
+#define SPI_DAC_RX1TB2_Q(_i)			(BB_SPI_BASE(_i) + 0x0114)
+#define SPI_DAC_RX1TB3_Q(_i)			(BB_SPI_BASE(_i) + 0x0118)
+#define SPI_DAC_RX1TB4_Q(_i)			(BB_SPI_BASE(_i) + 0x011C)
+#define SPI_DAC_RX2TB1_I(_i)			(BB_SPI_BASE(_i) + 0x0120)
+#define SPI_DAC_RX2TB2_I(_i)			(BB_SPI_BASE(_i) + 0x0124)
+#define SPI_DAC_RX2TB3_I(_i)			(BB_SPI_BASE(_i) + 0x0128)
+#define SPI_DAC_RX2TB4_I(_i)			(BB_SPI_BASE(_i) + 0x012C)
+#define SPI_DAC_RX2TB1_Q(_i)			(BB_SPI_BASE(_i) + 0x0130)
+#define SPI_DAC_RX2TB2_Q(_i)			(BB_SPI_BASE(_i) + 0x0134)
+#define SPI_DAC_RX2TB3_Q(_i)			(BB_SPI_BASE(_i) + 0x0138)
+#define SPI_DAC_RX2TB4_Q(_i)			(BB_SPI_BASE(_i) + 0x013C)
+#define SPI_RX_PDN_11_0(_i)			(BB_SPI_BASE(_i) + 0x0140)
+#define SPI_RX_PDN_23_12(_i)			(BB_SPI_BASE(_i) + 0x0144)
+#define SPI_TX1_PDN_11_0(_i)			(BB_SPI_BASE(_i) + 0x0148)
+#define SPI_TX1_PDN_23_12(_i)			(BB_SPI_BASE(_i) + 0x014C)
+#define SPI_TX2_PDN_11_0(_i)			(BB_SPI_BASE(_i) + 0X0150)
+#define SPI_TX2_PDN_23_12(_i)			(BB_SPI_BASE(_i) + 0X0154)
+#define SPI_ALX_PDN_11_0(_i)			(BB_SPI_BASE(_i) + 0X0158)
+#define SPI_ALX_PDN_23_12(_i)			(BB_SPI_BASE(_i) + 0X015C)
+#define SPI_PDN_VAL_23_0(_i)			(BB_SPI_BASE(_i) + 0X0160)
+#define SPI_RX_CAL_OVRD_VAL(_i)			(BB_SPI_BASE(_i) + 0X0164)
+#define SPI_AGC_CTRL_DAC_RC_TST(_i)		(BB_SPI_BASE(_i) + 0X0168)
+#define SPI_PLL_FRACTIONAL(_i)			(BB_SPI_BASE(_i) + 0X016C)
+#define SPI_PLL_N_CH(_i)			(BB_SPI_BASE(_i) + 0X0170)
+#define SPI_CP_D_U_VCO(_i)			(BB_SPI_BASE(_i) + 0X0174)
+#define SPI_VCO_CLK_PFD_LPF(_i)			(BB_SPI_BASE(_i) + 0X0178)
+#define SPI_BG_BIAS_EXT_PTAT(_i)		(BB_SPI_BASE(_i) + 0X017C)
+#define SPI_CURR_OPT_DAC_TX_RX_SSB(_i)		(BB_SPI_BASE(_i) + 0X0180)
+#define SPI_RXMX_BBMX_VBIAS_ADJ(_i)		(BB_SPI_BASE(_i) + 0X0184)
+#define SPI_TX_SSB_DAC(_i)			(BB_SPI_BASE(_i) + 0X0188)
+#define SPI_BYP_PWR_OFS_PROBE_IQ(_i)		(BB_SPI_BASE(_i) + 0X018C)
+#define SPI_LNA12_GAIN_FREQ_CURR_LOOPBK(_i)	(BB_SPI_BASE(_i) + 0X0190)
+#define SPI_ICT_WCT_TX1_PA(_i)			(BB_SPI_BASE(_i) + 0X0194)
+#define SPI_ICT_WCT_TX2_PA(_i)			(BB_SPI_BASE(_i) + 0X0198)
+#define SPI_GCT_FCT_TX1_PA(_i)			(BB_SPI_BASE(_i) + 0X019C)
+#define SPI_WCT_TX12_PA(_i)			(BB_SPI_BASE(_i) + 0X01A0)
+#define SPI_MOD_ICT_ABS_VRRP(_i)		(BB_SPI_BASE(_i) + 0X01A4)
+#define SPI_MOD_CCT_RCT(_i)			(BB_SPI_BASE(_i) + 0X01A8)
+#define SPI_MOD_LO_GCT_TX_1MA(_i)		(BB_SPI_BASE(_i) + 0X01AC)
+#define SPI_MODDAC_1M_IQ(_i)			(BB_SPI_BASE(_i) + 0X01B0)
+#define SPI_MODDAC_1A_IQ(_i)			(BB_SPI_BASE(_i) + 0X01B4)
+#define SPI_MOD_LO_GCT_TX_2MA(_i)		(BB_SPI_BASE(_i) + 0X01B8)
+#define SPI_MODDAC_2M_IQ(_i)			(BB_SPI_BASE(_i) + 0X01BC)
+#define SPI_MODDAC_2A_IQ(_i)			(BB_SPI_BASE(_i) + 0X01C0)
+#define SPI_RX12_MUX_DATA_CNTL(_i)		(BB_SPI_BASE(_i) + 0X01C4)
+
+// timer register definition
+#define ARM_TIMER_BASE_ADDR				(0XF3000000)
+#define ARM_TIMER_MEM_LEN					(0x30)
+#define ARM_TIMER_PRESCALE_EN				(0x0000)
+#define ARM_TIMER_PRESCALE_0				(0x0004)
+#define ARM_TIMER_PRESCALE_1				(0x0008)
+#define ARM_TIMER_CTL(_i)					(0x000c + (_i)*8)
+#define ARM_TIMER_ENABLE					(QTN_BIT(0))
+#define ARM_TIMER_PERIODIC					(QTN_BIT(1))
+#define ARM_TIMER_PRESCALER_1				(QTN_BIT(2))
+
+#define ARM_TIMER_CNT(_i)					(0x0010 + (_i)*8)
+
+#if CONFIG_RUBY
+#define  QT3_BB_GLBL_SOFT_RST		0xE6000008
+#define  QT3_BB_TD_PA_CONF		0xE609048C
+
+/* The following definitions used to install the steering vectors */
+#define QT3_RF_NUM_CHAINS		4
+#define QT3_BB_Q_MATRIX_MEM		0xE6100000
+#define QT3_BB_Q_MATRIX_SIZE		0x8000
+#endif
+
+#endif /* _QTN_REGISTERS_H */
diff --git a/quantenna/include/qtn/ruby_cpumon.h b/quantenna/include/qtn/ruby_cpumon.h
new file mode 100644
index 0000000..07f6fdb
--- /dev/null
+++ b/quantenna/include/qtn/ruby_cpumon.h
@@ -0,0 +1,49 @@
+/*SH0
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2012 Quantenna Communications, Inc.                 **
+**                            All Rights Reserved                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH0*/
+
+#ifndef __QTN_CPUMON_H
+#define __QTN_CPUMON_H
+
+void ruby_cpumon_get_cycles(uint64_t *sleep, uint64_t *awake);
+
+#endif	/* __QTN_CPUMON_H */
+
diff --git a/quantenna/include/qtn/semaphores.h b/quantenna/include/qtn/semaphores.h
new file mode 100644
index 0000000..0f69b29
--- /dev/null
+++ b/quantenna/include/qtn/semaphores.h
@@ -0,0 +1,58 @@
+/*SH1
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2011 Quantenna Communications Inc                   **
+**                            All Rights Reserved                            **
+**                                                                           **
+**  Author      : Quantenna Communications Inc                               **
+**  File        : semaphores.h                                               **
+**  Description :                                                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH1*/
+
+#ifndef _QTN_SEMAPHORES_H_
+#define _QTN_SEMAPHORES_H_
+
+
+#define QTN_SEM_HOST_LINK_SEMNUM	0
+#define QTN_SEM_NUMFREESEM		31
+#define QTN_SEM_BB_MUTEX_SEMNUM		31
+
+
+#endif // #ifndef _QTN_SEMAPHORES_H_
+
+
diff --git a/quantenna/include/qtn/shared_defs.h b/quantenna/include/qtn/shared_defs.h
new file mode 100644
index 0000000..8f9a9e6
--- /dev/null
+++ b/quantenna/include/qtn/shared_defs.h
@@ -0,0 +1,691 @@
+/*SH1
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2010 Quantenna Communications Inc                   **
+**                            All Rights Reserved                            **
+**                                                                           **
+**  Author      : Quantenna Communications Inc                               **
+**  File        : shared_params.h                                            **
+**  Description :                                                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH1*/
+
+#ifndef _SHARED_DEFS_H_
+#define _SHARED_DEFS_H_
+
+#include "shared_defs_common.h"
+
+#define QTN_SWITCH_CHANNEL_TIME_AVG	3750	/* microseconds */
+
+#define IEEE80211_MAX_NAV	32767
+
+/* SCS (ACI/CCI Detection and Mitigation) APIs */
+enum qtn_vap_scs_cmds {
+	IEEE80211_SCS_SET_ENABLE = 1,
+	IEEE80211_SCS_SET_DEBUG_ENABLE,
+	IEEE80211_SCS_SET_SAMPLE_ENABLE,
+	IEEE80211_SCS_SET_SAMPLE_DWELL_TIME,
+	IEEE80211_SCS_SET_SAMPLE_INTERVAL,
+	IEEE80211_SCS_SET_THRSHLD_SMPL_PKTNUM,
+	IEEE80211_SCS_SET_THRSHLD_PRI_CCA,
+	IEEE80211_SCS_SET_THRSHLD_SEC_CCA,
+	IEEE80211_SCS_SET_THRSHLD_SMPL_AIRTIME,
+	IEEE80211_SCS_SET_WF_CCA,
+	IEEE80211_SCS_SET_WF_RSSI,
+	IEEE80211_SCS_SET_WF_CRC_ERR,
+	IEEE80211_SCS_SET_WF_LPRE,
+	IEEE80211_SCS_SET_WF_SPRE,
+	IEEE80211_SCS_SET_WF_RETRIES,
+	IEEE80211_SCS_SET_WF_DFS,
+	IEEE80211_SCS_SET_WF_MAX_TX_PWR,
+	IEEE80211_SCS_SET_REPORT_ONLY,
+	IEEE80211_SCS_SET_CCA_INTF_RATIO,
+	IEEE80211_SCS_SET_CCA_IDLE_THRSHLD,
+	IEEE80211_SCS_SET_CCA_INTF_LO_THR,
+	IEEE80211_SCS_SET_CCA_INTF_HI_THR,
+	IEEE80211_SCS_SET_CCA_SMPL_DUR,
+	IEEE80211_SCS_GET_REPORT,
+	IEEE80211_SCS_GET_INTERNAL_STATS,
+	IEEE80211_SCS_SET_CCA_INTF_SMTH_FCTR,
+	IEEE80211_SCS_RESET_RANKING_TABLE,
+	IEEE80211_SCS_SET_CHAN_MTRC_MRGN,
+	IEEE80211_SCS_SET_RSSI_SMTH_FCTR,
+	IEEE80211_SCS_SET_ATTEN_ADJUST,
+	IEEE80211_SCS_SET_ATTEN_SWITCH_ENABLE,
+	IEEE80211_SCS_SET_THRSHLD_ATTEN_INC,
+	IEEE80211_SCS_SET_THRSHLD_DFS_REENTRY,
+	IEEE80211_SCS_SET_THRSHLD_DFS_REENTRY_MINRATE,
+	IEEE80211_SCS_SET_PMBL_ERR_SMTH_FCTR,
+	IEEE80211_SCS_SET_PMBL_ERR_RANGE,
+	IEEE80211_SCS_SET_PMBL_ERR_MAPPED_INTF_RANGE,
+	IEEE80211_SCS_SET_THRSHLD_LOAD,
+	IEEE80211_SCS_SET_PMBL_ERR_WF,
+	IEEE80211_SCS_SET_THRSHLD_AGING_NOR,
+	IEEE80211_SCS_SET_THRSHLD_AGING_DFSREENT,
+	IEEE80211_SCS_SET_THRSHLD_DFS_REENTRY_INTF,
+	IEEE80211_SCS_SET_PMP_RPT_CCA_SMTH_FCTR,
+	IEEE80211_SCS_SET_PMP_RX_TIME_SMTH_FCTR,
+	IEEE80211_SCS_SET_PMP_TX_TIME_SMTH_FCTR,
+	IEEE80211_SCS_SET_PMP_STATS_STABLE_PERCENT,
+	IEEE80211_SCS_SET_PMP_STATS_STABLE_RANGE,
+	IEEE80211_SCS_SET_PMP_STATS_CLEAR_INTERVAL,
+	IEEE80211_SCS_SET_PMP_TXTIME_COMPENSATION,
+	IEEE80211_SCS_SET_PMP_RXTIME_COMPENSATION,
+	IEEE80211_SCS_SET_PMP_TDLSTIME_COMPENSATION,
+	IEEE80211_SCS_SET_SWITCH_CHANNEL_MANUALLY,
+	IEEE80211_SCS_SET_AS_RX_TIME_SMTH_FCTR,
+	IEEE80211_SCS_SET_AS_TX_TIME_SMTH_FCTR,
+	IEEE80211_SCS_SET_STATS_START,
+	IEEE80211_SCS_SET_CCA_IDLE_SMTH_FCTR,
+	IEEE80211_SCS_SET_PMBL_ERR_THRSHLD,
+	IEEE80211_SCS_SET_CCA_INTF_DFS_MARGIN,
+	IEEE80211_SCS_SET_LEAVE_DFS_CHAN_MTRC_MRGN,
+	IEEE80211_SCS_SET_CCA_THRESHOLD_TYPE,
+	IEEE80211_SCS_SET_MAX
+};
+
+#define IEEE80211_SCS_STATE_INIT			0
+#define IEEE80211_SCS_STATE_RESET			1
+#define IEEE80211_SCS_STATE_CHANNEL_SWITCHING		2
+#define IEEE80211_SCS_STATE_MEASUREMENT_CHANGE_CLEAN	3    /* param change */
+#define IEEE80211_SCS_STATE_PERIOD_CLEAN		4
+
+#define IEEE80211_SCS_COMPARE_INIT_TIMER	5
+#define IEEE80211_SCS_COMPARE_TIMER_INTVAL	2
+#define IEEE80211_CCA_SAMPLE_DUR		IEEE80211_SCS_COMPARE_TIMER_INTVAL /* seconds */
+#define IEEE80211_SCS_CHAN_CURRENT		0
+#define IEEE80211_SCS_CHAN_ALL			0xFF
+#define IEEE80211_SCS_THRSHLD_MAX		100	/* metric */
+#define IEEE80211_SCS_THRSHLD_MIN		1	/* metric */
+#define IEEE80211_SCS_SMPL_DWELL_TIME_MAX	24	/* milliseconds, limited by max NAV reservation */
+#define IEEE80211_SCS_SMPL_DWELL_TIME_MIN	5	/* milliseconds */
+#define IEEE80211_SCS_SMPL_DWELL_TIME_DEFAULT	10	/* milliseconds */
+#define IEEE80211_SCS_SMPL_INTV_MAX		3600	/* seconds */
+#define IEEE80211_SCS_SMPL_INTV_MIN		1	/* seconds */
+#define IEEE80211_SCS_SMPL_INTV_DEFAULT		5	/* seconds */
+#define IEEE80211_SCS_THRSHLD_SMPL_PKTNUM_DEFAULT	16	/* packet number */
+#define IEEE80211_SCS_THRSHLD_SMPL_PKTNUM_MAX	1000	/* packet number */
+#define IEEE80211_SCS_THRSHLD_SMPL_PKTNUM_MIN	1	/* packet number */
+#define IEEE80211_SCS_THRSHLD_SMPL_AIRTIME_DEFAULT	200	/* ms */
+#define IEEE80211_SCS_THRSHLD_SMPL_AIRTIME_MAX	1000	/* ms */
+#define IEEE80211_SCS_THRSHLD_SMPL_AIRTIME_MIN	1	/* ms */
+#define IEEE80211_SCS_THRSHLD_PMBL_ERR_MAX	10000	/* count */
+#define IEEE80211_SCS_THRSHLD_PMBL_ERR_MIN	1	/* count */
+
+/*
+ * Packet rate threshold is determined by how many packets we can hold in buffer without drop
+ * during off-channel period. It is limited by:
+ * - sw queue length of each node/tid
+ * - global resource shared by all node/tid, such as tqew descriptors and msdu headers.
+ * Current value doesn't apply to the scenario when tqew descriptors are already used up by large
+ * number of stations.
+ */
+#define IEEE80211_SCS_THRSHLD_SMPL_TX_PKTRATE	(1024 - 128)	/* margin = 128 + hw ring size */
+#define IEEE80211_SCS_THRSHLD_SMPL_RX_PKTRATE	IEEE80211_SCS_THRSHLD_SMPL_TX_PKTRATE /* assume qtn peer */
+#define IEEE80211_SCS_THRSHLD_ATTEN_INC_DFT	5	/* db */
+#define IEEE80211_SCS_THRSHLD_ATTEN_INC_MIN     0       /* db */
+#define IEEE80211_SCS_THRSHLD_ATTEN_INC_MAX     20      /* db */
+#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_DFT	60	/* seconds */
+#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_MIN   0       /* seconds */
+#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_MAX   0xffff  /* seconds */
+#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_INTF_MIN   0
+#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_INTF_MAX   100
+#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_INTF_DFT   40
+#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_MINRATE_UNIT	100	/* kbps */
+#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_MINRATE_DFT	5	/* unit: 100kbps */
+#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_MINRATE_MIN   0       /* unit: 100kbps */
+#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_MINRATE_MAX   0xffff  /* unit: 100kbps */
+#define IEEE80211_SCS_THRSHLD_AGING_MIN         0
+#define IEEE80211_SCS_THRSHLD_AGING_MAX         0xFFFF
+#define IEEE80211_SCS_THRSHLD_AGING_NOR_DFT     (60 * 6)
+#define IEEE80211_SCS_THRSHLD_AGING_DFSREENT_DFT  5
+#define IEEE80211_SCS_CCA_DUR_MAX		10	/* seconds */
+#define IEEE80211_SCS_CCA_DUR_MIN		2	/* seconds */
+#define IEEE80211_SCS_CCA_INTF_SCALE		1000	/* milliseconds */
+#define IEEE80211_SCS_SENDING_QOSNULL_TIME_AVG	1000	/* microseconds */
+#define IEEE80211_SCS_SMPL_TIME_MARGIN		2000	/* microseconds */
+#define IEEE80211_SCS_SMPL_TIME_OFFSET_SEND_QOSNULL	5000	/* microseconds */
+#define IEEE80211_SCS_SMPL_TIME_SENDING_ALL_BEACONS	25000	/* microseconds, the time duration for transmitting all beacons */
+#define IEEE80211_CCA_INTF_SMTH_FCTR_NOXP_DFT	75
+#define IEEE80211_CCA_INTF_SMTH_FCTR_XPED_DFT	90
+#define IEEE80211_CCA_INTF_SMTH_FCTR_MIN	0
+#define IEEE80211_CCA_INTF_SMTH_FCTR_MAX	100
+#define IEEE80211_SCS_CHAN_MTRC_MRGN_MAX	100
+#define IEEE80211_SCS_CHAN_MTRC_MRGN_DFT	15
+#define IEEE80211_SCS_LEAVE_DFS_CHAN_MTRC_MRGN_DFT	25
+#define IEEE80211_SCS_RSSI_SMTH_FCTR_UP_DFT	75
+#define IEEE80211_SCS_RSSI_SMTH_FCTR_DOWN_DFT	25
+#define IEEE80211_SCS_RSSI_SMTH_FCTR_MAX	100
+#define IEEE80211_SCS_ATTEN_ADJUST_MIN		-20
+#define IEEE80211_SCS_ATTEN_ADJUST_MAX		20
+#define IEEE80211_SCS_ATTEN_ADJUST_DFT		5
+#define IEEE80211_SCS_BRCM_RXGLITCH_THRSHLD_SCALE_DFT    40
+#define IEEE80211_SCS_PMBL_ERR_SMTH_FCTR_MIN    0
+#define IEEE80211_SCS_PMBL_ERR_SMTH_FCTR_MAX    100
+#define IEEE80211_SCS_PMBL_ERR_SMTH_FCTR_DFT    66
+#define IEEE80211_SCS_CCA_IDLE_SMTH_FCTR_MIN    0
+#define IEEE80211_SCS_CCA_IDLE_SMTH_FCTR_MAX    100
+#define IEEE80211_SCS_CCA_IDLE_SMTH_FCTR_DFT    50
+#define IEEE80211_SCS_PMP_RPT_CCA_SMTH_FCTR_MAX    100
+#define IEEE80211_SCS_PMP_RPT_CCA_SMTH_FCTR_DFT    66
+#define IEEE80211_SCS_PMP_RX_TIME_SMTH_FCTR_MAX    100
+#define IEEE80211_SCS_PMP_RX_TIME_SMTH_FCTR_DFT    66
+#define IEEE80211_SCS_PMP_TX_TIME_SMTH_FCTR_MAX    100
+#define IEEE80211_SCS_PMP_TX_TIME_SMTH_FCTR_DFT    66
+#define IEEE80211_SCS_PMP_STATS_STABLE_PERCENT_MAX  100
+#define IEEE80211_SCS_PMP_STATS_STABLE_PERCENT_DFT  30
+#define IEEE80211_SCS_PMP_STATS_STABLE_RANGE_MAX    1000
+#define IEEE80211_SCS_PMP_STATS_STABLE_RANGE_DFT    50
+#define IEEE80211_SCS_PMP_STATS_CLEAR_INTERVAL_MAX  3600 /* seconds */
+#define IEEE80211_SCS_PMP_STATS_CLEAR_INTERVAL_DFT  60 /* seconds */
+#define IEEE80211_SCS_AS_RX_TIME_SMTH_FCTR_MAX    100
+#define IEEE80211_SCS_AS_RX_TIME_SMTH_FCTR_DFT    50
+#define IEEE80211_SCS_AS_TX_TIME_SMTH_FCTR_MAX    100
+#define IEEE80211_SCS_AS_TX_TIME_SMTH_FCTR_DFT    50
+
+#define IEEE80211_SCS_SMTH_RBS_TIME			80
+
+#define IEEE80211_SCS_PMBL_ERR_RANGE_MIN        1000
+#define IEEE80211_SCS_PMBL_ERR_RANGE_MAX        0xFFFF
+#define IEEE80211_SCS_PMBL_ERR_RANGE_DFT        5000
+#define IEEE80211_SCS_PMBL_ERR_MAPPED_INTF_RANGE_MIN  0
+#define IEEE80211_SCS_PMBL_ERR_MAPPED_INTF_RANGE_MAX  100
+#define IEEE80211_SCS_PMBL_ERR_MAPPED_INTF_RANGE_DFT  40
+#define IEEE80211_SCS_PMBL_ERR_WF_MIN           0
+#define IEEE80211_SCS_PMBL_ERR_WF_MAX           100
+#define IEEE80211_SCS_PMBL_SHORT_WF_DFT         0
+#define IEEE80211_SCS_PMBL_LONG_WF_DFT          100
+#define IEEE80211_SCS_THRSHLD_LOADED_MIN        0
+#define IEEE80211_SCS_THRSHLD_LOADED_MAX        1000
+#define IEEE80211_SCS_THRSHLD_LOADED_DFT        20
+
+#define IEEE80211_SCS_CHAN_POWER_CUTPOINT       15
+#define IEEE80211_SCS_NORMALIZE(_v, _duration)       (((_v) < (0xFFFFFFFF / IEEE80211_SCS_CCA_INTF_SCALE)) ?  \
+							((_v) * IEEE80211_SCS_CCA_INTF_SCALE / (_duration)) : \
+							((_v) / (_duration) * IEEE80211_SCS_CCA_INTF_SCALE))
+
+#define IEEE80211_SCS_SMOOTH(_old, _new, _fctr)	(((_old) * (_fctr) + (_new) * (100 - (_fctr))) / 100)
+
+#define IEEE80211_SCS_OFFCHAN_WHOLE_DUR(_dwell_us)	((_dwell_us) +					\
+							(2 * QTN_SWITCH_CHANNEL_TIME_AVG) +		\
+							IEEE80211_SCS_SENDING_QOSNULL_TIME_AVG +	\
+							IEEE80211_SCS_SMPL_TIME_MARGIN)
+
+#define IEEE80211_SCS_VALUE_S			0
+#define IEEE80211_SCS_VALUE_M			0xffff
+#define IEEE80211_SCS_WF_VALUE_M		0xff
+#define IEEE80211_SCS_COMMAND_S			16
+#define IEEE80211_SCS_COMMAND_M			0xffff
+
+#define IEEE80211_SCS_NA_CC			0x0
+#define IEEE80211_SCS_STA_CCA_REQ_CC		0x1
+#define IEEE80211_SCS_SELF_CCA_CC               0x2
+#define IEEE80211_SCS_ATTEN_INC_CC		0x4
+#define IEEE80211_SCS_BRCM_STA_TRIGGER_CC	0x8
+#define IEEE80211_SCS_CCA_INTF_CC               (IEEE80211_SCS_STA_CCA_REQ_CC | IEEE80211_SCS_SELF_CCA_CC)
+#define IEEE80211_SCS_INTF_CC                   (IEEE80211_SCS_CCA_INTF_CC | IEEE80211_SCS_BRCM_STA_TRIGGER_CC)
+
+#define	IEEE80211_REMAIN_CHAN_MIN_RSV_PERD	2
+
+enum ieee80211_scs_update_mode {
+	IEEE80211_SCS_OFFCHAN,		/* off-channel, use smoothing and omit current channel */
+	IEEE80211_SCS_COCHAN,		/* co-channel mode */
+	IEEE80211_SCS_INIT_SCAN,	/* like off-channel but include current channel */
+};
+
+#define SCSLOG_CRIT                             0
+#define SCSLOG_NOTICE                           1
+#define SCSLOG_INFO                             2
+#define SCSLOG_VERBOSE                          3
+#define SCSLOG_LEVEL_MAX                        3
+#if !defined(MUC_BUILD) && !defined(DSP_BUILD) && !defined(AUC_BUILD)
+#define SCSDBG(_level, _fmt, ...)            do {               \
+		if (ic->ic_scs.scs_debug_enable >= (_level)) {  \
+			DBGFN("SCS: " _fmt, ##__VA_ARGS__);     \
+		}                                               \
+	} while (0)
+#endif
+
+
+/* OCAC (Off-channel CAC) APIs */
+enum qtn_ocac_cmds {
+	IEEE80211_OCAC_SET_ENABLE = 1,
+	IEEE80211_OCAC_SET_DISABLE,
+	IEEE80211_OCAC_SET_DEBUG_LEVEL,
+	IEEE80211_OCAC_SET_DWELL_TIME,
+	IEEE80211_OCAC_SET_DURATION,
+	IEEE80211_OCAC_SET_THRESHOLD_FAT,
+	IEEE80211_OCAC_SET_DUMP_COUNTS,
+	IEEE80211_OCAC_SET_CAC_TIME,
+	IEEE80211_OCAC_SET_THRESHOLD_TRAFFIC,
+	IEEE80211_OCAC_SET_TIMER_INTERVAL,
+	IEEE80211_OCAC_SET_DUMP_TSFLOG,
+	IEEE80211_OCAC_SET_DUMP_CFG,
+	IEEE80211_OCAC_SET_TRAFFIC_CONTROL,
+	IEEE80211_OCAC_SET_THRESHOLD_CCA_INTF,
+	IEEE80211_OCAC_SET_REPORT_ONLY,
+	IEEE80211_OCAC_SET_DUMP_CCA_COUNTS,
+	IEEE80211_OCAC_SET_OFFSET_TXHALT,
+	IEEE80211_OCAC_SET_OFFSET_OFFCHAN,
+	IEEE80211_OCAC_SET_THRESHOLD_FAT_DEC,
+	IEEE80211_OCAC_SET_TIMER_EXPIRE_INIT,
+	IEEE80211_OCAC_SET_SECURE_DWELL_TIME,
+	IEEE80211_OCAC_SET_BEACON_INTERVAL,
+	IEEE80211_OCAC_SET_WEATHER_DURATION,
+	IEEE80211_OCAC_SET_WEATHER_CAC_TIME,
+	IEEE80211_OCAC_SET_WEATHER_DWELL_TIME,
+	IEEE80211_OCAC_SET_MAX
+};
+
+enum qtn_ocac_get_cmds {
+	IEEE80211_OCAC_GET_STATUS = 1,
+	IEEE80211_OCAC_GET_AVAILABILITY,
+};
+
+#define IEEE80211_OCAC_CLEAN_STATS_STOP		0
+#define IEEE80211_OCAC_CLEAN_STATS_START	1
+#define IEEE80211_OCAC_CLEAN_STATS_RESET	2
+
+
+#define IEEE80211_OCAC_DWELL_TIME_MIN		5	/* milliseconds */
+#define IEEE80211_OCAC_DWELL_TIME_MAX		200	/* milliseconds */
+#define IEEE80211_OCAC_DWELL_TIME_DEFAULT	40	/* milliseconds */
+#define IEEE80211_OCAC_WEA_DWELL_TIME_DEFAULT	20	/* milliseconds */
+
+#define IEEE80211_OCAC_SECURE_DWELL_TIME_MIN		5	/* milliseconds */
+#define IEEE80211_OCAC_SECURE_DWELL_TIME_MAX		23	/* milliseconds */
+#define IEEE80211_OCAC_SECURE_DWELL_TIME_DEFAULT	23	/* milliseconds */
+
+#define IEEE80211_OCAC_DURATION_MIN		1	/* seconds */
+#define IEEE80211_OCAC_DURATION_MAX		64800	/* seconds */
+#define IEEE80211_OCAC_DURATION_DEFAULT		720	/* seconds */
+
+#define IEEE80211_OCAC_CAC_TIME_MIN		1	/* seconds */
+#define IEEE80211_OCAC_CAC_TIME_MAX		64800	/* seconds */
+#define IEEE80211_OCAC_CAC_TIME_DEFAULT		240	/* seconds */
+
+#define IEEE80211_OCAC_WEA_DURATION_MIN		60	/* seconds */
+#define IEEE80211_OCAC_WEA_DURATION_MAX		86400	/* seconds */
+#define IEEE80211_OCAC_WEA_DURATION_DEFAULT	11520	/* seconds */
+
+#define IEEE80211_OCAC_WEA_CAC_TIME_MIN		1	/* seconds */
+#define IEEE80211_OCAC_WEA_CAC_TIME_MAX		86400	/* seconds */
+#define IEEE80211_OCAC_WEA_CAC_TIME_DEFAULT	1920	/* seconds */
+
+#define IEEE80211_OCAC_THRESHOLD_FAT_MIN	1	/* percent */
+#define IEEE80211_OCAC_THRESHOLD_FAT_MAX	100	/* percent */
+#define IEEE80211_OCAC_THRESHOLD_FAT_DEFAULT	90	/* percent */
+
+#define IEEE80211_OCAC_THRESHOLD_TRAFFIC_MIN		1	/* percent */
+#define IEEE80211_OCAC_THRESHOLD_TRAFFIC_MAX		100	/* percent */
+#define IEEE80211_OCAC_THRESHOLD_TRAFFIC_DEFAULT	30	/* percent */
+
+#define IEEE80211_OCAC_OFFSET_TXHALT_MIN		2	/* milliseconds */
+#define IEEE80211_OCAC_OFFSET_TXHALT_MAX		80	/* milliseconds */
+#define IEEE80211_OCAC_OFFSET_TXHALT_DEFAULT		10	/* milliseconds */
+
+#define IEEE80211_OCAC_OFFSET_OFFCHAN_MIN		2	/* milliseconds */
+#define IEEE80211_OCAC_OFFSET_OFFCHAN_MAX		80	/* milliseconds */
+#define IEEE80211_OCAC_OFFSET_OFFCHAN_DEFAULT		5	/* milliseconds */
+
+#define IEEE80211_OCAC_TRAFFIC_CTRL_DEFAULT		1	/* on */
+
+#define IEEE80211_OCAC_THRESHOLD_CCA_INTF_MIN		1	/* percent */
+#define IEEE80211_OCAC_THRESHOLD_CCA_INTF_MAX		100	/* percent */
+#define IEEE80211_OCAC_THRESHOLD_CCA_INTF_DEFAULT	20	/* percent */
+
+#define IEEE80211_OCAC_THRESHOLD_FAT_DEC_MIN		1	/* percent */
+#define IEEE80211_OCAC_THRESHOLD_FAT_DEC_MAX		100	/* percent */
+#define IEEE80211_OCAC_THRESHOLD_FAT_DEC_DEFAULT	10	/* percent */
+
+#define IEEE80211_OCAC_TIMER_INTERVAL_MIN		1	/* seconds */
+#define IEEE80211_OCAC_TIMER_INTERVAL_MAX		100	/* seconds */
+#define IEEE80211_OCAC_TIMER_INTERVAL_DEFAULT		2	/* seconds */
+
+#define IEEE80211_OCAC_BEACON_INTERVAL_MIN		100	/* TUs */
+#define IEEE80211_OCAC_BEACON_INTERVAL_MAX		1000	/* TUs */
+#define IEEE80211_OCAC_BEACON_INTERVAL_DEFAULT		100	/* TUs */
+
+#define IEEE80211_OCAC_TIMER_EXPIRE_INIT_MIN		1	/* seconds */
+#define IEEE80211_OCAC_TIMER_EXPIRE_INIT_MAX		65000	/* seconds */
+#define IEEE80211_OCAC_TIMER_EXPIRE_INIT_DEFAULT	2	/* seconds */
+
+#define	IEEE80211_OBSS_PASSIVE_DWELL_DEFAULT		20
+#define	IEEE80211_OBSS_ACTIVE_DWELL_DEFAULT		10
+#define	IEEE80211_OBSS_TRIGGER_INTERVAL_DEFAULT		200
+#define	IEEE80211_OBSS_PASSIVE_TOTAL_DEFAULT		200
+#define	IEEE80211_OBSS_ACTIVE_TOTAL_DEFAULT		20
+#define	IEEE80211_OBSS_CHANNEL_WIDTH_DELAY_DEFAULT	5
+#define	IEEE80211_OBSS_ACTIVITY_THRESHOLD_DEFAULT	25
+
+#define IEEE80211_OCAC_VALUE_S			0
+#define IEEE80211_OCAC_VALUE_M			0xffff
+#define IEEE80211_OCAC_COMMAND_S		16
+#define IEEE80211_OCAC_COMMAND_M		0xffff
+#define IEEE80211_OCAC_COMPRESS_VALUE_F		0x8000
+#define IEEE80211_OCAC_COMPRESS_VALUE_M		0x7fff
+
+#define IEEE80211_OCAC_TIME_MARGIN		2000	/* microseconds */
+
+#define OCACLOG_CRIT				0
+#define OCACLOG_WARNING				1
+#define OCACLOG_NOTICE				2
+#define OCACLOG_INFO				3
+#define OCACLOG_VERBOSE				4
+#define OCACLOG_LEVEL_MAX			4
+#if !defined(MUC_BUILD) && !defined(DSP_BUILD) && !defined(AUC_BUILD)
+#define OCACDBG(_level, _fmt, ...)            do {               \
+		if (ic->ic_ocac.ocac_cfg.ocac_debug_level >= (_level)) {  \
+			DBGFN("DFS_s_radio: " _fmt, ##__VA_ARGS__);     \
+		}                                               \
+        } while (0)
+#endif
+
+#define QTN_M2A_EVENT_TYPE_DTIM		1
+#define	QTN_M2A_PS_EVENT_PM_ENABLE	2		/* enable power management */
+#define	QTN_M2A_PS_EVENT_PM_DISABLE	3		/* disable power management */
+#define	QTN_M2A_PS_EVENT_PS_POLL	4		/* ps poll */
+#define	QTN_M2A_EVENT_TYPE_UAPSD_SP	5		/* U-APSD SP */
+#define QTN_M2A_EVENT_PTID_FLAG_SET     6               /* Set per-TID flag(muc) */
+#define QTN_M2A_EVENT_TYPE_TXBA_DISABLE	7		/* per VAP TX BA est control */
+
+/* Common definitions for flags used to indicate ieee80211_node's states */
+#define	IEEE80211_NODE_AUTH		0x0001	/* authorized for data */
+#define	IEEE80211_NODE_QOS		0x0002	/* QoS enabled */
+#define	IEEE80211_NODE_ERP		0x0004	/* ERP enabled */
+#define	IEEE80211_NODE_HT		0x0008	/* HT enabled */
+/* NB: this must have the same value as IEEE80211_FC1_PWR_MGT */
+#define	IEEE80211_NODE_PWR_MGT		0x0010	/* power save mode enabled */
+#define	IEEE80211_NODE_PS_DELIVERING	0x0040	/* STA out of PS, getting delivery */
+#define	IEEE80211_NODE_PS_POLL		0x0080	/* power save ps poll mode */
+#define	IEEE80211_NODE_AREF		0x0020	/* authentication ref held */
+#define IEEE80211_NODE_2_TX_CHAINS      0x0400  /* this node needs to use 2 TX chain only, for IOT purpose */
+#define IEEE80211_NODE_UAPSD		0x1000
+#define IEEE80211_NODE_WDS_PEER		0x2000	/* this node is the wds peer in a wds vap */
+#define IEEE80211_NODE_VHT		0x4000	/* VHT enabled */
+#define IEEE80211_NODE_TPC		0x8000	/* indicate tpc capability */
+
+/* Common definitions for ext_flags */
+#define IEEE80211_NODE_TDLS_PTI_REQ	0x0001	/* Should sending PTI request to peer */
+#define IEEE80211_NODE_TDLS_PTI_PENDING	0x0002	/* PTI request xmit to peer but not responsed */
+#define IEEE80211_NODE_UAPSD_SP_IN_PROGRESS	0x0004	/* U-APSD SP in progress */
+#define IEEE80211_NODE_TDLS_PTI_RESP	0x0008	/* PTI response frame received */
+#define	IEEE80211_NODE_TDLS_AUTH	0x0010	/* authorized for TDLS link data */
+
+#define	IEEE80211_NODE_TDLS_PTI_MASK	0x000B	/* Mask for TDLS PTI bits */
+
+#define QTN_VAP_PRIORITY_RESERVED	2	/* reserve the low values for internal use */
+#define QTN_VAP_PRIORITY_NUM		4
+#define QTN_VAP_PRIORITY_MGMT		(QTN_VAP_PRIORITY_RESERVED + QTN_VAP_PRIORITY_NUM)
+#define QTN_TACMAP_HW_PRI_NUM		8	/* hw limitation for 128 node mode */
+#define QTN_TACMAP_PRI_PER_VAP		8	/* for maximum 8 TIDs */
+#define QTN_TACMAP_SW_PRI_BASE		64	/* values below this are used for "bad apple" nodes */
+
+/* Quantenna specific flags (ni_qtn_flags), do not modify in Auc */
+#define QTN_IS_BCM_NODE			0x0000001
+#define QTN_IS_INTEL_5100_NODE		0x0000002
+#define QTN_IS_INTEL_5300_NODE		0x0000004
+#define QTN_IS_GALAXY_NOTE_4_NODE	0x0000008
+#define QTN_IS_NOT_4ADDR_CAPABLE_NODE	0x0000010
+#define QTN_AC_BE_INHERITANCE_UPTO_VO	0x0000020
+#define QTN_AC_BE_INHERITANCE_UPTO_VI	0x0000040
+#define QTN_IS_INTEL_NODE		0x0000080
+#define QTN_IS_REALTEK_NODE		0x0000100
+#define	QTN_NODE_TX_RESTRICTED		0x0000200 /* restricted tx enabled */
+#define	QTN_NODE_TX_RESTRICT_RTS	0x0000400 /* use RTS to confirm node is lost */
+#define QTN_OPTI_NODE			0x0000800
+#define QTN_NODE_RXAMSDU_SUPPORT	0x0001000 /* node support TX amsdu */
+#define QTN_NODE_11N_TXAMSDU_OFF	0x0002000
+#define	QTN_NODE_TXOP_RESTRICTED	0x0004000
+/*
+ * Bits that can be updated again by Lhost after association creation. Explicit definition helps
+ * avoid overwriting bits maintained by MuC itself.
+ */
+#define QTN_FLAGS_UPDATABLE_BITS	(QTN_IS_INTEL_NODE)
+
+/* QTN bandwidth definition - make sure this is up-to-date with regards
+ * to txbf_common.h
+ */
+#define QTN_BW_20M	0
+#define QTN_BW_40M	1
+#define QTN_BW_80M	2
+#define QTN_BW_MAX	QTN_BW_80M
+
+#define QTN_MAILBOX_INVALID	0xffffffff	/* Invalid value to indicate mailbox is disabled */
+
+enum ni_tdls_status {
+	IEEE80211_TDLS_NODE_STATUS_NONE = 0,
+	IEEE80211_TDLS_NODE_STATUS_INACTIVE = 1,
+	IEEE80211_TDLS_NODE_STATUS_STARTING = 2,
+	IEEE80211_TDLS_NODE_STATUS_ACTIVE = 3,
+	IEEE80211_TDLS_NODE_STATUS_IDLE = 4
+};
+
+/* WoWLAN APIs */
+enum qtn_vap_wowlan_cmds {
+	IEEE80211_WOWLAN_HOST_POWER_SAVE = 1,
+	IEEE80211_WOWLAN_MATCH_TYPE,
+	IEEE80211_WOWLAN_L2_ETHER_TYPE,
+	IEEE80211_WOWLAN_L3_UDP_PORT,
+	IEEE80211_WOWLAN_MAGIC_PATTERN,
+	IEEE80211_WOWLAN_MAGIC_PATTERN_GET,
+	IEEE80211_WOWLAN_SET_MAX
+};
+/*
+ * Definitions relating to individual fields from phy_stats,
+ * shared between the Q driver and the APIs.
+ */
+
+/*
+ * Error Sum needs to be reported together with the corresponding Number of
+ * Symbols; getting them in separate operations would introduce a race condition
+ * where the Error Sum and the Number of Symbols came from different
+ * PHY stat blocks.
+ */
+
+#define QTN_PHY_AVG_ERROR_SUM_NSYM_NAME			"avg_error_sum_nsym"
+
+#define QTN_PHY_EVM_MANTISSA_SHIFT		5
+#define QTN_PHY_EVM_EXPONENT_MASK		0x1f
+
+enum qtn_phy_stat_field {
+	QTN_PHY_NOSUCH_FIELD = -1,
+	QTN_PHY_AVG_ERROR_SUM_NSYM_FIELD,
+};
+
+#define QTN_M2A_TX_SCALE_BITS	4
+#define QTN_M2A_TX_SCALE_MASK	((1 << QTN_M2A_TX_SCALE_BITS) - 1)
+
+/* only for little endian */
+#if defined(AUC_BUILD)
+#define U64_LOW32(_v)		((uint32_t)(_v))
+#define U64_HIGH32(_v)		((uint32_t)((_v) >> 32))
+#else
+#define U64_LOW32(_v)		(((uint32_t*)&(_v))[0])
+#define U64_HIGH32(_v)		(((uint32_t*)&(_v))[1])
+#endif
+
+#define U64_COMPARE_GE(_a, _b)	((U64_HIGH32(_a) > U64_HIGH32(_b)) ||	\
+				((U64_HIGH32(_a) == U64_HIGH32(_b)) && (U64_LOW32(_a) >= U64_LOW32(_b))))
+
+#define U64_COMPARE_GT(_a, _b)	((U64_HIGH32(_a) > U64_HIGH32(_b)) ||	\
+				((U64_HIGH32(_a) == U64_HIGH32(_b)) && (U64_LOW32(_a) > U64_LOW32(_b))))
+
+#define U64_COMPARE_LE(_a, _b)	((U64_HIGH32(_a) < U64_HIGH32(_b)) ||	\
+				((U64_HIGH32(_a) == U64_HIGH32(_b)) && (U64_LOW32(_a) <= U64_LOW32(_b))))
+
+#define U64_COMPARE_LT(_a, _b)	((U64_HIGH32(_a) < U64_HIGH32(_b)) ||	\
+				((U64_HIGH32(_a) == U64_HIGH32(_b)) && (U64_LOW32(_a) < U64_LOW32(_b))))
+
+#ifndef MAC2STR
+#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
+#define MACSTR "%02X:%02X:%02X:%02X:%02X:%02X"
+#define MACSTRL "%02x:%02x:%02x:%02x:%02x:%02x"	/* for MuC and Auc which don't support "X" */
+#endif
+
+/*
+ * VSP/QTM
+ * Macro TOPAZ_QTM is used to help identify changes between original VSP and QTM.
+ * In Lhost kernel driver, it must be used within CONFIG_QVSP(in kernel .config).
+ * CONFIG_QVSP	TOPAZ_QTM	ruby		topaz
+ * Y		1		invalid		*QTM works
+ * Y		0		*VSP works	VSP alive but doesn't work for HDP
+ * N		1		invalid		*no VSP/QTM
+ * N		0		*no VSP		no VSP/QTM, and no QTM changes in MuC and AuC
+ * So generally, sololy changing CONFIG_QVSP works for both ruby and topaz as indicated by *.
+ * But to throughly clean QTM code in AuC and MuC, disable TOPAZ_QTM in topaz below.
+ */
+#define TOPAZ_QTM		1
+
+#define COMPILE_TIME_ASSERT(constant_expr)	\
+do {						\
+	switch(0) {				\
+		case 0:				\
+		case constant_expr:		\
+		;				\
+	}					\
+} while(0)
+
+/**@addtogroup DFSAPIs
+ *@{*/
+/**
+ * Reason for channel change
+ */
+#define CSW_REASON_MASK 0xff
+#define CSW_SCS_FLAG_SHIFT 16
+#define CSW_SCS_FLAG_MASK 0xff0000
+#define CSW_SCS_FLAG_STRING_MAX 64
+
+#define	CSW_REASON_GET_SCS_FLAG(_reason) (((_reason) & CSW_SCS_FLAG_MASK) >> CSW_SCS_FLAG_SHIFT)
+#define CSW_REASON_SET_SCS_FLAG(_scs_flag, _reason)	((((_scs_flag) << CSW_SCS_FLAG_SHIFT) & CSW_SCS_FLAG_MASK) | (_reason))
+enum ieee80211_csw_reason {
+	/**
+	 * Reason is unknown
+	 */
+	IEEE80211_CSW_REASON_UNKNOWN,
+	/**
+	 * Smart channel selection
+	 */
+	IEEE80211_CSW_REASON_SCS,
+	/**
+	 * Radar detection
+	 */
+	IEEE80211_CSW_REASON_DFS,
+	/**
+	 * Channel set by user
+	 */
+	IEEE80211_CSW_REASON_MANUAL,
+	/**
+	 * Configuration change
+	 */
+	IEEE80211_CSW_REASON_CONFIG,
+	/**
+	 * Scan initiated by user
+	 */
+	IEEE80211_CSW_REASON_SCAN,
+	/**
+	 * Off-channel CAC
+	 */
+	IEEE80211_CSW_REASON_OCAC,
+	/**
+	 * Channel switch announcement
+	 */
+	IEEE80211_CSW_REASON_CSA,
+	/**
+	 * TDLS Channel switch announcement
+	 */
+	IEEE80211_CSW_REASON_TDLS_CS,
+	/**
+	 * Number of values
+	 */
+	IEEE80211_CSW_REASON_MAX
+};
+/**@}*/
+
+/*
+ * Reasons for channel switches that are not recorded and therefore
+ * should not be listed in QCSAPI documentation
+ */
+enum ieee80211_csw_reason_private {
+	IEEE80211_CSW_REASON_SAMPLING = IEEE80211_CSW_REASON_MAX,
+	IEEE80211_CSW_REASON_OCAC_RUN,
+	IEEE80211_CSW_REASON_BGSCAN,
+};
+
+/* Keep this in sync with swfeat_desc */
+enum swfeat {
+	SWFEAT_ID_MODE_AP,
+	SWFEAT_ID_MODE_STA,
+	SWFEAT_ID_MODE_REPEATER,
+	SWFEAT_ID_PCIE_RC,
+	SWFEAT_ID_VHT,
+	SWFEAT_ID_2X2,
+	SWFEAT_ID_2X4,
+	SWFEAT_ID_3X3,
+	SWFEAT_ID_4X4,
+	SWFEAT_ID_HS20,
+	SWFEAT_ID_WPA2_ENT,
+	SWFEAT_ID_MESH,
+	SWFEAT_ID_TDLS,
+	SWFEAT_ID_OCAC,
+	SWFEAT_ID_QHOP,
+	SWFEAT_ID_QSV,
+	SWFEAT_ID_QSV_NEIGH,
+	SWFEAT_ID_MU_MIMO,
+	SWFEAT_ID_DUAL_CHAN_VIRT,
+	SWFEAT_ID_DUAL_CHAN,
+	SWFEAT_ID_DUAL_BAND_VIRT,
+	SWFEAT_ID_DUAL_BAND,
+	SWFEAT_ID_QTM_PRIO,
+	SWFEAT_ID_QTM,
+	SWFEAT_ID_SPEC_ANALYZER,
+	SWFEAT_ID_MAX
+};
+
+#define SWFEAT_MAP_SIZE (SWFEAT_ID_MAX / 8 + 1)
+
+/* Used to scale temperature measurements */
+#define QDRV_TEMPSENS_COEFF    100000
+#define QDRV_TEMPSENS_COEFF10  (10 * QDRV_TEMPSENS_COEFF)
+
+/* Aligns the supplied size to the specified power_of_two */
+#define QTN_ALIGN_TO(size_to_align, power_of_two) \
+	(((size_to_align) + (power_of_two) - 1) & ~((power_of_two) - 1))
+
+#define FIELD_ARRAY_SIZE(t, a)	(sizeof((((t*)0)->a))/sizeof(((((t*)0)->a))[0]))
+
+#endif /* _SHARED_DEFS_H_ */
diff --git a/quantenna/include/qtn/shared_defs_common.h b/quantenna/include/qtn/shared_defs_common.h
new file mode 100644
index 0000000..ef55d8c
--- /dev/null
+++ b/quantenna/include/qtn/shared_defs_common.h
@@ -0,0 +1,154 @@
+/*SH1
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2014 Quantenna Communications Inc                   **
+**                            All Rights Reserved                            **
+**                                                                           **
+**  Author      : Quantenna Communications Inc                               **
+**  File        : shared_defs.h                                              **
+**  Description :                                                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH1*/
+
+#ifndef _SHARED_DEFS_COMMON_H_
+#define _SHARED_DEFS_COMMON_H_
+
+/*
+ * Default board type is 0 to match the default (fallback) from get_bootval.
+ * Script returns 0 if the parameter is not defined.
+ */
+#define  QTN_RUBY_BOARD_TYPE_DEFAULT			0
+
+#define  QTN_RUBY_BRINGUP_BOARD				0
+#define  QTN_RUBY_BRINGUP_BOARD_32_320			1
+#define  QTN_RUBY_BRINGUP_BOARD_16_320			2
+#define  QTN_RUBY_BRINGUP_BOARD_16_160			3
+#define  QTN_RUBY_BRINGUP_BOARD_ETRON			4
+#define  QTN_RUBY_BRINGUP_BOARD_ETRON_320		5
+#define  QTN_RUBY_BRINGUP_BOARD_ETRON_160		6
+#define  QTN_RUBY_BRINGUP_BOARD_16_200			7
+#define  QTN_RUBY_BRINGUP_BOARD_32_200			8
+#define  QTN_RUBY_BRINGUP_BOARD_PCIE			9
+/* diag board ids */
+#define  QTN_RUBY_BRINGUP_BOARD_32_160_ARB		10
+#define  QTN_RUBY_BRINGUP_BOARD_32_160_ARB_1		11
+#define  QTN_RUBY_BRINGUP_BOARD_16_160_ARB_1		12
+#define  QTN_RUBY_BRINGUP_BOARD_32_160_ARB_0		13
+#define  QTN_RUBY_BRINGUP_BOARD_ETRON_160_EMAC1		14
+#define  QTN_RUBY_BRINGUP_BOARD_ETRON_250_EMAC1		15
+#define  QTN_RUBY_BRINGUP_BOARD_ETRON_32_320_EMAC1	16
+#define  QTN_RUBY_BRINGUP_ETRON32_160			17
+#define  QTN_RUBY_BRINGUP_ETRON32_320			18
+#define  QTN_RUBY_BRINGUP_BOARD_MICRON_DUALEMAC		19
+#define  QTN_RUBY_BRINGUP_BOARD_MICRON_DUALEMAC_MII	20
+#define  QTN_RUBY_BRINGUP_BOARD_MICRON_DUALEMAC_LOOPBACK 21
+#define  QTN_RUBY_BRINGUP_BOARD_16_160_DUALEMAC		22
+
+
+#define  QTN_RUBY_REFERENCE_DESIGN_BOARD		1000
+#define  QTN_RUBY_REFERENCE_DESIGN_BOARD_250		1001
+#define  QTN_RUBY_REF_BOARD_DUAL_CON			1002
+#define  QTN_RUBY_REFERENCE_DESIGN_BOARD_320		1003
+#define  QTN_RUBY_ETRON_32_320_EMAC1			1004
+#define  QTN_RUBY_ETRON_32_250_EMAC1			1005
+#define  QTN_RUBY_REFERENCE_DESIGN_BOARD_RGMII_DLL	1006
+#define  QTN_RUBY_QHS710_5S5_SIGE_DDR250		1007
+#define  QTN_RUBY_QHS710_5S5_SIGE_DDR320		1008
+#define  QTN_RUBY_OHS711_PCIE_320DDR			1009
+/* pcie reference ids */
+#define  QTN_RUBY_QHS713_5S1_PCIERC_DDR160		1170
+#define  QTN_RUBY_OHS711_5S13_PCIE_DDR320		1171 /* duplicate of 1009 */
+#define  QTN_RUBY_QHS713_5S1_PCIERC_DDR320		1172
+
+#define  QTN_RUBY_ODM_BOARD_0				1200
+#define  QTN_RUBY_ODM_BOARD_1				1201
+#define  QTN_RUBY_ODM_BOARD_2				1202
+#define  QTN_RUBY_ODM_BOARD_3				1203
+#define  QTN_RUBY_ODM_BOARD_4				1204
+#define  QTN_RUBY_ODM_BOARD_5				1205
+#define  QTN_RUBY_ODM_BOARD_6				1206
+#define  QTN_RUBY_ODM_BOARD_7				1207
+#define  QTN_RUBY_ODM_BOARD_8				1208
+#define  QTN_RUBY_ODM_BOARD_9				1209
+#define  QTN_RUBY_ODM_BOARD_10				1210
+#define  QTN_RUBY_ODM_BOARD_11				1211
+#define  QTN_RUBY_ODM_BOARD_12				1212
+#define  QTN_RUBY_ODM_BOARD_13				1213
+#define  QTN_RUBY_ODM_BOARD_14				1214
+#define  QTN_RUBY_ODM_BOARD_15				1215
+#define  QTN_RUBY_ODM_BOARD_16				1216
+#define  QTN_RUBY_ODM_BOARD_17				1217
+#define  QTN_RUBY_ODM_BOARD_18				1218
+#define  QTN_RUBY_ODM_BOARD_19				1219
+#define  QTN_RUBY_ODM_BOARD_20				1220
+#define  QTN_RUBY_ODM_BOARD_21				1221
+#define  QTN_RUBY_ODM_BOARD_22				1222
+#define  QTN_TOPAZ_FPGAA_BOARD				1223
+#define  QTN_TOPAZ_FPGAB_BOARD				1224
+#define  QTN_TOPAZ_DUAL_EMAC_FPGAA_BOARD		1225
+#define  QTN_TOPAZ_DUAL_EMAC_FPGAB_BOARD		1226
+#define  QTN_TOPAZ_RC_BOARD				1227
+#define  QTN_TOPAZ_EP_BOARD				1228
+#define  QTN_TOPAZ_BB_BOARD				1229
+#define  QTN_TOPAZ_RF_BOARD				1230
+#define  QTN_TOPAZ_QHS840_5S1				1231
+
+#define		QTN_RUBY_AUTOCONFIG_ID				32768
+#define		QTN_RUBY_UNIVERSAL_BOARD_ID			65535
+
+#define  QTN_RUBY_NOSUCH_BOARD_TYPE			-1
+
+#define  QTN_RUBY_BRINGUP_RWPA				0
+#define  QTN_RUBY_REF_RWPA				1
+#define  QTN_RUBY_SIGE					2
+#define  QTN_RUBY_UNDEFINED				3
+#define  QTN_RUBY_WIFI_NONE				4
+#define	 QTN_TPZ_SE5003L1				5
+#define	 QTN_TPZ_SE5003L1_INV				6
+#define  QTN_TPZ_SKY85703				7
+#define  QTN_TPZ_SKY85405_BPF840			8
+#define  QTN_TPZ_DBS					9	/* BBIC4 + RFIC6 */
+#define  QTN_TPZ_SE5502L				10	/* BBIC4 + RFIC5 */
+#define  QTN_TPZ_SKY85710_NG				11
+#define	 QTN_TPZ_DBS_5591				13	/* BBIC4 A2 + RFIC6 */
+#define	 QTN_TPZ_DBS_NXP_BGU7224_BGU7258		14	/* BBIC4 A2 + RFIC6  DBS support*/
+#define	 QTN_TPZ_2_4GHZ_NXP_BGU7224			15	/* BBIC4 A2 + RFIC6 2.4ghz only */
+#define	 QTN_TPZ_5GHZ_NXP_BGU7258			16	/* BBIC4 A2 + RFIC6 5ghz only */
+#define	 QTN_TPZ_5GHZ_SKY85728				17	/* BBIC4 A2 + RFIC4 5ghz only and BBIC4 A2 + RFIC6 5ghz only */
+
+#endif /* _SHARED_DEFS_COMMON_H_ */
+
diff --git a/quantenna/include/qtn/shared_params.h b/quantenna/include/qtn/shared_params.h
new file mode 100644
index 0000000..2b039c5
--- /dev/null
+++ b/quantenna/include/qtn/shared_params.h
@@ -0,0 +1,280 @@
+/*SH1
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2010 Quantenna Communications Inc                   **
+**                            All Rights Reserved                            **
+**                                                                           **
+**  Author      : Quantenna Communications Inc                               **
+**  File        : shared_params.h                                            **
+**  Description :                                                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH1*/
+
+#ifndef _SHARED_PARAMS_H_
+#define _SHARED_PARAMS_H_
+
+#ifndef SYSTEM_BUILD
+#include "../common/ruby_config.h"
+#endif
+#include <qtn/shared_defs.h>
+#include <qtn/topaz_shared_params.h>
+
+/*
+ * Forward declarations.
+ */
+struct qtn_txbf_mbox;
+struct qtn_bb_mutex;
+struct qtn_csa_info;
+struct qtn_samp_chan_info;
+struct qtn_scs_info;
+struct qtn_scs_info_set;
+struct qtn_ocac_info;
+
+#define QTN_SEM_TRACE 1
+/*
+ * As DSP accesses sempahore with high frequency, to minimize performance impact, it would be better to
+ * enable DSP sem trace log only in non-release build.
+ */
+#define QTN_SEM_TRACE_DSP 0
+#if QTN_SEM_TRACE
+struct qtn_sem_trace_log;
+#endif
+
+#ifndef IEEE80211_ADDR_LEN
+	#define IEEE80211_ADDR_LEN	6
+#endif
+
+#define MUC_FCS_CORRUPTION	0x00000001
+#define MUC_QOS_Q_MERGE		0x00000002
+
+#define MUC_PROFILE_DROP	0x08000000
+#define MUC_PROFILE_DCACHE	0x10000000
+#define MUC_PROFILE_P		0x20000000
+#define MUC_PROFILE_EP		0x40000000
+#define MUC_PROFILE_IPTR	0x80000000
+
+#define MUC_BOOT_WAIT_SECS	20
+
+#define CHIP_ID_RUBY			0x30
+#define CHIP_ID_TOPAZ			0x40
+#define REV_ID_RUBY_A			0x0
+#define REV_ID_RUBY_B			0x1
+#define REV_ID_RUBY_D			0x3
+#define REV_ID_TOPAZ_A			0x0
+#define REV_ID_TOPAZ_B			0x1
+#define REV_ID_TOPAZ_A2			0x3
+#define HARDWARE_REVISION_UNKNOWN	0
+#define HARDWARE_REVISION_RUBY_A	1
+#define HARDWARE_REVISION_RUBY_B	2
+#define HARDWARE_REVISION_RUBY_D	3
+#define HARDWARE_REVISION_TOPAZ_A	4
+#define HARDWARE_REVISION_TOPAZ_B	5
+#define HARDWARE_REVISION_TOPAZ_A2	6
+#define CHIP_ID_MASK			0xF0
+#define CHIP_ID_SW_MASK			0xC0	/* bits set in sw, for downgrade only */
+#define CHIP_REV_ID_MASK		0x0F
+
+#define HW_OPTION_BONDING_RUBY_PROD	(HARDWARE_REVISION_RUBY_D << 8)
+#define HW_OPTION_BONDING_RUBY_UNKNOWN	(HW_OPTION_BONDING_RUBY_PROD | 0x00000000)
+#define HW_OPTION_BONDING_RUBY_2x4STA	(HW_OPTION_BONDING_RUBY_PROD | 0x00000001)
+#define HW_OPTION_BONDING_RUBY_4SS	(HW_OPTION_BONDING_RUBY_PROD | 0x00000002)
+
+#define HW_PLAT_TOPAZ_QV860		0x00
+#define HW_PLAT_TOPAZ_QV860_2X2		0x80	/* downgrade only */
+#define HW_PLAT_TOPAZ_QV860_2X4		0x40	/* downgrade only */
+#define HW_PLAT_TOPAZ_QV860_3X3		0xF0	/* downgrade only */
+#define HW_PLAT_TOPAZ_QD840		0x01
+#define HW_PLAT_TOPAZ_QV880		0x32
+#define HW_PLAT_TOPAZ_QV880_2X2		0xb2	/* downgrade only */
+#define HW_PLAT_TOPAZ_QV880_2X4		0x72	/* downgrade only */
+#define HW_PLAT_TOPAZ_QV880_3X3		0xF2	/* downgrade only */
+#define HW_PLAT_TOPAZ_QV920		0x03
+#define HW_PLAT_TOPAZ_QV920_2X4		0x43	/* downgrade only */
+#define HW_PLAT_TOPAZ_QV840		0x04
+#define HW_PLAT_TOPAZ_QV840_2X4		0x44	/* downgrade only */
+#define HW_PLAT_TOPAZ_QV940		0x05
+#define HW_PLAT_TOPAZ_QV840C		0x06
+
+#define HW_OPTION_BONDING_TOPAZ_PROD	(HARDWARE_REVISION_TOPAZ_B << 8)
+enum hw_opt_t {
+	HW_OPTION_BONDING_TOPAZ_QV860 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV860),
+	HW_OPTION_BONDING_TOPAZ_QV860_2X2 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV860_2X2),
+	HW_OPTION_BONDING_TOPAZ_QV860_2X4 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV860_2X4),
+	HW_OPTION_BONDING_TOPAZ_QV860_3X3 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV860_3X3),
+	HW_OPTION_BONDING_TOPAZ_QD840 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QD840),
+	HW_OPTION_BONDING_TOPAZ_QV880 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV880),
+	HW_OPTION_BONDING_TOPAZ_QV880_2X2 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV880_2X2),
+	HW_OPTION_BONDING_TOPAZ_QV880_2X4 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV880_2X4),
+	HW_OPTION_BONDING_TOPAZ_QV880_3X3 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV880_3X3),
+	HW_OPTION_BONDING_TOPAZ_QV920 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV920),
+	HW_OPTION_BONDING_TOPAZ_QV920_2X4 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV920_2X4),
+	HW_OPTION_BONDING_TOPAZ_QV840 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV840),
+	HW_OPTION_BONDING_TOPAZ_QV840_2X4 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV840_2X4),
+	HW_OPTION_BONDING_TOPAZ_QV940 = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV940),
+	HW_OPTION_BONDING_TOPAZ_QV840C = (HW_OPTION_BONDING_TOPAZ_PROD | HW_PLAT_TOPAZ_QV840C),
+};
+
+#define HW_OPTION_BONDING_NOT_SET	0xFFFFFFFF
+
+typedef struct shared_params
+{
+	u_int32_t		tqe_sem_en; /*replaced for TQE SWR lh_flags; */
+	u_int16_t		lh_chip_id;
+	u_int8_t		rf_chip_id;
+	u_int8_t		vco_lock_detect_mode;
+	u_int8_t		lh_wifi_hw;
+	u_int8_t		lh_num_devices;
+	u_int8_t		lh_mac_0[ IEEE80211_ADDR_LEN ];
+	u_int8_t		lh_mac_1[ IEEE80211_ADDR_LEN ];
+
+	u_int32_t		uc_flags;
+	u_int32_t		uc_hostlink;
+
+	u_int32_t		m2l_hostlink_mbox;
+	u_int32_t		m2l_printbuf_producer;
+
+	u_int64_t		last_chan_sw_tsf;
+	u_int32_t		l2m_sem;
+	u_int32_t		m2l_sem;
+
+	int			hardware_revision;
+	uint32_t		hardware_options;
+	uint8_t			swfeat_map[SWFEAT_MAP_SIZE];
+	int8_t			shortrange_scancnt;
+	uint8_t			slow_ethernet_war;
+	uint8_t			calstate;
+	uint8_t			post_rfloop;
+#define QTN_IOT_INTEL5100_TWEAK		0x00000001
+#define QTN_IOT_INTEL6200_TWEAK		0x00000002
+#define QTN_IOT_INTEL6300_TWEAK		0x00000004
+#define QTN_IOT_INTELFD_TWEAK		0x00000008
+#define QTN_IOT_INTEL_SEND_NCW_ACTION   0x00000010   /* IOT action: send Notify Channel Width Action frame to Intel */
+#define QTN_IOT_BCM_TWEAK		0x00000020   /* Disable aggregation on Broadcom MBP clients */
+#define QTN_IOT_INTEL_NOAGG2TXCHAIN_TWEAK     0x00000040   /* NO Aggregation & 2 Tx chain restriction for some Intel */
+#define QTN_IOT_BCM_NO_3SS_MCS_TWEAK	0x00000080   /* Disable 3ss MCS for Broadcom MBP clients */
+#define QTN_IOT_BCM_AMSDU_DUTY_TWEAK	0x00000100   /* AMSDU duty cycle tweak */
+#define QTN_IOT_BCM_MBA_AMSDU_TWEAK	0x00000200   /* MBA doesn't work with 7.9k AMSDU with security mode */
+#define QTN_IOT_RLNK_NO_3SS_MCS_TWEAK	0x00000400   /* Disable 3ss MCS for Ralink clients */
+#define QTN_IOT_RTK_NO_AMSDU_TWEAK	0x00000800   /* Disable A-MSDU for Realtek devices */
+#define QTN_IOT_DEFAULT_TWEAK		(QTN_IOT_BCM_MBA_AMSDU_TWEAK | \
+					 QTN_IOT_BCM_AMSDU_DUTY_TWEAK | \
+					 QTN_IOT_RLNK_NO_3SS_MCS_TWEAK | \
+					 QTN_IOT_RTK_NO_AMSDU_TWEAK \
+					)
+	uint32_t		iot_tweaks;
+
+	struct qtn_txbf_mbox*	txbf_mbox_lhost;
+	struct qtn_txbf_mbox*	txbf_mbox_bus;
+
+	struct qtn_muc_dsp_mbox *muc_dsp_mbox_lhost;
+	struct qtn_muc_dsp_mbox *muc_dsp_mbox_bus;
+
+	struct qtn_bb_mutex*	bb_mutex_lhost;
+	struct qtn_bb_mutex*	bb_mutex_bus;
+
+	struct qtn_csa_info*	csa_lhost;
+	struct qtn_csa_info*	csa_bus;
+
+	struct qtn_samp_chan_info*	chan_sample_lhost;
+	struct qtn_samp_chan_info*	chan_sample_bus;
+
+	struct qtn_scan_chan_info*	chan_scan_lhost;
+	struct qtn_scan_chan_info*	chan_scan_bus;
+
+	struct qtn_scs_info_set*	scs_info_lhost;
+	struct qtn_scs_info_set*	scs_info_bus;
+
+	struct qtn_remain_chan_info*	remain_chan_lhost;
+	struct qtn_remain_chan_info*	remain_chan_bus;
+	struct qtn_ocac_info*	ocac_lhost;
+	struct qtn_ocac_info*	ocac_bus;
+
+	struct qtn_bmps_info*	bmps_lhost;
+	struct qtn_bmps_info*	bmps_bus;
+
+	struct qtn_meas_chan_info*	chan_meas_lhost;
+	struct qtn_meas_chan_info*	chan_meas_bus;
+
+#if QTN_SEM_TRACE
+	struct qtn_sem_trace_log *sem_trace_log_lhost;
+	struct qtn_sem_trace_log *sem_trace_log_bus;
+#endif
+
+	struct qtn_vlan_dev **vdev_lhost;
+	struct qtn_vlan_dev **vdev_bus;
+	struct qtn_vlan_dev **vport_lhost;
+	struct qtn_vlan_dev **vport_bus;
+	struct topaz_ipmac_uc_table *ipmac_table_bus;
+	struct qtn_vlan_info *vlan_info;
+
+#if CONFIG_RUBY_BROKEN_IPC_IRQS
+	u_int32_t		m2l_irq[2];
+#endif
+
+	void *			p_debug_1;
+	int			debug_1_arg;
+	void *			p_debug_2;
+	int			debug_2_arg;
+
+	u_int32_t		pm_duty_lock;
+
+#define QTN_EXT_LNA_GAIN_MAX	126
+	int			ext_lna_gain;
+	int			ext_lna_bypass_gain;
+	int			tx_power_cal;
+	int			hardware_id;
+	int			min_tx_power;
+	int			max_tx_power;
+#define QTN_FW_VERSION_LENGTH	32
+	char			fw_version[QTN_FW_VERSION_LENGTH + 1];
+#ifndef SYSTEM_BUILD
+	shared_params_auc	auc;
+#endif
+
+	int			cca_adjusting_flag;
+	int			active_tid_num;
+	uint32_t		bb_param;
+	uint32_t		cs_thresh_base_val;	/* Carrier sense threshold base value */
+	uint32_t		qtn_hal_pm_corrupt;
+	uint32_t		qtn_hal_pm_corrupt_debug;
+	uint32_t                free_airtime;		/* in ms */
+} shared_params;
+
+#define QTN_RATE_TRAIN_DATA_LEN		64
+#define QTN_RATE_TRAIN_BYTE		0x2A
+
+#endif /* _SHARED_PARAMS_H_ */
diff --git a/quantenna/include/qtn/shared_print_buf.h b/quantenna/include/qtn/shared_print_buf.h
new file mode 100644
index 0000000..aef5085
--- /dev/null
+++ b/quantenna/include/qtn/shared_print_buf.h
@@ -0,0 +1,16 @@
+#ifndef __SHARED_PRINT_BUF
+#define __SHARED_PRINT_BUF
+
+struct shared_print_producer {
+	u32	produced;
+	u32	bufsize;
+	char*	buf;		/* producer address space ptr */
+};
+
+struct shared_print_consumer {
+	const volatile struct shared_print_producer * producer;
+	u32 consumed;
+	char* buf;		/* consumer address space ptr */
+};
+
+#endif // __SHARED_PRINT_BUF
diff --git a/quantenna/include/qtn/skb_recycle.h b/quantenna/include/qtn/skb_recycle.h
new file mode 100644
index 0000000..b3f7494
--- /dev/null
+++ b/quantenna/include/qtn/skb_recycle.h
@@ -0,0 +1,258 @@
+/*
+ * (C) Copyright 2011 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __QTN_SKBUFF_H
+#define __QTN_SKBUFF_H
+
+#include <common/queue.h>
+#include <linux/spinlock.h>
+#include <linux/skbuff.h>
+#include <linux/version.h>
+#include <linux/interrupt.h>
+
+#include "qtn_global.h"
+#include "qtn_skb_size.h"
+#include "qtn_buffers.h"
+
+#define SKB_RECYCLE_STATS
+
+#ifdef SKB_RECYCLE_STATS
+#define SKB_RECYCLE_STAT(x)	((x) = (x) + 1)
+#else
+#define SKB_RECYCLE_STAT(x)
+#endif
+
+#define QTN_SKB_RECYCLE_ENABLE		0
+
+/**
+ * \addtogroup LHOST_STATS
+ */
+/** @{ */
+
+/**
+ * \brief Linux SKB recycle statistics.
+ *
+ * These statistics are generated and counted per-interface. They are used
+ * primarily as a performance metric - the more recylcling that succeeds, the
+ * more efficient the system will be (less chance for bottlenecks/dropped
+ * packets).
+ */
+struct qtn_skb_recycle_stats {
+	/**
+	 * The number of packets for the given interface that have been
+	 * successfully recycled.
+	 */
+	u32 free_recycle_pass;
+
+	/**
+	 * The number of packets for the given interface that have failed to
+	 * be recycled. If this counter is constantly increasing at a rapid
+	 * rate (approx. the same as the per-packet count of traffic streams),
+	 * then this can indicate a performance issue.
+	 */
+	u32 free_recycle_fail;
+
+	/**
+	 * This counter shows the number of undersized packets that have been
+	 * incorrectly pushed to the recycle code.
+	 *
+	 * \note It is an error for this counter to be anything other than
+	 * zero.
+	 */
+	u32 free_recycle_fail_undersize;
+
+	/**
+	 * This counter shows the number of packets that have been allocated
+	 * off the shared buffer pool.
+	 */
+	u32 alloc_recycle;
+
+	/**
+	 * This counter shows the number of packets that have dropped back to
+	 * the kernel alloc function due to not having any packets in the
+	 * recycle pool.
+	 */
+	u32 alloc_kmalloc;
+};
+/** @} */
+
+struct qtn_skb_recycle_list {
+	struct sk_buff_head list;			/* Shared buffers between wireless and Ethernet driver */
+	int		max;				/* Maximum size of the skb_list */
+	struct qtn_skb_recycle_stats stats_qdrv;	/* skb free/alloc stats for qdrv */
+	struct qtn_skb_recycle_stats stats_eth;		/* skb free/alloc stats for ethernet driver */
+#if defined(CONFIG_RUBY_PCIE_HOST) || defined(CONFIG_RUBY_PCIE_TARGET) \
+	|| defined(CONFIG_TOPAZ_PCIE_HOST) || defined(CONFIG_TOPAZ_PCIE_TARGET)
+	struct qtn_skb_recycle_stats stats_pcie;	/* skb free/alloc stats for pcie driver */
+#endif
+	struct qtn_skb_recycle_stats stats_kfree;	/* skb free stats for the kfree_skb collector */
+	int (*recycle_func)(struct qtn_skb_recycle_list *recycle_list,
+				struct sk_buff *skb);	/* skb recycling check function */
+};
+
+
+/* Define RX buffer size and mapping */
+__inline__ static unsigned long rx_buf_map_size(void)
+{
+	return RX_BUF_SIZE + roundup(NET_IP_ALIGN, dma_get_cache_alignment());
+}
+__inline__ static unsigned long qtn_rx_buf_size(void)
+{
+	/*
+	 * Make sure that we can flush cache (both beginning and ending
+	 * must be aligned on cache line) - otherwise flush would not work.
+	 * Also make sure that we can reserve NET_IP_ALIGN
+	 * at the beginning of data after do cache flush.
+	 * Without NET_IP_ALIGN reserving IP header will be not aligned
+	 * and network stack can kick unaligned access exception, which is expensive
+	 * or even would crash kernel if unaligned access handler is not implemented.
+	 */
+	return rx_buf_map_size() + dma_get_cache_alignment() - 1;
+}
+
+#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,30)
+static inline struct dst_entry *skb_dst(struct sk_buff *skb)
+{
+	return skb->dst;
+}
+#endif
+
+static __inline__ int __qtn_skb_recyclable_check(struct qtn_skb_recycle_stats *stats, struct sk_buff *skb)
+{
+	if (!QTN_SKB_RECYCLE_ENABLE) {
+		return 0;
+	}
+
+	if (unlikely(skb->next)) {
+		printk(KERN_EMERG "skb being recycled: 0x%p is queued\n", skb);
+		return 0;
+	}
+
+	if (!skb->is_recyclable ||
+			skb->next ||
+			skb_dst(skb) ||
+			skb_shared(skb) ||
+			skb_is_nonlinear(skb) ||
+			skb_shinfo(skb)->nr_frags ||
+			skb_shinfo(skb)->frag_list ||
+			skb_shinfo(skb)->gso_size ||
+			skb_cloned(skb) ||
+			atomic_read(&(skb_shinfo(skb)->dataref)) != 1) {
+		return 0;
+	}
+
+	/* check for undersize skb; this should never happen, and indicates problems elsewhere */
+	if (skb_end_pointer(skb) - skb->head < qtn_rx_buf_size()) {
+		SKB_RECYCLE_STAT(stats->free_recycle_fail_undersize);
+		return 0;
+	}
+
+	return 1;
+}
+
+static __inline__ struct sk_buff *qtn_skb_recycle_list_pop(
+		struct qtn_skb_recycle_list *recycle_list,
+		struct qtn_skb_recycle_stats *stats)
+{
+	struct sk_buff *skb = NULL;
+	unsigned long flags;
+
+	if (!QTN_SKB_RECYCLE_ENABLE) {
+		return NULL;
+	}
+
+	spin_lock_irqsave(&recycle_list->list.lock, flags);
+	skb = __skb_dequeue(&recycle_list->list);
+	if (skb) {
+		SKB_RECYCLE_STAT(stats->alloc_recycle);
+	} else {
+		SKB_RECYCLE_STAT(stats->alloc_kmalloc);
+	}
+	spin_unlock_irqrestore(&recycle_list->list.lock, flags);
+
+	return skb;
+}
+
+/*
+ * Push a used skb onto the recycle list. returns 1 if it was pushed onto the list
+ */
+static __inline__ int qtn_skb_recycle_list_push(struct qtn_skb_recycle_list *recycle_list,
+		struct qtn_skb_recycle_stats *stats, struct sk_buff *skb)
+{
+	int pushed = 0;
+	unsigned long flags;
+	struct skb_shared_info *shinfo;
+
+	if (!QTN_SKB_RECYCLE_ENABLE) {
+		return 0;
+	}
+
+	spin_lock_irqsave(&recycle_list->list.lock, flags);
+
+	if (skb_queue_len(&recycle_list->list) < recycle_list->max) {
+		if (__qtn_skb_recyclable_check(stats, skb)) {
+			if (skb->destructor) {
+				WARN_ON(in_irq());
+				skb->destructor(skb);
+				skb->destructor = NULL;
+			}
+
+			skb->len = 0;
+			skb->priority = 0;
+			skb->dest_port = 0;
+			skb->src_port = 0;
+			skb->is_recyclable = 0;
+			skb->tail = skb->data = skb->head;
+			skb->vlan_tci = 0;
+			skb->orig_dev = NULL;
+			skb_reserve(skb, NET_SKB_PAD);
+
+			memset(skb->cb, 0, sizeof(skb->cb));
+			memset(&skb->qtn_cb, 0, sizeof(skb->qtn_cb));
+
+			shinfo = skb_shinfo(skb);
+			memset(shinfo, 0, offsetof(struct skb_shared_info, dataref));
+
+			__skb_queue_tail(&recycle_list->list, skb);
+			pushed = 1;
+		}
+	}
+
+	spin_unlock_irqrestore(&recycle_list->list.lock, flags);
+
+	if (pushed) {
+		SKB_RECYCLE_STAT(stats->free_recycle_pass);
+	} else {
+		SKB_RECYCLE_STAT(stats->free_recycle_fail);
+	}
+
+	return pushed;
+}
+
+static __inline__ struct qtn_skb_recycle_list *qtn_get_shared_recycle_list(void)
+{
+	extern struct qtn_skb_recycle_list __qtn_skb_recycle_list;
+	return &__qtn_skb_recycle_list;
+}
+
+#endif // __QTN_SKBUFF_H
+
diff --git a/quantenna/include/qtn/topaz_congest_queue.h b/quantenna/include/qtn/topaz_congest_queue.h
new file mode 100644
index 0000000..f97c6cd
--- /dev/null
+++ b/quantenna/include/qtn/topaz_congest_queue.h
@@ -0,0 +1,155 @@
+/**
+ * Copyright (c) 2012-2013 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ **/
+#ifndef __DRIVERS_NET_TOPAZ_CONGEST_H
+#define __DRIVERS_NET_TOPAZ_CONGEST_H
+
+#include <asm/param.h>
+#include <qtn/topaz_tqe_cpuif.h>
+
+/* Total number of congestion queues we will pre-allocated */
+#define TOPAZ_CONGEST_QUEUE_NUM	(6)
+/* Maximum number of packets in one queue */
+#define TOPAZ_CONGEST_PKT_MAX	(2048)
+/* Maximum number of packets in all congest queues */
+#define TOPAZ_CONGEST_TOTAL_PKT_MAX	(2048)
+/* Maximum number of congest queue for unicast frame */
+#define TOPAZ_CONGEST_MAX_UNICAST_QCOUNT	(3)
+
+/* Budget for packet number consmued at softirq at one time */
+#define TOPAZ_SOFTIRQ_BUDGET  8
+
+#define TOPAZ_PCIE_NODE_MAX	(128)
+#define TOPAZ_PCIE_TID_MAX	(16)
+
+#define TOPAZ_CONGEST_QUEUE_STATS_QLEN		0
+#define TOPAZ_CONGEST_QUEUE_STATS_ENQFAIL	1
+
+struct topaz_congest_q_elem {
+	union topaz_tqe_cpuif_ppctl ppctl;
+};
+
+/* Congestion queue descriptor */
+struct topaz_congest_q_desc {
+	struct topaz_congest_q_elem elems[TOPAZ_CONGEST_PKT_MAX];
+	uint32_t head;	/* The index of packet to be sent	*/
+	uint32_t tail;	/* The index of packet to be append	*/
+	uint32_t qlen;	/* Total number of pending requests per queue*/
+
+	uint32_t valid;
+	uint32_t index;
+	uint32_t node_id;
+	uint32_t tid;
+
+	uint32_t congest_xmit;	/* Packet number forwarded successfully */
+	uint32_t congest_drop;	/* Packet number dropped due to transmission time-out */
+	uint32_t congest_enq_fail;	/* packet number dropped due to enqueue failure */
+
+	uint32_t last_retry_success;	/* 0: Fail, 1: Success */
+	unsigned long retry_timeout;
+	uint32_t is_unicast;
+
+	struct topaz_congest_queue *congest_queue;
+};
+
+struct topaz_congest_queue {
+	struct vmac_priv *vmp;
+	int (*xmit_func)(union topaz_tqe_cpuif_ppctl *);
+	int (*tasklet_extra_proc)(void *);
+
+        struct topaz_congest_q_desc queues[TOPAZ_CONGEST_QUEUE_NUM];
+
+	/* A pointer array, if queues[node_id][tid] is not NULL, node-tid queue is congested
+	* and it will point to attached congested queue.
+	*/
+	struct topaz_congest_q_desc* ptrs[TOPAZ_PCIE_NODE_MAX][TOPAZ_PCIE_TID_MAX];
+	struct tasklet_struct congest_tx;
+
+	/* Counters */
+	uint32_t func_entry;	/* tasklet hook function called count */
+	uint32_t cnt_retries;	/* tried times on triggering to TQE */
+	uint32_t xmit_entry;
+
+	int logs[TOPAZ_CONGEST_PKT_MAX]; /* Used to check queue fullness */
+
+	uint32_t congest_timeout;
+	uint32_t tasklet_budget;
+
+	uint32_t total_qlen;	/* Total number of pending requests in all queues*/
+
+	uint32_t unicast_qcount;	/* Total congest queue count of unicast frame */
+	uint32_t max_unicast_qcount;	/* Max unicast congest queue count*/
+};
+
+struct qdrv_tqe_cgq {
+	uint32_t	congest_qlen;
+};
+/**
+* Return NULL if node-tid pair is not congested, not NULL otherwise.
+*/
+RUBY_INLINE int
+topaz_queue_congested(struct topaz_congest_queue *congest_queue, uint32_t node_id, uint32_t tid)
+{
+	BUG_ON(node_id >= TOPAZ_PCIE_NODE_MAX);
+	BUG_ON(tid >= TOPAZ_PCIE_TID_MAX);
+
+	return (int)congest_queue->ptrs[node_id][tid];
+}
+
+RUBY_INLINE struct topaz_congest_q_desc*
+topaz_get_congest_queue(struct topaz_congest_queue *congest_queue, uint32_t node_id, uint32_t tid)
+{
+	return congest_queue->ptrs[node_id][tid];
+}
+
+static inline uint32_t get_timestamp(void)
+{
+	return read_new_aux_reg(ARC_REG_TIMER1_CNT);
+}
+
+/**
+* Return NULL if failed
+*/
+extern struct topaz_congest_queue* topaz_congest_queue_init(void);
+
+extern void topaz_congest_queue_exit(struct topaz_congest_queue* congest_queue);
+
+/**
+* Push ppctl into congestion queue.
+*/
+
+extern int topaz_congest_enqueue(struct topaz_congest_q_desc* queue, union topaz_tqe_cpuif_ppctl *ppctl);
+
+extern void topaz_congest_dump(struct topaz_congest_queue *queue);
+
+extern struct topaz_congest_q_desc* topaz_congest_alloc_unicast_queue(struct topaz_congest_queue *congest_queue,
+																		uint32_t node_id,
+																		uint32_t tid);
+
+extern struct topaz_congest_q_desc* topaz_congest_alloc_queue(struct topaz_congest_queue *congest_queue, uint32_t node_id, uint32_t tid);
+
+extern int topaz_congest_queue_xmit(struct topaz_congest_q_desc *queue, uint32_t budget);
+
+extern void reg_congest_queue_stats(void (*fn)(void *, uint32_t, uint8_t, uint32_t), void *ctx);
+
+extern struct topaz_congest_queue* topaz_congest_queue_get(void);
+
+extern void topaz_hbm_congest_queue_put_buf(const union topaz_tqe_cpuif_ppctl *ppctl);
+
+extern void topaz_congest_set_unicast_queue_count(uint32_t qnum);
+#endif
diff --git a/quantenna/include/qtn/topaz_dpi.h b/quantenna/include/qtn/topaz_dpi.h
new file mode 100644
index 0000000..b96228c
--- /dev/null
+++ b/quantenna/include/qtn/topaz_dpi.h
@@ -0,0 +1,96 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __TOPAZ_DPI_H
+#define __TOPAZ_DPI_H
+
+#include <common/topaz_emac.h>
+#include <linux/in.h>
+#include <linux/in6.h>
+#include <compat.h>
+
+struct topaz_dpi_field_def {
+	uint32_t val;
+	uint32_t mask;
+	union topaz_emac_rx_dpi_ctrl ctrl;
+};
+
+#define TOPAZ_DPI_ANCHOR_FRAME_START	0x0000
+#define TOPAZ_DPI_ANCHOR_VLAN0		0x0001
+#define TOPAZ_DPI_ANCHOR_VLAN1		0x0002
+#define TOPAZ_DPI_ANCHOR_VLAN2		0x0003
+#define TOPAZ_DPI_ANCHOR_VLAN3		0x0004
+#define TOPAZ_DPI_ANCHOR_OTHER		0x0005
+#define TOPAZ_DPI_ANCHOR_LLC		0x0006
+#define TOPAZ_DPI_ANCHOR_IPV4		0x0007
+#define TOPAZ_DPI_ANCHOR_IPV6		0x0008
+#define TOPAZ_DPI_ANCHOR_TCP		0x0009
+#define TOPAZ_DPI_ANCHOR_UDP		0x000a
+
+#define TOPAZ_DPI_CMPOP_EQ		0x00
+#define TOPAZ_DPI_CMPOP_NE		0x01
+#define TOPAZ_DPI_CMPOP_GT		0x02
+#define TOPAZ_DPI_CMPOP_LT		0x03
+
+#define TOPAZ_DPI_DISABLE		0x0
+#define TOPAZ_DPI_ENABLE		0x1
+
+struct topaz_dpi_filter_request {
+	uint8_t out_port;
+	uint8_t out_node;
+	uint8_t tid;
+	struct topaz_dpi_field_def *fields;
+	unsigned int field_count;
+	struct in6_addr srcaddr;
+	struct in6_addr destaddr;
+	uint16_t srcport;
+	uint16_t destport;
+};
+
+int topaz_dpi_filter_add(unsigned int emac,
+		const struct topaz_dpi_filter_request *req);
+void topaz_dpi_filter_del(unsigned int emac, int filter_no);
+int topaz_dpi_init(unsigned int emac);
+
+static inline void topaz_dpi_iptuple_poll_complete(unsigned long base)
+{
+	while (readl(base + TOPAZ_EMAC_RX_DPI_IPT_MEM_COM)
+			& (TOPAZ_EMAC_RX_DPI_IPT_MEM_COM_WRITE | TOPAZ_EMAC_RX_DPI_IPT_MEM_COM_READ)) {}
+
+}
+
+static inline void topaz_dpi_iptuple_read_entry(unsigned long base, uint8_t entry)
+{
+	writel(TOPAZ_EMAC_RX_DPI_IPT_MEM_COM_READ | SM(entry, TOPAZ_EMAC_RX_DPI_IPT_MEM_COM_ENT),
+			base + TOPAZ_EMAC_RX_DPI_IPT_MEM_COM);
+	topaz_dpi_iptuple_poll_complete(base);
+}
+
+static inline void topaz_dpi_iptuple_write_entry(unsigned long base, uint8_t entry)
+{
+	writel(TOPAZ_EMAC_RX_DPI_IPT_MEM_COM_WRITE | SM(entry, TOPAZ_EMAC_RX_DPI_IPT_MEM_COM_ENT),
+			base + TOPAZ_EMAC_RX_DPI_IPT_MEM_COM);
+	topaz_dpi_iptuple_poll_complete(base);
+}
+
+#endif	/* __TOPAZ_DPI_H */
+
diff --git a/quantenna/include/qtn/topaz_fwt.h b/quantenna/include/qtn/topaz_fwt.h
new file mode 100644
index 0000000..338815d
--- /dev/null
+++ b/quantenna/include/qtn/topaz_fwt.h
@@ -0,0 +1,50 @@
+/*
+ * (C) Copyright 2013 Quantenna Communications Inc.
+ */
+
+#ifndef __TOPAZ_FWT_H
+#define __TOPAZ_FWT_H
+
+#include <qtn/topaz_fwt_cpuif.h>
+
+typedef void (*fwt_notify_swap )( uint16_t dst_index, uint16_t src_index);
+
+/*
+ * The FWT algorithm maintain the first level entries available first for a fast look up
+ * In scenarios where there is a need to delete a first level entry with following index at the
+ * second level, there is a need to copy the second level entry over the first one, then delete
+ * the second level entry. The FWT interface register the overwrite call back so we can mirror the
+ * same entries indexers in both tables
+ * @param cbk_func: call back function to overwrite the index table entries
+ */
+void topaz_fwt_register_overwrite(fwt_notify_swap cbk_func);
+
+int topaz_fwt_add_entry(const uint8_t *mac_be, uint8_t out_port,
+		const uint8_t *out_node, unsigned int out_node_count, uint8_t portal);
+
+int topaz_fwt_del_entry(const uint8_t *mac_id);
+
+uint16_t topaz_fwt_hash(const uint8_t *mac_le);
+
+int topaz_get_mac_be_from_index(uint16_t index, uint8_t *mac_be);
+
+void topaz_update_node(uint16_t index, uint8_t node_index,uint8_t node,bool enable);
+
+void topaz_set_portal(uint16_t index, uint8_t portal);
+
+void topaz_fwt_sw_entry_set(uint16_t index, uint8_t out_port,
+		const uint8_t *out_nodes, unsigned int out_node_count, uint8_t portal);
+void topaz_fwt_sw_entry_del(uint16_t fwt_index);
+
+int topaz_sw_lookup(const uint8_t *mac_be);
+
+void topaz_fwt_sw_entry_set_multicast(uint16_t fwt_index, uint16_t mcast_index);
+
+int topaz_update_entry(uint16_t index, uint8_t port, uint8_t portal,
+		uint8_t node_index , uint8_t node_num, bool enable);
+
+int topaz_fwt_get_timestamp(uint16_t index);
+int topaz_fwt_init(void);
+
+#endif	/* __TOPAZ_FWT_H */
+
diff --git a/quantenna/include/qtn/topaz_fwt_cpuif.h b/quantenna/include/qtn/topaz_fwt_cpuif.h
new file mode 100644
index 0000000..39ec4be
--- /dev/null
+++ b/quantenna/include/qtn/topaz_fwt_cpuif.h
@@ -0,0 +1,794 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __TOPAZ_FWT_CPUIF_PLATFORM_H
+#define __TOPAZ_FWT_CPUIF_PLATFORM_H
+
+#include <common/topaz_platform.h>
+#include <qtn/mproc_sync_base.h>
+#include <qtn/topaz_tqe_cpuif.h>
+#include <qtn/qtn_net_packet.h>
+#include <qtn/lhost_muc_comm.h>
+
+#if defined(__linux__)
+	#define TOPAZ_FWT_LOCAL_CPU	TOPAZ_FWT_LOOKUP_LHOST
+#elif defined(ARCSHELL)
+	#define	TOPAZ_FWT_LOCAL_CPU	TOPAZ_FWT_LOOKUP_LHOST
+#elif defined(MUC_BUILD)
+	#define	TOPAZ_FWT_LOCAL_CPU	TOPAZ_FWT_LOOKUP_MUC
+#elif defined(DSP_BUILD)
+	#define	TOPAZ_FWT_LOCAL_CPU	TOPAZ_FWT_LOOKUP_DSP
+#elif defined(AUC_BUILD)
+	#define	TOPAZ_FWT_LOCAL_CPU	TOPAZ_FWT_LOOKUP_AUC
+#else
+	#error No TOPAZ_FWT_LOCAL_CPU set
+#endif
+
+#define	TOPAZ_FWT_LOOKUP_REG		__TOPAZ_FWT_LOOKUP_REG(TOPAZ_FWT_LOCAL_CPU)
+#define	TOPAZ_FWT_LOOKUP_MAC_LO		__TOPAZ_FWT_LOOKUP_MAC_LO(TOPAZ_FWT_LOCAL_CPU)
+#define	TOPAZ_FWT_LOOKUP_MAC_HI		__TOPAZ_FWT_LOOKUP_MAC_HI(TOPAZ_FWT_LOCAL_CPU)
+/* Hardware limitation for node entries */
+#define TOPAZ_FWT_MAX_NODE_ENTRY (6)
+
+/** Macro to get a number with its 'bits' LSB bits set */
+#define SET_LSB_BITS(bits) ((1 << (bits)) - 1)
+
+/** Macro to update a bit-field with a new value */
+#define TOPAZ_FWT_SET_BIT_FIELD(var, start_bit, width, value) \
+		(((var) & ~(SET_LSB_BITS(width)  << (start_bit))) | \
+				((value) & SET_LSB_BITS(width)) << (start_bit))
+
+/** Macro to extract a bit-field */
+#define TOPAZ_FWT_GET_BIT_FIELD(data, start_offset, width)\
+		(((data) >> (start_offset)) & SET_LSB_BITS(width))
+
+#if defined(ARCSHELL)
+typedef unsigned int uint32_t;
+typedef unsigned short uint16_t;
+typedef unsigned char uint8_t;
+#define ETH_ALEN 6
+#define inline _Inline
+#define unlikely
+#define likely
+#elif defined(MUC_BUILD)
+#define ETH_ALEN 6
+#endif
+
+/*
+ * Forwarding Table manipulation
+ *
+ * FWT has 2048 entries. First 1024 are mac address crc hash done by hardware.
+ * Next 1024 are linked list (nxt_entry) for when hash collision occurs.
+ *
+ * Basic forwarding table flow is:
+ * 1) Packet received
+ * 2) crc32 of incoming packet macaddr forms a 10 bit number [0 .. 1023]
+ * 3) This number is the index of the first FWT entry in the physical table. MAC address is compared.
+ *   a) If MAC matches, this is the fwt entry
+ *   b) If not, follow next entry index. Must be [1024 .. 2047], repeat.
+ * 4) Interpret FWT if present
+ *
+ * In sw maintain tailqs to know which slots are occupied
+ */
+
+/*
+ * FWT timestamp field is 10 bits. FWT clock is at 250MHz on BBIC4 ASIC.
+ * UNIT affects clock ticks per timer reg clock tick.
+ * SCALE affects shifting of the above register when applied to the timestamp field
+ * when updating it.
+ * ASIC: Values of 0xe unit and 13 (0xd) scale result in a time wrap time of 1 minute.
+ * FPGA: 0xc unit, 0xa scale results in very rougly 1m wrap
+ */
+
+#define TOPAZ_FWT_TIMESTAMP_BITS	10
+#define TOPAZ_FWT_TIMESTAMP_MASK	((1 << TOPAZ_FWT_TIMESTAMP_BITS) - 1)
+
+#if TOPAZ_FPGA_PLATFORM
+	#define TOPAZ_FWT_TIMESTAMP_UNIT	0xc
+	#define TOPAZ_FWT_TIMESTAMP_SCALE	0xa
+#else
+	#define TOPAZ_FWT_TIMESTAMP_UNIT	0x1b /* (3500 ticks 14 usec) */
+	#define TOPAZ_FWT_TIMESTAMP_SCALE	0x13 /* (2^19) */
+	/*
+	 * Resolution Calculation:
+	 * (per tick) * (FWT clock [sec]) * (bits store location) = Resolution[sec]
+	 * (3500)     * (1 / (250*10^6))  * (2^19)                = 7.34 [sec]
+	 * */
+
+	#define TOPAZ_FWT_RESOLUTION_MSEC	7340 /* Derive from unit & scale */
+#endif
+
+RUBY_INLINE uint32_t topaz_fwt_get_scaled_timestamp(void)
+{
+#ifdef CONSOLE_TEST
+	return 0;
+#else
+	uint32_t tsr = qtn_mproc_sync_mem_read(TOPAZ_FWT_TIME_STAMP_CNT);
+	return (tsr >> TOPAZ_FWT_TIMESTAMP_SCALE) & TOPAZ_FWT_TIMESTAMP_MASK;
+#endif
+}
+
+union topaz_fwt_entry {
+	struct {
+		uint32_t	word0;	/* macaddr[30:1] */
+		uint32_t	word1;	/* valid bit(31), portal(30), next_index(27:16), macaddr[47:32](15:0) */
+		uint32_t	word2;	/* out_node + valid 0, 1, 2, 3 */
+		uint32_t	word3;	/* out_node + valid 4, 5, outport, timestamp(9:0) */
+	} raw;
+	struct {
+		uint8_t		mac_le[ETH_ALEN];
+		uint16_t	__unused1	:1,
+				next_index	:11,
+				__unused2	:2,
+				portal		:1,
+				valid		:1;
+		uint8_t		out_node_0	:7,
+				out_node_vld_0	:1;
+		uint8_t		out_node_1	:7,
+				out_node_vld_1	:1;
+		uint8_t		out_node_2	:7,
+				out_node_vld_2	:1;
+		uint8_t		out_node_3	:7,
+				out_node_vld_3	:1;
+		uint16_t	timestamp	:10,
+				out_port	:4,
+				__unused3	:2;
+		uint8_t		out_node_4	:7,
+				out_node_vld_4	:1;
+		uint8_t		out_node_5	:7,
+				out_node_vld_5	:1;
+	} data;
+};
+
+#define FWT_ZERO_ENTRY_INIT	{ { 0, 0, 0, 0 } }
+
+RUBY_INLINE union topaz_fwt_entry *topaz_fwt_get_hw_entry(uint16_t index)
+{
+#ifdef CONSOLE_TEST
+	extern union topaz_fwt_entry test_hw_fwt[TOPAZ_FWT_HW_TOTAL_ENTRIES];
+	return &test_hw_fwt[index];
+#else
+	union topaz_fwt_entry *e;
+	e = (union topaz_fwt_entry *)(TOPAZ_FWT_TABLE_BASE + index * sizeof(*e));
+	return e;
+#endif
+}
+
+RUBY_INLINE int topaz_fwt_is_valid(const union topaz_fwt_entry *e)
+{
+	return e->raw.word1 & TOPAZ_FWT_ENTRY_VALID;
+}
+
+RUBY_INLINE uint16_t topaz_fwt_next_index(const union topaz_fwt_entry *e)
+{
+	return MS(e->raw.word1, TOPAZ_FWT_ENTRY_NXT_ENTRY);
+}
+
+RUBY_INLINE const uint8_t *topaz_fwt_macaddr(const union topaz_fwt_entry *e)
+{
+	return (void *) e;
+}
+
+RUBY_INLINE void topaz_fwt_set_next_index(union topaz_fwt_entry *e, uint16_t index)
+{
+	unsigned long word1 = e->raw.word1 & ~TOPAZ_FWT_ENTRY_NXT_ENTRY;
+	e->raw.word1 = word1 | SM(index, TOPAZ_FWT_ENTRY_NXT_ENTRY);
+}
+
+RUBY_INLINE void topaz_fwt_copy_entry(union topaz_fwt_entry *dest, const union topaz_fwt_entry *src,
+					int words)
+{
+	int i;
+#pragma Off(Behaved)
+	uint32_t *d = &dest->raw.word0;
+	const uint32_t *s = &src->raw.word0;
+#pragma On(Behaved)
+
+	for (i = 0; i < words; i++) {
+		*d++ = *s++;
+	}
+}
+
+RUBY_INLINE void topaz_fwt_insert_entry(const union topaz_fwt_entry *newent, uint16_t index)
+{
+	union topaz_fwt_entry *hw_ent = topaz_fwt_get_hw_entry(index);
+	topaz_fwt_copy_entry(hw_ent, newent, 4);
+}
+
+/*
+ * Software FWT mirror. Used by MuC for Rx path
+ * acceleration, without accessing the FWT memory
+ */
+union topaz_fwt_sw_entry {
+	uint16_t raw;
+	struct {
+		uint8_t	valid		:1,
+			mcast		:1,
+			vsp		:1,
+			portal		:1,
+			port		:4;
+		uint8_t	__pad		:1,
+			node		:7;
+	} unicast;
+	struct {
+		uint16_t valid		:1,
+			 mcast		:1,
+			 index		:14;
+	} multicast;
+};
+
+/* 23 bits of multicast ipv4 -> mac leaves 5 bits of ambiguity */
+#define TOPAZ_FWT_SW_IP_ALIAS_ENTRIES	32
+#define TOPAZ_FWT_SW_NODE_MAX		128
+#define TOPAZ_BITS_PER_WD		(32)
+#define TOPAZ_FWT_SW_NODE_BITMAP_SIZE	(TOPAZ_FWT_SW_NODE_MAX / TOPAZ_BITS_PER_WD)
+
+struct topaz_fwt_sw_mcast_entry {
+	uint32_t node_bitmap[TOPAZ_FWT_SW_NODE_BITMAP_SIZE];
+	uint8_t port_bitmap;
+	uint8_t flood_forward;
+	uint8_t seen;
+#ifdef CONFIG_TOPAZ_DBDC_HOST
+	uint8_t dev_bitmap;
+#else
+	uint8_t __pad[1];
+#endif
+};
+
+#ifdef CONFIG_TOPAZ_DBDC_HOST
+RUBY_INLINE int topaz_fwt_sw_mcast_dev_is_set(struct topaz_fwt_sw_mcast_entry *const e,
+						const uint8_t dev_id)
+{
+	return (e->dev_bitmap & (1 << dev_id));
+}
+
+RUBY_INLINE int topaz_fwt_sw_mcast_dev_is_empty(struct topaz_fwt_sw_mcast_entry *const e)
+{
+	return (e->dev_bitmap == 0);
+}
+
+RUBY_INLINE void topaz_fwt_sw_mcast_dev_set(struct topaz_fwt_sw_mcast_entry *const e,
+						const uint8_t dev_id)
+{
+	e->dev_bitmap |= (1 << dev_id);
+}
+
+RUBY_INLINE void topaz_fwt_sw_mcast_dev_clear(struct topaz_fwt_sw_mcast_entry *const e,
+						const uint8_t dev_id)
+{
+	e->dev_bitmap &= ~(1 << dev_id);
+}
+#endif
+
+struct topaz_fwt_sw_alias_table {
+	int16_t mcast_entry_index[TOPAZ_FWT_SW_IP_ALIAS_ENTRIES];
+};
+
+RUBY_INLINE int8_t topaz_fwt_mcast_to_ip_alias(const void *addr, uint16_t ether_type)
+{
+	if (ether_type == htons(ETHERTYPE_IP)) {
+		return qtn_mcast_ipv4_alias(addr);
+	} else if (ether_type == htons(ETHERTYPE_IPV6)) {
+		return 0;
+	} else {
+		return -1;
+	}
+}
+
+RUBY_INLINE int topaz_fwt_sw_alias_table_index_valid(int16_t index)
+{
+	return index >= 0 && index < TOPAZ_FWT_MCAST_ENTRIES;
+}
+
+RUBY_INLINE int topaz_fwt_sw_mcast_entry_index_valid(int16_t index)
+{
+	return index >= 0 && index < TOPAZ_FWT_MCAST_ENTRIES;
+}
+
+RUBY_INLINE uint8_t topaz_fwt_sw_mcast_entry_nodes_clear(const struct topaz_fwt_sw_mcast_entry *e)
+{
+	unsigned int i;
+	for (i = 0; i < TOPAZ_FWT_SW_NODE_BITMAP_SIZE; i++) {
+		if (e->node_bitmap[i]) {
+			return 0;
+		}
+	}
+	return 1;
+}
+
+RUBY_INLINE int topaz_fwt_sw_alias_table_empty(const struct topaz_fwt_sw_alias_table *alias_table)
+{
+	unsigned int i;
+	for (i = 0; i < TOPAZ_FWT_SW_IP_ALIAS_ENTRIES; i++) {
+		if (topaz_fwt_sw_mcast_entry_index_valid(alias_table->mcast_entry_index[i])) {
+			return 0;
+		}
+	}
+	return 1;
+}
+
+RUBY_INLINE int topaz_fwt_sw_mcast_port_is_set(const uint8_t port_bitmap, const uint8_t port)
+{
+	return (port_bitmap & (1 << port));
+}
+
+RUBY_INLINE void topaz_fwt_sw_mcast_port_set(struct topaz_fwt_sw_mcast_entry *const e,
+						const uint8_t port)
+{
+	e->port_bitmap |= (1 << port);
+}
+
+RUBY_INLINE void topaz_fwt_sw_mcast_port_clear(struct topaz_fwt_sw_mcast_entry *const e,
+						const uint8_t port)
+{
+	e->port_bitmap &= ~(1 << port);
+}
+
+RUBY_INLINE int topaz_fwt_sw_mcast_port_has_nodes(const uint8_t port)
+{
+	return (port == TOPAZ_TQE_WMAC_PORT);
+}
+
+RUBY_INLINE void
+topaz_fwt_sw_mcast_flood_forward_set(struct topaz_fwt_sw_mcast_entry *const e, const uint8_t enable)
+{
+	e->flood_forward = enable;
+}
+
+RUBY_INLINE int
+topaz_fwt_sw_mcast_is_flood_forward(const struct topaz_fwt_sw_mcast_entry *const e)
+{
+	return (e->flood_forward);
+}
+
+RUBY_INLINE uint32_t topaz_fwt_sw_mcast_do_per_node(
+	void (*handler)(const void *token1, void *token2, uint8_t node, uint8_t port, uint8_t tid),
+	const struct topaz_fwt_sw_mcast_entry *mcast_ent,
+	const void *token1, void *token2, uint8_t in_node, uint8_t port, uint8_t tid)
+{
+	uint8_t node;
+	uint8_t node_cnt = 0;
+	uint32_t bitmap;
+	uint8_t i;
+	uint8_t j;
+
+	for (i = 0; i < TOPAZ_FWT_SW_NODE_BITMAP_SIZE; i++) {
+		bitmap = mcast_ent->node_bitmap[i];
+		j = 0;
+		while (bitmap) {
+			if (bitmap & 0x1) {
+				node = (i * TOPAZ_BITS_PER_WD) + j;
+				if ((in_node == 0) || (node != in_node)) {
+					handler(token1, token2, port, node, tid);
+					node_cnt++;
+				}
+			}
+			bitmap >>= 1;
+			j++;
+		}
+	}
+
+	return node_cnt;
+}
+
+RUBY_INLINE int topaz_fwt_sw_mcast_node_is_set(const struct topaz_fwt_sw_mcast_entry *const e,
+						const uint8_t port, const uint8_t node)
+{
+	if (port == TOPAZ_TQE_WMAC_PORT) {
+		return (e->node_bitmap[node / TOPAZ_BITS_PER_WD] &
+				(1 << (node % TOPAZ_BITS_PER_WD)));
+	}
+	return 0;
+}
+
+RUBY_INLINE void topaz_fwt_sw_mcast_node_set(struct topaz_fwt_sw_mcast_entry *const e,
+						const uint8_t port, const uint16_t node)
+{
+	if (port == TOPAZ_TQE_WMAC_PORT) {
+		e->node_bitmap[node / TOPAZ_BITS_PER_WD] |= (1 << (node % TOPAZ_BITS_PER_WD));
+	}
+}
+
+RUBY_INLINE void topaz_fwt_sw_mcast_node_clear(struct topaz_fwt_sw_mcast_entry *const e,
+						const uint8_t port, const uint16_t node)
+{
+	if (port == TOPAZ_TQE_WMAC_PORT) {
+		e->node_bitmap[node / TOPAZ_BITS_PER_WD] &= ~(1 << (node % TOPAZ_BITS_PER_WD));
+		if (!topaz_fwt_sw_mcast_is_flood_forward(e) &&
+				topaz_fwt_sw_mcast_entry_nodes_clear(e)) {
+			topaz_fwt_sw_mcast_port_clear(e, port);
+		}
+	}
+}
+
+RUBY_INLINE union topaz_fwt_sw_entry *topaz_fwt_sw_entry_get(uint16_t index)
+{
+	union topaz_fwt_sw_entry *fwt = (void *) (RUBY_SRAM_BEGIN + TOPAZ_FWT_SW_START);
+	return &fwt[index];
+}
+
+RUBY_INLINE struct topaz_fwt_sw_mcast_entry *topaz_fwt_sw_mcast_ff_entry_get(void)
+{
+	return (void *)(RUBY_DRAM_BEGIN + TOPAZ_FWT_MCAST_TQE_FF_BASE);
+}
+
+RUBY_INLINE struct topaz_fwt_sw_mcast_entry *topaz_fwt_sw_mcast_entry_get(uint16_t index)
+{
+	struct topaz_fwt_sw_mcast_entry *fwt = (void *) (RUBY_DRAM_BEGIN + TOPAZ_FWT_MCAST_TQE_BASE);
+	return &fwt[index];
+}
+
+RUBY_INLINE struct topaz_fwt_sw_alias_table *topaz_fwt_sw_alias_table_get(uint16_t index)
+{
+	struct topaz_fwt_sw_alias_table *fwt = (void *) (RUBY_DRAM_BEGIN + TOPAZ_FWT_MCAST_IPMAP_BASE);
+	return &fwt[index];
+}
+
+RUBY_INLINE uint8_t topaz_fwt_sw_count_bits(uint32_t x)
+{
+	uint8_t bits_set = 0;
+
+	while (x) {
+		bits_set++;
+		x &= x - 1;
+	}
+
+	return bits_set;
+}
+
+RUBY_INLINE uint32_t topaz_fwt_sw_mcast_enqueues(const struct topaz_fwt_sw_mcast_entry *const e,
+		uint8_t port_bitmap, const uint8_t in_port, const uint8_t in_node)
+{
+	uint32_t enqueues = 0;
+	uint8_t i;
+
+	/* Exclude input port. If WMAC, the port doesn't contribute, only nodes. */
+	port_bitmap &= ~((1 << in_port) | (1 << TOPAZ_TQE_WMAC_PORT));
+	enqueues += topaz_fwt_sw_count_bits(port_bitmap);
+
+	/* add wmac nodes */
+	for (i = 0; i < ARRAY_SIZE(e->node_bitmap) ; i++) {
+		enqueues += topaz_fwt_sw_count_bits(e->node_bitmap[i]);
+	}
+
+	/* must exclude the input node */
+	if (topaz_fwt_sw_mcast_node_is_set(e, in_port, in_node)) {
+		--enqueues;
+	}
+
+	return enqueues;
+}
+
+RUBY_INLINE void __topaz_fwt_hash_set(int enable)
+{
+	uint32_t reg = enable ? TOPAZ_FWT_HASH_CTRL_ENABLE : 0;
+	qtn_mproc_sync_mem_write(TOPAZ_FWT_HASH_CTRL, reg);
+}
+
+RUBY_INLINE void __topaz_fwt_hw_lookup_write_be(const uint8_t *mac_be)
+{
+	uint32_t lo = mac_be[5] | (mac_be[4] << 8) | (mac_be[3] << 16) | (mac_be[2] << 24);
+	uint32_t hi = mac_be[1] | (mac_be[0] << 8);
+
+	qtn_mproc_sync_mem_write(TOPAZ_FWT_LOOKUP_MAC_LO, lo);
+	qtn_mproc_sync_mem_write(TOPAZ_FWT_LOOKUP_MAC_HI, hi);
+	qtn_mproc_sync_mem_write(TOPAZ_FWT_LOOKUP_REG, SM(1, TOPAZ_FWT_LOOKUP_TRIG));
+}
+
+RUBY_INLINE void __topaz_fwt_hw_lookup_write_le(const uint8_t *mac_le)
+{
+	uint32_t lo = mac_le[0] | (mac_le[1] << 8) | (mac_le[2] << 16) | (mac_le[3] << 24);
+	uint32_t hi = mac_le[4] | (mac_le[5] << 8);
+
+	qtn_mproc_sync_mem_write(TOPAZ_FWT_LOOKUP_MAC_LO, lo);
+	qtn_mproc_sync_mem_write(TOPAZ_FWT_LOOKUP_MAC_HI, hi);
+	qtn_mproc_sync_mem_write(TOPAZ_FWT_LOOKUP_REG, SM(1, TOPAZ_FWT_LOOKUP_TRIG));
+}
+
+RUBY_INLINE void topaz_fwt_reverse_mac(uint8_t *dest, const uint8_t *src)
+{
+	int i;
+	for (i = 0; i < ETH_ALEN; i++) {
+		dest[ETH_ALEN - i - 1] = src[i];
+	}
+}
+
+RUBY_INLINE void topaz_fwt_setup_entry(union topaz_fwt_entry *ent, const uint8_t *mac_be,
+					uint8_t out_port, const uint8_t *out_nodes,
+					unsigned int out_node_count, uint8_t portal)
+{
+	ent->raw.word0 = 0;
+	ent->raw.word1 = 0;
+	ent->raw.word2 = 0;
+	ent->raw.word3 = 0;
+
+#pragma Off(Behaved)
+	topaz_fwt_reverse_mac(ent->data.mac_le, mac_be);
+#pragma On(Behaved)
+	ent->data.valid = 1;
+	ent->data.portal = portal;
+
+#define __topaz_fwt_setup_entry_set_out_node(x)			\
+	do {							\
+		if (x < out_node_count) {			\
+			ent->data.out_node_##x = out_nodes[x];	\
+			ent->data.out_node_vld_##x = 1;		\
+		}						\
+	} while(0)
+
+	__topaz_fwt_setup_entry_set_out_node(0);
+	__topaz_fwt_setup_entry_set_out_node(1);
+	__topaz_fwt_setup_entry_set_out_node(2);
+	__topaz_fwt_setup_entry_set_out_node(3);
+	__topaz_fwt_setup_entry_set_out_node(4);
+	__topaz_fwt_setup_entry_set_out_node(5);
+
+	ent->data.out_port = out_port;
+	ent->data.timestamp = topaz_fwt_get_scaled_timestamp();
+}
+
+union topaz_fwt_lookup {
+	struct {
+		uint32_t	word0;
+	} raw;
+	struct {
+		uint32_t	trig		:1,
+				__unused	:7,
+				hash_addr	:10,
+				__unused2	:2,
+				entry_addr	:11,
+				valid		:1;
+	} data;
+};
+
+#define FWT_ZERO_LOOKUP_INIT	{ { 0 } }
+
+RUBY_INLINE union topaz_fwt_lookup __topaz_fwt_hw_lookup_rd(void)
+{
+	union topaz_fwt_lookup u;
+	u.raw.word0 = qtn_mproc_sync_mem_read(TOPAZ_FWT_LOOKUP_REG);
+	return u;
+}
+
+RUBY_INLINE union topaz_fwt_lookup __topaz_fwt_hw_lookup_wait_be(const uint8_t *mac_be, int *timeout)
+{
+	unsigned long timeouts = 0;
+	union topaz_fwt_lookup u;
+	union topaz_fwt_lookup zero_lookup = FWT_ZERO_LOOKUP_INIT;
+
+	__topaz_fwt_hw_lookup_write_be(mac_be);
+	while (1) {
+		u = __topaz_fwt_hw_lookup_rd();
+		if (u.data.trig == 0) {
+			*timeout = 0;
+			return u;
+		} else {
+			qtn_pipeline_drain();
+			if (unlikely(timeouts++ > 1000)) {
+				*timeout = 1;
+				return zero_lookup;
+			}
+		}
+	}
+
+	return zero_lookup;
+}
+
+RUBY_INLINE union topaz_fwt_lookup topaz_fwt_hw_lookup_wait_be(const uint8_t *mac_be, int *timeout, uint8_t *false_miss)
+{
+#ifndef TOPAZ_DISABLE_FWT_WAR
+	/*
+	 * This is to workaround the FWT lookup false issue:
+	 * It seems when EMAC is under heavy VLAN traffic, Lhost and MuC
+	 * may get false miss from FWT -- FWT returns invalid while a MAC
+	 * address truly exists in it. A double check reduces count of false
+	 * misses significantly.
+	 */
+	uint8_t retries = 1;
+#else
+	uint8_t retries = 0;
+#endif
+	union topaz_fwt_lookup u;
+
+	do {
+		u = __topaz_fwt_hw_lookup_wait_be(mac_be, timeout);
+	} while (!u.data.valid && retries--);
+
+#if !defined(TOPAZ_DISABLE_FWT_WAR) && !defined(MUC_BUILD)
+	*false_miss += (retries == 0);
+#endif
+
+	return u;
+}
+
+RUBY_INLINE uint32_t __topaz_fwt_cpu_access_rd(void)
+{
+	return qtn_mproc_sync_mem_read(TOPAZ_FWT_CPU_ACCESS);
+}
+
+RUBY_INLINE void __topaz_fwt_set_4addrmode(union topaz_fwt_entry *ent, uint8_t portal)
+{
+	ent->data.portal = !!portal;
+}
+
+RUBY_INLINE void __topaz_fwt_set_port(union topaz_fwt_entry *ent, uint8_t port)
+{
+	ent->data.out_port = port;
+}
+
+
+RUBY_INLINE void __topaz_fwt_set_node(union topaz_fwt_entry *ent,
+		uint8_t node_index, uint8_t node_num, bool enable)
+{
+#define ____topaz_fwt_set_node(n)				\
+	case n:	do {						\
+			ent->data.out_node_##n = node_num;	\
+			ent->data.out_node_vld_##n = !!enable;	\
+		} while(0);					\
+	break
+
+	switch (node_index) {
+		____topaz_fwt_set_node(0);
+		____topaz_fwt_set_node(1);
+		____topaz_fwt_set_node(2);
+		____topaz_fwt_set_node(3);
+		____topaz_fwt_set_node(4);
+		____topaz_fwt_set_node(5);
+	default:
+		break;
+	}
+}
+
+RUBY_INLINE int __topaz_fwt_cpu_access_start_wait(void)
+{
+#ifndef CONSOLE_TEST
+	unsigned long timeouts = 0;
+	qtn_mproc_sync_mem_write(TOPAZ_FWT_CPU_ACCESS, TOPAZ_FWT_CPU_ACCESS_REQ);
+	while (timeouts++ < 1000) {
+		uint32_t reg = __topaz_fwt_cpu_access_rd();
+		if (MS(reg, TOPAZ_FWT_CPU_ACCESS_STATE) == TOPAZ_FWT_CPU_ACCESS_STATE_GRANTED) {
+			return 0;
+		}
+		qtn_pipeline_drain();
+	}
+
+	return -1;
+#else
+	return 0;
+#endif
+}
+
+RUBY_INLINE void __topaz_fwt_cpu_access_stop(void)
+{
+#ifndef CONSOLE_TEST
+	qtn_mproc_sync_mem_write(TOPAZ_FWT_CPU_ACCESS, 0);
+#endif
+}
+
+RUBY_INLINE int topaz_fwt_cpu_access_lock_wait_irqsave(unsigned long *flags)
+{
+#ifndef CONSOLE_TEST
+	int rc;
+
+	local_irq_save(*flags);
+	rc = __topaz_fwt_cpu_access_start_wait();
+	if (rc) {
+		local_irq_restore(*flags);
+	}
+	return rc;
+#else
+	(void)flags;
+	return 0;
+#endif
+}
+
+RUBY_INLINE void topaz_fwt_cpu_access_unlock_irqrestore(unsigned long *flags)
+{
+#ifndef CONSOLE_TEST
+	__topaz_fwt_cpu_access_stop();
+	local_irq_restore(*flags);
+#else
+	(void)flags;
+#endif
+}
+#ifndef TOPAZ_TEST_ASSERT_EQUAL
+# define TOPAZ_TEST_ASSERT_EQUAL(a, b)	if ((a) != (b)) { return -1; }
+#endif
+RUBY_INLINE int topaz_fwt_lookup_bitfield_test(const union topaz_fwt_lookup *e)
+{
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word0, TOPAZ_FWT_LOOKUP_TRIG), e->data.trig);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word0, TOPAZ_FWT_LOOKUP_ENTRY_ADDR), e->data.entry_addr);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word0, TOPAZ_FWT_LOOKUP_HASH_ADDR), e->data.hash_addr);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word0, TOPAZ_FWT_LOOKUP_VALID), e->data.valid);
+
+	return 0;
+}
+
+RUBY_INLINE int topaz_fwt_entry_bitfield_test(const union topaz_fwt_entry *e)
+{
+	TOPAZ_TEST_ASSERT_EQUAL(!!topaz_fwt_is_valid(e), e->data.valid);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word1, TOPAZ_FWT_ENTRY_NXT_ENTRY), e->data.next_index);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word2, TOPAZ_FWT_ENTRY_OUT_NODE_0), e->data.out_node_0);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word2, TOPAZ_FWT_ENTRY_OUT_NODE_VLD_0), e->data.out_node_vld_0);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word2, TOPAZ_FWT_ENTRY_OUT_NODE_1), e->data.out_node_1);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word2, TOPAZ_FWT_ENTRY_OUT_NODE_VLD_1), e->data.out_node_vld_1);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word2, TOPAZ_FWT_ENTRY_OUT_NODE_2), e->data.out_node_2);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word2, TOPAZ_FWT_ENTRY_OUT_NODE_VLD_2), e->data.out_node_vld_2);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word2, TOPAZ_FWT_ENTRY_OUT_NODE_3), e->data.out_node_3);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word2, TOPAZ_FWT_ENTRY_OUT_NODE_VLD_3), e->data.out_node_vld_3);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word3, TOPAZ_FWT_ENTRY_OUT_NODE_4), e->data.out_node_4);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word3, TOPAZ_FWT_ENTRY_OUT_NODE_VLD_4), e->data.out_node_vld_4);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word3, TOPAZ_FWT_ENTRY_OUT_NODE_5), e->data.out_node_5);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word3, TOPAZ_FWT_ENTRY_OUT_NODE_VLD_5), e->data.out_node_vld_5);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word3, TOPAZ_FWT_ENTRY_OUT_PORT), e->data.out_port);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw.word3, TOPAZ_FWT_ENTRY_TIMESTAMP), e->data.timestamp);
+#ifdef __KERNEL_
+	TOPAZ_TEST_ASSERT_EQUAL(memcmp(topaz_fwt_macaddr(e), e->data.mac_le, ETH_ALEN), 0);
+#endif
+
+	return 0;
+}
+
+struct topaz_ipmac_uc_entry {
+	struct topaz_ipmac_uc_entry *next;
+	union {
+		uint8_t		ipv4_addr[4];
+		uint8_t		ipv6_addr[16];
+	}u;
+	uint8_t		mac_addr[MAC_ADDR_LEN];
+	uint16_t	type;
+	struct topaz_ipmac_uc_entry *lhost_next;
+};
+
+#define TOPAZ_IPMAC_UC_HASH_SLOT	128
+#define TOPAZ_IPMAC_UC_HASH_SLOT_MASK	0x7f
+#define TOPAZ_IPMAC_UC_HASH_SIZE	(TOPAZ_IPMAC_UC_HASH_SLOT * sizeof(void *))
+
+#define TOPAZ_IPMAC_UC_ENTRY_SIZE	sizeof(struct topaz_ipmac_uc_entry)
+#define TOPAZ_IPMAC_UC_ENTRY_COUNT	31
+
+struct topaz_ipmac_uc_table {
+	struct topaz_ipmac_uc_entry *slots[TOPAZ_IPMAC_UC_HASH_SLOT];
+	struct topaz_ipmac_uc_entry entries[TOPAZ_IPMAC_UC_ENTRY_COUNT];
+	uint32_t	update_cnt_lhost;
+	uint32_t	update_cnt_muc;
+};
+
+#define TOPAZ_IPMAC_UC_TBL_SIZE		(sizeof(struct topaz_ipmac_uc_table))
+
+/*
+ * The hash works under the assumption that in most cases, hosts behind
+ * the STA are in the same IP subnet. The host number differs so we have
+ * a good chance to have diverse MSB byte of a be IP address
+ */
+RUBY_INLINE uint16_t topaz_ipmac_uc_hash(__be32 ipaddr)
+{
+	return ((ipaddr >> 24) & TOPAZ_IPMAC_UC_HASH_SLOT_MASK);
+}
+
+RUBY_INLINE uint16_t topaz_ipmac_ipv6uc_hash(const uint8_t *ipv6_addr)
+{
+	return (ipv6_addr[15] & TOPAZ_IPMAC_UC_HASH_SLOT_MASK);
+}
+
+#endif	/* __TOPAZ_FWT_CPUIF_PLATFORM_H */
+
diff --git a/quantenna/include/qtn/topaz_fwt_db.h b/quantenna/include/qtn/topaz_fwt_db.h
new file mode 100644
index 0000000..2c9c54b
--- /dev/null
+++ b/quantenna/include/qtn/topaz_fwt_db.h
@@ -0,0 +1,275 @@
+/*
+ * (C) Copyright 2013 Quantenna Communications Inc.
+ */
+
+#ifndef FWT_DB_H_
+#define FWT_DB_H_
+
+
+#ifndef CONSOLE_TEST
+#include <linux/types.h>
+#include <linux/in.h>
+#include <linux/if_ether.h>
+
+#include <common/queue.h>
+
+#include <qtn/br_types.h>
+#include <qtn/topaz_fwt.h>
+#include <qtn/dmautil.h>
+#include <qtn/topaz_tqe_cpuif.h>
+#include <qtn/topaz_fwt_cpuif.h>
+#include <qtn/qtn_net_packet.h>
+
+typedef enum
+{
+	FWT_DB_MLT_PORT_WMAC = 0,
+	FWT_DB_MLT_PORT_MAX,
+}fwt_db_mlt_ports;
+
+/* Set success return status */
+#define FWT_DB_STATUS_SUCCESS (1)
+
+/* Set Invalid node number */
+#define FWT_DB_INVALID_NODE (0xFF)
+
+/* Set Invalid IPV4 value */
+#define FWT_DB_INVALID_IPV4 (0xFF)
+
+/* Size of IPV4 address */
+#define FWT_DB_IPV4_SIZE (4)
+
+/*
+ * LHost FWT entry copy.
+ * Sufficient for unicast; multicast with multiple ports/nodes
+ * is handled in topaz_fwt_sw_mcast_entry
+ */
+typedef struct fwt_db_entry {
+	uint8_t mac_id[ETH_ALEN];
+	uint8_t out_port;
+	uint8_t out_node;
+	int16_t fwt_index;
+	int16_t alias_table_index;
+	uint32_t false_miss;
+	uint8_t portal	:1,
+		valid	:1,
+#ifdef CONFIG_TOPAZ_DBDC_HOST
+		mcast	:1,
+		dev_id  :DEV_ID_BITS;
+#else
+		mcast	:1;
+#endif
+} fwt_db_entry;
+
+/* node list indexed by the fwt */
+typedef struct fwt_db_node_element {
+	uint16_t index;
+	uint8_t ip_alias;
+	uint8_t port;
+	STAILQ_ENTRY(fwt_db_node_element) next;
+} fwt_db_node_element;
+
+typedef struct {
+	fwt_db_node_element *element;
+	bool in_use;
+	int node_index;
+} fwt_db_node_iterator;
+
+static inline struct topaz_fwt_sw_alias_table *
+fwt_db_get_sw_alias_table(struct fwt_db_entry *db)
+{
+	if (db && topaz_fwt_sw_alias_table_index_valid(db->alias_table_index)) {
+		return topaz_fwt_sw_alias_table_get(db->alias_table_index);
+	}
+	return NULL;
+}
+
+static inline struct topaz_fwt_sw_mcast_entry *
+fwt_db_get_sw_mcast(struct fwt_db_entry *db, uint8_t ipmap_index)
+{
+	struct topaz_fwt_sw_alias_table *ipmap = fwt_db_get_sw_alias_table(db);
+	if (ipmap) {
+		int16_t mcast_index = ipmap->mcast_entry_index[ipmap_index];
+		if (topaz_fwt_sw_mcast_entry_index_valid(mcast_index)) {
+			return topaz_fwt_sw_mcast_entry_get(mcast_index);
+		}
+	}
+
+	return NULL;
+}
+
+static inline struct topaz_fwt_sw_mcast_entry *fwt_db_get_sw_mcast_ff(void)
+{
+	return topaz_fwt_sw_mcast_ff_entry_get();
+}
+
+static inline void topaz_fwt_sw_alias_table_flush(struct topaz_fwt_sw_alias_table *p)
+{
+	flush_dcache_sizerange_safe(p, sizeof(*p));
+}
+
+static inline void topaz_fwt_sw_mcast_flush(struct topaz_fwt_sw_mcast_entry *p)
+{
+	flush_dcache_sizerange_safe(p, sizeof(*p));
+}
+
+static inline void fwt_mcast_to_mac(uint8_t *mac_be, const struct br_ip *group)
+{
+	return qtn_mcast_to_mac(mac_be, &group->u, group->proto);
+}
+
+static inline int8_t fwt_mcast_to_ip_alias(const struct br_ip *group)
+{
+	if (group == NULL) {
+		return -1;
+	} else {
+		return topaz_fwt_mcast_to_ip_alias(&group->u, group->proto);
+	}
+}
+
+fwt_db_node_element *fwt_db_create_node_element(void);
+void fwt_db_free_node_element(fwt_db_node_element *node_element);
+int fwt_db_is_node_exists_list(uint8_t node_index, uint16_t table_index,
+		uint8_t ip_alias, uint8_t port);
+/*
+ * Initialise the fwt_db database
+ */
+void fwt_db_init(void);
+
+/*
+ * Get IP Flood-forwarding configuration
+ * @Param buf: location of print buffer
+ * @Param buflen: size of print buffer
+ * @return number of characters printed
+ */
+int fwt_db_get_ipff(char *buf, int buflen);
+
+/*
+ * Print FWT Database to console
+ * @return number of existing valid entries
+ */
+int fwt_db_print(int is_mult);
+
+/*
+ * Print FWT node hash lise to console
+ * @return number of existing valid entries
+ */
+int fwt_db_node_table_print(void);
+
+/*
+ * Print the FWT multicast entries to a buffer
+ * @return number of bytes written
+ */
+int fwt_db_get_mc_list(char *buf, int buflen);
+
+/*
+ * Calculate ageing time by the FWT HW timestamp
+ * @Param fwt_index: FWT table index
+ */
+int fwt_db_calculate_ageing_scale(int fwt_index);
+/*
+ * Insert new table entry
+ * @param index: the HW FWT index.
+ * Note: the FWT SW table use the FWT HW index algorithm for matching the table entries
+ * @param element: FWT SW table element that reflect both FWT HW table entry and additional data
+ * @return Success / Failure indication
+ */
+int fwt_db_table_insert(uint16_t index, fwt_db_entry *element);
+/*
+ * Acquire iterator to run over the list database from node index entry
+ * @param node_index: node number represented as a hash list index
+ * @return: Iterator database element
+ */
+fwt_db_node_iterator *fwt_db_iterator_acquire(uint8_t node_index);
+
+/*
+ * Release iterator to mark elements on the database can be erase or modify safely.
+ */
+void fwt_db_iterator_release(void);
+
+/*
+ * Give back current element and advance iterator to the next one.
+ * service function for running over the database.
+ * Note: Node_index is a part of the iterator
+ * @param iterator: Iterator database element
+ * @return: Current iterator database element
+ */
+fwt_db_node_element *fwt_db_iterator_next(fwt_db_node_iterator **iterator);
+
+/* Add a new node entry
+ * @param node_num:
+ * @param table_index: the HW FWT table index
+ */
+void fwt_db_add_new_node(uint8_t node_num, uint16_t table_index,
+		const int8_t ip_alias, uint8_t port, fwt_db_node_element *const new_element);
+
+/* Remove specific node from the hash list,
+ * Note: does not involve removing node from the fwt table.
+ * @param node_index: the hash list entry point that represent the node number
+ * @return: Function returns the number of elements that were removed.(Debug feature)
+ */
+int fwt_db_clear_node(uint8_t node_index);
+
+/* In cases where fwt entry is remove we need to maintain the specific index from
+ * the node table since its not relevant anymore.
+ * We conduct the maintenance procedure in order to take advantage of the knowledge of the specific node index
+ * so we can avoid going through the whole database.
+ * @param node_index: the hash list entry point that represent the node number
+ * @param table_index: the specific fwt index to be removed
+ */
+void fwt_db_delete_index_from_node_table(uint8_t node_index, uint16_t table_index,
+		uint8_t ip_alias, uint8_t port);
+
+fwt_db_node_element *fwt_db_get_table_index_from_node(uint8_t node_num);
+
+/*
+ * Delete fwt table entry.
+ * @param index: the HW FWT index.
+ * Note: the FWT SW table use the FWT HW index algorithm for matching the table entries
+ */
+void fwt_db_delete_table_entry(uint16_t index);
+/*
+ * Get table entry.
+ * @param index: the HW FWT index.
+ * Note: return ptr from database. Handle with care.
+ * @return indexed fwt database entry
+ */
+fwt_db_entry *fwt_db_get_table_entry(uint16_t index);
+
+/* Initialize the fwt db entry */
+int fwt_db_init_entry(fwt_db_entry *entry);
+
+/*
+ * Update parameters to existing entry
+ * @param index: the HW FWT index that match the SW one
+ * @param port: TQE output port.
+ * @param node: node number.
+ * @param portal: 4addr mode flag.
+ */
+int fwt_db_update_params(uint16_t index, uint8_t port, uint8_t node, uint8_t portal);
+
+/*
+ * Return the existing entry if present, otherwise create a new multicast entry
+ */
+struct topaz_fwt_sw_mcast_entry *fwt_db_get_or_add_sw_mcast(struct fwt_db_entry *db,
+		int8_t ip_alias);
+
+/*
+ * Free multicast entry, and possibly the alias_table if it becomes empty.
+ * Returns 1 if there are no multicast entries present under this db anymore.
+ */
+int fwt_db_delete_sw_mcast(struct fwt_db_entry *db, uint8_t ipmap_index);
+
+/*
+ * Get mac addresses of nondes behind associated node
+ * @param index: node index
+ * @param num_entries: returns number of entries found
+ * @param max_req: maximum entries requested
+ * @param flags: bit 0 - results overflowed/truncated, bit 1 - 4addr node
+ * @param buf: buffer to store macs
+ */
+int fwt_db_get_macs_behind_node(const uint8_t index, uint32_t *num_entries, uint32_t max_req,
+					uint32_t *flags, uint8_t *buf);
+
+#endif // TOPAZ PLATFORM
+
+#endif /* FWT_DB_H_ */
diff --git a/quantenna/include/qtn/topaz_fwt_if.h b/quantenna/include/qtn/topaz_fwt_if.h
new file mode 100644
index 0000000..746e275
--- /dev/null
+++ b/quantenna/include/qtn/topaz_fwt_if.h
@@ -0,0 +1,89 @@
+/*SH1
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2013 Quantenna Communications Inc                   **
+**                            All Rights Reserved                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH1*/
+
+#ifndef FWT_INTERFACE_H_
+#define FWT_INTERFACE_H_
+
+#include <qtn/br_types.h>
+
+/* Must match FWT_IF_KEY_xxx macros */
+typedef enum fwt_if_usr_cmd {
+	FWT_IF_CMD_CLEAR = 0,
+	FWT_IF_CMD_ON,
+	FWT_IF_CMD_OFF,
+	FWT_IF_CMD_PRINT,
+	FWT_IF_CMD_ADD_STATIC_MC,
+	FWT_IF_CMD_DEL_STATIC_MC,
+	FWT_IF_CMD_GET_MC_LIST,
+	FWT_IF_CMD_ADD,
+	FWT_IF_CMD_DELETE,
+	FWT_IF_CMD_AUTO,
+	FWT_IF_CMD_MANUAL,
+	FWT_IF_CMD_4ADDR,
+	FWT_IF_CMD_DEBUG,
+	FWT_IF_CMD_HELP,
+	FWT_IF_CMD_AGEING,
+	FWT_IF_MAX_CMD,
+} fwt_if_usr_cmd;
+
+#include <linux/types.h>
+
+#define FWT_IF_USER_NODE_MAX (6)
+
+struct fwt_if_id {
+	uint8_t mac_be[ETH_ALEN];
+	struct br_ip ip;
+};
+
+struct fwt_if_common {
+	struct fwt_if_id id;
+	uint8_t port;
+	uint8_t node[FWT_IF_USER_NODE_MAX];
+	uint32_t param;
+	void *extra;
+};
+
+typedef int (*fwt_if_sw_cmd_hook)(fwt_if_usr_cmd cmd, struct fwt_if_common *data);
+
+void fwt_if_register_cbk_t(fwt_if_sw_cmd_hook cbk_func);
+
+#endif /* FWT_INTERFACE_H_ */
diff --git a/quantenna/include/qtn/topaz_fwt_sw.h b/quantenna/include/qtn/topaz_fwt_sw.h
new file mode 100644
index 0000000..0267b16
--- /dev/null
+++ b/quantenna/include/qtn/topaz_fwt_sw.h
@@ -0,0 +1,148 @@
+/*
+ * (C) Copyright 2013 Quantenna Communications Inc.
+ */
+
+#ifndef FWT_SW_H_
+#define FWT_SW_H_
+
+
+#include <linux/types.h>
+#include <qtn/topaz_fwt_db.h>
+#include <qtn/topaz_fwt_if.h>
+
+/* Success definition in FWT Interface is return positive value */
+#define FWT_IF_SUCCESS(x)	((x) >= 0)
+/* Error definition in FWT Interface is return negative value */
+#define FWT_IF_ERROR(x)		(!(FWT_IF_SUCCESS(x)))
+
+typedef enum
+{
+	FWT_SW_4_ADDR_DEPRECATE = 0,
+	FWT_SW_4_ADDR_SUPPORT,
+	FWT_SW_4_ADDR_MAX,
+}fwt_sw_4addr_status;
+
+/* Portal represent support in 4 address mode */
+#define FWT_SW_DEFAULT_4ADDR	FWT_SW_4_ADDR_DEPRECATE
+
+/*
+ * Register overwrite entries for second level entry delete protocol from FWT table
+ * @param dst_index: Index to be overwritten
+ * @param src_index: Source index
+ * */
+void topaz_fwt_register_overwrite_entries(uint16_t dst_index,uint16_t src_index);
+
+/*
+ * Register a node
+ * @param node_num: node number
+ * @param vap_idx: vap index
+ */
+void fwt_sw_register_node(uint16_t node_num);
+
+/*
+ * Unregister a node
+ * @param node_num: node number
+ * @param vap_idx: vap index
+ */
+void fwt_sw_unregister_node(uint16_t node_num);
+
+/*
+ * Add device to the FWT.
+ * If successful, update the FWT mirror table and the node list at the fwt database
+ *
+ * @param mac_id: MAC ID in big endian presentation
+ * @param port_id: the port number. Note: must match the FWT HW presentation.
+ * @param node_num: the node number
+ * @param ip_map: Multicast aliasing bit identifier.
+ * @return success / failure indication.
+ */
+int fwt_sw_add_device(const uint8_t *mac_be, uint8_t port_id, uint8_t node_num,
+		const struct br_ip *group);
+
+/*
+ * Set 4 address support for specific MAC ID
+ * @param mac_be: mac id in big endian presentation
+ * @param addr: Support indication for 4 address method
+ */
+int fwt_sw_set_4_address_support(const uint8_t *mac_be, fwt_sw_4addr_status addr);
+/*
+ * Reset call will clear both HW and Software FWT tables
+ */
+void fwt_sw_reset(void);
+
+/*
+ * Print both node list and FWT table
+ */
+int fwt_sw_print(void);
+
+
+/* Inidicate expiry time
+ * @param mac_be: mac id in big endian presentation
+ */
+int fwt_sw_get_timestamp(const uint8_t *mac_be);
+
+/*
+ * Delete device entry from both HW and SW FWT tables
+ * @param mac_be: MAC in big endian
+ */
+int fwt_sw_delete_device(const uint8_t *mac_be);
+
+/*
+ * Update or insert new FWT table entry from multicast IGMP message.
+ * @param node: node number.
+ * @param port_id: output port.
+ * @param group: Indication for the multicast address by group id.
+ */
+int fwt_sw_join_multicast(uint8_t node, uint8_t port_id,
+		const struct br_ip *group);
+/*
+ * Remove or delete node from the FWT table entry from multicast IGMP message.
+ * @param node: node number.
+ * @param port_id: output port.
+ * @param group: Indication for the multicast address by group id.
+ */
+int fwt_sw_leave_multicast(uint8_t node, uint8_t port_id,
+		const struct br_ip *group);
+
+typedef int (*fwt_sw_4addr_callback_t)(void *token, const uint8_t *mac_be, uint8_t port_id,
+		uint8_t node_num);
+
+typedef uint8_t (*fwt_sw_remapper_t)(uint8_t in_port, const uint8_t *mac_be);
+
+void fwt_sw_register_port_remapper(uint8_t port, fwt_sw_remapper_t remapper);
+
+/**
+ * Callback to determine whether a FWT table entry should be added as 4 address mode or not.
+ * Typically registered by qdrv
+ * @param callback: callback function pointer to register
+ * @param token: will always be provided to the callback when invoked, as the first argument
+ */
+void fwt_sw_4addr_callback_set(fwt_sw_4addr_callback_t callback, void *token);
+
+/* Get number of current entries */
+uint16_t fwt_sw_get_entries_cnt(void);
+
+int fwt_sw_cmd(fwt_if_usr_cmd cmd, struct fwt_if_common *data);
+
+int fwt_sw_get_index_from_mac_be(const uint8_t *mac_be);
+
+/*
+ * Fast way to get fwt entry for unicast packet
+ * @param src_mac_be: source mac address of the packet
+ * @param dst_mac_be: destination mac address of the packet
+ */
+fwt_db_entry *fwt_sw_fast_get_ucast_entry(const unsigned char *src_mac_be,
+		const unsigned char *dst_mac_be);
+
+void fwt_sw_update_false_miss(int index, uint8_t false_miss);
+
+int fwt_sw_get_ipff(char *buf, int buflen);
+
+extern dma_addr_t ipmac_hash_bus;
+extern dma_addr_t ipmac_base_bus;
+
+int fwt_sw_update_uc_ipmac(const uint8_t *mac_be, const uint8_t *ip, uint16_t type);
+
+void fwt_sw_remove_uc_ipmac(const uint8_t *ip, uint16_t type);
+
+#endif /* FWT_INTERFACE_H_ */
diff --git a/quantenna/include/qtn/topaz_hbm.h b/quantenna/include/qtn/topaz_hbm.h
new file mode 100644
index 0000000..e9548cd5
--- /dev/null
+++ b/quantenna/include/qtn/topaz_hbm.h
@@ -0,0 +1,85 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __TOPAZ_HBM_H
+#define __TOPAZ_HBM_H
+
+#include <linux/skbuff.h>
+#include <qtn/qtn_buffers.h>
+#include <qtn/topaz_hbm_cpuif.h>
+
+#include <qtn/dmautil.h>
+#include <asm/cacheflush.h>
+
+#define topaz_hbm_attach_skb(buf_virt, pool, headroom)		\
+	_topaz_hbm_attach_skb((buf_virt), (pool), 1, (headroom)	\
+			QTN_SKB_ALLOC_TRACE_ARGSRC)
+#define topaz_hbm_attach_skb_no_invalidate(buf_virt, pool, headroom)		\
+	_topaz_hbm_attach_skb((buf_virt), (pool), 0, (headroom) 	\
+			QTN_SKB_ALLOC_TRACE_ARGSRC)
+struct sk_buff *_topaz_hbm_attach_skb(void *buf_virt, int8_t pool, int inv, uint8_t headroom
+		QTN_SKB_ALLOC_TRACE_ARGS);
+
+#define topaz_hbm_attach_skb_bus(buf_bus, pool)	\
+	_topaz_hbm_attach_skb_bus((buf_bus), (pool)	\
+			QTN_SKB_ALLOC_TRACE_ARGSRC)
+static inline struct sk_buff *
+_topaz_hbm_attach_skb_bus(void *buf_bus, int8_t pool
+		QTN_SKB_ALLOC_TRACE_ARGS)
+{
+	void *buf_virt;
+
+	if (unlikely(buf_bus == NULL)) {
+		return NULL;
+	}
+
+	buf_virt = bus_to_virt((uintptr_t) buf_bus);
+	if (unlikely(buf_virt == RUBY_BAD_VIRT_ADDR)) {
+		return NULL;
+	}
+
+	return _topaz_hbm_attach_skb(buf_virt, pool, 1, 0
+			QTN_SKB_ALLOC_TRACE_ARGVARS);
+}
+
+static inline void topaz_hbm_flush_skb_cache(struct sk_buff *skb)
+{
+	uintptr_t flush_start = (uintptr_t) align_buf_cache(skb->head);
+	uintptr_t flush_end = align_val_up((uintptr_t) skb_end_pointer(skb),
+			dma_get_cache_alignment());
+	if (!skb->cache_is_cleaned)
+		flush_and_inv_dcache_range(flush_start, flush_end);
+}
+
+void topaz_hbm_filter_txdone_pool(void);
+void topaz_hbm_filter_txdone_buf(void *const buf_bus);
+unsigned int topaz_hbm_pool_available(int8_t pool);
+#ifdef TOPAZ_EMAC_NULL_BUF_WR
+extern void (*topaz_emac_null_buf_del_cb)(void);
+#endif
+
+void topaz_hbm_release_buf_safe(void *const pkt_bus);
+
+struct sk_buff *topaz_hbm_attach_skb_quarantine(void *buf_virt, int pool, int len, uint8_t **whole_frm_hdr);
+
+#endif	/* __TOPAZ_HBM_H */
+
diff --git a/quantenna/include/qtn/topaz_hbm_cpuif.h b/quantenna/include/qtn/topaz_hbm_cpuif.h
new file mode 100644
index 0000000..daf2609
--- /dev/null
+++ b/quantenna/include/qtn/topaz_hbm_cpuif.h
@@ -0,0 +1,793 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __TOPAZ_HBM_CPUIF_PLATFORM_H
+#define __TOPAZ_HBM_CPUIF_PLATFORM_H
+
+#include "mproc_sync.h"
+#include "qtn_buffers.h"
+#include "qtn_arc_processor.h"
+
+/**
+ * HBM Requestors
+ * 0	- LHost
+ * 1	- MuC
+ * 2	- emac0	hw wired
+ * 3	- emac1	hw wired
+ * 4	- wmac	hw wired
+ * 5	- tqe	hw wired
+ * 6	- AuC
+ * 7	- DSP
+ * 8	- PCIE(?)
+ *
+ * Note: qdrv_pktlogger_get_hbm_stats must be updated if this list is changed.
+ */
+#define TOPAZ_HBM_REQUESTOR_NAMES	{ "lhost", "muc", "emac0", "emac1", "wmac", "tqe", "AuC", "DSP", "PCIe" }
+
+#if defined(__linux__)
+	#define TOPAZ_HBM_LOCAL_CPU	0
+	#define topaz_hbm_local_irq_save	local_irq_save
+	#define topaz_hbm_local_irq_restore	local_irq_restore
+#elif defined(MUC_BUILD)
+	#define	TOPAZ_HBM_LOCAL_CPU	1
+	#define topaz_hbm_local_irq_save(x)	do { (x) = _save_disable(); } while(0)
+	#define topaz_hbm_local_irq_restore(x)	do { _restore_enable((x)); } while(0)
+#elif defined(AUC_BUILD)
+	#define	TOPAZ_HBM_LOCAL_CPU	6
+	#define topaz_hbm_local_irq_save(x)	do { (void)(x); } while(0)
+	#define topaz_hbm_local_irq_restore(x)	do { (void)(x); } while(0)
+#elif defined(DSP_BUILD)
+	#define	TOPAZ_HBM_LOCAL_CPU	7
+#else
+	#error No TOPAZ_HBM_LOCAL_CPU set
+#endif
+
+#define TOPAZ_HBM_NUM_POOLS			4
+
+#ifdef QTN_RC_ENABLE_HDP
+#define TOPAZ_HBM_PAYLOAD_HEADROOM		128
+#else
+#define TOPAZ_HBM_PAYLOAD_HEADROOM		64
+#endif
+
+#define TOPAZ_HBM_PAYLOAD_END_GUARD_SIZE	32		/* equal to cacheline size */
+#define TOPAZ_HBM_BUF_GUARD_MAGIC		0xDEADBEEF
+#define TOPAZ_HBM_BUF_CORRUPTED_MAGIC		0xDEADBEEF
+#define TOPAZ_HBM_BUF_PAYLOAD_POISON		0xA5
+#define TOPAZ_HBM_BUF_PAYLOAD_POISON32		(TOPAZ_HBM_BUF_PAYLOAD_POISON |                \
+							(TOPAZ_HBM_BUF_PAYLOAD_POISON << 8) |  \
+							(TOPAZ_HBM_BUF_PAYLOAD_POISON << 16) | \
+							(TOPAZ_HBM_BUF_PAYLOAD_POISON << 24))
+
+#define TOPAZ_HBM_BUF_EXTERNAL_META		1	/* move meta data outside of buffer */
+#define TOPAZ_HBM_BUF_WMAC_RX_QUARANTINE	1	/* quarantine wmac rx buffers when deliver important packets */
+
+#if defined(CONFIG_TOPAZ_PCIE_TARGET) || defined(CONFIG_TOPAZ_DBDC_HOST)
+/*
+ * Checking emac rx pool buffers lead to performance impact in PCIe, so limit
+ * the check for wmac rx pool only.
+ */
+#define TOPAZ_HBM_BUF_MAGIC_CHK_ALLPOOL		0
+#else
+#define TOPAZ_HBM_BUF_MAGIC_CHK_ALLPOOL		1
+#endif
+
+#define TOPAZ_HBM_DEBUG_DUMP			0	/* inline debug dump functions */
+#define TOPAZ_HBM_DEBUG_STAMPS			0	/* extra trace info in meta data */
+
+#if TOPAZ_HBM_DEBUG_STAMPS
+#define TOPAZ_HBM_OWNER_MUC_FREE	0x9
+#define TOPAZ_HBM_OWNER_AUC_FREE	0xa
+#define TOPAZ_HBM_OWNER_LH_TX_TQE	0xb
+#define TOPAZ_HBM_OWNER_LH_RX_TQE	0xc
+#define TOPAZ_HBM_OWNER_LH_RX_MBOX	0xd
+#define TOPAZ_HBM_OWNER_INIT		0xe
+#define TOPAZ_HBM_OWNER_FREE		0xf
+#endif
+
+#define TOPAZ_HBM_ERR_NONE		0
+#define TOPAZ_HBM_ERR_PTR		(-1)
+#define TOPAZ_HBM_ERR_MAGIC		(-2)
+#define TOPAZ_HBM_ERR_TAILGUARD		(-3)
+
+/*
+ * The usage of the HBM buffer headroom and meta data, depending on TOPAZ_HBM_BUF_EXTERNAL_META:
+ * 1. When it is 1, all the below meta data except magic in head and tail, and pointer to meta are
+ * in separate memory region, outside of the buffer.
+ * 2. When it is 0, all the below meta data are in HBM buffer headroom.
+ * To avoid define different offset values for above 2 cases, we use the same definition. The only
+ * difference is where the meta data is stored.
+ */
+enum QTN_HBM_BUF_HEADROOM_OFFSET {
+	HBM_HR_OFFSET_ENQ_CNT = 1,	/* in word */
+	HBM_HR_OFFSET_FREE_CNT = 2,	/* in word */
+	HBM_HR_OFFSET_OCS_FRM_ID = 3,	/* in word */
+	HBM_HR_OFFSET_FREE_JIFF = 4,	/* debugging; jiffies of last free. leaked buffer heuristic */
+	HBM_HR_OFFSET_OWNER = 5,	/* debugging; buffer owner */
+	HBM_HR_OFFSET_SIZE = 6,		/* debugging; buffer size */
+	HBM_HR_OFFSET_STATE = 7,	/* state about the buffer */
+	HBM_HR_OFFSET_META_PTR = 8,	/* pointer and back pointer bwtween buffer and meta, bus addr */
+	HBM_HR_OFFSET_MAGIC = 9,	/* the magic, keep it biggest thus first in headroom */
+	HBM_HR_OFFSET_MAX = HBM_HR_OFFSET_MAGIC,
+};
+
+#define QTN_HBM_SANITY_BAD_HR_MAGIC	BIT(0)
+#define QTN_HBM_SANITY_BAD_TAIL_GUARD	BIT(1)
+#define QTN_HBM_SANITY_BAD_ALREADY	BIT(31)
+
+#define TOPAZ_HBM_BUF_DUMP_MAX		0xFFFF
+#define TOPAZ_HBM_BUF_DUMP_DFT		512U
+#define TOPAZ_HBM_BUF_DUMP_TAIL_DFT	2048U
+
+#if TOPAZ_HBM_DEBUG_DUMP
+#if defined(DSP_BUILD)
+#elif defined(AUC_BUILD)
+	#define CPU_PRINT auc_os_printf
+	#define CPU_INV_DCACHE_RANGE(_v, _range)
+	#define CPU_HZ		AUC_CPU_TIMER_HZ
+#elif defined(MUC_BUILD)
+	#define CPU_PRINT uc_printk
+	#define CPU_INV_DCACHE_RANGE invalidate_dcache_range_safe
+	#define CPU_HZ		HZ
+#else
+	#ifdef __KERNEL__
+		#include <qtn/dmautil.h>
+		#define CPU_PRINT printk
+		#define CPU_INV_DCACHE_RANGE inv_dcache_sizerange_safe
+		#define CPU_HZ		HZ
+	#endif
+#endif
+#endif // TOPAZ_HBM_DEBUG_DUMP
+
+RUBY_INLINE uint32_t topaz_hbm_buf_offset_from_start_bus(void *buf_bus, uint8_t pool, uint8_t is_aligned)
+{
+	if (is_aligned) {
+		return ((uint32_t)buf_bus) & (TOPAZ_HBM_BUF_ALIGN - 1);
+	}
+	if (pool == TOPAZ_HBM_BUF_WMAC_RX_POOL) {
+		return (((uint32_t)buf_bus) - TOPAZ_HBM_BUF_WMAC_RX_BASE) % TOPAZ_HBM_BUF_WMAC_RX_SIZE;
+	} else if (pool == TOPAZ_HBM_BUF_EMAC_RX_POOL) {
+		return (((uint32_t)buf_bus) - TOPAZ_HBM_BUF_EMAC_RX_BASE) % TOPAZ_HBM_BUF_EMAC_RX_SIZE;
+	} else {
+		return 0;
+	}
+}
+
+RUBY_INLINE int topaz_hbm_buf_identify_buf_bus(const void *buf_bus, uint32_t *sizep, uint32_t *idxp)
+{
+	if (__in_mem_range((uint32_t)buf_bus, TOPAZ_HBM_BUF_EMAC_RX_BASE, TOPAZ_HBM_BUF_EMAC_RX_TOTAL)) {
+		*sizep = TOPAZ_HBM_BUF_EMAC_RX_SIZE;
+		*idxp = (((uint32_t)buf_bus) - TOPAZ_HBM_BUF_EMAC_RX_BASE) / TOPAZ_HBM_BUF_EMAC_RX_SIZE;
+		return TOPAZ_HBM_BUF_EMAC_RX_POOL;
+	} else if (__in_mem_range((uint32_t)buf_bus, TOPAZ_HBM_BUF_WMAC_RX_BASE, TOPAZ_HBM_BUF_WMAC_RX_TOTAL)) {
+		*sizep = TOPAZ_HBM_BUF_WMAC_RX_SIZE;
+		*idxp = (((uint32_t)buf_bus) - TOPAZ_HBM_BUF_WMAC_RX_BASE) / TOPAZ_HBM_BUF_WMAC_RX_SIZE;
+		return TOPAZ_HBM_BUF_WMAC_RX_POOL;
+	} else {
+		return -1;
+	}
+}
+
+RUBY_INLINE int topaz_hbm_buf_identify_buf_virt(const void *buf_virt, uint32_t *sizep, uint32_t *idxp)
+{
+	if (__in_mem_range((uint32_t)buf_virt, TOPAZ_HBM_BUF_EMAC_RX_BASE_VIRT, TOPAZ_HBM_BUF_EMAC_RX_TOTAL)) {
+		*sizep = TOPAZ_HBM_BUF_EMAC_RX_SIZE;
+		*idxp = (((uint32_t)buf_virt) - TOPAZ_HBM_BUF_EMAC_RX_BASE_VIRT) / TOPAZ_HBM_BUF_EMAC_RX_SIZE;
+		return TOPAZ_HBM_BUF_EMAC_RX_POOL;
+	} else if (__in_mem_range((uint32_t)buf_virt, TOPAZ_HBM_BUF_WMAC_RX_BASE_VIRT, TOPAZ_HBM_BUF_WMAC_RX_TOTAL)) {
+		*sizep = TOPAZ_HBM_BUF_WMAC_RX_SIZE;
+		*idxp = (((uint32_t)buf_virt) - TOPAZ_HBM_BUF_WMAC_RX_BASE_VIRT) / TOPAZ_HBM_BUF_WMAC_RX_SIZE;
+		return TOPAZ_HBM_BUF_WMAC_RX_POOL;
+	} else {
+		return -1;
+	}
+}
+
+RUBY_INLINE int topaz_hbm_buf_ptr_valid(const void *buf_virt)
+{
+	uint32_t offset;
+
+	if (__in_mem_range((uint32_t)buf_virt, TOPAZ_HBM_BUF_EMAC_RX_BASE_VIRT, TOPAZ_HBM_BUF_EMAC_RX_TOTAL)) {
+		offset = (((uint32_t)buf_virt) - TOPAZ_HBM_BUF_EMAC_RX_BASE_VIRT) % TOPAZ_HBM_BUF_EMAC_RX_SIZE;
+	} else if (__in_mem_range((uint32_t)buf_virt, TOPAZ_HBM_BUF_WMAC_RX_BASE_VIRT, TOPAZ_HBM_BUF_WMAC_RX_TOTAL)) {
+		offset = (((uint32_t)buf_virt) - TOPAZ_HBM_BUF_WMAC_RX_BASE_VIRT) % TOPAZ_HBM_BUF_WMAC_RX_SIZE;
+	} else {
+		return 0;
+	}
+
+	return (offset == TOPAZ_HBM_PAYLOAD_HEADROOM);
+}
+
+#if TOPAZ_HBM_BUF_EXTERNAL_META
+RUBY_INLINE void* topaz_hbm_buf_get_meta(const void *buf_virt)
+{
+	uint32_t idx;
+
+	if (__in_mem_range((uint32_t)buf_virt, TOPAZ_HBM_BUF_EMAC_RX_BASE_VIRT, TOPAZ_HBM_BUF_EMAC_RX_TOTAL)) {
+		idx = (((uint32_t)buf_virt) - TOPAZ_HBM_BUF_EMAC_RX_BASE_VIRT) / TOPAZ_HBM_BUF_EMAC_RX_SIZE;
+		return (void*)(TOPAZ_HBM_BUF_META_EMAC_RX_BASE_VIRT + TOPAZ_HBM_BUF_META_SIZE +
+			idx * TOPAZ_HBM_BUF_META_SIZE);
+	} else if (__in_mem_range((uint32_t)buf_virt, TOPAZ_HBM_BUF_WMAC_RX_BASE_VIRT, TOPAZ_HBM_BUF_WMAC_RX_TOTAL)) {
+		idx = (((uint32_t)buf_virt) - TOPAZ_HBM_BUF_WMAC_RX_BASE_VIRT) / TOPAZ_HBM_BUF_WMAC_RX_SIZE;
+		return (void*)(TOPAZ_HBM_BUF_META_WMAC_RX_BASE_VIRT + TOPAZ_HBM_BUF_META_SIZE +
+			idx * TOPAZ_HBM_BUF_META_SIZE);
+	} else {
+		return NULL;
+	}
+}
+
+/*
+ * A fast way to get the meta address.
+ * However this assume the meta address in buffer headroom is not corrupted as long as the magic in
+ * buffer headroom is not corrupted. So this is not 100% correct, but it can be used to speed up for
+ * some non-real-world test.
+ */
+RUBY_INLINE void* topaz_hbm_buf_get_meta_fast(const void *buf_virt)
+{
+	uint32_t *magicp = (uint32_t*)buf_virt - HBM_HR_OFFSET_MAGIC;
+
+	/* assume ptr is valid when magic is not corrupted */
+	if (likely(arc_read_uncached_32(magicp) == TOPAZ_HBM_BUF_GUARD_MAGIC)) {
+		uint32_t *meta_ptr_p = (uint32_t*)buf_virt - HBM_HR_OFFSET_META_PTR;
+		return (void*)bus_to_virt(arc_read_uncached_32(meta_ptr_p));
+	}
+
+	return topaz_hbm_buf_get_meta(buf_virt);
+}
+#else
+#define topaz_hbm_buf_get_meta_fast(_buf_virt)	(_buf_virt)
+#define topaz_hbm_buf_get_meta(_buf_virt)	(_buf_virt)
+#endif
+
+RUBY_INLINE uint32_t topaz_hbm_buf_offset_from_start_virt(void *buf_virt, uint8_t pool, uint8_t is_aligned)
+{
+	return topaz_hbm_buf_offset_from_start_bus((void *)virt_to_bus(buf_virt), pool, is_aligned);
+}
+
+RUBY_INLINE void *topaz_hbm_payload_store_align_bus(void *buf_bus, uint8_t pool, uint8_t is_aligned)
+{
+	return ((uint8_t *)buf_bus) - topaz_hbm_buf_offset_from_start_bus(buf_bus, pool, is_aligned)
+			+ TOPAZ_HBM_PAYLOAD_HEADROOM;
+}
+
+RUBY_INLINE void *topaz_hbm_payload_store_align_virt(void *buf_virt, uint8_t pool, uint8_t is_aligned)
+{
+	return ((uint8_t *)buf_virt) - topaz_hbm_buf_offset_from_start_virt(buf_virt, pool, is_aligned)
+			+ TOPAZ_HBM_PAYLOAD_HEADROOM;
+}
+
+RUBY_INLINE unsigned long topaz_hbm_payload_store_align_from_index(int8_t pool, uint16_t index)
+{
+	if (pool == TOPAZ_HBM_BUF_EMAC_RX_POOL && index < TOPAZ_HBM_BUF_EMAC_RX_COUNT) {
+		return RUBY_DRAM_BEGIN + TOPAZ_HBM_BUF_EMAC_RX_BASE +
+			(index * TOPAZ_HBM_BUF_EMAC_RX_SIZE) + TOPAZ_HBM_PAYLOAD_HEADROOM;
+	} else if (pool == TOPAZ_HBM_BUF_WMAC_RX_POOL && index < TOPAZ_HBM_BUF_WMAC_RX_COUNT) {
+		return RUBY_DRAM_BEGIN + TOPAZ_HBM_BUF_WMAC_RX_BASE +
+			(index * TOPAZ_HBM_BUF_WMAC_RX_SIZE) + TOPAZ_HBM_PAYLOAD_HEADROOM;
+	}
+	return 0;
+}
+
+RUBY_INLINE long topaz_hbm_payload_buff_ptr_offset_bus(void *buf_bus, uint8_t pool, void *align_bus)
+{
+	unsigned long buf_align = (unsigned long)topaz_hbm_payload_store_align_bus(
+			align_bus ? align_bus : buf_bus, pool, !!align_bus);
+
+	return buf_align - (unsigned long)buf_bus;
+}
+
+RUBY_INLINE long topaz_hbm_payload_buff_ptr_offset_virt(void *buf_virt, uint8_t pool, void *align_virt)
+{
+	return topaz_hbm_payload_buff_ptr_offset_bus((void *)virt_to_bus(buf_virt), pool,
+			align_virt ? (void *)virt_to_bus(align_virt) : NULL);
+}
+
+RUBY_INLINE int __topaz_hbm_is_done(void)
+{
+	return qtn_mproc_sync_mem_read(TOPAZ_HBM_POOL_REQ(TOPAZ_HBM_LOCAL_CPU)) & TOPAZ_HBM_DONE;
+}
+
+RUBY_INLINE void __topaz_hbm_release_buf(void *buf, uint8_t pool)
+{
+	/* assumes previous operations are complete */
+	qtn_mproc_sync_mem_write_wmb(TOPAZ_HBM_POOL_DATA(TOPAZ_HBM_LOCAL_CPU),
+			(unsigned long) buf);
+	qtn_mproc_sync_mem_write_wmb(TOPAZ_HBM_POOL_REQ(TOPAZ_HBM_LOCAL_CPU),
+			TOPAZ_HBM_POOL_NUM(pool) | TOPAZ_HBM_RELEASE_BUF);
+}
+
+RUBY_INLINE void __topaz_hbm_request_start(uint8_t pool)
+{
+	qtn_mproc_sync_mem_write_wmb(TOPAZ_HBM_POOL_REQ(TOPAZ_HBM_LOCAL_CPU),
+			TOPAZ_HBM_POOL_NUM(pool) | TOPAZ_HBM_REQUEST_BUF);
+}
+
+RUBY_INLINE void *__topaz_hbm_rd_buf(uint8_t pool)
+{
+	/* must be preceded by __topaz_hbm_rd_req, then polling on __topaz_hbm_is_done */
+	return (void *) qtn_mproc_sync_mem_read(TOPAZ_HBM_POOL_DATA(TOPAZ_HBM_LOCAL_CPU));
+}
+
+RUBY_INLINE void __topaz_hbm_wait(void)
+{
+	unsigned int timeouts = 0;
+	unsigned int timeout_reached = 0;
+
+	while (1) {
+		int i;
+		if (__topaz_hbm_is_done()) {
+			return;
+		}
+
+		/* busy wait until buffer is available */
+		for (i = 0; i < 10; i++) {
+#if defined(AUC_BUILD) && defined(_ARC)
+			/*
+			 * This is a workaround for MetaWare C Compiler v7.4.0
+			 * bug in Zero-Delay Loop code generation for ARC 600 family cores.
+			 * Without it the LP_START register will be written to, two
+			 * instruction before the end address of the loop, but at least three
+			 * instructions are required according to the ARC ISA Programmer's
+			 * Reference.
+			 */
+			_nop();
+			_nop();
+			_nop();
+#else
+			qtn_pipeline_drain();
+#endif
+		}
+
+		if (unlikely(timeout_reached == 0 && timeouts++ == 1000)) {
+			timeout_reached = 1;
+			qtn_mproc_sync_log("__topaz_hbm_wait timeout");
+		}
+	}
+
+	if (unlikely(timeout_reached)) {
+		qtn_mproc_sync_log("__topaz_hbm_wait succeeded");
+	}
+}
+
+RUBY_INLINE int __topaz_hbm_put_buf_nowait(void *buf, uint8_t pool)
+{
+	if (__topaz_hbm_is_done()) {
+		__topaz_hbm_release_buf(buf, pool);
+		return 0;
+	}
+	return -EBUSY;
+}
+
+RUBY_INLINE void __topaz_hbm_put_buf(void *buf, uint8_t pool)
+{
+	__topaz_hbm_wait();
+	__topaz_hbm_release_buf(buf, pool);
+}
+
+#if defined(MUC_BUILD)
+RUBY_INLINE void topaz_hbm_put_buf(void *buf, uint8_t pool)
+#else
+RUBY_WEAK(topaz_hbm_put_buf) void topaz_hbm_put_buf(void *buf, uint8_t pool)
+#endif
+{
+	unsigned long flags;
+
+	topaz_hbm_local_irq_save(flags);
+	__topaz_hbm_put_buf(buf, pool);
+	topaz_hbm_local_irq_restore(flags);
+}
+
+RUBY_INLINE void *__topaz_hbm_get_buf(uint8_t pool)
+{
+	__topaz_hbm_wait();
+	__topaz_hbm_request_start(pool);
+	__topaz_hbm_wait();
+	return __topaz_hbm_rd_buf(pool);
+}
+
+#if defined(MUC_BUILD)
+RUBY_INLINE void *topaz_hbm_get_buf(uint8_t pool)
+#else
+RUBY_WEAK(topaz_hbm_get_buf) void *topaz_hbm_get_buf(uint8_t pool)
+#endif
+{
+	unsigned long flags;
+	void *buf;
+
+	topaz_hbm_local_irq_save(flags);
+	buf = __topaz_hbm_get_buf(pool);
+	topaz_hbm_local_irq_restore(flags);
+
+	return buf;
+}
+
+RUBY_INLINE void topaz_hbm_init(void *pool_list_bus, uint16_t payload_count_s, uint8_t pool, int full)
+{
+	unsigned long csr;
+	const uint16_t payload_count = BIT(payload_count_s);
+
+	qtn_mproc_sync_mem_write_wmb(TOPAZ_HBM_BASE_REG(pool), (unsigned long) pool_list_bus);
+	qtn_mproc_sync_mem_write_wmb(TOPAZ_HBM_LIMIT_REG(pool), payload_count);
+	qtn_mproc_sync_mem_write_wmb(TOPAZ_HBM_WR_PTR(pool), full ? payload_count : 0);
+	qtn_mproc_sync_mem_write_wmb(TOPAZ_HBM_RD_PTR(pool), 0);
+
+	csr = qtn_mproc_sync_mem_read(TOPAZ_HBM_CSR_REG);
+	qtn_mproc_sync_mem_write_wmb(TOPAZ_HBM_CSR_REG, csr | TOPAZ_HBM_CSR_Q_EN(pool));
+}
+
+RUBY_INLINE uint32_t topaz_hbm_pool_buf_whole_size(int8_t pool)
+{
+	if (pool == TOPAZ_HBM_BUF_EMAC_RX_POOL) {
+		return TOPAZ_HBM_BUF_EMAC_RX_SIZE;
+	} else if (pool == TOPAZ_HBM_BUF_WMAC_RX_POOL) {
+		return TOPAZ_HBM_BUF_WMAC_RX_SIZE;
+	} else {
+		return 0;
+	}
+}
+
+RUBY_INLINE uint32_t topaz_hbm_pool_buf_max_size(int8_t pool)
+{
+	uint32_t size;
+
+	size = topaz_hbm_pool_buf_whole_size(pool);
+	if (!size)
+		return 0;
+
+	return size -
+		TOPAZ_HBM_PAYLOAD_HEADROOM -
+		TOPAZ_HBM_PAYLOAD_END_GUARD_SIZE;
+}
+
+RUBY_INLINE int8_t topaz_hbm_pool_valid(int8_t pool)
+{
+	return pool >= 0 && pool < TOPAZ_HBM_NUM_POOLS;
+}
+
+RUBY_INLINE int8_t topaz_hbm_payload_get_pool_bus(const void *buf_bus)
+{
+	const unsigned long v = (const unsigned long) buf_bus;
+	if (__in_mem_range(v, TOPAZ_HBM_BUF_EMAC_RX_BASE, TOPAZ_HBM_BUF_EMAC_RX_TOTAL)) {
+		return TOPAZ_HBM_BUF_EMAC_RX_POOL;
+	} else if (__in_mem_range(v, TOPAZ_HBM_BUF_WMAC_RX_BASE, TOPAZ_HBM_BUF_WMAC_RX_TOTAL)) {
+		return TOPAZ_HBM_BUF_WMAC_RX_POOL;
+	} else {
+		return -1;
+	}
+}
+
+RUBY_INLINE int8_t topaz_hbm_payload_get_free_pool_bus(const void *buf_bus)
+{
+	int8_t orig_pool = topaz_hbm_payload_get_pool_bus(buf_bus);
+	if (orig_pool == TOPAZ_HBM_BUF_EMAC_RX_POOL || orig_pool == TOPAZ_HBM_BUF_WMAC_RX_POOL) {
+		return TOPAZ_HBM_EMAC_TX_DONE_POOL;
+	}
+	return -1;
+}
+
+RUBY_INLINE void topaz_hbm_put_payload_aligned_bus(void *buf_bus, int8_t pool)
+{
+	if (likely(topaz_hbm_pool_valid(pool))) {
+		topaz_hbm_put_buf(topaz_hbm_payload_store_align_bus(buf_bus, pool, 1), pool);
+	}
+}
+
+RUBY_INLINE void topaz_hbm_put_payload_realign_bus(void *buf_bus, int8_t pool)
+{
+	if (likely(topaz_hbm_pool_valid(pool))) {
+		topaz_hbm_put_buf(topaz_hbm_payload_store_align_bus(buf_bus, pool, 0), pool);
+	}
+}
+
+RUBY_INLINE void topaz_hbm_put_payload_aligned_virt(void *buff_virt, int8_t pool)
+{
+	topaz_hbm_put_payload_aligned_bus((void *) virt_to_bus(buff_virt), pool);
+}
+
+RUBY_INLINE void topaz_hbm_put_payload_realign_virt(void *buff_virt, int8_t pool)
+{
+	topaz_hbm_put_payload_realign_bus((void *) virt_to_bus(buff_virt), pool);
+}
+
+#ifdef __KERNEL__
+#define topaz_hbm_get_payload_bus(pool)		__topaz_hbm_get_payload_bus((pool), __FILE__, __LINE__, __FUNCTION__)
+RUBY_INLINE void *__topaz_hbm_get_payload_bus(int8_t pool, const char *file, const int line, const char *func)
+{
+	if (likely(topaz_hbm_pool_valid(pool))) {
+		return topaz_hbm_get_buf(pool);
+	}
+	if (printk_ratelimit()) {
+		printk("%s:%u%s null buffer from pool %hhd\n",
+				file, line, func, pool);
+	}
+	return NULL;
+}
+
+#define topaz_hbm_get_payload_virt(pool)	__topaz_hbm_get_payload_virt((pool), __FILE__, __LINE__, __FUNCTION__)
+RUBY_INLINE void *__topaz_hbm_get_payload_virt(int8_t pool, const char *file, const int line, const char *func)
+{
+	void *buf_bus = topaz_hbm_get_payload_bus(pool);
+	if (unlikely(!buf_bus)) {
+		if (printk_ratelimit()) {
+			printk("%s:%u%s null buffer from pool %hhd\n",
+					file, line, func, pool);
+		}
+		return NULL;
+	}
+	return bus_to_virt((unsigned long) buf_bus);
+}
+
+#else
+
+RUBY_INLINE void *topaz_hbm_get_payload_bus(int8_t pool)
+{
+	if (likely(topaz_hbm_pool_valid(pool))) {
+		return topaz_hbm_get_buf(pool);
+	}
+	return NULL;
+}
+
+RUBY_INLINE void *topaz_hbm_get_payload_virt(int8_t pool)
+{
+	void *buf_bus = topaz_hbm_get_payload_bus(pool);
+	if (unlikely(!buf_bus)) {
+		return NULL;
+	}
+	return bus_to_virt((unsigned long) buf_bus);
+}
+#endif
+
+RUBY_INLINE int hbm_buf_check_wmac_rx_buf_overrun(void *v, int fix)
+{
+	uint32_t *guardp;
+
+	/* only check last 4 bytes guard */
+	guardp =(uint32_t*)((uint32_t)v + TOPAZ_HBM_BUF_WMAC_RX_SIZE - TOPAZ_HBM_PAYLOAD_HEADROOM - 4);
+	if (likely(arc_read_uncached_32(guardp) == TOPAZ_HBM_BUF_GUARD_MAGIC)) {
+		return TOPAZ_HBM_ERR_NONE;
+	}
+
+	/*
+	 * It is best if we do the buffer pointer check first, but as we only do the overrun check after wmac rx,
+	 * if it is bad, the memory is already corrupted.
+	 */
+
+	if (fix) {
+		arc_write_uncached_32(guardp, TOPAZ_HBM_BUF_GUARD_MAGIC);
+	}
+
+	return TOPAZ_HBM_ERR_TAILGUARD;
+}
+
+RUBY_INLINE int hbm_buf_check_buf_magic(void *v)
+{
+	uint32_t *magicp = (uint32_t*)v - HBM_HR_OFFSET_MAGIC;
+
+	if (likely(arc_read_uncached_32(magicp) == TOPAZ_HBM_BUF_GUARD_MAGIC)) {
+		return TOPAZ_HBM_ERR_NONE;
+	}
+
+	return TOPAZ_HBM_ERR_MAGIC;
+}
+
+RUBY_INLINE void hbm_buf_fix_buf_magic(void *v)
+{
+	uint32_t *magicp = (uint32_t*)v - HBM_HR_OFFSET_MAGIC;
+
+	arc_write_uncached_32(magicp, TOPAZ_HBM_BUF_GUARD_MAGIC);
+}
+
+#if TOPAZ_HBM_DEBUG_DUMP
+/* assume v is 4 bytes aligned */
+RUBY_INLINE void topaz_buf_dump_range(const void *v, int len)
+{
+#if defined(DSP_BUILD)
+#elif defined(AUC_BUILD)
+	int i;
+	const uint32_t *d32;
+	int dump_loop;
+
+	d32 = v;
+	dump_loop = ((len + 3) >> 2) >> 3;
+	for (i = 0; i < dump_loop; i++) {
+		CPU_PRINT("0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x",
+			d32[0], d32[1], d32[2], d32[3], d32[4], d32[5], d32[6], d32[7]);
+		d32 += 8;
+	}
+#else
+	int i;
+	const uint8_t *d;
+
+	d = v;
+	for (i = 0; i < len; ) {
+		if (!(i % 32))
+			CPU_PRINT("%08x ", (i - i % 32));
+		++i;
+		CPU_PRINT("%02x%s", *d++, (i % 32) == 0 ? "\n" : " ");
+	}
+	CPU_PRINT("\n");
+#endif
+}
+
+RUBY_INLINE void topaz_hbm_buf_show(void *v, const uint32_t len, const uint32_t tail_len)
+{
+#if defined(DSP_BUILD)
+#else
+	const uint32_t *_p = v;
+	const uint32_t *_m = topaz_hbm_buf_get_meta(_p);
+	const uint32_t *enqueuep = _m - HBM_HR_OFFSET_ENQ_CNT;
+	const uint32_t *freep = _m - HBM_HR_OFFSET_FREE_CNT;
+	const uint32_t *jiffp = _m - HBM_HR_OFFSET_FREE_JIFF;
+	const uint32_t *ownerp = _m - HBM_HR_OFFSET_OWNER;
+	const uint32_t *sizep = _m - HBM_HR_OFFSET_SIZE;
+	const uint32_t *magicp = _p - HBM_HR_OFFSET_MAGIC;
+	const uint32_t ec = arc_read_uncached_32(enqueuep);
+	const uint32_t fc = arc_read_uncached_32(freep);
+	const uint32_t jc = arc_read_uncached_32(jiffp);
+	const uint32_t oc = arc_read_uncached_32(ownerp);
+	const uint32_t sz = arc_read_uncached_32(sizep);
+	const uint32_t magic = arc_read_uncached_32(magicp);
+	uint32_t *guardp;
+	uint32_t guard;
+	int dump_bytes;
+	uint32_t whole_size;
+	uint32_t payload_size;
+	int pool;
+	uint32_t idx;
+
+	pool = topaz_hbm_buf_identify_buf_virt(v, &whole_size, &idx);
+	if (pool < 0) {
+		return;
+	}
+	payload_size = whole_size - TOPAZ_HBM_PAYLOAD_HEADROOM;
+	CPU_INV_DCACHE_RANGE((void*)v, payload_size);
+	dump_bytes = (len == TOPAZ_HBM_BUF_DUMP_MAX) ? payload_size : len;
+
+	/* only check last 4 bytes guard */
+	guardp =(uint32_t*)((uint32_t)_p + payload_size - 4);
+	guard = arc_read_uncached_32(guardp);
+
+	CPU_PRINT("buf start 0x%x pool %d idx %u size %u dump %u\n",
+			(unsigned int)v, pool, idx, whole_size, dump_bytes);
+#ifdef __KERNEL__
+	CPU_PRINT("%p ec %u fp %u own %08x size %u j %u (%u s ago)\n",
+			v, ec, fc, oc, sz, jc, (((uint32_t) jiffies) - jc) / CPU_HZ);
+#else
+	/* free jiffies is only set by Lhost, so no way to do jiffies diff */
+	CPU_PRINT("%p ec %u fp %u own %08x size %u j %u (local j %u)\n",
+			v, ec, fc, oc, sz, jc, ((uint32_t) jiffies));
+#endif
+	if (magic != TOPAZ_HBM_BUF_GUARD_MAGIC) {
+		CPU_PRINT("magic %x corrupted\n", magic);
+	}
+	if (guard != TOPAZ_HBM_BUF_GUARD_MAGIC) {
+		CPU_PRINT("guard %x corrupted\n", guard);
+	}
+
+	topaz_buf_dump_range(v, dump_bytes);
+
+	if (tail_len) {
+		uint32_t tail;
+
+		tail = (uint32_t)v;
+		tail += payload_size;
+		tail -= tail_len;
+
+		CPU_PRINT("buf tail 0x%x\n", tail);
+		topaz_buf_dump_range((void*)tail, tail_len);
+	}
+#endif
+}
+
+/*
+ * Full sanity check suitable for all buffers.
+ * Debug build use only, not suitable for release because of performance impact.
+ */
+RUBY_INLINE int hbm_buf_check_sanity(void *v)
+{
+	const uint32_t *magicp = (uint32_t*)v - HBM_HR_OFFSET_MAGIC;
+	uint32_t *_m;
+	uint32_t *statep;
+	uint32_t state;
+	uint32_t magic;
+	uint32_t payload_size;
+	uint32_t *guardp;
+	uint32_t guard;
+	uint32_t size = 0;
+	uint32_t idx = 0;
+	uint32_t bad = 0;
+	int pool;
+
+	magic = arc_read_uncached_32(magicp);
+	if (unlikely(magic != TOPAZ_HBM_BUF_GUARD_MAGIC)) {
+		bad |= QTN_HBM_SANITY_BAD_HR_MAGIC;
+	}
+
+	pool = topaz_hbm_buf_identify_buf_virt(v, &size, &idx);
+	payload_size = size - TOPAZ_HBM_PAYLOAD_HEADROOM;
+	/* only check last 4 bytes guard */
+	guardp =(uint32_t*)((uint32_t)v + payload_size - 4);
+	guard = arc_read_uncached_32(guardp);
+	if (unlikely(guard != TOPAZ_HBM_BUF_GUARD_MAGIC)) {
+		bad |= QTN_HBM_SANITY_BAD_TAIL_GUARD;
+	}
+
+	if (likely(!bad))
+		return 0;
+
+	/* avoid multiple alert */
+	_m = topaz_hbm_buf_get_meta(v);
+	statep = (uint32_t*)_m - HBM_HR_OFFSET_STATE;
+	state = arc_read_uncached_32(statep);
+	if ((bad & (~state)) == 0) {
+		return (bad | QTN_HBM_SANITY_BAD_ALREADY);
+	}
+
+	/* new corruption */
+	arc_write_uncached_32(statep, bad);
+	CPU_PRINT("ERROR: hbm buffer %x corrupted, pool %d, idx %u\n",
+			(unsigned int)v, pool, idx);
+
+	topaz_hbm_buf_show(v, TOPAZ_HBM_BUF_DUMP_DFT, 0);
+
+	/* new corruption of tail guard */
+	if ((bad & QTN_HBM_SANITY_BAD_TAIL_GUARD) && !(state & QTN_HBM_SANITY_BAD_TAIL_GUARD)) {
+		/* find the corruption extent */
+		int i;
+		int j = 0;
+		int lines = (size * 4) / 16;
+		uint32_t pos = 0;
+		for (i = 0; i < lines ; i++) {
+			for (j = 0; j < 4; j++) {
+				pos = (uint32_t)v + i * 16 + j * 4;
+				if (*(uint32_t*)pos != (uint32_t)TOPAZ_HBM_BUF_PAYLOAD_POISON32)
+					break;
+			}
+			if (j == 4)
+				break;
+		}
+		CPU_PRINT("guess tail corruption length %d %x\n", (i * 16) + (j * 4), pos);
+	}
+
+	return bad;
+}
+#endif // TOPAZ_HBM_DEBUG_DUMP
+
+#if TOPAZ_HBM_DEBUG_STAMPS
+RUBY_INLINE void topaz_hbm_debug_stamp(void *buf, uint8_t port, uint32_t size)
+{
+	uint32_t *p = buf;
+	uint32_t *_m = topaz_hbm_buf_get_meta(p);
+	uint32_t *ownerp = _m - HBM_HR_OFFSET_OWNER;
+	uint32_t *sizep = _m - HBM_HR_OFFSET_SIZE;
+
+	arc_write_uncached_32(ownerp, (arc_read_uncached_32(ownerp) << 4) | (port & 0xF));
+	if (size) {
+		arc_write_uncached_32(sizep, size);
+	}
+}
+
+#else
+#define topaz_hbm_debug_stamp(_buf, _port, _size)
+#endif /* TOPAZ_HBM_DEBUG_STAMPS */
+
+#endif	/* __TOPAZ_HBM_CPUIF_PLATFORM_H */
diff --git a/quantenna/include/qtn/topaz_ipprt.h b/quantenna/include/qtn/topaz_ipprt.h
new file mode 100644
index 0000000..206f344
--- /dev/null
+++ b/quantenna/include/qtn/topaz_ipprt.h
@@ -0,0 +1,92 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __TOPAZ_IPPROTO_TABLE_H
+#define __TOPAZ_IPPROTO_TABLE_H
+
+#include <common/topaz_emac.h>
+#include <qtn/mproc_sync_base.h>
+
+union topaz_ipprt_entry {
+	uint32_t raw;
+	struct {
+		uint32_t	out_node	:7,
+				out_port	:4,
+				valid		:1,
+				__unused	:21;
+	} data;
+};
+
+
+#define TOPAZ_IPPRT_ENTRY_INIT	{ 0 }
+
+RUBY_INLINE void topaz_ipprt_set_entry(uint8_t emac, uint8_t ip_proto, union topaz_ipprt_entry e)
+{
+	uint32_t emac_base = emac ? RUBY_ENET1_BASE_ADDR : RUBY_ENET0_BASE_ADDR;
+	qtn_mproc_sync_mem_write(emac_base + TOPAZ_EMAC_IP_PROTO_ENTRY(ip_proto), e.raw);
+}
+
+RUBY_INLINE void topaz_ipprt_clear_entry(uint8_t emac, uint8_t ip_proto)
+{
+	uint32_t emac_base = emac ? RUBY_ENET1_BASE_ADDR : RUBY_ENET0_BASE_ADDR;
+	qtn_mproc_sync_mem_write(emac_base + TOPAZ_EMAC_IP_PROTO_ENTRY(ip_proto), 0x0);
+}
+
+RUBY_INLINE void topaz_ipprt_clear_all_entries(uint8_t emac)
+{
+	int proto;
+	for (proto = 0; proto < TOPAZ_EMAC_IP_PROTO_ENTRIES; ++proto) {
+		topaz_ipprt_clear_entry(emac, proto);
+	}
+}
+
+RUBY_INLINE void topaz_ipprt_set(uint8_t emac, uint8_t ip_proto, uint8_t out_port, uint8_t out_node)
+{
+	union topaz_ipprt_entry e = TOPAZ_IPPRT_ENTRY_INIT;
+	e.data.out_node = out_node;
+	e.data.out_port = out_port;
+	e.data.valid = 1;
+	topaz_ipprt_set_entry(emac, ip_proto, e);
+}
+
+RUBY_INLINE union topaz_ipprt_entry topaz_ipprt_get_entry(uint8_t emac, uint8_t ip_proto)
+{
+	uint32_t emac_base = emac ? RUBY_ENET1_BASE_ADDR : RUBY_ENET0_BASE_ADDR;
+	union topaz_ipprt_entry e;
+	e.raw = qtn_mproc_sync_mem_read(emac_base + TOPAZ_EMAC_IP_PROTO_ENTRY(ip_proto));
+	return e;
+}
+
+#ifndef TOPAZ_TEST_ASSERT_EQUAL
+# define TOPAZ_TEST_ASSERT_EQUAL(a, b)	if ((a) != (b)) { return -1; }
+#endif
+RUBY_INLINE int topaz_ipprt_entry_bitfield_test(const union topaz_ipprt_entry *e)
+{
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw, TOPAZ_EMAC_IP_PROTO_OUT_NODE), e->data.out_node);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw, TOPAZ_EMAC_IP_PROTO_OUT_PORT), e->data.out_port);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw, TOPAZ_EMAC_IP_PROTO_VALID), e->data.valid);
+
+	return 0;
+}
+
+#endif	/* __TOPAZ_IPPROTO_TABLE_H */
+
diff --git a/quantenna/include/qtn/topaz_qfp.h b/quantenna/include/qtn/topaz_qfp.h
new file mode 100644
index 0000000..f15a2e9
--- /dev/null
+++ b/quantenna/include/qtn/topaz_qfp.h
@@ -0,0 +1,143 @@
+/*
+ * (C) Copyright 2015 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __TOPAZ_QFP_H__
+#define __TOPAZ_QFP_H__
+
+
+#define ioremap ioremap_nocache
+
+/**
+ * \brief Initialize topaz PCIe QFP interface.
+ *
+ * Initialize topaz PCIe QFP interface. This function should be called before
+ * any other QFP API call.
+ *
+ * \param pci_dev pci_dev pci_dev structure point to PCIe adapter
+ * \param msi flag for using legacy interrupt (0) or MSI (1)
+ *
+ * \return 0 on success.
+ *
+ */
+extern int qfp_init(struct pci_dev * pci_dev, int msi);
+
+/**
+ * \brief De-initialize topaz PCIe QFP interface.
+ *
+ * De-initialize topaz PCIe QFP interface.
+ *
+ * \param pci_dev pci_dev pci_dev structure point to PCIe adapter
+ * \param msi flag for using legacy interrupt (0) or MSI (1)
+ *
+ *
+ */
+extern void qfp_deinit(struct pci_dev * pci_dev, int msi);
+
+/**
+ * \brief register master netdev to QFP
+ *
+ * Register master netdev to QFP. After calling this function, packets received
+ * or transmit through this netdef will be accelerated by QFP.
+ *
+ * The caller should call this function right before calling register_netdev()
+ * for the master netdev.
+ *
+ * \param netdev pointer to master netdev
+ *
+ * \return 0 on success and other for failure
+ */
+extern int qfp_register_netdev(struct net_device * net_dev);
+
+/**
+ * \brief un-register master netdev from QFP
+ *
+ * Un-register master netdev from QFP.
+ *
+ * The caller should call this function right after calling unregister_netdev()
+ * for the master netdev.
+ *
+ * \param netdev pointer to master netdev
+ *
+ * \return 0 on success and other for failure
+ */
+extern void qfp_unregister_netdev(struct net_device * net_dev);
+
+/**
+ * \brief register virtual netdev to QFP
+ *
+ * Register virtual netdev to QFP. After calling this function, packets
+ * received or transmit through this netdef will be accelerated by QFP. This
+ * function is used to create virtual netdev for VAP.
+ *
+ * The caller should call this function right before calling register_netdev()
+ * for the virtual netdev.
+ *
+ * \param netdev pointer to virtual netdev
+ *
+ * \return 0 on success and other for failure
+ */
+extern int qfp_register_virtual_netdev(struct net_device * net_dev);
+
+/**
+ * \brief un-register virtual netdev from QFP
+ *
+ * Un-register virtual netdev from QFP.
+ *
+ * The caller should call this function right after calling unregister_netdev()
+ * for the virtual netdev.
+ *
+ * \param netdev pointer to virtual netdev
+ *
+ * \return 0 on success and other for failure
+ */
+extern void qfp_unregister_virtual_netdev(struct net_device * net_dev);
+
+/**
+ * \brief allocate skb.
+ *
+ * Allocate a skb from QFP, and all skb will be received to QFP must allocate by
+ * calling this function. The caller should call this function instead of any
+ * linux skb allocation function for RX packets.
+ *
+ * \param size max size of bytes for payload of skb
+ *
+ * \return pointer to a skb or NULL for failure
+ */
+extern struct sk_buff * qfp_alloc_skb(unsigned int size);
+
+/**
+ * \brief Receive skb to QFP.
+ *
+ * Received a skb which allocate by calling qfp_alloc_skb() to QFP. The caller
+ * should call this function instead of calling netif_rx() or netif_receive_skb()
+ * The caller loses reference to the skb when this function return successfu. And
+ * caller should still call netif_rx() or netif_receive_skb() when this function
+ * return failure.
+ *
+ * \param skb pointer to skb need to received to QFP
+ *
+ * \return 0 on success; -1 on failure
+ */
+extern int qfp_rx(struct sk_buff * skb);
+
+#endif
+
diff --git a/quantenna/include/qtn/topaz_shared_params.h b/quantenna/include/qtn/topaz_shared_params.h
new file mode 100644
index 0000000..f2dc0cb
--- /dev/null
+++ b/quantenna/include/qtn/topaz_shared_params.h
@@ -0,0 +1,426 @@
+/*SH1
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2012 Quantenna Communications Inc                   **
+**                            All Rights Reserved                            **
+**                                                                           **
+**  Author      : Quantenna Communications Inc                               **
+**  File        : topaz_shared_params.h                                            **
+**  Description :                                                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH1*/
+
+#ifndef _TOPAZ_SHARED_PARAMS_H_
+#define _TOPAZ_SHARED_PARAMS_H_
+
+#include <qtn/mproc_sync_mutex.h>
+#include <qtn/qtn_uc_comm.h>
+#include <qtn/qtn_wmm_ac.h>
+
+enum shared_params_auc_ipc_cmd
+{
+	SHARED_PARAMS_IPC_NONE_CMD		= 0,
+
+	/* begining of M2A IPC config commands */
+	SHARED_PARAMS_IPC_M2A_CFG_PARAMS_MIN,
+	SHARED_PARAMS_IPC_M2A_SLOW_NODE_CREATE_CMD,
+	SHARED_PARAMS_IPC_M2A_NODE_CREATE_CMD,
+	SHARED_PARAMS_IPC_M2A_NODE_DESTROY_CMD,
+	SHARED_PARAMS_IPC_M2A_SLOW_TID_CREATE_CMD,
+	SHARED_PARAMS_IPC_M2A_TID_CREATE_CMD,
+	SHARED_PARAMS_IPC_M2A_TID_DESTROY_CMD,
+	SHARED_PARAMS_IPC_M2A_TID_ACTIVATE_CMD,
+	SHARED_PARAMS_IPC_M2A_TID_DEACTIVATE_CMD,
+	SHARED_PARAMS_IPC_M2A_TID_CHECK_IDLE_CMD,
+	SHARED_PARAMS_IPC_M2A_TID_BA_CTL_CMD,
+	SHARED_PARAMS_IPC_M2A_TX_SCALE_CMD,
+	SHARED_PARAMS_IPC_M2A_TX_SCALE_BASE_CMD,
+	SHARED_PARAMS_IPC_M2A_TX_SCALE_MAX_CMD,
+	SHARED_PARAMS_IPC_M2A_TX_AGG_TIMEOUT_CMD,
+	SHARED_PARAMS_IPC_M2A_TX_DBG_CMD,
+	SHARED_PARAMS_IPC_M2A_TX_QOS_SCH_CMD,
+	SHARED_PARAMS_IPC_M2A_TX_AGG_DURATION,
+	SHARED_PARAMS_IPC_M2A_FCS_GIVE_CMD,
+	SHARED_PARAMS_IPC_M2A_NODE_RATEDATA_CHANGE_CMD,
+	SHARED_PARAMS_IPC_M2A_OCS_TX_SUSPEND_CMD,
+	SHARED_PARAMS_IPC_M2A_TQEW_DESCR_LIMIT_CMD,
+	SHARED_PARAMS_IPC_M2A_ENABLE_VLAN_CMD,
+	SHARED_PARAMS_IPC_M2A_MU_GRP_UPDATE_CMD,
+	SHARED_PARAMS_IPC_M2A_MU_DBG_FLAG_UPDATE_CMD,
+	SHARED_PARAMS_IPC_M2A_MU_AIRTIME_PADDING_UPDATE_CMD,
+	/* end of M2A IPC config commands */
+	SHARED_PARAMS_IPC_M2A_CFG_PARAMS_MAX,
+
+	SHARED_PARAMS_IPC_M2A_MU_QMAT_UPDATE_CMD,
+	SHARED_PARAMS_IPC_M2A_SRESET_BEGIN_CMD,
+	SHARED_PARAMS_IPC_M2A_SRESET_END_CMD,
+	SHARED_PARAMS_IPC_M2A_PAUSE_ON_CMD,
+	SHARED_PARAMS_IPC_M2A_PAUSE_OFF_CMD,
+
+	/*
+	 * Following are cmd used in A2M IPC interrupt. Put in same enum so that most code can be
+	 * used for both A2M and M2A IPC.
+	 */
+	SHARED_PARAMS_IPC_A2M_FIRST_CMD = 0x100,
+	SHARED_PARAMS_IPC_A2M_AUC_BOOTED_CMD,
+	SHARED_PARAMS_IPC_A2M_BA_ADD_START_CMD,
+	SHARED_PARAMS_IPC_A2M_PANIC,
+	SHARED_PARAMS_IPC_A2M_TDLS_PTI_CMD,
+	SHARED_PARAMS_IPC_A2M_BB_RESET,
+#if QTN_HDP_MU_FCS_WORKROUND
+	SHARED_PARAMS_IPC_A2M_PUSH_WMAC1_FCS,
+#endif
+	SHARED_PARAMS_IPC_A2M_LAST_CMD,
+};
+
+enum qtn_exp_mat_cmd {
+	EXP_MAT_DIS_CMD	= 0,
+	EXP_MAT_DEL_CMD= EXP_MAT_DIS_CMD,
+	EXP_MAT_EN_CMD,
+	EXP_MAT_ADD_CMD,
+	EXP_MAT_FRZ_CMD,
+	EXP_MAT_NUSE_CMD,
+};
+
+#define AUC_IPC_CMD_BA_NODE		0x000000FF
+#define AUC_IPC_CMD_BA_NODE_S		0
+#define AUC_IPC_CMD_BA_TID		0x00000F00
+#define AUC_IPC_CMD_BA_TID_S		8
+#define AUC_IPC_CMD_BA_STATE		0x0000F000
+#define AUC_IPC_CMD_BA_STATE_S		12
+#define AUC_IPC_CMD_BA_FLAGS		0xFFFF0000
+#define AUC_IPC_CMD_BA_FLAGS_S		16
+#define AUC_IPC_CMD_BA_SUBFRM_MAX	0x000000FF
+#define AUC_IPC_CMD_BA_SUBFRM_MAX_S	0
+#define AUC_IPC_CMD_BA_WINSIZE		0x000FFF00
+#define AUC_IPC_CMD_BA_WINSIZE_S	8
+#define AUC_IPC_CMD_BA_AMSDU		0x00100000
+#define AUC_IPC_CMD_BA_AMSDU_S		20
+#define AUC_IPC_CMD_BA_AGG_TIMEOUT	0x0000FFFF
+#define AUC_IPC_CMD_BA_AGG_TIMEOUT_S	0
+#define AUC_IPC_CMD_AGG_TIMEOUT_UNIT	100	/* us */
+
+#define QTN_BA_ARGS_F_IMPLICIT		BIT(0)
+#define QTN_BA_ARGS_F_AMSDU		BIT(1)
+#define QTN_BA_ARGS_F_BLOCK_SINGLETON	BIT(2)
+
+#define AUC_IPC_CMD_AGGTIMEOUT_BE	0x0000FFFF
+#define AUC_IPC_CMD_AGGTIMEOUT_BE_S	0
+#define AUC_IPC_CMD_AGGTIMEOUT_BK	0xFFFF0000
+#define AUC_IPC_CMD_AGGTIMEOUT_BK_S	16
+#define AUC_IPC_CMD_AGGTIMEOUT_VI	0x0000FFFF
+#define AUC_IPC_CMD_AGGTIMEOUT_VI_S	0
+#define AUC_IPC_CMD_AGGTIMEOUT_VO	0xFFFF0000
+#define AUC_IPC_CMD_AGGTIMEOUT_VO_S	16
+
+/*
+ * AuC tx tunable params
+ */
+#define AUC_QOS_SCH_PARAM	0xF0000000
+#define AUC_QOS_SCH_PARAM_S	28
+#define AUC_QOS_SCH_VALUE	0x0FFFFFFF
+#define AUC_QOS_SCH_VALUE_S	0
+#define AUC_QOS_SCH_PARAM_AIRTIME_FAIRNESS	1
+#define AUC_QOS_SCH_PARAM_MERCY_RATIO		3
+#define AUC_QOS_SCH_PARAM_TID_THROT		4
+#define AUC_QOS_SCH_PARAM_AIRTIME_INTRABSS_LOAD_THRSH	5
+#define AUC_QOS_SCH_PARAM_AIRTIME_MARGIN	6
+#define AUC_QOS_SCH_PARAM_AIRTIME_TWEAK		7
+#define AUC_TX_AGG_BASE				8
+#define AUC_TX_AGG_FLAG				(AUC_TX_AGG_BASE + 0)
+#define AUC_TX_AGG_DYN_EAGER_THRSH		(AUC_TX_AGG_BASE + 1)
+#define AUC_TX_AGG_ADAP_SWITCH			(AUC_TX_AGG_BASE + 2)
+#define AUC_TX_OPTIM_FLAG				(AUC_TX_AGG_BASE + 3)
+
+#define QTN_AUC_THROT_NODE	0x0FF00000
+#define QTN_AUC_THROT_NODE_S	20
+#define QTN_AUC_THROT_TID	0x000F0000
+#define QTN_AUC_THROT_TID_S	16
+#define QTN_AUC_THROT_INTVL	0x0000F800
+#define QTN_AUC_THROT_INTVL_S	11
+#define QTN_AUC_THROT_QUOTA	0x000007FF
+#define QTN_AUC_THROT_QUOTA_S	0
+
+#define QTN_AUC_THROT_INTVL_MAX		(0x1F)
+#define QTN_AUC_THROT_INTVL_UNIT	(1 * 5)		/* ms */
+#define QTN_AUC_THROT_QUOTA_MAX		(0x7FF)
+#define QTN_AUC_THROT_QUOTA_UNIT	(1024 * 5)	/* byte */
+
+#define QTN_AUC_AIRFAIR_DFT	1
+#define QTN_AUC_AGG_ADAP_SWITCH_DFT	0
+#define QTN_AUC_TQEW_DESCR_LIMIT_PERCENT_DFT 75
+#define QTN_AUC_OPTIM_FLAG_DFT	0
+
+/*
+ * M2A event setting per-TID flags
+ */
+#define M2A_TIDFLAG_NODE        0x000000FF
+#define M2A_TIDFLAG_NODE_S      0
+#define M2A_TIDFLAG_TID         0x00000F00
+#define M2A_TIDFLAG_TID_S       8
+#define M2A_TIDFLAG_FLAG        0x00FF0000
+#define M2A_TIDFLAG_FLAG_S      16
+#define M2A_TIDFLAG_VAL         0xFF000000
+#define M2A_TIDFLAG_VAL_S       24
+
+enum shared_params_auc_ipc_irq
+{
+	SHARED_PARAMS_IPC_M2A_SRESET_IRQ	= 0,
+	SHARED_PARAMS_IPC_M2A_CONFIG_IRQ,
+	SHARED_PARAMS_IPC_M2A_PAUSE_IRQ
+};
+
+enum shared_params_a2m_ipc_irq
+{
+	/*
+	 * Currently only use 1 bit of IPC register and use "cmd" to expand the ipc usage.
+	 * This makes the top half and bottom half simple.
+	 */
+	SHARED_PARAMS_IPC_A2M_CFG_IRQ	= 0,
+};
+
+/*
+ * Command structure for both A2M and M2A IPC
+ */
+typedef struct shared_params_auc_ipc
+{
+	uint32_t cmd; /* "enum shared_params_auc_ipc_cmd" type, but want to ensure 32-bit size */
+	uint32_t arg1;
+	uint32_t arg2;
+	uint32_t arg3;
+	uint32_t ret;
+} shared_params_auc_ipc;
+
+struct qtn_auc_per_node_data_s;
+struct qtn_auc_misc_data_s;
+struct qtn_auc_per_mac_data_s;
+struct qtn_auc_mu_grp_tbl_elem_s;
+struct qtn_hal_tcm;
+
+typedef struct qtn_shared_node_stats {
+	/* Write by Muc only */
+	uint32_t qtn_rx_pkts;
+	uint32_t qtn_rx_bytes;
+	uint32_t qtn_rx_ucast;
+	uint32_t qtn_rx_bcast;
+	uint32_t qtn_rx_mcast;
+	uint32_t qtn_tx_pkts;
+	uint32_t qtn_tx_bytes;
+	uint32_t qtn_rx_vlan_pkts;
+
+	uint32_t qtn_tx_mcast; /* Lhost */
+	uint32_t qtn_muc_tx_mcast; /* Muc */
+	/*
+	 * The number of dropped data packets failed to transmit through
+	 * wireless media for each traffic category(TC).
+	 */
+	uint32_t qtn_tx_drop_data_msdu[WMM_AC_NUM]; /* AuC */
+} qtn_shared_node_stats_t;
+
+typedef struct qtn_shared_vap_stats {
+	/* Write by Muc only */
+	uint32_t qtn_rx_pkts;
+	uint32_t qtn_rx_bytes;
+	uint32_t qtn_rx_ucast;
+	uint32_t qtn_rx_bcast;
+	uint32_t qtn_rx_mcast;
+	uint32_t qtn_rx_dropped;
+	uint32_t qtn_tx_pkts;
+	uint32_t qtn_tx_bytes;
+
+	uint32_t qtn_tx_mcast; /* Lhost */
+	uint32_t qtn_muc_tx_mcast; /* Muc */
+	uint32_t qtn_tx_dropped; /* Auc */
+} qtn_shared_vap_stats_t;
+
+typedef struct shared_params_auc
+{
+#define SHARED_PARAMS_AUC_CONFIG_ASSERT_EN		BIT(0)
+#define SHARED_PARAMS_AUC_CONFIG_PRINT_EN		BIT(1)
+	u_int32_t				auc_config;
+	u_int32_t				a2l_printbuf_producer;
+	uint32_t				auc_tqe_sem_en;
+#define SHARED_PARAMS_AUC_IPC_STUB			((shared_params_auc_ipc*)1)
+	struct shared_params_auc_ipc		*m2a_ipc;	/* M2A */
+	struct shared_params_auc_ipc		*a2m_ipc;	/* A2M */
+	/*
+	 * 'ma_shared_buf' is used to transfer data btw MuC and AuC in IPC call.
+	 * So far it is used to pass node position in node cache and ieee80211
+	 * vht group. The buffer size is defined to exactly match those data:
+	 * sizeof(struct ieee80211_mu_groups_update)
+	 */
+#define MA_SHARED_BUF_SIZE	(150)
+	uint8_t					(*ma_shared_buf)[MA_SHARED_BUF_SIZE];
+	struct qtn_auc_per_node_data_s		**auc_per_node_data_ptr;
+	struct qtn_auc_misc_data_s		*auc_misc_data_ptr;
+	struct qtn_auc_per_mac_data_s		*auc_per_mac_data_ptr;
+	qtn_mproc_sync_mutex			*auc_per_node_mutex;
+	struct qtn_hal_tcm			*hal_tcm;
+	uint32_t				*auc_last_ilink1_p;
+	uint32_t				*auc_last_ilink2_p;
+	qtn_shared_node_stats_t			*node_stats;
+	qtn_shared_vap_stats_t			*vap_stats;
+	uint32_t				*per_ac_traffic_prev_second;
+	struct qtn_auc_mu_grp_tbl_elem_s	*mu_grp_tbl;
+	struct qtn_hal_tcm                      *hal_wmac1_tcm;
+	struct qtn_vlan_dev			**vdev_bus;
+	struct qtn_vlan_dev			**vport_bus;
+} shared_params_auc;
+
+RUBY_INLINE void
+qtn_mproc_sync_auc_ipc_set_arg1(volatile struct shared_params_auc_ipc *ipc, uint32_t arg1)
+{
+	ipc->arg1 = arg1;
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_auc_ipc_set_args(volatile struct shared_params_auc_ipc *ipc,
+		uint32_t arg1, uint32_t arg2, uint32_t arg3)
+{
+	ipc->arg1 = arg1;
+	ipc->arg2 = arg2;
+	ipc->arg3 = arg3;
+	ipc->ret = 0;
+}
+
+RUBY_INLINE uint32_t
+qtn_mproc_sync_auc_ipc_get_arg1(volatile struct shared_params_auc_ipc *ipc)
+{
+	return ipc->arg1;
+}
+
+RUBY_INLINE uint32_t
+qtn_mproc_sync_auc_ipc_get_arg2(volatile struct shared_params_auc_ipc *ipc)
+{
+	return ipc->arg2;
+}
+
+RUBY_INLINE uint32_t
+qtn_mproc_sync_auc_ipc_get_arg3(volatile struct shared_params_auc_ipc *ipc)
+{
+	return ipc->arg3;
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_auc_ipc_set_cmd(volatile struct shared_params_auc_ipc *ipc,
+		enum shared_params_auc_ipc_cmd cmd)
+{
+	ipc->cmd = cmd;
+}
+
+RUBY_INLINE int
+qtn_mproc_sync_auc_ipc_wait_ready(volatile struct shared_params_auc_ipc *ipc,
+		enum shared_params_auc_ipc_cmd cmd, int relax_count, uint32_t loop_count)
+{
+	uint32_t cnt = 0;
+
+	while (ipc->cmd != cmd) {
+		if ((loop_count > 0) && (cnt >= loop_count)) {
+			return -1;
+		}
+
+		qtn_mproc_sync_mutex_relax(relax_count);
+
+		cnt++;
+	}
+
+	return 0;
+}
+
+RUBY_INLINE enum shared_params_auc_ipc_cmd
+qtn_mproc_sync_auc_ipc_wait_mready(volatile struct shared_params_auc_ipc *ipc,
+		int relax_count, int loop_count)
+{
+	enum shared_params_auc_ipc_cmd cmd;
+	int loop = 0;
+
+	while(loop++ < loop_count) {
+		cmd = ipc->cmd;
+		if (cmd > SHARED_PARAMS_IPC_M2A_CFG_PARAMS_MIN &&
+				cmd < SHARED_PARAMS_IPC_M2A_CFG_PARAMS_MAX) {
+			return cmd;
+		}
+
+		qtn_mproc_sync_mutex_relax(relax_count);
+	}
+
+	return SHARED_PARAMS_IPC_NONE_CMD;
+}
+
+RUBY_INLINE int
+qtn_mproc_sync_auc_ipc_wait_done(volatile struct shared_params_auc_ipc *ipc,
+		int relax_count, uint32_t loop_count)
+{
+	return qtn_mproc_sync_auc_ipc_wait_ready(ipc,
+		SHARED_PARAMS_IPC_NONE_CMD, relax_count, loop_count);
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_auc_ipc_done(volatile struct shared_params_auc_ipc *ipc)
+{
+	qtn_mproc_sync_auc_ipc_set_cmd(ipc, SHARED_PARAMS_IPC_NONE_CMD);
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_auc_ipc_req(volatile struct shared_params_auc_ipc *ipc,
+		enum shared_params_auc_ipc_cmd cmd, int relax_count)
+{
+	qtn_mproc_sync_auc_ipc_set_cmd(ipc, cmd);
+	qtn_mproc_sync_auc_ipc_wait_done(ipc, relax_count, 0);
+}
+
+RUBY_INLINE void
+qtn_mproc_sync_auc_ipc_ack(volatile struct shared_params_auc_ipc *ipc,
+		enum shared_params_auc_ipc_cmd cmd, int relax_count)
+{
+	qtn_mproc_sync_auc_ipc_wait_ready(ipc, cmd, relax_count, 0);
+	qtn_mproc_sync_auc_ipc_done(ipc);
+}
+
+RUBY_INLINE int
+qtn_mproc_sync_auc_ipc_init_wait(volatile struct shared_params_auc *params, int relax_count)
+{
+	while (!params->m2a_ipc) {
+		qtn_mproc_sync_mutex_relax(relax_count);
+	}
+	return (params->m2a_ipc != SHARED_PARAMS_AUC_IPC_STUB);
+}
+
+#define topaz_mgmt_fcs_offset(buf, len)	roundup_ptr(((unsigned long) (buf)) + (len))
+
+#endif /* _TOPAZ_SHARED_PARAMS_H_ */
+
diff --git a/quantenna/include/qtn/topaz_tqe.h b/quantenna/include/qtn/topaz_tqe.h
new file mode 100644
index 0000000..54b3b84
--- /dev/null
+++ b/quantenna/include/qtn/topaz_tqe.h
@@ -0,0 +1,68 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __TOPAZ_TQE_H
+#define __TOPAZ_TQE_H
+
+#include <linux/if_ether.h>
+#include <linux/netdevice.h>
+#include <qtn/topaz_tqe_cpuif.h>
+
+
+typedef void (*tqe_port_handler)(void *token,
+		const union topaz_tqe_cpuif_descr *descr,
+		struct sk_buff *skb, uint8_t *whole_frm_hdr);
+
+typedef const struct topaz_fwt_sw_mcast_entry*(
+		*tqe_fwt_get_mcast_hook)(uint16_t fwt_index, const void *addr, uint16_t ether_type);
+typedef const struct fwt_db_entry*(
+		*tqe_fwt_get_ucast_hook)(const unsigned char *src_mac_be, const unsigned char *dst_mac_be);
+typedef const struct fwt_db_entry*(
+		*tqe_fwt_get_from_mac_hook)(const unsigned char *mac_be);
+typedef int(*tqe_mac_reserved_hook)(const uint8_t *addr);
+typedef struct topaz_fwt_sw_mcast_entry*(
+		*tqe_fwt_get_mcast_ff_hook)(void);
+typedef void(*tqe_fwt_false_miss_hook)(int fwt_index, uint8_t false_miss);
+
+int tqe_port_add_handler(enum topaz_tqe_port port, tqe_port_handler handler, void *token);
+void tqe_port_remove_handler(enum topaz_tqe_port port);
+int tqe_tx(union topaz_tqe_cpuif_ppctl *ppctl, struct sk_buff *skb);
+void tqe_register_fwt_cbk(tqe_fwt_get_mcast_hook mcast_cbk_func,
+				tqe_fwt_get_mcast_ff_hook mcast_ff_get_cbk_func,
+				tqe_fwt_false_miss_hook false_miss_func);
+void tqe_register_ucastfwt_cbk(tqe_fwt_get_ucast_hook cbk_func);
+void tqe_register_macfwt_cbk(tqe_fwt_get_from_mac_hook cbk_func);
+void tqe_register_mac_reserved_cbk(tqe_mac_reserved_hook cbk_func);
+int tqe_rx_multicast(void *queue, const union topaz_tqe_cpuif_descr *desc);
+void tqe_port_register(const enum topaz_tqe_port port);
+void tqe_port_unregister(const enum topaz_tqe_port port);
+void tqe_reg_multicast_tx_stats(void (*fn)(void *ctx, uint8_t), void *ctx);
+void tqe_port_set_group(const enum topaz_tqe_port port, int32_t group);
+void tqe_port_clear_group(const enum topaz_tqe_port port);
+uint32_t switch_tqe_multi_proc_sem_down(char * funcname, int linenum);
+uint32_t switch_tqe_multi_proc_sem_up(void);
+int tqe_rx_l2_ext_filter(union topaz_tqe_cpuif_descr *desc, struct sk_buff *skb);
+void tqe_rx_call_port_handler(union topaz_tqe_cpuif_descr *desc,
+		struct sk_buff *skb, uint8_t *whole_frm_hdr);
+
+#endif	/* __TOPAZ_TQE_H */
+
diff --git a/quantenna/include/qtn/topaz_tqe_cpuif.h b/quantenna/include/qtn/topaz_tqe_cpuif.h
new file mode 100644
index 0000000..80b8f58
--- /dev/null
+++ b/quantenna/include/qtn/topaz_tqe_cpuif.h
@@ -0,0 +1,569 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __TOPAZ_TQE_CPUIF_PLATFORM_H
+#define __TOPAZ_TQE_CPUIF_PLATFORM_H
+
+#include "mproc_sync_base.h"
+
+enum topaz_tqe_port {
+	TOPAZ_TQE_FIRST_PORT	= 0,
+
+	TOPAZ_TQE_EMAC_0_PORT	= 0,
+	TOPAZ_TQE_EMAC_1_PORT	= 1,
+	TOPAZ_TQE_WMAC_PORT	= 2,
+	TOPAZ_TQE_PCIE_PORT	= 3,
+	TOPAZ_TQE_LHOST_PORT	= 4,
+	TOPAZ_TQE_MUC_PORT	= 5,
+	TOPAZ_TQE_DSP_PORT	= 6,
+	TOPAZ_TQE_AUC_PORT	= 7,
+
+	TOPAZ_TQE_NUM_PORTS	= 8,
+	TOPAZ_TQE_DUMMY_PORT	= 15
+};
+
+enum topaz_mproc_tqe_sem_id
+{
+	TOPAZ_MPROC_TQE_SEM_INVALID	= 0,
+	TOPAZ_MPROC_TQE_SEM_LHOST	= 1,
+	TOPAZ_MPROC_TQE_SEM_MUC		= 2,
+	TOPAZ_MPROC_TQE_SEM_AUC		= 3
+};
+
+/* bits of port_id  */
+#define PORT_ID_BITS                       8
+/* high 3 bits in port_id is used to save dev_id for 2.4G VAP */
+#define DEV_ID_BITS                        3
+
+#define MAX_QFP_NETDEV                     (1 << DEV_ID_BITS)
+#define MAX_DEV_ID                         (1 << DEV_ID_BITS)
+#define MAX_PORT_ID                        (1 << (PORT_ID_BITS - DEV_ID_BITS))
+
+#define GET_BIT_FIELD(var, offset, width) \
+		(((var) >> (offset)) & ((1 << (width)) - 1))
+
+#define INJECT_DEV_ID_TO_PORT_ID(port_id, dev_id, target) \
+		do {\
+			BUG_ON((port_id) >= MAX_PORT_ID || (dev_id) >= MAX_DEV_ID); \
+			(target) = (port_id) | ((dev_id) << (PORT_ID_BITS - DEV_ID_BITS)); \
+		} while (0)
+#define EXTRACT_PORT_ID_FROM_PORT_ID(port_id) \
+		GET_BIT_FIELD((port_id), 0, (PORT_ID_BITS - DEV_ID_BITS))
+#define EXTRACT_DEV_ID_FROM_PORT_ID(port_id) \
+		GET_BIT_FIELD((port_id), (PORT_ID_BITS - DEV_ID_BITS), DEV_ID_BITS)
+
+#define TOPAZ_TQE_PORT_NAMES	{ "emac0", "emac1", "wmac", "pcie", "lhost", "muc", "dsp", "auc", }
+#define TOPAZ_TQE_PORT_IS_EMAC(_port)	(((_port) == TOPAZ_TQE_EMAC_0_PORT) || \
+						((_port) == TOPAZ_TQE_EMAC_1_PORT))
+#define TOPAZ_TQE_PORT_IS_WMAC(_port)	((_port) == TOPAZ_TQE_WMAC_PORT)
+
+#if defined(__linux__)
+	#define TOPAZ_TQE_LOCAL_CPU	TOPAZ_TQE_LHOST_PORT
+#elif defined(ARCSHELL)
+	#define TOPAZ_TQE_LOCAL_CPU	TOPAZ_TQE_LHOST_PORT
+#elif defined(MUC_BUILD)
+	#define TOPAZ_TQE_LOCAL_CPU	TOPAZ_TQE_MUC_PORT
+#elif defined(DSP_BUILD)
+	#define TOPAZ_TQE_LOCAL_CPU	TOPAZ_TQE_DSP_PORT
+#elif defined(AUC_BUILD)
+	#define TOPAZ_TQE_LOCAL_CPU	TOPAZ_TQE_AUC_PORT
+#else
+	#error No TOPAZ_TQE_LOCAL_CPU set
+#endif
+
+union topaz_tqe_cpuif_descr
+{
+	struct
+	{
+		uint32_t dw0;
+		uint32_t dw1;
+		uint32_t dw2;
+		uint32_t dw3;
+	} raw;
+	struct
+	{
+		signed buff_ptr_offset:16;
+		unsigned misc_user:10;
+		unsigned __reserved1:5;
+		unsigned own:1;
+		unsigned length:16;
+		enum topaz_tqe_port in_port:4;
+		unsigned need_to_free:1;
+		unsigned __reserved2:3;
+		unsigned control:8;
+		void *pkt;
+		union topaz_tqe_cpuif_descr *next;
+	} data;
+};
+
+#define TQE_MISCUSER_A2M_TYPE		0x300
+#define TQE_MISCUSER_A2M_TYPE_S		8
+#define TQE_MISCUSER_A2M_TYPE_PARAM	0x0FF
+#define TQE_MISCUSER_A2M_TYPE_PARAM_S	0
+
+#define TQE_MISCUSER_A2M_TYPE_TXFEEDBACK	0
+#define TQE_MISCUSER_A2M_TYPE_RXPKT		1
+#define TQE_MISCUSER_A2M_TYPE_TXPKT		2
+
+#define TQE_MISCUSER_M2L_DATA_NODE_IDX		0x7F
+#define TQE_MISCUSER_M2L_DATA_NODE_IDX_S	0
+#if TOPAZ_SWITCH_OUT_NODE_MASK != TQE_MISCUSER_M2L_DATA_NODE_IDX
+	#error Node cache index misc_user must support 128 entries
+#endif
+#define TQE_MISCUSER_M2L_DATA_3ADDR_BR		0x80
+#define TQE_MISCUSER_M2L_DATA_3ADDR_BR_S	7
+#define TQE_MISCUSER_M2L_DROP			0x100
+#define TQE_MISCUSER_M2L_DROP_S			8
+
+#define TQE_MISCUSER_L2A_NO_AMSDU	0x002
+#define TQE_MISCUSER_L2A_RATE_TRAINING	0x008
+#define TQE_MISCUSER_L2A_RESERVED_FOR_A2A		0x10	/* place holder for A2A below */
+
+#define TQE_MISCUSER_M2A_MGMT_SKIP_RATE_RETRY1		0x01
+#define TQE_MISCUSER_M2A_MGMT_SKIP_RATE_RETRY1_S	0
+#define TQE_MISCUSER_M2A_MGMT_OCS_FRAME			0x02
+#define TQE_MISCUSER_M2A_MGMT_OCS_FRAME_S		1
+#define TQE_MISCUSER_M2A_EVENT_VIA_TQE			0x04
+#define TQE_MISCUSER_M2A_EVENT_VIA_TQE_S		2
+#define TQE_MISCUSER_M2A_MGMT_PROBE_FRAME		0x08
+#define TQE_MISCUSER_M2A_MGMT_PROBE_FRAME_S		3
+#define TQE_MISCUSER_M2A_RESERVED_FOR_A2A		0x10	/* place holder for A2A below */
+#define TQE_MISCUSER_M2A_MGMT_GROUP			0x20
+#define TQE_MISCUSER_M2A_MGMT_GROUP_S			5
+
+/*
+ * At the ethq stage, only tqew descriptor is available for use. Some place holder have been added
+ * above in M2A and L2A define to reserve bits.
+ */
+#define TQE_MISCUSER_A2A_GROUP				0x10
+
+
+#define TQE_MISCUSER_DTIM_GROUP		(TQE_MISCUSER_M2A_MGMT_GROUP | TQE_MISCUSER_A2A_GROUP)
+
+union topaz_tqe_cpuif_q_ptr_status
+{
+	uint32_t raw;
+	struct {
+		unsigned write_idx:15;
+		unsigned write_idx_wrap:1;
+		unsigned read_idx:15;
+		unsigned read_idx_wrap:1;
+	} data;
+};
+
+union topaz_tqe_cpuif_status
+{
+	uint32_t raw;
+	struct {
+		unsigned available:16;
+		unsigned __reserved1:14;
+		unsigned empty:1;
+		unsigned full:1;
+	} data;
+};
+
+union topaz_tqe_cpuif_tx_start
+{
+#define TOPAZ_TQE_CPUIF_TX_START_NREADY		RUBY_BIT(0)
+#define TOPAZ_TQE_CPUIF_TX_START_NOT_SUCCESS	RUBY_BIT(30)
+#define TOPAZ_TQE_CPUIF_TX_START_SUCCESS	RUBY_BIT(31)
+#define TOPAZ_TQE_CPUIF_TX_START_DELIVERED	(TOPAZ_TQE_CPUIF_TX_START_NOT_SUCCESS | TOPAZ_TQE_CPUIF_TX_START_SUCCESS)
+	uint32_t raw;
+	struct {
+		unsigned nready:1;
+		unsigned __reserved1:29;
+		unsigned not_success:1;
+		unsigned success:1;
+	} data;
+};
+
+union topaz_tqe_cpuif_ppctl
+{
+	struct
+	{
+#define TOPAZ_TQE_CPUIF_SM(val, mask, shift)	(((uint32_t)(val) & (mask)) << (shift))
+#define TOPAZ_TQE_CPUIF_PPCTL_DW0(descr)	TOPAZ_TQE_CPUIF_SM(descr, 0xFFFFFFFF, 0)
+		uint32_t ppctl0;
+#define TOPAZ_TQE_CPUIF_PPCTL_DW1(pkt)		TOPAZ_TQE_CPUIF_SM(pkt, 0xFFFFFFFF, 0)
+		uint32_t ppctl1;
+#define TOPAZ_TQE_CPUIF_PPCTL_DW2(out_pri, out_node, out_port, out_portal, out_node_1, out_node_1_en, out_node_2, out_node_2_en) \
+						TOPAZ_TQE_CPUIF_SM(out_pri, 0xF, 0) | \
+						TOPAZ_TQE_CPUIF_SM(out_node, 0x7F, 4) | \
+						TOPAZ_TQE_CPUIF_SM(out_port, 0xF, 11) | \
+						TOPAZ_TQE_CPUIF_SM(out_portal, 0x1, 15) | \
+						TOPAZ_TQE_CPUIF_SM(out_node_1, 0x7F, 16) | \
+						TOPAZ_TQE_CPUIF_SM(out_node_1_en, 0x1, 23) | \
+						TOPAZ_TQE_CPUIF_SM(out_node_2, 0x7F, 24) | \
+						TOPAZ_TQE_CPUIF_SM(out_node_2_en, 0x1, 31)
+		uint32_t ppctl2;
+#define TOPAZ_TQE_CPUIF_PPCTL_DW3(out_node_3, out_node_3_en, out_node_4, out_node_4_en, out_node_5, out_node_5_en, out_node_6, out_node_6_en) \
+						TOPAZ_TQE_CPUIF_SM(out_node_3, 0x7F, 0) | \
+						TOPAZ_TQE_CPUIF_SM(out_node_3_en, 0x1, 7) | \
+						TOPAZ_TQE_CPUIF_SM(out_node_4, 0x7F, 8) | \
+						TOPAZ_TQE_CPUIF_SM(out_node_4_en, 0x1, 15) | \
+						TOPAZ_TQE_CPUIF_SM(out_node_5, 0x7F, 16) | \
+						TOPAZ_TQE_CPUIF_SM(out_node_5_en, 0x1, 23) | \
+						TOPAZ_TQE_CPUIF_SM(out_node_6, 0x7F, 24) | \
+						TOPAZ_TQE_CPUIF_SM(out_node_6_en, 0x1, 31)
+		uint32_t ppctl3;
+#define TOPAZ_TQE_CPUIF_PPCTL_DW4(buff_ptr_offset, sa_match, da_match, mcast, free, buff_pool_num, tqe_free) \
+						TOPAZ_TQE_CPUIF_SM(buff_ptr_offset, 0xFFFF, 0) | \
+						TOPAZ_TQE_CPUIF_SM(sa_match, 0x1, 24) | \
+						TOPAZ_TQE_CPUIF_SM(da_match, 0x1, 25) | \
+						TOPAZ_TQE_CPUIF_SM(mcast, 0x1, 26) | \
+						TOPAZ_TQE_CPUIF_SM(free, 0x1, 27) | \
+						TOPAZ_TQE_CPUIF_SM(buff_pool_num, 0x3, 28) | \
+						TOPAZ_TQE_CPUIF_SM(tqe_free, 0x1, 30)
+		uint32_t ppctl4;
+#define TOPAZ_TQE_CPUIF_PPCTL_DW5(length, misc_user) \
+						TOPAZ_TQE_CPUIF_SM(length, 0xFFFF, 0) | \
+						TOPAZ_TQE_CPUIF_SM(misc_user, 0x3FF, 16)
+		uint32_t ppctl5;
+	} raw;
+	struct
+	{
+		void *descr;
+		void *pkt;
+		unsigned out_pri:4;
+		unsigned out_node_0:7;
+		enum topaz_tqe_port out_port:4;
+		unsigned portal:1;
+		unsigned out_node_1:7;
+		unsigned out_node_1_en:1;
+		unsigned out_node_2:7;
+		unsigned out_node_2_en:1;
+		unsigned out_node_3:7;
+		unsigned out_node_3_en:1;
+		unsigned out_node_4:7;
+		unsigned out_node_4_en:1;
+		unsigned out_node_5:7;
+		unsigned out_node_5_en:1;
+		unsigned out_node_6:7;
+		unsigned out_node_6_en:1;
+		signed buff_ptr_offset:16;
+		unsigned __reserved1:8;
+		unsigned sa_match:1;
+		unsigned da_match:1;
+		unsigned mcast:1;
+		unsigned free:1;
+		unsigned buff_pool_num:2;
+		unsigned tqe_free:1;
+		unsigned __reserved2:1;
+		unsigned length:16;
+		unsigned misc_user:10;
+		unsigned __reserved3:6;
+	} data;
+};
+
+RUBY_INLINE void
+topaz_tqe_cpuif_ppctl_clear(union topaz_tqe_cpuif_ppctl *pp)
+{
+	pp->raw.ppctl0 = 0;
+	pp->raw.ppctl1 = 0;
+	pp->raw.ppctl2 = 0;
+	pp->raw.ppctl3 = 0;
+	pp->raw.ppctl4 = 0;
+	pp->raw.ppctl5 = 0;
+}
+
+RUBY_INLINE void
+topaz_tqe_cpuif_ppctl_init(union topaz_tqe_cpuif_ppctl *pp,
+		uint8_t port, const uint8_t *const nodes, uint8_t node_count, uint8_t pri,
+		uint8_t portal, uint8_t free, uint8_t buff_pool, uint8_t tqe_free, uint16_t misc_user)
+{
+	pp->raw.ppctl0 = TOPAZ_TQE_CPUIF_PPCTL_DW0(0);
+	pp->raw.ppctl1 = TOPAZ_TQE_CPUIF_PPCTL_DW1(0);
+	pp->raw.ppctl2 = TOPAZ_TQE_CPUIF_PPCTL_DW2(pri, nodes ? nodes[0] : 0, port, portal, 0, 0, 0, 0);
+	pp->raw.ppctl3 = TOPAZ_TQE_CPUIF_PPCTL_DW3(0, 0, 0, 0, 0, 0, 0, 0);
+	pp->raw.ppctl4 = TOPAZ_TQE_CPUIF_PPCTL_DW4(0, 0, 0, (node_count > 1), free, buff_pool, tqe_free);
+	pp->raw.ppctl5 = TOPAZ_TQE_CPUIF_PPCTL_DW5(0, misc_user);
+#if 0
+#define	_outnode(_i)	do {							\
+		if ((_i) <= node_count) {					\
+			pp->data.out_node_##_i = nodes[(_i)-1];			\
+			pp->data.out_node_##_i##_en = 1;			\
+		}								\
+	} while(0)
+
+	if(nodes) {
+		/* Multicast nodes number range from 1->6. unicast set to 0*/
+		_outnode(1);
+		_outnode(2);
+		_outnode(3);
+		_outnode(4);
+		_outnode(5);
+		_outnode(6);
+	}
+#undef	_outnode
+#endif
+}
+
+RUBY_INLINE int
+topaz_tqe_cpuif_port_to_num(enum topaz_tqe_port port)
+{
+	if (port == TOPAZ_TQE_PCIE_PORT) {
+		return 4;
+	} else {
+		return port - TOPAZ_TQE_LHOST_PORT;
+	}
+}
+
+RUBY_INLINE void
+__topaz_tqe_cpuif_setup_irq(enum topaz_tqe_port port, int enable, unsigned int threshold)
+{
+	int num = topaz_tqe_cpuif_port_to_num(port);
+	uint32_t csr = qtn_mproc_sync_mem_read(TOPAZ_TQE_CPUIF_CSR(num));
+
+	csr &= ~TOPAZ_TQE_CPUIF_CSR_IRQ_THRESHOLD(~0x0);
+	if (threshold) {
+		csr |= TOPAZ_TQE_CPUIF_CSR_IRQ_THRESHOLD_EN;
+		csr |= TOPAZ_TQE_CPUIF_CSR_IRQ_THRESHOLD(threshold);
+	} else {
+		csr &= ~TOPAZ_TQE_CPUIF_CSR_IRQ_THRESHOLD_EN;
+	}
+
+	if (enable) {
+		csr |= TOPAZ_TQE_CPUIF_CSR_IRQ_EN;
+	} else {
+		csr &= ~TOPAZ_TQE_CPUIF_CSR_IRQ_EN;
+	}
+
+	qtn_mproc_sync_mem_write_wmb(TOPAZ_TQE_CPUIF_CSR(num), csr); /* can be used to disable/enable, so better to have barrier*/
+}
+
+RUBY_INLINE void
+topaz_tqe_cpuif_setup_irq(int enable, unsigned int threshold)
+{
+	__topaz_tqe_cpuif_setup_irq(TOPAZ_TQE_LOCAL_CPU, enable, threshold);
+}
+
+RUBY_INLINE void
+__topaz_tqe_cpuif_setup_reset(enum topaz_tqe_port port, int reset)
+{
+	int num = topaz_tqe_cpuif_port_to_num(port);
+	uint32_t csr = qtn_mproc_sync_mem_read(TOPAZ_TQE_CPUIF_CSR(num));
+	if (reset) {
+		qtn_mproc_sync_mem_write(TOPAZ_TQE_CPUIF_CSR(num), csr | TOPAZ_TQE_CPUIF_CSR_RESET);
+	} else {
+		qtn_mproc_sync_mem_write(TOPAZ_TQE_CPUIF_CSR(num), csr & ~TOPAZ_TQE_CPUIF_CSR_RESET);
+	}
+}
+
+RUBY_INLINE void
+topaz_tqe_cpuif_setup_reset(int reset)
+{
+	__topaz_tqe_cpuif_setup_reset(TOPAZ_TQE_LOCAL_CPU, reset);
+}
+
+RUBY_INLINE void
+__topaz_tqe_cpuif_setup_ring(enum topaz_tqe_port port, union topaz_tqe_cpuif_descr *base, uint16_t count)
+{
+	int num = topaz_tqe_cpuif_port_to_num(port);
+	qtn_mproc_sync_mem_write(TOPAZ_TQE_CPUIF_RX_RING(num), (uint32_t)base);
+	qtn_mproc_sync_mem_write(TOPAZ_TQE_CPUIF_RX_RING_SIZE(num), count);
+}
+
+RUBY_INLINE void
+topaz_tqe_cpuif_setup_ring(union topaz_tqe_cpuif_descr *base, uint16_t count)
+{
+	__topaz_tqe_cpuif_setup_ring(TOPAZ_TQE_LOCAL_CPU, base, count);
+}
+
+RUBY_INLINE uint16_t
+__topaz_tqe_cpuif_get_ring_size(enum topaz_tqe_port port)
+{
+	int num = topaz_tqe_cpuif_port_to_num(port);
+	return qtn_mproc_sync_mem_read(TOPAZ_TQE_CPUIF_RX_RING_SIZE(num));
+}
+
+RUBY_INLINE uint16_t
+topaz_tqe_cpuif_get_ring_size(void)
+{
+	return __topaz_tqe_cpuif_get_ring_size(TOPAZ_TQE_LOCAL_CPU);
+}
+
+RUBY_INLINE union topaz_tqe_cpuif_descr*
+__topaz_tqe_cpuif_get_curr(enum topaz_tqe_port port)
+{
+	int num = topaz_tqe_cpuif_port_to_num(port);
+	return (union topaz_tqe_cpuif_descr*)
+		qtn_mproc_sync_mem_read(TOPAZ_TQE_CPUIF_RX_CURPTR(num));
+}
+
+RUBY_INLINE union topaz_tqe_cpuif_descr*
+topaz_tqe_cpuif_get_curr(void)
+{
+	return __topaz_tqe_cpuif_get_curr(TOPAZ_TQE_LOCAL_CPU);
+}
+
+RUBY_INLINE void
+__topaz_tqe_cpuif_put_back(enum topaz_tqe_port port, union topaz_tqe_cpuif_descr * descr)
+{
+	int num = topaz_tqe_cpuif_port_to_num(port);
+	qtn_mproc_sync_mem_write(TOPAZ_TQE_CPUIF_PKT_FINISH(num), (uint32_t)descr);
+}
+
+RUBY_INLINE void
+topaz_tqe_cpuif_put_back(union topaz_tqe_cpuif_descr * descr)
+{
+	__topaz_tqe_cpuif_put_back(TOPAZ_TQE_LOCAL_CPU, descr);
+}
+
+RUBY_INLINE union topaz_tqe_cpuif_q_ptr_status
+__topaz_tqe_cpuif_get_q_ptr_status(enum topaz_tqe_port port)
+{
+	int num = topaz_tqe_cpuif_port_to_num(port);
+	union topaz_tqe_cpuif_q_ptr_status status;
+	status.raw = qtn_mproc_sync_mem_read(TOPAZ_TQE_CPUIF_Q_PTR_STATUS(num));
+	return status;
+}
+
+RUBY_INLINE union topaz_tqe_cpuif_q_ptr_status
+topaz_tqe_cpuif_get_q_ptr_status(void)
+{
+	return __topaz_tqe_cpuif_get_q_ptr_status(TOPAZ_TQE_LOCAL_CPU);
+}
+
+RUBY_INLINE union topaz_tqe_cpuif_status
+__topaz_tqe_cpuif_get_status(enum topaz_tqe_port port)
+{
+	int num = topaz_tqe_cpuif_port_to_num(port);
+	union topaz_tqe_cpuif_status status;
+	status.raw = qtn_mproc_sync_mem_read(TOPAZ_TQE_CPUIF_STATUS(num));
+	return status;
+}
+
+RUBY_INLINE union topaz_tqe_cpuif_status
+topaz_tqe_cpuif_get_status(void)
+{
+	return __topaz_tqe_cpuif_get_status(TOPAZ_TQE_LOCAL_CPU);
+}
+
+RUBY_INLINE int
+__topaz_tqe_cpuif_tx_nready(enum topaz_tqe_port port)
+{
+	int num = topaz_tqe_cpuif_port_to_num(port);
+	return (qtn_mproc_sync_mem_read(TOPAZ_TQE_CPUIF_TXSTART(num)) &
+		TOPAZ_TQE_CPUIF_TX_START_NREADY);
+}
+
+RUBY_INLINE int
+topaz_tqe_cpuif_tx_nready(void)
+{
+	return __topaz_tqe_cpuif_tx_nready(TOPAZ_TQE_LOCAL_CPU);
+}
+
+RUBY_INLINE int
+__topaz_tqe_cpuif_tx_success(enum topaz_tqe_port port)
+{
+	int num = topaz_tqe_cpuif_port_to_num(port);
+	uint32_t tx_start = qtn_mproc_sync_mem_read(TOPAZ_TQE_CPUIF_TXSTART(num));
+
+	if ((tx_start & TOPAZ_TQE_CPUIF_TX_START_NREADY) ||
+			!(tx_start & TOPAZ_TQE_CPUIF_TX_START_DELIVERED)) {
+		return -1;
+	} else if (tx_start & TOPAZ_TQE_CPUIF_TX_START_SUCCESS) {
+		return 1;
+	} else {
+		return 0;
+	}
+}
+
+RUBY_INLINE int
+topaz_tqe_cpuif_tx_success(void)
+{
+	return __topaz_tqe_cpuif_tx_success(TOPAZ_TQE_LOCAL_CPU);
+}
+
+RUBY_INLINE int
+__topaz_tqe_cpuif_ppctl_write(enum topaz_tqe_port port, const union topaz_tqe_cpuif_ppctl *ctl)
+{
+	int num = topaz_tqe_cpuif_port_to_num(port);
+	qtn_mproc_sync_mem_write(TOPAZ_TQE_CPUIF_PPCTL0(num), ctl->raw.ppctl0);
+	qtn_mproc_sync_mem_write(TOPAZ_TQE_CPUIF_PPCTL1(num), ctl->raw.ppctl1);
+	qtn_mproc_sync_mem_write(TOPAZ_TQE_CPUIF_PPCTL2(num), ctl->raw.ppctl2);
+	qtn_mproc_sync_mem_write(TOPAZ_TQE_CPUIF_PPCTL3(num), ctl->raw.ppctl3);
+	qtn_mproc_sync_mem_write(TOPAZ_TQE_CPUIF_PPCTL4(num), ctl->raw.ppctl4);
+	qtn_mproc_sync_mem_write_wmb(TOPAZ_TQE_CPUIF_PPCTL5(num), ctl->raw.ppctl5);
+	return num;
+}
+
+RUBY_INLINE int
+topaz_tqe_cpuif_ppctl_write(const union topaz_tqe_cpuif_ppctl *ctl)
+{
+	return __topaz_tqe_cpuif_ppctl_write(TOPAZ_TQE_LOCAL_CPU, ctl);
+}
+
+RUBY_INLINE void
+__topaz_tqe_cpuif_tx_start(enum topaz_tqe_port port, const union topaz_tqe_cpuif_ppctl *ctl)
+{
+	int num = __topaz_tqe_cpuif_ppctl_write(port, ctl);
+	qtn_mproc_sync_mem_write(TOPAZ_TQE_CPUIF_TXSTART(num), TOPAZ_TQE_CPUIF_TX_START_NREADY);
+}
+
+RUBY_INLINE void
+topaz_tqe_cpuif_tx_start(const union topaz_tqe_cpuif_ppctl *ctl)
+{
+	__topaz_tqe_cpuif_tx_start(TOPAZ_TQE_LOCAL_CPU, ctl);
+}
+
+#define TQE_SEMA_GET_MAX			0xFFFF
+
+#define QTN_WAIT_TQE_CPUIF_LOOP_MASK		0xFFFF
+RUBY_INLINE void topaz_tqe_wait(void)
+{
+	uint32_t loop = 0;
+
+	while (topaz_tqe_cpuif_tx_nready()) {
+		loop++;
+		if ((loop & ~QTN_WAIT_TQE_CPUIF_LOOP_MASK) &&
+				!((loop) & QTN_WAIT_TQE_CPUIF_LOOP_MASK)) {
+#ifdef __KERNEL__
+			printk("stuck in topaz_tqe_wait()\n");
+#endif
+#ifdef MUC_BUILD
+			uc_printk("stuck in topaz_tqe_wait()\n");
+#endif
+		}
+	}
+}
+
+RUBY_INLINE void topaz_tqe_emac_reflect_to(const uint8_t out_port, const int bonded)
+{
+	if (out_port < TOPAZ_TQE_NUM_PORTS) {
+		uint32_t done_dly = qtn_mproc_sync_mem_read(TOPAZ_TQE_MISC);
+
+		done_dly &= ~TOPAZ_TQE_MISC_RFLCT_OUT_PORT;
+		done_dly |= SM(out_port, TOPAZ_TQE_MISC_RFLCT_OUT_PORT) |
+						TOPAZ_TQE_MISC_RFLCT_OUT_PORT_ENABLE;
+		if (bonded) {
+			done_dly |= TOPAZ_TQE_MISC_RFLCT_2_OUT_PORT_ENABLE;
+		}
+		qtn_mproc_sync_mem_write(TOPAZ_TQE_MISC, done_dly);
+#if defined (__KERNEL__) && defined (DEBUG)
+		printk("TOPAZ_TQE_MISC: 0x%x\n", done_dly);
+#endif
+	}
+}
+#endif /* #ifndef __TOPAZ_TQE_CPUIF_PLATFORM_H */
+
+
diff --git a/quantenna/include/qtn/topaz_vlan_cpuif.h b/quantenna/include/qtn/topaz_vlan_cpuif.h
new file mode 100644
index 0000000..e0c8bf4
--- /dev/null
+++ b/quantenna/include/qtn/topaz_vlan_cpuif.h
@@ -0,0 +1,88 @@
+/*
+ * (C) Copyright 2012 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __TOPAZ_VLAN_CPUIF_PLATFORM_H
+#define __TOPAZ_VLAN_CPUIF_PLATFORM_H
+
+#include <common/topaz_platform.h>
+#include <qtn/mproc_sync_base.h>
+
+union topaz_vlan_entry {
+	uint32_t raw;
+	struct {
+		uint32_t	out_node	:7,
+				out_port	:3,
+				valid		:1,
+				__unused	:22;
+	} data;
+};
+
+#define TOPAZ_VLAN_ENTRY_INIT	{ 0 }
+
+RUBY_INLINE void topaz_vlan_set_entry(uint16_t vlan_id, union topaz_vlan_entry e)
+{
+	qtn_mproc_sync_mem_write(TOPAZ_VLAN_ENTRY_ADDR(vlan_id), e.raw);
+}
+
+RUBY_INLINE void topaz_vlan_clear_entry(uint16_t vlan_id)
+{
+	qtn_mproc_sync_mem_write(TOPAZ_VLAN_ENTRY_ADDR(vlan_id), 0x0);
+}
+
+RUBY_INLINE void topaz_vlan_clear_all_entries(void)
+{
+	int vlan_id;
+	for (vlan_id = 0; vlan_id < TOPAZ_VLAN_ENTRIES; ++vlan_id) {
+		topaz_vlan_clear_entry(vlan_id);
+	}
+}
+
+RUBY_INLINE void topaz_vlan_set(uint16_t vlan_id, uint8_t out_port, uint8_t out_node)
+{
+	union topaz_vlan_entry e = TOPAZ_VLAN_ENTRY_INIT;
+	e.data.out_node = out_node;
+	e.data.out_port = out_port;
+	e.data.valid = 1;
+	topaz_vlan_set_entry(vlan_id, e);
+}
+
+RUBY_INLINE union topaz_vlan_entry topaz_vlan_get_entry(uint16_t vlan_id)
+{
+	union topaz_vlan_entry e;
+	e.raw = qtn_mproc_sync_mem_read(TOPAZ_VLAN_ENTRY_ADDR(vlan_id));
+	return e;
+}
+
+#ifndef TOPAZ_TEST_ASSERT_EQUAL
+# define TOPAZ_TEST_ASSERT_EQUAL(a, b)	if ((a) != (b)) { return -1; }
+#endif
+RUBY_INLINE int topaz_vlan_entry_bitfield_test(const union topaz_vlan_entry *e)
+{
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw, TOPAZ_VLAN_OUT_NODE), e->data.out_node);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw, TOPAZ_VLAN_OUT_PORT), e->data.out_port);
+	TOPAZ_TEST_ASSERT_EQUAL(MS(e->raw, TOPAZ_VLAN_VALID), e->data.valid);
+
+	return 0;
+}
+
+#endif	/* __TOPAZ_VLAN_CPUIF_PLATFORM_H */
+
diff --git a/quantenna/include/qtn/txbf_common.h b/quantenna/include/qtn/txbf_common.h
new file mode 100644
index 0000000..89677e0
--- /dev/null
+++ b/quantenna/include/qtn/txbf_common.h
@@ -0,0 +1,699 @@
+/*SH1
+*******************************************************************************
+**                                                                           **
+**         Copyright (c) 2008 - 2009 Quantenna Communications Inc            **
+**                            All Rights Reserved                            **
+**                                                                           **
+**  Date        : 01/28/09                                                   **
+**  File        : txbf_api.h                                                 **
+**  Description :                                                            **
+**                                                                           **
+*******************************************************************************
+**                                                                           **
+**  Redistribution and use in source and binary forms, with or without       **
+**  modification, are permitted provided that the following conditions       **
+**  are met:                                                                 **
+**  1. Redistributions of source code must retain the above copyright        **
+**     notice, this list of conditions and the following disclaimer.         **
+**  2. Redistributions in binary form must reproduce the above copyright     **
+**     notice, this list of conditions and the following disclaimer in the   **
+**     documentation and/or other materials provided with the distribution.  **
+**  3. The name of the author may not be used to endorse or promote products **
+**     derived from this software without specific prior written permission. **
+**                                                                           **
+**  Alternatively, this software may be distributed under the terms of the   **
+**  GNU General Public License ("GPL") version 2, or (at your option) any    **
+**  later version as published by the Free Software Foundation.              **
+**                                                                           **
+**  In the case this software is distributed under the GPL license,          **
+**  you should have received a copy of the GNU General Public License        **
+**  along with this software; if not, write to the Free Software             **
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  **
+**                                                                           **
+**  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR       **
+**  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
+**  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  **
+**  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,         **
+**  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
+**  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
+**  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    **
+**  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT      **
+**  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
+**  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.        **
+**                                                                           **
+*******************************************************************************
+EH1*/
+
+#ifndef _TXBF_API_H_
+#define _TXBF_API_H_
+
+/*
+ * Enable installation of a fixed Q matrix in place of the derived ones.
+ * The matrix should be put in the file drivers/qdrv/fixedqmat.h
+ * The format of the data should be word values comma delimited.
+ */
+#define TXBF_CANNED_QMAT
+#undef TXBF_CANNED_QMAT
+
+/* Until we get 2 tx antennas working on a 2x4 station */
+#define HAL_2x4STA_USE_4_TX_ANTENNAS
+
+/*
+ * Comment this line to disable locking.
+ * Or set to 1 to enable manual locking.
+ * Or set to 0 to enable hw-centric automatic locking.
+ */
+#define QTN_TXBF_FFT_LOCK_MANUAL	(1)
+
+/* VHTTXBFTBD - 11ac BF enabled by default */
+#define TXBF_ENABLE_VHT_BF
+
+/* Use sw generated VHT BF path */
+/* #define TXBF_VHT_SW_FEEDBACK */
+/* #define TXBF_VHT_SW_UNCOMPRESSED */	/* for debugging */
+
+/* Expansion Matrix Modes */
+#define TXBF_MODE_NO_MATRIX		0
+#define TXBF_MODE_DEFAULT_MATRIX	1
+#define TXBF_MODE_BBF			2
+#define TXBF_MODE_STD_BF		3
+
+/* Enable (1) both hw and sw generated VHT BF feedback, used for debugging */
+#define TXBF_VHT_HW_AND_SW_FEEDBACK	0
+
+enum txbf_buff_state
+{
+	/* Tx BF buffer for the frame is free */
+	TXBF_BUFF_FREE		= 0,
+	/* The frame is stored in Tx BF buffer for processing and can not be released*/
+	TXBF_BUFF_IN_USE	= 1,
+	/* Not used */
+	TXBF_DMA_FROM_BB	= 2,
+	/* NDP only. The frame is being processed by DSP */
+	TXBF_DSP_PROC		= 3,
+	/* DSP completes frame processing */
+	TXBF_DSP_DONE		= 4,
+	/* For action frame only. Action frame is stored in action frame cache */
+	TXBF_DSP_STORED		= 5
+};
+
+#define TXBF_BF_VER1	1	/* Envy */
+#define TXBF_BF_VER2	2	/* 2 stream Ruby */
+#define TXBF_BF_VER3	3	/* 4 stream non-tone grouping Ruby */
+#define TXBF_BF_VER4	4	/* 4 stream tone grouping Ruby and later */
+/*
+ * Version 4 means the action frames generated are now standards compliant
+ * and the BF parameters are derived from the various fields and association
+ * exchange, rather than from using a new version for each combination
+ */
+
+/*
+ * These structures are shared between Linux, MuC and DSP.
+ */
+struct txbf_ndp_info
+{
+	char bw_mode;
+	char rxgain;
+	char MN;
+	char hwnoise;
+	char max_gain;
+	char macaddr[6];
+	signed char reg_scale_fac;
+	unsigned char Nsts;
+	unsigned char Ness;
+};
+
+#define TXBF_MUC_DSP_SHMEM_START (0x80060000)
+
+#define QTN_MU_QMAT_MAX_SLOTS		3
+
+/* Beamforming message types */
+#define QTN_TXBF_NDP_RX_MSG		1
+#define QTN_TXBF_ACT_FRM_TX_MSG		2
+#define QTN_TXBF_ACT_FRM_RX_MSG		3
+#define QTN_TXBF_ACT_FRM_FREE_MSG	4
+#define QTN_TXBF_DEL_MU_NODE_MSG	5
+#define QTN_TXBF_MU_GRP_UPD_DONE_MSG	6
+#define QTN_TXBF_TRIG_MU_GRP_SEL_MSG	7
+#define QTN_TXBF_RATE_TRAIN_MSG		8
+#define QTN_TXBF_RATE_TRAIN_HASH_MSG	9
+#define QTN_TXBF_NDP_DISCARD_MSG	10
+
+#define QTN_TXBF_ACT_FRM_XTRA_HDR_LEN	10
+
+#define QTN_TXBF_MODE_HT		0
+#define QTN_TXBF_MODE_VHT		1
+
+#define QTN_TXBF_NO_EXPMAT		0xFFFF
+
+#define MU_NDPA_TOKEN_MASK		0x1F
+
+/* Number of 10ms timeslots used on the DSP to process feedback */
+#define QTN_TXBF_SU_DSP_TIMESLOTS	1
+#define QTN_TXBF_MU_DSP_TIMESLOTS	2
+
+/* We leave backward compatibility here. As SU token value was randomly chosen as 0x33
+we now say when bit 5 is set it indicates SU sounding. */
+#define MU_NDPA_SU_MASK			0x20
+#define MU_NDPA_GRP_SND_MASK		0x10
+#define IS_MU_GRP_SND(token)		((token) & MU_NDPA_GRP_SND_MASK)
+
+/* TODO: Needs reworking. Some fields (at least mu_grp_id) are used only by
+distinct message type */
+struct txbf_pkts
+{
+	unsigned msg_type;
+	unsigned state;
+	unsigned bf_ver;
+	unsigned bf_mode;
+	unsigned act_frame_phys;
+	unsigned buffer_start;
+	unsigned act_frame_len;
+	unsigned skb;
+	unsigned qmat_offset;
+	unsigned inst_1ss_def_mat;
+	unsigned success;
+	unsigned ndp_phys;
+	unsigned nstream;
+	unsigned bf_mimo_nc;
+	unsigned bf_mimo_nr;
+	unsigned bf_tone_grp;
+	unsigned bf_coeff_size;
+	unsigned bf_nss_snr[4];
+	unsigned bf_compressed;
+	unsigned bf_codebook;
+	unsigned pkt_indx;
+	unsigned short aid;
+	unsigned node_bw;
+	unsigned bw_pri_40m_lower;
+	unsigned bw_pri_20m_lower;
+	unsigned txbf_skip_dftmat_flag;
+	unsigned txbf_2x4sta_flag;
+	unsigned txbf_qmat_install_wait;
+	struct txbf_ndp_info ndp_info;
+	char act_frame_sa[6];
+	char act_frame_bssid[6];
+	char slot;
+	uint8_t mu_grp_id[QTN_MU_QMAT_MAX_SLOTS];
+	uint8_t vapid;
+	unsigned counter;
+};
+
+#define IEEE80211_ADDR_LEN	6
+struct qtn_rate_train_info
+{
+	unsigned msg_type;
+	unsigned state;
+	char src[IEEE80211_ADDR_LEN];
+	char dst[IEEE80211_ADDR_LEN];
+	unsigned ver;
+	unsigned nonce;
+	unsigned hash;
+	unsigned stamp;
+	unsigned ni;
+	void *next; /* Chaining for retry on mbox busy */
+	int index;
+	char devid;
+	char padding[15]; /* Cache aligned */
+};
+
+struct txbf_ctrl {
+	unsigned bf_tone_grp;
+	unsigned svd_mode;
+	unsigned bfoff_thresh;
+};
+
+typedef struct
+{
+	signed int pad1:4;
+	signed int im:12;
+	signed int pad2:4;
+	signed int re:12;
+} ndp_format;
+
+typedef union
+{
+	ndp_format ndp;
+	int wrd;
+} bbmem_ndp;
+
+
+typedef struct
+{
+	/* Compq format BB0 20 bits */
+	signed int bb0_re_s0:8;
+	signed int bb0_im_s0:8;
+	signed int bb0_re_s1_lo:4;
+	/* Interleaved BB1 12 bits */
+	signed int bb1_re_s1_hi:4;
+	signed int bb1_im_s1:8;
+	/* Compq format BB0 12 bits */
+	signed int bb0_re_s1_hi:4;
+	signed int bb0_im_s1:8;
+	/* Interleaved BB1 20 bits */
+	signed int bb1_re_s0:8;
+	signed int bb1_im_s0:8;
+	signed int bb1_re_s1_lo:4;
+}st_format;
+
+typedef union
+{
+	st_format st;
+	unsigned wrd[2];
+} bbmem_st;
+
+/*
+ * Maximum streams supported for different matrix types
+ */
+#define QTN_MAX_STREAMS			4
+#define QTN_MAX_40M_VHT_STREAMS		2
+#define QTN_MAX_20M_VHT_STREAMS		2
+#define QTN_MAX_IOT_QMAT_STREAMS	3
+
+/*
+ * Default decimation used for matrices in Q memory. Some matrices
+ * may use more decimation if space is a problem
+ */
+#define QTN_TXBF_DEFAULT_QMAT_NG	1
+#define QTN_TXBF_MAX_QMAT_NG		2
+
+#define NDP_TO_STVEC_SIZE_RATIO 4
+
+#define NDP_START_DELAY		2		/* in seconds  */
+
+#define STVEC_SIZE_BYTES_1STRM_20M 0x100	/* Assumes NG 1 matrices */
+#define STVEC_MAX_NODES		10
+
+/*
+ * Matrix sizes for NG 1 matrices
+ */
+#define STVEC_SIZE_BYTES_1STRM_40M (STVEC_SIZE_BYTES_1STRM_20M << 1)
+#define STVEC_SIZE_BYTES_1STRM_80M (STVEC_SIZE_BYTES_1STRM_40M << 1)
+#define STVEC_SIZE_BYTES_2STRM_20M (STVEC_SIZE_BYTES_1STRM_20M << 1)
+#define STVEC_SIZE_BYTES_2STRM_40M (STVEC_SIZE_BYTES_2STRM_20M << 1)
+#define STVEC_SIZE_BYTES_2STRM_80M (STVEC_SIZE_BYTES_2STRM_40M << 1)
+#define STVEC_SIZE_BYTES_3STRM_20M (STVEC_SIZE_BYTES_2STRM_20M + STVEC_SIZE_BYTES_1STRM_20M)
+#define STVEC_SIZE_BYTES_3STRM_40M (STVEC_SIZE_BYTES_3STRM_20M << 1)
+#define STVEC_SIZE_BYTES_3STRM_80M (STVEC_SIZE_BYTES_3STRM_40M << 1)
+#define STVEC_SIZE_BYTES_4STRM_20M (STVEC_SIZE_BYTES_2STRM_20M << 1)
+#define STVEC_SIZE_BYTES_4STRM_40M (STVEC_SIZE_BYTES_2STRM_40M << 1)
+#define STVEC_SIZE_BYTES_4STRM_80M (STVEC_SIZE_BYTES_4STRM_40M << 1)
+#define STVEC_SIZE_BYTES_1STRM_MAX STVEC_SIZE_BYTES_1STRM_80M
+#define STVEC_SIZE_BYTES_2STRM_MAX STVEC_SIZE_BYTES_2STRM_80M
+#define STVEC_SIZE_BYTES_3STRM_MAX STVEC_SIZE_BYTES_3STRM_80M
+#define STVEC_SIZE_BYTES_4STRM_MAX STVEC_SIZE_BYTES_4STRM_80M
+
+#ifndef QTN_BW_20M
+# define QTN_BW_20M 0
+# define QTN_BW_40M 1
+# define QTN_BW_80M 2
+#endif
+#define QTN_BW_SW_MAX QTN_BW_80M
+
+#define NDP_SIZE_BYTES_BASE	1024
+#define NDP_SIZE_BYTES_20M	(NDP_SIZE_BYTES_BASE << QTN_BW_20M)
+#define NDP_SIZE_BYTES_40M	(NDP_SIZE_BYTES_BASE << QTN_BW_40M)
+#define NDP_SIZE_BYTES_80M	(NDP_SIZE_BYTES_BASE << QTN_BW_80M)
+#define NDP_SIZE_BYTES_MAX	(NDP_SIZE_BYTES_BASE << QTN_BW_SW_MAX)
+
+/*
+ * Q matrix defines for 80 MHz nodes using NG 1
+ */
+#define QTN_TXBF_QMAT80_1STRM_OFFSET(offset)		(offset)
+#define QTN_TXBF_QMAT80_1STRM_MAT_TOTAL			(STVEC_SIZE_BYTES_1STRM_80M + \
+							STVEC_SIZE_BYTES_1STRM_40M + \
+							STVEC_SIZE_BYTES_1STRM_20M)
+#define QTN_TXBF_QMAT80_2STRM_MAT_TOTAL			(STVEC_SIZE_BYTES_2STRM_80M + \
+							STVEC_SIZE_BYTES_2STRM_40M + \
+							STVEC_SIZE_BYTES_2STRM_20M)
+#define QTN_TXBF_QMAT80_3STRM_MAT_TOTAL			(STVEC_SIZE_BYTES_3STRM_80M)
+#define QTN_TXBF_QMAT80_4STRM_MAT_TOTAL			(STVEC_SIZE_BYTES_4STRM_80M)
+#define QTN_TXBF_QMAT80_1STRM_40M_OFFSET(offset)	(offset + \
+							STVEC_SIZE_BYTES_1STRM_80M)
+#define QTN_TXBF_QMAT80_1STRM_20M_OFFSET(offset)	(offset + \
+							STVEC_SIZE_BYTES_1STRM_80M + \
+							STVEC_SIZE_BYTES_1STRM_40M)
+#define QTN_TXBF_QMAT80_2STRM_OFFSET(offset)		(offset + \
+							QTN_TXBF_QMAT80_1STRM_MAT_TOTAL)
+#define QTN_TXBF_QMAT80_2STRM_40M_OFFSET(offset)	(offset + \
+							QTN_TXBF_QMAT80_1STRM_MAT_TOTAL + \
+							STVEC_SIZE_BYTES_2STRM_80M)
+#define QTN_TXBF_QMAT80_2STRM_20M_OFFSET(offset)	(offset + \
+							QTN_TXBF_QMAT80_1STRM_MAT_TOTAL + \
+							STVEC_SIZE_BYTES_2STRM_80M + \
+							STVEC_SIZE_BYTES_2STRM_40M)
+#define QTN_TXBF_QMAT80_3STRM_OFFSET(offset)		(offset + \
+							QTN_TXBF_QMAT80_1STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT80_2STRM_MAT_TOTAL)
+#define QTN_TXBF_QMAT80_4STRM_OFFSET(offset)		(offset + \
+							QTN_TXBF_QMAT80_1STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT80_2STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT80_3STRM_MAT_TOTAL)
+#define QTN_TXBF_QMAT80_TOTAL_SIZE			(QTN_TXBF_QMAT80_1STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT80_2STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT80_3STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT80_4STRM_MAT_TOTAL)
+
+/*
+ * Q matrix defines for 80 MHz nodes using NG 2
+ */
+#define QTN_TXBF_QMAT80_NG2_1STRM_OFFSET(offset)	(offset)
+#define QTN_TXBF_QMAT80_NG2_1STRM_MAT_TOTAL		((STVEC_SIZE_BYTES_1STRM_80M / 2) + \
+							( STVEC_SIZE_BYTES_1STRM_40M / 2) + \
+							(STVEC_SIZE_BYTES_1STRM_20M / 2))
+#define QTN_TXBF_QMAT80_NG2_2STRM_MAT_TOTAL		((STVEC_SIZE_BYTES_2STRM_80M / 2) + \
+							(STVEC_SIZE_BYTES_2STRM_40M / 2) + \
+							(STVEC_SIZE_BYTES_2STRM_20M / 2))
+#define QTN_TXBF_QMAT80_NG2_3STRM_MAT_TOTAL		(STVEC_SIZE_BYTES_3STRM_80M / 2)
+#define QTN_TXBF_QMAT80_NG2_4STRM_MAT_TOTAL		(STVEC_SIZE_BYTES_4STRM_80M / 2)
+#define QTN_TXBF_QMAT80_NG2_1STRM_40M_OFFSET(offset)	(offset + \
+							(STVEC_SIZE_BYTES_1STRM_80M / 2))
+#define QTN_TXBF_QMAT80_NG2_1STRM_20M_OFFSET(offset)	(offset + \
+							(STVEC_SIZE_BYTES_1STRM_80M / 2) + \
+							(STVEC_SIZE_BYTES_1STRM_40M / 2))
+#define QTN_TXBF_QMAT80_NG2_2STRM_OFFSET(offset)	(offset + \
+							QTN_TXBF_QMAT80_NG2_1STRM_MAT_TOTAL)
+#define QTN_TXBF_QMAT80_NG2_2STRM_40M_OFFSET(offset)	(offset + \
+							QTN_TXBF_QMAT80_NG2_1STRM_MAT_TOTAL + \
+							(STVEC_SIZE_BYTES_2STRM_80M / 2))
+#define QTN_TXBF_QMAT80_NG2_2STRM_20M_OFFSET(offset)	(offset + \
+							QTN_TXBF_QMAT80_NG2_1STRM_MAT_TOTAL + \
+							(STVEC_SIZE_BYTES_2STRM_80M / 2) + \
+							(STVEC_SIZE_BYTES_2STRM_40M / 2))
+#define QTN_TXBF_QMAT80_NG2_3STRM_OFFSET(offset)	(offset + \
+							QTN_TXBF_QMAT80_NG2_1STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT80_NG2_2STRM_MAT_TOTAL)
+#define QTN_TXBF_QMAT80_NG2_4STRM_OFFSET(offset)	(offset + \
+							QTN_TXBF_QMAT80_NG2_1STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT80_NG2_2STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT80_NG2_3STRM_MAT_TOTAL)
+#define QTN_TXBF_QMAT80_NG2_TOTAL_SIZE			(QTN_TXBF_QMAT80_1STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT80_NG2_2STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT80_NG2_3STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT80_NG2_4STRM_MAT_TOTAL)
+/*
+ * Q matrix defines for 40 MHz nodes using NG 1
+ */
+#define QTN_TXBF_QMAT40_1STRM_MAT_TOTAL			(STVEC_SIZE_BYTES_1STRM_40M + \
+							STVEC_SIZE_BYTES_1STRM_20M)
+#define QTN_TXBF_QMAT40_2STRM_MAT_TOTAL			(STVEC_SIZE_BYTES_2STRM_40M + \
+							STVEC_SIZE_BYTES_2STRM_20M)
+#define QTN_TXBF_QMAT40_3STRM_MAT_TOTAL			(STVEC_SIZE_BYTES_3STRM_40M)
+#define QTN_TXBF_QMAT40_4STRM_MAT_TOTAL			(STVEC_SIZE_BYTES_4STRM_40M)
+#define QTN_TXBF_QMAT40_1STRM_OFFSET(offset)		(offset)
+#define QTN_TXBF_QMAT40_1STRM_40M_OFFSET(offset)	(offset)
+#define QTN_TXBF_QMAT40_1STRM_20M_OFFSET(offset)	(offset + \
+							STVEC_SIZE_BYTES_1STRM_40M)
+#define QTN_TXBF_QMAT40_2STRM_OFFSET(offset)		(offset + \
+							QTN_TXBF_QMAT40_1STRM_MAT_TOTAL)
+#define QTN_TXBF_QMAT40_2STRM_40M_OFFSET(offset)	(offset + \
+							QTN_TXBF_QMAT40_1STRM_MAT_TOTAL)
+#define QTN_TXBF_QMAT40_2STRM_20M_OFFSET(offset)	(offset + \
+							QTN_TXBF_QMAT40_1STRM_MAT_TOTAL + \
+							STVEC_SIZE_BYTES_2STRM_40M)
+#define QTN_TXBF_QMAT40_3STRM_OFFSET(offset)		(offset + \
+							QTN_TXBF_QMAT40_1STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT40_2STRM_MAT_TOTAL)
+#define QTN_TXBF_QMAT40_4STRM_OFFSET(offset)		(offset + \
+							QTN_TXBF_QMAT40_1STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT40_2STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT40_3STRM_MAT_TOTAL)
+#define QTN_TXBF_QMAT40_TOTAL_SIZE			(QTN_TXBF_QMAT40_1STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT40_2STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT40_3STRM_MAT_TOTAL + \
+							QTN_TXBF_QMAT40_4STRM_MAT_TOTAL)
+
+/*
+ * Defines for dividing Q memory into slots for nodes using standard BF
+ */
+#define QTN_TXBF_QMAT_SLOT_SIZE			MAX(QTN_TXBF_QMAT40_TOTAL_SIZE, \
+							QTN_TXBF_QMAT80_TOTAL_SIZE / 2)
+
+#define QTN_TXBF_QMAT_SLOTS_USED(qn)	(MAX(1, ((qn)->qn_node.ni_bw_cap >>		\
+					MAX(((qn)->qn_expmat.ng - QTN_TXBF_DEFAULT_QMAT_NG), 0))))
+
+#define QTN_TXBF_QMAT_SLOT(idx)		((idx) * QTN_TXBF_QMAT_SLOT_SIZE)
+
+#define QTN_TXBF_QMAT_OFFSET_SHIFT		6
+
+/*
+ * Defines for fixed matrix (BBF and default) sizes
+ */
+#define QTN_TXBF_QMAT_MIN_OFFSET		(1 << QTN_TXBF_QMAT_OFFSET_SHIFT)
+
+#define QTN_TXBF_1SS_WORDS_PER_TONE		2
+#define QTN_TXBF_2SS_WORDS_PER_TONE		4
+#define QTN_TXBF_3SS_WORDS_PER_TONE		6
+#define QTN_TXBF_4SS_WORDS_PER_TONE		8
+#define QTN_TXBF_IOT_QMAT_1SS_WORDS		(QTN_TXBF_IOT_QMAT_TONES * \
+							QTN_TXBF_1SS_WORDS_PER_TONE)
+#define QTN_TXBF_IOT_QMAT_2SS_WORDS		(QTN_TXBF_IOT_QMAT_TONES * \
+							QTN_TXBF_2SS_WORDS_PER_TONE)
+#define QTN_TXBF_IOT_QMAT_3SS_WORDS		(QTN_TXBF_IOT_QMAT_TONES * \
+							QTN_TXBF_3SS_WORDS_PER_TONE)
+#define QTN_TXBF_IOT_QMAT_4SS_WORDS		(QTN_TXBF_IOT_QMAT_TONES * \
+							QTN_TXBF_4SS_WORDS_PER_TONE)
+#define QTN_TXBF_IOT_QMAT_1SS_MEM		MAX((QTN_TXBF_IOT_QMAT_1SS_WORDS * 4), \
+                                                        QTN_TXBF_QMAT_MIN_OFFSET)
+#define QTN_TXBF_IOT_QMAT_2SS_MEM		MAX((QTN_TXBF_IOT_QMAT_2SS_WORDS * 4), \
+                                                        QTN_TXBF_QMAT_MIN_OFFSET)
+#define QTN_TXBF_IOT_QMAT_3SS_MEM		MAX((QTN_TXBF_IOT_QMAT_3SS_WORDS * 4), \
+                                                        QTN_TXBF_QMAT_MIN_OFFSET)
+#define QTN_TXBF_IOT_QMAT_4SS_MEM		MAX((QTN_TXBF_IOT_QMAT_4SS_WORDS * 4), \
+                                                        QTN_TXBF_QMAT_MIN_OFFSET)
+
+#define QTN_TXBF_QMAT_FIXED_MAT_START		(QTN_TXBF_QMAT_SLOT_SIZE * STVEC_MAX_NODES)
+
+/*
+ * Fixed 2x4 node matrix definitions
+ */
+/*
+ * 80MHz 2x4 matrices need to start in normal BF area to fit,
+ * this is OK, as they are used on the station only at present
+ */
+#define QTN_TXBF_QMAT_2x4STA_1_STRM_OFFSET	(QTN_TXBF_QMAT_SLOT_SIZE * (STVEC_MAX_NODES - 1))
+#define QTN_TXBF_QMAT_2x4STA_2_STRM_OFFSET	(QTN_TXBF_QMAT_2x4STA_1_STRM_OFFSET + \
+						STVEC_SIZE_BYTES_1STRM_80M)
+
+#define QTN_TXBF_2x4STA_1SS_TONE_DATA	{0x00400040, 0x00000000}
+#define QTN_TXBF_2x4STA_2SS_TONE_DATA	{0x00000040, 0x00400000, 0x00000000, 0x00000000}
+
+/*
+ * Fixed default matrix offset definitions
+ */
+#define QTN_TXBF_QMAT_STD_START			QTN_TXBF_QMAT_FIXED_MAT_START
+#define QTN_TXBF_QMAT_STD_1_STRM_OFFSET		QTN_TXBF_QMAT_STD_START
+#define QTN_TXBF_QMAT_STD_2_STRM_OFFSET		(QTN_TXBF_QMAT_STD_1_STRM_OFFSET + \
+						QTN_TXBF_IOT_QMAT_1SS_MEM)
+#define QTN_TXBF_QMAT_STD_3_STRM_OFFSET		(QTN_TXBF_QMAT_STD_2_STRM_OFFSET + \
+						QTN_TXBF_IOT_QMAT_2SS_MEM)
+#define QTN_TXBF_QMAT_STD_4_STRM_OFFSET		(QTN_TXBF_QMAT_STD_3_STRM_OFFSET + \
+						QTN_TXBF_IOT_QMAT_3SS_MEM)
+
+#define QTN_TXBF_IOT_QMAT_START			(QTN_TXBF_QMAT_STD_4_STRM_OFFSET + \
+						QTN_TXBF_IOT_QMAT_4SS_MEM)
+#define QTN_TXBF_IOT_QMAT_TONES			2	/* number of tones for fixed matrices */
+
+/*
+ * BBF slot and matrix offset definitions
+ *
+ * For each slot there is space for the probed matrix, plus the 1, 2 and 3 streams
+ * matrices for the index being used by that node
+ */
+#define QTN_TXBF_IOT_QMAT_MAX_SLOTS		9
+#define QTN_TXBF_IOT_QMAT_NG			7
+#define QTN_TXBF_IOT_QMAT_PER_SS		18
+#define QTN_TXBF_IOT_QMAT_PROBE_MEM		QTN_TXBF_IOT_QMAT_3SS_MEM
+#define QTN_TXBF_IOT_QMAT_SLOT_SIZE		(QTN_TXBF_IOT_QMAT_1SS_MEM + \
+						QTN_TXBF_IOT_QMAT_2SS_MEM + \
+						QTN_TXBF_IOT_QMAT_3SS_MEM + \
+						QTN_TXBF_IOT_QMAT_PROBE_MEM)
+#define QTN_TXBF_IOT_QMAT_BASE_OFFSET(slot)	(QTN_TXBF_IOT_QMAT_START + \
+						(QTN_TXBF_IOT_QMAT_SLOT_SIZE * (slot)))
+#define QTN_TXBF_IOT_QMAT_1SS_OFFSET(slot)	(QTN_TXBF_IOT_QMAT_BASE_OFFSET(slot))
+#define QTN_TXBF_IOT_QMAT_2SS_OFFSET(slot)	(QTN_TXBF_IOT_QMAT_BASE_OFFSET(slot) + \
+						QTN_TXBF_IOT_QMAT_1SS_MEM)
+#define QTN_TXBF_IOT_QMAT_3SS_OFFSET(slot)	(QTN_TXBF_IOT_QMAT_BASE_OFFSET(slot) + \
+						QTN_TXBF_IOT_QMAT_1SS_MEM + \
+						QTN_TXBF_IOT_QMAT_2SS_MEM)
+#define QTN_TXBF_IOT_QMAT_PROBE_OFFSET(slot)	(QTN_TXBF_IOT_QMAT_BASE_OFFSET(slot) + \
+						QTN_TXBF_IOT_QMAT_1SS_MEM + \
+						QTN_TXBF_IOT_QMAT_2SS_MEM + \
+						QTN_TXBF_IOT_QMAT_3SS_MEM)
+
+#define FFT_TONE_20M_LO 1
+#define FFT_TONE_20M_HI 28
+
+#define FFT_TONE_40M_LO 2
+#define FFT_TONE_40M_HI 58
+
+#define QTN_TXBF_TONES_PER_CHAN 64
+#define QTN_TXBF_MAX_TONES	128
+#define QTN_TXBF_MIN_TONES	1
+#define	QTN_TXBF_MODE	4 /* 80MHz Mode */
+
+enum {
+	SVD_MODE_STREAM_MIXING =0,
+	SVD_MODE_TWO_STREAM,
+	SVD_MODE_PER_ANT_SCALE,
+	SVD_MODE_CHANNEL_INV,
+	SVD_MODE_BYPASS,
+};
+
+#define SVD_MODE_GET(X,S) 	(( X >> S) & 1)
+#define SVD_MODE_SET(S) 	(1 << S)
+
+#if !defined(QTN_TXBF_FFT_LOCK_MANUAL) || (QTN_TXBF_FFT_LOCK_MANUAL == 1)
+	/* Locking is disabled or manual locking */
+	#define QT3_BB_MIMO_BF_RX_INIT_VAL	(0x0A)
+	#define QT4_BB_MIMO_BF_RX_INIT_VAL	(QT3_BB_MIMO_BF_RX_INIT_VAL)
+#else
+	/* Automatic, hw-centric locking. */
+	#define QT3_BB_MIMO_BF_RX_INIT_VAL	(0x0B)
+	#define QT4_BB_MIMO_BF_RX_INIT_VAL	(QT3_BB_MIMO_BF_RX_INIT_VAL)
+#endif
+
+/* should be 64 bytes aligned (expmat ptr in TxVector drops lower 5 bits)*/
+struct phys_qmat_layout {
+	uint64_t length;
+	int8_t body[0];
+} __packed;
+
+// TODO: describe bodies as 2 dimensional arrays
+struct phys_qmat_1x1 {
+	uint64_t length;
+	int8_t body[STVEC_SIZE_BYTES_2STRM_80M];
+} __packed;
+
+struct phys_qmat_2x1 {
+	uint64_t length;
+	int8_t body[STVEC_SIZE_BYTES_3STRM_80M];
+} __packed;
+
+struct phys_qmat_3x1 {
+	uint64_t length;
+	int8_t body[STVEC_SIZE_BYTES_4STRM_80M];
+} __packed;
+
+struct phys_qmat_1x2 {
+	uint64_t length;
+	int8_t body[STVEC_SIZE_BYTES_3STRM_80M];
+} __packed;
+
+struct phys_qmat_1x3 {
+	uint64_t length;
+	int8_t body[STVEC_SIZE_BYTES_4STRM_80M];
+} __packed;
+
+struct phys_qmat_2x2 {
+	uint64_t length;
+	int8_t body[STVEC_SIZE_BYTES_4STRM_80M];
+} __packed;
+
+struct phys_qmat_dummy {
+	uint64_t length;
+	int8_t body[0x10];
+} __packed;
+
+/* structure to hold MU group qmatrix info */
+struct qtn_sram_qmat {
+	uint8_t valid;   /* set to 1 when it is occupied, 0 indicates it is free */
+	uint8_t grp_id;  /* MU group id */
+	uint16_t tk;	/* Token */
+	uint16_t u0_aid;  /* user position 0 AID */
+	uint16_t u1_aid;  /* user position 1 AID */
+	int32_t rank;
+/* Number of following Q matrix elements */
+#define MU_QMAT_ELEM_NUM	6
+	/* matrix starting addresses in sram */
+	uint32_t u0_1ss_u1_1ss;
+	uint32_t u0_2ss_u1_1ss;
+	uint32_t u0_3ss_u1_1ss;
+	uint32_t u0_1ss_u1_2ss;
+	uint32_t u0_1ss_u1_3ss;
+	uint32_t u0_2ss_u1_2ss;
+	uint32_t dsp_cnt;
+} __packed;
+
+struct qtn_grp_rank {
+	uint16_t u0_aid;
+	uint16_t u1_aid;
+	int32_t rank;
+} __packed;
+
+#define TXBF_MAX_NC 4
+#define TXBF_MAX_NR 4
+#define TXBF_MAX_NG 3
+#define TXBF_MAX_BW 4	/* Multiple of 20 MHz channels */
+
+#define TXBF_EXPMAT_TYPE_0_BYPASS 0
+#define TXBF_EXPMAT_TYPE_2_QMEM_MODE 2
+#define TXBF_EXPMAT_TYPE_5_QREG_MODE 5
+
+#define QTN_TXBF_QMAT_STD_1SS_TONE_DATA	{0x00400040, 0x00400040, 0x00400040, 0x00400040}
+#define QTN_TXBF_QMAT_STD_2SS_TONE_DATA	{0x002D002D, 0x2D00002D, 0x00D3002D, 0xD300002D, \
+					0x002D002D, 0x2D00002D, 0x00D3002D, 0xD300002D}
+#define QTN_TXBF_QMAT_STD_3SS_TONE_DATA	{0x00250025, 0x00250025, 0x00DB2500, 0x00DB0025, \
+					0x00250025, 0x00DBDB00, 0x00250025, 0x00250025, \
+					0x00DB2500, 0x00DB0025, 0x00250025, 0x00DBDB00}
+#define QTN_TXBF_QMAT_STD_4SS_TONE_DATA	{0x00000040, 0x00000000, 0x00400000, 0x00000000, \
+					0x00000000, 0x00000040, 0x00000000, 0x00400000, \
+					0x00000040, 0x00000000, 0x00400000, 0x00000000, \
+					0x00000000, 0x00000040, 0x00000000, 0x00400000}
+
+static __inline__ uint8_t qtn_txbf_get_bf_qmat_offsets(uint32_t *expmat_ss, uint8_t max,
+		uint32_t qmat_base_offset, uint8_t node_bw, uint8_t bw, uint8_t ng)
+{
+	if ((bw == QTN_BW_40M) && (node_bw == QTN_BW_80M)) {
+		if (ng == QTN_TXBF_DEFAULT_QMAT_NG) {
+			expmat_ss[0] = QTN_TXBF_QMAT80_1STRM_40M_OFFSET(qmat_base_offset);
+			expmat_ss[1] = QTN_TXBF_QMAT80_2STRM_40M_OFFSET(qmat_base_offset);
+		} else {
+			expmat_ss[0] = QTN_TXBF_QMAT80_NG2_1STRM_40M_OFFSET(qmat_base_offset);
+			expmat_ss[1] = QTN_TXBF_QMAT80_NG2_2STRM_40M_OFFSET(qmat_base_offset);
+		}
+		return (QTN_MAX_40M_VHT_STREAMS - 1);
+	} else if ((bw == QTN_BW_20M) && (node_bw > QTN_BW_20M)) {
+		if ((node_bw == QTN_BW_80M) && (ng == QTN_TXBF_DEFAULT_QMAT_NG)) {
+			expmat_ss[0] = QTN_TXBF_QMAT80_1STRM_20M_OFFSET(qmat_base_offset);
+			expmat_ss[1] = QTN_TXBF_QMAT80_2STRM_20M_OFFSET(qmat_base_offset);
+		} else if (node_bw == QTN_BW_80M) {
+			expmat_ss[0] = QTN_TXBF_QMAT80_NG2_1STRM_20M_OFFSET(qmat_base_offset);
+			expmat_ss[1] = QTN_TXBF_QMAT80_NG2_2STRM_20M_OFFSET(qmat_base_offset);
+		} else {
+			expmat_ss[0] = QTN_TXBF_QMAT40_1STRM_20M_OFFSET(qmat_base_offset);
+			expmat_ss[1] = QTN_TXBF_QMAT40_2STRM_20M_OFFSET(qmat_base_offset);
+		}
+		return (QTN_MAX_20M_VHT_STREAMS - 1);
+	}
+	if (node_bw == QTN_BW_80M) {
+		if (ng == QTN_TXBF_DEFAULT_QMAT_NG) {
+			expmat_ss[0] = QTN_TXBF_QMAT80_1STRM_OFFSET(qmat_base_offset);
+			expmat_ss[1] = QTN_TXBF_QMAT80_2STRM_OFFSET(qmat_base_offset);
+		} else {
+			expmat_ss[0] = QTN_TXBF_QMAT80_NG2_1STRM_OFFSET(qmat_base_offset);
+			expmat_ss[1] = QTN_TXBF_QMAT80_NG2_2STRM_OFFSET(qmat_base_offset);
+		}
+		if ((max == QTN_MAX_STREAMS) && (ng == QTN_TXBF_DEFAULT_QMAT_NG)) {
+			expmat_ss[2] = QTN_TXBF_QMAT80_3STRM_OFFSET(qmat_base_offset);
+			expmat_ss[3] = QTN_TXBF_QMAT80_4STRM_OFFSET(qmat_base_offset);
+		} else if (max == QTN_MAX_STREAMS) {
+			expmat_ss[2] = QTN_TXBF_QMAT80_NG2_3STRM_OFFSET(qmat_base_offset);
+			expmat_ss[3] = QTN_TXBF_QMAT80_NG2_4STRM_OFFSET(qmat_base_offset);
+		}
+	} else {
+		expmat_ss[0] = QTN_TXBF_QMAT40_1STRM_OFFSET(qmat_base_offset);
+		expmat_ss[1] = QTN_TXBF_QMAT40_2STRM_OFFSET(qmat_base_offset);
+		if (max == QTN_MAX_STREAMS) {
+			expmat_ss[2] = QTN_TXBF_QMAT40_3STRM_OFFSET(qmat_base_offset);
+			expmat_ss[3] = QTN_TXBF_QMAT40_4STRM_OFFSET(qmat_base_offset);
+		}
+	}
+
+	return (QTN_MAX_STREAMS - 1);
+}
+
+unsigned dsp_rt_hash(volatile struct qtn_rate_train_info *p_rate_info);
+
+#endif /*TXBF_COMMON_H_*/
+
diff --git a/quantenna/include/qtn/txbf_mbox.h b/quantenna/include/qtn/txbf_mbox.h
new file mode 100644
index 0000000..5dad35e
--- /dev/null
+++ b/quantenna/include/qtn/txbf_mbox.h
@@ -0,0 +1,516 @@
+/*
+ * (C) Copyright 2011 Quantenna Communications Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __QTN_TXBF_MBOX_H
+#define __QTN_TXBF_MBOX_H
+
+#include "mproc_sync.h"
+#include "txbf_common.h"
+
+#define QTN_TXBF_MBOX_BAD_IDX			((u_int32_t)-1)
+
+#define QTN_TXBF_MUC_TO_DSP_MBOX_INT		(0)
+#define QTN_TXBF_DSP_TO_HOST_MBOX_INT		(0)
+#define QTN_TXBF_DSP_TO_MUC_MBOX_INT		(0)
+
+#define QTN_RATE_MUC_DSP_MSG_RING_SIZE		(32)
+
+/*
+ * QTN_MAX_MU_SND_NODES nodes (6) + QTN_MAX_SND_NODES (10) + 3 for IPC cmd 19.
+ * This value still causes buffer allocation failure, which is probably due to bad DSP performance.
+ * With 3 more there is no allocation failure for 4 STAs case.
+ */
+#define QTN_TXBF_MUC_DSP_MSG_RING_SIZE		(6 + 10 + 3 + 3)
+
+#define QTN_TXBF_NDP_DATA_BUFS			(1)
+
+/* MU group install/delete IPC from DSP to LHost */
+#define QTN_TXBF_DSP_TO_HOST_INST_MU_GRP        1
+#define QTN_TXBF_DSP_TO_HOST_DELE_MU_GRP        2
+
+#ifndef __ASSEMBLY__
+
+#define DSP_ACT_RX_DBG_SIZE	10
+
+#if DSP_ENABLE_STATS && !defined(QTN_RC_ENABLE_HDP)
+#define DSP_UPDATE_STATS(_a, _b)	(qtn_txbf_mbox_get()->dsp_stats._a += (_b))
+#define DSP_SETSTAT(_a, _b)		(qtn_txbf_mbox_get()->dsp_stats._a =  (_b))
+#else
+#define DSP_UPDATE_STATS(_a, _b)
+#define DSP_SETSTAT(_a, _b)
+#endif
+
+#if DSP_ENABLE_STATS
+struct qtn_dsp_stats {
+	uint32_t dsp_ndp_rx;
+
+	/* Per-node DSP stats */
+
+	/* Total number of feedbacks received */
+	uint32_t dsp_act_rx[DSP_ACT_RX_DBG_SIZE];
+
+	/* Number of SU feedbacks */
+	uint32_t dsp_act_rx_su[DSP_ACT_RX_DBG_SIZE];
+
+	/* Number of MU group selection feedbacks */
+	uint32_t dsp_act_rx_mu_grp_sel[DSP_ACT_RX_DBG_SIZE];
+
+	/* Number of MU precoding feedbacks */
+	uint32_t dsp_act_rx_mu_prec[DSP_ACT_RX_DBG_SIZE];
+
+	/* Number of bad feedbacks, i.e. those that are not met SU nor MU criteria */
+	uint32_t dsp_act_rx_bad[DSP_ACT_RX_DBG_SIZE];
+
+	/*
+	 * Number of feedbacks that were not places into the cache due to any reason. Counters for two reasons
+	 * are just below
+	 */
+	uint32_t dsp_act_rx_mu_drop[DSP_ACT_RX_DBG_SIZE];
+
+	/* The number of MU feedback not placed into the cache as the previous one has not been exprired */
+	uint32_t dsp_act_rx_mu_nexp[DSP_ACT_RX_DBG_SIZE];
+
+	/* The number of MU feedback not placed into the cache due to cache is locked */
+	uint32_t dsp_act_rx_mu_lock_cache[DSP_ACT_RX_DBG_SIZE];
+
+	/*
+	 * The number of precoding feedback was released unused, i.e. not participated in QMat calculation.
+	 * It means the buddy feedback either have not been received or received after cache expiration time
+	 */
+	uint32_t dsp_act_rx_mu_rel_nuse[DSP_ACT_RX_DBG_SIZE];
+
+	/* The number of MU feedback for which dsp_qmat_check_act_len is failed */
+	uint32_t dsp_act_rx_inval_len[DSP_ACT_RX_DBG_SIZE];
+
+	uint32_t dsp_del_mu_node_rx;
+	uint32_t dsp_ipc_in;
+	uint32_t dsp_ipc_out;
+	uint32_t dsp_sleep_in;
+	uint32_t dsp_sleep_out;
+	uint32_t dsp_act_tx;
+	uint32_t dsp_ndp_discarded;
+	uint32_t dsp_ndp_inv_len;
+	uint32_t dsp_ndp_max_len;
+	uint32_t dsp_ndp_inv_bw;
+	uint32_t dsp_act_free_tx;
+	uint32_t dsp_inst_mu_grp_tx;
+	uint32_t dsp_qmat_invalid;
+/* Number or QMat currently installed */
+	int32_t dsp_sram_qmat_num;
+/*
+ * Number of times dsp_sram_qmat_num becomes negative. Non zero value signals that the number
+ * of QMat de-installation is more than the number of installations. This is an error condition but not a critical one
+ */
+	uint32_t dsp_err_neg_qmat_num;
+	uint32_t dsp_flag;
+	/* Interrupts */
+	uint32_t dsp_ipc_int;
+	uint32_t dsp_timer_int;
+	uint32_t dsp_timer1_int;
+	uint32_t dsp_last_int;
+
+	uint32_t dsp_exc;
+	/* registers */
+	uint32_t dsp_status32;
+	uint32_t dsp_status32_l1;
+	uint32_t dsp_status32_l2;
+	uint32_t dsp_ilink1;
+	uint32_t dsp_ilink2;
+	uint32_t dsp_blink;
+	uint32_t dsp_sp;
+	uint32_t dsp_time;
+
+	uint32_t dsp_point;
+	uint32_t dsp_stat_bad_stack;
+
+	int16_t dspmu_D_user1[4];
+	int16_t dspmu_D_user2[4];
+	int16_t dspmu_max_intf_user1;
+	int16_t dspmu_max_intf_user2;
+	int16_t rank_criteria;
+	uint32_t dsp_trig_mu_grp_sel;
+	uint32_t dsp_mu_rank_success;
+	uint32_t dsp_mu_rank_fail;
+
+	/* The number of failed group installations */
+	uint32_t dsp_mu_grp_inst_fail;
+
+	/* Per-MU group DSP stats */
+	/* The number of successful group installations */
+	uint32_t dsp_mu_grp_inst_success[QTN_MU_QMAT_MAX_SLOTS];
+	/* The number of successful QMat installations */
+	uint32_t dsp_mu_grp_update_success[QTN_MU_QMAT_MAX_SLOTS];
+	/* The number of failed QMat installations */
+	uint32_t dsp_mu_grp_update_fail[QTN_MU_QMAT_MAX_SLOTS];
+	/* Group's AID 0 */
+	uint32_t dsp_mu_grp_aid0[QTN_MU_QMAT_MAX_SLOTS];
+	/* Group's AID 1 */
+	uint32_t dsp_mu_grp_aid1[QTN_MU_QMAT_MAX_SLOTS];
+	/* Group's rank */
+	int32_t dsp_mu_grp_rank[QTN_MU_QMAT_MAX_SLOTS];
+
+	/*
+	 * Distribution (histogram) of MU QMat copying time
+	 0:  0- 3us
+	 1:  4- 7us
+	 ...............
+	 3: 12+ us
+	 */
+#define DSP_MU_QMAT_COPY_TIME_HIST_WIDTH_US	4
+	uint32_t dsp_mu_qmat_qmem_copy_time_hist[4];
+	uint32_t dsp_mu_qmat_qmem_copy_time_max;
+
+	/*
+	 * Distribution (histogram) of MU QMat calculation and installation time
+	 0:  0- 3ms
+	 1:  4- 7ms
+	 ...............
+	 3: 12+ ms
+	 */
+#define DSP_MU_QMAT_INST_TIME_HIST_WIDTH_MS	6
+	uint32_t dsp_mu_qmat_inst_time_hist[8];
+	uint32_t dsp_mu_qmat_inst_time_max;
+
+	uint32_t dsp_mu_grp_inv_act;
+	uint32_t dsp_act_cache_expired[2];
+	uint32_t dsp_mu_grp_upd_done;
+	uint32_t dsp_mu_node_del;
+
+	uint32_t dsp_mimo_ctrl_fail;
+	uint32_t dsp_mu_fb_80mhz;
+	uint32_t dsp_mu_fb_40mhz;
+	uint32_t dsp_mu_fb_20mhz;
+	uint32_t dsp_mu_drop_20mhz;
+};
+#endif
+
+/* Structure be used for txbf message box */
+struct qtn_txbf_mbox
+{
+	/* Write index in txbf_msg_bufs array. Updated only by a sender */
+	volatile u_int32_t wr;
+
+	#define MUC_TO_DSP_ACT_MBOX_SIZE	12
+	volatile u_int32_t muc_to_dsp_action_frame_mbox[MUC_TO_DSP_ACT_MBOX_SIZE];
+	volatile u_int32_t muc_to_dsp_ndp_mbox;
+	volatile u_int32_t muc_to_dsp_del_grp_node_mbox;
+	volatile u_int32_t muc_to_dsp_gr_upd_done_mbox;
+	volatile u_int32_t muc_to_trig_mu_grp_sel_mbox;
+	volatile u_int32_t dsp_to_host_mbox;
+
+	volatile struct txbf_pkts txbf_msg_bufs[QTN_TXBF_MUC_DSP_MSG_RING_SIZE];
+
+	volatile struct txbf_ctrl bfctrl_params;
+
+	/* Debug verbosity level */
+#define DEBUG_LVL_NO	0
+#define DEBUG_LVL_ALL	1
+	volatile uint32_t debug_level;
+
+#define MU_QMAT_FREEZE				0x00000001
+#define MU_MANUAL_RANK				0x00000002
+#define MU_FREEZE_RANK				0x00000004
+#define MU_QMAT_ZERO_STA0			0x00000010
+#define MU_QMAT_ZERO_STA1			0x00000020
+#define MU_QMAT_PRINT_CHMAT			0x00000100
+#define MU_QMAT_PRINT_PRECMAT			0x00000200
+#define MU_QMAT_PRINT_SNR			0x00000400
+#define MU_QMAT_PRINT_RANK			0x00000800
+#define MU_QMAT_PRINT_STUFFMEM			0x00001000
+#define MU_QMAT_PRINT_ACTFRM			0x00002000
+#define MU_MATLAB_PROCESS			0x00004000
+#define MU_V_ANGLE				0x00008000
+#define MU_PROJ_PREC_MUEQ_NEED_MASK		0x000F0000
+#define MU_PROJ_PREC_MUEQ_NEED_NC0_MASK		0x00030000
+#define MU_PROJ_PREC_MUEQ_NEED_NC0_SHIFT	16
+#define MU_PROJ_PREC_MUEQ_NEED_NC1_MASK		0x000C0000
+#define MU_PROJ_PREC_MUEQ_NEED_NC1_SHIFT	18
+#define MU_PRINT_RANK_INFO			0x00100000
+#define MU_LIMIT_GRP_ENTRY			0x00300000
+	volatile uint32_t debug_flag;
+	volatile struct qtn_sram_qmat mu_grp_qmat[QTN_MU_QMAT_MAX_SLOTS];
+	/* Used for testing to set rank for STA pairs manually */
+	volatile struct qtn_grp_rank mu_grp_man_rank[QTN_MU_QMAT_MAX_SLOTS];
+#if DSP_ENABLE_STATS
+	volatile struct qtn_dsp_stats dsp_stats;
+#endif
+
+#define MU_ALGORITHM_AUTO		0x00000000
+#define MU_ALGORITHM_PROJECTION		0x00000001
+#define MU_ALGORITHM_ITERATION		0x00000002
+#define MU_PRECODING_ALGORITHM_DEFAULT	MU_ALGORITHM_PROJECTION
+#define MU_RANKING_ALGORITHM_DEFAULT	MU_ALGORITHM_AUTO
+/* in case of adding algorithms above please update below equation accordingly */
+#define MU_ALLOWED_ALG(x) ((x)<=MU_ALGORITHM_ITERATION)
+	volatile uint32_t ranking_algorithm_to_use;
+	volatile uint32_t precoding_algorithm_to_use;
+#define RANK_CRIT_ONE_AND_ONE	0x00000000
+#define RANK_CRIT_TWO_AND_ONE	0x00000001
+#define RANK_CRIT_THREE_AND_ONE	0x00000002
+#define RANK_CRIT_ONE_AND_TWO	0x00000003
+#define RANK_CRIT_ONE_AND_THREE	0x00000004
+#define RANK_CRIT_TWO_AND_TWO	0x00000005
+#define RANK_CRIT_MAX_MU_SUB_MAX_SU	0x00000006
+#define RANK_CRIT_DEFAULT	RANK_CRIT_TWO_AND_TWO
+#define RANK_CRIT_NO_USER_CONF	0x0000000f
+	volatile uint32_t rank_criteria_to_use;
+
+	volatile uint32_t mu_prec_cache_max_time;
+	volatile int32_t mu_rank_tolerance;
+};
+
+struct qtn_muc_dsp_mbox
+{
+	volatile u_int32_t muc_to_dsp_mbox;
+	volatile u_int32_t dsp_to_muc_mbox;
+	volatile struct qtn_rate_train_info muc_dsp_msg_bufs[QTN_RATE_MUC_DSP_MSG_RING_SIZE]
+				__attribute__ ((aligned (ARC_DCACHE_LINE_LENGTH) ));
+};
+
+#define QTN_TXBF_MBOX_PROCESSED 1
+#define QTN_TXBF_MBOX_NOT_PROCESSED 0
+
+#if !defined(MUC_BUILD) && !defined(DSP_BUILD) && !defined(AUC_BUILD)
+
+#if CONFIG_USE_SPI1_FOR_IPC
+	#define QTN_TXBF_D2L_IRQ	RUBY_IRQ_SPI
+	#define QTN_TXBF_D2L_IRQ_NAME	"DSP(spi)"
+#else
+	#define QTN_TXBF_D2L_IRQ	RUBY_IRQ_DSP
+	#define QTN_TXBF_D2L_IRQ_NAME	"DSP(d2l)"
+#endif
+
+RUBY_INLINE void
+qtn_txbf_lhost_init(void)
+{
+#if CONFIG_USE_SPI1_FOR_IPC
+	/* Initialize SPI controller, keep IRQ disabled */
+	qtn_mproc_sync_mem_write(RUBY_SPI1_SPCR,
+		RUBY_SPI1_SPCR_SPE | RUBY_SPI1_SPCR_MSTR |
+		RUBY_SPI1_SPCR_SPR(0));
+	qtn_mproc_sync_mem_write(RUBY_SPI1_SPER,
+		RUBY_SPI1_SPER_ESPR(0));
+#else
+	/* Ack, and keep IRQ disabled */
+	qtn_mproc_sync_mem_write(RUBY_SYS_CTL_D2L_INT,
+		qtn_mproc_sync_mem_read(RUBY_SYS_CTL_D2L_INT));
+	qtn_mproc_sync_mem_write(RUBY_SYS_CTL_D2L_INT_MASK,
+		~(1 << QTN_TXBF_DSP_TO_HOST_MBOX_INT));
+#endif
+}
+
+RUBY_INLINE u_int32_t
+qtn_txbf_lhost_irq_ack(struct qdrv_mac *mac)
+{
+#if CONFIG_USE_SPI1_FOR_IPC
+	/*
+	 * Only single interrupt is supported now.
+	 * If need to support more interrupts then something like
+	 * 'status' in RAM, guarded by semaphores has to be implemented.
+	 * This should be avoided, as it is performance penalty.
+	 */
+	qtn_mproc_sync_mem_write(RUBY_SPI1_SPSR,
+		qtn_mproc_sync_mem_read(RUBY_SPI1_SPSR));
+	return (1 << QTN_TXBF_DSP_TO_HOST_MBOX_INT);
+#else
+	return qtn_mproc_sync_irq_ack_all((u_int32_t)mac->mac_host_dsp_int_status);
+#endif
+}
+
+RUBY_INLINE void
+qtn_txbf_lhost_irq_enable(struct qdrv_mac *mac)
+{
+#if CONFIG_USE_SPI1_FOR_IPC
+	set_bit(RUBY_SPI1_SPCR_SPIE_BIT, (void*)RUBY_SPI1_SPCR);
+#else
+	set_bit(QTN_TXBF_DSP_TO_HOST_MBOX_INT, (void*)mac->mac_host_dsp_int_mask);
+#endif
+}
+
+RUBY_INLINE void
+qtn_txbf_lhost_irq_disable(struct qdrv_mac *mac)
+{
+#if CONFIG_USE_SPI1_FOR_IPC
+	clear_bit(RUBY_SPI1_SPCR_SPIE_BIT, (void*)RUBY_SPI1_SPCR);
+#else
+	clear_bit(QTN_TXBF_DSP_TO_HOST_MBOX_INT, (void*)mac->mac_host_dsp_int_mask);
+#endif
+}
+
+#endif // #if !defined(MUC_BUILD) && !defined(DSP_BUILD) && !defined(AUC_BUILD)
+
+RUBY_INLINE volatile struct txbf_pkts *
+qtn_txbf_mbox_alloc_msg_buf(volatile struct qtn_txbf_mbox* mbox) {
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(mbox->txbf_msg_bufs); i++) {
+		int j = (i + mbox->wr) % ARRAY_SIZE(mbox->txbf_msg_bufs);
+		if (mbox->txbf_msg_bufs[j].state == TXBF_BUFF_FREE) {
+			mbox->wr = j;
+			mbox->txbf_msg_bufs[j].state = TXBF_BUFF_IN_USE;
+			return &mbox->txbf_msg_bufs[j];
+		}
+	}
+
+	return NULL;
+}
+
+RUBY_INLINE void
+qtn_txbf_mbox_free_msg_buf(volatile struct txbf_pkts *msg) {
+	msg->state = TXBF_BUFF_FREE;
+}
+
+RUBY_INLINE u_int32_t
+qtn_txbf_mbox_get_index(volatile struct qtn_txbf_mbox* mbox) {
+	return mbox->wr;
+}
+
+RUBY_INLINE volatile struct qtn_txbf_mbox*
+qtn_txbf_mbox_get(void)
+{
+#if defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD)
+	return qtn_mproc_sync_nocache
+		(qtn_mproc_sync_shared_params_get()->txbf_mbox_bus);
+#else
+	/* Linux target */
+	return qtn_mproc_sync_shared_params_get()->txbf_mbox_lhost;
+#endif
+}
+
+RUBY_INLINE volatile struct qtn_muc_dsp_mbox*
+qtn_muc_dsp_mbox_get(void)
+{
+#if defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD)
+	return qtn_mproc_sync_nocache
+		(qtn_mproc_sync_shared_params_get()->muc_dsp_mbox_bus);
+#else
+	/* Linux target */
+	return qtn_mproc_sync_shared_params_get()->muc_dsp_mbox_lhost;
+#endif
+}
+
+#if defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD)
+RUBY_INLINE int
+qtn_muc_dsp_mbox_send(u_int32_t mbox, u_int32_t idx)
+{
+	int ret = 0;
+
+	if (qtn_mproc_sync_mem_read(mbox) == QTN_TXBF_MBOX_BAD_IDX) {
+		qtn_mproc_sync_mem_write_wmb(mbox, idx);
+#if defined(MUC_BUILD)
+		qtn_mproc_sync_irq_trigger(RUBY_SYS_CTL_M2D_INT,
+			QTN_TXBF_MUC_TO_DSP_MBOX_INT);
+#else
+		qtn_mproc_sync_irq_trigger(RUBY_SYS_CTL_D2M_INT,
+			QTN_TXBF_DSP_TO_MUC_MBOX_INT);
+#endif
+		ret = 1;
+	}
+
+	return ret;
+}
+#endif
+
+#if defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD)
+RUBY_INLINE int
+qtn_txbf_mbox_send(u_int32_t mbox, u_int32_t idx)
+{
+	int ret = 0;
+
+	if (qtn_mproc_sync_mem_read(mbox) == QTN_TXBF_MBOX_BAD_IDX) {
+		qtn_mproc_sync_mem_write_wmb(mbox, idx);
+#if defined(MUC_BUILD)
+		qtn_mproc_sync_irq_trigger(RUBY_SYS_CTL_M2D_INT,
+			QTN_TXBF_MUC_TO_DSP_MBOX_INT);
+#else
+	#if CONFIG_USE_SPI1_FOR_IPC
+		qtn_mproc_sync_mem_write(RUBY_SPI1_SPDR, 0x1/*value is not important*/);
+	#else
+		qtn_mproc_sync_irq_trigger(RUBY_SYS_CTL_D2L_INT,
+			QTN_TXBF_DSP_TO_HOST_MBOX_INT);
+	#endif
+#endif
+		ret = 1;
+	}
+
+	return ret;
+}
+#endif
+
+RUBY_INLINE u_int32_t
+qtn_txbf_mbox_recv(u_int32_t mbox)
+{
+	u_int32_t ret = QTN_TXBF_MBOX_BAD_IDX;
+
+	ret = qtn_mproc_sync_mem_read(mbox);
+	if (ret != QTN_TXBF_MBOX_BAD_IDX) {
+		qtn_mproc_sync_mem_write_wmb(mbox, QTN_TXBF_MBOX_BAD_IDX);
+	}
+
+	return ret;
+}
+
+RUBY_INLINE void
+qtn_txbf_fft_lock(void)
+{
+#ifndef QTN_TXBF_FFT_LOCK_MANUAL
+	/* Locking is disabled */
+#elif QTN_TXBF_FFT_LOCK_MANUAL
+	/* Manual, sw-centric locking. */
+	qtn_mproc_sync_mem_write_wmb(RUBY_QT3_BB_MIMO_BF_RX,
+		qtn_mproc_sync_mem_read(RUBY_QT3_BB_MIMO_BF_RX) & ~RUBY_QT3_BB_MIMO_BF_RX_DUMP_ENABLE);
+#else
+	/* Automatic, hw-centric locking.
+	 * Hw locks FFT memory automatically after the NDP packet is received.
+	 * No need to explicitely lock FFT.
+	 */
+#endif
+}
+
+RUBY_INLINE void
+qtn_txbf_fft_unlock(void)
+{
+#ifndef QTN_TXBF_FFT_LOCK_MANUAL
+	/* Locking is disabled */
+#elif QTN_TXBF_FFT_LOCK_MANUAL
+	/* Manual, sw-centric locking. */
+	qtn_mproc_sync_mem_write_wmb(RUBY_QT3_BB_MIMO_BF_RX,
+		qtn_mproc_sync_mem_read(RUBY_QT3_BB_MIMO_BF_RX) | RUBY_QT3_BB_MIMO_BF_RX_DUMP_ENABLE);
+#else
+	/* Automatic, hw-centric locking. */
+	qtn_mproc_sync_mem_write_wmb(RUBY_QT3_BB_GLBL_PREG_INTR_STATUS, RUBY_QT3_BB_FFT_INTR);
+#endif
+}
+
+/*
+* qtn_txbf_mbox can be used to set parameters for DSP core from other cores.
+* Ideally this way should be reworked but until it happens lets use dedicated macros to access such parameters
+* to distibuish this qtn_txbf_mbox usage purpose from others (IPC, BF feedbacks exchange)
+*/
+#define DSP_PARAM_GET(param) (qtn_txbf_mbox_get()->param)
+#define DSP_PARAM_SET(param, value) qtn_txbf_mbox_get()->param = (value)
+
+#endif // #ifndef __ASSEMBLY__
+
+#endif // #ifndef __QTN_TXBF_MBOX_H
+
+
diff --git a/tools/Makefile b/tools/Makefile
index 43c284c..1d7688f 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -68,6 +68,8 @@
 # Generated executable files
 BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
 BIN_FILES-y += mkimage$(SFX)
+BIN_FILES-y += chkimage$(SFX)
+BIN_FILES-y += chkimage_target
 BIN_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc$(SFX)
 BIN_FILES-$(CONFIG_ENV_IS_IN_EEPROM) += envcrc$(SFX)
 BIN_FILES-$(CONFIG_ENV_IS_IN_FLASH) += envcrc$(SFX)
@@ -89,6 +91,7 @@
 # Source files located in the tools directory
 OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o
 OBJ_FILES-y += mkimage.o
+OBJ_FILES-y += chkimage.o
 OBJ_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc.o
 OBJ_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1.o
 OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o
@@ -143,8 +146,9 @@
 	        -I $(SRCTREE)/libfdt \
 		-I $(SRCTREE)/tools \
 		-DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC \
-		-D__KERNEL_STRICT_NAMES
-CFLAGS     = $(HOST_CFLAGS) $(CPPFLAGS) -O
+		-D__KERNEL_STRICT_NAMES \
+		$(HOST_CFLAGS)
+CFLAGS     = $(CPPFLAGS)
 
 # No -pedantic switch to avoid libfdt compilation warnings
 FIT_CFLAGS = -Wall $(CPPFLAGS) -O
@@ -171,6 +175,17 @@
 	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
 	$(STRIP) $@
 
+$(obj)chkimage$(SFX):	$(obj)chkimage.o $(obj)crc32.o $(obj)image.o $(obj)md5.o \
+			$(obj)sha1.o $(LIBFDT_OBJS) $(obj)os_support.o
+	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+	$(STRIP) $@
+
+$(obj)chkimage_target:	$(obj)chkimage$(SFX)
+	$(CROSS_COMPILE)gcc $(CFLAGS) $(HOST_LDFLAGS) -Os -o $@ \
+		chkimage.c ../lib_generic/crc32.c ../common/image.c ../lib_generic/md5.c \
+		../lib_generic/sha1.c ../libfdt/*.c os_support.c
+	$(CROSS_COMPILE)strip $@
+
 $(obj)ncb$(SFX):	$(obj)ncb.o
 	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
 	$(STRIP) $@
@@ -202,6 +217,9 @@
 $(obj)mkimage.o: $(SRCTREE)/tools/mkimage.c
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
+$(obj)chkimage.o: $(SRCTREE)/tools/chkimage.c
+	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+
 $(obj)os_support.o: $(SRCTREE)/tools/os_support.c
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
diff --git a/tools/chkimage.c b/tools/chkimage.c
new file mode 100644
index 0000000..b68fb7f
--- /dev/null
+++ b/tools/chkimage.c
@@ -0,0 +1,295 @@
+/*
+ * (C) Copyright 2010 Quantenna Communications
+ *
+ * (C) Copyright 2008 Semihalf
+ *
+ * (C) Copyright 2000-2004
+ * DENX Software Engineering
+ * Wolfgang Denk, wd@denx.de
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include "mkimage.h"
+#include <image.h>
+
+#define IMAGE_DATA_OFFSET	0x2000
+
+extern int errno;
+
+#ifndef MAP_FAILED
+#define MAP_FAILED (void *)(-1)
+#endif
+
+extern	unsigned long	crc32 (unsigned long crc, const char *buf, unsigned int len);
+static	void		usage (void);
+static	void		image_verify_header (char *, int);
+
+char	*imagefile;
+char	*cmdname;
+
+int dflag    = 0;
+int eflag    = 0;
+int fflag    = 0;
+int vflag    = 0;
+int check_os = -1;
+int check_arch = -1;
+int check_type = -1;
+int check_comp = -1;
+int check_addr = -1;
+int check_ep = -1;
+int check_name = -1;
+
+image_header_t header;
+image_header_t *hdr = &header;
+
+int main (int argc, char **argv)
+{
+	int ifd = -1;
+	uint32_t addr;
+	uint32_t ep;
+	struct stat sbuf;
+	unsigned char *ptr;
+	char *name = "";
+
+	cmdname = *argv;
+
+	addr = ep = 0;
+
+	while (--argc > 0 && **++argv == '-') {
+		while (*++*argv) {
+			switch (**argv) {
+				case 'A':
+					if ((--argc <= 0) ||
+							(check_arch = genimg_get_arch_id (*++argv)) < 0)
+						usage ();
+					goto NXTARG;
+				case 'C':
+					if ((--argc <= 0) ||
+							(check_comp = genimg_get_comp_id (*++argv)) < 0)
+						usage ();
+					goto NXTARG;
+				case 'O':
+					if ((--argc <= 0) ||
+							(check_os = genimg_get_os_id (*++argv)) < 0)
+						usage ();
+					goto NXTARG;
+				case 'T':
+					if ((--argc <= 0) ||
+							(check_type = genimg_get_type_id (*++argv)) < 0)
+						usage ();
+					goto NXTARG;
+
+				case 'a':
+					if (--argc <= 0)
+						usage ();
+					addr = strtoul (*++argv, (char **)&ptr, 16);
+					check_addr = 1;
+					if (*ptr) {
+						fprintf (stderr,
+								"%s: invalid load address %s\n",
+								cmdname, *argv);
+						exit (EXIT_FAILURE);
+					}
+					goto NXTARG;
+				case 'e':
+					if (--argc <= 0)
+						usage ();
+					ep = strtoul (*++argv, (char **)&ptr, 16);
+					check_ep = 1;
+					if (*ptr) {
+						fprintf (stderr,
+								"%s: invalid entry point %s\n",
+								cmdname, *argv);
+						exit (EXIT_FAILURE);
+					}
+					eflag = 1;
+					goto NXTARG;
+				case 'n':
+					if (--argc <= 0)
+						usage ();
+					name = *++argv;
+					check_name = 1;
+					goto NXTARG;
+				case 'v':
+					vflag = 1;
+					goto NXTARG;
+				default:
+					usage ();
+			}
+		}
+NXTARG:		;
+	}
+
+	if (argc != 1)
+		usage();
+
+	if (!eflag) {
+		ep = addr;
+	}
+
+	imagefile = *argv;
+
+	ifd = open (imagefile, O_RDONLY|O_BINARY);
+
+	if (ifd < 0) {
+		fprintf (stderr, "%s: Can't open %s: %s\n",
+				cmdname, imagefile, strerror(errno));
+		exit (EXIT_FAILURE);
+	}
+
+	/*
+	 * list header information of existing image
+	 */
+	if (fstat(ifd, &sbuf) < 0) {
+		fprintf (stderr, "%s: Can't stat %s: %s\n",
+				cmdname, imagefile, strerror(errno));
+		exit (EXIT_FAILURE);
+	}
+
+	if ((unsigned)sbuf.st_size < image_get_header_size ()) {
+		fprintf (stderr,
+				"%s: Bad size: \"%s\" is no valid image\n",
+				cmdname, imagefile);
+		exit (EXIT_FAILURE);
+	}
+
+	ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, ifd, 0);
+	if (ptr == MAP_FAILED) {
+		fprintf (stderr, "%s: Can't read %s: %s\n",
+				cmdname, imagefile, strerror(errno));
+		exit (EXIT_FAILURE);
+	}
+
+	if (fdt_check_header (ptr)) {
+		/* old-style image */
+		image_header_t *hdr = (image_header_t *)ptr;
+		image_verify_header ((char *)ptr, sbuf.st_size);
+		if (vflag) {
+			image_print_contents (hdr);
+		}
+
+		int correct = 1;
+		/* go through various options checking that the image parameters are correct */
+		if (check_os >= 0 && image_get_os(hdr) != check_os) {
+			fprintf (stderr, "%s: incorrect image OS\n", cmdname);
+			correct = 0;
+		}
+		if (check_arch >= 0 && image_get_arch(hdr) != check_arch) {
+			fprintf (stderr, "%s: incorrect arch\n", cmdname);
+			correct = 0;
+		}	
+		if (check_type >= 0 && image_get_type(hdr) != check_type) {
+			fprintf (stderr, "%s: incorrect image type\n", cmdname);
+			correct = 0;
+		}
+		if (check_comp >= 0 && image_get_comp(hdr) != check_comp) {
+			fprintf (stderr, "%s: incorrect compression type\n", cmdname);
+			correct = 0;
+		}
+		if (check_addr >= 0 && image_get_load(hdr) != addr) {
+			fprintf (stderr, "%s: incorrect load address\n", cmdname);
+			correct = 0;
+		}
+		if (check_ep >= 0 && image_get_ep(hdr) != ep) {
+			fprintf (stderr, "%s: incorrect entry point address\n", cmdname);
+			correct = 0;
+		}
+		if (check_name >= 0 && strcmp(image_get_name(hdr), name)) {
+			fprintf (stderr, "%s: incorrect name\n", cmdname);
+			correct = 0;
+		}
+		if (!correct) {
+			exit (EXIT_FAILURE);
+		}
+	} else {
+		/* FIT image */
+		fit_print_contents (ptr);
+
+		/* FIT option checking not supported */
+	}
+
+	(void) munmap((void *)ptr, sbuf.st_size);
+	(void) close (ifd);
+
+	exit (EXIT_SUCCESS);
+} 
+
+void usage ()
+{
+	fprintf (stderr, "       %s [-x] [-A arch] [-O os] [-T type] [-C comp] "
+			"[-a addr] [-e ep] [-n name] image\n"
+			"          -A ==> check architecture is 'arch'\n"
+			"          -O ==> check operating system is 'os'\n"
+			"          -T ==> check image type is 'type'\n"
+			"          -C ==> check compression type is 'comp'\n"
+			"          -a ==> check load address is 'addr' (hex)\n"
+			"          -e ==> check entry point is 'ep' (hex)\n"
+			"          -n ==> check image name is 'name'\n",
+			cmdname);
+
+	exit (EXIT_FAILURE);
+}
+
+static void image_verify_header (char *ptr, int image_size)
+{
+	int len;
+	char *data;
+	uint32_t checksum;
+	image_header_t header;
+	image_header_t *hdr = &header;
+
+	/*
+	 * create copy of header so that we can blank out the
+	 * checksum field for checking - this can't be done
+	 * on the PROT_READ mapped data.
+	 */
+	memcpy (hdr, ptr, sizeof(image_header_t));
+
+	if (ntohl(hdr->ih_magic) != IH_MAGIC) {
+		fprintf (stderr,
+				"%s: Bad Magic Number: \"%s\" is no valid image\n",
+				cmdname, imagefile);
+		exit (EXIT_FAILURE);
+	}
+
+	data = (char *)hdr;
+	len  = sizeof(image_header_t);
+
+	checksum = ntohl(hdr->ih_hcrc);
+	hdr->ih_hcrc = htonl(0);	/* clear for re-calculation */
+
+	if (crc32 (0, data, len) != checksum) {
+		fprintf (stderr,
+				"%s: ERROR: \"%s\" has bad header checksum!\n",
+				cmdname, imagefile);
+		exit (EXIT_FAILURE);
+	}
+
+	unsigned long data_offset = IMAGE_DATA_OFFSET;
+	data = ptr + data_offset;
+	len  = image_size - data_offset;
+
+	if (crc32 (0, data, len) != ntohl(hdr->ih_dcrc)) {
+		fprintf (stderr,
+				"%s: ERROR: \"%s\" has corrupted data!\n",
+				cmdname, imagefile);
+		exit (EXIT_FAILURE);
+	}
+}
+
+
diff --git a/tools/mkimage.c b/tools/mkimage.c
index 967fe9a..1a0dd27 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -47,6 +47,7 @@
 int lflag    = 0;
 int vflag    = 0;
 int xflag    = 0;
+uint32_t qtn_flags = 0;
 int opt_os   = IH_OS_LINUX;
 int opt_arch = IH_ARCH_PPC;
 int opt_type = IH_TYPE_KERNEL;
@@ -66,6 +67,7 @@
 	struct stat sbuf;
 	unsigned char *ptr;
 	char *name = "";
+	int i;
 
 	cmdname = *argv;
 
@@ -150,6 +152,17 @@
 			case 'x':
 				xflag++;
 				break;
+			case 'Q':
+				if (--argc <= 0)
+					usage ();
+				qtn_flags = strtoul (*++argv, (char **)&ptr, 16);
+				if (*ptr) {
+					fprintf (stderr,
+							"%s: invalid Quantenna flags %s\n",
+							cmdname, *argv);
+					exit (EXIT_FAILURE);
+				}
+				goto NXTARG;
 			default:
 				usage ();
 			}
@@ -250,13 +263,20 @@
 	 *
 	 * write dummy header, to be fixed later
 	 */
-	memset (hdr, 0, image_get_header_size ());
-
-	if (write(ifd, hdr, image_get_header_size ()) != image_get_header_size ()) {
+	memset (hdr, 0, sizeof(*hdr));
+	if (write(ifd, hdr, sizeof(*hdr)) != sizeof(*hdr)) {
 		fprintf (stderr, "%s: Write error on %s: %s\n",
 			cmdname, imagefile, strerror(errno));
 		exit (EXIT_FAILURE);
 	}
+	for (i = sizeof(*hdr); i < image_get_header_size(); ++i) {
+		char c = 0;
+		if (write(ifd, &c, 1) != 1) {
+			fprintf (stderr, "%s: Write error on %s: %s\n",
+				cmdname, imagefile, strerror(errno));
+			exit (EXIT_FAILURE);
+		}
+	}
 
 	if (opt_type == IH_TYPE_MULTI || opt_type == IH_TYPE_SCRIPT) {
 		char *file = datafile;
@@ -357,10 +377,13 @@
 
 	image_set_name (hdr, name);
 
-	checksum = crc32 (0, (const char *)hdr, image_get_header_size ());
+	checksum = crc32 (0, (const char *)hdr, sizeof(*hdr));
 
 	image_set_hcrc (hdr, checksum);
 
+	/* set Quantenna flags; not part of regular header */
+	image_set_qtn_flags(hdr, qtn_flags);
+
 	image_print_contents (hdr);
 
 	(void) munmap((void *)ptr, sbuf.st_size);
@@ -468,7 +491,7 @@
 	fprintf (stderr, "Usage: %s -l image\n"
 			 "          -l ==> list image header information\n",
 		cmdname);
-	fprintf (stderr, "       %s [-x] -A arch -O os -T type -C comp "
+	fprintf (stderr, "       %s [-x] -A arch -O os -T type -Q flags -C comp "
 			 "-a addr -e ep -n name -d data_file[:data_file...] image\n"
 			 "          -A ==> set architecture to 'arch'\n"
 			 "          -O ==> set operating system to 'os'\n"
@@ -478,7 +501,8 @@
 			 "          -e ==> set entry point to 'ep' (hex)\n"
 			 "          -n ==> set image name to 'name'\n"
 			 "          -d ==> use image data from 'datafile'\n"
-			 "          -x ==> set XIP (execute in place)\n",
+			 "          -x ==> set XIP (execute in place)\n"
+			 "          -Q ==> set Quantenna flags to 'flag' (hex)\n",
 		cmdname);
 	fprintf (stderr, "       %s [-D dtc_options] -f fit-image.its fit-image\n",
 		cmdname);