Re: [PATCH 2/4] pwm: Add Apple PWM controller

From: Krzysztof Kozlowski
Date: Fri Oct 28 2022 - 15:50:06 EST


On 28/10/2022 14:51, Sasha Finkelstein wrote:
> On Fri, 28 Oct 2022 at 20:54, Krzysztof Kozlowski
> <krzysztof.kozlowski@xxxxxxxxxx> wrote:
>>
>> On 28/10/2022 12:52, Sasha Finkelstein wrote:
>>> +config PWM_APPLE
>>> + tristate "Apple SoC PWM support"
>>> + depends on ARCH_APPLE || (COMPILE_TEST && 64BIT)
>>
>> Why this code cannot be build on 32-bit?
> It uses 64-bit divisions, which causes it to fail to build on 32-bit
> mips. It should not be a
> problem, since this hardware is only present on 64-bit SoCs.

Does not matter, code should be portable and buildable on 32-bit. If it
does not build then your code is not correct.

You need to investigate the failure. Maybe using do_div would solve (or
other macros from div64.h)

Best regards,
Krzysztof