[U-Boot] [linux-sunxi] [PATCH 1/2] sunxi: twi: enable clocks on sun7i

Olliver Schinagl oliver at schinagl.nl
Fri Dec 4 08:32:44 CET 2015


Hey Julian

On December 4, 2015 12:01:27 AM CET, Julian Calaby <julian.calaby at gmail.com> wrote:
>Hi Oliver,
>
>On Fri, Dec 4, 2015 at 9:57 AM, Julian Calaby <julian.calaby at gmail.com>
>wrote:
>> Hi Oliver,
>>
>> On Fri, Dec 4, 2015 at 3:49 AM, Olliver Schinagl <oliver at schinagl.nl>
>wrote:
>>> From: Olliver Schinagl <o.schinagl at ultimaker.com>
>>>
>>> Commit 6c739c5d added code to enable i2c bus 4 and 5 on the sun7i
>SoC
>>> but forgot to enable the clocks for these 2 i2c busses.
>>>
>>> This patch enables the clocks for i2c bus 4 and 5 on sun7i.
>>>
>>> Signed-off-by: Olliver Schinagl <o.schinagl at ultimaker.com>
>>> ---
>>>  arch/arm/cpu/armv7/sunxi/clock_sun4i.c | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
>b/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
>>> index 7c8eff9..ed910b1 100644
>>> --- a/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
>>> +++ b/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
>>> @@ -67,7 +67,11 @@ int clock_twi_onoff(int port, int state)
>>>         struct sunxi_ccm_reg *const ccm =
>>>                 (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
>>>
>>> +#ifdef CONFIG_MACH_SUN7I
>>> +       if (port > 4)
>>> +#else
>>>         if (port > 2)
>>> +#endif
>>
>> Should the number here be a #define somewhere, or even a parameter
>for
>> each version of this clock?
>
>Wait, this is a u-boot patch, right? If so, ignore this and sorry for
>the noise.
It is ;) and whille you are not un-right i dont think u-boot does this via defined variables generally. But I  personally do like it better with defines. If there is a v2 I will actually change it :)
>
>Thanks,

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


More information about the U-Boot mailing list