Sat Aug 25 20:55:15 2018 UTC ()
Set mac-address property to mue(4).


(rin)
diff -r1.13 -r1.14 src/sys/arch/arm/broadcom/bcm283x_platform.c

cvs diff -r1.13 -r1.14 src/sys/arch/arm/broadcom/bcm283x_platform.c (expand / switch to unified diff)

--- src/sys/arch/arm/broadcom/bcm283x_platform.c 2018/08/21 08:45:17 1.13
+++ src/sys/arch/arm/broadcom/bcm283x_platform.c 2018/08/25 20:55:15 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: bcm283x_platform.c,v 1.13 2018/08/21 08:45:17 rin Exp $ */ 1/* $NetBSD: bcm283x_platform.c,v 1.14 2018/08/25 20:55:15 rin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2017 Jared D. McNeill <jmcneill@invisible.ca> 4 * Copyright (c) 2017 Jared D. McNeill <jmcneill@invisible.ca>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -17,27 +17,27 @@ @@ -17,27 +17,27 @@
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE. 26 * SUCH DAMAGE.
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.13 2018/08/21 08:45:17 rin Exp $"); 30__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.14 2018/08/25 20:55:15 rin Exp $");
31 31
32#include "opt_arm_debug.h" 32#include "opt_arm_debug.h"
33#include "opt_bcm283x.h" 33#include "opt_bcm283x.h"
34#include "opt_cpuoptions.h" 34#include "opt_cpuoptions.h"
35#include "opt_ddb.h" 35#include "opt_ddb.h"
36#include "opt_evbarm_boardtype.h" 36#include "opt_evbarm_boardtype.h"
37#include "opt_kgdb.h" 37#include "opt_kgdb.h"
38#include "opt_fdt.h" 38#include "opt_fdt.h"
39#include "opt_rpi.h" 39#include "opt_rpi.h"
40#include "opt_vcprop.h" 40#include "opt_vcprop.h"
41 41
42#include "sdhc.h" 42#include "sdhc.h"
43#include "bcmsdhost.h" 43#include "bcmsdhost.h"
@@ -1307,27 +1307,27 @@ bcm283x_platform_device_register(device_ @@ -1307,27 +1307,27 @@ bcm283x_platform_device_register(device_
1307 if (device_is_a(dev, "bcmdmac") && 1307 if (device_is_a(dev, "bcmdmac") &&
1308 vcprop_tag_success_p(&vb.vbt_dmachan.tag)) { 1308 vcprop_tag_success_p(&vb.vbt_dmachan.tag)) {
1309 prop_dictionary_set_uint32(dict, 1309 prop_dictionary_set_uint32(dict,
1310 "chanmask", vb.vbt_dmachan.mask); 1310 "chanmask", vb.vbt_dmachan.mask);
1311 } 1311 }
1312#if NSDHC > 0 1312#if NSDHC > 0
1313 if (booted_device == NULL && 1313 if (booted_device == NULL &&
1314 device_is_a(dev, "ld") && 1314 device_is_a(dev, "ld") &&
1315 device_is_a(device_parent(dev), "sdmmc")) { 1315 device_is_a(device_parent(dev), "sdmmc")) {
1316 booted_partition = 0; 1316 booted_partition = 0;
1317 booted_device = dev; 1317 booted_device = dev;
1318 } 1318 }
1319#endif 1319#endif
1320 if (device_is_a(dev, "usmsc") && 1320 if ((device_is_a(dev, "usmsc") || device_is_a(dev, "mue")) &&
1321 vcprop_tag_success_p(&vb.vbt_macaddr.tag)) { 1321 vcprop_tag_success_p(&vb.vbt_macaddr.tag)) {
1322 const uint8_t enaddr[ETHER_ADDR_LEN] = { 1322 const uint8_t enaddr[ETHER_ADDR_LEN] = {
1323 (vb.vbt_macaddr.addr >> 0) & 0xff, 1323 (vb.vbt_macaddr.addr >> 0) & 0xff,
1324 (vb.vbt_macaddr.addr >> 8) & 0xff, 1324 (vb.vbt_macaddr.addr >> 8) & 0xff,
1325 (vb.vbt_macaddr.addr >> 16) & 0xff, 1325 (vb.vbt_macaddr.addr >> 16) & 0xff,
1326 (vb.vbt_macaddr.addr >> 24) & 0xff, 1326 (vb.vbt_macaddr.addr >> 24) & 0xff,
1327 (vb.vbt_macaddr.addr >> 32) & 0xff, 1327 (vb.vbt_macaddr.addr >> 32) & 0xff,
1328 (vb.vbt_macaddr.addr >> 40) & 0xff 1328 (vb.vbt_macaddr.addr >> 40) & 0xff
1329 }; 1329 };
1330 1330
1331 prop_data_t pd = prop_data_create_data(enaddr, ETHER_ADDR_LEN); 1331 prop_data_t pd = prop_data_create_data(enaddr, ETHER_ADDR_LEN);
1332 KASSERT(pd != NULL); 1332 KASSERT(pd != NULL);
1333 if (prop_dictionary_set(device_properties(dev), "mac-address", 1333 if (prop_dictionary_set(device_properties(dev), "mac-address",