devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
To: linux-sunxi <linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Cc: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>,
	Hans De Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-arm-kernel
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [linux-sunxi] Re: [PATCH 0/2] ARM: sunxi: Enable syscon for the system controller
Date: Tue, 6 May 2014 14:36:33 +0800	[thread overview]
Message-ID: <CAGb2v66JBM_Rv8ie=7iuTPrXGPJECTeevnf9LLXNS=FSYs1+Tg@mail.gmail.com> (raw)
In-Reply-To: <20140505225517.GE9464@lukather>

Hi,

On Tue, May 6, 2014 at 6:55 AM, Maxime Ripard
<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> On Sun, May 04, 2014 at 04:02:38PM +0200, Carlo Caione wrote:
>> The so called "system controller" in Allwinner A20 and A31 SoCs is
>> multi-purpose controller that tries to add misc functionality to one
>> memory region.
>> In these SoCs it controls the internal SRAM partitioning but it also
>> includes registers for chip versioning and NMI control.
>> This patch adds the proper nodes in the DTS files and enable the syscon
>> in the defconfig files.
>>
>> Even though the system controller includes also register for managing the
>> NMI controller, these register are not mapped in the syscon since they
>> are directly used and mapped by the NMI controller itself.
>
> Hmmm, what exactly do you want to achieve with this?
>
> The NMI controller won't be able to use it, since it's initialized
> much earlier than syscon and regmap.

I believe this will be used for toggling the SRAM mappings. (Am I right?)
The second register toggles mappings for MUSB FIFO, EMAC, and a few of
the other IP blocks we currently don't support.

> Moreover, the A31 doesn't seem to have this system controller, or at
> least this overlap.

There should be something similar, as does the A23. There is no overlap AFAIK.

> And since on the A20, registers seem to have one usage only, so I
> guess we can just split this IP into several nodes, just like we did
> with the NMI.

As stated above, the second register toggles SRAM mappings for at most
4 SRAM blocks (for EMAC, MUSB, ACE, ISP).

syscon would be a good way to share this register among the various drivers.
We do not toggle it in the current EMAC driver. The driver seems to assume
it is setup by the bootloader, and on the A20, it seems to be mapped to
EMAC by default.

The MUSB glue layer driver must toggle this.

I think this approach is better than all the individual drivers mapping
the registers and toggling a single bit. In fact I did something similar
when working on preliminary musb support.


Cheers
ChenYu
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-05-06  6:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-04 14:02 [PATCH 0/2] ARM: sunxi: Enable syscon for the system controller Carlo Caione
     [not found] ` <1399212160-26934-1-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
2014-05-04 14:02   ` [PATCH 1/2] ARM: sunxi: dts: Enable syscon in DTSI Carlo Caione
2014-05-04 14:02   ` [PATCH 2/2] ARM: sunxi: Add syscon support in defconfig Carlo Caione
2014-05-05 22:55   ` [PATCH 0/2] ARM: sunxi: Enable syscon for the system controller Maxime Ripard
2014-05-06  6:36     ` Chen-Yu Tsai [this message]
     [not found]       ` <CAGb2v66JBM_Rv8ie=7iuTPrXGPJECTeevnf9LLXNS=FSYs1+Tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-06  8:03         ` Carlo Caione
     [not found]           ` <CAOQ7t2akOEr7o4Q5ze5QPr_RHj6MWmA-u5NTuq2q1epy2LBr8w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-06  8:27             ` Chen-Yu Tsai
     [not found]               ` <CAGb2v64nm2i+XivDO8drHSkUUJvGr_=HaWMB26rbytVZAdTQFw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-06  8:42                 ` Carlo Caione
2014-05-07  3:25             ` Maxime Ripard
2014-05-07  8:19               ` Carlo Caione
     [not found]                 ` <CAOQ7t2byRX3HmVjUKYZ-VEocR3S2ATLpSTPV8bdFD98_Q2sY9Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-08  3:04                   ` Maxime Ripard
2014-05-08  6:14                     ` Carlo Caione

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='CAGb2v66JBM_Rv8ie=7iuTPrXGPJECTeevnf9LLXNS=FSYs1+Tg@mail.gmail.com' \
    --to=wens-jday2fn1rrm@public.gmane.org \
    --cc=carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /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).