foss-for-synopsys-dwc-arc-processors/linux

How to setup uart IRQ mask by specific memory address ?

joshualin-petaio opened this issue · 4 comments

Hi,

Does there have suitable method to add uart mask setup process in linux kernel ? Because our uart have additional IRQ mask need to set. This IRQ mask not in uart register set. It is in a specific memory address. So, how can I add this setup process in linux kernel ?

Thanks, Joshua

@joshualin-petaio could you please be a bit more specific on which particular feature of which peripheral you're talking about?
Is that related to Synopsys DesignWare APB UART and some of its registers or it's about something else?

Hi Alexey,

Thank you for your reply.
My question is there has an additional IRQ mask register outside the uart setting register: "uart0: serial@ac002000" in device tree. The IRQ mask is at address 0xafe00024. It seems can't not use kernel uart driver directly.
I found it seems can setup in additional platform.c like platform.c under /arch/arc/plat-hsdk. Is this an appropriate method ?

Thanks, Joshua

@joshualin-petaio if that "mask register" is indeed not a part of UART IP block then you have 2 options:

  1. Do a one-time setting in your platform code. Note, "arch/arc/plat-hsdk" is only meant to be used for ARC HSDK board, and for your platform or board you should use your own files and folders to not get in trouble due to settings done in code which are not compatible with your own platform.
  2. Add a separate device in your device tree, like an intermediate interrupt controller and handle its settings accordingly.

Hi Alexey,

I tried the method 1 and it works fine on our FPGA. Thank you very much for you suggestions.

Thanks, Joshua