Commit 2589d056 authored by Tony Lindgren's avatar Tony Lindgren

Merge tag 'tags/omap-for-v3.8/devel-prcm-signed' into...

Merge tag 'tags/omap-for-v3.8/devel-prcm-signed' into omap-for-v3.8/cleanup-headers-prepare-multiplatform-v3

omap prcm changes via Paul Walmsley <paul@pwsan.com>:

Some miscellaneous OMAP hwmod changes for 3.8, along with a PRM
change needed for one of the hwmod patches to function.

Basic test logs for this branch on top of Tony's
omap-for-v3.8/clock branch at commit
558a0780 are here:

http://www.pwsan.com/omap/testlogs/hwmod_devel_a_3.8/20121121161522/

However, omap-for-v3.8/clock at 558a0780 does not include some fixes
that are needed for a successful test.  With several reverts,
fixes, and workarounds applied, the following test logs were
obtained:

http://www.pwsan.com/omap/testlogs/TEST_hwmod_devel_a_3.8/20121121162719/

which indicate that the series tests cleanly.

Conflicts:
	arch/arm/mach-omap2/cm33xx.c
	arch/arm/mach-omap2/io.c
	arch/arm/mach-omap2/prm_common.c
parents 42a1cc9c 8b9c1ac2
...@@ -93,4 +93,6 @@ extern int ocpi_enable(void); ...@@ -93,4 +93,6 @@ extern int ocpi_enable(void);
static inline int ocpi_enable(void) { return 0; } static inline int ocpi_enable(void) { return 0; }
#endif #endif
extern u32 omap1_get_reset_sources(void);
#endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/platform_data/omap-wd-timer.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <mach/tc.h> #include <mach/tc.h>
...@@ -447,18 +449,31 @@ static struct resource wdt_resources[] = { ...@@ -447,18 +449,31 @@ static struct resource wdt_resources[] = {
}; };
static struct platform_device omap_wdt_device = { static struct platform_device omap_wdt_device = {
.name = "omap_wdt", .name = "omap_wdt",
.id = -1, .id = -1,
.num_resources = ARRAY_SIZE(wdt_resources), .num_resources = ARRAY_SIZE(wdt_resources),
.resource = wdt_resources, .resource = wdt_resources,
}; };
static int __init omap_init_wdt(void) static int __init omap_init_wdt(void)
{ {
struct omap_wd_timer_platform_data pdata;
int ret;
if (!cpu_is_omap16xx()) if (!cpu_is_omap16xx())
return -ENODEV; return -ENODEV;
return platform_device_register(&omap_wdt_device); pdata.read_reset_sources = omap1_get_reset_sources;
ret = platform_device_register(&omap_wdt_device);
if (!ret) {
ret = platform_device_add_data(&omap_wdt_device, &pdata,
sizeof(pdata));
if (ret)
platform_device_del(&omap_wdt_device);
}
return ret;
} }
subsys_initcall(omap_init_wdt); subsys_initcall(omap_init_wdt);
#endif #endif
...@@ -4,12 +4,24 @@ ...@@ -4,12 +4,24 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/io.h> #include <linux/io.h>
#include <plat/prcm.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include "iomap.h"
#include "common.h" #include "common.h"
/* ARM_SYSST bit shifts related to SoC reset sources */
#define ARM_SYSST_POR_SHIFT 5
#define ARM_SYSST_EXT_RST_SHIFT 4
#define ARM_SYSST_ARM_WDRST_SHIFT 2
#define ARM_SYSST_GLOB_SWRST_SHIFT 1
/* Standardized reset source bits (across all OMAP SoCs) */
#define OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT 0
#define OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT 1
#define OMAP_MPU_WD_RST_SRC_ID_SHIFT 3
#define OMAP_EXTWARM_RST_SRC_ID_SHIFT 5
void omap1_restart(char mode, const char *cmd) void omap1_restart(char mode, const char *cmd)
{ {
/* /*
...@@ -23,3 +35,28 @@ void omap1_restart(char mode, const char *cmd) ...@@ -23,3 +35,28 @@ void omap1_restart(char mode, const char *cmd)
omap_writew(1, ARM_RSTCT1); omap_writew(1, ARM_RSTCT1);
} }
/**
* omap1_get_reset_sources - return the source of the SoC's last reset
*
* Returns bits that represent the last reset source for the SoC. The
* format is standardized across OMAPs for use by the OMAP watchdog.
*/
u32 omap1_get_reset_sources(void)
{
u32 ret = 0;
u16 rs;
rs = __raw_readw(OMAP1_IO_ADDRESS(ARM_SYSST));
if (rs & (1 << ARM_SYSST_POR_SHIFT))
ret |= 1 << OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT;
if (rs & (1 << ARM_SYSST_EXT_RST_SHIFT))
ret |= 1 << OMAP_EXTWARM_RST_SRC_ID_SHIFT;
if (rs & (1 << ARM_SYSST_ARM_WDRST_SHIFT))
ret |= 1 << OMAP_MPU_WD_RST_SRC_ID_SHIFT;
if (rs & (1 << ARM_SYSST_GLOB_SWRST_SHIFT))
ret |= 1 << OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT;
return ret;
}
...@@ -34,6 +34,7 @@ config ARCH_OMAP2 ...@@ -34,6 +34,7 @@ config ARCH_OMAP2
select CPU_V6 select CPU_V6
select MULTI_IRQ_HANDLER select MULTI_IRQ_HANDLER
select SOC_HAS_OMAP2_SDRC select SOC_HAS_OMAP2_SDRC
select COMMON_CLK
config ARCH_OMAP3 config ARCH_OMAP3
bool "TI OMAP3" bool "TI OMAP3"
...@@ -47,6 +48,7 @@ config ARCH_OMAP3 ...@@ -47,6 +48,7 @@ config ARCH_OMAP3
select PM_OPP if PM select PM_OPP if PM
select PM_RUNTIME if CPU_IDLE select PM_RUNTIME if CPU_IDLE
select SOC_HAS_OMAP2_SDRC select SOC_HAS_OMAP2_SDRC
select COMMON_CLK
select USB_ARCH_HAS_EHCI if USB_SUPPORT select USB_ARCH_HAS_EHCI if USB_SUPPORT
config ARCH_OMAP4 config ARCH_OMAP4
...@@ -68,6 +70,7 @@ config ARCH_OMAP4 ...@@ -68,6 +70,7 @@ config ARCH_OMAP4
select PM_OPP if PM select PM_OPP if PM
select PM_RUNTIME if CPU_IDLE select PM_RUNTIME if CPU_IDLE
select USB_ARCH_HAS_EHCI if USB_SUPPORT select USB_ARCH_HAS_EHCI if USB_SUPPORT
select COMMON_CLK
config SOC_OMAP5 config SOC_OMAP5
bool "TI OMAP5" bool "TI OMAP5"
...@@ -77,6 +80,7 @@ config SOC_OMAP5 ...@@ -77,6 +80,7 @@ config SOC_OMAP5
select CPU_V7 select CPU_V7
select HAVE_SMP select HAVE_SMP
select SOC_HAS_REALTIME_COUNTER select SOC_HAS_REALTIME_COUNTER
select COMMON_CLK
comment "OMAP Core Type" comment "OMAP Core Type"
depends on ARCH_OMAP2 depends on ARCH_OMAP2
...@@ -111,6 +115,7 @@ config SOC_AM33XX ...@@ -111,6 +115,7 @@ config SOC_AM33XX
select ARM_CPU_SUSPEND if PM select ARM_CPU_SUSPEND if PM
select CPU_V7 select CPU_V7
select MULTI_IRQ_HANDLER select MULTI_IRQ_HANDLER
select COMMON_CLK
config OMAP_PACKAGE_ZAF config OMAP_PACKAGE_ZAF
bool bool
......
...@@ -7,28 +7,34 @@ obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ ...@@ -7,28 +7,34 @@ obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
omap_device.o sram.o omap_device.o sram.o
# INTCPS IP block support - XXX should be moved to drivers/ omap-2-3-common = irq.o
obj-$(CONFIG_ARCH_OMAP2) += irq.o hwmod-common = omap_hwmod.o \
obj-$(CONFIG_ARCH_OMAP3) += irq.o omap_hwmod_common_data.o
obj-$(CONFIG_SOC_AM33XX) += irq.o clock-common = clock.o clock_common_data.o \
clkt_dpll.o clkt_clksel.o
# Secure monitor API support secure-common = omap-smc.o omap-secure.o
obj-$(CONFIG_ARCH_OMAP3) += omap-smc.o omap-secure.o
obj-$(CONFIG_ARCH_OMAP4) += omap-smc.o omap-secure.o obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common)
obj-$(CONFIG_SOC_OMAP5) += omap-smc.o omap-secure.o obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common)
obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common)
obj-$(CONFIG_SOC_OMAP5) += prm44xx.o $(hwmod-common) $(secure-common)
ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
obj-y += mcbsp.o obj-y += mcbsp.o
endif endif
obj-$(CONFIG_TWL4030_CORE) += omap_twl.o obj-$(CONFIG_TWL4030_CORE) += omap_twl.o
obj-$(CONFIG_SOC_HAS_OMAP2_SDRC) += sdrc.o
# SMP support ONLY available for OMAP4 # SMP support ONLY available for OMAP4
obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o
obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o
obj-$(CONFIG_ARCH_OMAP4) += omap4-common.o omap-wakeupgen.o omap-4-5-common = omap4-common.o omap-wakeupgen.o \
obj-$(CONFIG_SOC_OMAP5) += omap4-common.o omap-wakeupgen.o sleep44xx.o
obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-common)
obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-common)
plus_sec := $(call as-instr,.arch_extension sec,+sec) plus_sec := $(call as-instr,.arch_extension sec,+sec)
AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec) AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec)
...@@ -44,6 +50,11 @@ AFLAGS_sram242x.o :=-Wa,-march=armv6 ...@@ -44,6 +50,11 @@ AFLAGS_sram242x.o :=-Wa,-march=armv6
AFLAGS_sram243x.o :=-Wa,-march=armv6 AFLAGS_sram243x.o :=-Wa,-march=armv6
AFLAGS_sram34xx.o :=-Wa,-march=armv7-a AFLAGS_sram34xx.o :=-Wa,-march=armv7-a
# Restart code (OMAP4/5 currently in omap4-common.c)
obj-$(CONFIG_SOC_OMAP2420) += omap2-restart.o
obj-$(CONFIG_SOC_OMAP2430) += omap2-restart.o
obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o
# Pin multiplexing # Pin multiplexing
obj-$(CONFIG_SOC_OMAP2420) += mux2420.o obj-$(CONFIG_SOC_OMAP2420) += mux2420.o
obj-$(CONFIG_SOC_OMAP2430) += mux2430.o obj-$(CONFIG_SOC_OMAP2430) += mux2430.o
...@@ -53,7 +64,6 @@ obj-$(CONFIG_ARCH_OMAP4) += mux44xx.o ...@@ -53,7 +64,6 @@ obj-$(CONFIG_ARCH_OMAP4) += mux44xx.o
# SMS/SDRC # SMS/SDRC
obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o
# obj-$(CONFIG_ARCH_OMAP3) += sdrc3xxx.o # obj-$(CONFIG_ARCH_OMAP3) += sdrc3xxx.o
obj-$(CONFIG_SOC_HAS_OMAP2_SDRC) += sdrc.o
# OPP table initialization # OPP table initialization
ifeq ($(CONFIG_PM_OPP),y) ifeq ($(CONFIG_PM_OPP),y)
...@@ -66,15 +76,15 @@ endif ...@@ -66,15 +76,15 @@ endif
obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o
ifeq ($(CONFIG_PM),y) ifeq ($(CONFIG_PM),y)
obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o sleep24xx.o obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o
obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o
obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o
obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o
obj-$(CONFIG_ARCH_OMAP4) += sleep44xx.o obj-$(CONFIG_SOC_OMAP5) += omap-mpuss-lowpower.o
obj-$(CONFIG_SOC_OMAP5) += omap-mpuss-lowpower.o sleep44xx.o
obj-$(CONFIG_PM_DEBUG) += pm-debug.o obj-$(CONFIG_PM_DEBUG) += pm-debug.o
obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o
obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o
AFLAGS_sleep24xx.o :=-Wa,-march=armv6 AFLAGS_sleep24xx.o :=-Wa,-march=armv6
AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec) AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec)
...@@ -86,76 +96,82 @@ endif ...@@ -86,76 +96,82 @@ endif
endif endif
ifeq ($(CONFIG_CPU_IDLE),y) ifeq ($(CONFIG_CPU_IDLE),y)
obj-$(CONFIG_ARCH_OMAP3) += cpuidle34xx.o obj-$(CONFIG_ARCH_OMAP3) += cpuidle34xx.o
obj-$(CONFIG_ARCH_OMAP4) += cpuidle44xx.o obj-$(CONFIG_ARCH_OMAP4) += cpuidle44xx.o
endif endif
# PRCM # PRCM
obj-y += prcm.o prm_common.o obj-y += prm_common.o cm_common.o
obj-$(CONFIG_ARCH_OMAP2) += cm2xxx_3xxx.o prm2xxx_3xxx.o obj-$(CONFIG_ARCH_OMAP2) += prm2xxx_3xxx.o prm2xxx.o cm2xxx.o
obj-$(CONFIG_ARCH_OMAP3) += cm2xxx_3xxx.o prm2xxx_3xxx.o obj-$(CONFIG_ARCH_OMAP3) += prm2xxx_3xxx.o prm3xxx.o cm3xxx.o
obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o
obj-$(CONFIG_SOC_AM33XX) += prm33xx.o cm33xx.o obj-$(CONFIG_SOC_AM33XX) += prm33xx.o cm33xx.o
omap-prcm-4-5-common = cminst44xx.o cm44xx.o prm44xx.o \ omap-prcm-4-5-common = cminst44xx.o cm44xx.o prm44xx.o \
prcm_mpu44xx.o prminst44xx.o \ prcm_mpu44xx.o prminst44xx.o \
vc44xx_data.o vp44xx_data.o \ vc44xx_data.o vp44xx_data.o
prm44xx.o
obj-$(CONFIG_ARCH_OMAP4) += $(omap-prcm-4-5-common) obj-$(CONFIG_ARCH_OMAP4) += $(omap-prcm-4-5-common)
obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common) obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common)
# OMAP voltage domains # OMAP voltage domains
obj-y += voltage.o vc.o vp.o voltagedomain-common := voltage.o vc.o vp.o
obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common)
obj-$(CONFIG_ARCH_OMAP2) += voltagedomains2xxx_data.o obj-$(CONFIG_ARCH_OMAP2) += voltagedomains2xxx_data.o
obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common)
obj-$(CONFIG_ARCH_OMAP3) += voltagedomains3xxx_data.o obj-$(CONFIG_ARCH_OMAP3) += voltagedomains3xxx_data.o
obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common)
obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o
obj-$(CONFIG_SOC_AM33XX) += voltagedomains33xx_data.o obj-$(CONFIG_SOC_AM33XX) += $(voltagedomain-common)
obj-$(CONFIG_SOC_AM33XX) += voltagedomains33xx_data.o
obj-$(CONFIG_SOC_OMAP5) += $(voltagedomain-common)
# OMAP powerdomain framework # OMAP powerdomain framework
obj-y += powerdomain.o powerdomain-common.o powerdomain-common += powerdomain.o powerdomain-common.o
obj-$(CONFIG_ARCH_OMAP2) += $(powerdomain-common)
obj-$(CONFIG_ARCH_OMAP2) += powerdomains2xxx_data.o obj-$(CONFIG_ARCH_OMAP2) += powerdomains2xxx_data.o
obj-$(CONFIG_ARCH_OMAP2) += powerdomain2xxx_3xxx.o
obj-$(CONFIG_ARCH_OMAP2) += powerdomains2xxx_3xxx_data.o obj-$(CONFIG_ARCH_OMAP2) += powerdomains2xxx_3xxx_data.o
obj-$(CONFIG_ARCH_OMAP3) += powerdomain2xxx_3xxx.o obj-$(CONFIG_ARCH_OMAP3) += $(powerdomain-common)
obj-$(CONFIG_ARCH_OMAP3) += powerdomains3xxx_data.o obj-$(CONFIG_ARCH_OMAP3) += powerdomains3xxx_data.o
obj-$(CONFIG_ARCH_OMAP3) += powerdomains2xxx_3xxx_data.o obj-$(CONFIG_ARCH_OMAP3) += powerdomains2xxx_3xxx_data.o
obj-$(CONFIG_ARCH_OMAP4) += powerdomain44xx.o obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common)
obj-$(CONFIG_ARCH_OMAP4) += powerdomains44xx_data.o obj-$(CONFIG_ARCH_OMAP4) += powerdomains44xx_data.o
obj-$(CONFIG_SOC_AM33XX) += powerdomain33xx.o obj-$(CONFIG_SOC_AM33XX) += $(powerdomain-common)
obj-$(CONFIG_SOC_AM33XX) += powerdomains33xx_data.o obj-$(CONFIG_SOC_AM33XX) += powerdomains33xx_data.o
obj-$(CONFIG_SOC_OMAP5) += powerdomain44xx.o obj-$(CONFIG_SOC_OMAP5) += $(powerdomain-common)
# PRCM clockdomain control # PRCM clockdomain control
obj-y += clockdomain.o clockdomain-common += clockdomain.o
obj-$(CONFIG_ARCH_OMAP2) += clockdomain2xxx_3xxx.o obj-$(CONFIG_ARCH_OMAP2) += $(clockdomain-common)
obj-$(CONFIG_ARCH_OMAP2) += clockdomains2xxx_3xxx_data.o obj-$(CONFIG_ARCH_OMAP2) += clockdomains2xxx_3xxx_data.o
obj-$(CONFIG_SOC_OMAP2420) += clockdomains2420_data.o obj-$(CONFIG_SOC_OMAP2420) += clockdomains2420_data.o
obj-$(CONFIG_SOC_OMAP2430) += clockdomains2430_data.o obj-$(CONFIG_SOC_OMAP2430) += clockdomains2430_data.o
obj-$(CONFIG_ARCH_OMAP3) += clockdomain2xxx_3xxx.o obj-$(CONFIG_ARCH_OMAP3) += $(clockdomain-common)
obj-$(CONFIG_ARCH_OMAP3) += clockdomains2xxx_3xxx_data.o obj-$(CONFIG_ARCH_OMAP3) += clockdomains2xxx_3xxx_data.o
obj-$(CONFIG_ARCH_OMAP3) += clockdomains3xxx_data.o obj-$(CONFIG_ARCH_OMAP3) += clockdomains3xxx_data.o
obj-$(CONFIG_ARCH_OMAP4) += clockdomain44xx.o obj-$(CONFIG_ARCH_OMAP4) += $(clockdomain-common)
obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o
obj-$(CONFIG_SOC_AM33XX) += clockdomain33xx.o obj-$(CONFIG_SOC_AM33XX) += $(clockdomain-common)
obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o
obj-$(CONFIG_SOC_OMAP5) += clockdomain44xx.o obj-$(CONFIG_SOC_OMAP5) += $(clockdomain-common)
# Clock framework # Clock framework
obj-y += clock.o clock_common_data.o \ obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o
clkt_dpll.o clkt_clksel.o obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_sys.o
obj-$(CONFIG_ARCH_OMAP2) += clock2xxx.o obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpllcore.o
obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpllcore.o clkt2xxx_sys.o
obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_virt_prcm_set.o obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_virt_prcm_set.o
obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_apll.o clkt2xxx_osc.o obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_apll.o clkt2xxx_osc.o
obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpll.o clkt_iclk.o obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpll.o clkt_iclk.o
obj-$(CONFIG_SOC_OMAP2420) += clock2420_data.o obj-$(CONFIG_SOC_OMAP2420) += cclock2420_data.o
obj-$(CONFIG_SOC_OMAP2430) += clock2430.o clock2430_data.o obj-$(CONFIG_SOC_OMAP2430) += clock2430.o cclock2430_data.o
obj-$(CONFIG_ARCH_OMAP3) += clock3xxx.o obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o
obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o clkt34xx_dpll3m2.o obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o clkt34xx_dpll3m2.o
obj-$(CONFIG_ARCH_OMAP3) += clock3517.o clock36xx.o clkt_iclk.o obj-$(CONFIG_ARCH_OMAP3) += clock3517.o clock36xx.o
obj-$(CONFIG_ARCH_OMAP3) += dpll3xxx.o clock3xxx_data.o obj-$(CONFIG_ARCH_OMAP3) += dpll3xxx.o cclock3xxx_data.o
obj-$(CONFIG_ARCH_OMAP4) += clock44xx_data.o obj-$(CONFIG_ARCH_OMAP3) += clkt_iclk.o
obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) cclock44xx_data.o
obj-$(CONFIG_ARCH_OMAP4) += dpll3xxx.o dpll44xx.o obj-$(CONFIG_ARCH_OMAP4) += dpll3xxx.o dpll44xx.o
obj-$(CONFIG_SOC_AM33XX) += dpll3xxx.o clock33xx_data.o obj-$(CONFIG_SOC_AM33XX) += $(clock-common) dpll3xxx.o
obj-$(CONFIG_SOC_AM33XX) += cclock33xx_data.o
obj-$(CONFIG_SOC_OMAP5) += $(clock-common)
obj-$(CONFIG_SOC_OMAP5) += dpll3xxx.o dpll44xx.o obj-$(CONFIG_SOC_OMAP5) += dpll3xxx.o dpll44xx.o
# OMAP2 clock rate set data (old "OPP" data) # OMAP2 clock rate set data (old "OPP" data)
...@@ -163,7 +179,6 @@ obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o ...@@ -163,7 +179,6 @@ obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o
obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o
# hwmod data # hwmod data
obj-y += omap_hwmod_common_data.o
obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o
obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_3xxx_ipblock_data.o obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_3xxx_ipblock_data.o
obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_interconnect_data.o obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_interconnect_data.o
...@@ -209,10 +224,10 @@ obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o ...@@ -209,10 +224,10 @@ obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o
obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o
obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o
obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o
obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o
obj-$(CONFIG_MACH_OMAP3530_LV_SOM) += board-omap3logic.o obj-$(CONFIG_MACH_OMAP3530_LV_SOM) += board-omap3logic.o
obj-$(CONFIG_MACH_OMAP3_TORPEDO) += board-omap3logic.o obj-$(CONFIG_MACH_OMAP3_TORPEDO) += board-omap3logic.o
obj-$(CONFIG_MACH_ENCORE) += board-omap3encore.o obj-$(CONFIG_MACH_ENCORE) += board-omap3encore.o
obj-$(CONFIG_MACH_OVERO) += board-overo.o obj-$(CONFIG_MACH_OVERO) += board-overo.o
obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o
......
...@@ -21,5 +21,6 @@ ...@@ -21,5 +21,6 @@
#define AM33XX_SCM_BASE 0x44E10000 #define AM33XX_SCM_BASE 0x44E10000
#define AM33XX_CTRL_BASE AM33XX_SCM_BASE #define AM33XX_CTRL_BASE AM33XX_SCM_BASE
#define AM33XX_PRCM_BASE 0x44E00000 #define AM33XX_PRCM_BASE 0x44E00000
#define AM33XX_TAP_BASE (AM33XX_CTRL_BASE + 0x3FC)
#endif /* __ASM_ARCH_AM33XX_H */ #endif /* __ASM_ARCH_AM33XX_H */
...@@ -285,5 +285,5 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") ...@@ -285,5 +285,5 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
.init_machine = omap_2430sdp_init, .init_machine = omap_2430sdp_init,
.init_late = omap2430_init_late, .init_late = omap2430_init_late,
.timer = &omap2_timer, .timer = &omap2_timer,
.restart = omap_prcm_restart, .restart = omap2xxx_restart,
MACHINE_END MACHINE_END
...@@ -597,5 +597,5 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") ...@@ -597,5 +597,5 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
.init_machine = omap_3430sdp_init, .init_machine = omap_3430sdp_init,
.init_late = omap3430_init_late, .init_late = omap3430_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -212,5 +212,5 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") ...@@ -212,5 +212,5 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
.init_machine = omap_sdp_init, .init_machine = omap_sdp_init,
.init_late = omap3630_init_late, .init_late = omap3630_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -881,5 +881,5 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") ...@@ -881,5 +881,5 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
.init_machine = omap_4430sdp_init, .init_machine = omap_4430sdp_init,
.init_late = omap4430_init_late, .init_late = omap4430_init_late,
.timer = &omap4_timer, .timer = &omap4_timer,
.restart = omap_prcm_restart, .restart = omap44xx_restart,
MACHINE_END MACHINE_END
...@@ -93,5 +93,5 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") ...@@ -93,5 +93,5 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
.init_machine = am3517_crane_init, .init_machine = am3517_crane_init,
.init_late = am35xx_init_late, .init_late = am35xx_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -393,5 +393,5 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") ...@@ -393,5 +393,5 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
.init_machine = am3517_evm_init, .init_machine = am3517_evm_init,
.init_late = am35xx_init_late, .init_late = am35xx_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -338,5 +338,5 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") ...@@ -338,5 +338,5 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
.init_machine = omap_apollon_init, .init_machine = omap_apollon_init,
.init_late = omap2420_init_late, .init_late = omap2420_init_late,
.timer = &omap2_timer, .timer = &omap2_timer,
.restart = omap_prcm_restart, .restart = omap2xxx_restart,
MACHINE_END MACHINE_END
...@@ -751,18 +751,18 @@ MACHINE_START(CM_T35, "Compulab CM-T35") ...@@ -751,18 +751,18 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
.init_machine = cm_t35_init, .init_machine = cm_t35_init,
.init_late = omap35xx_init_late, .init_late = omap35xx_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
MACHINE_START(CM_T3730, "Compulab CM-T3730") MACHINE_START(CM_T3730, "Compulab CM-T3730")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap3630_init_early, .init_early = omap3630_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.handle_irq = omap3_intc_handle_irq, .handle_irq = omap3_intc_handle_irq,
.init_machine = cm_t3730_init, .init_machine = cm_t3730_init,
.init_late = omap3630_init_late, .init_late = omap3630_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -298,5 +298,5 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517") ...@@ -298,5 +298,5 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
.init_machine = cm_t3517_init, .init_machine = cm_t3517_init,
.init_late = am35xx_init_late, .init_late = am35xx_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -643,5 +643,5 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000") ...@@ -643,5 +643,5 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
.init_machine = devkit8000_init, .init_machine = devkit8000_init,
.init_late = omap35xx_init_late, .init_late = omap35xx_init_late,
.timer = &omap3_secure_timer, .timer = &omap3_secure_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -57,7 +57,7 @@ DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)") ...@@ -57,7 +57,7 @@ DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
.init_machine = omap_generic_init, .init_machine = omap_generic_init,
.timer = &omap2_timer, .timer = &omap2_timer,
.dt_compat = omap242x_boards_compat, .dt_compat = omap242x_boards_compat,
.restart = omap_prcm_restart, .restart = omap2xxx_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -76,7 +76,7 @@ DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)") ...@@ -76,7 +76,7 @@ DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
.init_machine = omap_generic_init, .init_machine = omap_generic_init,
.timer = &omap2_timer, .timer = &omap2_timer,
.dt_compat = omap243x_boards_compat, .dt_compat = omap243x_boards_compat,
.restart = omap_prcm_restart, .restart = omap2xxx_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -95,7 +95,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)") ...@@ -95,7 +95,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
.init_machine = omap_generic_init, .init_machine = omap_generic_init,
.timer = &omap3_timer, .timer = &omap3_timer,
.dt_compat = omap3_boards_compat, .dt_compat = omap3_boards_compat,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -134,7 +134,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)") ...@@ -134,7 +134,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
.init_late = omap4430_init_late, .init_late = omap4430_init_late,
.timer = &omap4_timer, .timer = &omap4_timer,
.dt_compat = omap4_boards_compat, .dt_compat = omap4_boards_compat,
.restart = omap_prcm_restart, .restart = omap44xx_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -154,6 +154,6 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)") ...@@ -154,6 +154,6 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
.init_machine = omap_generic_init, .init_machine = omap_generic_init,
.timer = &omap5_timer, .timer = &omap5_timer,
.dt_compat = omap5_boards_compat, .dt_compat = omap5_boards_compat,
.restart = omap_prcm_restart, .restart = omap44xx_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -386,5 +386,5 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board") ...@@ -386,5 +386,5 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
.init_machine = omap_h4_init, .init_machine = omap_h4_init,
.init_late = omap2420_init_late, .init_late = omap2420_init_late,
.timer = &omap2_timer, .timer = &omap2_timer,
.restart = omap_prcm_restart, .restart = omap2xxx_restart,
MACHINE_END MACHINE_END
...@@ -651,7 +651,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board") ...@@ -651,7 +651,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
.init_machine = igep_init, .init_machine = igep_init,
.init_late = omap35xx_init_late, .init_late = omap35xx_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
MACHINE_START(IGEP0030, "IGEP OMAP3 module") MACHINE_START(IGEP0030, "IGEP OMAP3 module")
...@@ -664,5 +664,5 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module") ...@@ -664,5 +664,5 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
.init_machine = igep_init, .init_machine = igep_init,
.init_late = omap35xx_init_late, .init_late = omap35xx_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -436,5 +436,5 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board") ...@@ -436,5 +436,5 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
.init_machine = omap_ldp_init, .init_machine = omap_ldp_init,
.init_late = omap3430_init_late, .init_late = omap3430_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -690,7 +690,7 @@ MACHINE_START(NOKIA_N800, "Nokia N800") ...@@ -690,7 +690,7 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
.init_machine = n8x0_init_machine, .init_machine = n8x0_init_machine,
.init_late = omap2420_init_late, .init_late = omap2420_init_late,
.timer = &omap2_timer, .timer = &omap2_timer,
.restart = omap_prcm_restart, .restart = omap2xxx_restart,
MACHINE_END MACHINE_END
MACHINE_START(NOKIA_N810, "Nokia N810") MACHINE_START(NOKIA_N810, "Nokia N810")
...@@ -703,7 +703,7 @@ MACHINE_START(NOKIA_N810, "Nokia N810") ...@@ -703,7 +703,7 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
.init_machine = n8x0_init_machine, .init_machine = n8x0_init_machine,
.init_late = omap2420_init_late, .init_late = omap2420_init_late,
.timer = &omap2_timer, .timer = &omap2_timer,
.restart = omap_prcm_restart, .restart = omap2xxx_restart,
MACHINE_END MACHINE_END
MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
...@@ -716,5 +716,5 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") ...@@ -716,5 +716,5 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
.init_machine = n8x0_init_machine, .init_machine = n8x0_init_machine,
.init_late = omap2420_init_late, .init_late = omap2420_init_late,
.timer = &omap2_timer, .timer = &omap2_timer,
.restart = omap_prcm_restart, .restart = omap2xxx_restart,
MACHINE_END MACHINE_END
...@@ -545,5 +545,5 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") ...@@ -545,5 +545,5 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
.init_machine = omap3_beagle_init, .init_machine = omap3_beagle_init,
.init_late = omap3_init_late, .init_late = omap3_init_late,
.timer = &omap3_secure_timer, .timer = &omap3_secure_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -757,5 +757,5 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM") ...@@ -757,5 +757,5 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM")
.init_machine = omap3_evm_init, .init_machine = omap3_evm_init,
.init_late = omap35xx_init_late, .init_late = omap35xx_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -232,7 +232,7 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") ...@@ -232,7 +232,7 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
.init_machine = omap3logic_init, .init_machine = omap3logic_init,
.init_late = omap35xx_init_late, .init_late = omap35xx_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
...@@ -245,5 +245,5 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") ...@@ -245,5 +245,5 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
.init_machine = omap3logic_init, .init_machine = omap3logic_init,
.init_late = omap35xx_init_late, .init_late = omap35xx_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -619,5 +619,5 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") ...@@ -619,5 +619,5 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
.init_machine = omap3pandora_init, .init_machine = omap3pandora_init,
.init_late = omap35xx_init_late, .init_late = omap35xx_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -427,5 +427,5 @@ MACHINE_START(SBC3530, "OMAP3 STALKER") ...@@ -427,5 +427,5 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
.init_machine = omap3_stalker_init, .init_machine = omap3_stalker_init,
.init_late = omap35xx_init_late, .init_late = omap35xx_init_late,
.timer = &omap3_secure_timer, .timer = &omap3_secure_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -387,5 +387,5 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") ...@@ -387,5 +387,5 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
.init_machine = omap3_touchbook_init, .init_machine = omap3_touchbook_init,
.init_late = omap3430_init_late, .init_late = omap3430_init_late,
.timer = &omap3_secure_timer, .timer = &omap3_secure_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -524,5 +524,5 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board") ...@@ -524,5 +524,5 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
.init_machine = omap4_panda_init, .init_machine = omap4_panda_init,
.init_late = omap4430_init_late, .init_late = omap4430_init_late,
.timer = &omap4_timer, .timer = &omap4_timer,
.restart = omap_prcm_restart, .restart = omap44xx_restart,
MACHINE_END MACHINE_END
...@@ -552,5 +552,5 @@ MACHINE_START(OVERO, "Gumstix Overo") ...@@ -552,5 +552,5 @@ MACHINE_START(OVERO, "Gumstix Overo")
.init_machine = overo_init, .init_machine = overo_init,
.init_late = omap35xx_init_late, .init_late = omap35xx_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -148,7 +148,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") ...@@ -148,7 +148,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
.init_machine = rm680_init, .init_machine = rm680_init,
.init_late = omap3630_init_late, .init_late = omap3630_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
MACHINE_START(NOKIA_RM696, "Nokia RM-696 board") MACHINE_START(NOKIA_RM696, "Nokia RM-696 board")
...@@ -161,5 +161,5 @@ MACHINE_START(NOKIA_RM696, "Nokia RM-696 board") ...@@ -161,5 +161,5 @@ MACHINE_START(NOKIA_RM696, "Nokia RM-696 board")
.init_machine = rm680_init, .init_machine = rm680_init,
.init_late = omap3630_init_late, .init_late = omap3630_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -127,5 +127,5 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") ...@@ -127,5 +127,5 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
.init_machine = rx51_init, .init_machine = rx51_init,
.init_late = omap3430_init_late, .init_late = omap3430_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
...@@ -46,7 +46,7 @@ MACHINE_START(TI8168EVM, "ti8168evm") ...@@ -46,7 +46,7 @@ MACHINE_START(TI8168EVM, "ti8168evm")
.timer = &omap3_timer, .timer = &omap3_timer,
.init_machine = ti81xx_evm_init, .init_machine = ti81xx_evm_init,
.init_late = ti81xx_init_late, .init_late = ti81xx_init_late,
.restart = omap_prcm_restart, .restart = omap44xx_restart,
MACHINE_END MACHINE_END
MACHINE_START(TI8148EVM, "ti8148evm") MACHINE_START(TI8148EVM, "ti8148evm")
...@@ -58,5 +58,5 @@ MACHINE_START(TI8148EVM, "ti8148evm") ...@@ -58,5 +58,5 @@ MACHINE_START(TI8148EVM, "ti8148evm")
.timer = &omap3_timer, .timer = &omap3_timer,
.init_machine = ti81xx_evm_init, .init_machine = ti81xx_evm_init,
.init_late = ti81xx_init_late, .init_late = ti81xx_init_late,
.restart = omap_prcm_restart, .restart = omap44xx_restart,
MACHINE_END MACHINE_END
...@@ -138,7 +138,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") ...@@ -138,7 +138,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
.init_machine = omap_zoom_init, .init_machine = omap_zoom_init,
.init_late = omap3430_init_late, .init_late = omap3430_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
...@@ -151,5 +151,5 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") ...@@ -151,5 +151,5 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
.init_machine = omap_zoom_init, .init_machine = omap_zoom_init,
.init_late = omap3630_init_late, .init_late = omap3630_init_late,
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap3xxx_restart,
MACHINE_END MACHINE_END
This diff is collapsed.
...@@ -21,11 +21,10 @@ ...@@ -21,11 +21,10 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/io.h> #include <linux/io.h>
#include <plat/prcm.h>
#include "clock.h" #include "clock.h"
#include "clock2xxx.h" #include "clock2xxx.h"
#include "cm2xxx_3xxx.h" #include "cm2xxx.h"
#include "cm-regbits-24xx.h" #include "cm-regbits-24xx.h"
/* CM_CLKEN_PLL.EN_{54,96}M_PLL options (24XX) */ /* CM_CLKEN_PLL.EN_{54,96}M_PLL options (24XX) */
...@@ -37,92 +36,90 @@ ...@@ -37,92 +36,90 @@
#define APLLS_CLKIN_13MHZ 2 #define APLLS_CLKIN_13MHZ 2
#define APLLS_CLKIN_12MHZ 3 #define APLLS_CLKIN_12MHZ 3
void __iomem *cm_idlest_pll;
/* Private functions */ /* Private functions */
/* Enable an APLL if off */ /**
static int omap2_clk_apll_enable(struct clk *clk, u32 status_mask) * omap2xxx_clk_apll_locked - is the APLL locked?
* @hw: struct clk_hw * of the APLL to check
*
* If the APLL IP block referred to by @hw indicates that it's locked,
* return true; otherwise, return false.
*/
static bool omap2xxx_clk_apll_locked(struct clk_hw *hw)
{ {
u32 cval, apll_mask; struct clk_hw_omap *clk = to_clk_hw_omap(hw);
u32 r, apll_mask;
apll_mask = EN_APLL_LOCKED << clk->enable_bit; apll_mask = EN_APLL_LOCKED << clk->enable_bit;
cval = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN); r = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN);
if ((cval & apll_mask) == apll_mask)
return 0; /* apll already enabled */
cval &= ~apll_mask;
cval |= apll_mask;
omap2_cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN);
omap2_cm_wait_idlest(cm_idlest_pll, status_mask,
OMAP24XX_CM_IDLEST_VAL, __clk_get_name(clk));
/* return ((r & apll_mask) == apll_mask) ? true : false;
* REVISIT: Should we return an error code if omap2_wait_clock_ready()
* fails?
*/
return 0;
} }
static int omap2_clk_apll96_enable(struct clk *clk) int omap2_clk_apll96_enable(struct clk_hw *hw)
{ {
return omap2_clk_apll_enable(clk, OMAP24XX_ST_96M_APLL_MASK); return omap2xxx_cm_apll96_enable();
} }
static int omap2_clk_apll54_enable(struct clk *clk) int omap2_clk_apll54_enable(struct clk_hw *hw)
{ {
return omap2_clk_apll_enable(clk, OMAP24XX_ST_54M_APLL_MASK); return omap2xxx_cm_apll54_enable();
} }
static void _apll96_allow_idle(struct clk *clk) static void _apll96_allow_idle(struct clk_hw_omap *clk)
{ {
omap2xxx_cm_set_apll96_auto_low_power_stop(); omap2xxx_cm_set_apll96_auto_low_power_stop();
} }
static void _apll96_deny_idle(struct clk *clk) static void _apll96_deny_idle(struct clk_hw_omap *clk)
{ {
omap2xxx_cm_set_apll96_disable_autoidle(); omap2xxx_cm_set_apll96_disable_autoidle();
} }
static void _apll54_allow_idle(struct clk *clk) static void _apll54_allow_idle(struct clk_hw_omap *clk)
{ {
omap2xxx_cm_set_apll54_auto_low_power_stop(); omap2xxx_cm_set_apll54_auto_low_power_stop();
} }
static void _apll54_deny_idle(struct clk *clk) static void _apll54_deny_idle(struct clk_hw_omap *clk)
{ {
omap2xxx_cm_set_apll54_disable_autoidle(); omap2xxx_cm_set_apll54_disable_autoidle();
} }
/* Stop APLL */ void omap2_clk_apll96_disable(struct clk_hw *hw)
static void omap2_clk_apll_disable(struct clk *clk)
{ {
u32 cval; omap2xxx_cm_apll96_disable();
}
cval = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN); void omap2_clk_apll54_disable(struct clk_hw *hw)
cval &= ~(EN_APLL_LOCKED << clk->enable_bit); {
omap2_cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN); omap2xxx_cm_apll54_disable();
} }
/* Public data */ unsigned long omap2_clk_apll54_recalc(struct clk_hw *hw,
unsigned long parent_rate)
{
return (omap2xxx_clk_apll_locked(hw)) ? 54000000 : 0;
}
const struct clkops clkops_apll96 = { unsigned long omap2_clk_apll96_recalc(struct clk_hw *hw,
.enable = omap2_clk_apll96_enable, unsigned long parent_rate)
.disable = omap2_clk_apll_disable, {
.allow_idle = _apll96_allow_idle, return (omap2xxx_clk_apll_locked(hw)) ? 96000000 : 0;
.deny_idle = _apll96_deny_idle, }
};
const struct clkops clkops_apll54 = { /* Public data */
.enable = omap2_clk_apll54_enable, const struct clk_hw_omap_ops clkhwops_apll54 = {
.disable = omap2_clk_apll_disable,
.allow_idle = _apll54_allow_idle, .allow_idle = _apll54_allow_idle,
.deny_idle = _apll54_deny_idle, .deny_idle = _apll54_deny_idle,
}; };
const struct clk_hw_omap_ops clkhwops_apll96 = {
.allow_idle = _apll96_allow_idle,
.deny_idle = _apll96_deny_idle,
};
/* Public functions */ /* Public functions */
u32 omap2xxx_get_apll_clkin(void) u32 omap2xxx_get_apll_clkin(void)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <linux/io.h> #include <linux/io.h>
#include "clock.h" #include "clock.h"
#include "cm2xxx_3xxx.h" #include "cm2xxx.h"
#include "cm-regbits-24xx.h" #include "cm-regbits-24xx.h"
/* Private functions */ /* Private functions */
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* REVISIT: DPLL can optionally enter low-power bypass by writing 0x1 * REVISIT: DPLL can optionally enter low-power bypass by writing 0x1
* instead. Add some mechanism to optionally enter this mode. * instead. Add some mechanism to optionally enter this mode.
*/ */
static void _allow_idle(struct clk *clk) static void _allow_idle(struct clk_hw_omap *clk)
{ {
if (!clk || !clk->dpll_data) if (!clk || !clk->dpll_data)
return; return;
...@@ -43,7 +43,7 @@ static void _allow_idle(struct clk *clk) ...@@ -43,7 +43,7 @@ static void _allow_idle(struct clk *clk)
* *
* Disable DPLL automatic idle control. No return value. * Disable DPLL automatic idle control. No return value.
*/ */
static void _deny_idle(struct clk *clk) static void _deny_idle(struct clk_hw_omap *clk)
{ {
if (!clk || !clk->dpll_data) if (!clk || !clk->dpll_data)
return; return;
...@@ -53,9 +53,7 @@ static void _deny_idle(struct clk *clk) ...@@ -53,9 +53,7 @@ static void _deny_idle(struct clk *clk)
/* Public data */ /* Public data */
const struct clk_hw_omap_ops clkhwops_omap2xxx_dpll = {
const struct clkops clkops_omap2xxx_dpll_ops = {
.allow_idle = _allow_idle, .allow_idle = _allow_idle,
.deny_idle = _deny_idle, .deny_idle = _deny_idle,
}; };
...@@ -28,16 +28,22 @@ ...@@ -28,16 +28,22 @@
#include "clock.h" #include "clock.h"
#include "clock2xxx.h" #include "clock2xxx.h"
#include "opp2xxx.h" #include "opp2xxx.h"
#include "cm2xxx_3xxx.h" #include "cm2xxx.h"
#include "cm-regbits-24xx.h" #include "cm-regbits-24xx.h"
#include "sdrc.h" #include "sdrc.h"
#include "sram.h" #include "sram.h"
/* #define DOWN_VARIABLE_DPLL 1 */ /* Experimental */ /* #define DOWN_VARIABLE_DPLL 1 */ /* Experimental */
/*
* dpll_core_ck: pointer to the combined dpll_ck + core_ck on OMAP2xxx
* (currently defined as "dpll_ck" in the OMAP2xxx clock tree). Set
* during dpll_ck init and used later by omap2xxx_clk_get_core_rate().
*/
static struct clk_hw_omap *dpll_core_ck;
/** /**
* omap2xxx_clk_get_core_rate - return the CORE_CLK rate * omap2xxx_clk_get_core_rate - return the CORE_CLK rate
* @clk: pointer to the combined dpll_ck + core_ck (currently "dpll_ck")
* *
* Returns the CORE_CLK rate. CORE_CLK can have one of three rate * Returns the CORE_CLK rate. CORE_CLK can have one of three rate
* sources on OMAP2xxx: the DPLL CLKOUT rate, DPLL CLKOUTX2, or 32KHz * sources on OMAP2xxx: the DPLL CLKOUT rate, DPLL CLKOUTX2, or 32KHz
...@@ -45,12 +51,14 @@ ...@@ -45,12 +51,14 @@
* struct clk *dpll_ck, which is a composite clock of dpll_ck and * struct clk *dpll_ck, which is a composite clock of dpll_ck and
* core_ck. * core_ck.
*/ */
unsigned long omap2xxx_clk_get_core_rate(struct clk *clk) unsigned long omap2xxx_clk_get_core_rate(void)
{ {
long long core_clk; long long core_clk;
u32 v; u32 v;
core_clk = omap2_get_dpll_rate(clk); WARN_ON(!dpll_core_ck);
core_clk = omap2_get_dpll_rate(dpll_core_ck);
v = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKSEL2); v = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
v &= OMAP24XX_CORE_CLK_SRC_MASK; v &= OMAP24XX_CORE_CLK_SRC_MASK;
...@@ -96,19 +104,22 @@ static long omap2_dpllcore_round_rate(unsigned long target_rate) ...@@ -96,19 +104,22 @@ static long omap2_dpllcore_round_rate(unsigned long target_rate)
} }
unsigned long omap2_dpllcore_recalc(struct clk *clk) unsigned long omap2_dpllcore_recalc(struct clk_hw *hw,
unsigned long parent_rate)
{ {
return omap2xxx_clk_get_core_rate(clk); return omap2xxx_clk_get_core_rate();
} }
int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate) int omap2_reprogram_dpllcore(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{ {
struct clk_hw_omap *clk = to_clk_hw_omap(hw);
u32 cur_rate, low, mult, div, valid_rate, done_rate; u32 cur_rate, low, mult, div, valid_rate, done_rate;
u32 bypass = 0; u32 bypass = 0;
struct prcm_config tmpset; struct prcm_config tmpset;
const struct dpll_data *dd; const struct dpll_data *dd;
cur_rate = omap2xxx_clk_get_core_rate(dclk); cur_rate = omap2xxx_clk_get_core_rate();
mult = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKSEL2); mult = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
mult &= OMAP24XX_CORE_CLK_SRC_MASK; mult &= OMAP24XX_CORE_CLK_SRC_MASK;
...@@ -169,3 +180,19 @@ int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate) ...@@ -169,3 +180,19 @@ int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate)
return 0; return 0;
} }
/**
* omap2xxx_clkt_dpllcore_init - clk init function for dpll_ck
* @clk: struct clk *dpll_ck
*
* Store a local copy of @clk in dpll_core_ck so other code can query
* the core rate without having to clk_get(), which can sleep. Must
* only be called once. No return value. XXX If the clock
* registration process is ever changed such that dpll_ck is no longer
* statically defined, this code may need to change to increment some
* kind of use count on dpll_ck.
*/
void omap2xxx_clkt_dpllcore_init(struct clk_hw *hw)
{
WARN(dpll_core_ck, "dpll_core_ck already set - should never happen");
dpll_core_ck = to_clk_hw_omap(hw);
}
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
* clk_enable/clk_disable()-based usecounting for osc_ck should be * clk_enable/clk_disable()-based usecounting for osc_ck should be
* replaced with autoidle-based usecounting. * replaced with autoidle-based usecounting.
*/ */
static int omap2_enable_osc_ck(struct clk *clk) int omap2_enable_osc_ck(struct clk_hw *clk)
{ {
u32 pcc; u32 pcc;
...@@ -53,7 +53,7 @@ static int omap2_enable_osc_ck(struct clk *clk) ...@@ -53,7 +53,7 @@ static int omap2_enable_osc_ck(struct clk *clk)
* clk_enable/clk_disable()-based usecounting for osc_ck should be * clk_enable/clk_disable()-based usecounting for osc_ck should be
* replaced with autoidle-based usecounting. * replaced with autoidle-based usecounting.
*/ */
static void omap2_disable_osc_ck(struct clk *clk) void omap2_disable_osc_ck(struct clk_hw *clk)
{ {
u32 pcc; u32 pcc;
...@@ -62,13 +62,8 @@ static void omap2_disable_osc_ck(struct clk *clk) ...@@ -62,13 +62,8 @@ static void omap2_disable_osc_ck(struct clk *clk)
__raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl); __raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
} }
const struct clkops clkops_oscck = { unsigned long omap2_osc_clk_recalc(struct clk_hw *clk,
.enable = omap2_enable_osc_ck, unsigned long parent_rate)
.disable = omap2_disable_osc_ck,
};
unsigned long omap2_osc_clk_recalc(struct clk *clk)
{ {
return omap2xxx_get_apll_clkin() * omap2xxx_get_sysclkdiv(); return omap2xxx_get_apll_clkin() * omap2xxx_get_sysclkdiv();
} }
...@@ -40,9 +40,8 @@ u32 omap2xxx_get_sysclkdiv(void) ...@@ -40,9 +40,8 @@ u32 omap2xxx_get_sysclkdiv(void)
return div; return div;
} }
unsigned long omap2xxx_sys_clk_recalc(struct clk *clk) unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk,
unsigned long parent_rate)
{ {
return clk->parent->rate / omap2xxx_get_sysclkdiv(); return parent_rate / omap2xxx_get_sysclkdiv();
} }
/* /*
* OMAP2xxx DVFS virtual clock functions * OMAP2xxx DVFS virtual clock functions
* *
* Copyright (C) 2005-2008 Texas Instruments, Inc. * Copyright (C) 2005-2008, 2012 Texas Instruments, Inc.
* Copyright (C) 2004-2010 Nokia Corporation * Copyright (C) 2004-2010 Nokia Corporation
* *
* Contacts: * Contacts:
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "clock.h" #include "clock.h"
#include "clock2xxx.h" #include "clock2xxx.h"
#include "opp2xxx.h" #include "opp2xxx.h"
#include "cm2xxx_3xxx.h" #include "cm2xxx.h"
#include "cm-regbits-24xx.h" #include "cm-regbits-24xx.h"
#include "sdrc.h" #include "sdrc.h"
#include "sram.h" #include "sram.h"
...@@ -45,13 +45,21 @@ ...@@ -45,13 +45,21 @@
const struct prcm_config *curr_prcm_set; const struct prcm_config *curr_prcm_set;
const struct prcm_config *rate_table; const struct prcm_config *rate_table;
/*
* sys_ck_rate: the rate of the external high-frequency clock
* oscillator on the board. Set by the SoC-specific clock init code.
* Once set during a boot, will not change.
*/
static unsigned long sys_ck_rate;
/** /**
* omap2_table_mpu_recalc - just return the MPU speed * omap2_table_mpu_recalc - just return the MPU speed
* @clk: virt_prcm_set struct clk * @clk: virt_prcm_set struct clk
* *
* Set virt_prcm_set's rate to the mpu_speed field of the current PRCM set. * Set virt_prcm_set's rate to the mpu_speed field of the current PRCM set.
*/ */
unsigned long omap2_table_mpu_recalc(struct clk *clk) unsigned long omap2_table_mpu_recalc(struct clk_hw *clk,
unsigned long parent_rate)
{ {
return curr_prcm_set->mpu_speed; return curr_prcm_set->mpu_speed;
} }
...@@ -63,18 +71,18 @@ unsigned long omap2_table_mpu_recalc(struct clk *clk) ...@@ -63,18 +71,18 @@ unsigned long omap2_table_mpu_recalc(struct clk *clk)
* Some might argue L3-DDR, others ARM, others IVA. This code is simple and * Some might argue L3-DDR, others ARM, others IVA. This code is simple and
* just uses the ARM rates. * just uses the ARM rates.
*/ */
long omap2_round_to_table_rate(struct clk *clk, unsigned long rate) long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *parent_rate)
{ {
const struct prcm_config *ptr; const struct prcm_config *ptr;
long highest_rate, sys_clk_rate; long highest_rate;
highest_rate = -EINVAL; highest_rate = -EINVAL;
sys_clk_rate = __clk_get_rate(sclk);
for (ptr = rate_table; ptr->mpu_speed; ptr++) { for (ptr = rate_table; ptr->mpu_speed; ptr++) {
if (!(ptr->flags & cpu_mask)) if (!(ptr->flags & cpu_mask))
continue; continue;
if (ptr->xtal_speed != sys_clk_rate) if (ptr->xtal_speed != sys_ck_rate)
continue; continue;
highest_rate = ptr->mpu_speed; highest_rate = ptr->mpu_speed;
...@@ -87,21 +95,19 @@ long omap2_round_to_table_rate(struct clk *clk, unsigned long rate) ...@@ -87,21 +95,19 @@ long omap2_round_to_table_rate(struct clk *clk, unsigned long rate)
} }
/* Sets basic clocks based on the specified rate */ /* Sets basic clocks based on the specified rate */
int omap2_select_table_rate(struct clk *clk, unsigned long rate) int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{ {
u32 cur_rate, done_rate, bypass = 0, tmp; u32 cur_rate, done_rate, bypass = 0, tmp;
const struct prcm_config *prcm; const struct prcm_config *prcm;
unsigned long found_speed = 0; unsigned long found_speed = 0;
unsigned long flags; unsigned long flags;
long sys_clk_rate;
sys_clk_rate = __clk_get_rate(sclk);
for (prcm = rate_table; prcm->mpu_speed; prcm++) { for (prcm = rate_table; prcm->mpu_speed; prcm++) {
if (!(prcm->flags & cpu_mask)) if (!(prcm->flags & cpu_mask))
continue; continue;
if (prcm->xtal_speed != sys_clk_rate) if (prcm->xtal_speed != sys_ck_rate)
continue; continue;
if (prcm->mpu_speed <= rate) { if (prcm->mpu_speed <= rate) {
...@@ -117,7 +123,7 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate) ...@@ -117,7 +123,7 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate)
} }
curr_prcm_set = prcm; curr_prcm_set = prcm;
cur_rate = omap2xxx_clk_get_core_rate(dclk); cur_rate = omap2xxx_clk_get_core_rate();
if (prcm->dpll_speed == cur_rate / 2) { if (prcm->dpll_speed == cur_rate / 2) {
omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL, 1); omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL, 1);
...@@ -167,3 +173,50 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate) ...@@ -167,3 +173,50 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate)
return 0; return 0;
} }
/**
* omap2xxx_clkt_vps_check_bootloader_rate - determine which of the rate
* table sets matches the current CORE DPLL hardware rate
*
* Check the MPU rate set by bootloader. Sets the 'curr_prcm_set'
* global to point to the active rate set when found; otherwise, sets
* it to NULL. No return value;
*/
void omap2xxx_clkt_vps_check_bootloader_rates(void)
{
const struct prcm_config *prcm = NULL;
unsigned long rate;
rate = omap2xxx_clk_get_core_rate();
for (prcm = rate_table; prcm->mpu_speed; prcm++) {
if (!(prcm->flags & cpu_mask))
continue;
if (prcm->xtal_speed != sys_ck_rate)
continue;
if (prcm->dpll_speed <= rate)
break;
}
curr_prcm_set = prcm;
}
/**
* omap2xxx_clkt_vps_late_init - store a copy of the sys_ck rate
*
* Store a copy of the sys_ck rate for later use by the OMAP2xxx DVFS
* code. (The sys_ck rate does not -- or rather, must not -- change
* during kernel runtime.) Must be called after we have a valid
* sys_ck rate, but before the virt_prcm_set clock rate is
* recalculated. No return value.
*/
void omap2xxx_clkt_vps_late_init(void)
{
struct clk *c;
c = clk_get(NULL, "sys_ck");
if (IS_ERR(c)) {
WARN(1, "could not locate sys_ck\n");
} else {
sys_ck_rate = clk_get_rate(c);
clk_put(c);
}
}
...@@ -44,8 +44,10 @@ ...@@ -44,8 +44,10 @@
* Program the DPLL M2 divider with the rounded target rate. Returns * Program the DPLL M2 divider with the rounded target rate. Returns
* -EINVAL upon error, or 0 upon success. * -EINVAL upon error, or 0 upon success.
*/ */
int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate) int omap3_core_dpll_m2_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{ {
struct clk_hw_omap *clk = to_clk_hw_omap(hw);
u32 new_div = 0; u32 new_div = 0;
u32 unlock_dll = 0; u32 unlock_dll = 0;
u32 c; u32 c;
...@@ -63,7 +65,7 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate) ...@@ -63,7 +65,7 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
return -EINVAL; return -EINVAL;
sdrcrate = __clk_get_rate(sdrc_ick_p); sdrcrate = __clk_get_rate(sdrc_ick_p);
clkrate = __clk_get_rate(clk); clkrate = __clk_get_rate(hw->clk);
if (rate > clkrate) if (rate > clkrate)
sdrcrate <<= ((rate / clkrate) >> 1); sdrcrate <<= ((rate / clkrate) >> 1);
else else
...@@ -112,8 +114,6 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate) ...@@ -112,8 +114,6 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla, sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla,
sdrc_cs0->actim_ctrlb, sdrc_cs0->mr, sdrc_cs0->actim_ctrlb, sdrc_cs0->mr,
0, 0, 0, 0); 0, 0, 0, 0);
clk->rate = rate;
return 0; return 0;
} }
This diff is collapsed.
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/clk.h> #include <linux/clk-provider.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/div64.h> #include <asm/div64.h>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
* (assuming that it is counting N upwards), or -2 if the enclosing loop * (assuming that it is counting N upwards), or -2 if the enclosing loop
* should skip to the next iteration (again assuming N is increasing). * should skip to the next iteration (again assuming N is increasing).
*/ */
static int _dpll_test_fint(struct clk *clk, u8 n) static int _dpll_test_fint(struct clk_hw_omap *clk, u8 n)
{ {
struct dpll_data *dd; struct dpll_data *dd;
long fint, fint_min, fint_max; long fint, fint_min, fint_max;
...@@ -85,7 +85,7 @@ static int _dpll_test_fint(struct clk *clk, u8 n) ...@@ -85,7 +85,7 @@ static int _dpll_test_fint(struct clk *clk, u8 n)
dd = clk->dpll_data; dd = clk->dpll_data;
/* DPLL divider must result in a valid jitter correction val */ /* DPLL divider must result in a valid jitter correction val */
fint = __clk_get_rate(__clk_get_parent(clk)) / n; fint = __clk_get_rate(__clk_get_parent(clk->hw.clk)) / n;
if (cpu_is_omap24xx()) { if (cpu_is_omap24xx()) {
/* Should not be called for OMAP2, so warn if it is called */ /* Should not be called for OMAP2, so warn if it is called */
...@@ -186,15 +186,15 @@ static int _dpll_test_mult(int *m, int n, unsigned long *new_rate, ...@@ -186,15 +186,15 @@ static int _dpll_test_mult(int *m, int n, unsigned long *new_rate,
} }
/* Public functions */ /* Public functions */
u8 omap2_init_dpll_parent(struct clk_hw *hw)
void omap2_init_dpll_parent(struct clk *clk)
{ {
struct clk_hw_omap *clk = to_clk_hw_omap(hw);
u32 v; u32 v;
struct dpll_data *dd; struct dpll_data *dd;
dd = clk->dpll_data; dd = clk->dpll_data;
if (!dd) if (!dd)
return; return -EINVAL;
v = __raw_readl(dd->control_reg); v = __raw_readl(dd->control_reg);
v &= dd->enable_mask; v &= dd->enable_mask;
...@@ -204,18 +204,18 @@ void omap2_init_dpll_parent(struct clk *clk) ...@@ -204,18 +204,18 @@ void omap2_init_dpll_parent(struct clk *clk)
if (cpu_is_omap24xx()) { if (cpu_is_omap24xx()) {
if (v == OMAP2XXX_EN_DPLL_LPBYPASS || if (v == OMAP2XXX_EN_DPLL_LPBYPASS ||
v == OMAP2XXX_EN_DPLL_FRBYPASS) v == OMAP2XXX_EN_DPLL_FRBYPASS)
clk_reparent(clk, dd->clk_bypass); return 1;
} else if (cpu_is_omap34xx()) { } else if (cpu_is_omap34xx()) {
if (v == OMAP3XXX_EN_DPLL_LPBYPASS || if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
v == OMAP3XXX_EN_DPLL_FRBYPASS) v == OMAP3XXX_EN_DPLL_FRBYPASS)
clk_reparent(clk, dd->clk_bypass); return 1;
} else if (soc_is_am33xx() || cpu_is_omap44xx()) { } else if (soc_is_am33xx() || cpu_is_omap44xx()) {
if (v == OMAP4XXX_EN_DPLL_LPBYPASS || if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
v == OMAP4XXX_EN_DPLL_FRBYPASS || v == OMAP4XXX_EN_DPLL_FRBYPASS ||
v == OMAP4XXX_EN_DPLL_MNBYPASS) v == OMAP4XXX_EN_DPLL_MNBYPASS)
clk_reparent(clk, dd->clk_bypass); return 1;
} }
return; return 0;
} }
/** /**
...@@ -232,7 +232,7 @@ void omap2_init_dpll_parent(struct clk *clk) ...@@ -232,7 +232,7 @@ void omap2_init_dpll_parent(struct clk *clk)
* locked, or the appropriate bypass rate if the DPLL is bypassed, or 0 * locked, or the appropriate bypass rate if the DPLL is bypassed, or 0
* if the clock @clk is not a DPLL. * if the clock @clk is not a DPLL.
*/ */
u32 omap2_get_dpll_rate(struct clk *clk) unsigned long omap2_get_dpll_rate(struct clk_hw_omap *clk)
{ {
long long dpll_clk; long long dpll_clk;
u32 dpll_mult, dpll_div, v; u32 dpll_mult, dpll_div, v;
...@@ -288,8 +288,10 @@ u32 omap2_get_dpll_rate(struct clk *clk) ...@@ -288,8 +288,10 @@ u32 omap2_get_dpll_rate(struct clk *clk)
* (expensive) function again. Returns ~0 if the target rate cannot * (expensive) function again. Returns ~0 if the target rate cannot
* be rounded, or the rounded rate upon success. * be rounded, or the rounded rate upon success.
*/ */
long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate) long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long target_rate,
unsigned long *parent_rate)
{ {
struct clk_hw_omap *clk = to_clk_hw_omap(hw);
int m, n, r, scaled_max_m; int m, n, r, scaled_max_m;
unsigned long scaled_rt_rp; unsigned long scaled_rt_rp;
unsigned long new_rate = 0; unsigned long new_rate = 0;
...@@ -303,7 +305,7 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate) ...@@ -303,7 +305,7 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate)
dd = clk->dpll_data; dd = clk->dpll_data;
ref_rate = __clk_get_rate(dd->clk_ref); ref_rate = __clk_get_rate(dd->clk_ref);
clk_name = __clk_get_name(clk); clk_name = __clk_get_name(hw->clk);
pr_debug("clock: %s: starting DPLL round_rate, target rate %ld\n", pr_debug("clock: %s: starting DPLL round_rate, target rate %ld\n",
clk_name, target_rate); clk_name, target_rate);
......
...@@ -11,10 +11,9 @@ ...@@ -11,10 +11,9 @@
#undef DEBUG #undef DEBUG
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/clk.h> #include <linux/clk-provider.h>
#include <linux/io.h> #include <linux/io.h>
#include <plat/prcm.h>
#include "clock.h" #include "clock.h"
#include "clock2xxx.h" #include "clock2xxx.h"
...@@ -24,7 +23,7 @@ ...@@ -24,7 +23,7 @@
/* Private functions */ /* Private functions */
/* XXX */ /* XXX */
void omap2_clkt_iclk_allow_idle(struct clk *clk) void omap2_clkt_iclk_allow_idle(struct clk_hw_omap *clk)
{ {
u32 v, r; u32 v, r;
...@@ -36,7 +35,7 @@ void omap2_clkt_iclk_allow_idle(struct clk *clk) ...@@ -36,7 +35,7 @@ void omap2_clkt_iclk_allow_idle(struct clk *clk)
} }
/* XXX */ /* XXX */
void omap2_clkt_iclk_deny_idle(struct clk *clk) void omap2_clkt_iclk_deny_idle(struct clk_hw_omap *clk)
{ {
u32 v, r; u32 v, r;
...@@ -49,33 +48,17 @@ void omap2_clkt_iclk_deny_idle(struct clk *clk) ...@@ -49,33 +48,17 @@ void omap2_clkt_iclk_deny_idle(struct clk *clk)
/* Public data */ /* Public data */
const struct clkops clkops_omap2_iclk_dflt_wait = { const struct clk_hw_omap_ops clkhwops_iclk = {
.enable = omap2_dflt_clk_enable,
.disable = omap2_dflt_clk_disable,
.find_companion = omap2_clk_dflt_find_companion,
.find_idlest = omap2_clk_dflt_find_idlest,
.allow_idle = omap2_clkt_iclk_allow_idle, .allow_idle = omap2_clkt_iclk_allow_idle,
.deny_idle = omap2_clkt_iclk_deny_idle, .deny_idle = omap2_clkt_iclk_deny_idle,
}; };
const struct clkops clkops_omap2_iclk_dflt = { const struct clk_hw_omap_ops clkhwops_iclk_wait = {
.enable = omap2_dflt_clk_enable,
.disable = omap2_dflt_clk_disable,
.allow_idle = omap2_clkt_iclk_allow_idle, .allow_idle = omap2_clkt_iclk_allow_idle,
.deny_idle = omap2_clkt_iclk_deny_idle, .deny_idle = omap2_clkt_iclk_deny_idle,
.find_idlest = omap2_clk_dflt_find_idlest,
.find_companion = omap2_clk_dflt_find_companion,
}; };
const struct clkops clkops_omap2_iclk_idle_only = {
.allow_idle = omap2_clkt_iclk_allow_idle,
.deny_idle = omap2_clkt_iclk_deny_idle,
};
const struct clkops clkops_omap2_mdmclk_dflt_wait = {
.enable = omap2_dflt_clk_enable,
.disable = omap2_dflt_clk_disable,
.find_companion = omap2_clk_dflt_find_companion,
.find_idlest = omap2_clk_dflt_find_idlest,
.allow_idle = omap2_clkt_iclk_allow_idle,
.deny_idle = omap2_clkt_iclk_deny_idle,
};
This diff is collapsed.
This diff is collapsed.
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "iomap.h" #include "iomap.h"
#include "clock.h" #include "clock.h"
#include "clock2xxx.h" #include "clock2xxx.h"
#include "cm2xxx_3xxx.h" #include "cm2xxx.h"
#include "cm-regbits-24xx.h" #include "cm-regbits-24xx.h"
/** /**
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
* passes back the correct CM_IDLEST register address for I2CHS * passes back the correct CM_IDLEST register address for I2CHS
* modules. No return value. * modules. No return value.
*/ */
static void omap2430_clk_i2chs_find_idlest(struct clk *clk, static void omap2430_clk_i2chs_find_idlest(struct clk_hw_omap *clk,
void __iomem **idlest_reg, void __iomem **idlest_reg,
u8 *idlest_bit, u8 *idlest_bit,
u8 *idlest_val) u8 *idlest_val)
...@@ -51,9 +51,7 @@ static void omap2430_clk_i2chs_find_idlest(struct clk *clk, ...@@ -51,9 +51,7 @@ static void omap2430_clk_i2chs_find_idlest(struct clk *clk,
} }
/* 2430 I2CHS has non-standard IDLEST register */ /* 2430 I2CHS has non-standard IDLEST register */
const struct clkops clkops_omap2430_i2chs_wait = { const struct clk_hw_omap_ops clkhwops_omap2430_i2chs_wait = {
.enable = omap2_dflt_clk_enable,
.disable = omap2_dflt_clk_disable,
.find_idlest = omap2430_clk_i2chs_find_idlest, .find_idlest = omap2430_clk_i2chs_find_idlest,
.find_companion = omap2_clk_dflt_find_companion, .find_companion = omap2_clk_dflt_find_companion,
}; };
...@@ -28,26 +28,11 @@ ...@@ -28,26 +28,11 @@
#include "cm.h" #include "cm.h"
#include "cm-regbits-24xx.h" #include "cm-regbits-24xx.h"
struct clk *vclk, *sclk, *dclk; struct clk_hw *dclk_hw;
/* /*
* Omap24xx specific clock functions * Omap24xx specific clock functions
*/ */
/*
* Set clocks for bypass mode for reboot to work.
*/
void omap2xxx_clk_prepare_for_reboot(void)
{
u32 rate;
if (vclk == NULL || sclk == NULL)
return;
rate = clk_get_rate(sclk);
clk_set_rate(vclk, rate);
}
/* /*
* Switch the MPU rate if specified on cmdline. We cannot do this * Switch the MPU rate if specified on cmdline. We cannot do this
* early until cmdline is parsed. XXX This should be removed from the * early until cmdline is parsed. XXX This should be removed from the
......
...@@ -8,17 +8,34 @@ ...@@ -8,17 +8,34 @@
#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK2XXX_H #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK2XXX_H
#define __ARCH_ARM_MACH_OMAP2_CLOCK2XXX_H #define __ARCH_ARM_MACH_OMAP2_CLOCK2XXX_H
unsigned long omap2_table_mpu_recalc(struct clk *clk); #include <linux/clk-provider.h>
int omap2_select_table_rate(struct clk *clk, unsigned long rate); #include "clock.h"
long omap2_round_to_table_rate(struct clk *clk, unsigned long rate);
unsigned long omap2xxx_sys_clk_recalc(struct clk *clk); unsigned long omap2_table_mpu_recalc(struct clk_hw *clk,
unsigned long omap2_osc_clk_recalc(struct clk *clk); unsigned long parent_rate);
unsigned long omap2_dpllcore_recalc(struct clk *clk); int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate,
int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate); unsigned long parent_rate);
unsigned long omap2xxx_clk_get_core_rate(struct clk *clk); long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *parent_rate);
unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk,
unsigned long parent_rate);
unsigned long omap2_osc_clk_recalc(struct clk_hw *clk,
unsigned long parent_rate);
unsigned long omap2_dpllcore_recalc(struct clk_hw *hw,
unsigned long parent_rate);
int omap2_reprogram_dpllcore(struct clk_hw *clk, unsigned long rate,
unsigned long parent_rate);
void omap2xxx_clkt_dpllcore_init(struct clk_hw *hw);
unsigned long omap2_clk_apll54_recalc(struct clk_hw *hw,
unsigned long parent_rate);
unsigned long omap2_clk_apll96_recalc(struct clk_hw *hw,
unsigned long parent_rate);
unsigned long omap2xxx_clk_get_core_rate(void);
u32 omap2xxx_get_apll_clkin(void); u32 omap2xxx_get_apll_clkin(void);
u32 omap2xxx_get_sysclkdiv(void); u32 omap2xxx_get_sysclkdiv(void);
void omap2xxx_clk_prepare_for_reboot(void); void omap2xxx_clk_prepare_for_reboot(void);
void omap2xxx_clkt_vps_check_bootloader_rates(void);
void omap2xxx_clkt_vps_late_init(void);
#ifdef CONFIG_SOC_OMAP2420 #ifdef CONFIG_SOC_OMAP2420
int omap2420_clk_init(void); int omap2420_clk_init(void);
...@@ -32,13 +49,14 @@ int omap2430_clk_init(void); ...@@ -32,13 +49,14 @@ int omap2430_clk_init(void);
#define omap2430_clk_init() do { } while(0) #define omap2430_clk_init() do { } while(0)
#endif #endif
extern void __iomem *prcm_clksrc_ctrl, *cm_idlest_pll; extern void __iomem *prcm_clksrc_ctrl;
extern struct clk *dclk; extern struct clk_hw *dclk_hw;
int omap2_enable_osc_ck(struct clk_hw *hw);
extern const struct clkops clkops_omap2430_i2chs_wait; void omap2_disable_osc_ck(struct clk_hw *hw);
extern const struct clkops clkops_oscck; int omap2_clk_apll96_enable(struct clk_hw *hw);
extern const struct clkops clkops_apll96; int omap2_clk_apll54_enable(struct clk_hw *hw);
extern const struct clkops clkops_apll54; void omap2_clk_apll96_disable(struct clk_hw *hw);
void omap2_clk_apll54_disable(struct clk_hw *hw);
#endif #endif
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "clock.h" #include "clock.h"
#include "clock34xx.h" #include "clock34xx.h"
#include "cm2xxx_3xxx.h" #include "cm3xxx.h"
#include "cm-regbits-34xx.h" #include "cm-regbits-34xx.h"
/** /**
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* from the CM_{I,F}CLKEN bit. Pass back the correct info via * from the CM_{I,F}CLKEN bit. Pass back the correct info via
* @idlest_reg and @idlest_bit. No return value. * @idlest_reg and @idlest_bit. No return value.
*/ */
static void omap3430es2_clk_ssi_find_idlest(struct clk *clk, static void omap3430es2_clk_ssi_find_idlest(struct clk_hw_omap *clk,
void __iomem **idlest_reg, void __iomem **idlest_reg,
u8 *idlest_bit, u8 *idlest_bit,
u8 *idlest_val) u8 *idlest_val)
...@@ -49,21 +49,16 @@ static void omap3430es2_clk_ssi_find_idlest(struct clk *clk, ...@@ -49,21 +49,16 @@ static void omap3430es2_clk_ssi_find_idlest(struct clk *clk,
*idlest_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT; *idlest_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT;
*idlest_val = OMAP34XX_CM_IDLEST_VAL; *idlest_val = OMAP34XX_CM_IDLEST_VAL;
} }
const struct clk_hw_omap_ops clkhwops_omap3430es2_ssi_wait = {
const struct clkops clkops_omap3430es2_ssi_wait = {
.enable = omap2_dflt_clk_enable,
.disable = omap2_dflt_clk_disable,
.find_idlest = omap3430es2_clk_ssi_find_idlest, .find_idlest = omap3430es2_clk_ssi_find_idlest,
.find_companion = omap2_clk_dflt_find_companion, .find_companion = omap2_clk_dflt_find_companion,
}; };
const struct clkops clkops_omap3430es2_iclk_ssi_wait = { const struct clk_hw_omap_ops clkhwops_omap3430es2_iclk_ssi_wait = {
.enable = omap2_dflt_clk_enable,
.disable = omap2_dflt_clk_disable,
.find_idlest = omap3430es2_clk_ssi_find_idlest,
.find_companion = omap2_clk_dflt_find_companion,
.allow_idle = omap2_clkt_iclk_allow_idle, .allow_idle = omap2_clkt_iclk_allow_idle,
.deny_idle = omap2_clkt_iclk_deny_idle, .deny_idle = omap2_clkt_iclk_deny_idle,
.find_idlest = omap3430es2_clk_ssi_find_idlest,
.find_companion = omap2_clk_dflt_find_companion,
}; };
/** /**
...@@ -80,7 +75,7 @@ const struct clkops clkops_omap3430es2_iclk_ssi_wait = { ...@@ -80,7 +75,7 @@ const struct clkops clkops_omap3430es2_iclk_ssi_wait = {
* default find_idlest code assumes that they are at the same * default find_idlest code assumes that they are at the same
* position.) No return value. * position.) No return value.
*/ */
static void omap3430es2_clk_dss_usbhost_find_idlest(struct clk *clk, static void omap3430es2_clk_dss_usbhost_find_idlest(struct clk_hw_omap *clk,
void __iomem **idlest_reg, void __iomem **idlest_reg,
u8 *idlest_bit, u8 *idlest_bit,
u8 *idlest_val) u8 *idlest_val)
...@@ -94,20 +89,16 @@ static void omap3430es2_clk_dss_usbhost_find_idlest(struct clk *clk, ...@@ -94,20 +89,16 @@ static void omap3430es2_clk_dss_usbhost_find_idlest(struct clk *clk,
*idlest_val = OMAP34XX_CM_IDLEST_VAL; *idlest_val = OMAP34XX_CM_IDLEST_VAL;
} }
const struct clkops clkops_omap3430es2_dss_usbhost_wait = { const struct clk_hw_omap_ops clkhwops_omap3430es2_dss_usbhost_wait = {
.enable = omap2_dflt_clk_enable,
.disable = omap2_dflt_clk_disable,
.find_idlest = omap3430es2_clk_dss_usbhost_find_idlest, .find_idlest = omap3430es2_clk_dss_usbhost_find_idlest,
.find_companion = omap2_clk_dflt_find_companion, .find_companion = omap2_clk_dflt_find_companion,
}; };
const struct clkops clkops_omap3430es2_iclk_dss_usbhost_wait = { const struct clk_hw_omap_ops clkhwops_omap3430es2_iclk_dss_usbhost_wait = {
.enable = omap2_dflt_clk_enable,
.disable = omap2_dflt_clk_disable,
.find_idlest = omap3430es2_clk_dss_usbhost_find_idlest,
.find_companion = omap2_clk_dflt_find_companion,
.allow_idle = omap2_clkt_iclk_allow_idle, .allow_idle = omap2_clkt_iclk_allow_idle,
.deny_idle = omap2_clkt_iclk_deny_idle, .deny_idle = omap2_clkt_iclk_deny_idle,
.find_idlest = omap3430es2_clk_dss_usbhost_find_idlest,
.find_companion = omap2_clk_dflt_find_companion,
}; };
/** /**
...@@ -121,7 +112,7 @@ const struct clkops clkops_omap3430es2_iclk_dss_usbhost_wait = { ...@@ -121,7 +112,7 @@ const struct clkops clkops_omap3430es2_iclk_dss_usbhost_wait = {
* shift from the CM_{I,F}CLKEN bit. Pass back the correct info via * shift from the CM_{I,F}CLKEN bit. Pass back the correct info via
* @idlest_reg and @idlest_bit. No return value. * @idlest_reg and @idlest_bit. No return value.
*/ */
static void omap3430es2_clk_hsotgusb_find_idlest(struct clk *clk, static void omap3430es2_clk_hsotgusb_find_idlest(struct clk_hw_omap *clk,
void __iomem **idlest_reg, void __iomem **idlest_reg,
u8 *idlest_bit, u8 *idlest_bit,
u8 *idlest_val) u8 *idlest_val)
...@@ -134,18 +125,14 @@ static void omap3430es2_clk_hsotgusb_find_idlest(struct clk *clk, ...@@ -134,18 +125,14 @@ static void omap3430es2_clk_hsotgusb_find_idlest(struct clk *clk,
*idlest_val = OMAP34XX_CM_IDLEST_VAL; *idlest_val = OMAP34XX_CM_IDLEST_VAL;
} }
const struct clkops clkops_omap3430es2_hsotgusb_wait = { const struct clk_hw_omap_ops clkhwops_omap3430es2_iclk_hsotgusb_wait = {
.enable = omap2_dflt_clk_enable, .allow_idle = omap2_clkt_iclk_allow_idle,
.disable = omap2_dflt_clk_disable, .deny_idle = omap2_clkt_iclk_deny_idle,
.find_idlest = omap3430es2_clk_hsotgusb_find_idlest, .find_idlest = omap3430es2_clk_hsotgusb_find_idlest,
.find_companion = omap2_clk_dflt_find_companion, .find_companion = omap2_clk_dflt_find_companion,
}; };
const struct clkops clkops_omap3430es2_iclk_hsotgusb_wait = { const struct clk_hw_omap_ops clkhwops_omap3430es2_hsotgusb_wait = {
.enable = omap2_dflt_clk_enable,
.disable = omap2_dflt_clk_disable,
.find_idlest = omap3430es2_clk_hsotgusb_find_idlest, .find_idlest = omap3430es2_clk_hsotgusb_find_idlest,
.find_companion = omap2_clk_dflt_find_companion, .find_companion = omap2_clk_dflt_find_companion,
.allow_idle = omap2_clkt_iclk_allow_idle,
.deny_idle = omap2_clkt_iclk_deny_idle,
}; };
This diff is collapsed.
This diff is collapsed.
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK36XX_H #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK36XX_H
#define __ARCH_ARM_MACH_OMAP2_CLOCK36XX_H #define __ARCH_ARM_MACH_OMAP2_CLOCK36XX_H
extern const struct clkops clkops_omap36xx_pwrdn_with_hsdiv_wait_restore; extern int omap36xx_pwrdn_clk_enable_with_hsdiv_restore(struct clk_hw *hw);
#endif #endif
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
/* needed by omap3_core_dpll_m2_set_rate() */ /* needed by omap3_core_dpll_m2_set_rate() */
struct clk *sdrc_ick_p, *arm_fck_p; struct clk *sdrc_ick_p, *arm_fck_p;
int omap3_dpll4_set_rate(struct clk_hw *hw, unsigned long rate,
int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate) unsigned long parent_rate)
{ {
/* /*
* According to the 12-5 CDP code from TI, "Limitation 2.5" * According to the 12-5 CDP code from TI, "Limitation 2.5"
...@@ -51,7 +51,7 @@ int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate) ...@@ -51,7 +51,7 @@ int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate)
return -EINVAL; return -EINVAL;
} }
return omap3_noncore_dpll_set_rate(clk, rate); return omap3_noncore_dpll_set_rate(hw, rate, parent_rate);
} }
void __init omap3_clk_lock_dpll5(void) void __init omap3_clk_lock_dpll5(void)
......
...@@ -9,8 +9,10 @@ ...@@ -9,8 +9,10 @@
#define __ARCH_ARM_MACH_OMAP2_CLOCK3XXX_H #define __ARCH_ARM_MACH_OMAP2_CLOCK3XXX_H
int omap3xxx_clk_init(void); int omap3xxx_clk_init(void);
int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate); int omap3_dpll4_set_rate(struct clk_hw *clk, unsigned long rate,
int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate); unsigned long parent_rate);
int omap3_core_dpll_m2_set_rate(struct clk_hw *clk, unsigned long rate,
unsigned long parent_rate);
void omap3_clk_lock_dpll5(void); void omap3_clk_lock_dpll5(void);
extern struct clk *sdrc_ick_p; extern struct clk *sdrc_ick_p;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -38,4 +38,6 @@ extern u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, s16 inst, ...@@ -38,4 +38,6 @@ extern u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, s16 inst,
extern u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx, extern u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx,
u32 mask); u32 mask);
extern void omap_cm_base_init(void);
#endif #endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment