board: amlogic: Generate unique MAC address for Q200 and P212 based boards
Enable unique MAC address generation for boards usins SoCs having a known functional and valid unique serial number. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
		
							parent
							
								
									dad258fadd
								
							
						
					
					
						commit
						3f1f9f08eb
					
				| 
						 | 
					@ -32,6 +32,8 @@ int misc_init_r(void)
 | 
				
			||||||
					  mac_addr, EFUSE_MAC_SIZE);
 | 
										  mac_addr, EFUSE_MAC_SIZE);
 | 
				
			||||||
		if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr))
 | 
							if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr))
 | 
				
			||||||
			eth_env_set_enetaddr("ethaddr", mac_addr);
 | 
								eth_env_set_enetaddr("ethaddr", mac_addr);
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								meson_generate_serial_ethaddr();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!env_get("serial#")) {
 | 
						if (!env_get("serial#")) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,6 +31,8 @@ int misc_init_r(void)
 | 
				
			||||||
					  mac_addr, EFUSE_MAC_SIZE);
 | 
										  mac_addr, EFUSE_MAC_SIZE);
 | 
				
			||||||
		if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr))
 | 
							if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr))
 | 
				
			||||||
			eth_env_set_enetaddr("ethaddr", mac_addr);
 | 
								eth_env_set_enetaddr("ethaddr", mac_addr);
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								meson_generate_serial_ethaddr();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!env_get("serial#")) {
 | 
						if (!env_get("serial#")) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue