if_dwc.c (876d357fa7bc8aeb8d050dd8fe227dd4fd8ed4df) | if_dwc.c (73a1170a8c41cb848f17cc0a8839e9dcee3d126e) |
---|---|
1/*- 2 * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 3 * All rights reserved. 4 * 5 * This software was developed by SRI International and the University of 6 * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) 7 * ("CTSRD"), as part of the DARPA CRASH research programme. 8 * --- 1035 unchanged lines hidden (view full) --- 1044 gpio_node = OF_node_from_xref(gpio_prop[0]); 1045 if ((gpio = OF_device_from_xref(gpio_prop[0])) == NULL) { 1046 device_printf(dev, 1047 "Can't find gpio controller for phy reset\n"); 1048 return (ENXIO); 1049 } 1050 1051 if (GPIO_MAP_GPIOS(gpio, node, gpio_node, | 1/*- 2 * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 3 * All rights reserved. 4 * 5 * This software was developed by SRI International and the University of 6 * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) 7 * ("CTSRD"), as part of the DARPA CRASH research programme. 8 * --- 1035 unchanged lines hidden (view full) --- 1044 gpio_node = OF_node_from_xref(gpio_prop[0]); 1045 if ((gpio = OF_device_from_xref(gpio_prop[0])) == NULL) { 1046 device_printf(dev, 1047 "Can't find gpio controller for phy reset\n"); 1048 return (ENXIO); 1049 } 1050 1051 if (GPIO_MAP_GPIOS(gpio, node, gpio_node, |
1052 sizeof(gpio_prop) / sizeof(gpio_prop[0]) - 1, | 1052 nitems(gpio_prop) - 1, |
1053 gpio_prop + 1, &pin, &flags) != 0) { 1054 device_printf(dev, "Can't map gpio for phy reset\n"); 1055 return (ENXIO); 1056 } 1057 1058 pin_value = GPIO_PIN_LOW; 1059 if (OF_hasprop(node, "snps,reset-active-low")) 1060 pin_value = GPIO_PIN_HIGH; --- 319 unchanged lines hidden --- | 1053 gpio_prop + 1, &pin, &flags) != 0) { 1054 device_printf(dev, "Can't map gpio for phy reset\n"); 1055 return (ENXIO); 1056 } 1057 1058 pin_value = GPIO_PIN_LOW; 1059 if (OF_hasprop(node, "snps,reset-active-low")) 1060 pin_value = GPIO_PIN_HIGH; --- 319 unchanged lines hidden --- |