From: Bin Gao <bin.gao@linux.intel.com>
To: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/4] drivers/misc: add rawio framework and drivers
Date: Mon, 21 Oct 2013 17:03:17 -0700 [thread overview]
Message-ID: <5265C0C5.70905@linux.intel.com> (raw)
To read/write registers from a device is very important on embedded system,
especially SoC systems. Physically there could be different types of devices
based on bus tyes, e.g. PCI devices, I2C (slave)devices, I/O devices(memory
mapped), inter-processor devices, etc. Typically there are userland
tools from
PC Linux to access device registers, but on some embedded system initrd and
rootfs come with a minimal busybox and most useful userland tools are not
available. To add these tools back to rootfs is not convenient either.
What's more, on some systems with runtime pm enabled, reading/writing
registers
from a device which is in low power state will cause problems. For these
reasons, to have some tools/interfaces directly from kernel space via debug
fs seems to be easy, cheap and convenient.
These patchsets are designed to achieve above goals to ease
device driver and kernel debugging on embedded systems.
Rawio provides a framework to read/write registers from a bus, including
pci, i2c, I/O device(memory mapped), etc. based on debug fs.
Rawio bus drivers implement the read/write operation on a specific bus
on top of the rawio framework driver.
Currently only three bus drivers are available: pci, iomem and i2c.
But it's extremely easy to add more drivers on top of the framework
if needed.
drivers/misc/Kconfig | 1 +
drivers/misc/Makefile | 1 +
drivers/misc/rawio/Kconfig | 59 +++++
drivers/misc/rawio/Makefile | 4 +
drivers/misc/rawio/rawio.c | 514
+++++++++++++++++++++++++++++++++++++++
drivers/misc/rawio/rawio_i2c.c | 224 +++++++++++++++++
drivers/misc/rawio/rawio_iomem.c | 401 ++++++++++++++++++++++++++++++
drivers/misc/rawio/rawio_pci.c | 235 ++++++++++++++++++
include/linux/rawio.h | 78 ++++++
9 files changed, 1517 insertions(+)
create mode 100644 drivers/misc/rawio/Kconfig
create mode 100644 drivers/misc/rawio/Makefile
create mode 100644 drivers/misc/rawio/rawio.c
create mode 100644 drivers/misc/rawio/rawio_i2c.c
create mode 100644 drivers/misc/rawio/rawio_iomem.c
create mode 100644 drivers/misc/rawio/rawio_pci.c
create mode 100644 include/linux/rawio.h
next reply other threads:[~2013-10-22 0:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 0:03 Bin Gao [this message]
2013-10-22 5:44 ` [PATCH 0/4] drivers/misc: add rawio framework and drivers Greg Kroah-Hartman
2013-10-22 17:14 ` Guenter Roeck
2013-10-22 18:50 ` Bin Gao
2013-10-22 23:48 ` Greg Kroah-Hartman
2013-10-22 18:19 ` Bin Gao
2013-10-22 23:47 ` Greg Kroah-Hartman
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=5265C0C5.70905@linux.intel.com \
--to=bin.gao@linux.intel.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.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