aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos
diff options
context:
space:
mode:
authorDorian Snyder <dastin1015@gmail.com>2013-06-12 02:24:45 -0700
committerDorian Snyder <dastin1015@gmail.com>2013-06-20 00:06:04 -0700
commit4b2308ce699b9c599dd6e6acf57ac11f483381d9 (patch)
tree4c31179b06d094887b1c8ca70264cf8f184a5981 /arch/arm/mach-exynos
parent855d6a6c1f7c54ef073caac3f6c5f9b1ed72eb4d (diff)
downloadkernel_samsung_smdk4412-4b2308ce699b9c599dd6e6acf57ac11f483381d9.zip
kernel_samsung_smdk4412-4b2308ce699b9c599dd6e6acf57ac11f483381d9.tar.gz
kernel_samsung_smdk4412-4b2308ce699b9c599dd6e6acf57ac11f483381d9.tar.bz2
d710: initial support for the Epic 4G Touch (SPH-D710)
Change-Id: Iafbd9fb45253b02d539ac0ba114f57b3bf9eeed4
Diffstat (limited to 'arch/arm/mach-exynos')
-rw-r--r--arch/arm/mach-exynos/Makefile3
-rw-r--r--arch/arm/mach-exynos/cpuidle-exynos4.c49
-rw-r--r--arch/arm/mach-exynos/dev-c1-phone.c74
-rw-r--r--arch/arm/mach-exynos/include/mach/gpio-u1.h6
-rw-r--r--arch/arm/mach-exynos/mach-u1.c130
-rw-r--r--arch/arm/mach-exynos/sec-reboot.c34
-rw-r--r--arch/arm/mach-exynos/sec-switch_max8997.c58
-rw-r--r--arch/arm/mach-exynos/setup-fimc0.c4
-rw-r--r--arch/arm/mach-exynos/setup-sdhci-gpio.c43
9 files changed, 385 insertions, 16 deletions
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 65bf807..70025c6 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -84,6 +84,9 @@ endif
else
obj-$(CONFIG_MACH_U1_BD) += u1-gpio.o
endif
+ifeq ($(CONFIG_MACH_U1_NA_SPR),y)
+obj-$(CONFIG_MACH_U1) += dev-c1-phone.o
+endif
obj-$(CONFIG_MACH_Q1_BD) += q1-gpio.o board-gps-bcm475x.o
obj-$(CONFIG_MACH_U1) += u1-wlan.o
obj-$(CONFIG_MACH_PX) += mach-px.o sec-common.o board-gps-bcm475x.o px-switch.o
diff --git a/arch/arm/mach-exynos/cpuidle-exynos4.c b/arch/arm/mach-exynos/cpuidle-exynos4.c
index 08c5b05..3bfc3fb 100644
--- a/arch/arm/mach-exynos/cpuidle-exynos4.c
+++ b/arch/arm/mach-exynos/cpuidle-exynos4.c
@@ -341,10 +341,12 @@ static int check_usb_op(void)
#endif
}
-#ifdef CONFIG_SND_SAMSUNG_RP
-#if defined(CONFIG_MACH_U1_NA_SPR)
+#if defined (CONFIG_MACH_U1_NA_SPR) || (CONFIG_MACH_U1_NA_USCC)
#include "../../../sound/soc/samsung/srp-types.h"
+#include "../../../sound/soc/samsung/idma.h"
#endif
+
+#ifdef CONFIG_SND_SAMSUNG_RP
extern int srp_get_op_level(void); /* By srp driver */
#endif
@@ -370,17 +372,33 @@ static inline int check_gps_uart_op(void)
return gps_is_running;
}
-#ifdef CONFIG_INTERNAL_MODEM_IF
+#if defined(CONFIG_INTERNAL_MODEM_IF) || defined(CONFIG_SAMSUNG_PHONE_TTY)
static int check_idpram_op(void)
{
/* This pin is high when CP might be accessing dpram */
+#ifdef CONFIG_MACH_U1_NA_SPR
+ int cp_int = __raw_readl(S5P_VA_GPIO2 + 0xC24) & 4;
+#else
int cp_int = gpio_get_value(GPIO_CP_AP_DPRAM_INT);
+#endif
if (cp_int != 0)
pr_info("%s cp_int is high.\n", __func__);
return cp_int;
}
#endif
+#if defined(CONFIG_ISDBT)
+static int check_isdbt_op(void)
+{
+ /* This pin is high when isdbt is working */
+ int isdbt_is_running = gpio_get_value(GPIO_ISDBT_EN);
+
+ if (isdbt_is_running != 0)
+ printk(KERN_INFO "isdbt_is_running is high\n");
+ return isdbt_is_running;
+}
+#endif
+
static atomic_t sromc_use_count;
void set_sromc_access(bool access)
@@ -410,21 +428,28 @@ static int exynos4_check_operation(void)
#ifdef CONFIG_SND_SAMSUNG_RP
if (srp_get_op_level())
return 1;
-#if defined(CONFIG_MACH_U1_NA_SPR)
+#endif
+
+#if defined (CONFIG_MACH_U1_NA_SPR) || (CONFIG_MACH_U1_NA_USCC)
+#ifdef CONFIG_SND_SAMSUNG_RP
if (!srp_get_status(IS_RUNNING))
return 1;
+#elif defined(CONFIG_SND_SAMSUNG_ALP)
+ if (!idma_is_running())
+ return 1;
#endif
#endif
+
if (check_usb_op())
return 1;
-#if defined(CONFIG_BT)
- if (check_bt_op())
+#if defined(CONFIG_ISDBT)
+ if (check_isdbt_op())
return 1;
#endif
-#ifdef CONFIG_INTERNAL_MODEM_IF
- if (check_idpram_op())
+#if defined(CONFIG_BT)
+ if (check_bt_op())
return 1;
#endif
@@ -439,6 +464,10 @@ static int exynos4_check_operation(void)
return 1;
}
+#ifdef CONFIG_INTERNAL_MODEM_IF
+ if (check_idpram_op())
+ return 1;
+#endif
return 0;
}
@@ -634,7 +663,7 @@ static int exynos4_enter_core0_lpa(struct cpuidle_device *dev,
#endif
local_irq_disable();
-#ifdef CONFIG_INTERNAL_MODEM_IF
+#if defined(CONFIG_INTERNAL_MODEM_IF) || defined(CONFIG_SAMSUNG_PHONE_TTY)
gpio_set_value(GPIO_PDA_ACTIVE, 0);
#endif
@@ -730,7 +759,7 @@ early_wakeup:
if (log_en)
pr_info("---lpa\n");
-#ifdef CONFIG_INTERNAL_MODEM_IF
+#if defined(CONFIG_INTERNAL_MODEM_IF) || defined(CONFIG_SAMSUNG_PHONE_TTY)
gpio_set_value(GPIO_PDA_ACTIVE, 1);
#endif
diff --git a/arch/arm/mach-exynos/dev-c1-phone.c b/arch/arm/mach-exynos/dev-c1-phone.c
new file mode 100644
index 0000000..94be259
--- /dev/null
+++ b/arch/arm/mach-exynos/dev-c1-phone.c
@@ -0,0 +1,74 @@
+/* linux/arch/arm/mach-s5pv310/dev-herring-phone.c
+ * Copyright (C) 2010 Samsung Electronics. All rights reserved.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/irq.h>
+
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+
+#include <mach/map.h>
+#include <mach/gpio.h>
+
+#include "../../../drivers/dpram/raffaello/dpram.h"
+#include "u1.h"
+
+
+static int c1_is_bootmode_recovery;
+static int setup_bootmode(char *str)
+{
+ printk(KERN_INFO "%s : %s\n", __func__, str);
+
+ c1_is_bootmode_recovery = 0;
+
+ if (str)
+ if ((*str == '2') || (*str == '4'))
+ c1_is_bootmode_recovery = 1;
+
+ printk(KERN_INFO "c1_is_bootmode_recovery = %d\n", c1_is_bootmode_recovery);
+
+ return c1_is_bootmode_recovery;
+}
+
+__setup("bootmode=", setup_bootmode);
+
+
+
+struct platform_device sec_device_dpram = {
+ .name = "dpram-device",
+ .id = -1,
+};
+
+struct platform_device sec_device_dpram_recovery = {
+ .name = "dpram-recovery",
+ .id = -1,
+};
+
+
+static int __init c1_init_phone_interface(void)
+{
+#if defined(CONFIG_SAMSUNG_PHONE_TTY)
+ if (c1_is_bootmode_recovery){
+ printk(KERN_INFO "c1_init_phone_interface - RECOVERY");
+ platform_device_register(&sec_device_dpram_recovery);
+ }else{
+ printk(KERN_INFO "c1_init_phone_interface");
+ platform_device_register(&sec_device_dpram);
+ }
+#endif
+ return 0;
+}
+device_initcall(c1_init_phone_interface);
diff --git a/arch/arm/mach-exynos/include/mach/gpio-u1.h b/arch/arm/mach-exynos/include/mach/gpio-u1.h
index f077824..851f4f2 100644
--- a/arch/arm/mach-exynos/include/mach/gpio-u1.h
+++ b/arch/arm/mach-exynos/include/mach/gpio-u1.h
@@ -260,11 +260,17 @@
#define S5PV310_GPE4_6_MDM_DATA_14 EXYNOS4210_GPE4(6)
#define S5PV310_GPE4_7_MDM_DATA_15 EXYNOS4210_GPE4(7)
+#define S5PV310_MDM_IF_SEL 2
+
#define GPIO_QSC_PHONE_ON EXYNOS4_GPC1(1)
#define GPIO_QSC_PHONE_RST EXYNOS4_GPX1(4)
#define GPIO_QSC_PHONE_ACTIVE EXYNOS4_GPX1(6)
#define IRQ_QSC_PHONE_ACTIVE GPIO_QSC_PHONE_ACTIVE
#define GPIO_C210_DPRAM_INT_N EXYNOS4_GPX1(0)
+
+#define GPIO_DPRAM_INT_CP_N S5PV310_GPE0_3_MDM_IRQn
+
+#define GPIO_PDA_ACTIVE EXYNOS4_GPY4(2)
#endif
/* End */
diff --git a/arch/arm/mach-exynos/mach-u1.c b/arch/arm/mach-exynos/mach-u1.c
index 88dccdd..59cb0bc 100644
--- a/arch/arm/mach-exynos/mach-u1.c
+++ b/arch/arm/mach-exynos/mach-u1.c
@@ -395,6 +395,9 @@ static int m5mo_power_on(void)
/* VT_CORE_1.5V */
ret = gpio_direction_output(GPIO_VT_CAM_15V, 1);
+#ifdef CONFIG_TARGET_LOCALE_NA
+ s3c_gpio_setpull(GPIO_VT_CAM_15V, S3C_GPIO_PULL_NONE);
+#endif /* CONFIG_TARGET_LOCALE_NA */
CAM_CHECK_ERR_RET(ret, "output VT_CAM_1.5V");
udelay(20);
@@ -836,12 +839,26 @@ static int m5mo_power(int enable)
printk(KERN_DEBUG "%s %s\n", __func__, enable ? "on" : "down");
if (enable) {
+#if defined(CONFIG_TARGET_LOCALE_NA)
+ exynos_cpufreq_lock(DVFS_LOCK_ID_CAM, 1);
ret = m5mo_power_on();
+ exynos_cpufreq_lock_free(DVFS_LOCK_ID_CAM);
+#else
+
+ ret = m5mo_power_on();
+#endif
if (unlikely(ret))
goto error_out;
- } else
+ } else {
+#if defined(CONFIG_TARGET_LOCALE_NA)
+ exynos_cpufreq_lock(DVFS_LOCK_ID_CAM, 1);
ret = m5mo_power_down();
+ exynos_cpufreq_lock_free(DVFS_LOCK_ID_CAM);
+#else
+ ret = m5mo_power_down();
+#endif
+ }
ret = s3c_csis_power(enable);
m5mo_flash_power(enable);
@@ -3943,6 +3960,10 @@ static void u1_sound_init(void)
return;
}
gpio_direction_output(GPIO_MIC_BIAS_EN, 1);
+#ifdef CONFIG_TARGET_LOCALE_NA
+ s3c_gpio_setpull(GPIO_MIC_BIAS_EN, S3C_GPIO_PULL_NONE);
+#endif /* CONFIG_TARGET_LOCALE_NA */
+
gpio_set_value(GPIO_MIC_BIAS_EN, 0);
gpio_free(GPIO_MIC_BIAS_EN);
@@ -3952,6 +3973,10 @@ static void u1_sound_init(void)
return;
}
gpio_direction_output(GPIO_EAR_MIC_BIAS_EN, 1);
+#ifdef CONFIG_TARGET_LOCALE_NA
+ s3c_gpio_setpull(GPIO_EAR_MIC_BIAS_EN, S3C_GPIO_PULL_NONE);
+#endif /* CONFIG_TARGET_LOCALE_NA */
+
gpio_set_value(GPIO_EAR_MIC_BIAS_EN, 0);
gpio_free(GPIO_EAR_MIC_BIAS_EN);
@@ -3973,6 +3998,10 @@ static void u1_sound_init(void)
return;
}
gpio_direction_output(GPIO_SUB_MIC_BIAS_EN, 0);
+#ifdef CONFIG_TARGET_LOCALE_NA
+ s3c_gpio_setpull(GPIO_SUB_MIC_BIAS_EN, S3C_GPIO_PULL_NONE);
+#endif /* CONFIG_TARGET_LOCALE_NA */
+
gpio_free(GPIO_SUB_MIC_BIAS_EN);
}
#endif /* #if defined(CONFIG_MACH_Q1_BD) */
@@ -4575,6 +4604,94 @@ static struct sec_bat_adc_table_data temper_table_ADC7[] = {
{ 1669, -60 },
{ 1688, -70 },
};
+#endif
+/* temperature table for ADC 7 */
+#ifdef CONFIG_TARGET_LOCALE_NA
+static struct sec_bat_adc_table_data temper_table_ADC7[] = {
+ { 145, 670 },
+ { 165, 660 },
+ { 185, 650 },
+ { 205, 640 },
+ { 225, 630 },
+ { 245, 620 },
+ { 265, 610 },
+ { 285, 600 },
+ { 305, 590 },
+ { 325, 580 },
+ { 345, 570 },
+ { 365, 560 },
+ { 385, 550 },
+ { 405, 540 },
+ { 425, 530 },
+ { 445, 520 },
+ { 465, 510 },
+ { 485, 500 },
+ { 505, 490 },
+ { 525, 480 },
+ { 545, 470 },
+ { 565, 460 },
+ { 585, 450 },
+ { 605, 440 },
+ { 625, 430 },
+ { 645, 420 },
+ { 665, 410 },
+ { 685, 400 },
+ { 705, 390 },
+ { 725, 380 },
+ { 745, 370 },
+ { 765, 360 },
+ { 785, 350 },
+ { 805, 340 },
+ { 825, 330 },
+ { 845, 320 },
+ { 865, 310 },
+ { 885, 300 },
+ { 905, 290 },
+ { 925, 280 },
+ { 945, 270 },
+ { 965, 260 },
+ { 995, 250 },
+ { 1015, 240 },
+ { 1045, 230 },
+ { 1065, 220 },
+ { 1085, 210 },
+ { 1105, 200 },
+ { 1125, 190 },
+ { 1145, 180 },
+ { 1165, 170 },
+ { 1185, 160 },
+ { 1205, 150 },
+ { 1225, 140 },
+ { 1245, 130 },
+ { 1265, 120 },
+ { 1285, 110 },
+ { 1305, 100 },
+ { 1335, 90 },
+ { 1365, 80 },
+ { 1395, 70 },
+ { 1425, 60 },
+ { 1455, 50 },
+ { 1475, 40 },
+ { 1495, 30 },
+ { 1515, 20 },
+ { 1535, 10 },
+ { 1545, 0 },
+ { 1555, -10 },
+ { 1565, -20 },
+ { 1575, -30 },
+ { 1585, -40 },
+ { 1595, -50 },
+ { 1605, -60 },
+ { 1615, -70 },
+ { 1625, -80 },
+ { 1635, -90 },
+ { 1645, -100 },
+ { 1655, -110 },
+ { 1665, -120 },
+ { 1675, -130 },
+ { 1685, -140 },
+};
+
#else
/* temperature table for ADC 7 */
static struct sec_bat_adc_table_data temper_table_ADC7[] = {
@@ -5186,7 +5303,7 @@ static struct sec_jack_buttons_zone sec_jack_buttons_zones[] = {
/* 0 <= adc <=170, stable zone */
.code = KEY_MEDIA,
.adc_low = 0,
-#if defined(CONFIG_TARGET_LOCALE_NTT)
+#if defined(CONFIG_TARGET_LOCALE_NTT) || defined(CONFIG_TARGET_LOCALE_NA)
.adc_high = 150,
#else
.adc_high = 170,
@@ -5195,7 +5312,7 @@ static struct sec_jack_buttons_zone sec_jack_buttons_zones[] = {
{
/* 171 <= adc <= 370, stable zone */
.code = KEY_VOLUMEUP,
-#if defined(CONFIG_TARGET_LOCALE_NTT)
+#if defined(CONFIG_TARGET_LOCALE_NTT) || defined(CONFIG_TARGET_LOCALE_NA)
.adc_low = 151,
#else
.adc_low = 171,
@@ -5460,7 +5577,11 @@ static const u8 *mxt224_config[] = {
#define MXT224E_THRESHOLD_BATT 40
#define MXT224E_T48_THRESHOLD_BATT 28
#define MXT224E_THRESHOLD_CHRG 37
+#if defined(CONFIG_MACH_U1_NA_SPR)
+#define MXT224E_CALCFG_BATT 0x72
+#else
#define MXT224E_CALCFG_BATT 0x42
+#endif
#define MXT224E_CALCFG_CHRG 0x52
#if defined(CONFIG_TARGET_LOCALE_NA)
#define MXT224E_ATCHFRCCALTHR_NORMAL 45
@@ -7167,8 +7288,9 @@ static struct platform_device *smdkc210_devices[] __initdata = {
&exynos4_device_pd[PD_LCD1],
&exynos4_device_pd[PD_CAM],
&exynos4_device_pd[PD_TV],
+#ifndef CONFIG_TARGET_LOCALE_NA
&exynos4_device_pd[PD_GPS],
-
+#endif /* CONFIG_TARGET_LOCALE_NA */
#if defined(CONFIG_WIMAX_CMC)
&s3c_device_cmc732,
#endif
diff --git a/arch/arm/mach-exynos/sec-reboot.c b/arch/arm/mach-exynos/sec-reboot.c
index 593624b..b3c0b0a 100644
--- a/arch/arm/mach-exynos/sec-reboot.c
+++ b/arch/arm/mach-exynos/sec-reboot.c
@@ -8,6 +8,9 @@
/* charger cable state */
extern bool is_cable_attached;
+#ifdef CONFIG_MACH_U1_NA_SPR
+static void cdma_wimax_chk_modem_pwroff(void);
+#endif
static void sec_power_off(void)
{
int poweroff_try = 0;
@@ -17,6 +20,9 @@ static void sec_power_off(void)
pr_emerg("%s : cable state=%d\n", __func__, is_cable_attached);
while (1) {
+#ifdef CONFIG_MACH_U1_NA_SPR
+ cdma_wimax_chk_modem_pwroff();
+#endif
/* Check reboot charging */
if (is_cable_attached || (poweroff_try >= 5)) {
pr_emerg
@@ -70,6 +76,34 @@ static void sec_power_off(void)
#define REBOOT_SET_SWSEL 0x000e0000
#define REBOOT_SET_SUD 0x000f0000
+#ifdef CONFIG_MACH_U1_NA_SPR
+static void cdma_wimax_chk_modem_pwroff(void)
+{
+ int phone_wait_cnt = 0;
+
+ pr_emerg("%s\n", __func__);
+
+ /* phone power off */
+ gpio_direction_output(GPIO_QSC_PHONE_ON, GPIO_LEVEL_LOW);
+
+ /* confirm phone off */
+ while (1) {
+ if (gpio_get_value(GPIO_QSC_PHONE_ACTIVE)) {
+ printk(KERN_ALERT"Try to Turn Phone Off by CP_RST\n");
+ gpio_set_value(GPIO_QSC_PHONE_RST, 0);
+ if (phone_wait_cnt > 10) {
+ pr_emerg("%s: PHONE OFF Failed\n", __func__);
+ break;
+ }
+ phone_wait_cnt++;
+ mdelay(100);
+ } else {
+ pr_emerg("%s: PHONE OFF Success\n", __func__);
+ break;
+ }
+ }
+}
+#endif
static void sec_reboot(char str, const char *cmd)
{
local_irq_disable();
diff --git a/arch/arm/mach-exynos/sec-switch_max8997.c b/arch/arm/mach-exynos/sec-switch_max8997.c
index 3d05864..f6a8526 100644
--- a/arch/arm/mach-exynos/sec-switch_max8997.c
+++ b/arch/arm/mach-exynos/sec-switch_max8997.c
@@ -128,6 +128,64 @@ static ssize_t u1_switch_store_vbus(struct device *dev,
DEVICE_ATTR(disable_vbus, 0664, u1_switch_show_vbus,
u1_switch_store_vbus);
+#if defined(CONFIG_TARGET_LOCALE_NA)
+#define USB_PATH_AP 0
+#define USB_PATH_CP 1
+#define USB_PATH_ALL 2
+static int hub_usb_path;
+
+int u1_get_usb_hub_path(void)
+{
+ return hub_usb_path;
+}
+EXPORT_SYMBOL_GPL(u1_get_usb_hub_path);
+
+static ssize_t u1_switch_show_usb_path(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ int i;
+
+ switch (hub_usb_path) {
+ case USB_PATH_AP:
+ i = sprintf(buf, "USB_PATH: AP\n");
+ break;
+ case USB_PATH_CP:
+ i = sprintf(buf, "USB_PATH: CP\n");
+ break;
+ case USB_PATH_ALL:
+ i = sprintf(buf, "USB_PATH: ALL\n");
+ break;
+ default:
+ i = sprintf(buf, "USB_PATH: Unknown!\n");
+ break;
+ }
+
+ return i;
+}
+
+static ssize_t u1_switch_store_usb_path(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ if (!strncmp(buf, "AP", 2))
+ hub_usb_path = USB_PATH_AP;
+ else if (!strncmp(buf, "CP", 2))
+ hub_usb_path = USB_PATH_CP;
+ else if (!strncmp(buf, "ALL", 3))
+ hub_usb_path = USB_PATH_ALL;
+ else {
+ pr_warn("%s: Wrong command\n", __func__);
+ return count;
+ }
+ pr_info("%s: USB PATH = %d\n", __func__, hub_usb_path);
+
+ return count;
+}
+
+static DEVICE_ATTR(set_usb_path, 0664, u1_switch_show_usb_path,
+ u1_switch_store_usb_path);
+#endif /* CONFIG_TARGET_LOCALE_NA */
+
#ifdef CONFIG_TARGET_LOCALE_KOR
#include "../../../drivers/usb/gadget/s3c_udc.h"
/* usb access control for SEC DM */
diff --git a/arch/arm/mach-exynos/setup-fimc0.c b/arch/arm/mach-exynos/setup-fimc0.c
index 975412c..84eeb90 100644
--- a/arch/arm/mach-exynos/setup-fimc0.c
+++ b/arch/arm/mach-exynos/setup-fimc0.c
@@ -38,7 +38,7 @@ void s3c_fimc0_cfg_gpio(struct platform_device *pdev)
* FIELD */
s3c_gpio_cfgrange_nopull(EXYNOS4210_GPJ1(0), 5,
S3C_GPIO_SFN(2));
-#if !defined(CONFIG_MACH_P8LTE) || !defined(CONFIG_VIDEO_S5K5BBGX)
+#if !defined(CONFIG_MACH_P8LTE) && !defined(CONFIG_VIDEO_S5K5BBGX)
/* CAM B port(b0011) : DATA[0-7] */
s3c_gpio_cfgrange_nopull(EXYNOS4210_GPE1(0), 8,
S3C_GPIO_SFN(3));
@@ -74,7 +74,7 @@ void s3c_fimc0_cfg_gpio(struct platform_device *pdev)
s3c_gpio_cfgpin(EXYNOS4210_GPJ1(3), S3C_GPIO_INPUT);
s3c_gpio_setpull(EXYNOS4210_GPJ1(3), S3C_GPIO_PULL_DOWN);
-#if !defined(CONFIG_MACH_P8LTE)
+#if !defined(CONFIG_MACH_P8LTE) && !defined(CONFIG_MACH_U1_NA_SPR)
/* CAM B port(b0011) : DATA[0-7] */
s3c_gpio_cfgrange_nopull(EXYNOS4210_GPE1(0), 8, S3C_GPIO_SFN(3));
/* CAM B port(b0011) : PCLK, VSYNC, HREF, FIELD, CLKOUT */
diff --git a/arch/arm/mach-exynos/setup-sdhci-gpio.c b/arch/arm/mach-exynos/setup-sdhci-gpio.c
index 05d8ed1..00b95c2 100644
--- a/arch/arm/mach-exynos/setup-sdhci-gpio.c
+++ b/arch/arm/mach-exynos/setup-sdhci-gpio.c
@@ -23,6 +23,9 @@
#include <plat/regs-sdhci.h>
#include <plat/sdhci.h>
+extern int s3c_gpio_slp_cfgpin(unsigned int pin, unsigned int config);
+extern int s3c_gpio_slp_setpull_updown(unsigned int pin, unsigned int config);
+
#if defined(CONFIG_ARCH_EXYNOS4)
void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
{
@@ -155,6 +158,45 @@ void exynos4_setup_sdhci3_cfg_gpio(struct platform_device *dev, int width)
struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
unsigned int gpio;
+#if defined(CONFIG_WIMAX_CMC)
+ if (gpio_get_value(GPIO_WIMAX_EN)) {
+ for (gpio = EXYNOS4_GPK3(0); gpio < EXYNOS4_GPK3(2); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+ s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV2);
+ }
+ for (gpio = EXYNOS4_GPK3(3); gpio <= EXYNOS4_GPK3(6); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+ s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV2);
+ }
+ for (gpio = EXYNOS4_GPK3(0); gpio < EXYNOS4_GPK3(2); gpio++) {
+ s3c_gpio_slp_cfgpin(gpio, S3C_GPIO_SLP_INPUT);
+ s3c_gpio_slp_setpull_updown(gpio, S3C_GPIO_PULL_NONE);
+ }
+ for (gpio = EXYNOS4_GPK3(3); gpio <= EXYNOS4_GPK3(6); gpio++) {
+ s3c_gpio_slp_cfgpin(gpio, S3C_GPIO_SLP_INPUT);
+ s3c_gpio_slp_setpull_updown(gpio, S3C_GPIO_PULL_NONE);
+ }
+ } else {
+ for (gpio = EXYNOS4_GPK3(0); gpio < EXYNOS4_GPK3(2); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_DOWN);
+ }
+ for (gpio = EXYNOS4_GPK3(3); gpio <= EXYNOS4_GPK3(6); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_DOWN);
+ }
+ for (gpio = EXYNOS4_GPK3(0); gpio < EXYNOS4_GPK3(2); gpio++) {
+ s3c_gpio_slp_cfgpin(gpio, S3C_GPIO_SLP_INPUT);
+ s3c_gpio_slp_setpull_updown(gpio, S3C_GPIO_PULL_DOWN);
+ }
+ for (gpio = EXYNOS4_GPK3(3); gpio <= EXYNOS4_GPK3(6); gpio++) {
+ s3c_gpio_slp_cfgpin(gpio, S3C_GPIO_SLP_INPUT);
+ s3c_gpio_slp_setpull_updown(gpio, S3C_GPIO_PULL_DOWN);
+ }
+ }
+#else
/* Set all the necessary GPK3[0:1] pins to special-function 2 */
for (gpio = EXYNOS4_GPK3(0); gpio < EXYNOS4_GPK3(2); gpio++) {
s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
@@ -208,6 +250,7 @@ void exynos4_setup_sdhci3_cfg_gpio(struct platform_device *dev, int width)
s3c_gpio_setpull(EXYNOS4_GPK3(2), S3C_GPIO_PULL_NONE);
s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV2);
}
+#endif
}
#endif /* CONFIG_ARCH_EXYNOS4 */