* [PATCH 2.6.28-rc6 0/1] Fix OMAP/README docummentation
@ 2008-12-03 10:37 Carlos Chinea
2008-12-03 10:40 ` [PATCH 2.6.28-rc6 1/1] " Carlos Chinea
0 siblings, 1 reply; 3+ messages in thread
From: Carlos Chinea @ 2008-12-03 10:37 UTC (permalink / raw)
To: linux-omap
Hi !
The README file in the OMAP documentation has wrong and misleading
information about how the developers have to access the registers in
OMAP. The following patch removes completely that section.
Please, keep in mind that this does not imply that the rest of the
sections are currently OK. I guess someone with better expertise should
revise those sections.
Br,
Carlos
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2.6.28-rc6 1/1] Fix OMAP/README docummentation
2008-12-03 10:37 [PATCH 2.6.28-rc6 0/1] Fix OMAP/README docummentation Carlos Chinea
@ 2008-12-03 10:40 ` Carlos Chinea
2008-12-04 23:51 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Carlos Chinea @ 2008-12-03 10:40 UTC (permalink / raw)
To: linux-omap
- Remove section 4 because it has wrong and misleading information
Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com>
---
Documentation/arm/OMAP/README | 39 ---------------------------------------
1 files changed, 0 insertions(+), 39 deletions(-)
diff --git a/Documentation/arm/OMAP/README b/Documentation/arm/OMAP/README
index f8ffb68..038d863 100644
--- a/Documentation/arm/OMAP/README
+++ b/Documentation/arm/OMAP/README
@@ -370,45 +370,6 @@ other users. It then can be included into the public OMAP kernel tree.
processor peripherals or board devices. Improve and maintain the code for your
new processor or board.
-
-4. General guidelines to write clean and OMAP Linux compatible code
--------------------------------------------------------------------
-
-- For register access use the __REG8/16/32() macros. At the moment, see first
-example in include/asm-arm/arch-omap/hardware.h.
-
-Allegedly __REG() makes at least some versions of GCC emit tighter code
-than the more direct wrappers. Presumably by making it easier to use certain
-addressing modes.
-
-Make sure that the registers names are clearly marked as being registers
-(and not addresses of registers). This has to be done by adding a '_REG'
-suffix. E.g.
-
-#define OMAP_ID_REG (__REG32(0xfffed400))
-#define DPLL_CTL_REG (__REG16(0xfffecf00))
-
-__raw_read[bwl] and __raw_write[bwl] are deprecated. They will converted to
-__REG8/16/32() syntax, soon. Don't use anything else like own pointer
-definitions or in[bwl]/out[bwl] etc., too.
-
-- Make read-modify-write register access preemption save. Use spin_lock() and
-spin_unlock() where necessary. If an IRQ handler can access the registers,
-use spin_lock_irqsave(), too.
-
-- Functions declared as __init shouldn't have any references after the kernel
-initialization phase is complete. Usually they should be static as well.
-
-- Don't use return statements at end of void functions.
-
-- Use consistent indentation style. Don't use space indentations. Use tab
-indentations.
-
-- In general use Linux formatting style. See Documentation/CodingStyle for more
-information. If you use GNU emacs, see also chapter 8 of that document how to
-add a linux-c-mode to emacs.
-
-
------------------------------------------------------------------
Last modified 15. March 2006
The OMAP Linux Kernel Team
--
1.5.3.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2.6.28-rc6 1/1] Fix OMAP/README docummentation
2008-12-03 10:40 ` [PATCH 2.6.28-rc6 1/1] " Carlos Chinea
@ 2008-12-04 23:51 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2008-12-04 23:51 UTC (permalink / raw)
To: Carlos Chinea; +Cc: linux-omap
* Carlos Chinea <carlos.chinea@nokia.com> [081203 02:44]:
>
> - Remove section 4 because it has wrong and misleading information
Thanks, pushing today.
Tony
>
> Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com>
> ---
> Documentation/arm/OMAP/README | 39 ---------------------------------------
> 1 files changed, 0 insertions(+), 39 deletions(-)
>
> diff --git a/Documentation/arm/OMAP/README b/Documentation/arm/OMAP/README
> index f8ffb68..038d863 100644
> --- a/Documentation/arm/OMAP/README
> +++ b/Documentation/arm/OMAP/README
> @@ -370,45 +370,6 @@ other users. It then can be included into the public OMAP kernel tree.
> processor peripherals or board devices. Improve and maintain the code for your
> new processor or board.
>
> -
> -4. General guidelines to write clean and OMAP Linux compatible code
> --------------------------------------------------------------------
> -
> -- For register access use the __REG8/16/32() macros. At the moment, see first
> -example in include/asm-arm/arch-omap/hardware.h.
> -
> -Allegedly __REG() makes at least some versions of GCC emit tighter code
> -than the more direct wrappers. Presumably by making it easier to use certain
> -addressing modes.
> -
> -Make sure that the registers names are clearly marked as being registers
> -(and not addresses of registers). This has to be done by adding a '_REG'
> -suffix. E.g.
> -
> -#define OMAP_ID_REG (__REG32(0xfffed400))
> -#define DPLL_CTL_REG (__REG16(0xfffecf00))
> -
> -__raw_read[bwl] and __raw_write[bwl] are deprecated. They will converted to
> -__REG8/16/32() syntax, soon. Don't use anything else like own pointer
> -definitions or in[bwl]/out[bwl] etc., too.
> -
> -- Make read-modify-write register access preemption save. Use spin_lock() and
> -spin_unlock() where necessary. If an IRQ handler can access the registers,
> -use spin_lock_irqsave(), too.
> -
> -- Functions declared as __init shouldn't have any references after the kernel
> -initialization phase is complete. Usually they should be static as well.
> -
> -- Don't use return statements at end of void functions.
> -
> -- Use consistent indentation style. Don't use space indentations. Use tab
> -indentations.
> -
> -- In general use Linux formatting style. See Documentation/CodingStyle for more
> -information. If you use GNU emacs, see also chapter 8 of that document how to
> -add a linux-c-mode to emacs.
> -
> -
> ------------------------------------------------------------------
> Last modified 15. March 2006
> The OMAP Linux Kernel Team
> --
> 1.5.3.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-04 23:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03 10:37 [PATCH 2.6.28-rc6 0/1] Fix OMAP/README docummentation Carlos Chinea
2008-12-03 10:40 ` [PATCH 2.6.28-rc6 1/1] " Carlos Chinea
2008-12-04 23:51 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox