Skip to content

Commit

Permalink
TI816X: Update common omap platform files
Browse files Browse the repository at this point in the history
This patch updates the common platform files with TI816X support.

The approach taken in this patch is to add TI816X as part of OMAP3 variant where
the cpu class is considered as OMAP34XX and the type is TI816X. This means, both
cpu_is_omap34xx() and cpu_is_ti816x() checks return success on TI816X.

A kernel config option CONFIG_SOC_OMAPTI816X is added under OMAP3 to include
support for TI816X build.

Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Hemant Pedanekar authored and Tony Lindgren committed Feb 16, 2011
1 parent e7c7d76 commit 4bd7be2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/arm/mach-omap2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ config ARCH_OMAP3430
default y
select ARCH_OMAP_OTG

config SOC_OMAPTI816X
bool "TI816X support"
depends on ARCH_OMAP3
default y

config OMAP_PACKAGE_ZAF
bool

Expand Down
1 change: 1 addition & 0 deletions arch/arm/plat-omap/include/plat/clkdev_omap.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ struct omap_clk {
#define CK_3517 (1 << 9)
#define CK_36XX (1 << 10) /* 36xx/37xx-specific clocks */
#define CK_443X (1 << 11)
#define CK_TI816X (1 << 12)


#define CK_34XX (CK_3430ES1 | CK_3430ES2PLUS)
Expand Down
1 change: 1 addition & 0 deletions arch/arm/plat-omap/include/plat/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ struct clkops {
#define RATE_IN_3430ES2PLUS (1 << 3) /* 3430 ES >= 2 rates only */
#define RATE_IN_36XX (1 << 4)
#define RATE_IN_4430 (1 << 5)
#define RATE_IN_TI816X (1 << 6)

#define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X)
#define RATE_IN_34XX (RATE_IN_3430ES1 | RATE_IN_3430ES2PLUS)
Expand Down
1 change: 1 addition & 0 deletions arch/arm/plat-omap/include/plat/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ void omap2_set_globals_242x(void);
void omap2_set_globals_243x(void);
void omap2_set_globals_3xxx(void);
void omap2_set_globals_443x(void);
void omap2_set_globals_ti816x(void);

/* These get called from omap2_set_globals_xxxx(), do not call these */
void omap2_set_globals_tap(struct omap_globals *);
Expand Down
18 changes: 18 additions & 0 deletions arch/arm/plat-omap/include/plat/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ static inline int is_omap ##subclass (void) \
return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
}

#define IS_TI_SUBCLASS(subclass, id) \
static inline int is_ti ##subclass (void) \
{ \
return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
}

IS_OMAP_CLASS(7xx, 0x07)
IS_OMAP_CLASS(15xx, 0x15)
IS_OMAP_CLASS(16xx, 0x16)
Expand All @@ -118,6 +124,8 @@ IS_OMAP_SUBCLASS(343x, 0x343)
IS_OMAP_SUBCLASS(363x, 0x363)
IS_OMAP_SUBCLASS(443x, 0x443)

IS_TI_SUBCLASS(816x, 0x816)

#define cpu_is_omap7xx() 0
#define cpu_is_omap15xx() 0
#define cpu_is_omap16xx() 0
Expand All @@ -126,6 +134,7 @@ IS_OMAP_SUBCLASS(443x, 0x443)
#define cpu_is_omap243x() 0
#define cpu_is_omap34xx() 0
#define cpu_is_omap343x() 0
#define cpu_is_ti816x() 0
#define cpu_is_omap44xx() 0
#define cpu_is_omap443x() 0

Expand Down Expand Up @@ -330,6 +339,7 @@ IS_OMAP_TYPE(3517, 0x3517)
# undef cpu_is_omap3530
# undef cpu_is_omap3505
# undef cpu_is_omap3517
# undef cpu_is_ti816x
# define cpu_is_omap3430() is_omap3430()
# define cpu_is_omap3503() (cpu_is_omap3430() && \
(!omap3_has_iva()) && \
Expand All @@ -345,6 +355,7 @@ IS_OMAP_TYPE(3517, 0x3517)
# define cpu_is_omap3517() is_omap3517()
# undef cpu_is_omap3630
# define cpu_is_omap3630() is_omap363x()
# define cpu_is_ti816x() is_ti816x()
#endif

# if defined(CONFIG_ARCH_OMAP4)
Expand Down Expand Up @@ -389,6 +400,10 @@ IS_OMAP_TYPE(3517, 0x3517)
#define OMAP3505_REV(v) (OMAP35XX_CLASS | (0x3505 << 16) | (v << 8))
#define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8))

#define TI816X_CLASS 0x81600034
#define TI8168_REV_ES1_0 TI816X_CLASS
#define TI8168_REV_ES1_1 (TI816X_CLASS | (OMAP_REVBITS_01 << 8))

#define OMAP443X_CLASS 0x44300044
#define OMAP4430_REV_ES1_0 OMAP443X_CLASS
#define OMAP4430_REV_ES2_0 0x44301044
Expand Down Expand Up @@ -419,6 +434,7 @@ IS_OMAP_TYPE(3517, 0x3517)
#define CHIP_IS_OMAP3630ES1_1 (1 << 9)
#define CHIP_IS_OMAP3630ES1_2 (1 << 10)
#define CHIP_IS_OMAP4430ES2 (1 << 11)
#define CHIP_IS_TI816X (1 << 14)

#define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)

Expand Down Expand Up @@ -455,6 +471,7 @@ extern u32 omap3_features;
#define OMAP3_HAS_ISP BIT(4)
#define OMAP3_HAS_192MHZ_CLK BIT(5)
#define OMAP3_HAS_IO_WAKEUP BIT(6)
#define OMAP3_HAS_SDRC BIT(7)

#define OMAP3_HAS_FEATURE(feat,flag) \
static inline unsigned int omap3_has_ ##feat(void) \
Expand All @@ -469,5 +486,6 @@ OMAP3_HAS_FEATURE(neon, NEON)
OMAP3_HAS_FEATURE(isp, ISP)
OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
OMAP3_HAS_FEATURE(sdrc, SDRC)

#endif

0 comments on commit 4bd7be2

Please sign in to comment.