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

Commit e61b1701 authored by Jonghun Han's avatar Jonghun Han Committed by Kukjin Kim
Browse files

ARM: EXYNOS4: Add platform device and helper functions for FIMD



This patch adds platform device s5p_device_fimd0 for EXYNOS4 FIMD0.
EXYNOS4 has two FIMDs(FIMD0, FIMD1). FIMD1 will be added later.
Some definitions used to enable EXYNOS4 FIMD0 are added.

Signed-off-by: default avatarJonghun Han <jonghun.han@samsung.com>
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent 1aee2add
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -26,6 +26,11 @@ config EXYNOS4_DEV_AHCI
	help
	  Compile in platform device definitions for AHCI

config EXYNOS4_SETUP_FIMD0
	bool
	help
	  Common setup code for FIMD0.

config EXYNOS4_DEV_PD
	bool
	help
@@ -109,6 +114,7 @@ menu "EXYNOS4 Machines"
config MACH_SMDKC210
	bool "SMDKC210"
	select CPU_EXYNOS4210
	select S5P_DEV_FIMD0
	select S3C_DEV_RTC
	select S3C_DEV_WDT
	select S3C_DEV_I2C1
@@ -118,6 +124,7 @@ config MACH_SMDKC210
	select S3C_DEV_HSMMC3
	select EXYNOS4_DEV_PD
	select EXYNOS4_DEV_SYSMMU
	select EXYNOS4_SETUP_FIMD0
	select EXYNOS4_SETUP_I2C1
	select EXYNOS4_SETUP_SDHCI
	help
@@ -126,6 +133,7 @@ config MACH_SMDKC210
config MACH_SMDKV310
	bool "SMDKV310"
	select CPU_EXYNOS4210
	select S5P_DEV_FIMD0
	select S3C_DEV_RTC
	select S3C_DEV_WDT
	select S3C_DEV_I2C1
@@ -137,6 +145,7 @@ config MACH_SMDKV310
	select SAMSUNG_DEV_KEYPAD
	select EXYNOS4_DEV_PD
	select EXYNOS4_DEV_SYSMMU
	select EXYNOS4_SETUP_FIMD0
	select EXYNOS4_SETUP_I2C1
	select EXYNOS4_SETUP_KEYPAD
	select EXYNOS4_SETUP_SDHCI
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o
obj-$(CONFIG_EXYNOS4_DEV_DWMCI)	+= dev-dwmci.o

obj-$(CONFIG_EXYNOS4_SETUP_FIMC)	+= setup-fimc.o
obj-$(CONFIG_EXYNOS4_SETUP_FIMD0)	+= setup-fimd0.o
obj-$(CONFIG_EXYNOS4_SETUP_I2C1)	+= setup-i2c1.o
obj-$(CONFIG_EXYNOS4_SETUP_I2C2)	+= setup-i2c2.o
obj-$(CONFIG_EXYNOS4_SETUP_I2C3)	+= setup-i2c3.o
+3 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include <plat/adc-core.h>
#include <plat/sdhci.h>
#include <plat/devs.h>
#include <plat/fb-core.h>
#include <plat/fimc-core.h>
#include <plat/iic-core.h>

@@ -153,6 +154,8 @@ void __init exynos4_map_io(void)
	s3c_i2c0_setname("s3c2440-i2c");
	s3c_i2c1_setname("s3c2440-i2c");
	s3c_i2c2_setname("s3c2440-i2c");

	s5p_fb_setname(0, "exynos4-fb");
}

void __init exynos4_init_clocks(int xtal)
+43 −0
Original line number Diff line number Diff line
/* linux/arch/arm/mach-exynos4/setup-fimd0.c
 *
 * Copyright (c) 2009-2011 Samsung Electronics Co., Ltd.
 *             http://www.samsung.com
 *
 * Base Exynos4 FIMD 0 configuration
 *
 * 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/fb.h>
#include <linux/gpio.h>

#include <plat/gpio-cfg.h>
#include <plat/regs-fb-v4.h>

#include <mach/map.h>

void exynos4_fimd0_gpio_setup_24bpp(void)
{
	unsigned int reg;

	s3c_gpio_cfgrange_nopull(EXYNOS4_GPF0(0), 8, S3C_GPIO_SFN(2));
	s3c_gpio_cfgrange_nopull(EXYNOS4_GPF1(0), 8, S3C_GPIO_SFN(2));
	s3c_gpio_cfgrange_nopull(EXYNOS4_GPF2(0), 8, S3C_GPIO_SFN(2));
	s3c_gpio_cfgrange_nopull(EXYNOS4_GPF3(0), 4, S3C_GPIO_SFN(2));

	/*
	 * Set DISPLAY_CONTROL register for Display path selection.
	 *
	 * DISPLAY_CONTROL[1:0]
	 * ---------------------
	 *  00 | MIE
	 *  01 | MDINE
	 *  10 | FIMD : selected
	 *  11 | FIMD
	 */
	reg = __raw_readl(S3C_VA_SYS + 0x0210);
	reg |= (1 << 1);
	__raw_writel(reg, S3C_VA_SYS + 0x0210);
}
+5 −0
Original line number Diff line number Diff line
@@ -71,6 +71,11 @@ config S5P_DEV_FIMC3
	help
	  Compile in platform device definitions for FIMC controller 3

config S5P_DEV_FIMD0
	bool
	help
	  Compile in platform device definitions for FIMD controller 0

config S5P_DEV_ONENAND
	bool
	help
Loading