All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Feng Kan <fkan@apm.com>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Mark Rutland <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH V2 1/6] Documentation: add dts binding for X-Gene reboot dts node.
Date: Mon, 13 Jan 2014 20:43:51 +0100	[thread overview]
Message-ID: <201401132043.52491.arnd@arndb.de> (raw)
In-Reply-To: <CAL85gmCTsxng3jCaAcCjePE6Pxu7Jg98TDUqQrDFzsfW2GQwEg@mail.gmail.com>

On Monday 13 January 2014, Feng Kan wrote:
> FKAN: I could remove this dts node and create another dts node that
> describe the range of registers on the SCU and use that node in this driver.
> I am not sure which subsystem I can use to handle this case, I do see a reset
> subsystem in the kernel but more used for ip resets. Please kindly let
> me know. Thanks for the great feedback.

Is this related to the standard ARM SCU that manages multiprocessor
systems, or a different unit that uses the same name?

Since this is a global register range with a variety of things in it,
the best candidate IMHO would be to use the "syscon" driver. You can
mark the device node as 'compatible="apm,xgene-scu","syscon"' to let
it get picked up by the drivers/mfd/syscon driver, which creates
a "regmap" structure for it.

The reset driver then uses a DT reference with a phandle to the
SCU node and calls syscon_regmap_lookup_by_phandle() to get the
regmap. It can get the register number inside the regmap from DT
as well and use the regmap API to perform the reset.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 1/6] Documentation: add dts binding for X-Gene reboot dts node.
Date: Mon, 13 Jan 2014 20:43:51 +0100	[thread overview]
Message-ID: <201401132043.52491.arnd@arndb.de> (raw)
In-Reply-To: <CAL85gmCTsxng3jCaAcCjePE6Pxu7Jg98TDUqQrDFzsfW2GQwEg@mail.gmail.com>

On Monday 13 January 2014, Feng Kan wrote:
> FKAN: I could remove this dts node and create another dts node that
> describe the range of registers on the SCU and use that node in this driver.
> I am not sure which subsystem I can use to handle this case, I do see a reset
> subsystem in the kernel but more used for ip resets. Please kindly let
> me know. Thanks for the great feedback.

Is this related to the standard ARM SCU that manages multiprocessor
systems, or a different unit that uses the same name?

Since this is a global register range with a variety of things in it,
the best candidate IMHO would be to use the "syscon" driver. You can
mark the device node as 'compatible="apm,xgene-scu","syscon"' to let
it get picked up by the drivers/mfd/syscon driver, which creates
a "regmap" structure for it.

The reset driver then uses a DT reference with a phandle to the
SCU node and calls syscon_regmap_lookup_by_phandle() to get the
regmap. It can get the register number inside the regmap from DT
as well and use the regmap API to perform the reset.

	Arnd

  reply	other threads:[~2014-01-13 19:43 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07 22:50 [PATCH V2 0/6] Enable X-Gene platform reboot driver Feng Kan
2014-01-07 22:50 ` Feng Kan
2014-01-07 22:50 ` Feng Kan
2014-01-07 22:50 ` [PATCH V2 1/6] Documentation: add dts binding for X-Gene reboot dts node Feng Kan
2014-01-07 22:50   ` Feng Kan
2014-01-08 10:05   ` Mark Rutland
2014-01-08 10:05     ` Mark Rutland
2014-01-08 10:08     ` Arnd Bergmann
2014-01-08 10:08       ` Arnd Bergmann
2014-01-08 10:08       ` Arnd Bergmann
2014-01-09 22:51       ` Feng Kan
2014-01-09 22:51         ` Feng Kan
2014-01-13 15:19         ` Arnd Bergmann
2014-01-13 15:19           ` Arnd Bergmann
2014-01-13 19:25           ` Feng Kan
2014-01-13 19:25             ` Feng Kan
2014-01-13 19:43             ` Arnd Bergmann [this message]
2014-01-13 19:43               ` Arnd Bergmann
2014-01-14  0:42               ` Feng Kan
2014-01-14  0:42                 ` Feng Kan
2014-01-14  6:06                 ` Arnd Bergmann
2014-01-14  6:06                   ` Arnd Bergmann
2014-01-14  6:06                   ` Arnd Bergmann
2014-01-14 18:35                   ` Feng Kan
2014-01-14 18:35                     ` Feng Kan
2014-01-14 18:42                     ` Arnd Bergmann
2014-01-14 18:42                       ` Arnd Bergmann
2014-01-11  1:11     ` Feng Kan
2014-01-11  1:11       ` Feng Kan
2014-01-07 22:50 ` [PATCH V2 2/6] arm64: add missing dts entry for X-Gene platform Feng Kan
2014-01-07 22:50   ` Feng Kan
2014-01-07 22:50 ` [PATCH V2 3/6] arm64: Enable system reset via arch Kconfig for X-Gene system Feng Kan
2014-01-07 22:50   ` Feng Kan
     [not found] ` <1389135041-16062-1-git-send-email-fkan-qTEPVZfXA3Y@public.gmane.org>
2014-01-07 22:50   ` [PATCH V2 4/6] power: reset: removed use of the dts mask and use fixed value for reset Feng Kan
2014-01-07 22:50     ` Feng Kan
2014-01-07 22:50     ` Feng Kan
2014-01-08 21:45     ` Arnd Bergmann
2014-01-08 21:45       ` Arnd Bergmann
2014-01-07 22:50 ` [PATCH V2 5/6] power: reset: change xgene reboot driver to use both acpi and dts resource for reboot Feng Kan
2014-01-07 22:50   ` Feng Kan
2014-01-08 21:43   ` Arnd Bergmann
2014-01-08 21:43     ` Arnd Bergmann
2014-01-09 22:48     ` Feng Kan
2014-01-09 22:48       ` Feng Kan
2014-01-13 15:03       ` Arnd Bergmann
2014-01-13 15:03         ` Arnd Bergmann
2014-01-07 22:50 ` [PATCH V2 6/6] acpi: platform: add ACPI code for X-Gene reboot platform driver Feng Kan
2014-01-07 22:50   ` Feng Kan
2014-01-14 16:07 ` [PATCH V2 0/6] Enable X-Gene platform reboot driver Matthew Garrett
2014-01-14 16:07   ` Matthew Garrett
2014-01-15 17:39   ` Feng Kan
2014-01-15 17:39     ` Feng Kan

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=201401132043.52491.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=fkan@apm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.