Skip to content

Commit

Permalink
Revert "net: phy: airoha: drop fw_builtin for better upstreaming"
Browse files Browse the repository at this point in the history
This reverts commit a1eeb05.
  • Loading branch information
frank-w committed Jul 23, 2024
1 parent a1eeb05 commit ccdd39c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/net/phy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ config PHY_AIROHA_FW_IN_UBI
config PHY_AIROHA_FW_IN_MTD
bool "Airoha firmware in MTD partition on raw flash"

config PHY_AIROHA_FW_BUILTIN
bool "Airoha firmware builtin in uboot binary"

endchoice

menuconfig PHY_AQUANTIA
Expand Down
10 changes: 9 additions & 1 deletion drivers/net/phy/air_en8811h.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
#include <mtd.h>
#endif

#if CONFIG_PHY_AIROHA_FW_BUILTIN
#include "air_en8811h_fw.h"
#endif

#if AIR_UBOOT_REVISION > 0x202004
#include <linux/delay.h>
#endif
Expand Down Expand Up @@ -311,7 +315,11 @@ static int en8811h_load_firmware(struct phy_device *phydev)
return -ENOMEM;
}

#if CONFIG_PHY_AIROHA_FW_IN_UBI
#if CONFIG_PHY_AIROHA_FW_BUILTIN
//firmware_buf=EthMD32_dm;
memcpy(firmware_buf,EthMD32_dm,EN8811H_MD32_DM_SIZE+EN8811H_MD32_DSP_SIZE);
//memcpy((void *)(firmware_buf+EN8811H_MD32_DM_SIZE),EthMD32_pm,EthMD32_pm_size);
#elif CONFIG_PHY_AIROHA_FW_IN_UBI
ret = ubi_volume_read("en8811h-fw", firmware_buf, EN8811H_MD32_DM_SIZE + EN8811H_MD32_DSP_SIZE);
if (ret) {
printf("[Airoha] read firmware from UBI failed.\n");
Expand Down

0 comments on commit ccdd39c

Please sign in to comment.