omap: generic: introduce a single check_revision
Subsystems (4)
PATCH v3 3/9 omap: generic: introduce a single check_revision
Introduce a single omap generic check_revision that routes the request to the right revision of check_revision.
Note: OMAP1 and OMAP2+ are not built into a single kernel. This allows for the headers definitions of omap1_check_revision() and omap2_check_revision() to be used without #ifdefs and additional cpu checks in our single check_revision.
---
V3: comments from http://marc.info/?t=127747252000003&r=1&w=2
fixed
V2: comments from http://marc.info/?t=127725956100006&r=1&w=2
fixed
V1: original
arch/arm/mach-omap1/io.c | 3 +-- arch/arm/mach-omap2/io.c | 2 +- arch/arm/plat-omap/common.c | 6 ++++++ arch/arm/plat-omap/include/plat/cpu.h | 13 ++++++++++++- 4 files changed, 20 insertions(+), 4 deletions(-)
arch/arm/mach-omap1/io.c +1 -2
@@ -20,7 +20,6 @@#include "clock.h" -extern void omap1_check_revision (void );extern void omap_sram_init (void );/*
@@ -102,7 +101,7 @@ void __init omap1_map_common_io(void)/* We want to check CPU revision early for cpu_is_omapxxxx() macros. * IO space mapping must be initialized before we can do that. */ -omap1_check_revision (); +omap_check_revision ();#if defined (CONFIG_ARCH_OMAP730 ) || defined (CONFIG_ARCH_OMAP850 )if (cpu_is_omap7xx ()) {
arch/arm/mach-omap2/io.c +1 -1
@@ -238,7 +238,7 @@ static void __init _omap2_map_common_io(void)local_flush_tlb_all ();flush_cache_all (); -omap2_check_revision (); +omap_check_revision ();omap_sram_init (); }
arch/arm/plat-omap/common.c +6 -0
@@ -89,6 +89,12 @@ void __init omap_reserve(void)omap_vram_reserve_sdram_lmb (); } +void __init omap_check_revision (void ) +{ +omap1_check_revision (); +omap2_check_revision (); +} +/* * 32KHz clocksource ... always available, on pretty most chips except * OMAP 730 and 1510. Other timers could be used as clocksources, with
arch/arm/plat-omap/include/plat/cpu.h +12 -1
@@ -431,7 +431,18 @@ IS_OMAP_TYPE(3517, 0x3517)int omap_chip_is (struct omap_chip_id oci); -void omap2_check_revision (void ); +#ifdef CONFIG_ARCH_OMAP2PLUS +extern void omap2_check_revision (void ); +#else +static inline void omap2_check_revision (void ) {} +#endif + +#ifdef CONFIG_ARCH_OMAP1 +extern void omap1_check_revision (void ); +#else +static inline void omap1_check_revision (void ) {} +#endif +void omap_check_revision (void );/* * Runtime detection of OMAP3 features
Signature · 1 line
1.6.3.3
Quoted 104 lines
-----Original Message-----
From: Menon, Nishanth
Sent: Friday, June 25, 2010 9:55 PM
To: linux-omap
Cc: Tony Lindgren; Menon, Nishanth; Angelo Arrifano; Zebediah C. McClure; Alistair Buxton; Grazvydas Ignotas; Paul Walmsley; Premi, Sanjeev; Shilimkar, Santosh; Guruswamy, Senthilvadivu; Kevin Hilman; DebBarma, Tarun Kanti; Tomi Valkeinen; Aaro Koskinen; Pandita, Vikram; S, Vishwanath; linux- [email protected]
Subject: [PATCH 3/9 v3] omap: generic: introduce a singlecheck_revisionIntroduce a single omap generic
check_revisionthat routes the request to the right revision ofcheck_revision.Note: OMAP1 and OMAP2+ are not built into a single kernel. This allows for the headers definitions of
omap1_check_revision()andomap2_check_revision()to be used without #ifdefs and additional cpu checks in our singlecheck_revision.Cc Tony Lindgren <[email protected]>Cc Angelo Arrifano <[email protected]>Cc "Zebediah C. McClure" <[email protected]>Cc Alistair Buxton <[email protected]>Cc Grazvydas Ignotas <[email protected]>Cc Paul Walmsley <[email protected]>Cc Sanjeev Premi <[email protected]>Cc Santosh Shilimkar <[email protected]>Cc Senthilvadivu Gurusamy <[email protected]>Cc Kevin Hilman <[email protected]>Cc Tarun Kanti DebBarma <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Aaro Koskinen <[email protected]>Cc Vikram Pandita <[email protected]>Cc Vishwanath S <[email protected]>Signed-off-by Nishanth Menon <[email protected]>---
V3: comments from http://marc.info/?t=127747252000003&r=1&w=2
fixed
V2: comments from http://marc.info/?t=127725956100006&r=1&w=2
fixed
V1: originalarch/arm/mach-omap1/io.c | 3 +-- arch/arm/mach-omap2/io.c | 2 +- arch/arm/plat-omap/common.c | 6 ++++++ arch/arm/plat-omap/include/plat/cpu.h | 13 ++++++++++++- 4 files changed, 20 insertions(+), 4 deletions(-)arch/arm/mach-omap1/io.c +1
-2@@ -20,7 +20,6 @@#include "clock.h" -extern void omap1_check_revision (void );extern void omap_sram_init (void );/* @@ -102,7 +101,7 @@ void __init omap1_map_common_io(void)/* We want to check CPU revision early for cpu_is_omapxxxx() macros. * IO space mapping must be initialized before we can do that. */ -omap1_check_revision (); +omap_check_revision ();#if defined (CONFIG_ARCH_OMAP730 ) || defined (CONFIG_ARCH_OMAP850 )if (cpu_is_omap7xx ()) {arch/arm/mach-omap2/io.c +1
-1@@ -238,7 +238,7 @@ static void __init _omap2_map_common_io(void)local_flush_tlb_all ();flush_cache_all (); -omap2_check_revision (); +omap_check_revision ();omap_sram_init (); }arch/arm/plat-omap/common.c +6
-0@@ -89,6 +89,12 @@ void __init omap_reserve(void)omap_vram_reserve_sdram_lmb (); } +void __init omap_check_revision (void ) +{ +omap1_check_revision (); +omap2_check_revision (); +} +/* * 32KHz clocksource ... always available, on pretty most chips except * OMAP 730 and 1510. Other timers could be used as clocksources, with arch/arm/plat-omap/include/plat/cpu.h +0
-0
arch/arm/plat-omap/include/plat/cpu.h IS_OMAP_TYPE(3517, 0x3517) · line 437
Quoted 8 lines
arch/arm/plat-omap/include/plat/cpu.h +4
-1@@ -431,7 +431,18 @@ IS_OMAP_TYPE(3517, 0x3517)int omap_chip_is (struct omap_chip_id oci); -void omap2_check_revision (void ); +#ifdef CONFIG_ARCH_OMAP2PLUS +extern void omap2_check_revision (void ); +#else +static inline void omap2_check_revision (void ) {}
I think codingstyle suggest empty function braces to be on next line like
static inline void omap2_check_revision(void)
{}
arch/arm/plat-omap/include/plat/cpu.h IS_OMAP_TYPE(3517, 0x3517) · line 448
Quoted 11 lines
arch/arm/plat-omap/include/plat/cpu.h +8
-0+#endif + +#ifdef CONFIG_ARCH_OMAP1 +extern void omap1_check_revision (void ); +#else +static inline void omap1_check_revision (void ) {} +#endif +void omap_check_revision (void );/* * Runtime detection of OMAP3 features
Otherwise patch looks good to me.
Quoted 2 lines
--
1.6.3.3
Shilimkar, Santosh had written, on 06/25/2010 11:41 AM, the following:
Quoted 106 lines
Quoted 106 lines
-----Original Message-----
From: Menon, Nishanth
Sent: Friday, June 25, 2010 9:55 PM
To: linux-omap
Cc: Tony Lindgren; Menon, Nishanth; Angelo Arrifano; Zebediah C. McClure; Alistair Buxton; Grazvydas Ignotas; Paul Walmsley; Premi, Sanjeev; Shilimkar, Santosh; Guruswamy, Senthilvadivu; Kevin Hilman; DebBarma, Tarun Kanti; Tomi Valkeinen; Aaro Koskinen; Pandita, Vikram; S, Vishwanath; linux- [email protected]
Subject: [PATCH 3/9 v3] omap: generic: introduce a singlecheck_revisionIntroduce a single omap generic
check_revisionthat routes the request to the right revision ofcheck_revision.Note: OMAP1 and OMAP2+ are not built into a single kernel. This allows for the headers definitions of
omap1_check_revision()andomap2_check_revision()to be used without #ifdefs and additional cpu checks in our singlecheck_revision.Cc Tony Lindgren <[email protected]>Cc Angelo Arrifano <[email protected]>Cc "Zebediah C. McClure" <[email protected]>Cc Alistair Buxton <[email protected]>Cc Grazvydas Ignotas <[email protected]>Cc Paul Walmsley <[email protected]>Cc Sanjeev Premi <[email protected]>Cc Santosh Shilimkar <[email protected]>Cc Senthilvadivu Gurusamy <[email protected]>Cc Kevin Hilman <[email protected]>Cc Tarun Kanti DebBarma <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Aaro Koskinen <[email protected]>Cc Vikram Pandita <[email protected]>Cc Vishwanath S <[email protected]>Signed-off-by Nishanth Menon <[email protected]>---
V3: comments from http://marc.info/?t=127747252000003&r=1&w=2
fixed
V2: comments from http://marc.info/?t=127725956100006&r=1&w=2
fixed
V1: originalarch/arm/mach-omap1/io.c | 3 +-- arch/arm/mach-omap2/io.c | 2 +- arch/arm/plat-omap/common.c | 6 ++++++ arch/arm/plat-omap/include/plat/cpu.h | 13 ++++++++++++- 4 files changed, 20 insertions(+), 4 deletions(-)arch/arm/mach-omap1/io.c +1
-2@@ -20,7 +20,6 @@#include "clock.h" -extern void omap1_check_revision (void );extern void omap_sram_init (void );/* @@ -102,7 +101,7 @@ void __init omap1_map_common_io(void)/* We want to check CPU revision early for cpu_is_omapxxxx() macros. * IO space mapping must be initialized before we can do that. */ -omap1_check_revision (); +omap_check_revision ();#if defined (CONFIG_ARCH_OMAP730 ) || defined (CONFIG_ARCH_OMAP850 )if (cpu_is_omap7xx ()) {arch/arm/mach-omap2/io.c +1
-1@@ -238,7 +238,7 @@ static void __init _omap2_map_common_io(void)local_flush_tlb_all ();flush_cache_all (); -omap2_check_revision (); +omap_check_revision ();omap_sram_init (); }arch/arm/plat-omap/common.c +6
-0@@ -89,6 +89,12 @@ void __init omap_reserve(void)omap_vram_reserve_sdram_lmb (); } +void __init omap_check_revision (void ) +{ +omap1_check_revision (); +omap2_check_revision (); +} +/* * 32KHz clocksource ... always available, on pretty most chips except * OMAP 730 and 1510. Other timers could be used as clocksources, with arch/arm/plat-omap/include/plat/cpu.h +0
-0@@ -431,7 +431,18 @@ IS_OMAP_TYPE(3517, 0x3517)
Quoted 10 lines
arch/arm/plat-omap/include/plat/cpu.h IS_OMAP_TYPE(3517, 0x3517) · line 437
Quoted 6 lines
arch/arm/plat-omap/include/plat/cpu.h +4
-1int omap_chip_is (struct omap_chip_id oci); -void omap2_check_revision (void ); +#ifdef CONFIG_ARCH_OMAP2PLUS +extern void omap2_check_revision (void ); +#else +static inline void omap2_check_revision (void ) {}I think codingstyle suggest empty function braces to be on next line like
static inline voidomap2_check_revision(void)
{}
are you sure about that? can you point me to the documentation for that? Style I followed is off:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=72651f788f4e3536149ef5e7ddfbed96a8f14d2f;hb=HEAD#l661
Quoted 9 lines
Quoted 9 lines
arch/arm/plat-omap/include/plat/cpu.h +8
-0+#endif + +#ifdef CONFIG_ARCH_OMAP1 +extern void omap1_check_revision (void ); +#else +static inline void omap1_check_revision (void ) {} +#endif +void omap_check_revision (void );
Quoted 4 lines
arch/arm/plat-omap/include/plat/cpu.h IS_OMAP_TYPE(3517, 0x3517) · line 448
Quoted 2 lines
arch/arm/plat-omap/include/plat/cpu.h +0
-0/* * Runtime detection of OMAP3 features Otherwise patch looks good to me.
thanks for the ack.
Quoted 3 lines
Quoted 2 lines
--
1.6.3.3
Signature · 2 lines
Regards, Nishanth Menon
Quoted 129 lines
-----Original Message-----
From: Menon, Nishanth
Sent: Friday, June 25, 2010 11:02 PM
To: Shilimkar, Santosh
Cc: linux-omap; Tony Lindgren; Angelo Arrifano; Zebediah C. McClure; Alistair Buxton; Grazvydas Ignotas; Paul Walmsley; Premi, Sanjeev; Guruswamy, Senthilvadivu; Kevin Hilman; DebBarma, Tarun Kanti; Tomi Valkeinen; Aaro Koskinen; Pandita, Vikram; S, Vishwanath
Subject: Re: [PATCH 3/9 v3] omap: generic: introduce a singlecheck_revisionShilimkar, Santosh had written, on 06/25/2010 11:41 AM, the following:
Quoted 5 lines
Quoted 5 lines
-----Original Message-----
From: Menon, Nishanth
Sent: Friday, June 25, 2010 9:55 PM
To: linux-omap
Cc: Tony Lindgren; Menon, Nishanth; Angelo Arrifano; Zebediah C. McClure; Alistair Buxton;Grazvydas
Quoted 1 line
Quoted 1 line
Ignotas; Paul Walmsley; Premi, Sanjeev; Shilimkar, Santosh; Guruswamy, Senthilvadivu; Kevin
Hilman;
Quoted 100 lines
Quoted 100 lines
DebBarma, Tarun Kanti; Tomi Valkeinen; Aaro Koskinen; Pandita, Vikram; S, Vishwanath; linux- [email protected]
Subject: [PATCH 3/9 v3] omap: generic: introduce a singlecheck_revisionIntroduce a single omap generic
check_revisionthat routes the request to the right revision ofcheck_revision.Note: OMAP1 and OMAP2+ are not built into a single kernel. This allows for the headers definitions of
omap1_check_revision()andomap2_check_revision()to be used without #ifdefs and additional cpu checks in our singlecheck_revision.Cc Tony Lindgren <[email protected]>Cc Angelo Arrifano <[email protected]>Cc "Zebediah C. McClure" <[email protected]>Cc Alistair Buxton <[email protected]>Cc Grazvydas Ignotas <[email protected]>Cc Paul Walmsley <[email protected]>Cc Sanjeev Premi <[email protected]>Cc Santosh Shilimkar <[email protected]>Cc Senthilvadivu Gurusamy <[email protected]>Cc Kevin Hilman <[email protected]>Cc Tarun Kanti DebBarma <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Aaro Koskinen <[email protected]>Cc Vikram Pandita <[email protected]>Cc Vishwanath S <[email protected]>Signed-off-by Nishanth Menon <[email protected]>---
V3: comments from http://marc.info/?t=127747252000003&r=1&w=2
fixed
V2: comments from http://marc.info/?t=127725956100006&r=1&w=2
fixed
V1: originalarch/arm/mach-omap1/io.c | 3 +-- arch/arm/mach-omap2/io.c | 2 +- arch/arm/plat-omap/common.c | 6 ++++++ arch/arm/plat-omap/include/plat/cpu.h | 13 ++++++++++++- 4 files changed, 20 insertions(+), 4 deletions(-)arch/arm/mach-omap1/io.c +1
-2@@ -20,7 +20,6 @@#include "clock.h" -extern void omap1_check_revision (void );extern void omap_sram_init (void );/* @@ -102,7 +101,7 @@ void __init omap1_map_common_io(void)/* We want to check CPU revision early for cpu_is_omapxxxx() macros. * IO space mapping must be initialized before we can do that. */ -omap1_check_revision (); +omap_check_revision ();#if defined (CONFIG_ARCH_OMAP730 ) || defined (CONFIG_ARCH_OMAP850 )if (cpu_is_omap7xx ()) {arch/arm/mach-omap2/io.c +1
-1@@ -238,7 +238,7 @@ static void __init _omap2_map_common_io(void)local_flush_tlb_all ();flush_cache_all (); -omap2_check_revision (); +omap_check_revision ();omap_sram_init (); }arch/arm/plat-omap/common.c +6
-0@@ -89,6 +89,12 @@ void __init omap_reserve(void)omap_vram_reserve_sdram_lmb (); } +void __init omap_check_revision (void ) +{ +omap1_check_revision (); +omap2_check_revision (); +} +/* * 32KHz clocksource ... always available, on pretty most chips except * OMAP 730 and 1510. Other timers could be used as clocksources, with arch/arm/plat-omap/include/plat/cpu.h +0
-0@@ -431,7 +431,18 @@ IS_OMAP_TYPE(3517, 0x3517)Quoted 10 lines
arch/arm/plat-omap/include/plat/cpu.h IS_OMAP_TYPE(3517, 0x3517) · line 437
Quoted 6 lines
arch/arm/plat-omap/include/plat/cpu.h +4
-1int omap_chip_is (struct omap_chip_id oci); -void omap2_check_revision (void ); +#ifdef CONFIG_ARCH_OMAP2PLUS +extern void omap2_check_revision (void ); +#else +static inline void omap2_check_revision (void ) {}I think codingstyle suggest empty function braces to be on next line like
static inline voidomap2_check_revision(void)
{}
Quoted 6 lines
are you sure about that? can you point me to the documentation for that?
Style I followed is off:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-
2.6.git;a=blob;f=Documentation/SubmittingPatches;h=72651f788f4e3536149ef5e7ddfbed96a8f14d2f;hb=HEAD#l 661
I got similar comment long back and hence remembered. Looks like it's not explicitly documented
Quoted 23 lines
Quoted 9 lines
Quoted 9 lines
arch/arm/plat-omap/include/plat/cpu.h +8
-0+#endif + +#ifdef CONFIG_ARCH_OMAP1 +extern void omap1_check_revision (void ); +#else +static inline void omap1_check_revision (void ) {} +#endif +void omap_check_revision (void );Quoted 4 lines
arch/arm/plat-omap/include/plat/cpu.h IS_OMAP_TYPE(3517, 0x3517) · line 448
Quoted 2 lines
arch/arm/plat-omap/include/plat/cpu.h +0
-0/* * Runtime detection of OMAP3 features Otherwise patch looks good to me.
thanks for the ack.
Quoted 3 lines
Quoted 2 lines
--
1.6.3.3--
Regards,
Nishanth Menon
static inline function style (was Re: [PATCH 3/9 v3] omap: generic: introduce a single check_revision)
Shilimkar, Santosh had written, on 06/25/2010 01:07 PM, the following:
Quoted 3 lines
Quoted 3 lines
-----Original Message-----
From: Menon, Nishanth
Sent: Friday, June 25, 2010 11:02 PM
[..]
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
arch/arm/plat-omap/include/plat/cpu.h IS_OMAP_TYPE(3517, 0x3517) · line 437
Quoted 11 lines
arch/arm/plat-omap/include/plat/cpu.h +4
-1@@ -431,7 +431,18 @@ IS_OMAP_TYPE(3517, 0x3517)int omap_chip_is (struct omap_chip_id oci); -void omap2_check_revision (void ); +#ifdef CONFIG_ARCH_OMAP2PLUS +extern void omap2_check_revision (void ); +#else +static inline void omap2_check_revision (void ) {}I think codingstyle suggest empty function braces to be on next line like
static inline voidomap2_check_revision(void)
{}
Quoted 7 lines
Quoted 6 lines
are you sure about that? can you point me to the documentation for that?
Style I followed is off:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-
2.6.git;a=blob;f=Documentation/SubmittingPatches;h=72651f788f4e3536149ef5e7ddfbed96a8f14d2f;hb=HEAD#l 661I got similar comment long back and hence remembered. Looks like it's not explicitly documented
changing subject to get folks interested..
i would think that checkpatch should crib about it, but it being an automated script, could be messed up sometimes..
but I am curious -
static inline void foo(void) { }
static inline int foo(void)
{
return -ENODEV;
}is the style I have seen to date. usually without a functional code, it made more sense to have it out of line and more in the style of a normal function..
could someone give any suggestions on this?
Signature · 2 lines
Regards, Nishanth Menon
Tony Lindgren
maintainerQuoted 39 lines · Nishanth Menon
arch/arm/mach-omap2/io.c +1
-1@@ -238,7 +238,7 @@ static void __init _omap2_map_common_io(void)local_flush_tlb_all ();flush_cache_all (); -omap2_check_revision (); +omap_check_revision ();omap_sram_init (); }arch/arm/plat-omap/common.c +6
-0@@ -89,6 +89,12 @@ void __init omap_reserve(void)omap_vram_reserve_sdram_lmb (); } +void __init omap_check_revision (void ) +{ +omap1_check_revision (); +omap2_check_revision (); +} +/* * 32KHz clocksource ... always available, on pretty most chips except * OMAP 730 and 1510. Other timers could be used as clocksources, with arch/arm/plat-omap/include/plat/cpu.h +2
-1@@ -431,7 +431,18 @@ IS_OMAP_TYPE(3517, 0x3517)int omap_chip_is (struct omap_chip_id oci); -void omap2_check_revision (void ); +#ifdef CONFIG_ARCH_OMAP2PLUS +extern void omap2_check_revision (void );
arch/arm/plat-omap/include/plat/cpu.h IS_OMAP_TYPE(3517, 0x3517) · line 445
Quoted 10 lines
arch/arm/plat-omap/include/plat/cpu.h +10
-0+#else +static inline void omap2_check_revision (void ) {} +#endif + +#ifdef CONFIG_ARCH_OMAP1 +extern void omap1_check_revision (void ); +#else +static inline void omap1_check_revision (void ) {} +#endif +void omap_check_revision (void );
Hmm, to me it seems like we should have static omap_check_revision in both mach-omap1/id.c and mach-omap2/id.c. Or do we need to call these anywhere else outside both id.c files?
Then these can set u32 omap_revision flags in plat-omap/common.c, and then we can have a common omap_get_revision() or something in plat-omap/common.c?
There should not be need for cpu_is_omapxxxx tests for getting the revision after it's initialized.
Regards,
Tony
Tony Lindgren had written, on 07/07/2010 07:36 AM, the following:
Quoted 46 lines · Nishanth Menon
Quoted 45 lines
arch/arm/mach-omap2/io.c +1
-1@@ -238,7 +238,7 @@ static void __init _omap2_map_common_io(void)local_flush_tlb_all ();flush_cache_all (); -omap2_check_revision (); +omap_check_revision ();omap_sram_init (); }arch/arm/plat-omap/common.c +6
-0@@ -89,6 +89,12 @@ void __init omap_reserve(void)omap_vram_reserve_sdram_lmb (); } +void __init omap_check_revision (void ) +{ +omap1_check_revision (); +omap2_check_revision (); +} +/* * 32KHz clocksource ... always available, on pretty most chips except * OMAP 730 and 1510. Other timers could be used as clocksources, with arch/arm/plat-omap/include/plat/cpu.h +8
-1@@ -431,7 +431,18 @@ IS_OMAP_TYPE(3517, 0x3517)int omap_chip_is (struct omap_chip_id oci); -void omap2_check_revision (void ); +#ifdef CONFIG_ARCH_OMAP2PLUS +extern void omap2_check_revision (void ); +#else +static inline void omap2_check_revision (void ) {} +#endif + +#ifdef CONFIG_ARCH_OMAP1 +extern void omap1_check_revision (void );
Quoted 8 lines
arch/arm/plat-omap/include/plat/cpu.h IS_OMAP_TYPE(3517, 0x3517) · line 445
Quoted 4 lines
arch/arm/plat-omap/include/plat/cpu.h +4
-0+#else +static inline void omap1_check_revision (void ) {} +#endif +void omap_check_revision (void );Hmm, to me it seems like we should have static
omap_check_revisionin bothmach-omap1/id.candmach-omap2/id.c. Or do we need to call these anywhere else outside bothid.cfiles?
check_revision is called from mach-omap[12]/io.c - so no chance of the check_revision to be static..
Quoted 4 lines
Then these can set u32
omap_revisionflags inplat-omap/common.c, and then we can have a commonomap_get_revision()or something inplat-omap/common.c?
i think I managed to get rid of it entirely.. ref: attached patch
If we are ok with this, I will repost the series (i squashed omap1-rename-check_revision into this patch).
Quoted 3 lines
There should not be need for
cpu_is_omapxxxxtests for getting the revision after it's initialized.
I am not sure.. if you would like drivers to be modprobabe, there may be quirks that you'd want to enable based on cpu_is_omapxxx checks. so it probably does not make sense to __initdata the revision/feature variables.
Signature · 2 lines
Regards, Nishanth Menon
Quoted 1 line
From
f72070e575433ad07ed018aef5c43677424003d0Mon Sep 17 00:00:00 2001
From: Nishanth Menon <[email protected]>
Date: Fri, 21 May 2010 12:09:33 -0500
Subject: [PATCH 2/7] omap: generic: introduce a single check_revision
Introduce a single omap generic check_revision that routes the request to the right revision of check_revision.
Note: OMAP1 and OMAP2+ are not built into a single kernel.
--- arch/arm/mach-omap1/io.c | 1 - arch/arm/mach-omap2/id.c | 2 +- arch/arm/mach-omap2/io.c | 2 +- arch/arm/plat-omap/include/plat/cpu.h | 3 ++- 4 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-omap1/io.c +0 -1
@@ -20,7 +20,6 @@#include "clock.h" -extern void omap_check_revision (void );extern void omap_sram_init (void );/*
arch/arm/mach-omap2/id.c +1 -1
@@ -371,7 +371,7 @@ static void __init omap3_cpuinfo(void)/* * Try to detect the exact revision of the omap we're running on */ -void __init omap2_check_revision (void ) +void __init omap_check_revision (void ) {/* * At this point we have an idea about the processor revision set
arch/arm/mach-omap2/io.c +1 -1
@@ -238,7 +238,7 @@ static void __init _omap2_map_common_io(void)local_flush_tlb_all ();flush_cache_all (); -omap2_check_revision (); +omap_check_revision ();omap_sram_init (); }
arch/arm/plat-omap/include/plat/cpu.h +2 -1
@@ -431,7 +431,8 @@ IS_OMAP_TYPE(3517, 0x3517)int omap_chip_is (struct omap_chip_id oci); -void omap2_check_revision (void ); + +void omap_check_revision (void );/* * Runtime detection of OMAP3 features
Signature · 1 line
1.6.3.3
Hi,
Quoted 3 lines · ext Nishanth Menon
I am not sure.. if you would like drivers to be modprobabe, there may be quirks that you'd want to enable based on
cpu_is_omapxxxchecks. so it probably does not make sense to__initdatathe revision/feature variables.
can't you pass the quirks via pdata, then ?
Signature · 3 lines
balbi DefectiveByDesign.org