Commit 4e34e270 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'omap-for-v4.16/soc-signed' of...

Merge tag 'omap-for-v4.16/soc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Pull "SoC changes for omaps for v4.16 merge window" from Tony Lindgren:

For most part this is a series from Tero Kristo to prepare things
for using clkctrl clocks with DTS data. The other changes are to
make few data structures const.

* tag 'omap-for-v4.16/soc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: CM: make cm_ll_data structures as const
  ARM: OMAP2+: CM: make some pointers and function arguments as const
  ARM: DM816x: hwmod_data: fix clockdomain name for sata hwmod
  ARM: OMAP2+: hwmod: calculate physical register address on am33xx
  ARM: AM33xx: CM: add support for getting physical address for a register
  ARM: OMAP2+: clockdomain: remove the obsolete clkdm_xlate_address API
  ARM: OMAP2+: hwmod: fix clkctrl address translation logic
  ARM: OMAP4: CMINST: add support for translating clkctrl addresses
  ARM: OMAP2+: CM: add support for getting phys address for a clkctrl register
parents f4478037 fdf36329
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1224,14 +1224,6 @@ ccd_exit:
	return 0;
}

u32 clkdm_xlate_address(struct clockdomain *clkdm)
{
	if (arch_clkdm->clkdm_xlate_address)
		return arch_clkdm->clkdm_xlate_address(clkdm);

	return 0;
}

/**
 * clkdm_hwmod_enable - add an enabled downstream hwmod to this clkdm
 * @clkdm: struct clockdomain *
+0 −2
Original line number Diff line number Diff line
@@ -175,7 +175,6 @@ struct clkdm_ops {
	void	(*clkdm_deny_idle)(struct clockdomain *clkdm);
	int	(*clkdm_clk_enable)(struct clockdomain *clkdm);
	int	(*clkdm_clk_disable)(struct clockdomain *clkdm);
	u32	(*clkdm_xlate_address)(struct clockdomain *clkdm);
};

int clkdm_register_platform_funcs(struct clkdm_ops *co);
@@ -214,7 +213,6 @@ int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk);
int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk);
int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh);
int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh);
u32 clkdm_xlate_address(struct clockdomain *clkdm);

extern void __init omap242x_clockdomains_init(void);
extern void __init omap243x_clockdomains_init(void);
+5 −2
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ extern void omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2);
 * @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
 * @xlate_clkctrl: ptr to the SoC CM-specific clkctrl xlate addr impl
 */
struct cm_ll_data {
	int (*split_idlest_reg)(struct clk_omap_reg *idlest_reg, s16 *prcm_inst,
@@ -62,6 +63,7 @@ struct cm_ll_data {
				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);
	u32 (*xlate_clkctrl)(u8 part, u16 inst, u16 clkctrl_offs);
};

extern int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst,
@@ -72,8 +74,9 @@ 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);
u32 omap_cm_xlate_clkctrl(u8 part, u16 inst, u16 clkctrl_offs);
extern int cm_register(const struct cm_ll_data *cld);
extern int cm_unregister(const struct cm_ll_data *cld);
int omap_cm_init(void);
int omap2_cm_base_init(void);

+1 −1
Original line number Diff line number Diff line
@@ -385,7 +385,7 @@ void omap2xxx_cm_set_mod_dividers(u32 mpu, u32 dsp, u32 gfx, u32 core, u32 mdm)
 *
 */

static struct cm_ll_data omap2xxx_cm_ll_data = {
static const struct cm_ll_data omap2xxx_cm_ll_data = {
	.split_idlest_reg	= &omap2xxx_cm_split_idlest_reg,
	.wait_module_ready	= &omap2xxx_cm_wait_module_ready,
};
+7 −1
Original line number Diff line number Diff line
@@ -333,6 +333,11 @@ static int am33xx_clkdm_clk_disable(struct clockdomain *clkdm)
	return 0;
}

static u32 am33xx_cm_xlate_clkctrl(u8 part, u16 inst, u16 offset)
{
	return cm_base.pa + inst + offset;
}

struct clkdm_ops am33xx_clkdm_operations = {
	.clkdm_sleep		= am33xx_clkdm_sleep,
	.clkdm_wakeup		= am33xx_clkdm_wakeup,
@@ -342,11 +347,12 @@ struct clkdm_ops am33xx_clkdm_operations = {
	.clkdm_clk_disable	= am33xx_clkdm_clk_disable,
};

static struct cm_ll_data am33xx_cm_ll_data = {
static const struct cm_ll_data am33xx_cm_ll_data = {
	.wait_module_ready	= &am33xx_cm_wait_module_ready,
	.wait_module_idle	= &am33xx_cm_wait_module_idle,
	.module_enable		= &am33xx_cm_module_enable,
	.module_disable		= &am33xx_cm_module_disable,
	.xlate_clkctrl		= &am33xx_cm_xlate_clkctrl,
};

int __init am33xx_cm_init(const struct omap_prcm_init_data *data)
Loading