lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <af5c5d55-99b8-4de8-9719-c2d76bf2a9c8@microchip.com>
Date: Fri, 9 Feb 2024 09:44:32 +0000
From: <Dharma.B@...rochip.com>
To: <conor@...nel.org>
CC: <tglx@...utronix.de>, <robh+dt@...nel.org>,
	<krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
	<Nicolas.Ferre@...rochip.com>, <alexandre.belloni@...tlin.com>,
	<claudiu.beznea@...on.dev>, <linux-kernel@...r.kernel.org>,
	<devicetree@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] dt-bindings: interrupt-controller: Convert Atmel AIC to
 json-schema

Hi Conor,

On 09/02/24 4:40 am, Conor Dooley wrote:
> Hey Dharma,
> 
> Overall this looks alright, but I have a few comments for you.
> 
> On Thu, Feb 08, 2024 at 02:50:15PM +0530, Dharma Balasubiramani wrote:
> 
>> diff --git a/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.yaml b/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.yaml
>> new file mode 100644
>> index 000000000000..396eac53da3a
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.yaml
>> @@ -0,0 +1,88 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id:http://devicetree.org/schemas/interrupt-controller/atmel,aic.yaml#
>> +$schema:http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Advanced Interrupt Controller (AIC)
>> +
>> +maintainers:
>> +  - Nicolas Ferre<nicolas.ferre@...rochip.com>
>> +  - Dharma balasubiramani<dharma.b@...rochip.com>
>> +
>> +description: |
> The chomping operator, |, is not needed here as you have no formatting
> to preserve.

I missed it again, I will fix it.
> 
>> +  The Advanced Interrupt Controller (AIC) is an 8-level priority, individually
>> +  maskable, vectored interrupt controller providing handling of up to one
>> +  hundred and twenty-eight interrupt sources.
>> It is designed to substantially
>> +  reduce the software and real-time overhead in handling internal and external
>> +  interrupts.
> This reeks of a marketing statement and should be removed IMO.

Noted. I will remove it.
> 
>> +allOf:
>> +  - $ref: /schemas/interrupt-controller.yaml#
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - atmel,at91rm9200-aic
>> +      - atmel,sama5d2-aic
>> +      - atmel,sama5d3-aic
>> +      - atmel,sama5d4-aic
>> +      - microchip,sam9x60-aic
>> +
>> +  interrupt-controller: true
>> +
>> +  "#interrupt-cells":
>> +    const: 3
>> +    description: |
>> +      The 1st cell is the IRQ number (Peripheral IDentifier on datasheet).
>> +      The 2nd cell specifies flags:
>> +        bits[3:0] trigger type and level flags:
>> +          1 = low-to-high edge triggered.
>> +          2 = high-to-low edge triggered.
>> +          4 = active high level-sensitive.
>> +          8 = active low level-sensitive.
>> +        Valid combinations: 1, 2, 3, 4, 8.
> Shame that these are not aligned with the IRQ_TYPE defines 🙁
> 
>> +        Default for internal sources: 4 (active high).
>> +      The 3rd cell specifies irq priority from 0 (lowest) to 7 (highest).
>> +
>> +  interrupts:
>> +    description: Interrupt source of the parent interrupt controller.
> Drop the description, it's obvious.

Sure.
> 
>> +    maxItems: 1
>> +
>> +  reg:
> A nit, but I would put reg after compatible.

Sure.
> 
>> +    description: Specifies base physical address(s) and size of the AIC registers.
> Same here.

Sure, I will drop the description.
> 
>> +    maxItems: 1
>> +
>> +  atmel,external-irqs:
>> +    $ref: /schemas/types.yaml#/definitions/uint32-array
>> +    description: u32 array of external irqs.
>> +
>> +required:
>> +  - compatible
>> +  - interrupt-controller
>> +  - "#interrupt-cells"
>> +  - reg
> A nit, but I would put reg after compatible

Sure.
> 
>> +  - atmel,external-irqs
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    /* AIC */
> Drop the comment, its obvious.

Sure, I will drop it
> 
>> +    aic: interrupt-controller@...ff000 {
> The node name here is not used, drop it.

Sure, I will drop the aic and use just interrupt-controller@...ff000.
> 
>> +      compatible = "atmel,at91rm9200-aic";
>> +      interrupt-controller;
>> +      #interrupt-cells = <3>;
>> +      reg = <0xfffff000 0x200>;
>> +      atmel,external-irqs = <31>;
>> +    };
>> +
>> +  - |
>> +    /* An interrupt generating device that is wired to an AIC. */
>> +    dma: dma-controller@...fec00 {
>> +      compatible = "atmel,at91sam9g45-dma";
>> +      #dma-cells = <2>;
>> +      reg = <0xffffec00 0x200>;
>> +      interrupts = <21 4 5>;
>> +    };
> And delete this whole example 🙂

Sure, I will delete this example.
> 
> Cheers,
> Conor.
> 

-- 
With Best Regards,
Dharma B.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ