[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu devel v8 PATCH 2/5] msf2: Microsemi Smartfusion2
From: |
sundeep subbaraya |
Subject: |
Re: [Qemu-devel] [Qemu devel v8 PATCH 2/5] msf2: Microsemi Smartfusion2 System Register block |
Date: |
Mon, 18 Sep 2017 11:59:46 +0530 |
Hi Philippe,
On Mon, Sep 18, 2017 at 5:27 AM, Philippe Mathieu-Daudé <address@hidden>
wrote:
> Hi Sundeep,
>
> On 09/14/2017 01:36 AM, Philippe Mathieu-Daudé wrote:
>
>> On 09/07/2017 04:24 PM, Subbaraya Sundeep wrote:
>>
> [...]
>
>> +static inline int msf2_divbits(uint32_t div)
>>>
>>
>> Please directly use ctz32() instead of msf2_divbits()
>>
>
> It seems you missed this review comment in your v9.
ctz32(1) = 0
ctz32(2) = 1
ctz32(4) = 2
ctz32(8) = 3
ctz32(16) = 4
ctz32(32) = 5
but for inputs 8,16,32 output should be 4,5,6 so didn't use ctz32().
I replied to this comment in the same mail chain earlier. Please check.
Thanks,
Sundeep
>
>
>
>> +{
>>> + int ret = 0;
>>> +
>>> + switch (div) {
>>> + case 1:
>>> + ret = 0;
>>> + break;
>>> + case 2:
>>> + ret = 1;
>>> + break;
>>> + case 4:
>>> + ret = 2;
>>> + break;
>>> + case 8:
>>> + ret = 4;
>>> + break;
>>> + case 16:
>>> + ret = 5;
>>> + break;
>>> + case 32:
>>> + ret = 6;
>>> + break;
>>> + default:
>>> + break;
>>> + }
>>> +
>>> + return ret;
>>> +}
>>>
>>
[Qemu-devel] [Qemu devel v8 PATCH 3/5] msf2: Add Smartfusion2 SPI controller, Subbaraya Sundeep, 2017/09/07
[Qemu-devel] [Qemu devel v8 PATCH 4/5] msf2: Add Smartfusion2 SoC, Subbaraya Sundeep, 2017/09/07
[Qemu-devel] [Qemu devel v8 PATCH 5/5] msf2: Add Emcraft's Smartfusion2 SOM kit, Subbaraya Sundeep, 2017/09/07