[U-Boot] [PATCH] usb: sunxi: don't touch reset bits in ccm if CONFIG_SUNXI_GEN_SUN6I is not defined

Jagan Teki jagannadh.teki at gmail.com
Thu Jun 14 05:41:37 UTC 2018


On Thu, Jun 14, 2018 at 11:06 AM, Vasily Khoruzhick <anarsoul at gmail.com> wrote:
> On Wed, Jun 13, 2018 at 10:29 PM, Jagan Teki <jagannadh.teki at gmail.com> wrote:
>> On Thu, Jun 14, 2018 at 9:01 AM, Vasily Khoruzhick <anarsoul at gmail.com> wrote:
>>> On Wed, Jun 13, 2018 at 8:23 PM, Chen-Yu Tsai <wens at csie.org> wrote:
>>>
>>>>> +       if (priv->cfg->has_reset) {
>>>>> +#ifdef CONFIG_SUNXI_GEN_SUN6I
>>>>
>>>> The "has_reset" field is supposed to deal with this. Is it not working?
>>>
>>> There's no ahb_reset0_cfg in ccm on sun4i and sun5i, so compilation fails with
>>>
>>> drivers/usb/host/ohci-sunxi.c:96:26: error: 'struct sunxi_ccm_reg' has
>>> no member named 'ahb_reset0_cfg'
>>
>> Add reset0_cfg_off on driver_data for sun6i. and check the same while writing.
>
> I don't think that hardcoding ahb_reset0_cfg offset here is a good
> idea. Using offsetof() isn't possible without ifdef, since
> this field won't be present in struct sunxi_ccm_reg for sun4i and sun5i.

ie reason I've mentioned to add offset field for sun6i, this is what
we do with phyctl_offset in phy driver. I won't recommend #ifdef
again.


More information about the U-Boot mailing list