From owner-svn-src-head@freebsd.org Sun Sep 24 09:05:37 2017 Return-Path: Delivered-To: svn-src-head@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 448D3E236EA; Sun, 24 Sep 2017 09:05:37 +0000 (UTC) (envelope-from kibab@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 1E4F56F1B6; Sun, 24 Sep 2017 09:05:37 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8O95aQZ043423; Sun, 24 Sep 2017 09:05:36 GMT (envelope-from kibab@FreeBSD.org) Received: (from kibab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8O95ZOY043417; Sun, 24 Sep 2017 09:05:35 GMT (envelope-from kibab@FreeBSD.org) Message-Id: <201709240905.v8O95ZOY043417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kibab set sender to kibab@FreeBSD.org using -f From: Ilya Bakulin Date: Sun, 24 Sep 2017 09:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323966 - in head/sys: arm/broadcom/bcm2835 arm/ti dev/sdhci X-SVN-Group: head X-SVN-Commit-Author: kibab X-SVN-Commit-Paths: in head/sys: arm/broadcom/bcm2835 arm/ti dev/sdhci X-SVN-Commit-Revision: 323966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Sep 2017 09:05:37 -0000 Author: kibab Date: Sun Sep 24 09:05:35 2017 New Revision: 323966 URL: https://svnweb.freebsd.org/changeset/base/323966 Log: Rename sdhci_cam_start_slot() into sdhci_start_slot() This change allows to just call sdhci_start_slot() in SDHCI drivers and not to think about which stack handles the operation. As a side effect, this will also fix MMCCAM with sdhci_acpi driver. Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D12471 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c head/sys/arm/ti/ti_sdhci.c head/sys/dev/sdhci/fsl_sdhci.c head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h head/sys/dev/sdhci/sdhci_pci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Sep 24 05:04:06 2017 (r323965) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Sep 24 09:05:35 2017 (r323966) @@ -255,11 +255,7 @@ bcm_sdhci_attach(device_t dev) bus_generic_probe(dev); bus_generic_attach(dev); -#ifdef MMCCAM - sdhci_cam_start_slot(&sc->sc_slot); -#else sdhci_start_slot(&sc->sc_slot); -#endif return (0); Modified: head/sys/arm/ti/ti_sdhci.c ============================================================================== --- head/sys/arm/ti/ti_sdhci.c Sun Sep 24 05:04:06 2017 (r323965) +++ head/sys/arm/ti/ti_sdhci.c Sun Sep 24 09:05:35 2017 (r323966) @@ -683,11 +683,7 @@ ti_sdhci_attach(device_t dev) bus_generic_probe(dev); bus_generic_attach(dev); -#ifdef MMCCAM - sdhci_cam_start_slot(&sc->slot); -#else sdhci_start_slot(&sc->slot); -#endif return (0); fail: Modified: head/sys/dev/sdhci/fsl_sdhci.c ============================================================================== --- head/sys/dev/sdhci/fsl_sdhci.c Sun Sep 24 05:04:06 2017 (r323965) +++ head/sys/dev/sdhci/fsl_sdhci.c Sun Sep 24 09:05:35 2017 (r323966) @@ -913,11 +913,7 @@ fsl_sdhci_attach(device_t dev) bus_generic_probe(dev); bus_generic_attach(dev); -#ifdef MMCCAM - sdhci_cam_start_slot(&sc->slot); -#else sdhci_start_slot(&sc->slot); -#endif return (0); Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sun Sep 24 05:04:06 2017 (r323965) +++ head/sys/dev/sdhci/sdhci.c Sun Sep 24 09:05:35 2017 (r323966) @@ -1051,12 +1051,14 @@ no_tuning: return (0); } +#ifndef MMCCAM void sdhci_start_slot(struct sdhci_slot *slot) { sdhci_card_task(slot, 0); } +#endif int sdhci_cleanup_slot(struct sdhci_slot *slot) @@ -2383,7 +2385,7 @@ sdhci_generic_write_ivar(device_t bus, device_t child, #ifdef MMCCAM void -sdhci_cam_start_slot(struct sdhci_slot *slot) +sdhci_start_slot(struct sdhci_slot *slot) { if ((slot->devq = cam_simq_alloc(1)) == NULL) { goto fail; Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Sun Sep 24 05:04:06 2017 (r323965) +++ head/sys/dev/sdhci/sdhci.h Sun Sep 24 09:05:35 2017 (r323966) @@ -430,9 +430,4 @@ bool sdhci_generic_get_card_present(device_t brdev, st void sdhci_generic_set_uhs_timing(device_t brdev, struct sdhci_slot *slot); void sdhci_handle_card_present(struct sdhci_slot *slot, bool is_present); -#ifdef MMCCAM -/* CAM-related */ -void sdhci_cam_start_slot(struct sdhci_slot *slot); -#endif - #endif /* __SDHCI_H__ */ Modified: head/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- head/sys/dev/sdhci/sdhci_pci.c Sun Sep 24 05:04:06 2017 (r323965) +++ head/sys/dev/sdhci/sdhci_pci.c Sun Sep 24 09:05:35 2017 (r323966) @@ -395,11 +395,7 @@ sdhci_pci_attach(device_t dev) pci_enable_busmaster(dev); /* Process cards detection. */ for (i = 0; i < sc->num_slots; i++) { -#ifdef MMCCAM - sdhci_cam_start_slot(&sc->slots[i]); -#else sdhci_start_slot(&sc->slots[i]); -#endif } return (0);