Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jan 2017 11:14:24 +0000 (UTC)
From:      Wojciech Macek <wma@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r312812 - head/sys/arm/mv
Message-ID:  <201701261114.v0QBEOLh058596@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wma
Date: Thu Jan 26 11:14:23 2017
New Revision: 312812
URL: https://svnweb.freebsd.org/changeset/base/312812

Log:
  Add dummy functions for Marvell SoC's not equipped with AHCI
  
  Commit r312747 ("Setup decoding windows for ARMADA38X") resulted
  in build failing for Marvell platforms, which don't have AHCI controller.
  This patch provides a fix by adding dummy functions for such cases.
  
  On the occasion rename register dump routine to decode_win_ahci_dump,
  in order to avoid confusion.
  
  Submitted by:          Marcin Wojtas <mw@semihalf.com>
  Obtained from:         Semihalf
  Sponsored by:          Stormshield

Modified:
  head/sys/arm/mv/mv_common.c

Modified: head/sys/arm/mv/mv_common.c
==============================================================================
--- head/sys/arm/mv/mv_common.c	Thu Jan 26 11:07:36 2017	(r312811)
+++ head/sys/arm/mv/mv_common.c	Thu Jan 26 11:14:23 2017	(r312812)
@@ -108,7 +108,7 @@ static void decode_win_usb3_dump(u_long)
 static void decode_win_eth_dump(u_long base);
 static void decode_win_idma_dump(u_long base);
 static void decode_win_xor_dump(u_long base);
-static void decode_win_sata_dump(u_long base);
+static void decode_win_ahci_dump(u_long base);
 
 static int fdt_get_ranges(const char *, void *, int, int *, int *);
 #ifdef SOC_MV_ARMADA38X
@@ -141,7 +141,7 @@ static struct soc_node_spec soc_nodes[] 
 	{ "mrvl,ge", &decode_win_eth_setup, &decode_win_eth_dump },
 	{ "mrvl,usb-ehci", &decode_win_usb_setup, &decode_win_usb_dump },
 	{ "marvell,armada-380-xhci", &decode_win_usb3_setup, &decode_win_usb3_dump },
-	{ "marvell,armada-380-ahci", &decode_win_ahci_setup, &decode_win_sata_dump },
+	{ "marvell,armada-380-ahci", &decode_win_ahci_setup, &decode_win_ahci_dump },
 	{ "mrvl,sata", &decode_win_sata_setup, NULL },
 	{ "mrvl,xor", &decode_win_xor_setup, &decode_win_xor_dump },
 	{ "mrvl,idma", &decode_win_idma_setup, &decode_win_idma_dump },
@@ -2007,6 +2007,10 @@ decode_win_sata_setup(u_long base)
 		}
 }
 
+#ifdef SOC_MV_ARMADA38X
+/*
+ * Configure AHCI decoding windows
+ */
 static void
 decode_win_ahci_setup(u_long base)
 {
@@ -2046,7 +2050,7 @@ decode_win_ahci_setup(u_long base)
 }
 
 static void
-decode_win_sata_dump(u_long base)
+decode_win_ahci_dump(u_long base)
 {
 	int i;
 
@@ -2056,6 +2060,22 @@ decode_win_sata_dump(u_long base)
 		    win_sata_sz_read(base,i));
 }
 
+#else
+/*
+ * Provide dummy functions to satisfy the build
+ * for SoC's not equipped with AHCI controller
+ */
+static void
+decode_win_ahci_setup(u_long base)
+{
+}
+
+static void
+decode_win_ahci_dump(u_long base)
+{
+}
+#endif
+
 static int
 decode_win_sata_valid(void)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701261114.v0QBEOLh058596>