sdhci.c (184138) | sdhci.c (184452) |
---|---|
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: head/sys/dev/sdhci/sdhci.c 184138 2008-10-21 20:33:40Z mav $"); | 27__FBSDID("$FreeBSD: head/sys/dev/sdhci/sdhci.c 184452 2008-10-29 20:01:26Z mav $"); |
28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/bus.h> 32#include <sys/conf.h> 33#include <sys/kernel.h> 34#include <sys/lock.h> 35#include <sys/module.h> --- 1399 unchanged lines hidden (view full) --- 1435 *(int *)result = slot->host.ios.vdd; 1436 break; 1437 case MMCBR_IVAR_CAPS: 1438 *(int *)result = slot->host.caps; 1439 break; 1440 case MMCBR_IVAR_TIMING: 1441 *(int *)result = slot->host.ios.timing; 1442 break; | 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/bus.h> 32#include <sys/conf.h> 33#include <sys/kernel.h> 34#include <sys/lock.h> 35#include <sys/module.h> --- 1399 unchanged lines hidden (view full) --- 1435 *(int *)result = slot->host.ios.vdd; 1436 break; 1437 case MMCBR_IVAR_CAPS: 1438 *(int *)result = slot->host.caps; 1439 break; 1440 case MMCBR_IVAR_TIMING: 1441 *(int *)result = slot->host.ios.timing; 1442 break; |
1443 case MMCBR_IVAR_MAX_DATA: 1444 *(int *)result = 65535; 1445 break; |
|
1443 } 1444 return (0); 1445} 1446 1447static int 1448sdhci_write_ivar(device_t bus, device_t child, int which, uintptr_t value) 1449{ 1450 struct sdhci_slot *slot = device_get_ivars(child); --- 38 unchanged lines hidden (view full) --- 1489 break; 1490 case MMCBR_IVAR_TIMING: 1491 slot->host.ios.timing = value; 1492 break; 1493 case MMCBR_IVAR_CAPS: 1494 case MMCBR_IVAR_HOST_OCR: 1495 case MMCBR_IVAR_F_MIN: 1496 case MMCBR_IVAR_F_MAX: | 1446 } 1447 return (0); 1448} 1449 1450static int 1451sdhci_write_ivar(device_t bus, device_t child, int which, uintptr_t value) 1452{ 1453 struct sdhci_slot *slot = device_get_ivars(child); --- 38 unchanged lines hidden (view full) --- 1492 break; 1493 case MMCBR_IVAR_TIMING: 1494 slot->host.ios.timing = value; 1495 break; 1496 case MMCBR_IVAR_CAPS: 1497 case MMCBR_IVAR_HOST_OCR: 1498 case MMCBR_IVAR_F_MIN: 1499 case MMCBR_IVAR_F_MAX: |
1500 case MMCBR_IVAR_MAX_DATA: |
|
1497 return (EINVAL); 1498 } 1499 return (0); 1500} 1501 1502static device_method_t sdhci_methods[] = { 1503 /* device_if */ 1504 DEVMETHOD(device_probe, sdhci_probe), --- 26 unchanged lines hidden --- | 1501 return (EINVAL); 1502 } 1503 return (0); 1504} 1505 1506static device_method_t sdhci_methods[] = { 1507 /* device_if */ 1508 DEVMETHOD(device_probe, sdhci_probe), --- 26 unchanged lines hidden --- |