Re: [PATCH v3 00/28] Add support for QMC HDLC, framer infrastruture and PEF2256 framer

2023-08-11 Thread Christophe Leroy


Le 10/08/2023 à 17:47, Jakub Kicinski a écrit :
> On Wed,  9 Aug 2023 15:27:27 +0200 Herve Codina wrote:
>> The series contains the full story and detailed modifications.
>> If needed, the series can be split and/or commmits can be squashed.
>> Let me know.
> 
> Are there any dependencies in one of the -next trees?
> As it the series doesn't seem to build on top of net-next
> with allmodconfig.

As far as I know there are not dependencies, this series was tests on 
top of 6.5-rc2.

However it looks like it has never been built with CONFIG_MODULES 
enabled. As Hervé is AFK at the moment, I'll see if I can give it a fix.

Christophe


Re: [PATCH v3 00/28] Add support for QMC HDLC, framer infrastruture and PEF2256 framer

2023-08-10 Thread Jakub Kicinski
On Wed,  9 Aug 2023 15:27:27 +0200 Herve Codina wrote:
> The series contains the full story and detailed modifications.
> If needed, the series can be split and/or commmits can be squashed.
> Let me know.

Are there any dependencies in one of the -next trees?
As it the series doesn't seem to build on top of net-next 
with allmodconfig.


[PATCH v3 00/28] Add support for QMC HDLC, framer infrastruture and PEF2256 framer

2023-08-09 Thread Herve Codina
Hi,

I have a system where I need to handle an HDLC interface and some audio
data.

The HDLC data are transferred using a TDM bus on which a PEF2256
(E1/T1 framer) is present. The PEF2256 transfers data from/to the TDM
bus to/from the E1 line. This PEF2256 is connected to a PowerQUICC SoC
for the control path and the TDM is connected to the SoC (QMC component)
for the data path.

>From the QMC HDLC driver, I need to handle HDLC data using the QMC,
carrier detection using the PEF2256 (E1 line carrier) and set/get some
PEF2256 configuration.

The QMC HDLC driver considers the PEF2256 as a generic framer.
It performs operations that involve the PEF2256 through the generic
framer API.

The audio data are exchanged with the PEF2256 using a CPU DAI connected
to the TDM bus through the QMC and the PEF2256 needs to be seen as a
codec in order to be linked to the CPU DAI.
The codec handles the carrier detection using the PEF2256 and reports
the carrier state to the ALSA subsystem using the ASoC jack detection.

The codec, even if instantiated by the PEF2256 driver, considers the
PEF2256 as a generic framer.

The generic framer has:
 - 2 consumers (QMC HDLC drv and codec)
 - 1 provider (PEF2256)

So, the design is the following:
+--+   +-+
| QMC  | <- TDM -> | PEF2256 | <-> E1
 +-+|  +-+ |   | |
 | CPU DAI | <-data--> | QMC channel | |   | |
 +-+|  +-+ |   | |
+--+|  +-+ |   | |
| QMC HDLC drv | <-data--> | QMC channel | |   | |
+--+|  +-+ |   | |
 ^  +--+   | |
 |   ++ +-+| |
 +-> | framer | <-> | PEF2256 drv | <- local bus ->| |
 || | |+-+
 +-> || | |
 |   ++ |  +---+  |
 +---> | codec |  |
|  +---+  |
+-+

Further more, the TDM timeslots used by the QMC HDLC driver need to be
configured at runtime (QMC dynamic timeslots).

Several weeks ago, I sent two series related to this topic:
 - Add the Lantiq PEF2256 audio support [1]
 - RFC Add support for QMC HDLC and PHY [2]
This current series is a rework of these two series taking into account
feedbacks previously received.

In order to implement all of this, I do the following:
 1) Perform some fixes (patches 1, 2, 3, 4)
 2) Introduce the QMC HDLC driver (patches 5, 6, 7)
 3) Add QMC dynamic timeslot support (patches 8 - 18)
 4) Add timeslots change support in QMC HDLC (patch 19)
 5) Introduce framer infrastructure (patch 20)
 6) Add PEF2256 framer provider (patches 11, 22, 23, 24, 25)
 7) Add framer codec as a framer consumer (patch 26)
 8) Add framer support as a framer consumer in QMC HDLC (patch 27, 28)

The series contains the full story and detailed modifications.
If needed, the series can be split and/or commmits can be squashed.
Let me know.

Compare to the previous iteration
  
https://lore.kernel.org/linux-kernel/20230726150225.483464-1-herve.cod...@bootlin.com/
This v3 series mainly:
 - Fixes some implementation details.
 - Adds a new patch (patch 5) to remove existing inline keyword in the
   QMC driver.
 - Squashes patches related to the QMC HDLC binding together.

Best regards,
Hervé

[1]: 
https://lore.kernel.org/all/20230417171601.74656-1-herve.cod...@bootlin.com/
[2]: 
https://lore.kernel.org/all/20230323103154.264546-1-herve.cod...@bootlin.com/

Changes v2 -> v3

  - Patches 1, 2, 3, 4
Add 'Reviewed-by: Christophe Leroy '

  - New patch
Remove inline keyword from the existing registers accessors helpers

  - Patch 6 (patches 5, 27 in v2)
Update the binding title
Squash patch 27

  - Patch 7 (patch 6 in v2)
Remove the cast in netdev_to_qmc_hdlc()
Add 'Reviewed-by: Christophe Leroy '

  - Patch 8 (patch 7 in v2): No change

  - Patches 9, 10 (patches 8, 9 in v2)
Add 'Reviewed-by: Christophe Leroy '

  - Patch 11 (patch 10 in v2)
Remove inline keyword from the introduced qmc_clrsetbits16() helper
Add 'Reviewed-by: Christophe Leroy '

  - Patches 12, 13, 14, 15, 16, 17, 18, 19, 20
Add 'Reviewed-by: Christophe Leroy '

  - Patch 21 (patch 20 in v2)
Remove unneeded framer NULL pointer check
Add 'Reviewed-by: Christophe Leroy '

  - Patch 22 (patch 21 in v2)
Change sclkr and sclkx clocks description
Remove the framer phandle property from the framer subnodes
(ie. from framer-codec nodes)

  - Patch 23 (patch 22 in v2)
Initialize 'disabled' variable at declaration
Fix commit log
Add 'Reviewed-by: Christophe Leroy '

  - Patch 24 (patch 23 in v2)
Remove inline keyword