linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: devicetree@vger.kernel.org, Paul Walmsley <paul@pwsan.com>,
	linux-kernel@vger.kernel.org, t-kristo@ti.com,
	jarkko.nikula@bitmer.com, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 0/3] ARM: OMAP3: Fix McBSP2/3 hwmod setup for sidetone
Date: Fri, 1 Apr 2016 17:17:53 -0700	[thread overview]
Message-ID: <20160402001753.GR9329@atomide.com> (raw)
In-Reply-To: <56FE407E.9030803@ti.com>

Hi,

* Peter Ujfalusi <peter.ujfalusi@ti.com> [160401 02:34]:
> So what shall we do with the OMAP3 McBSP2/3 sidetone? It has been broken in DT
> boot since the first time we booted OMAP3 with DT... Only in legacy mode we
> can have properly working ST.

Grr.

> I have the second level of patches based on this set (I think I need to resend
> this series since I might have changed it, can not recall) for both arch/arm
> and ASoC to have working ST in legacy and DT boot. We will no longer have
> warning regarding to broken hwmod data in DT boot.
> But all is based on the assumption that we agree at some point that the ST
> block is part of the McBSP module ;)

The sidetone module is a separate target from the McBSP on the interconnect
but there are also direct lines between sidetone and McBSP devices :)
Here's what I'm seeing looking at the AP table on dm3730 hardware.

McBSP target module:
0x49022000, ap 5 06.0, McBSP2
0x49024000, ap 7 08.0, McBSP3

Sidetone target modules:
0x49028000, ap 39 0a.0, mcbsp2_sidetone
0x4902a000, ap 41 12.0, mcbsp3_sidetone

And that seems to match TRM "21.6.4 SIDETONE Register Description",
"Table 2-5. L4-Peripheral Memory Space Mapping", and "Table 9-114. Region
Allocation for L4-Per Interconnect".

> If I need to write separate driver for the McBSP module's ST block, it would
> mean some sort of API between the McBSP and ST driver. This is not straight
> forward since there are registers both in McBSP block and ST block that needs
> to be configured in specific order -> simple enable_st() would not work
> (probably enable_st_stage1(), enable_st_stage2()) and callbacks from McBSP to
> ST, ST to McBSP also going to be needed. As far as I can see it is going to be
> a huge mess.

The McBSP and sidetone don't have parent child relationship at the
interconnect level. So I think the best option would be to have the McBSP
driver implement mcbsp_sidetone_register/unregister() etc functions. That
can then set up the necessary callbacks. Then the sidetone driver can call
them on probe/exit and set up the necessary callbacks and whatever might
be needed.

If they are currently handled in a single driver, you you need to
pm_runtime_get both modules. So having two separate drivers might make
things a lot simpler.

If you don't treat the McBSP and sidetone as separate modules, things can
easily fail. For example, doing a read-back to flush of posted write to
sidetone registers flushes nothing for McBSP and the other way around.

> Other option would be to deprecate the ST support as such, but that would
> leave the n900 guys in trouble as they need ST to be functional...

That does not sound like a nice option at all :(

Regards,

Tony

  reply	other threads:[~2016-04-02  0:17 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18 14:23 [PATCH v2 0/3] ARM: OMAP3: Fix McBSP2/3 hwmod setup for sidetone Peter Ujfalusi
2016-03-18 14:23 ` [PATCH v2 1/3] ARM: DTS: omap3: Remove mcbsp2/3_sidetone hwmod reference for McBSP2/3 Peter Ujfalusi
2016-03-18 14:23 ` [PATCH v2 2/3] ARM: OMAP2+: mcbsp: Prepare the device build code for sidetone hwmod removal Peter Ujfalusi
2016-03-18 14:23 ` [PATCH v2 3/3] ARM: OMAP3: hwmod data: Merge and remove the McBSP sidetone related data Peter Ujfalusi
     [not found] ` <1458311007-19168-1-git-send-email-peter.ujfalusi-l0cyMroinI0@public.gmane.org>
2016-03-19 19:38   ` [PATCH v2 0/3] ARM: OMAP3: Fix McBSP2/3 hwmod setup for sidetone Paul Walmsley
     [not found]     ` <alpine.DEB.2.02.1603191937430.6629-rwI8Ez+7Ko+d5PgPZx9QOdBPR1lH4CV8@public.gmane.org>
2016-03-21  8:57       ` Peter Ujfalusi
2016-03-21 17:44         ` Paul Walmsley
     [not found]           ` <alpine.DEB.2.02.1603211743200.31059-rwI8Ez+7Ko+d5PgPZx9QOdBPR1lH4CV8@public.gmane.org>
2016-04-01  9:33             ` Peter Ujfalusi
2016-04-02  0:17               ` Tony Lindgren [this message]
     [not found]                 ` <20160402001753.GR9329-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-04-04 12:45                   ` Peter Ujfalusi
2016-04-04 15:12                     ` Tony Lindgren
2016-04-05 13:15                       ` Peter Ujfalusi
     [not found]                         ` <5703BA6B.1080208-l0cyMroinI0@public.gmane.org>
2016-04-11 21:28                           ` Tony Lindgren
     [not found]                             ` <20160411212845.GJ5995-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-04-12  9:52                               ` Peter Ujfalusi
2016-04-12 16:37                                 ` Tony Lindgren
2016-04-13 11:57                                   ` Peter Ujfalusi
2016-04-13 15:28                                     ` Tony Lindgren
2016-04-14  7:34                                       ` Peter Ujfalusi
2016-04-14 16:55                                         ` Tony Lindgren
2016-04-14 19:37                                           ` Peter Ujfalusi
2016-04-14 20:34                                             ` Tony Lindgren
2016-04-15 10:23                                               ` Peter Ujfalusi
     [not found]                                                 ` <5710C10A.6040908-l0cyMroinI0@public.gmane.org>
2016-04-15 15:16                                                   ` Tony Lindgren
     [not found]                                                     ` <20160415151651.GP5995-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-04-15 19:50                                                       ` Peter Ujfalusi
2016-04-18 23:51                                                         ` Tony Lindgren
2016-04-22 13:12                                                           ` Peter Ujfalusi
     [not found]                                                             ` <571A2357.3060006-l0cyMroinI0@public.gmane.org>
2016-04-22 22:24                                                               ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160402001753.GR9329@atomide.com \
    --to=tony@atomide.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jarkko.nikula@bitmer.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=peter.ujfalusi@ti.com \
    --cc=t-kristo@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).