u-boot/arch/arm
Stephan Gerhold 15dd941202 arm: mach-snapdrgon: misc: Simplify msm_generate_mac_addr()
The logic in msm_generate_mac_addr() was originally taken from the LK
bootloader where the serial number is a string and must be parsed first.
However, in U-Boot msm_board_serial() returns an u32 and
msm_generate_mac_addr() has quite complicated code that will first
print it as a hex string and then immediately parse it again.

What this function actually does at the end is to put the serial number
encoded as big endian (the order used for the hex string) into the u8 *mac.
Use put_unaligned_be32() to do that with bit shifts instead of going
through the string format.

This should be slightly more efficient and cleaner but does not result
in any functional difference.

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-09-02 09:48:20 -04:00
..
cpu armv7: Add Position Independent Execution support 2021-09-02 09:48:20 -04:00
dts board: stemmy: Add basic Fastboot support 2021-09-01 19:25:37 -04:00
include Convert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig 2021-08-31 17:47:49 -04:00
lib armv7: Add Position Independent Execution support 2021-09-02 09:48:20 -04:00
mach-aspeed common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
mach-at91 Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
mach-bcm283x reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-bcmstb
mach-cortina
mach-davinci davinci: Drop CONFIG_MAC_ADDR_IN_EEPROM 2021-08-30 14:10:05 -04:00
mach-exynos Kconfig: Use spaces not tabs in Kconfig entires 2021-08-30 14:13:28 -04:00
mach-highbank
mach-imx Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
mach-integrator
mach-ipq40xx dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
mach-k3 arm: mach-k3: Cleanup common start_non_linux_remote_cores() 2021-07-27 11:00:44 +05:30
mach-keystone global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
mach-kirkwood Convert CONFIG_SYS_I2C_SPEED et al to Kconfig 2021-08-30 14:10:07 -04:00
mach-lpc32xx arm: lpc32xx: add EA LPC3250 DevKitv2 board support 2021-07-06 14:12:14 -04:00
mach-mediatek Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
mach-meson Revert "ARM: meson: Add support for fastboot_set_reboot_flag()" 2021-07-30 14:54:03 +02:00
mach-mvebu Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
mach-nexell global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
mach-octeontx reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-octeontx2 reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-omap2 Convert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig 2021-08-31 17:47:49 -04:00
mach-orion5x Convert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig 2021-08-31 17:47:49 -04:00
mach-owl reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-qemu qemu: arm: Initialise virtio devices in board_late_init 2020-12-31 14:41:31 +01:00
mach-rmobile Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
mach-rockchip Convert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig 2021-08-31 17:47:49 -04:00
mach-s5pc1xx
mach-snapdragon arm: mach-snapdrgon: misc: Simplify msm_generate_mac_addr() 2021-09-02 09:48:20 -04:00
mach-socfpga arm: socfpga: Enable Intel N5X device build 2021-08-25 15:26:38 +08:00
mach-sti
mach-stm32 Rename DRIVERS_MISC_SUPPORT to DRIVERS_MISC 2021-07-28 14:29:37 -04:00
mach-stm32mp Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
mach-sunxi Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
mach-tegra Convert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig 2021-08-31 17:47:49 -04:00
mach-u8500 board: stemmy: Update documentation 2021-09-01 19:25:37 -04:00
mach-uniphier global: Convert simple_strtoul() with hex to hextoul() 2021-08-02 13:32:14 -04:00
mach-versal arm: Migrate GICV2 / GICV3 to Kconfig 2021-08-30 14:13:26 -04:00
mach-versatile
mach-zynq reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-zynqmp xilinx: zynqmp: Update descriptions for u-boot.its 2021-08-26 08:14:43 +02:00
mach-zynqmp-r5 reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
thumb1/include/asm/proc-armv
config.mk imx: Finish migration of IMX_CONFIG to Kconfig 2021-08-31 17:46:37 -04:00
Kconfig armv7: Add Position Independent Execution support 2021-09-02 09:48:20 -04:00
Kconfig.debug
Makefile arm: imx: basic i.MX8ULP support 2021-08-09 14:46:50 +02:00