lkml.org 
[lkml]   [2009]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 1/8] omap: Fix incorrect 730 vs 850 detection
    From
    Date
    Commit cd92204924fafbd5c7241dfd12ca3176d542e0c5 added
    support for omap850. However, the patch accidentally
    removed the wrong ifdef:

    # define cpu_is_omap730() 1
    # endif
    #endif
    +#else
    +# if defined(CONFIG_ARCH_OMAP850)
    +# undef cpu_is_omap850
    +# define cpu_is_omap850() 1
    +# endif
    +#endif

    ...

    void omap2_check_revision(void);

    #endif /* defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) */
    -
    -#endif

    Instead of removing removing the #endif at the end of the file,
    the #endif before #else should have been removed.

    But we cannot have multiple #else statements as pointed out by
    Alistair Buxton <a.j.buxton@gmail.com>. So the fix is to:

    - remove the non-multi-omap special handling, as we need to
    detect between omap730 and omap850 anyways.

    - add the missing #endif back to the end of the file

    Reported-by: Sanjeev Premi <premi@ti.com>
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    ---
    arch/arm/plat-omap/include/mach/cpu.h | 37 ++++++++++++---------------------
    1 files changed, 14 insertions(+), 23 deletions(-)

    diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h
    index 11e73d9..f129efb 100644
    --- a/arch/arm/plat-omap/include/mach/cpu.h
    +++ b/arch/arm/plat-omap/include/mach/cpu.h
    @@ -303,32 +303,21 @@ IS_OMAP_TYPE(3430, 0x3430)
    #define cpu_is_omap2430() 0
    #define cpu_is_omap3430() 0

    -#if defined(MULTI_OMAP1)
    -# if defined(CONFIG_ARCH_OMAP730)
    -# undef cpu_is_omap730
    -# define cpu_is_omap730() is_omap730()
    -# endif
    -# if defined(CONFIG_ARCH_OMAP850)
    -# undef cpu_is_omap850
    -# define cpu_is_omap850() is_omap850()
    -# endif
    -#else
    -# if defined(CONFIG_ARCH_OMAP730)
    -# undef cpu_is_omap730
    -# define cpu_is_omap730() 1
    -# endif
    -#endif
    -#else
    -# if defined(CONFIG_ARCH_OMAP850)
    -# undef cpu_is_omap850
    -# define cpu_is_omap850() 1
    -# endif
    -#endif
    -
    /*
    * Whether we have MULTI_OMAP1 or not, we still need to distinguish
    - * between 330 vs. 1510 and 1611B/5912 vs. 1710.
    + * between 730 vs 850, 330 vs. 1510 and 1611B/5912 vs. 1710.
    */
    +
    +#if defined(CONFIG_ARCH_OMAP730)
    +# undef cpu_is_omap730
    +# define cpu_is_omap730() is_omap730()
    +#endif
    +
    +#if defined(CONFIG_ARCH_OMAP850)
    +# undef cpu_is_omap850
    +# define cpu_is_omap850() is_omap850()
    +#endif
    +
    #if defined(CONFIG_ARCH_OMAP15XX)
    # undef cpu_is_omap310
    # undef cpu_is_omap1510
    @@ -433,3 +422,5 @@ IS_OMAP_TYPE(3430, 0x3430)

    int omap_chip_is(struct omap_chip_id oci);
    void omap2_check_revision(void);
    +
    +#endif


    \
     
     \ /
      Last update: 2009-10-03 00:41    [W:0.027 / U:210.548 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site