summaryrefslogtreecommitdiff
path: root/wct4xxp/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'wct4xxp/base.c')
-rw-r--r--wct4xxp/base.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/wct4xxp/base.c b/wct4xxp/base.c
index 2128824..533a651 100644
--- a/wct4xxp/base.c
+++ b/wct4xxp/base.c
@@ -2679,8 +2679,8 @@ static void t4_vpm450_init(struct t4 *wc)
struct firmware embedded_firmware;
const struct firmware *firmware = &embedded_firmware;
#if !defined(HOTPLUG_FIRMWARE)
- extern const u32 *_binary_OCT6114_64D_ima_size;
- extern const u32 *_binary_OCT6114_128D_ima_size;
+ extern void *_binary_OCT6114_64D_ima_size;
+ extern void *_binary_OCT6114_128D_ima_size;
extern u8 _binary_OCT6114_64D_ima_start[];
extern u8 _binary_OCT6114_128D_ima_start[];
#endif
@@ -2719,7 +2719,13 @@ static void t4_vpm450_init(struct t4 *wc)
}
#else
embedded_firmware.data = _binary_OCT6114_64D_ima_start;
- embedded_firmware.size = *_binary_OCT6114_64D_ima_size;
+ /* Yes... this is weird. objcopy gives us a symbol containing
+ the size of the firmware, not a pointer a variable containing
+ the size. The only way we can get the value of the symbol
+ is to take its address, so we define it as a pointer and
+ then cast that value to the proper type.
+ */
+ embedded_firmware.size = (size_t) _binary_OCT6114_64D_ima_size;
#endif
break;
case 128:
@@ -2731,7 +2737,13 @@ static void t4_vpm450_init(struct t4 *wc)
}
#else
embedded_firmware.data = _binary_OCT6114_128D_ima_start;
- embedded_firmware.size = *_binary_OCT6114_128D_ima_size;
+ /* Yes... this is weird. objcopy gives us a symbol containing
+ the size of the firmware, not a pointer a variable containing
+ the size. The only way we can get the value of the symbol
+ is to take its address, so we define it as a pointer and
+ then cast that value to the proper type.
+ */
+ embedded_firmware.size = (size_t) _binary_OCT6114_128D_ima_size;
#endif
break;
default: