All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/3] introduce stmp-style devices
@ 2012-03-21 22:21 ` Wolfram Sang
  0 siblings, 0 replies; 47+ messages in thread
From: Wolfram Sang @ 2012-03-21 22:21 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, Arnd Bergmann, Shawn Guo, Huang Shijie, Wolfram Sang

This series makes support for a certain type of devices mach independant. We
want that because such devices (having a special register layout) have been
found in mach-mxs and mach-mx6 meanwhile. Please refer to patch 1/3 for a more
detailed description.

Patch 1/3 adds the basic support and is of main interest to get upstream.
Patches 2/3 and 3/3 are usage examples and will be send to the relevant
subsystems once the basic support is accepted.

Main changes since the V1:

* moved stmp_device.c from drivers/base to lib/

Main changes since the RFC:

* renamed the macros to STMP_OFFSET_*
* rebased to 3.3-rc6

Tested with a TX28 board.

Thanks,

   Wolfram

Wolfram Sang (3):
  lib: add support for stmp-style devices
  i2c: mxs: use global reset function
  rtc: stmp3xxx: use global stmp_device functionality

 drivers/i2c/busses/Kconfig   |    1 +
 drivers/i2c/busses/i2c-mxs.c |    9 +----
 drivers/rtc/Kconfig          |    1 +
 drivers/rtc/rtc-stmp3xxx.c   |   29 +++++----------
 include/linux/stmp_device.h  |   20 ++++++++++
 lib/Kconfig                  |    3 ++
 lib/Makefile                 |    2 +
 lib/stmp_device.c            |   80 ++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 119 insertions(+), 26 deletions(-)
 create mode 100644 include/linux/stmp_device.h
 create mode 100644 lib/stmp_device.c

-- 
1.7.2.5


^ permalink raw reply	[flat|nested] 47+ messages in thread
* [PATCH 0/3] introduce stmp-style devices
@ 2012-03-07 22:28 Wolfram Sang
  2012-03-07 22:28   ` Wolfram Sang
  0 siblings, 1 reply; 47+ messages in thread
From: Wolfram Sang @ 2012-03-07 22:28 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, Greg KH, Shawn Guo, Huang Shijie, Arnd Bergmann,
	Wolfram Sang

This series makes support for a certain type of devices mach independant. We
want that because such devices (having a special register layout) have been
found in mach-mxs and mach-mx6 meanwhile. Please refer to patch 1/3 for a more
detailed description.

Patch 1/3 adds the basic support and is of main interest to get upstream.
Patches 2/3 and 3/3 are usage examples and will be send to the relevant
subsystems once the basic support is accepted.

Main changes since the RFC:

* renamed the macros to STMP_OFFSET_*
* rebased to 3.3-rc6

Tested with a TX28 board.

Thanks,

   Wolfram

Wolfram Sang (3):
  drivers: base: add support for stmp-style devices
  i2c: mxs: use global reset function
  rtc: stmp3xxx: use global stmp_device functionality

 drivers/base/Kconfig         |    3 ++
 drivers/base/Makefile        |    1 +
 drivers/base/stmp_device.c   |   80 ++++++++++++++++++++++++++++++++++++++++++
 drivers/i2c/busses/Kconfig   |    1 +
 drivers/i2c/busses/i2c-mxs.c |    9 +----
 drivers/rtc/Kconfig          |    1 +
 drivers/rtc/rtc-stmp3xxx.c   |   29 +++++----------
 include/linux/stmp_device.h  |   19 ++++++++++
 8 files changed, 117 insertions(+), 26 deletions(-)
 create mode 100644 drivers/base/stmp_device.c
 create mode 100644 include/linux/stmp_device.h

-- 
1.7.9.1


^ permalink raw reply	[flat|nested] 47+ messages in thread
* [PATCH 0/3] make stmp-style devices mach-independent
@ 2011-11-16 10:47 Wolfram Sang
  2011-11-16 10:47 ` [PATCH 2/3] i2c: mxs: use global reset function Wolfram Sang
  0 siblings, 1 reply; 47+ messages in thread
From: Wolfram Sang @ 2011-11-16 10:47 UTC (permalink / raw)
  To: linux-arm-kernel

It seems I haven't been following the lists too closely lately, so I might have
missed similar patches. Yet, I noticed some patches dealing with drivers using
mxs-specific features, so they need to include mach-specific files which is
troublesome. I started to address the problem as well some time ago, so I push
out the patches now as RFC to enrich the discussion. The patches are rebased to
linux 3.2-rc2 and are boot tested.

The basics: mach-mxs uses ip-cores which follow a register layout I have
first seen on STMP SoCs. That means, every register has four incarnations:
 - one u32 to store a value
 - a SET register where every 1-bit sets the corresponding bit,
   others are unaffected
 - similar with a CLR register
 - and a TGL (toggle) register

Also, the 2 MSBs in register 0 are always the same and can be used to reset the
block.

All this is strictly speaking not mach-specific (but ip-core specific) and,
thus, doesn't need to be in mach-mxs/include. As I have been told, mx50 and
mx6(?) might also use IP cores following the STMP-style; so I wondered if it
can't be exported like the following patch series does:

Introduce a stmp-style device, put the code around that in a public place
(currently drivers/base/; dunno if that is the best place, though), and let
drivers for stmp-style devices select that code.

Voila, mach dependency gone, reusable code introduced. Note that I didn't
remove the duplicated code from mach-mxs yet, first all drivers have to be
converted.

Right thing to do? If so, I'll repost properly to the right lists. Fishing for
feedback right now :)

Thanks,

   Wolfram

Wolfram Sang (3):
  drivers: base: add support for stmp-style devices
  i2c: mxs: use global reset function
  rtc: stmp3xxx: use global stmp_device functionality

 drivers/base/Kconfig         |    3 ++
 drivers/base/Makefile        |    1 +
 drivers/base/stmp_device.c   |   80 ++++++++++++++++++++++++++++++++++++++++++
 drivers/i2c/busses/Kconfig   |    1 +
 drivers/i2c/busses/i2c-mxs.c |    9 +----
 drivers/rtc/Kconfig          |    1 +
 drivers/rtc/rtc-stmp3xxx.c   |   29 +++++----------
 include/linux/stmp_device.h  |   19 ++++++++++
 8 files changed, 117 insertions(+), 26 deletions(-)
 create mode 100644 drivers/base/stmp_device.c
 create mode 100644 include/linux/stmp_device.h

-- 
1.7.7.1

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

end of thread, other threads:[~2012-04-23 11:07 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-21 22:21 [PATCH V2 0/3] introduce stmp-style devices Wolfram Sang
2012-03-21 22:21 ` Wolfram Sang
2012-03-21 22:21 ` [PATCH V2 1/3] lib: add support for " Wolfram Sang
2012-03-21 22:21   ` Wolfram Sang
2012-03-29  2:45   ` Huang Shijie
2012-03-29  2:45     ` Huang Shijie
2012-03-29  6:43     ` Wolfram Sang
2012-03-29  6:43       ` Wolfram Sang
2012-04-18  9:05       ` Dong Aisheng
2012-04-18  9:05         ` Dong Aisheng
2012-04-18  9:20         ` Wolfram Sang
2012-04-18  9:20           ` Wolfram Sang
2012-04-19 16:24           ` Arnd Bergmann
2012-04-19 16:24             ` Arnd Bergmann
2012-04-20  5:30           ` Shawn Guo
2012-04-20  5:30             ` Shawn Guo
2012-04-20 21:11             ` Wolfram Sang
2012-04-20 21:11               ` Wolfram Sang
2012-04-21 11:09               ` Arnd Bergmann
2012-04-21 11:09                 ` Arnd Bergmann
2012-04-04 11:21   ` Huang Shijie
2012-04-04 11:21     ` Huang Shijie
2012-04-04 12:23     ` Wolfram Sang
2012-04-04 12:23       ` Wolfram Sang
2012-04-06  7:40       ` Huang Shijie
2012-04-06  7:40         ` Huang Shijie
2012-04-06 18:21         ` Wolfram Sang
2012-04-06 18:21           ` Wolfram Sang
2012-04-07  2:30           ` Huang Shijie
2012-04-07  2:30             ` Huang Shijie
2012-04-07  8:00             ` Wolfram Sang
2012-04-07  8:00               ` Wolfram Sang
2012-04-07 13:45               ` Huang Shijie
2012-04-07 13:45                 ` Huang Shijie
2012-04-23  6:55   ` Andrew Morton
2012-04-23  6:55     ` Andrew Morton
2012-04-23  7:28     ` Wolfram Sang
2012-04-23  7:28       ` Wolfram Sang
2012-04-23 11:06       ` Arnd Bergmann
2012-04-23 11:06         ` Arnd Bergmann
2012-03-21 22:21 ` [PATCH 2/3] i2c: mxs: use global reset function Wolfram Sang
2012-03-21 22:21   ` Wolfram Sang
2012-03-21 22:21 ` [PATCH 3/3] rtc: stmp3xxx: use global stmp_device functionality Wolfram Sang
2012-03-21 22:21   ` Wolfram Sang
  -- strict thread matches above, loose matches on Subject: below --
2012-03-07 22:28 [PATCH 0/3] introduce stmp-style devices Wolfram Sang
2012-03-07 22:28 ` [PATCH 2/3] i2c: mxs: use global reset function Wolfram Sang
2012-03-07 22:28   ` Wolfram Sang
2011-11-16 10:47 [PATCH 0/3] make stmp-style devices mach-independent Wolfram Sang
2011-11-16 10:47 ` [PATCH 2/3] i2c: mxs: use global reset function Wolfram Sang

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.