summaryrefslogtreecommitdiff
path: root/drivers/ddr/microchip/ddr2.c
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2021-08-03 12:12:38 +0200
committerTom Rini <trini@konsulko.com>2021-09-02 09:48:20 -0400
commit15dd9412027e06f8ce0046e7d8de84489a7f34cb (patch)
treece71ee31171edea80dd8efcc6c20742e35e20cb7 /drivers/ddr/microchip/ddr2.c
parent1eb006249e2fe84e889a89154d71a9cb0093eed8 (diff)
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>
Diffstat (limited to 'drivers/ddr/microchip/ddr2.c')
0 files changed, 0 insertions, 0 deletions