linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabriel Somlo <gsomlo@gmail.com>
To: shorne@gmail.com, mholenko@antmicro.com, kgugala@antmicro.com
Cc: linux-kernel@vger.kernel.org,
	pczarnecki@internships.antmicro.com, f.kermarrec@gmail.com,
	gregkh@linuxfoundation.org, gsomlo@gmail.com
Subject: [PATCH v5 0/4] drivers/soc/litex: support 32-bit subregisters, 64-bit CPUs
Date: Sun, 27 Dec 2020 11:13:16 -0500	[thread overview]
Message-ID: <20201227161320.2194830-1-gsomlo@gmail.com> (raw)

This series expands on commit 22447a99c97e ("drivers/soc/litex: add LiteX
SoC Controller driver"), adding support for handling both 8- and 32-bit
LiteX CSR (MMIO) subregisters, on both 32- and 64-bit CPUs.

Notes v5:
	- added patch (4/4) taking 'litex_[set|get]_reg()' private
	- additional optimization of [_]litex_set_reg() in 3/4

Notes v4:
	- improved "eloquence" of some 3/3 commit blurb paragraphs
	- fixed instance of "disgusting" comment style :)
	- litex_[get|set]_reg() now using size_t for 'reg_size' argument
	- slightly tighter shift calculation in litex_set_reg()

Notes v3:
	- split into smaller, more self-explanatory patches
	- more detailed commit blurb for "main payload" (3/3) patch
	- eliminate compiler warning on 32-bit architectures

Notes v2:
	- fix typo (s/u32/u64/) in litex_read64().

Notes v1:
	- LITEX_SUBREG_SIZE now provided by Kconfig.
	- it's not LITEX_REG_SIZE, but rather LITEX_SUBREG_ALIGN!
	- move litex_[get|set]_reg() to include/linux/litex.h and mark
	  them as "static inline";
	- redo litex_[read|write][8|16|32|64]() using litex_[get|set]_reg()
	  (compiler should produce code as efficient as hardcoded shifts,
	   but also automatically matching LITEX_SUBREG_SIZE).

Gabriel Somlo (4):
  drivers/soc/litex: move generic accessors to litex.h
  drivers/soc/litex: separate MMIO from subregister offset calculation
  drivers/soc/litex: support 32-bit subregisters, 64-bit CPUs
  drivers/soc/litex: make 'litex_[set|get]_reg()' methods private

 drivers/soc/litex/Kconfig          |  14 ++-
 drivers/soc/litex/litex_soc_ctrl.c |  76 +-------------
 include/linux/litex.h              | 154 +++++++++++++++++++----------
 3 files changed, 119 insertions(+), 125 deletions(-)

-- 
2.26.2


             reply	other threads:[~2020-12-27 16:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-27 16:13 Gabriel Somlo [this message]
2020-12-27 16:13 ` [PATCH v5 1/4] drivers/soc/litex: move generic accessors to litex.h Gabriel Somlo
2020-12-27 16:13 ` [PATCH v5 2/4] drivers/soc/litex: separate MMIO from subregister offset calculation Gabriel Somlo
2020-12-27 16:13 ` [PATCH v5 3/4] drivers/soc/litex: support 32-bit subregisters, 64-bit CPUs Gabriel Somlo
2020-12-27 16:13 ` [PATCH v5 4/4] drivers/soc/litex: make 'litex_[set|get]_reg()' methods private Gabriel Somlo
2020-12-28 12:51   ` Gabriel L. Somlo
2021-01-11 17:15 ` [PATCH v5 0/4] drivers/soc/litex: support 32-bit subregisters, 64-bit CPUs Gabriel L. Somlo

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=20201227161320.2194830-1-gsomlo@gmail.com \
    --to=gsomlo@gmail.com \
    --cc=f.kermarrec@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kgugala@antmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mholenko@antmicro.com \
    --cc=pczarnecki@internships.antmicro.com \
    --cc=shorne@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;
as well as URLs for NNTP newsgroup(s).