aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/samsung/mfc5x/mfc_reg.c
blob: 91375f19c23e7b0a2b685ed6d903e3ef50c71d30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * linux/drivers/media/video/samsung/mfc5x/mfc_regs.c
 *
 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
 *		http://www.samsung.com/
 *
 * Register interface for Samsung MFC (Multi Function Codec - FIMV) driver
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <linux/io.h>

static void __iomem *regs;

void init_reg(void __iomem *base)
{
	regs = base;
}

void write_reg(unsigned int data, unsigned int offset)
{
	__raw_writel(data, regs + offset);
}

unsigned int read_reg(unsigned int offset)
{
	return __raw_readl(regs + offset);
}