aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c')
-rw-r--r--package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c
index bf93437fb0..b1660274d0 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c
@@ -246,13 +246,21 @@ static inline int pp32_download_code(int pp32, u32 *code_src, unsigned int code_
* ####################################
*/
-extern void ifx_ptm_get_fw_ver(unsigned int *major, unsigned int *minor)
+void ifx_ptm_get_fw_ver(unsigned int *major, unsigned int *mid, unsigned int *minor)
{
ASSERT(major != NULL, "pointer is NULL");
ASSERT(minor != NULL, "pointer is NULL");
- *major = FW_VER_ID->major;
- *minor = FW_VER_ID->minor;
+ if ( *(volatile unsigned int *)FW_VER_ID_NEW == 0 ) {
+ *major = FW_VER_ID->major;
+ *mid = ~0;
+ *minor = FW_VER_ID->minor;
+ }
+ else {
+ *major = FW_VER_ID_NEW->major;
+ *mid = FW_VER_ID_NEW->middle;
+ *minor = FW_VER_ID_NEW->minor;
+ }
}
void ifx_ptm_init_chip(struct platform_device *pdev)