[00/35] ARM: davinci: modernize the irq support
mbox series

Message ID 20190131133928.17985-1-brgl@bgdev.pl
Headers show
Series
  • ARM: davinci: modernize the irq support
Related show

Message

Bartosz Golaszewski Jan. 31, 2019, 1:38 p.m. UTC
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

This series ports the davinci platform to using SPARSE_IRQ, cleans up
the irqchip drivers and moves them over to drivers/irqchip.

The series can be logically split into four parts. The first (1-8) aims
at introducing support for SPARSE_IRQ. It contains a couple changes
required for that functionality and the final patch actually selecting
it.

Second part (9-18) makes the aintc driver suitable for drivers/irqchip
and eventually moves it over there.

Part 3 (19-31) does the same for the cp-intc driver.

Last part (32-35) aims at removing mach/irqs.h as it's no longer needed
with SPARSE_IRQ selected.

The series has been tested on da850-lcdk (for cp-intc) and
dm365-evm (for aintc).

Bartosz Golaszewski (35):
  ARM: davinci: remove intc_host_map from davinci_soc_info struct
  ARM: davinci: select GENERIC_IRQ_MULTI_HANDLER
  ARM: davinci: remove davinci_intc_type
  ARM: davinci: pull davinci_intc_base into the respective intc drivers
  ARM: davinci: drop irq defines from default_priorites
  ARM: davinci: wrap interrupt definitions with a macro for SPARSE_IRQ
  ARM: davinci: aintc: use irq domain
  ARM: davinci: select SPARSE_IRQ
  ARM: davinci: aintc: drop GPL license boilerplate
  ARM: davinci: aintc: wrap davinci_irq_init() with a helper
  ARM: davinci: aintc: use a common prefix for symbols in the driver
  ARM: davinci: aintc: drop the 00 prefix from register offsets
  ARM: davinci: aintc: add a new config structure
  ARM: davinci: aintc: use the new irqchip config structure in dm* SoCs
  ARM: davinci: aintc: use the new config structure
  ARM: davinci: aintc: move timer-specific irq_set_handler() out of
    irq.c
  ARM: davinci: aintc: remove unnecessary includes
  irqchip: davinci-aintc: move the driver to drivers/irqchip
  ARM: davinci: cp-intc: remove cp_intc.h
  ARM: davinci: cp-intc: add a wrapper around cp_intc_init()
  ARM: davinci: cp-intc: add a new config structure
  ARM: davinci: cp-intc: add the new config structures for da8xx SoCs
  ARM: davinci: cp-intc: use a common prefix for all symbols
  ARM: davinci: cp-intc: convert all hex numbers to lowercase
  ARM: davinci: cp-intc: use the new-style config structure
  ARM: davinci: cp-intc: improve coding style
  ARM: davinci: cp-intc: unify error handling
  ARM: davinci: cp-intc: remove unneeded include
  ARM: davinci: cp-intc: drop GPL license boilerplate
  ARM: davinci: cp-intc: remove redundant comments
  irqchip: davinci-cp-intc: move the driver to drivers/irqchip
  ARM: davinci: remove intc related fields from davinci_soc_info
  ARM: davinci: prepare to remove mach/irqs.h
  ARM: davinci: stop using defines from mach/irqs.h
  ARM: davinci: remove mach/irqs.h

 arch/arm/Kconfig                              |   2 +
 arch/arm/mach-davinci/Kconfig                 |  19 +-
 arch/arm/mach-davinci/Makefile                |   3 -
 arch/arm/mach-davinci/asp.h                   |   8 +-
 arch/arm/mach-davinci/board-da830-evm.c       |   5 +-
 arch/arm/mach-davinci/board-da850-evm.c       |   7 +-
 arch/arm/mach-davinci/board-dm355-evm.c       |   2 +-
 arch/arm/mach-davinci/board-dm355-leopard.c   |   2 +-
 arch/arm/mach-davinci/board-dm365-evm.c       |   2 +-
 arch/arm/mach-davinci/board-dm644x-evm.c      |   4 +-
 arch/arm/mach-davinci/board-dm646x-evm.c      |   7 +-
 arch/arm/mach-davinci/board-mityomapl138.c    |   3 +-
 arch/arm/mach-davinci/board-neuros-osd2.c     |   2 +-
 arch/arm/mach-davinci/board-omapl138-hawk.c   |   3 +-
 arch/arm/mach-davinci/board-sffsdr.c          |   2 +-
 arch/arm/mach-davinci/common.c                |   3 -
 arch/arm/mach-davinci/cp_intc.c               | 215 ---------
 arch/arm/mach-davinci/cp_intc.h               |  57 ---
 arch/arm/mach-davinci/da830.c                 | 127 +-----
 arch/arm/mach-davinci/da850.c                 | 153 ++-----
 arch/arm/mach-davinci/davinci.h               |   6 +
 arch/arm/mach-davinci/devices-da8xx.c         | 146 +++----
 arch/arm/mach-davinci/devices.c               |  31 +-
 arch/arm/mach-davinci/dm355.c                 | 149 +++----
 arch/arm/mach-davinci/dm365.c                 | 175 +++-----
 arch/arm/mach-davinci/dm644x.c                | 145 +++----
 arch/arm/mach-davinci/dm646x.c                | 159 +++----
 arch/arm/mach-davinci/include/mach/common.h   |  14 +-
 arch/arm/mach-davinci/include/mach/da8xx.h    |   2 +
 .../mach-davinci/include/mach/entry-macro.S   |  39 --
 arch/arm/mach-davinci/include/mach/irqs.h     | 409 ------------------
 arch/arm/mach-davinci/irq.c                   | 117 -----
 arch/arm/mach-davinci/usb-da8xx.c             |   7 +-
 arch/arm/mach-davinci/usb.c                   |   7 +-
 drivers/irqchip/Kconfig                       |  10 +
 drivers/irqchip/Makefile                      |   2 +
 drivers/irqchip/irq-davinci-aintc.c           | 141 ++++++
 drivers/irqchip/irq-davinci-cp-intc.c         | 224 ++++++++++
 include/linux/irqchip/irq-davinci-aintc.h     |  19 +
 include/linux/irqchip/irq-davinci-cp-intc.h   |  18 +
 40 files changed, 829 insertions(+), 1617 deletions(-)
 delete mode 100644 arch/arm/mach-davinci/cp_intc.c
 delete mode 100644 arch/arm/mach-davinci/cp_intc.h
 delete mode 100644 arch/arm/mach-davinci/include/mach/entry-macro.S
 delete mode 100644 arch/arm/mach-davinci/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-davinci/irq.c
 create mode 100644 drivers/irqchip/irq-davinci-aintc.c
 create mode 100644 drivers/irqchip/irq-davinci-cp-intc.c
 create mode 100644 include/linux/irqchip/irq-davinci-aintc.h
 create mode 100644 include/linux/irqchip/irq-davinci-cp-intc.h

Comments

David Lechner Feb. 4, 2019, 9:49 p.m. UTC | #1
On 1/31/19 7:38 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> This series ports the davinci platform to using SPARSE_IRQ, cleans up
> the irqchip drivers and moves them over to drivers/irqchip.
> 

This has been on my todo list for years, but I've never had enough
time to figure it out. Nice to see it finally getting done!

Series tested on LEGO MINDSTORMS EV3 (da850-like). I can now use
IIO triggers without having to patch the kernel to add extra
interrupts.

Tested-by: David Lechner <david@lechnology.com>
Bartosz Golaszewski Feb. 5, 2019, 4:11 p.m. UTC | #2
pon., 4 lut 2019 o 22:49 David Lechner <david@lechnology.com> napisał(a):
>
> On 1/31/19 7:38 AM, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > This series ports the davinci platform to using SPARSE_IRQ, cleans up
> > the irqchip drivers and moves them over to drivers/irqchip.
> >
>
> This has been on my todo list for years, but I've never had enough
> time to figure it out. Nice to see it finally getting done!
>
> Series tested on LEGO MINDSTORMS EV3 (da850-like). I can now use
> IIO triggers without having to patch the kernel to add extra
> interrupts.
>
> Tested-by: David Lechner <david@lechnology.com>
>
>

Wow thanks for taking the time to review it!

I'll address certain remarks - for those unaddressed - I'll fix them in v2.

Sekhar: are you fine with sending both the clocksource and interrupt
series together next time with additional patches on top making
davinci part of multi_v5_defconfig?

Best regards,
Bartosz Golaszewski
Sekhar Nori Feb. 7, 2019, 3:24 p.m. UTC | #3
Hi Bartosz,

On 31/01/19 7:08 PM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> This series ports the davinci platform to using SPARSE_IRQ, cleans up
> the irqchip drivers and moves them over to drivers/irqchip.
> 
> The series can be logically split into four parts. The first (1-8) aims
> at introducing support for SPARSE_IRQ. It contains a couple changes
> required for that functionality and the final patch actually selecting
> it.
> 
> Second part (9-18) makes the aintc driver suitable for drivers/irqchip
> and eventually moves it over there.
> 
> Part 3 (19-31) does the same for the cp-intc driver.
> 
> Last part (32-35) aims at removing mach/irqs.h as it's no longer needed
> with SPARSE_IRQ selected.
> 
> The series has been tested on da850-lcdk (for cp-intc) and
> dm365-evm (for aintc).

Looks good to me overall, apart from some comments on individual
patches. I boot tested on all 6 DaVinci SoCs. Also did a basic iperf
test on DA850 to check that performance remains same as before.

Nice work!

Thanks,
Sekhar
Sekhar Nori Feb. 8, 2019, 11:43 a.m. UTC | #4
On 05/02/19 9:41 PM, Bartosz Golaszewski wrote:
> pon., 4 lut 2019 o 22:49 David Lechner <david@lechnology.com> napisał(a):
>>
>> On 1/31/19 7:38 AM, Bartosz Golaszewski wrote:
>>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>>
>>> This series ports the davinci platform to using SPARSE_IRQ, cleans up
>>> the irqchip drivers and moves them over to drivers/irqchip.
>>>
>>
>> This has been on my todo list for years, but I've never had enough
>> time to figure it out. Nice to see it finally getting done!
>>
>> Series tested on LEGO MINDSTORMS EV3 (da850-like). I can now use
>> IIO triggers without having to patch the kernel to add extra
>> interrupts.
>>
>> Tested-by: David Lechner <david@lechnology.com>
>>
>>
> 
> Wow thanks for taking the time to review it!
> 
> I'll address certain remarks - for those unaddressed - I'll fix them in v2.
> 
> Sekhar: are you fine with sending both the clocksource and interrupt
> series together next time with additional patches on top making
> davinci part of multi_v5_defconfig?

I think its better to keep them separate. You can base both on latest
mainline.

Thanks,
Sekhar
Bartosz Golaszewski Feb. 8, 2019, 12:27 p.m. UTC | #5
pt., 8 lut 2019 o 12:43 Sekhar Nori <nsekhar@ti.com> napisał(a):
>
> On 05/02/19 9:41 PM, Bartosz Golaszewski wrote:
> > pon., 4 lut 2019 o 22:49 David Lechner <david@lechnology.com> napisał(a):
> >>
> >> On 1/31/19 7:38 AM, Bartosz Golaszewski wrote:
> >>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >>>
> >>> This series ports the davinci platform to using SPARSE_IRQ, cleans up
> >>> the irqchip drivers and moves them over to drivers/irqchip.
> >>>
> >>
> >> This has been on my todo list for years, but I've never had enough
> >> time to figure it out. Nice to see it finally getting done!
> >>
> >> Series tested on LEGO MINDSTORMS EV3 (da850-like). I can now use
> >> IIO triggers without having to patch the kernel to add extra
> >> interrupts.
> >>
> >> Tested-by: David Lechner <david@lechnology.com>
> >>
> >>
> >
> > Wow thanks for taking the time to review it!
> >
> > I'll address certain remarks - for those unaddressed - I'll fix them in v2.
> >
> > Sekhar: are you fine with sending both the clocksource and interrupt
> > series together next time with additional patches on top making
> > davinci part of multi_v5_defconfig?
>
> I think its better to keep them separate. You can base both on latest
> mainline.
>
> Thanks,
> Sekhar

If you prefer I can keep them separate, although there were a couple
conflicts when I merged them in my tree, which are now resolved.

Let's maybe start with the interrupts (I'll send a v2 tonight if you
don't have any more comments), and once you have that in your tree, I
will rebase the timer code and then the multi_v5 series.

Bart
Sekhar Nori Feb. 8, 2019, 12:29 p.m. UTC | #6
On 08/02/19 5:57 PM, Bartosz Golaszewski wrote:
> pt., 8 lut 2019 o 12:43 Sekhar Nori <nsekhar@ti.com> napisał(a):
>>
>> On 05/02/19 9:41 PM, Bartosz Golaszewski wrote:
>>> pon., 4 lut 2019 o 22:49 David Lechner <david@lechnology.com> napisał(a):
>>>>
>>>> On 1/31/19 7:38 AM, Bartosz Golaszewski wrote:
>>>>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>>>>
>>>>> This series ports the davinci platform to using SPARSE_IRQ, cleans up
>>>>> the irqchip drivers and moves them over to drivers/irqchip.
>>>>>
>>>>
>>>> This has been on my todo list for years, but I've never had enough
>>>> time to figure it out. Nice to see it finally getting done!
>>>>
>>>> Series tested on LEGO MINDSTORMS EV3 (da850-like). I can now use
>>>> IIO triggers without having to patch the kernel to add extra
>>>> interrupts.
>>>>
>>>> Tested-by: David Lechner <david@lechnology.com>
>>>>
>>>>
>>>
>>> Wow thanks for taking the time to review it!
>>>
>>> I'll address certain remarks - for those unaddressed - I'll fix them in v2.
>>>
>>> Sekhar: are you fine with sending both the clocksource and interrupt
>>> series together next time with additional patches on top making
>>> davinci part of multi_v5_defconfig?
>>
>> I think its better to keep them separate. You can base both on latest
>> mainline.
>>
>> Thanks,
>> Sekhar
> 
> If you prefer I can keep them separate, although there were a couple
> conflicts when I merged them in my tree, which are now resolved.
> 
> Let's maybe start with the interrupts (I'll send a v2 tonight if you
> don't have any more comments), and once you have that in your tree, I
> will rebase the timer code and then the multi_v5 series.

Sounds good. I have no more comments on the interrupt series. We will
need acks from irqchip maintainers before merging though.

Thanks,
Sekhar