Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e6cb146 authored by Afzal Mohammed's avatar Afzal Mohammed Committed by Tony Lindgren
Browse files

ARM: OMAP: am33xx: Update common OMAP machine specific sources



This patch updates the common machine specific source files for
support for AM33XX/AM335x with cpu type, macros for identification of
AM33XX/AM335X device.

Signed-off-by: default avatarAfzal Mohammed <afzal@ti.com>
Signed-off-by: default avatarVaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: default avatarKevin Hilman <khilman@ti.com>
Tested-by: default avatarKevin Hilman <khilman@ti.com>
[tony@atomide.com: updated for map_io and common.h changes, dropped CK_AM33XX]
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 99541195
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3517,6 +3517,8 @@ int __init omap3xxx_clk_init(void)
	} else if (cpu_is_ti816x()) {
		cpu_mask = RATE_IN_TI816X;
		cpu_clkflg = CK_TI816X;
	} else if (cpu_is_am33xx()) {
		cpu_mask = RATE_IN_AM33XX;
	} else if (cpu_is_omap34xx()) {
		if (omap_rev() == OMAP3430_REV_ES1_0) {
			cpu_mask = RATE_IN_3430ES1;
+21 −0
Original line number Diff line number Diff line
@@ -128,6 +128,27 @@ void __init omap2_set_globals_ti816x(void)
{
	__omap2_set_globals(&ti816x_globals);
}

#define AM33XX_TAP_BASE		(AM33XX_CTRL_BASE + \
				TI816X_CONTROL_DEVICE_ID - 0x204)

static struct omap_globals am33xx_globals = {
	.class  = AM335X_CLASS,
	.tap    = AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE),
	.ctrl   = AM33XX_L4_WK_IO_ADDRESS(AM33XX_CTRL_BASE),
	.prm    = AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE),
	.cm     = AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE),
};

void __init omap2_set_globals_am33xx(void)
{
	__omap2_set_globals(&am33xx_globals);
}

void __init am33xx_map_io(void)
{
	omapam33xx_map_common_io();
}
#endif

#if defined(CONFIG_ARCH_OMAP4)
+10 −0
Original line number Diff line number Diff line
@@ -60,6 +60,14 @@ static inline void omapti816x_map_common_io(void)
}
#endif

#ifdef CONFIG_SOC_OMAPAM33XX
extern void omapam33xx_map_common_io(void);
#else
static inline void omapam33xx_map_common_io(void)
{
}
#endif

#ifdef CONFIG_ARCH_OMAP4
extern void omap44xx_map_common_io(void);
#else
@@ -107,6 +115,7 @@ void omap2_set_globals_243x(void);
void omap2_set_globals_3xxx(void);
void omap2_set_globals_443x(void);
void omap2_set_globals_ti816x(void);
void omap2_set_globals_am33xx(void);

/* These get called from omap2_set_globals_xxxx(), do not call these */
void omap2_set_globals_tap(struct omap_globals *);
@@ -117,6 +126,7 @@ void omap2_set_globals_prcm(struct omap_globals *);
void omap242x_map_io(void);
void omap243x_map_io(void);
void omap3_map_io(void);
void am33xx_map_io(void);
void omap4_map_io(void);

/**
+6 −0
Original line number Diff line number Diff line
@@ -340,6 +340,10 @@ static void __init omap3_check_revision(const char **cpu_rev)
			break;
		}
		break;
	case 0xb944:
		omap_revision = AM335X_REV_ES1_0;
		*cpu_rev = "1.0";
		break;
	default:
		/* Unknown default to latest silicon rev as default */
		omap_revision = OMAP3630_REV_ES1_2;
@@ -432,6 +436,8 @@ static void __init omap3_cpuinfo(const char *cpu_rev)
		cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
	} else if (cpu_is_ti816x()) {
		cpu_name = "TI816X";
	} else if (cpu_is_am335x()) {
		cpu_name =  "AM335X";
	} else if (omap3_has_iva() && omap3_has_sgx()) {
		/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
		cpu_name = "OMAP3430/3530";
+24 −0
Original line number Diff line number Diff line
@@ -178,12 +178,29 @@ static struct map_desc omap34xx_io_desc[] __initdata = {

#ifdef CONFIG_SOC_OMAPTI816X
static struct map_desc omapti816x_io_desc[] __initdata = {
	{
		.virtual	= L4_34XX_VIRT,
		.pfn		= __phys_to_pfn(L4_34XX_PHYS),
		.length		= L4_34XX_SIZE,
		.type		= MT_DEVICE
	}
};
#endif

#ifdef CONFIG_SOC_OMAPAM33XX
static struct map_desc omapam33xx_io_desc[] __initdata = {
	{
		.virtual	= L4_34XX_VIRT,
		.pfn		= __phys_to_pfn(L4_34XX_PHYS),
		.length		= L4_34XX_SIZE,
		.type		= MT_DEVICE
	},
	{
		.virtual	= L4_WK_AM33XX_VIRT,
		.pfn		= __phys_to_pfn(L4_WK_AM33XX_PHYS),
		.length		= L4_WK_AM33XX_SIZE,
		.type		= MT_DEVICE
	}
};
#endif

@@ -270,6 +287,13 @@ void __init omapti816x_map_common_io(void)
}
#endif

#ifdef CONFIG_SOC_OMAPAM33XX
void __init omapam33xx_map_common_io(void)
{
	iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc));
}
#endif

#ifdef CONFIG_ARCH_OMAP4
void __init omap44xx_map_common_io(void)
{
Loading