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

Commit eac568b9 authored by Devesh Jhunjhunwala's avatar Devesh Jhunjhunwala Committed by Taniya Das
Browse files

clk: msm: Add support to control MEM_PERPIH_OFF bit of branch clock



Update cbcr_set_flags method to add support for controlling the
MEM_PERPIH_OFF bit for branch clocks.

Change-Id: I87451b02cb9000dc850fdfaa52a5a9f9fd2893a1
Signed-off-by: default avatarDevesh Jhunjhunwala <deveshj@codeaurora.org>
parent 5f47fa47
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -586,6 +586,13 @@ static int cbcr_set_flags(void * __iomem regaddr, unsigned flags)
	spin_lock_irqsave(&local_clock_reg_lock, irq_flags);
	cbcr_val = readl_relaxed(regaddr);
	switch (flags) {
	case CLKFLAG_PERIPH_OFF_SET:
		cbcr_val |= BIT(12);
		delay_us = 1;
		break;
	case CLKFLAG_PERIPH_OFF_CLEAR:
		cbcr_val &= ~BIT(12);
		break;
	case CLKFLAG_RETAIN_PERIPH:
		cbcr_val |= BIT(13);
		delay_us = 1;
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2009, 2012-2014 The Linux Foundation. All rights reserved.
/* Copyright (c) 2009, 2012-2015 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -30,6 +30,8 @@
#define CLKFLAG_NO_RATE_CACHE		0x00004000
#define CLKFLAG_MEASURE			0x00008000
#define CLKFLAG_EPROBE_DEFER		0x00010000
#define CLKFLAG_PERIPH_OFF_SET		0x00020000
#define CLKFLAG_PERIPH_OFF_CLEAR	0x00040000

struct clk_lookup;
struct clk;