public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] clk: hisilicon: support stub clock
@ 2015-08-04  7:27 Leo Yan
  2015-08-04  7:27 ` [PATCH v4 1/4] dt-bindings: arm: Hi6220: add doc for SRAM controller Leo Yan
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Leo Yan @ 2015-08-04  7:27 UTC (permalink / raw)
  To: linux-arm-kernel

This series adds support for hisilicon stub clock driver. On hi6220,
the bootloader needs load the firmware image and set info for OPPs;
after run into kernel, the stub clock driver is used to communicate
w/t firmware for cpu dynamic frequency scaling.

In patch series v1/v2, the stub clock driver simply writes request in
sram and send ipc to firmware; For patch series v3, the firmware has
been upgraded to use mailbox, so stub clock driver will call standard
mailbox APIs to request mailbox channel and send message to firmware.

Patch 4 adds stub clock node into dts and it references mailbox with
phandle, so patch 4 will depend on mailbox driver's patch series [1].
These patches have been tested on 96board hikey and is used by cpufreq
driver.

Changes from v3:
* Patch "clk: hisi: refine parameter checking for init" [2] has been
  applied to clk-next, so skip it in v4
* According to Stephen Boyd's review, fix and refine stub clock driver
* The stub clock driver depends on mailbox channel's initialization, so
  mailbox init firstly with core_initcall() and use subsys_initcall()
  for stub clock driver

Changes from v2:
* Use platform_device's probe for clock's initialization
* Use mailbox channel for clock frequency change

Changes from v1:
* Refine parameter checking for init flow
* Remove unnecessary debugging info
* Modify to check spinlock pointer when register clocks

[1] http://archive.arm.linux.org.uk/lurker/message/20150803.011307.1062b247.en.html
[2] http://archive.arm.linux.org.uk/lurker/message/20150803.011334.4b6f2fc7.en.html


Leo Yan (4):
  dt-bindings: arm: Hi6220: add doc for SRAM controller
  dt-bindings: clk: Hi6220: Document stub clock driver
  clk: Hi6220: add stub clock driver
  arm64: dts: add Hi6220's stub clock node

 .../bindings/arm/hisilicon/hisilicon.txt           |  18 ++
 .../devicetree/bindings/clock/hi6220-clock.txt     |  19 +-
 arch/arm64/boot/dts/hisilicon/hi6220.dtsi          |  23 ++
 drivers/clk/hisilicon/Kconfig                      |   2 +-
 drivers/clk/hisilicon/Makefile                     |   2 +-
 drivers/clk/hisilicon/clk-hi6220-stub.c            | 276 +++++++++++++++++++++
 6 files changed, 337 insertions(+), 3 deletions(-)
 create mode 100644 drivers/clk/hisilicon/clk-hi6220-stub.c

-- 
1.9.1

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH v4 0/4] mailbox: hisilicon: add Hi6220 mailbox driver
@ 2015-10-12 16:32 Leo Yan
  2015-10-12 16:32 ` [PATCH v4 4/4] arm64: dts: add Hi6220's stub clock node Leo Yan
  0 siblings, 1 reply; 12+ messages in thread
From: Leo Yan @ 2015-10-12 16:32 UTC (permalink / raw)
  To: linux-arm-kernel

Hi6220 mailbox supports up to 32 channels. Each channel is unidirectional
with a maximum message size of 8 words. I/O is performed using register
access (there is no DMA) and the cell raises an interrupt when messages
are received.

This patch series is to implement Hi6220 mailbox driver. It registers
two channels into framework for communication with MCU, one is tx channel
and another is rx channel. Now mailbox driver is used to send message to
MCU to control dynamic voltage and frequency scaling for CPU, GPU and DDR.

Changes from v3:
* The patch series for enabling idle state for Hi6220 has reserved memory
  regions, so this series will not include it anymore
* Refined mailbox driver according to Jassi's suggestion;
  Removed kfifo from mailbox driver;
  Removed spinlock for ipc registers accessing, due every channel has its
  own dedicated bit in ipc register and readl/writel will introduce memory
  barrier, so don't need spinlock to protect ipc registers accessing
* After mailbox driver is ready, can use patch 4 to enable CPU's OPPs and
  stub clock driver; finally can enable CPUFreq driver for CPU frequency
  scaling

Changes from v2:
* Get rid of unused memory regions from memory node in DT, and don't use
  reserved-memory node according to Mark and Leif's suggestion; Haojian also
  has updated UEFI for efi memory info

Changes from v1:
* Correct lock usage for SMP scenario

Changes from RFC:
* According to Jassi's review, totally remove the abstract common driver
  layer and only commit driver dedicated for Hi6220
* According to Paul Bolle's review, fix typo issue for Kconfig and remove
  unnecessary dependency with OF and fix minor for mailbox driver
* Refine a little for dts nodes


Leo Yan (4):
  dt-bindings: mailbox: Document Hi6220 mailbox driver
  mailbox: Hi6220: add mailbox driver
  arm64: dts: add mailbox node for Hi6220
  arm64: dts: add Hi6220's stub clock node

 .../bindings/mailbox/hisilicon,hi6220-mailbox.txt  |  57 ++++
 arch/arm64/boot/dts/hisilicon/hi6220.dtsi          |  31 ++
 drivers/mailbox/Kconfig                            |   8 +
 drivers/mailbox/Makefile                           |   2 +
 drivers/mailbox/hi6220-mailbox.c                   | 371 +++++++++++++++++++++
 5 files changed, 469 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mailbox/hisilicon,hi6220-mailbox.txt
 create mode 100644 drivers/mailbox/hi6220-mailbox.c

-- 
1.9.1

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

end of thread, other threads:[~2015-10-12 16:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-04  7:27 [PATCH v4 0/4] clk: hisilicon: support stub clock Leo Yan
2015-08-04  7:27 ` [PATCH v4 1/4] dt-bindings: arm: Hi6220: add doc for SRAM controller Leo Yan
2015-08-12  8:33   ` Stephen Boyd
2015-08-04  7:27 ` [PATCH v4 2/4] dt-bindings: clk: Hi6220: Document stub clock driver Leo Yan
2015-08-12  8:33   ` Stephen Boyd
2015-08-04  7:27 ` [PATCH v4 3/4] clk: Hi6220: add " Leo Yan
2015-08-12  8:33   ` Stephen Boyd
2015-08-04  7:27 ` [PATCH v4 4/4] arm64: dts: add Hi6220's stub clock node Leo Yan
2015-08-12  0:38 ` [PATCH v4 0/4] clk: hisilicon: support stub clock Stephen Boyd
2015-08-12  1:49   ` Leo Yan
2015-08-12  9:20     ` Wei Xu
  -- strict thread matches above, loose matches on Subject: below --
2015-10-12 16:32 [PATCH v4 0/4] mailbox: hisilicon: add Hi6220 mailbox driver Leo Yan
2015-10-12 16:32 ` [PATCH v4 4/4] arm64: dts: add Hi6220's stub clock node Leo Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox