From owner-svn-src-all@freebsd.org Thu Jan 26 11:14:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FD1ACC22E4; Thu, 26 Jan 2017 11:14:25 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0322A185; Thu, 26 Jan 2017 11:14:24 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0QBEOkT058597; Thu, 26 Jan 2017 11:14:24 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0QBEOLh058596; Thu, 26 Jan 2017 11:14:24 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201701261114.v0QBEOLh058596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Thu, 26 Jan 2017 11:14:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312812 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jan 2017 11:14:25 -0000 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 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) {