[U-Boot] [PATCH] nds32: Enable FPU if the version of CPU supported
Macpaul Lin
macpaul at gmail.com
Wed Jul 24 07:20:44 CEST 2013
Hi Kuan-Yu,
2013/7/18 <uboot at andestech.com>:
> Hi Kuan-Yu Kuo,
>
...
>> +enable_fpu:
>> + mfsr $r0, $CPU_VER /* enable FPU if it exists */
>> + srli $r0, $r0, 3
>> + andi $r0, $r0, 1
>> + beqz $r0, 1f /* skip if no COP */
>> + mfsr $r0, $FUCOP_EXIST
>> + srli $r0, $r0, 31
>> + beqz $r0, 1f /* skip if no FPU */
>> + mfsr $r0, $FUCOP_CTL
>> + ori $r0, $r0, 1
>> + mtsr $r0, $FUCOP_CTL
WARNING: line over 80 characters
#53: FILE: arch/nds32/cpu/n1213/ag101/lowlevel_init.S:249:
+ beqz $r0, 1f /*
skip if no COP */
WARNING: line over 80 characters
#56: FILE: arch/nds32/cpu/n1213/ag101/lowlevel_init.S:252:
+ beqz $r0, 1f /*
skip if no FPU */
WARNING: line over 80 characters
#93: FILE: arch/nds32/cpu/n1213/ag102/lowlevel_init.S:304:
+ beqz $r0, 1f /*
skip if no COP */
WARNING: line over 80 characters
#96: FILE: arch/nds32/cpu/n1213/ag102/lowlevel_init.S:307:
+ beqz $r0, 1f /*
skip if no FPU */
1. Please clean up this patch and check with checkpatch.pl then resend it.
>
> There are two kinds of toolchain in Andes architecture, one is FPU supported and the other is not, for the latter one, there is no need to enable FPU even if the processor supports it.
> This code snippet only useful for the toolchain that will generate FPU instructions, so add compile option to determine Andes predefined macros would be better.
> For example:
> #if defined(NDS32_EXT_FPU_DP) || defined(NDS32_EXT_FPU_SP)
>
> Andes Technology Corporation
2. According to the official suggestion from Andes Technology
Corporation, your patch will be better to reorganized with these macro
definitions to help the toolchain to distinguish the differences.
But! The most users cannot distinguish the differences of these
toolchain-with-SoC combination, hence I think to keep the most
Error-Proof protection will be better.
Thanks.
--
Best regards,
Macpaul Lin
More information about the U-Boot
mailing list