LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/3] UCC TDM driver for MPC83xx platforms 
@ 2007-12-10 11:53 Aggrwal Poonam
  2008-01-11  4:41 ` Aggrwal Poonam
  2008-01-11  4:54 ` Aggrwal Poonam
  0 siblings, 2 replies; 11+ messages in thread
From: Aggrwal Poonam @ 2007-12-10 11:53 UTC (permalink / raw)
  To: rubini, linux-ppcdev, netdev, linux-kernel, Gala Kumar
  Cc: Barkowski Michael, Phillips Kim, Kalra Ashish, Cutler Richard

There are three patches
[PATCH 1/3] drivers/misc : UCC TDM driver for mpc83xx platforms. This
driver is usable in VoIP iind of applications to interface with SLIC
kind of devices to exchange TDM voice samples.

[PATCH 2/3] arch/ : Platform changes
- device tree entries for UCC TDM driver for MPC8323ERDB platform.
- QE changes related to TDM , like,
	 1) Modified ucc_fast_init so that it can be used by fast UCC
based TDM driver. Mainly changes have been made to configure TDM clocks
and Fsyncs.

	2) Modified get_brg_clk so that it can return the input frequncy
and input source of any BRG by reading the corresponding entries from
device tree.

	3) Added new nodes brg and clocks in the device tree which
represent input clocks for different BRGs.

	4) Modified qe_setbrg accordingly.
- new device tree entries added for "clocks" and "brg"

[PATCH 3/3] Documentation
- Modified Documentation to explain the device tree entries related to
UCC TDM driver and the new nodes added("clocks" and "brg")

The patch applies over a merge of galak's for-2.6.25 plus for-2.6.24
plus of_doc_update branches.
In brief the steps were
git clone
git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git
powerpc-galak git checkout -b for-2.6.25 origin/for-2.6.25 git checkout
-b for-2.6.24 origin/for-2.6.24 git checkout -b of_doc_update
origin/of_doc_update
git pull . for-2.6.24    # merge the other two
git pull . for-2.6.25 
git checkout -b tdm      # clean slate for tdm rebase work

Also after applying the patches changes have to be made corresponding to
Tabi's patch "qe: add function qe_clock_source".

The driver has been tested with a VoIP stack and application on
MPC8323ERDB.

With Regards
Poonam 
 
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE:  [PATCH 0/3] UCC TDM driver for MPC83xx platforms 
  2007-12-10 11:53 [PATCH 0/3] UCC TDM driver for MPC83xx platforms Aggrwal Poonam
@ 2008-01-11  4:41 ` Aggrwal Poonam
  2008-01-14 18:00   ` Kim Phillips
  2008-01-11  4:54 ` Aggrwal Poonam
  1 sibling, 1 reply; 11+ messages in thread
From: Aggrwal Poonam @ 2008-01-11  4:41 UTC (permalink / raw)
  To: sfr, rubini, linux-ppcdev, netdev, linux-kernel, Gala Kumar
  Cc: Barkowski Michael, Phillips Kim, Kalra Ashish, Cutler Richard,
	Aggrwal Poonam

Hello  All

I am waiting for more feedback on the patches.

If there are no objections please consider them for 2.6.25.

With Regards
Poonam 
 
 

-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org]
On Behalf Of Aggrwal Poonam
Sent: Monday, December 10, 2007 5:23 PM
To: rubini@vision.unipv.it; linux-ppcdev@ozlabs.kernel.org;
netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Gala Kumar
Cc: Barkowski Michael; Phillips Kim; Kalra Ashish; Cutler Richard
Subject: [PATCH 0/3] UCC TDM driver for MPC83xx platforms 

There are three patches
[PATCH 1/3] drivers/misc : UCC TDM driver for mpc83xx platforms. This
driver is usable in VoIP iind of applications to interface with SLIC
kind of devices to exchange TDM voice samples.

[PATCH 2/3] arch/ : Platform changes
- device tree entries for UCC TDM driver for MPC8323ERDB platform.
- QE changes related to TDM , like,
	 1) Modified ucc_fast_init so that it can be used by fast UCC
based TDM driver. Mainly changes have been made to configure TDM clocks
and Fsyncs.

	2) Modified get_brg_clk so that it can return the input frequncy
and input source of any BRG by reading the corresponding entries from
device tree.

	3) Added new nodes brg and clocks in the device tree which
represent input clocks for different BRGs.

	4) Modified qe_setbrg accordingly.
- new device tree entries added for "clocks" and "brg"

[PATCH 3/3] Documentation
- Modified Documentation to explain the device tree entries related to
UCC TDM driver and the new nodes added("clocks" and "brg")

The patch applies over a merge of galak's for-2.6.25 plus for-2.6.24
plus of_doc_update branches.
In brief the steps were
git clone
git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git
powerpc-galak git checkout -b for-2.6.25 origin/for-2.6.25 git checkout
-b for-2.6.24 origin/for-2.6.24 git checkout -b of_doc_update
origin/of_doc_update
git pull . for-2.6.24    # merge the other two
git pull . for-2.6.25 
git checkout -b tdm      # clean slate for tdm rebase work

Also after applying the patches changes have to be made corresponding to
Tabi's patch "qe: add function qe_clock_source".

The driver has been tested with a VoIP stack and application on
MPC8323ERDB.

With Regards
Poonam 
 
 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the
body of a message to majordomo@vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE:  [PATCH 0/3] UCC TDM driver for MPC83xx platforms 
  2007-12-10 11:53 [PATCH 0/3] UCC TDM driver for MPC83xx platforms Aggrwal Poonam
  2008-01-11  4:41 ` Aggrwal Poonam
@ 2008-01-11  4:54 ` Aggrwal Poonam
  1 sibling, 0 replies; 11+ messages in thread
From: Aggrwal Poonam @ 2008-01-11  4:54 UTC (permalink / raw)
  To: Aggrwal Poonam, sfr, rubini, linux-ppcdev, netdev, linux-kernel,
	Gala Kumar
  Cc: Barkowski Michael, Phillips Kim, Kalra Ashish, Cutler Richard

 
Hello  All

I am waiting for more feedback on the patches.

If there are no objections please consider them for 2.6.25.

With Regards
Poonam 
 
 

-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org]
On Behalf Of Aggrwal Poonam
Sent: Monday, December 10, 2007 5:23 PM
To: rubini@vision.unipv.it; linux-ppcdev@ozlabs.kernel.org;
netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Gala Kumar
Cc: Barkowski Michael; Phillips Kim; Kalra Ashish; Cutler Richard
Subject: [PATCH 0/3] UCC TDM driver for MPC83xx platforms 

There are three patches
[PATCH 1/3] drivers/misc : UCC TDM driver for mpc83xx platforms. This
driver is usable in VoIP iind of applications to interface with SLIC
kind of devices to exchange TDM voice samples.

[PATCH 2/3] arch/ : Platform changes
- device tree entries for UCC TDM driver for MPC8323ERDB platform.
- QE changes related to TDM , like,
	 1) Modified ucc_fast_init so that it can be used by fast UCC
based TDM driver. Mainly changes have been made to configure TDM clocks
and Fsyncs.

	2) Modified get_brg_clk so that it can return the input frequncy
and input source of any BRG by reading the corresponding entries from
device tree.

	3) Added new nodes brg and clocks in the device tree which
represent input clocks for different BRGs.

	4) Modified qe_setbrg accordingly.
- new device tree entries added for "clocks" and "brg"

[PATCH 3/3] Documentation
- Modified Documentation to explain the device tree entries related to
UCC TDM driver and the new nodes added("clocks" and "brg")

The patch applies over a merge of galak's for-2.6.25 plus for-2.6.24
plus of_doc_update branches.
In brief the steps were
git clone
git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git
powerpc-galak git checkout -b for-2.6.25 origin/for-2.6.25 git checkout
-b for-2.6.24 origin/for-2.6.24 git checkout -b of_doc_update
origin/of_doc_update
git pull . for-2.6.24    # merge the other two
git pull . for-2.6.25 
git checkout -b tdm      # clean slate for tdm rebase work

Also after applying the patches changes have to be made corresponding to
Tabi's patch "qe: add function qe_clock_source".

The driver has been tested with a VoIP stack and application on
MPC8323ERDB.

With Regards
Poonam 
 
 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the
body of a message to majordomo@vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/3] UCC TDM driver for MPC83xx platforms
  2008-01-11  4:41 ` Aggrwal Poonam
@ 2008-01-14 18:00   ` Kim Phillips
  2008-01-14 21:15     ` Andrew Morton
  0 siblings, 1 reply; 11+ messages in thread
From: Kim Phillips @ 2008-01-14 18:00 UTC (permalink / raw)
  To: Aggrwal Poonam, Andrew Morton
  Cc: sfr, rubini, linux-ppcdev, netdev, linux-kernel, Gala Kumar,
	Barkowski Michael, Kalra Ashish, Cutler Richard

On Thu, 10 Jan 2008 21:41:20 -0700
"Aggrwal Poonam" <Poonam.Aggrwal@freescale.com> wrote:

> Hello  All
> 
> I am waiting for more feedback on the patches.
> 
> If there are no objections please consider them for 2.6.25.
> 
if this isn't going to go through Alessandro Rubini/misc drivers, can
it go through the akpm/mm tree?

Kim

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/3] UCC TDM driver for MPC83xx platforms
  2008-01-14 18:00   ` Kim Phillips
@ 2008-01-14 21:15     ` Andrew Morton
  2008-01-15  3:31       ` Kumar Gala
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Morton @ 2008-01-14 21:15 UTC (permalink / raw)
  To: Kim Phillips
  Cc: Poonam.Aggrwal, sfr, rubini, linux-ppcdev, netdev, linux-kernel,
	kumar.gala, Michael.Barkowski, ashish.kalra, Rich.Cutler

On Mon, 14 Jan 2008 12:00:51 -0600
Kim Phillips <kim.phillips@freescale.com> wrote:

> On Thu, 10 Jan 2008 21:41:20 -0700
> "Aggrwal Poonam" <Poonam.Aggrwal@freescale.com> wrote:
> 
> > Hello  All
> > 
> > I am waiting for more feedback on the patches.
> > 
> > If there are no objections please consider them for 2.6.25.
> > 
> if this isn't going to go through Alessandro Rubini/misc drivers, can
> it go through the akpm/mm tree?
> 

That would work.  But it might be more appropriate to go Kumar->paulus->Linus.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/3] UCC TDM driver for MPC83xx platforms
  2008-01-14 21:15     ` Andrew Morton
@ 2008-01-15  3:31       ` Kumar Gala
  2008-01-15 12:05         ` Aggrwal Poonam
                           ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Kumar Gala @ 2008-01-15  3:31 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Kim Phillips, Poonam.Aggrwal, sfr, rubini, linux-ppcdev, netdev,
	linux-kernel, Michael.Barkowski, ashish.kalra, Rich.Cutler


On Jan 14, 2008, at 3:15 PM, Andrew Morton wrote:

> On Mon, 14 Jan 2008 12:00:51 -0600
> Kim Phillips <kim.phillips@freescale.com> wrote:
>
>> On Thu, 10 Jan 2008 21:41:20 -0700
>> "Aggrwal Poonam" <Poonam.Aggrwal@freescale.com> wrote:
>>
>>> Hello  All
>>>
>>> I am waiting for more feedback on the patches.
>>>
>>> If there are no objections please consider them for 2.6.25.
>>>
>> if this isn't going to go through Alessandro Rubini/misc drivers, can
>> it go through the akpm/mm tree?
>>
>
> That would work.  But it might be more appropriate to go Kumar- 
> >paulus->Linus.

I'm ok w/taking the arch/powerpc bits, but I"m a bit concerned about  
the driver itself.  I'm wondering if we need a TDM framework in the  
kernel.

I guess if Poonam could possibly describe how this driver is actually  
used that would be helpful.  I see we have 8315 with a discrete TDM  
block and I'm guessing 82xx/85xx based CPM parts of some form of TDM  
as well.

- k

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH 0/3] UCC TDM driver for MPC83xx platforms
  2008-01-15  3:31       ` Kumar Gala
@ 2008-01-15 12:05         ` Aggrwal Poonam
  2008-01-16 11:47         ` Kalra Ashish
  2008-01-18 11:58         ` Aggrwal Poonam
  2 siblings, 0 replies; 11+ messages in thread
From: Aggrwal Poonam @ 2008-01-15 12:05 UTC (permalink / raw)
  To: Kumar Gala, Andrew Morton
  Cc: Phillips Kim, sfr, rubini, linux-ppcdev, netdev, linux-kernel,
	Barkowski Michael, Kalra Ashish, Cutler Richard, Suresh PV

Thanks Kumar/Morton/Kim

I shall make a small paragraph which describes the TDM driver
architecture and the interfaces it exposes.

As far as 8315 TDM is concerned it is a non QE driver and quite
different from this except for the functionality and external interface
it exposes.

Right now TDM is not a full-fledged bus driver which probably can be
done may be very similar to SPI.

Please give your suggestions on this.

With Regards
Poonam 
 
 

-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org] 
Sent: Tuesday, January 15, 2008 9:01 AM
To: Andrew Morton
Cc: Phillips Kim; Aggrwal Poonam; sfr@canb.auug.org.au;
rubini@vision.unipv.it; linux-ppcdev@ozlabs.kernel.org;
netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Barkowski Michael;
Kalra Ashish; Cutler Richard
Subject: Re: [PATCH 0/3] UCC TDM driver for MPC83xx platforms


On Jan 14, 2008, at 3:15 PM, Andrew Morton wrote:

> On Mon, 14 Jan 2008 12:00:51 -0600
> Kim Phillips <kim.phillips@freescale.com> wrote:
>
>> On Thu, 10 Jan 2008 21:41:20 -0700
>> "Aggrwal Poonam" <Poonam.Aggrwal@freescale.com> wrote:
>>
>>> Hello  All
>>>
>>> I am waiting for more feedback on the patches.
>>>
>>> If there are no objections please consider them for 2.6.25.
>>>
>> if this isn't going to go through Alessandro Rubini/misc drivers, can

>> it go through the akpm/mm tree?
>>
>
> That would work.  But it might be more appropriate to go Kumar-
> >paulus->Linus.

I'm ok w/taking the arch/powerpc bits, but I"m a bit concerned about  
the driver itself.  I'm wondering if we need a TDM framework in the  
kernel.

I guess if Poonam could possibly describe how this driver is actually  
used that would be helpful.  I see we have 8315 with a discrete TDM  
block and I'm guessing 82xx/85xx based CPM parts of some form of TDM  
as well.

- k

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH 0/3] UCC TDM driver for MPC83xx platforms
  2008-01-15  3:31       ` Kumar Gala
  2008-01-15 12:05         ` Aggrwal Poonam
@ 2008-01-16 11:47         ` Kalra Ashish
  2008-01-18 11:58         ` Aggrwal Poonam
  2 siblings, 0 replies; 11+ messages in thread
From: Kalra Ashish @ 2008-01-16 11:47 UTC (permalink / raw)
  To: Kumar Gala, Andrew Morton
  Cc: Phillips Kim, Aggrwal Poonam, sfr, rubini, linux-ppcdev, netdev,
	linux-kernel, Barkowski Michael, Cutler Richard, Kalra Ashish,
	Suresh PV

Hello All,
 
I am sure that the TDM bus driver model/framework will make us put a lot
more programming effort without
any assurance of the code being accepted by the Linux community,
especially as there are many
Telephony/VoIP stack implementations in Linux such as the Sangoma
WANPIPE Kernel suite which
have their own Zaptel TDM (channelized zero-copy) interface layer. There
are other High Speed serial (HSS)
API interfaces, again supporting channelized and/or prioritized API
interfaces. All these implementations 
are proprietary and have their own tightly coupled upper layers and
hardware abstraction layers. It is
difficult to predict that these stacks will move towards a generic TDM
bus driver interface. Therefore, i think
we can have our own tightly coupled interface with our VoIP framework
and let us the keep the driver as it is,
i.e., as a misc driver.

Ashish

-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org] 
Sent: Tuesday, January 15, 2008 9:01 AM
To: Andrew Morton
Cc: Phillips Kim; Aggrwal Poonam; sfr@canb.auug.org.au;
rubini@vision.unipv.it; linux-ppcdev@ozlabs.kernel.org;
netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Barkowski Michael;
Kalra Ashish; Cutler Richard
Subject: Re: [PATCH 0/3] UCC TDM driver for MPC83xx platforms


On Jan 14, 2008, at 3:15 PM, Andrew Morton wrote:

> On Mon, 14 Jan 2008 12:00:51 -0600
> Kim Phillips <kim.phillips@freescale.com> wrote:
>
>> On Thu, 10 Jan 2008 21:41:20 -0700
>> "Aggrwal Poonam" <Poonam.Aggrwal@freescale.com> wrote:
>>
>>> Hello  All
>>>
>>> I am waiting for more feedback on the patches.
>>>
>>> If there are no objections please consider them for 2.6.25.
>>>
>> if this isn't going to go through Alessandro Rubini/misc drivers, can

>> it go through the akpm/mm tree?
>>
>
> That would work.  But it might be more appropriate to go Kumar-
> >paulus->Linus.

I'm ok w/taking the arch/powerpc bits, but I"m a bit concerned about  
the driver itself.  I'm wondering if we need a TDM framework in the  
kernel.

I guess if Poonam could possibly describe how this driver is actually  
used that would be helpful.  I see we have 8315 with a discrete TDM  
block and I'm guessing 82xx/85xx based CPM parts of some form of TDM  
as well.

- k

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH 0/3] UCC TDM driver for MPC83xx platforms
  2008-01-15  3:31       ` Kumar Gala
  2008-01-15 12:05         ` Aggrwal Poonam
  2008-01-16 11:47         ` Kalra Ashish
@ 2008-01-18 11:58         ` Aggrwal Poonam
  2008-01-18 12:18           ` Joakim Tjernlund
  2 siblings, 1 reply; 11+ messages in thread
From: Aggrwal Poonam @ 2008-01-18 11:58 UTC (permalink / raw)
  To: Kumar Gala, Andrew Morton
  Cc: Phillips Kim, sfr, rubini, linuxppc-dev, netdev, linux-kernel,
	Barkowski Michael, Kalra Ashish, Cutler Richard, Suresh PV

Hello All

The TDM driver just now does not have a proper framework. Probably the
interface cannot be generalised as such. Hence we could not decide
whether it would be right to think of a TDM framework. Infact the
interface this TDM driver(for MPC8323ERDB) supplies may not be usable
for some other client as such. Please suggest on this.

But you are right as far as Freescale PowerPC platforms are concerned
which have TDM devices. Like, 8315 also has a TDM driver which also
exposes similar interface as 8323 because the client it is talking to is
the same.

Following is the small description of the TDM driver along with
interface details:

The dts file keeps a track of the TDM devices present on the board.
Depending on them the TDM driver initializes those many driver instances
while coming up.

The driver on the upper level can plug to more than one tdm clients
depending on the availablity  of TDM devices. At every new request of
the TDM client to bind with a TDM device, a free driver  instance is
allocated to the client.

The interface can be described as follows.

tdm_register_client(struct tdm_client *)
	This API returns a pointer to the structure tdm_client which is
of type
	struct tdm_client {
                u32 driver_handle;
                u32 (*tdm_read)(u32 driver_handle, short chn_id, short
*pcm_buffer, short len);
                u32 (*tdm_write)(u32 driver_handle, short chn_id, short
*pcm_buffer, short len);
                wait_queue_head_t *wakeup_event;
        }

   It consists of:
   - driver_handle: It is basically to identify the particular TDM
device/driver instance.
   - tdm_read: It is a function pointer returned by the TDM driver to be
used to read TDM data  form a particular TDM channel.
   - tdm_write: It is a function pointer returned by the TDM driver to
be used to write TDM data  to a particular TDM channel.
   - wakeup_event: It is address of a wait_queue event on which the
client keeps on sleeping,  and the TDM driver wakes it up periodically.
The driver is configured to wake up the client  after every 10ms.

Once the TDM client gets registered to a TDM driver instance and a TDM
device, it interfaces  with the driver using tdm_read, tdm_write and
wakeup_event.

Note: The TDM driver can be used by only kernel level modules. The
driver does not expose any  file interface for User Applications. Can be
compared to the spi driver which interfaces with  the SPI clients
through some APIs.


I need your feedback on the interface details. Some changes were
suggested by Andrew for 32 bit tdm handle which I will modify.(Thanks
Andrew)

Please give your ideas about a TDM framework in the kernel and the
interface.

Waiting for your feedback.

Thanks and Regards
Poonam 
 
 

-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org] 
Sent: Tuesday, January 15, 2008 9:01 AM
To: Andrew Morton
Cc: Phillips Kim; Aggrwal Poonam; sfr@canb.auug.org.au;
rubini@vision.unipv.it; linux-ppcdev@ozlabs.kernel.org;
netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Barkowski Michael;
Kalra Ashish; Cutler Richard
Subject: Re: [PATCH 0/3] UCC TDM driver for MPC83xx platforms


On Jan 14, 2008, at 3:15 PM, Andrew Morton wrote:

> On Mon, 14 Jan 2008 12:00:51 -0600
> Kim Phillips <kim.phillips@freescale.com> wrote:
>
>> On Thu, 10 Jan 2008 21:41:20 -0700
>> "Aggrwal Poonam" <Poonam.Aggrwal@freescale.com> wrote:
>>
>>> Hello  All
>>>
>>> I am waiting for more feedback on the patches.
>>>
>>> If there are no objections please consider them for 2.6.25.
>>>
>> if this isn't going to go through Alessandro Rubini/misc drivers, can

>> it go through the akpm/mm tree?
>>
>
> That would work.  But it might be more appropriate to go Kumar-
> >paulus->Linus.

I'm ok w/taking the arch/powerpc bits, but I"m a bit concerned about  
the driver itself.  I'm wondering if we need a TDM framework in the  
kernel.

I guess if Poonam could possibly describe how this driver is actually  
used that would be helpful.  I see we have 8315 with a discrete TDM  
block and I'm guessing 82xx/85xx based CPM parts of some form of TDM  
as well.

- k

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH 0/3] UCC TDM driver for MPC83xx platforms
  2008-01-18 11:58         ` Aggrwal Poonam
@ 2008-01-18 12:18           ` Joakim Tjernlund
  0 siblings, 0 replies; 11+ messages in thread
From: Joakim Tjernlund @ 2008-01-18 12:18 UTC (permalink / raw)
  To: Aggrwal Poonam
  Cc: Kumar Gala, Andrew Morton, sfr, Phillips Kim, Barkowski Michael,
	netdev, Suresh PV, linux-kernel, rubini, linuxppc-dev,
	Kalra Ashish, Cutler Richard


On Fri, 2008-01-18 at 17:28 +0530, Aggrwal Poonam wrote:
> Hello All
> 
> The TDM driver just now does not have a proper framework. Probably the
> interface cannot be generalised as such. Hence we could not decide
> whether it would be right to think of a TDM framework. Infact the
> interface this TDM driver(for MPC8323ERDB) supplies may not be usable
> for some other client as such. Please suggest on this.
> 
> But you are right as far as Freescale PowerPC platforms are concerned
> which have TDM devices. Like, 8315 also has a TDM driver which also
> exposes similar interface as 8323 because the client it is talking to is
> the same.
> 
> Following is the small description of the TDM driver along with
> interface details:
> 
> The dts file keeps a track of the TDM devices present on the board.
> Depending on them the TDM driver initializes those many driver instances
> while coming up.
> 
> The driver on the upper level can plug to more than one tdm clients
> depending on the availablity  of TDM devices. At every new request of
> the TDM client to bind with a TDM device, a free driver  instance is
> allocated to the client.
> 
> The interface can be described as follows.
> 
> tdm_register_client(struct tdm_client *)
> 	This API returns a pointer to the structure tdm_client which is
> of type
> 	struct tdm_client {
>                 u32 driver_handle;
>                 u32 (*tdm_read)(u32 driver_handle, short chn_id, short
> *pcm_buffer, short len);
>                 u32 (*tdm_write)(u32 driver_handle, short chn_id, short
> *pcm_buffer, short len);
>                 wait_queue_head_t *wakeup_event;
>         }
> 
>    It consists of:
>    - driver_handle: It is basically to identify the particular TDM
> device/driver instance.
>    - tdm_read: It is a function pointer returned by the TDM driver to be
> used to read TDM data  form a particular TDM channel.
>    - tdm_write: It is a function pointer returned by the TDM driver to
> be used to write TDM data  to a particular TDM channel.
>    - wakeup_event: It is address of a wait_queue event on which the
> client keeps on sleeping,  and the TDM driver wakes it up periodically.
> The driver is configured to wake up the client  after every 10ms.
> 
> Once the TDM client gets registered to a TDM driver instance and a TDM
> device, it interfaces  with the driver using tdm_read, tdm_write and
> wakeup_event.
> 
> Note: The TDM driver can be used by only kernel level modules. The
> driver does not expose any  file interface for User Applications. Can be
> compared to the spi driver which interfaces with  the SPI clients
> through some APIs.
> 
> 
> I need your feedback on the interface details. Some changes were
> suggested by Andrew for 32 bit tdm handle which I will modify.(Thanks
> Andrew)
> 
> Please give your ideas about a TDM framework in the kernel and the
> interface.
> 
> Waiting for your feedback.
> 
> Thanks and Regards
> Poonam 

Hi Poonam

I may have to write a HDLC over QMC driver for 832x in the near future.
Although I haven't looked at much at the UCCs programming i/f I noticed
that QMC is supposed to run over TDM. Is your TDM driver suitable for
hooking up such a driver on top?

  Jocke



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 0/3] UCC TDM driver for MPC83xx platforms 
@ 2007-12-10 11:40 Aggrwal Poonam
  0 siblings, 0 replies; 11+ messages in thread
From: Aggrwal Poonam @ 2007-12-10 11:40 UTC (permalink / raw)
  To: rubini, linux-kernel, netdev, Gala Kumar
  Cc: Barkowski Michael, Phillips Kim, Kalra Ashish, Cutler Richard


There are three patches
[PATCH 1/3] drivers/misc : UCC TDM driver for mpc83xx platforms. This
driver is usable in VoIP iind of applications to interface with SLIC
kind of devices to exchange TDM voice samples.

[PATCH 2/3] arch/ : Platform changes
- device tree entries for UCC TDM driver for MPC8323ERDB platform.
- QE changes related to TDM , like,
	 1) Modified ucc_fast_init so that it can be used by fast UCC
based TDM driver. Mainly changes have been made to configure TDM clocks
and Fsyncs.

	2) Modified get_brg_clk so that it can return the input frequncy
and input source of any BRG by reading the corresponding entries from
device tree.

	3) Added new nodes brg and clocks in the device tree which
represent input clocks for different BRGs.

	4) Modified qe_setbrg accordingly.
- new device tree entries added for "clocks" and "brg"

[PATCH 3/3] Documentation
- Modified Documentation to explain the device tree entries related to
UCC TDM driver and the new nodes added("clocks" and "brg")

The patch applies over a merge of galak's for-2.6.25 plus for-2.6.24
plus of_doc_update branches.
In brief the steps were
git clone
git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git
powerpc-galak
git checkout -b for-2.6.25 origin/for-2.6.25
git checkout -b for-2.6.24 origin/for-2.6.24
git checkout -b of_doc_update origin/of_doc_update
git pull . for-2.6.24    # merge the other two
git pull . for-2.6.25 
git checkout -b tdm      # clean slate for tdm rebase work

Also after applying the patches changes have to be made corresponding to
Tabi's patch "qe: add function qe_clock_source".

The driver has been tested with a VoIP stack and application on
MPC8323ERDB.

With Regards
Poonam 
 
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-01-18 12:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-10 11:53 [PATCH 0/3] UCC TDM driver for MPC83xx platforms Aggrwal Poonam
2008-01-11  4:41 ` Aggrwal Poonam
2008-01-14 18:00   ` Kim Phillips
2008-01-14 21:15     ` Andrew Morton
2008-01-15  3:31       ` Kumar Gala
2008-01-15 12:05         ` Aggrwal Poonam
2008-01-16 11:47         ` Kalra Ashish
2008-01-18 11:58         ` Aggrwal Poonam
2008-01-18 12:18           ` Joakim Tjernlund
2008-01-11  4:54 ` Aggrwal Poonam
  -- strict thread matches above, loose matches on Subject: below --
2007-12-10 11:40 Aggrwal Poonam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).