Re: [PATCH] usb: gadget: pxa25x: prevent ixp4xx + pxa25x combination

From: Linus Walleij

Date: Thu Sep 17 2026 - 18:40:31 EST


On Thu, Sep 17, 2026 at 5:57 PM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:

> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> The USB gadget driver is one of the holdouts of Arm single-platform
> support that conflicts with a multiplatform kernel. Trying to
> build this for both Intel PXA and IXP fails with:
>
> drivers/usb/gadget/udc/pxa25x_udc.c:144:9: error: 'UDCCS_IO_ROF' redefined [-Werror]
> 144 | #define UDCCS_IO_ROF (1 << 2) /* Receive overflow */
> | ^~~~~~~~~~~~
> drivers/usb/gadget/udc/pxa25x_udc.c:141:9: note: this is the location of the previous definition
> 141 | #define UDCCS_IO_ROF (1 << 3) /* Receive overflow */
> | ^~~~~~~~~~~~
> drivers/usb/gadget/udc/pxa25x_udc.c:232:2: error: #error "Can't configure both IXP and PXA"
> 232 | #error "Can't configure both IXP and PXA"
>
> Until recently this was not a problem, as ixp4xx was only big-endian
> and pxa is only little-endian, so these could never be in the same
> kernel image.
>
> As this has changed recently, an allmodconfig kernel for ARMv5 runs
> into the above failure. I don't think this is an important scenario
> in practice, especially as pxa25x support is already rather broken,
> so prevent this configuration using a Kconfig dependency, and
> rework the driver to allow a combined ixp4xx/pxa3xx kernel that
> only uses this driver on ixp.
>
> Cc: Linus Walleij <linusw@xxxxxxxxxx>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

That's a reasonable fix. It's not like we would want an actual multi_*
kernel on these devices anyway.
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij