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

Commit b0002e0e authored by Tony Lindgren's avatar Tony Lindgren
Browse files

omap: Use ioremap in dispc.c



Use ioremap in dispc.c

Cc: Imre Deak <imre.deak@nokia.com>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent e4e7a13a
Loading
Loading
Loading
Loading
+17 −3
Original line number Diff line number Diff line
@@ -204,6 +204,7 @@ static u32 inline dispc_read_reg(int idx)
/* Select RFBI or bypass mode */
static void enable_rfbi_mode(int enable)
{
	void __iomem *rfbi_control;
	u32 l;

	l = dispc_read_reg(DISPC_CONTROL);
@@ -216,9 +217,15 @@ static void enable_rfbi_mode(int enable)
	dispc_write_reg(DISPC_CONTROL, l);

	/* Set bypass mode in RFBI module */
	l = __raw_readl(OMAP2_IO_ADDRESS(RFBI_CONTROL));
	rfbi_control = ioremap(RFBI_CONTROL, SZ_1K);
	if (!rfbi_control) {
		pr_err("Unable to ioremap rfbi_control\n");
		return;
	}
	l = __raw_readl(rfbi_control);
	l |= enable ? 0 : (1 << 1);
	__raw_writel(l, OMAP2_IO_ADDRESS(RFBI_CONTROL));
	__raw_writel(l, rfbi_control);
	iounmap(rfbi_control);
}

static void set_lcd_data_lines(int data_lines)
@@ -1367,6 +1374,7 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode,
	int r;
	u32 l;
	struct lcd_panel *panel = fbdev->panel;
	void __iomem *ram_fw_base;
	int tmo = 10000;
	int skip_init = 0;
	int i;
@@ -1441,7 +1449,13 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode,
	}

	/* L3 firewall setting: enable access to OCM RAM */
	__raw_writel(0x402000b0, OMAP2_IO_ADDRESS(0x680050a0));
	ram_fw_base = ioremap(0x68005000, SZ_1K);
	if (!ram_fw_base) {
		dev_err(dispc.fbdev->dev, "Cannot ioremap to enable OCM RAM\n");
		goto fail1;
	}
	__raw_writel(0x402000b0, ram_fw_base + 0xa0);
	iounmap(ram_fw_base);

	if ((r = alloc_palette_ram()) < 0)
		goto fail2;