All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/18] PRCM cleanup - remove prcm-regs.h
@ 2007-05-25  8:23 Paul Walmsley
  2007-05-25  8:23 ` [PATCH 01/18] omap2: add OMAP24XX and OMAP2/3 modules to prcm_common.h Paul Walmsley
                   ` (17 more replies)
  0 siblings, 18 replies; 23+ messages in thread
From: Paul Walmsley @ 2007-05-25  8:23 UTC (permalink / raw)
  To: linux-omap-open-source

These patches clean up PRCM register access in the OMAP2 tree.
Highlights:

- PRCM registers are divided into module-shared registers and global
  registers.  Module-shared registers can appear in multiple PRCM
  subsystems at identical address offsets, while global registers
  control system-wide PRCM functions and appear only once in PRCM space.

- PRCM registers are further separated into two categories, PRM
  (power/reset management) and CM (clock management) registers.  This
  is to prepare for OMAP3430 PRCM code -- PRM and CM registers share
  the same address space on 2420 and 2430, but exist in separate
  address spaces on 3430.

- Read/write functions are defined for each of the combinations above:
  prm_{read,write}_reg() for PRM global registers,
  prm_{read,write}_mod_reg() for PRM module-shared registers,
  cm_{read,write}_reg() for CM global registers,
  cm_{read,write}_mod_reg() for CM module-shared registers.   _reg()
  functions use a single (void __iomem *) to refer to global
  registers, and _mod_reg() functions use both a module offset and a
  register offset to refer to module-shared registers.  Almost all
  C-language PRCM register access in the mach-omap2/ directory is
  converted to use these functions.  If debugging is enabled, all
  PRM/CM register writes will be logged to the console.

- Symbolic constants are defined for PRCM register addresses.
  Registers that are shared between architectures are simply defined
  as-is, e.g., 'CM_CLKSEL', but registers that only exist on specific
  architectures have the architecture name prepended, e.g.,
  'OMAP2430_CM_ICLKEN3'.  This aids in identifying code that must be
  modified for cross-platform use.  Existing C code is converted to
  use these new constants.

- Symbolic constants are also defined for PRCM register bits, and
  existing C code that used 'magic numbers' for these bits is
  converted to use the symbolic defines.  This resulted in a major
  improvement in code readability.  As above, bits shared between
  architectures are labeled with only their 'base name,' but
  architecture-specific bits have the architecture name prepended,
  making it easy to identify code that will need to be changed for
  new architectures.

An overview of this patch series:

- Patches 1-9 add constants for PRCM modules, 24xx PRM and CM
  registers, 24xx PRM and CM register bits, and the register
  read/write functions.

- Patches 10-17 convert existing code to use the PRCM framework
  introduced in patches 1-9.

- Patch 18 removes prcm-regs.h.


Comments welcome.

- Paul

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [PATCH 00/18] PRCM cleanup - remove prcm-regs.h
@ 2007-05-17  0:11 Paul Walmsley
  2007-05-17  0:11 ` [PATCH 11/18] omap2: convert clock.c to use new PRCM functions and symbolic constants Paul Walmsley
  0 siblings, 1 reply; 23+ messages in thread
From: Paul Walmsley @ 2007-05-17  0:11 UTC (permalink / raw)
  To: linux-omap-open-source

These patches clean up PRCM register access in the OMAP2 tree.
Highlights:
 
- PRCM registers are divided into module-shared registers and global
  registers.  Module-shared registers can appear in multiple PRCM
  subsystems at identical address offsets, while global registers
  control system-wide PRCM functions and appear only once in PRCM space.

- PRCM registers are further separated into two categories, PRM
  (power/reset management) and CM (clock management) registers.  This
  is to prepare for OMAP3430 PRCM code -- PRM and CM registers share
  the same address space on 2420 and 2430, but exist in separate
  address spaces on 3430.

- Read/write functions are defined for each of the combinations above:
  prm_{read,write}_reg() for PRM global registers,
  prm_{read,write}_mod_reg() for PRM module-shared registers,
  cm_{read,write}_reg() for CM global registers,
  cm_{read,write}_mod_reg() for CM module-shared registers.   _reg()
  functions use a single (void __iomem *) to refer to global
  registers, and _mod_reg() functions use both a module offset and a
  register offset to refer to module-shared registers.  Almost all
  C-language PRCM register access in the mach-omap2/ directory is
  converted to use these functions.  If debugging is enabled, all
  PRM/CM register writes will be logged to the console.

- Symbolic constants are defined for PRCM register addresses.
  Registers that are shared between architectures are simply defined
  as-is, e.g., 'CM_CLKSEL', but registers that only exist on specific
  architectures have the architecture name prepended, e.g.,
  'OMAP2430_CM_ICLKEN3'.  This aids in identifying code that must be
  modified for cross-platform use.  Existing C code is converted to
  use these new constants.

- Symbolic constants are also defined for PRCM register bits, and
  existing C code that used 'magic numbers' for these bits is
  converted to use the symbolic defines.  This resulted in a major
  improvement in code readability.  As above, bits shared between
  architectures are labeled with only their 'base name,' but
  architecture-specific bits have the architecture name prepended,
  making it easy to identify code that will need to be changed for
  new architectures.

An overview of this patch series:

- Patches 1-9 add constants for PRCM modules, 24xx PRM and CM
  registers, 24xx PRM and CM register bits, and the register
  read/write functions.

- Patches 10-17 convert existing code to use the PRCM framework
  introduced in patches 1-9.

- Patch 18 removes prcm-regs.h.


Comments welcome.  

- Paul

-- 

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

end of thread, other threads:[~2007-05-25 18:53 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-25  8:23 [PATCH 00/18] PRCM cleanup - remove prcm-regs.h Paul Walmsley
2007-05-25  8:23 ` [PATCH 01/18] omap2: add OMAP24XX and OMAP2/3 modules to prcm_common.h Paul Walmsley
2007-05-25  8:23 ` [PATCH 02/18] omap2: add OMAP24XX register bit defines shared between CM and PRM Paul Walmsley
2007-05-25  8:23 ` [PATCH 03/18] omap2: add OMAP2_PRM_BASE/OMAP2_CM_BASE #defines Paul Walmsley
2007-05-25  8:23 ` [PATCH 04/18] omap2: add OMAP24XX Clock Management register defines Paul Walmsley
2007-05-25  8:23 ` [PATCH 05/18] omap2: add Clock Management shared register bit defines to cm.h Paul Walmsley
2007-05-25  8:23 ` [PATCH 06/18] omap2: add OMAP24XX Power/Reset Management register defines Paul Walmsley
2007-05-25  8:23 ` [PATCH 07/18] omap2: add Power/Reset Management shared register bit defines to prm.h Paul Walmsley
2007-05-25  8:23 ` [PATCH 08/18] omap2: add OMAP24XX Clock Management register bit defines Paul Walmsley
2007-05-25  8:23 ` [PATCH 09/18] omap2: add OMAP24XX Power/Reset " Paul Walmsley
2007-05-25  8:23 ` [PATCH 10/18] omap2: convert pm.c to use new PRCM functions and symbolic constants Paul Walmsley
2007-05-25  8:23 ` [PATCH 11/18] omap2: convert clock.c " Paul Walmsley
2007-05-25  8:59   ` Igor Stoppa
2007-05-25  9:03     ` Igor Stoppa
2007-05-25 18:53       ` Tony Lindgren
2007-05-25  8:23 ` [PATCH 12/18] omap2: convert prcm.c to use symbolic register & register bit constants Paul Walmsley
2007-05-25  8:23 ` [PATCH 13/18] omap2: convert sram-fn.S to use OMAP2_{PRM, CM}_BASE rather than OMAP2_PRCM_BASE Paul Walmsley
2007-05-25  8:23 ` [PATCH 14/18] omap2: convert clock.h to use symbolic register defines Paul Walmsley
2007-05-25  8:23 ` [PATCH 15/18] omap2: convert clock.h to use symbolic register bit defines Paul Walmsley
2007-05-25  8:23 ` [PATCH 16/18] omap2: convert DSP code to use new PRCM functions & defines Paul Walmsley
2007-05-25  8:23 ` [PATCH 17/18] omap2: remove remaining prcm-regs.h includes Paul Walmsley
2007-05-25  8:23 ` [PATCH 18/18] omap2: remove prcm-regs.h Paul Walmsley
  -- strict thread matches above, loose matches on Subject: below --
2007-05-17  0:11 [PATCH 00/18] PRCM cleanup - " Paul Walmsley
2007-05-17  0:11 ` [PATCH 11/18] omap2: convert clock.c to use new PRCM functions and symbolic constants Paul Walmsley

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.