All of lore.kernel.org
 help / color / mirror / Atom feed
From: Macpaul Lin <macpaul@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] nds32: Enable FPU if the version of CPU supported
Date: Wed, 24 Jul 2013 13:20:44 +0800	[thread overview]
Message-ID: <CACCg+XOSfjp1MfmsVnG9L2kHmoT7YciOxo-meUoVgXygKtvv7Q@mail.gmail.com> (raw)
In-Reply-To: <A03ABFCCC2764549B3FC5B964513FD5CE9D7@ATCPCS12.andestech.com>

Hi Kuan-Yu,

2013/7/18  <uboot@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

  reply	other threads:[~2013-07-24  5:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 17:20 [U-Boot] [PATCH] nds32: Enable FPU if the version of CPU supported Kuan-Yu Kuo
2013-07-18  7:16 ` uboot at andestech.com
2013-07-24  5:20   ` Macpaul Lin [this message]
2013-07-24 18:17 ` [U-Boot] [PATCH v2] " Kuan-Yu Kuo
2013-07-25  9:44   ` Macpaul Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACCg+XOSfjp1MfmsVnG9L2kHmoT7YciOxo-meUoVgXygKtvv7Q@mail.gmail.com \
    --to=macpaul@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.