sdhci.c (278688) | sdhci.c (278703) |
---|---|
1/*- 2 * Copyright (c) 2008 Alexander Motin <mav@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008 Alexander Motin <mav@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> |
27__FBSDID("$FreeBSD: stable/10/sys/dev/sdhci/sdhci.c 278688 2015-02-13 18:13:42Z ian $"); | 27__FBSDID("$FreeBSD: stable/10/sys/dev/sdhci/sdhci.c 278703 2015-02-13 20:38:39Z ian $"); |
28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/bus.h> 32#include <sys/callout.h> 33#include <sys/conf.h> 34#include <sys/kernel.h> 35#include <sys/lock.h> --- 656 unchanged lines hidden (view full) --- 692 } 693 /* Configure the bus. */ 694 sdhci_set_clock(slot, ios->clock); 695 sdhci_set_power(slot, (ios->power_mode == power_off)?0:ios->vdd); 696 if (ios->bus_width == bus_width_4) 697 slot->hostctrl |= SDHCI_CTRL_4BITBUS; 698 else 699 slot->hostctrl &= ~SDHCI_CTRL_4BITBUS; | 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/bus.h> 32#include <sys/callout.h> 33#include <sys/conf.h> 34#include <sys/kernel.h> 35#include <sys/lock.h> --- 656 unchanged lines hidden (view full) --- 692 } 693 /* Configure the bus. */ 694 sdhci_set_clock(slot, ios->clock); 695 sdhci_set_power(slot, (ios->power_mode == power_off)?0:ios->vdd); 696 if (ios->bus_width == bus_width_4) 697 slot->hostctrl |= SDHCI_CTRL_4BITBUS; 698 else 699 slot->hostctrl &= ~SDHCI_CTRL_4BITBUS; |
700 if (ios->timing == bus_timing_hs) | 700 if (ios->timing == bus_timing_hs && 701 !(slot->quirks & SDHCI_QUIRK_DONT_SET_HISPD_BIT)) |
701 slot->hostctrl |= SDHCI_CTRL_HISPD; 702 else 703 slot->hostctrl &= ~SDHCI_CTRL_HISPD; 704 WR1(slot, SDHCI_HOST_CONTROL, slot->hostctrl); 705 /* Some controllers like reset after bus changes. */ 706 if(slot->quirks & SDHCI_QUIRK_RESET_ON_IOS) 707 sdhci_reset(slot, SDHCI_RESET_CMD | SDHCI_RESET_DATA); 708 --- 750 unchanged lines hidden --- | 702 slot->hostctrl |= SDHCI_CTRL_HISPD; 703 else 704 slot->hostctrl &= ~SDHCI_CTRL_HISPD; 705 WR1(slot, SDHCI_HOST_CONTROL, slot->hostctrl); 706 /* Some controllers like reset after bus changes. */ 707 if(slot->quirks & SDHCI_QUIRK_RESET_ON_IOS) 708 sdhci_reset(slot, SDHCI_RESET_CMD | SDHCI_RESET_DATA); 709 --- 750 unchanged lines hidden --- |