at91_mci.c (183670) | at91_mci.c (184452) |
---|---|
1/*- 2 * Copyright (c) 2006 Bernd Walter. All rights reserved. 3 * Copyright (c) 2006 M. Warner Losh. 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) 2006 Bernd Walter. All rights reserved. 3 * Copyright (c) 2006 M. Warner Losh. 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/arm/at91/at91_mci.c 183670 2008-10-07 17:23:16Z imp $"); | 27__FBSDID("$FreeBSD: head/sys/arm/at91/at91_mci.c 184452 2008-10-29 20:01:26Z mav $"); |
28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/bio.h> 32#include <sys/bus.h> 33#include <sys/conf.h> 34#include <sys/endian.h> 35#include <sys/kernel.h> --- 601 unchanged lines hidden (view full) --- 637 *(int *)result = sc->host.ocr; 638 break; 639 case MMCBR_IVAR_POWER_MODE: 640 *(int *)result = sc->host.ios.power_mode; 641 break; 642 case MMCBR_IVAR_VDD: 643 *(int *)result = sc->host.ios.vdd; 644 break; | 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/bio.h> 32#include <sys/bus.h> 33#include <sys/conf.h> 34#include <sys/endian.h> 35#include <sys/kernel.h> --- 601 unchanged lines hidden (view full) --- 637 *(int *)result = sc->host.ocr; 638 break; 639 case MMCBR_IVAR_POWER_MODE: 640 *(int *)result = sc->host.ios.power_mode; 641 break; 642 case MMCBR_IVAR_VDD: 643 *(int *)result = sc->host.ios.vdd; 644 break; |
645 case MMCBR_IVAR_MAX_DATA: 646 *(int *)result = 1; 647 break; |
|
645 } 646 return (0); 647} 648 649static int 650at91_mci_write_ivar(device_t bus, device_t child, int which, uintptr_t value) 651{ 652 struct at91_mci_softc *sc = device_get_softc(bus); --- 24 unchanged lines hidden (view full) --- 677 break; 678 case MMCBR_IVAR_VDD: 679 sc->host.ios.vdd = value; 680 break; 681 /* These are read-only */ 682 case MMCBR_IVAR_HOST_OCR: 683 case MMCBR_IVAR_F_MIN: 684 case MMCBR_IVAR_F_MAX: | 648 } 649 return (0); 650} 651 652static int 653at91_mci_write_ivar(device_t bus, device_t child, int which, uintptr_t value) 654{ 655 struct at91_mci_softc *sc = device_get_softc(bus); --- 24 unchanged lines hidden (view full) --- 680 break; 681 case MMCBR_IVAR_VDD: 682 sc->host.ios.vdd = value; 683 break; 684 /* These are read-only */ 685 case MMCBR_IVAR_HOST_OCR: 686 case MMCBR_IVAR_F_MIN: 687 case MMCBR_IVAR_F_MAX: |
688 case MMCBR_IVAR_MAX_DATA: |
|
685 return (EINVAL); 686 } 687 return (0); 688} 689 690static device_method_t at91_mci_methods[] = { 691 /* device_if */ 692 DEVMETHOD(device_probe, at91_mci_probe), --- 26 unchanged lines hidden --- | 689 return (EINVAL); 690 } 691 return (0); 692} 693 694static device_method_t at91_mci_methods[] = { 695 /* device_if */ 696 DEVMETHOD(device_probe, at91_mci_probe), --- 26 unchanged lines hidden --- |