Re: [PATCH 02/14] ARM: davinci: drop DAVINCI_DMxxx references

From: Arnd Bergmann
Date: Wed Oct 19 2022 - 16:32:51 EST


On Wed, Oct 19, 2022, at 18:37, David Lechner wrote:
> On 10/19/22 10:29 AM, Arnd Bergmann wrote:
>> static u64 usb_dmamask = DMA_BIT_MASK(32);
>> @@ -67,14 +62,6 @@ void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms)
>> usb_data.power = mA > 510 ? 255 : mA / 2;
>> usb_data.potpgt = (potpgt_ms + 1) / 2;
>>
>> - if (cpu_is_davinci_dm646x()) {
>> - /* Override the defaults as DM6467 uses different IRQs. */
>> - usb_dev.resource[1].start = DAVINCI_INTC_IRQ(IRQ_DM646X_USBINT);
>> - usb_dev.resource[2].start = DAVINCI_INTC_IRQ(
>> - IRQ_DM646X_USBDMAINT);
>> - } else /* other devices don't have dedicated CPPI IRQ */
>> - usb_dev.num_resources = 2;
>> -
>> platform_device_register(&usb_dev);
>> }
>>
>
> Shouldn't the else case be kept since it applies to *all* "other devices"?
> (and therfore the usb_resources shouldn't be modified either?)

.num_resources is already initialized to 2 from ARRAY_SIZE(),
so it does not have to be changed afterwards.

Arnd