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

Commit 37f286e9 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'omap-for-v3.19/prcm-cleanup' of...

Merge tag 'omap-for-v3.19/prcm-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Pull "omap prcm clean-up for v3.19" from Tony Lindgren:

Clean-up series for omap PRCM (Power Reset Clock Module) from
Tero Kristo to move things a bit closer to becoming a proper
device driver.

* tag 'omap-for-v3.19/prcm-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap

: (26 commits)
  ARM: OMAP2+: PRM: provide generic API for system reset
  ARM: OMAP3+: PRM: add generic API for reconfiguring I/O chain
  ARM: OMAP4: PRM: make PRCM interrupt handler related functions static
  ARM: OMAP3: PRM: make PRCM interrupt handler related functions static
  ARM: OMAP4: PRM: make omap4_prm_read/write_inst_reg calls static
  ARM: AM33xx: PRM: make direct register access functions static
  ARM: AM33xx: PRM: move global warm reset implementation to driver
  ARM: OMAP4+: CM: remove omap4_cm1/cm2_* functions
  ARM: OMAP4: CM: make cminst direct register access functions static
  ARM: OMAP4: CM: move public definitions from cminst44xx.h to cm44xx.h
  ARM: OMAP2+: PRM: add generic API for checking hardreset status
  ARM: OMAP2+: PRM: add generic API for deasserting hardware reset
  ARM: OMAP2+: PRM: add generic API for asserting hardware reset
  ARM: AM33xx: PRM: add support for prm_init
  ARM: AM43xx: hwmod: use OMAP4 hardreset ops instead of the AM33xx version
  ARM: AM33xx: hwmod: remove am33xx specific module SoC opts
  ARM: OMAP2/3: CM: make cm_split_idlest_reg SoC calls static
  ARM: OMAP2+: CM: add common APIs for cm_module_enable/disable
  ARM: OMAP2+: CM: make clkdm_hwsup operations static
  ARM: OMAP4+/AM33xx: CM: add common API for cm_wait_module_idle
  ...

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 3cb0df93 61c8621e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ obj-y += prm_common.o cm_common.o
obj-$(CONFIG_ARCH_OMAP2)		+= prm2xxx_3xxx.o prm2xxx.o cm2xxx.o
obj-$(CONFIG_ARCH_OMAP3)		+= prm2xxx_3xxx.o prm3xxx.o cm3xxx.o
obj-$(CONFIG_ARCH_OMAP3)		+= vc3xxx_data.o vp3xxx_data.o
omap-prcm-4-5-common			=  cminst44xx.o cm44xx.o prm44xx.o \
omap-prcm-4-5-common			=  cminst44xx.o prm44xx.o \
					   prcm_mpu44xx.o prminst44xx.o \
					   vc44xx_data.o vp44xx_data.o
obj-$(CONFIG_ARCH_OMAP4)		+= $(omap-prcm-4-5-common)
+2 −10
Original line number Diff line number Diff line
@@ -9,8 +9,7 @@
#include <linux/reboot.h>

#include "common.h"
#include "prm-regbits-33xx.h"
#include "prm33xx.h"
#include "prm.h"

/**
 * am3xx_restart - trigger a software restart of the SoC
@@ -24,12 +23,5 @@ void am33xx_restart(enum reboot_mode mode, const char *cmd)
{
	/* TODO: Handle mode and cmd if necessary */

	am33xx_prm_rmw_reg_bits(AM33XX_RST_GLOBAL_WARM_SW_MASK,
				AM33XX_RST_GLOBAL_WARM_SW_MASK,
				AM33XX_PRM_DEVICE_MOD,
				AM33XX_PRM_RSTCTRL_OFFSET);

	/* OCP barrier */
	(void)am33xx_prm_read_reg(AM33XX_PRM_DEVICE_MOD,
				  AM33XX_PRM_RSTCTRL_OFFSET);
	omap_prm_reset_system();
}
+2 −1
Original line number Diff line number Diff line
@@ -171,7 +171,8 @@ static void _omap2_module_wait_ready(struct clk_hw_omap *clk)
		_wait_idlest_generic(clk, idlest_reg, (1 << idlest_bit),
				     idlest_val, __clk_get_name(clk->hw.clk));
	} else {
		cm_wait_module_ready(prcm_mod, idlest_reg_id, idlest_bit);
		omap_cm_wait_module_ready(0, prcm_mod, idlest_reg_id,
					  idlest_bit);
	};
}

+15 −3
Original line number Diff line number Diff line
@@ -45,17 +45,29 @@ extern void omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2);
 * struct cm_ll_data - fn ptrs to per-SoC CM function implementations
 * @split_idlest_reg: ptr to the SoC CM-specific split_idlest_reg impl
 * @wait_module_ready: ptr to the SoC CM-specific wait_module_ready impl
 * @wait_module_idle: ptr to the SoC CM-specific wait_module_idle impl
 * @module_enable: ptr to the SoC CM-specific module_enable impl
 * @module_disable: ptr to the SoC CM-specific module_disable impl
 */
struct cm_ll_data {
	int (*split_idlest_reg)(void __iomem *idlest_reg, s16 *prcm_inst,
				u8 *idlest_reg_id);
	int (*wait_module_ready)(s16 prcm_mod, u8 idlest_id, u8 idlest_shift);
	int (*wait_module_ready)(u8 part, s16 prcm_mod, u16 idlest_reg,
				 u8 idlest_shift);
	int (*wait_module_idle)(u8 part, s16 prcm_mod, u16 idlest_reg,
				u8 idlest_shift);
	void (*module_enable)(u8 mode, u8 part, u16 inst, u16 clkctrl_offs);
	void (*module_disable)(u8 part, u16 inst, u16 clkctrl_offs);
};

extern int cm_split_idlest_reg(void __iomem *idlest_reg, s16 *prcm_inst,
			       u8 *idlest_reg_id);
extern int cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift);

int omap_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_reg,
			      u8 idlest_shift);
int omap_cm_wait_module_idle(u8 part, s16 prcm_mod, u16 idlest_reg,
			     u8 idlest_shift);
int omap_cm_module_enable(u8 mode, u8 part, u16 inst, u16 clkctrl_offs);
int omap_cm_module_disable(u8 part, u16 inst, u16 clkctrl_offs);
extern int cm_register(struct cm_ll_data *cld);
extern int cm_unregister(struct cm_ll_data *cld);

+0 −2
Original line number Diff line number Diff line
@@ -25,8 +25,6 @@
#ifndef __ARCH_ARM_MACH_OMAP2_CM1_44XX_H
#define __ARCH_ARM_MACH_OMAP2_CM1_44XX_H

#include "cm_44xx_54xx.h"

/* CM1 base address */
#define OMAP4430_CM1_BASE		0x4a004000

Loading