public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Graeme Gregory <gg@slimlogic.co.uk>
To: Arnd Bergmann <arnd@arndb.de>, linux-arm-kernel@lists.infradead.org
Cc: Zhangfei Gao <zhangfei.gao@gmail.com>,
	linux-acpi@vger.kernel.org,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Hanjun Guo <hanjun.guo@linaro.org>
Subject: Re: [RFC PATCH 4/4] mfd: syscon: add ACPI support
Date: Fri, 11 Dec 2015 10:59:44 +0000	[thread overview]
Message-ID: <1449831584.680722.464515769.71BFC229@webmail.messagingengine.com> (raw)
In-Reply-To: <21660867.NhUszMiexN@wuerfel>



On Fri, 11 Dec 2015, at 10:51 AM, Arnd Bergmann wrote:
> On Friday 11 December 2015 18:35:17 Zhangfei Gao wrote:
> > On Wed, Dec 2, 2015 at 6:44 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > > On Wednesday 02 December 2015 17:09:28 Kefeng Wang wrote:
> > >
> > > This sounds like a bad idea:
> > >
> > > syscon is basically a hack to let us access register that the SoC designer
> > > couldn't fit in anywhere sane. We need something like this with devicetree
> > > because we decided not to have any interpreted bytecode to do this behind
> > > our back.
> > >
> > > With ACPI, the same thing is done with AML, which is actually nicer than
> > > syscon (once you have to deal with all the problems introduced by AML).
> > >
> > > Use that instead.
> > >
> > 
> > Would you mind clarifying AML method, still not understand.
> > Is is means realize the operation in uefi/bootloader and call some
> > interface from kernel?
> >
> > The issue here is we want to access some common registers,
> > which we do not want to ioremap for many times in each driver.
> > 
> > In hisi platforms, we have many common registers shared by many components.
> 
> Sorry, you'd have to ask someone who is more familiar with ACPI.
> 
> Basically, the idea of ACPI as I understand it is that you have a
> interpreted bytecode language that is provided by the BIOS as tables
> and executed in the context of the kernel. This byte code has access
> to stuff like GPIO, PCI config space, MMIO registers, IPMI or the
> embedded controller on a PC. This way, you can hide all the platform
> specific details behind a function call from a generic device driver,
> and the BIOS writer can provide the specific implementation for any
> registers that are shared across components.
> 
> That's about all I know, but the ACPI specifications are available
> publicly, please have a look there for more details.
> 

Basically in the DSDT you would create a common accessor method for the
register/registers in question. This function takes care of the register
in the multiple user cases.

each _RST() method would then call this function to set the bits they
required.

So in effect it is no different to what you would do in Linux, just done
in AML instead.

Graeme


  reply	other threads:[~2015-12-11 10:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02  9:09 [RFC PATCH 0/4] add ACPI support for syscon Kefeng Wang
2015-12-02  9:09 ` [RFC PATCH 1/4] acpi: property: Introduce helper acpi_dev_get_reference_device() Kefeng Wang
2015-12-02  9:20   ` Mika Westerberg
2015-12-02  9:09 ` [RFC PATCH 2/4] device property: Introduce helper device_get_reference_node() Kefeng Wang
2015-12-03 15:28   ` Russell King - ARM Linux
2015-12-03 23:29     ` Rafael J. Wysocki
2015-12-04  1:02       ` Rafael J. Wysocki
2015-12-11 12:35     ` Lorenzo Pieralisi
2015-12-02  9:09 ` [RFC PATCH 3/4] ACPI/platform: Introduce helper acpi_dev_find_plat_dev() Kefeng Wang
2015-12-02  9:09 ` [RFC PATCH 4/4] mfd: syscon: add ACPI support Kefeng Wang
2015-12-02 10:44   ` Arnd Bergmann
2015-12-03 10:41     ` Graeme Gregory
2015-12-03 13:01       ` Kefeng Wang
2015-12-03 15:56         ` Lorenzo Pieralisi
2015-12-07  6:15           ` Kefeng Wang
2015-12-07  8:47             ` Arnd Bergmann
2015-12-11 10:35     ` Zhangfei Gao
2015-12-11 10:51       ` Arnd Bergmann
2015-12-11 10:59         ` Graeme Gregory [this message]
2015-12-11 12:23         ` Hanjun Guo
2015-12-02 10:50 ` [RFC PATCH 0/4] add ACPI support for syscon Lorenzo Pieralisi

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=1449831584.680722.464515769.71BFC229@webmail.messagingengine.com \
    --to=gg@slimlogic.co.uk \
    --cc=arnd@arndb.de \
    --cc=hanjun.guo@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=wangkefeng.wang@huawei.com \
    --cc=zhangfei.gao@gmail.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