[PATCH v2 1/8] usb: onboard-hub: fix compile issue with gpio.h import

Quentin Schulz quentin.schulz at cherry.de
Fri Apr 24 19:55:57 CEST 2026


Hi Mathew,

On 4/22/26 3:15 AM, Simon Glass wrote:
> On 2026-04-21T00:04:33, Mathew McBride <matt at traverse.com.au> wrote:
>> usb: onboard-hub: fix compile issue with gpio.h import
>>
>> This resolves the following compile error when compiling
>> ten64_tfa_defconfig:
>>
>> In file included from ./arch/arm/include/asm/gpio.h:2,
>>                   from common/usb_onboard_hub.c:10:
>> ./arch/arm/include/asm/arch/gpio.h:17:9: error: unknown type name 'ulong'
>>     17 |         ulong addr;
>> ./arch/arm/include/asm/arch/gpio.h:18:9: error: unknown type name 'ulong'
>>     18 |         ulong size;
>> ./arch/arm/include/asm/arch/gpio.h:19:9: error: unknown type name 'uint'
>>     19 |         uint ngpios;
>>
>> Reviewed-by: Peng Fan <peng.fan at nxp.com>
>> Signed-off-by: Mathew McBride <matt at traverse.com.au>
>> Reviewed-by: Marek Vasut <marek.vasut+usb at mailbox.org>
>>
>> common/usb_onboard_hub.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>

Only received the v1 so commenting here again:

Well, it doesn't fix the actual issue which is include/asm/arch/gpio.h 
use types that aren't defined in its scope.

So what I think we should be doing instead is to add the proper include 
in include/asm/arch/gpio.h such that the types are defined, I'm assuming 
it should be as simple as adding

#include <linux/types.h>

to include/asm/arch/gpio.h (or replace the unknown types with something 
that actually exist in that context). Otherwise, we'll end up having to 
fix all users of asm/gpio.h which do not include linux/types.h one way 
or the other. Can you please test that?

Cheers,
Quentin


More information about the U-Boot mailing list