aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/Kconfig9
-rw-r--r--arch/arm/plat-samsung/dev-keypad.c4
-rw-r--r--arch/arm/plat-samsung/include/plat/fimd_lite_ext.h99
-rw-r--r--arch/arm/plat-samsung/include/plat/keypad.h6
-rw-r--r--arch/arm/plat-samsung/include/plat/pm.h1
-rw-r--r--arch/arm/plat-samsung/pm.c35
6 files changed, 52 insertions, 102 deletions
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 8c0b49f..74a4250 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -275,6 +275,15 @@ config S3C_DEV_I2C16_EMUL
help
Compile in platform device definitions for I2C channel 16
+config S3C_DEV_I2C17_EMUL
+ bool "I2C17 Information GPIO bitbanging emulation"
+ depends on CPU_EXYNOS4210
+ help
+ Compile in platform device definitions for I2C channel 17.
+ This is used for usb hub 3803. Select this if USBHUB_USB3803
+ is selected.
+ If unsure, say N.
+
config S3C_DEV_FB
bool
help
diff --git a/arch/arm/plat-samsung/dev-keypad.c b/arch/arm/plat-samsung/dev-keypad.c
index 677c2d7..385051f 100644
--- a/arch/arm/plat-samsung/dev-keypad.c
+++ b/arch/arm/plat-samsung/dev-keypad.c
@@ -32,7 +32,11 @@ static struct resource samsung_keypad_resources[] = {
};
struct platform_device samsung_device_keypad = {
+ #if defined(CONFIG_MACH_GRANDE) || defined(CONFIG_MACH_IRON)
+ .name = "grande_3x4_keypad",
+ #else
.name = "samsung-keypad",
+ #endif
.id = -1,
.num_resources = ARRAY_SIZE(samsung_keypad_resources),
.resource = samsung_keypad_resources,
diff --git a/arch/arm/plat-samsung/include/plat/fimd_lite_ext.h b/arch/arm/plat-samsung/include/plat/fimd_lite_ext.h
deleted file mode 100644
index b4e131a..0000000
--- a/arch/arm/plat-samsung/include/plat/fimd_lite_ext.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* linux/arch/arm/plat/mdnie_ext.h
- *
- * Samsung SoC FIMD Extension Framework Header.
- *
- * InKi Dae <inki.dae@samsung.com>
- *
- * 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.
-*/
-
-struct s5p_fimd_ext_device;
-
-#define fimd_ext_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev)
-#define fimd_ext_set_drvdata(_dev, data) dev_set_drvdata(&(_dev)->dev, (data))
-
-struct s5p_fimd_dynamic_refresh {
- void __iomem *regs;
- unsigned int dynamic_refresh;
- unsigned int clkdiv;
-};
-
-/**
- * driver structure for fimd extension based driver.
- *
- * this structure should be registered by any extension driver.
- * fimd extension driveer seeks a driver registered through name field
- * and calls these callback functions in appropriate time.
- */
-struct s5p_fimd_ext_driver {
- struct device_driver driver;
-
- void (*change_clock)(struct s5p_fimd_dynamic_refresh *fimd_refresh,
- struct s5p_fimd_ext_device *fx_dev);
- void (*set_clock)(struct s5p_fimd_ext_device *fx_dev);
- int (*setup)(struct s5p_fimd_ext_device *fx_dev,
- unsigned int enable);
- void (*power_on)(struct s5p_fimd_ext_device *fx_dev);
- void (*power_off)(struct s5p_fimd_ext_device *fx_dev);
- int (*start)(struct s5p_fimd_ext_device *fx_dev);
- void (*stop)(struct s5p_fimd_ext_device *fx_dev);
- int (*probe)(struct s5p_fimd_ext_device *fx_dev);
- int (*remove)(struct s5p_fimd_ext_device *fx_dev);
- int (*suspend)(struct s5p_fimd_ext_device *fx_dev);
- int (*resume)(struct s5p_fimd_ext_device *fx_dev);
-};
-
-/**
- * device structure for fimd extension based driver.
- *
- * @name: platform device name.
- * @dev: driver model representation of the device.
- * @id: id of device registered and when device is registered
- * id would be counted.
- * @num_resources: hardware resource count.
- * @resource: a pointer to hardware resource definitions.
- * @modalias: name of the driver to use with the device, or an
- * alias for that name.
- */
-struct s5p_fimd_ext_device {
- char *name;
- struct device dev;
- int id;
- unsigned int num_resources;
- struct resource *resource;
- bool mdnie_enabled;
- bool enabled;
-};
-
-struct mdnie_platform_data {
- unsigned int width;
- unsigned int height;
-};
-
-/* workaround: fix it later */
-void s6e8aa0_panel_cond(int high_freq);
-
-#ifdef CONFIG_MDNIE_SUPPORT
-/**
- * register extension driver to fimd extension framework.
- */
-int s5p_fimd_ext_register(struct s5p_fimd_ext_driver *fx_drv);
-int s5p_fimd_ext_device_register(struct s5p_fimd_ext_device *fx_dev);
-
-/**
- * find a driver object registered to fimd extension framework.
- */
-struct s5p_fimd_ext_device *s5p_fimd_ext_find_device(const char *name);
-
-/**
- * convert device driver object to fimd extension device.
- */
-struct s5p_fimd_ext_driver *to_fimd_ext_driver(struct device_driver *drv);
-#else
-#define s5p_fimd_ext_register(dev) NULL
-#define s5p_fimd_ext_device_register(dev) NULL
-#define s5p_fimd_ext_find_device(name) NULL
-#define to_fimd_ext_driver(drv) NULL
-#endif
diff --git a/arch/arm/plat-samsung/include/plat/keypad.h b/arch/arm/plat-samsung/include/plat/keypad.h
index b59a648..997220f 100644
--- a/arch/arm/plat-samsung/include/plat/keypad.h
+++ b/arch/arm/plat-samsung/include/plat/keypad.h
@@ -14,9 +14,13 @@
#define __PLAT_SAMSUNG_KEYPAD_H
#include <linux/input/matrix_keypad.h>
-
+#if defined(CONFIG_MACH_M0_GRANDECTC) || defined(CONFIG_MACH_IRON)
+#define SAMSUNG_MAX_ROWS 14
+#define SAMSUNG_MAX_COLS 8
+#else
#define SAMSUNG_MAX_ROWS 8
#define SAMSUNG_MAX_COLS 8
+#endif
/**
* struct samsung_keypad_platdata - Platform device data for Samsung Keypad.
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h
index c306634..5a8aa39 100644
--- a/arch/arm/plat-samsung/include/plat/pm.h
+++ b/arch/arm/plat-samsung/include/plat/pm.h
@@ -46,6 +46,7 @@ extern void (*pm_cpu_sleep)(void);
extern void (*pm_cpu_restore)(void);
extern int (*pm_prepare)(void);
extern void (*pm_finish)(void);
+extern unsigned int (*pm_check_eint_pend)(void);
/* Flags for PM Control */
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index e46ecce..12b1bad 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -247,6 +247,7 @@ void (*pm_cpu_sleep)(void);
void (*pm_cpu_restore)(void);
int (*pm_prepare)(void);
void (*pm_finish)(void);
+unsigned int (*pm_check_eint_pend)(void);
#define any_allowed(mask, allow) (((mask) & (allow)) != (allow))
@@ -254,7 +255,9 @@ void (*pm_finish)(void);
*
* central control for sleep/resume process
*/
-
+#ifdef CONFIG_FAST_BOOT
+extern bool fake_shut_down;
+#endif
static int s3c_pm_enter(suspend_state_t state)
{
/* ensure the debug is initialised (if enabled) */
@@ -280,6 +283,15 @@ static int s3c_pm_enter(suspend_state_t state)
return -EINVAL;
}
+ if (pm_check_eint_pend) {
+ u32 pending_eint = pm_check_eint_pend();
+ if (pending_eint) {
+ pr_warn("%s: Aborting sleep, EINT PENDING(0x%08x)\n",
+ __func__, pending_eint);
+ return -EBUSY;
+ }
+ }
+
/* save all necessary core registers not covered by the drivers */
s3c_pm_save_gpios();
@@ -306,6 +318,16 @@ static int s3c_pm_enter(suspend_state_t state)
s3c_pm_check_store();
+#ifdef CONFIG_FAST_BOOT
+ if (fake_shut_down) {
+ /* Masking external wake up source
+ * only enable power key, FUEL ALERT, AP/IF PMIC IRQ */
+ __raw_writel(0xff77df7f, S5P_EINT_WAKEUP_MASK);
+ /* disable all system int */
+ __raw_writel(0xffffffff, S5P_WAKEUP_MASK);
+ }
+#endif
+
/* send the cpu to sleep... */
s3c_pm_arch_stop_clocks();
@@ -359,7 +381,11 @@ static int s3c_pm_enter(suspend_state_t state)
static int s3c_pm_prepare(void)
{
/* prepare check area if configured */
-
+#if defined(CONFIG_MACH_P8LTE) \
+ || defined(CONFIG_MACH_U1_NA_SPR) \
+ || defined(CONFIG_MACH_U1_NA_USCC)
+ disable_hlt();
+#endif
s3c_pm_check_prepare();
if (pm_prepare)
@@ -374,6 +400,11 @@ static void s3c_pm_finish(void)
pm_finish();
s3c_pm_check_cleanup();
+#if defined(CONFIG_MACH_P8LTE) \
+ || defined(CONFIG_MACH_U1_NA_SPR) \
+ || defined(CONFIG_MACH_U1_NA_USCC)
+ enable_hlt();
+#endif
}
#if defined(CONFIG_CHARGER_MANAGER)