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

Commit 68c3d935 authored by Colin Tuckley's avatar Colin Tuckley Committed by Catalin Marinas
Browse files

RealView: Use the correct oscillator for the CLCD on PB1176



On PB1176, oscillator 0 rather than 4 should be used.

Signed-off-by: default avatarColin Tuckley <colin.tuckley@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 0173a326
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@
#include <mach/hardware.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include <asm/leds.h>
#include <asm/leds.h>
#include <asm/mach-types.h>
#include <asm/hardware/arm_timer.h>
#include <asm/hardware/arm_timer.h>
#include <asm/hardware/icst307.h>
#include <asm/hardware/icst307.h>


@@ -177,9 +178,14 @@ static const struct icst307_params realview_oscvco_params = {
static void realview_oscvco_set(struct clk *clk, struct icst307_vco vco)
static void realview_oscvco_set(struct clk *clk, struct icst307_vco vco)
{
{
	void __iomem *sys_lock = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LOCK_OFFSET;
	void __iomem *sys_lock = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LOCK_OFFSET;
	void __iomem *sys_osc = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC4_OFFSET;
	void __iomem *sys_osc;
	u32 val;
	u32 val;


	if (machine_is_realview_pb1176())
		sys_osc = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC0_OFFSET;
	else
		sys_osc = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC4_OFFSET;

	val = readl(sys_osc) & ~0x7ffff;
	val = readl(sys_osc) & ~0x7ffff;
	val |= vco.v | (vco.r << 9) | (vco.s << 16);
	val |= vco.v | (vco.r << 9) | (vco.s << 16);