Gale Board: Added snoc_pnoc initialization function
authorBalamurugan Selvarajan <bselvara@codeaurora.org>
Fri, 24 Jun 2016 13:12:13 +0000 (18:42 +0530)
committerchrome-bot <chrome-bot@chromium.org>
Thu, 14 Jul 2016 02:09:41 +0000 (19:09 -0700)
snoc_pnoc() does the following functionalities.
   1) Enable AXI master bus Axid translating to confirm all transaction
      submitted by order for Wi-Fi0 and Wi-Fi1.
   2) Enables PNOC_SNOC_MEMTYPE_M0_M2 as normal mode.

BRANCH=None
BUG=None
TEST=System boot

Change-Id: I52d258573c8c314d3ca4960a1e35af6ab095e25d
Signed-off-by: Balamurugan Selvarajan <bselvara@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/355960
Commit-Ready: Kan Yan <kyan@google.com>
Reviewed-by: Kan Yan <kyan@google.com>
src/board/gale/board.c
src/board/gale/board.h

index 3c14602..bbe2c67 100644 (file)
@@ -396,6 +396,24 @@ static struct console_input_driver dakota_input_driver =
        &dakota_getchar
 };
 
+static void ipq_snoc_pnoc_init(void)
+{
+       /*
+        * IPQ40xx WiFi Global Config
+        * Bit 30:AXID_EN
+        * Enable AXI master bus Axid translating to confirm
+        * all txn submitted by order
+        * Bit 24: Use locally generated socslv_wxi_bvalid
+        * 1:  use locally generate socslv_wxi_bvalid for performance.
+        * 0:  use SNOC socslv_wxi_bvalid.      37
+        */
+       write32(TCSR_WIFI0_GLB_CFG, 0x41000000);
+       write32(TCSR_WIFI1_GLB_CFG, 0x41000000);
+
+       /* IPQ40xx MEM_TYPE_SEL_M0_M2 Select Bit 26:24 - 2 NORMAL */
+       write32(TCSR_PNOC_SNOC_MEMTYPE_M0_M2, 0x02222222);
+}
+
 static int board_setup(void)
 {
        sysinfo_install_flags(NULL);
@@ -446,6 +464,8 @@ static int board_setup(void)
 #endif
        write32(ADSS_AUDIO_TXB_CBCR_REG, 0); /* Disable ADSS clock branch */
 
+       ipq_snoc_pnoc_init();
+
        list_insert_after(&ipq_enet_fixup.list_node, &device_tree_fixups);
 
        set_ramoops_buffer();
index c5163ca..c9024d6 100644 (file)
@@ -30,6 +30,9 @@
 #define QFPROM_CORR_PTE_ROW0_MSB       (QFPROM_CORR_BASE + 0xBC)
 
 #define ADSS_AUDIO_TXB_CBCR_REG                ((void *)0x770014C)
+#define TCSR_WIFI0_GLB_CFG             ((void *)0x01949000)
+#define TCSR_WIFI1_GLB_CFG             ((void *)0x01949004)
+#define TCSR_PNOC_SNOC_MEMTYPE_M0_M2   ((void *)0x01957004)
 
 int set_wifi_calibration(DeviceTree *tree);
 int board_wan_port_number(void);