From b69bef97d6c5eac62597c8b06f847e9a7010d17a Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sat, 30 May 2015 15:54:03 +0900 Subject: ARM: EXYNOS: Make local function static Function is not used outside of this unit, make it static. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c index e812c1c85624..8d5b0dcc618b 100644 --- a/arch/arm/mach-exynos/pmu.c +++ b/arch/arm/mach-exynos/pmu.c @@ -698,7 +698,7 @@ static void exynos_power_off(void) ; } -void exynos5420_powerdown_conf(enum sys_powerdown mode) +static void exynos5420_powerdown_conf(enum sys_powerdown mode) { u32 this_cluster; -- cgit v1.2.3 From 054e6aa198b4bb42d059951e08f05147b64a79f9 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sun, 14 Jun 2015 13:38:23 +0900 Subject: ARM: EXYNOS: Remove duplicated define of SLEEP_MAGIC The magic cookie for entering sleep state was defined and used in two different places: firmware.c and suspend.c. Move it to one common place to reduce duplication. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/common.h | 6 ++++++ arch/arm/mach-exynos/firmware.c | 2 -- arch/arm/mach-exynos/suspend.c | 4 +--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index e3a9256ed55f..153492513c40 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -128,6 +128,12 @@ void exynos_firmware_init(void); /* CPU BOOT mode flag for Exynos3250 SoC bootloader */ #define C2_STATE (1 << 3) +/* + * Magic values for bootloader indicating chosen low power mode. + * See also Documentation/arm/Samsung/Bootloader-interface.txt + */ +#define EXYNOS_SLEEP_MAGIC 0x00000bad +#define EXYNOS_AFTR_MAGIC 0xfcba0d10 void exynos_set_boot_flag(unsigned int cpu, unsigned int mode); void exynos_clear_boot_flag(unsigned int cpu, unsigned int mode); diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c index 245f6dec1ded..111cfbf66fdb 100644 --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c @@ -25,8 +25,6 @@ #include "common.h" #include "smc.h" -#define EXYNOS_SLEEP_MAGIC 0x00000bad -#define EXYNOS_AFTR_MAGIC 0xfcba0d10 #define EXYNOS_BOOT_ADDR 0x8 #define EXYNOS_BOOT_FLAG 0xc diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index f572219c7a40..c506f8e9c3e5 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -38,8 +38,6 @@ #include "regs-pmu.h" #include "exynos-pmu.h" -#define S5P_CHECK_SLEEP 0x00000BAD - #define REG_TABLE_END (-1U) #define EXYNOS5420_CPU_STATE 0x28 @@ -331,7 +329,7 @@ static void exynos_pm_enter_sleep_mode(void) { /* Set value of power down register for sleep mode */ exynos_sys_powerdown_conf(SYS_SLEEP); - pmu_raw_writel(S5P_CHECK_SLEEP, S5P_INFORM1); + pmu_raw_writel(EXYNOS_SLEEP_MAGIC, S5P_INFORM1); } static void exynos_pm_prepare(void) -- cgit v1.2.3 From 0e6262a097929eb9fcfb4cdc1cbe76f16b187d7a Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 10 Jul 2015 14:04:28 +0900 Subject: ARM: EXYNOS: Drop owner assignment in pmu.c platform_driver does not need to set an owner because platform_driver_register() will set it. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/pmu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c index 8d5b0dcc618b..de68938ee6aa 100644 --- a/arch/arm/mach-exynos/pmu.c +++ b/arch/arm/mach-exynos/pmu.c @@ -991,7 +991,6 @@ static int exynos_pmu_probe(struct platform_device *pdev) static struct platform_driver exynos_pmu_driver = { .driver = { .name = "exynos-pmu", - .owner = THIS_MODULE, .of_match_table = exynos_pmu_of_device_ids, }, .probe = exynos_pmu_probe, -- cgit v1.2.3 From a1bd8d8bb890c77b97e3d6d1ea6f9d26a1c31ca8 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 01:48:17 +0900 Subject: ARM: SAMSUNG: make local setup-camif in mach-s3c24xx This patch moves setup-camif from plat-samsung into mach-s3c24xx because it can be used only for s3c24xx no other platforms. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c24xx/Kconfig | 5 +++ arch/arm/mach-s3c24xx/Makefile | 1 + arch/arm/mach-s3c24xx/setup-camif.c | 71 +++++++++++++++++++++++++++++++++++++ arch/arm/plat-samsung/Kconfig | 6 ---- arch/arm/plat-samsung/Makefile | 2 -- arch/arm/plat-samsung/setup-camif.c | 71 ------------------------------------- 6 files changed, 77 insertions(+), 79 deletions(-) create mode 100644 arch/arm/mach-s3c24xx/setup-camif.c delete mode 100644 arch/arm/plat-samsung/setup-camif.c diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index 23bec3a85b22..ef68ecb27396 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig @@ -124,6 +124,11 @@ config S3C24XX_PLL This also means that the PLL tables for the selected CPU(s) will be built which may increase the size of the kernel image. +config S3C_SETUP_CAMIF + bool + help + Compile in common setup code for S3C CAMIF devices + # cpu frequency items common between s3c2410 and s3c2440/s3c2442 config S3C2410_IOTIMING diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile index 05920c8a5764..8ac2f58a3480 100644 --- a/arch/arm/mach-s3c24xx/Makefile +++ b/arch/arm/mach-s3c24xx/Makefile @@ -99,3 +99,4 @@ obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o obj-$(CONFIG_S3C2443_SETUP_SPI) += setup-spi.o obj-$(CONFIG_ARCH_S3C24XX) += setup-i2c.o obj-$(CONFIG_S3C24XX_SETUP_TS) += setup-ts.o +obj-$(CONFIG_S3C_SETUP_CAMIF) += setup-camif.o diff --git a/arch/arm/mach-s3c24xx/setup-camif.c b/arch/arm/mach-s3c24xx/setup-camif.c new file mode 100644 index 000000000000..72d8edb8927a --- /dev/null +++ b/arch/arm/mach-s3c24xx/setup-camif.c @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2012 Sylwester Nawrocki + * + * Helper functions for S3C24XX/S3C64XX SoC series CAMIF 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 +#include +#include + +/* Number of camera port pins, without FIELD */ +#define S3C_CAMIF_NUM_GPIOS 13 + +/* Default camera port configuration helpers. */ + +static void camif_get_gpios(int *gpio_start, int *gpio_reset) +{ +#ifdef CONFIG_ARCH_S3C24XX + *gpio_start = S3C2410_GPJ(0); + *gpio_reset = S3C2410_GPJ(12); +#else + /* s3c64xx */ + *gpio_start = S3C64XX_GPF(0); + *gpio_reset = S3C64XX_GPF(3); +#endif +} + +int s3c_camif_gpio_get(void) +{ + int gpio_start, gpio_reset; + int ret, i; + + camif_get_gpios(&gpio_start, &gpio_reset); + + for (i = 0; i < S3C_CAMIF_NUM_GPIOS; i++) { + int gpio = gpio_start + i; + + if (gpio == gpio_reset) + continue; + + ret = gpio_request(gpio, "camif"); + if (!ret) + ret = s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); + if (ret) { + pr_err("failed to configure GPIO %d\n", gpio); + for (--i; i >= 0; i--) + gpio_free(gpio--); + return ret; + } + s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); + } + + return 0; +} + +void s3c_camif_gpio_put(void) +{ + int i, gpio_start, gpio_reset; + + camif_get_gpios(&gpio_start, &gpio_reset); + + for (i = 0; i < S3C_CAMIF_NUM_GPIOS; i++) { + int gpio = gpio_start + i; + if (gpio != gpio_reset) + gpio_free(gpio); + } +} diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index cb8e3d655d1a..f115c8156758 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig @@ -231,18 +231,12 @@ config S3C24XX_PWM Support for exporting the PWM timer blocks via the pwm device system -config S3C_SETUP_CAMIF - bool - help - Compile in common setup code for S3C CAMIF devices - config SAMSUNG_PM_GPIO bool default y if GPIO_SAMSUNG && PM help Include legacy GPIO power management code for platforms not using pinctrl-samsung driver. - endif config S5P_DEV_MFC diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 1a29ab1f446d..c48a2ccb1c62 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile @@ -24,8 +24,6 @@ obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o -obj-$(CONFIG_S3C_SETUP_CAMIF) += setup-camif.o - # PM support obj-$(CONFIG_PM_SLEEP) += pm-common.o diff --git a/arch/arm/plat-samsung/setup-camif.c b/arch/arm/plat-samsung/setup-camif.c deleted file mode 100644 index 72d8edb8927a..000000000000 --- a/arch/arm/plat-samsung/setup-camif.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2012 Sylwester Nawrocki - * - * Helper functions for S3C24XX/S3C64XX SoC series CAMIF 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 -#include -#include - -/* Number of camera port pins, without FIELD */ -#define S3C_CAMIF_NUM_GPIOS 13 - -/* Default camera port configuration helpers. */ - -static void camif_get_gpios(int *gpio_start, int *gpio_reset) -{ -#ifdef CONFIG_ARCH_S3C24XX - *gpio_start = S3C2410_GPJ(0); - *gpio_reset = S3C2410_GPJ(12); -#else - /* s3c64xx */ - *gpio_start = S3C64XX_GPF(0); - *gpio_reset = S3C64XX_GPF(3); -#endif -} - -int s3c_camif_gpio_get(void) -{ - int gpio_start, gpio_reset; - int ret, i; - - camif_get_gpios(&gpio_start, &gpio_reset); - - for (i = 0; i < S3C_CAMIF_NUM_GPIOS; i++) { - int gpio = gpio_start + i; - - if (gpio == gpio_reset) - continue; - - ret = gpio_request(gpio, "camif"); - if (!ret) - ret = s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); - if (ret) { - pr_err("failed to configure GPIO %d\n", gpio); - for (--i; i >= 0; i--) - gpio_free(gpio--); - return ret; - } - s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); - } - - return 0; -} - -void s3c_camif_gpio_put(void) -{ - int i, gpio_start, gpio_reset; - - camif_get_gpios(&gpio_start, &gpio_reset); - - for (i = 0; i < S3C_CAMIF_NUM_GPIOS; i++) { - int gpio = gpio_start + i; - if (gpio != gpio_reset) - gpio_free(gpio); - } -} -- cgit v1.2.3 From 7f798c1c0d562ef1200cbe3227cd0474b1c285f7 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 01:48:17 +0900 Subject: ARM: SAMSUNG: make local dev-backlight in mach-s3c64xx This patch moves dev-backlight from plat-samsung into mach-s3c64xx because it is used for only s3c64xx no other platforms. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c64xx/Kconfig | 6 ++ arch/arm/mach-s3c64xx/Makefile | 2 + arch/arm/mach-s3c64xx/dev-backlight.c | 151 +++++++++++++++++++++++++++++++++ arch/arm/plat-samsung/Kconfig | 6 -- arch/arm/plat-samsung/Makefile | 2 - arch/arm/plat-samsung/dev-backlight.c | 152 ---------------------------------- 6 files changed, 159 insertions(+), 160 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/dev-backlight.c delete mode 100644 arch/arm/plat-samsung/dev-backlight.c diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index eff95e950d81..28c7097e8506 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig @@ -34,6 +34,12 @@ config S3C64XX_DEV_ONENAND1 help Compile in platform device definition for OneNAND1 controller +config SAMSUNG_DEV_BACKLIGHT + bool + depends on SAMSUNG_DEV_PWM + help + Compile in platform device definition LCD backlight with PWM Timer + # platform specific device setup config S3C64XX_SETUP_I2C0 diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile index 17f4b07ec763..bb233f342f31 100644 --- a/arch/arm/mach-s3c64xx/Makefile +++ b/arch/arm/mach-s3c64xx/Makefile @@ -40,6 +40,8 @@ obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o obj-$(CONFIG_S3C64XX_SETUP_SPI) += setup-spi.o obj-$(CONFIG_S3C64XX_SETUP_USB_PHY) += setup-usb-phy.o +obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o + # Machine support obj-$(CONFIG_MACH_ANW6410) += mach-anw6410.o diff --git a/arch/arm/mach-s3c64xx/dev-backlight.c b/arch/arm/mach-s3c64xx/dev-backlight.c new file mode 100644 index 000000000000..62f4648830b5 --- /dev/null +++ b/arch/arm/mach-s3c64xx/dev-backlight.c @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2011 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Common infrastructure for PWM Backlight for Samsung boards + * + * 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 +#include +#include +#include +#include + +#include +#include +#include + +struct samsung_bl_drvdata { + struct platform_pwm_backlight_data plat_data; + struct samsung_bl_gpio_info *gpio_info; +}; + +static int samsung_bl_init(struct device *dev) +{ + int ret = 0; + struct platform_pwm_backlight_data *pdata = dev->platform_data; + struct samsung_bl_drvdata *drvdata = container_of(pdata, + struct samsung_bl_drvdata, plat_data); + struct samsung_bl_gpio_info *bl_gpio_info = drvdata->gpio_info; + + ret = gpio_request(bl_gpio_info->no, "Backlight"); + if (ret) { + printk(KERN_ERR "failed to request GPIO for LCD Backlight\n"); + return ret; + } + + /* Configure GPIO pin with specific GPIO function for PWM timer */ + s3c_gpio_cfgpin(bl_gpio_info->no, bl_gpio_info->func); + + return 0; +} + +static void samsung_bl_exit(struct device *dev) +{ + struct platform_pwm_backlight_data *pdata = dev->platform_data; + struct samsung_bl_drvdata *drvdata = container_of(pdata, + struct samsung_bl_drvdata, plat_data); + struct samsung_bl_gpio_info *bl_gpio_info = drvdata->gpio_info; + + s3c_gpio_cfgpin(bl_gpio_info->no, S3C_GPIO_OUTPUT); + gpio_free(bl_gpio_info->no); +} + +/* Initialize few important fields of platform_pwm_backlight_data + * structure with default values. These fields can be overridden by + * board-specific values sent from machine file. + * For ease of operation, these fields are initialized with values + * used by most samsung boards. + * Users has the option of sending info about other parameters + * for their specific boards + */ + +static struct samsung_bl_drvdata samsung_dfl_bl_data __initdata = { + .plat_data = { + .max_brightness = 255, + .dft_brightness = 255, + .pwm_period_ns = 78770, + .enable_gpio = -1, + .init = samsung_bl_init, + .exit = samsung_bl_exit, + }, +}; + +static struct platform_device samsung_dfl_bl_device __initdata = { + .name = "pwm-backlight", +}; + +/* samsung_bl_set - Set board specific data (if any) provided by user for + * PWM Backlight control and register specific PWM and backlight device. + * @gpio_info: structure containing GPIO info for PWM timer + * @bl_data: structure containing Backlight control data + */ +void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, + struct platform_pwm_backlight_data *bl_data) +{ + int ret = 0; + struct platform_device *samsung_bl_device; + struct samsung_bl_drvdata *samsung_bl_drvdata; + struct platform_pwm_backlight_data *samsung_bl_data; + + samsung_bl_device = kmemdup(&samsung_dfl_bl_device, + sizeof(struct platform_device), GFP_KERNEL); + if (!samsung_bl_device) { + printk(KERN_ERR "%s: no memory for platform dev\n", __func__); + return; + } + + samsung_bl_drvdata = kmemdup(&samsung_dfl_bl_data, + sizeof(samsung_dfl_bl_data), GFP_KERNEL); + if (!samsung_bl_drvdata) { + printk(KERN_ERR "%s: no memory for platform dev\n", __func__); + goto err_data; + } + samsung_bl_device->dev.platform_data = &samsung_bl_drvdata->plat_data; + samsung_bl_drvdata->gpio_info = gpio_info; + samsung_bl_data = &samsung_bl_drvdata->plat_data; + + /* Copy board specific data provided by user */ + samsung_bl_data->pwm_id = bl_data->pwm_id; + samsung_bl_device->dev.parent = &samsung_device_pwm.dev; + + if (bl_data->max_brightness) + samsung_bl_data->max_brightness = bl_data->max_brightness; + if (bl_data->dft_brightness) + samsung_bl_data->dft_brightness = bl_data->dft_brightness; + if (bl_data->lth_brightness) + samsung_bl_data->lth_brightness = bl_data->lth_brightness; + if (bl_data->pwm_period_ns) + samsung_bl_data->pwm_period_ns = bl_data->pwm_period_ns; + if (bl_data->enable_gpio >= 0) + samsung_bl_data->enable_gpio = bl_data->enable_gpio; + if (bl_data->init) + samsung_bl_data->init = bl_data->init; + if (bl_data->notify) + samsung_bl_data->notify = bl_data->notify; + if (bl_data->notify_after) + samsung_bl_data->notify_after = bl_data->notify_after; + if (bl_data->exit) + samsung_bl_data->exit = bl_data->exit; + if (bl_data->check_fb) + samsung_bl_data->check_fb = bl_data->check_fb; + + /* Register the Backlight dev */ + ret = platform_device_register(samsung_bl_device); + if (ret) { + printk(KERN_ERR "failed to register backlight device: %d\n", ret); + goto err_plat_reg2; + } + + return; + +err_plat_reg2: + kfree(samsung_bl_data); +err_data: + kfree(samsung_bl_device); + return; +} diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index f115c8156758..0e1874ccf1ea 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig @@ -217,12 +217,6 @@ config SAMSUNG_DEV_PWM help Compile in platform device definition for PWM Timer -config SAMSUNG_DEV_BACKLIGHT - bool - depends on SAMSUNG_DEV_PWM - help - Compile in platform device definition LCD backlight with PWM Timer - config S3C24XX_PWM bool "PWM device support" select PWM diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index c48a2ccb1c62..624f5db0e39c 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile @@ -22,8 +22,6 @@ obj-$(CONFIG_SAMSUNG_ATAGS) += devs.o obj-$(CONFIG_SAMSUNG_ATAGS) += dev-uart.o obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o -obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o - # PM support obj-$(CONFIG_PM_SLEEP) += pm-common.o diff --git a/arch/arm/plat-samsung/dev-backlight.c b/arch/arm/plat-samsung/dev-backlight.c deleted file mode 100644 index 2157c5b539e6..000000000000 --- a/arch/arm/plat-samsung/dev-backlight.c +++ /dev/null @@ -1,152 +0,0 @@ -/* linux/arch/arm/plat-samsung/dev-backlight.c - * - * Copyright (c) 2011 Samsung Electronics Co., Ltd. - * http://www.samsung.com - * - * Common infrastructure for PWM Backlight for Samsung boards - * - * 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 -#include -#include -#include -#include - -#include -#include -#include - -struct samsung_bl_drvdata { - struct platform_pwm_backlight_data plat_data; - struct samsung_bl_gpio_info *gpio_info; -}; - -static int samsung_bl_init(struct device *dev) -{ - int ret = 0; - struct platform_pwm_backlight_data *pdata = dev->platform_data; - struct samsung_bl_drvdata *drvdata = container_of(pdata, - struct samsung_bl_drvdata, plat_data); - struct samsung_bl_gpio_info *bl_gpio_info = drvdata->gpio_info; - - ret = gpio_request(bl_gpio_info->no, "Backlight"); - if (ret) { - printk(KERN_ERR "failed to request GPIO for LCD Backlight\n"); - return ret; - } - - /* Configure GPIO pin with specific GPIO function for PWM timer */ - s3c_gpio_cfgpin(bl_gpio_info->no, bl_gpio_info->func); - - return 0; -} - -static void samsung_bl_exit(struct device *dev) -{ - struct platform_pwm_backlight_data *pdata = dev->platform_data; - struct samsung_bl_drvdata *drvdata = container_of(pdata, - struct samsung_bl_drvdata, plat_data); - struct samsung_bl_gpio_info *bl_gpio_info = drvdata->gpio_info; - - s3c_gpio_cfgpin(bl_gpio_info->no, S3C_GPIO_OUTPUT); - gpio_free(bl_gpio_info->no); -} - -/* Initialize few important fields of platform_pwm_backlight_data - * structure with default values. These fields can be overridden by - * board-specific values sent from machine file. - * For ease of operation, these fields are initialized with values - * used by most samsung boards. - * Users has the option of sending info about other parameters - * for their specific boards - */ - -static struct samsung_bl_drvdata samsung_dfl_bl_data __initdata = { - .plat_data = { - .max_brightness = 255, - .dft_brightness = 255, - .pwm_period_ns = 78770, - .enable_gpio = -1, - .init = samsung_bl_init, - .exit = samsung_bl_exit, - }, -}; - -static struct platform_device samsung_dfl_bl_device __initdata = { - .name = "pwm-backlight", -}; - -/* samsung_bl_set - Set board specific data (if any) provided by user for - * PWM Backlight control and register specific PWM and backlight device. - * @gpio_info: structure containing GPIO info for PWM timer - * @bl_data: structure containing Backlight control data - */ -void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, - struct platform_pwm_backlight_data *bl_data) -{ - int ret = 0; - struct platform_device *samsung_bl_device; - struct samsung_bl_drvdata *samsung_bl_drvdata; - struct platform_pwm_backlight_data *samsung_bl_data; - - samsung_bl_device = kmemdup(&samsung_dfl_bl_device, - sizeof(struct platform_device), GFP_KERNEL); - if (!samsung_bl_device) { - printk(KERN_ERR "%s: no memory for platform dev\n", __func__); - return; - } - - samsung_bl_drvdata = kmemdup(&samsung_dfl_bl_data, - sizeof(samsung_dfl_bl_data), GFP_KERNEL); - if (!samsung_bl_drvdata) { - printk(KERN_ERR "%s: no memory for platform dev\n", __func__); - goto err_data; - } - samsung_bl_device->dev.platform_data = &samsung_bl_drvdata->plat_data; - samsung_bl_drvdata->gpio_info = gpio_info; - samsung_bl_data = &samsung_bl_drvdata->plat_data; - - /* Copy board specific data provided by user */ - samsung_bl_data->pwm_id = bl_data->pwm_id; - samsung_bl_device->dev.parent = &samsung_device_pwm.dev; - - if (bl_data->max_brightness) - samsung_bl_data->max_brightness = bl_data->max_brightness; - if (bl_data->dft_brightness) - samsung_bl_data->dft_brightness = bl_data->dft_brightness; - if (bl_data->lth_brightness) - samsung_bl_data->lth_brightness = bl_data->lth_brightness; - if (bl_data->pwm_period_ns) - samsung_bl_data->pwm_period_ns = bl_data->pwm_period_ns; - if (bl_data->enable_gpio >= 0) - samsung_bl_data->enable_gpio = bl_data->enable_gpio; - if (bl_data->init) - samsung_bl_data->init = bl_data->init; - if (bl_data->notify) - samsung_bl_data->notify = bl_data->notify; - if (bl_data->notify_after) - samsung_bl_data->notify_after = bl_data->notify_after; - if (bl_data->exit) - samsung_bl_data->exit = bl_data->exit; - if (bl_data->check_fb) - samsung_bl_data->check_fb = bl_data->check_fb; - - /* Register the Backlight dev */ - ret = platform_device_register(samsung_bl_device); - if (ret) { - printk(KERN_ERR "failed to register backlight device: %d\n", ret); - goto err_plat_reg2; - } - - return; - -err_plat_reg2: - kfree(samsung_bl_data); -err_data: - kfree(samsung_bl_device); - return; -} -- cgit v1.2.3 From b93b315d444faa1505b6a5e001c30f3024849e46 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 01:48:17 +0900 Subject: ARM: SAMSUNG: make local s5p-dev-mfc in mach-exynos This patch moves s5p-dev-mfc from plat-samsung into mach-exynos because it is used for only exynos no other platforms. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/Kconfig | 5 ++ arch/arm/mach-exynos/Makefile | 2 + arch/arm/mach-exynos/s5p-dev-mfc.c | 94 +++++++++++++++++++++++++++++++++++++ arch/arm/plat-samsung/Kconfig | 5 -- arch/arm/plat-samsung/Makefile | 1 - arch/arm/plat-samsung/s5p-dev-mfc.c | 94 ------------------------------------- 6 files changed, 101 insertions(+), 100 deletions(-) create mode 100644 arch/arm/mach-exynos/s5p-dev-mfc.c delete mode 100644 arch/arm/plat-samsung/s5p-dev-mfc.c diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 81064cd61a0a..4c4858c566d8 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -30,6 +30,11 @@ menuconfig ARCH_EXYNOS if ARCH_EXYNOS +config S5P_DEV_MFC + bool + help + Compile in setup memory (init) code for MFC + config ARCH_EXYNOS3 bool "SAMSUNG EXYNOS3" select ARM_CPU_SUSPEND if PM diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index bcefb5473ee4..2f306767cdfe 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -23,3 +23,5 @@ AFLAGS_sleep.o :=-Wa,-march=armv7-a$(plus_sec) obj-$(CONFIG_EXYNOS5420_MCPM) += mcpm-exynos.o CFLAGS_mcpm-exynos.o += -march=armv7-a + +obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o diff --git a/arch/arm/mach-exynos/s5p-dev-mfc.c b/arch/arm/mach-exynos/s5p-dev-mfc.c new file mode 100644 index 000000000000..0b04b6b0fa30 --- /dev/null +++ b/arch/arm/mach-exynos/s5p-dev-mfc.c @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2010-2011 Samsung Electronics Co.Ltd + * + * Base S5P MFC resource and device definitions + * + * 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 +#include +#include +#include +#include +#include +#include +#include + +static struct platform_device s5p_device_mfc_l; +static struct platform_device s5p_device_mfc_r; + +struct s5p_mfc_dt_meminfo { + unsigned long loff; + unsigned long lsize; + unsigned long roff; + unsigned long rsize; + char *compatible; +}; + +struct s5p_mfc_reserved_mem { + phys_addr_t base; + unsigned long size; + struct device *dev; +}; + +static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata; + + +static void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, + phys_addr_t lbase, unsigned int lsize) +{ + int i; + + s5p_mfc_mem[0].dev = &s5p_device_mfc_r.dev; + s5p_mfc_mem[0].base = rbase; + s5p_mfc_mem[0].size = rsize; + + s5p_mfc_mem[1].dev = &s5p_device_mfc_l.dev; + s5p_mfc_mem[1].base = lbase; + s5p_mfc_mem[1].size = lsize; + + for (i = 0; i < ARRAY_SIZE(s5p_mfc_mem); i++) { + struct s5p_mfc_reserved_mem *area = &s5p_mfc_mem[i]; + if (memblock_remove(area->base, area->size)) { + printk(KERN_ERR "Failed to reserve memory for MFC device (%ld bytes at 0x%08lx)\n", + area->size, (unsigned long) area->base); + area->base = 0; + } + } +} + +int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname, + int depth, void *data) +{ + const __be32 *prop; + int len; + struct s5p_mfc_dt_meminfo mfc_mem; + + if (!data) + return 0; + + if (!of_flat_dt_is_compatible(node, data)) + return 0; + + prop = of_get_flat_dt_prop(node, "samsung,mfc-l", &len); + if (!prop || (len != 2 * sizeof(unsigned long))) + return 0; + + mfc_mem.loff = be32_to_cpu(prop[0]); + mfc_mem.lsize = be32_to_cpu(prop[1]); + + prop = of_get_flat_dt_prop(node, "samsung,mfc-r", &len); + if (!prop || (len != 2 * sizeof(unsigned long))) + return 0; + + mfc_mem.roff = be32_to_cpu(prop[0]); + mfc_mem.rsize = be32_to_cpu(prop[1]); + + s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, + mfc_mem.loff, mfc_mem.lsize); + + return 1; +} diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 0e1874ccf1ea..57729b915003 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig @@ -233,11 +233,6 @@ config SAMSUNG_PM_GPIO pinctrl-samsung driver. endif -config S5P_DEV_MFC - bool - help - Compile in setup memory (init) code for MFC - comment "Power management" config SAMSUNG_PM_DEBUG diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 624f5db0e39c..8c911760f55f 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile @@ -20,7 +20,6 @@ obj-$(CONFIG_SAMSUNG_ATAGS) += platformdata.o obj-$(CONFIG_SAMSUNG_ATAGS) += devs.o obj-$(CONFIG_SAMSUNG_ATAGS) += dev-uart.o -obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o # PM support diff --git a/arch/arm/plat-samsung/s5p-dev-mfc.c b/arch/arm/plat-samsung/s5p-dev-mfc.c deleted file mode 100644 index 0b04b6b0fa30..000000000000 --- a/arch/arm/plat-samsung/s5p-dev-mfc.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2010-2011 Samsung Electronics Co.Ltd - * - * Base S5P MFC resource and device definitions - * - * 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 -#include -#include -#include -#include -#include -#include -#include - -static struct platform_device s5p_device_mfc_l; -static struct platform_device s5p_device_mfc_r; - -struct s5p_mfc_dt_meminfo { - unsigned long loff; - unsigned long lsize; - unsigned long roff; - unsigned long rsize; - char *compatible; -}; - -struct s5p_mfc_reserved_mem { - phys_addr_t base; - unsigned long size; - struct device *dev; -}; - -static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata; - - -static void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, - phys_addr_t lbase, unsigned int lsize) -{ - int i; - - s5p_mfc_mem[0].dev = &s5p_device_mfc_r.dev; - s5p_mfc_mem[0].base = rbase; - s5p_mfc_mem[0].size = rsize; - - s5p_mfc_mem[1].dev = &s5p_device_mfc_l.dev; - s5p_mfc_mem[1].base = lbase; - s5p_mfc_mem[1].size = lsize; - - for (i = 0; i < ARRAY_SIZE(s5p_mfc_mem); i++) { - struct s5p_mfc_reserved_mem *area = &s5p_mfc_mem[i]; - if (memblock_remove(area->base, area->size)) { - printk(KERN_ERR "Failed to reserve memory for MFC device (%ld bytes at 0x%08lx)\n", - area->size, (unsigned long) area->base); - area->base = 0; - } - } -} - -int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname, - int depth, void *data) -{ - const __be32 *prop; - int len; - struct s5p_mfc_dt_meminfo mfc_mem; - - if (!data) - return 0; - - if (!of_flat_dt_is_compatible(node, data)) - return 0; - - prop = of_get_flat_dt_prop(node, "samsung,mfc-l", &len); - if (!prop || (len != 2 * sizeof(unsigned long))) - return 0; - - mfc_mem.loff = be32_to_cpu(prop[0]); - mfc_mem.lsize = be32_to_cpu(prop[1]); - - prop = of_get_flat_dt_prop(node, "samsung,mfc-r", &len); - if (!prop || (len != 2 * sizeof(unsigned long))) - return 0; - - mfc_mem.roff = be32_to_cpu(prop[0]); - mfc_mem.rsize = be32_to_cpu(prop[1]); - - s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, - mfc_mem.loff, mfc_mem.lsize); - - return 1; -} -- cgit v1.2.3 From 8ace438f4c0f471e2277b9d3adb017599e2c8e5b Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 02:00:35 +0900 Subject: ARM: SAMSUNG: local regs-srom header in mach-exynos This patch moves regs-srom header file into mach-exynos. Because it is not used for others except mach-exynos. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/regs-srom.h | 53 +++++++++++++++++++++++++ arch/arm/mach-exynos/suspend.c | 4 +- arch/arm/plat-samsung/include/plat/regs-srom.h | 54 -------------------------- 3 files changed, 55 insertions(+), 56 deletions(-) create mode 100644 arch/arm/mach-exynos/regs-srom.h delete mode 100644 arch/arm/plat-samsung/include/plat/regs-srom.h diff --git a/arch/arm/mach-exynos/regs-srom.h b/arch/arm/mach-exynos/regs-srom.h new file mode 100644 index 000000000000..5c4d4427db7b --- /dev/null +++ b/arch/arm/mach-exynos/regs-srom.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2010 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * S5P SROMC register definitions + * + * 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. +*/ + +#ifndef __PLAT_SAMSUNG_REGS_SROM_H +#define __PLAT_SAMSUNG_REGS_SROM_H __FILE__ + +#include + +#define S5P_SROMREG(x) (S5P_VA_SROMC + (x)) + +#define S5P_SROM_BW S5P_SROMREG(0x0) +#define S5P_SROM_BC0 S5P_SROMREG(0x4) +#define S5P_SROM_BC1 S5P_SROMREG(0x8) +#define S5P_SROM_BC2 S5P_SROMREG(0xc) +#define S5P_SROM_BC3 S5P_SROMREG(0x10) +#define S5P_SROM_BC4 S5P_SROMREG(0x14) +#define S5P_SROM_BC5 S5P_SROMREG(0x18) + +/* one register BW holds 4 x 4-bit packed settings for NCS0 - NCS3 */ + +#define S5P_SROM_BW__DATAWIDTH__SHIFT 0 +#define S5P_SROM_BW__ADDRMODE__SHIFT 1 +#define S5P_SROM_BW__WAITENABLE__SHIFT 2 +#define S5P_SROM_BW__BYTEENABLE__SHIFT 3 + +#define S5P_SROM_BW__CS_MASK 0xf + +#define S5P_SROM_BW__NCS0__SHIFT 0 +#define S5P_SROM_BW__NCS1__SHIFT 4 +#define S5P_SROM_BW__NCS2__SHIFT 8 +#define S5P_SROM_BW__NCS3__SHIFT 12 +#define S5P_SROM_BW__NCS4__SHIFT 16 +#define S5P_SROM_BW__NCS5__SHIFT 20 + +/* applies to same to BCS0 - BCS3 */ + +#define S5P_SROM_BCX__PMC__SHIFT 0 +#define S5P_SROM_BCX__TACP__SHIFT 4 +#define S5P_SROM_BCX__TCAH__SHIFT 8 +#define S5P_SROM_BCX__TCOH__SHIFT 12 +#define S5P_SROM_BCX__TACC__SHIFT 16 +#define S5P_SROM_BCX__TCOS__SHIFT 24 +#define S5P_SROM_BCX__TACS__SHIFT 28 + +#endif /* __PLAT_SAMSUNG_REGS_SROM_H */ diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index c506f8e9c3e5..e00eb39453a4 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -32,11 +32,11 @@ #include #include -#include #include "common.h" -#include "regs-pmu.h" #include "exynos-pmu.h" +#include "regs-pmu.h" +#include "regs-srom.h" #define REG_TABLE_END (-1U) diff --git a/arch/arm/plat-samsung/include/plat/regs-srom.h b/arch/arm/plat-samsung/include/plat/regs-srom.h deleted file mode 100644 index 9b6729c81cda..000000000000 --- a/arch/arm/plat-samsung/include/plat/regs-srom.h +++ /dev/null @@ -1,54 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/regs-srom.h - * - * Copyright (c) 2010 Samsung Electronics Co., Ltd. - * http://www.samsung.com - * - * S5P SROMC register definitions - * - * 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. -*/ - -#ifndef __PLAT_SAMSUNG_REGS_SROM_H -#define __PLAT_SAMSUNG_REGS_SROM_H __FILE__ - -#include - -#define S5P_SROMREG(x) (S5P_VA_SROMC + (x)) - -#define S5P_SROM_BW S5P_SROMREG(0x0) -#define S5P_SROM_BC0 S5P_SROMREG(0x4) -#define S5P_SROM_BC1 S5P_SROMREG(0x8) -#define S5P_SROM_BC2 S5P_SROMREG(0xc) -#define S5P_SROM_BC3 S5P_SROMREG(0x10) -#define S5P_SROM_BC4 S5P_SROMREG(0x14) -#define S5P_SROM_BC5 S5P_SROMREG(0x18) - -/* one register BW holds 4 x 4-bit packed settings for NCS0 - NCS3 */ - -#define S5P_SROM_BW__DATAWIDTH__SHIFT 0 -#define S5P_SROM_BW__ADDRMODE__SHIFT 1 -#define S5P_SROM_BW__WAITENABLE__SHIFT 2 -#define S5P_SROM_BW__BYTEENABLE__SHIFT 3 - -#define S5P_SROM_BW__CS_MASK 0xf - -#define S5P_SROM_BW__NCS0__SHIFT 0 -#define S5P_SROM_BW__NCS1__SHIFT 4 -#define S5P_SROM_BW__NCS2__SHIFT 8 -#define S5P_SROM_BW__NCS3__SHIFT 12 -#define S5P_SROM_BW__NCS4__SHIFT 16 -#define S5P_SROM_BW__NCS5__SHIFT 20 - -/* applies to same to BCS0 - BCS3 */ - -#define S5P_SROM_BCX__PMC__SHIFT 0 -#define S5P_SROM_BCX__TACP__SHIFT 4 -#define S5P_SROM_BCX__TCAH__SHIFT 8 -#define S5P_SROM_BCX__TCOH__SHIFT 12 -#define S5P_SROM_BCX__TACC__SHIFT 16 -#define S5P_SROM_BCX__TCOS__SHIFT 24 -#define S5P_SROM_BCX__TACS__SHIFT 28 - -#endif /* __PLAT_SAMSUNG_REGS_SROM_H */ -- cgit v1.2.3 From f30e3295d2e9e7fe7fed5d1138e59ed45053b5fb Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 02:00:35 +0900 Subject: ARM: SAMSUNG: local fb-core header in mach-s3c24xx This patch moves fb-core header file into mach-s3c24xx. Because it is not used for others except mach-s3c24xx. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c24xx/fb-core.h | 27 ++++++++++++++++++++++++++ arch/arm/mach-s3c24xx/s3c2416.c | 2 +- arch/arm/mach-s3c24xx/s3c2443.c | 3 ++- arch/arm/plat-samsung/include/plat/fb-core.h | 29 ---------------------------- 4 files changed, 30 insertions(+), 31 deletions(-) create mode 100644 arch/arm/mach-s3c24xx/fb-core.h delete mode 100644 arch/arm/plat-samsung/include/plat/fb-core.h diff --git a/arch/arm/mach-s3c24xx/fb-core.h b/arch/arm/mach-s3c24xx/fb-core.h new file mode 100644 index 000000000000..103bdbaddd55 --- /dev/null +++ b/arch/arm/mach-s3c24xx/fb-core.h @@ -0,0 +1,27 @@ +/* + * Copyright 2010 Samsung Electronics Co., Ltd. + * Pawel Osciak + * + * Samsung framebuffer driver core functions + * + * 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. + */ +#ifndef __ASM_PLAT_FB_CORE_H +#define __ASM_PLAT_FB_CORE_H __FILE__ + +/* + * These functions are only for use with the core support code, such as + * the CPU-specific initialization code. + */ + +/* Re-define device name depending on support. */ +static inline void s3c_fb_setname(char *name) +{ +#ifdef CONFIG_S3C_DEV_FB + s3c_device_fb.name = name; +#endif +} + +#endif /* __ASM_PLAT_FB_CORE_H */ diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c index 3f8ca2a3ef17..b9118514fcf3 100644 --- a/arch/arm/mach-s3c24xx/s3c2416.c +++ b/arch/arm/mach-s3c24xx/s3c2416.c @@ -59,12 +59,12 @@ #include #include -#include #include #include #include #include "common.h" +#include "fb-core.h" static struct map_desc s3c2416_iodesc[] __initdata = { IODESC_ENT(WATCHDOG), diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c index 87b6b89d8ee7..91dd9640d00f 100644 --- a/arch/arm/mach-s3c24xx/s3c2443.c +++ b/arch/arm/mach-s3c24xx/s3c2443.c @@ -41,11 +41,12 @@ #include #include #include -#include #include #include #include +#include "fb-core.h" + static struct map_desc s3c2443_iodesc[] __initdata = { IODESC_ENT(WATCHDOG), IODESC_ENT(CLKPWR), diff --git a/arch/arm/plat-samsung/include/plat/fb-core.h b/arch/arm/plat-samsung/include/plat/fb-core.h deleted file mode 100644 index bca383efcf6d..000000000000 --- a/arch/arm/plat-samsung/include/plat/fb-core.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * arch/arm/plat-samsung/include/plat/fb-core.h - * - * Copyright 2010 Samsung Electronics Co., Ltd. - * Pawel Osciak - * - * Samsung framebuffer driver core functions - * - * 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. - */ -#ifndef __ASM_PLAT_FB_CORE_H -#define __ASM_PLAT_FB_CORE_H __FILE__ - -/* - * These functions are only for use with the core support code, such as - * the CPU-specific initialization code. - */ - -/* Re-define device name depending on support. */ -static inline void s3c_fb_setname(char *name) -{ -#ifdef CONFIG_S3C_DEV_FB - s3c_device_fb.name = name; -#endif -} - -#endif /* __ASM_PLAT_FB_CORE_H */ -- cgit v1.2.3 From f8eed6cd0d215f23a70945e05c050b5c87dc888e Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 02:00:35 +0900 Subject: ARM: SAMSUNG: local nand-core header in mach-s3c24xx This patch moves nand-core header file into mach-s3c24xx. Because it is not used for others except mach-s3c24xx. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c24xx/nand-core.h | 27 +++++++++++++++++++++++++ arch/arm/mach-s3c24xx/s3c2412.c | 2 +- arch/arm/mach-s3c24xx/s3c2416.c | 2 +- arch/arm/mach-s3c24xx/s3c2443.c | 2 +- arch/arm/mach-s3c24xx/s3c244x.c | 2 +- arch/arm/plat-samsung/include/plat/nand-core.h | 28 -------------------------- 6 files changed, 31 insertions(+), 32 deletions(-) create mode 100644 arch/arm/mach-s3c24xx/nand-core.h delete mode 100644 arch/arm/plat-samsung/include/plat/nand-core.h diff --git a/arch/arm/mach-s3c24xx/nand-core.h b/arch/arm/mach-s3c24xx/nand-core.h new file mode 100644 index 000000000000..7e811fe1cf41 --- /dev/null +++ b/arch/arm/mach-s3c24xx/nand-core.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2010 Samsung Electronics Co., Ltd. + * http://www.samsung.com/ + * + * S3C - Nand Controller core functions + * + * 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. +*/ + +#ifndef __ASM_ARCH_NAND_CORE_H +#define __ASM_ARCH_NAND_CORE_H __FILE__ + +/* These functions are only for use with the core support code, such as + * the cpu specific initialisation code + */ + +/* re-define device name depending on support. */ +static inline void s3c_nand_setname(char *name) +{ +#ifdef CONFIG_S3C_DEV_NAND + s3c_device_nand.name = name; +#endif +} + +#endif /* __ASM_ARCH_NAND_CORE_H */ diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c index 64a13605cfc3..fb5ee8d38913 100644 --- a/arch/arm/mach-s3c24xx/s3c2412.c +++ b/arch/arm/mach-s3c24xx/s3c2412.c @@ -40,11 +40,11 @@ #include #include #include -#include #include #include #include "common.h" +#include "nand-core.h" #include "regs-dsc.h" #include "s3c2412-power.h" diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c index b9118514fcf3..2469b2718129 100644 --- a/arch/arm/mach-s3c24xx/s3c2416.c +++ b/arch/arm/mach-s3c24xx/s3c2416.c @@ -59,12 +59,12 @@ #include #include -#include #include #include #include "common.h" #include "fb-core.h" +#include "nand-core.h" static struct map_desc s3c2416_iodesc[] __initdata = { IODESC_ENT(WATCHDOG), diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c index 91dd9640d00f..5269d08494da 100644 --- a/arch/arm/mach-s3c24xx/s3c2443.c +++ b/arch/arm/mach-s3c24xx/s3c2443.c @@ -41,11 +41,11 @@ #include #include #include -#include #include #include #include "fb-core.h" +#include "nand-core.h" static struct map_desc s3c2443_iodesc[] __initdata = { IODESC_ENT(WATCHDOG), diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c index b14119585dc7..31fd273269c2 100644 --- a/arch/arm/mach-s3c24xx/s3c244x.c +++ b/arch/arm/mach-s3c24xx/s3c244x.c @@ -41,9 +41,9 @@ #include #include #include -#include #include "common.h" +#include "nand-core.h" #include "regs-dsc.h" static struct map_desc s3c244x_iodesc[] __initdata = { diff --git a/arch/arm/plat-samsung/include/plat/nand-core.h b/arch/arm/plat-samsung/include/plat/nand-core.h deleted file mode 100644 index 6de20789a95e..000000000000 --- a/arch/arm/plat-samsung/include/plat/nand-core.h +++ /dev/null @@ -1,28 +0,0 @@ -/* arch/arm/plat-samsung/include/plat/nand-core.h - * - * Copyright (c) 2010 Samsung Electronics Co., Ltd. - * http://www.samsung.com/ - * - * S3C - Nand Controller core functions - * - * 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. -*/ - -#ifndef __ASM_ARCH_NAND_CORE_H -#define __ASM_ARCH_NAND_CORE_H __FILE__ - -/* These functions are only for use with the core support code, such as - * the cpu specific initialisation code - */ - -/* re-define device name depending on support. */ -static inline void s3c_nand_setname(char *name) -{ -#ifdef CONFIG_S3C_DEV_NAND - s3c_device_nand.name = name; -#endif -} - -#endif /* __ASM_ARCH_NAND_CORE_H */ -- cgit v1.2.3 From dd04e47e7407e3a9312617817e3a35fc1a8e4548 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 02:00:35 +0900 Subject: ARM: SAMSUNG: local spi-core header in mach-s3c24xx This patch moves spi-core header file into mach-s3c24xx. Because it is not used for others except mach-s3c24xx. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c24xx/s3c2416.c | 2 +- arch/arm/mach-s3c24xx/s3c2443.c | 2 +- arch/arm/mach-s3c24xx/spi-core.h | 30 +++++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/spi-core.h | 30 --------------------------- 4 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 arch/arm/mach-s3c24xx/spi-core.h delete mode 100644 arch/arm/plat-samsung/include/plat/spi-core.h diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c index 2469b2718129..621b8648a7ef 100644 --- a/arch/arm/mach-s3c24xx/s3c2416.c +++ b/arch/arm/mach-s3c24xx/s3c2416.c @@ -60,11 +60,11 @@ #include #include -#include #include "common.h" #include "fb-core.h" #include "nand-core.h" +#include "spi-core.h" static struct map_desc s3c2416_iodesc[] __initdata = { IODESC_ENT(WATCHDOG), diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c index 5269d08494da..b559d378cf43 100644 --- a/arch/arm/mach-s3c24xx/s3c2443.c +++ b/arch/arm/mach-s3c24xx/s3c2443.c @@ -42,10 +42,10 @@ #include #include #include -#include #include "fb-core.h" #include "nand-core.h" +#include "spi-core.h" static struct map_desc s3c2443_iodesc[] __initdata = { IODESC_ENT(WATCHDOG), diff --git a/arch/arm/mach-s3c24xx/spi-core.h b/arch/arm/mach-s3c24xx/spi-core.h new file mode 100644 index 000000000000..0b9428ab3fc3 --- /dev/null +++ b/arch/arm/mach-s3c24xx/spi-core.h @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2012 Heiko Stuebner + * + * 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. + */ + +#ifndef __PLAT_S3C_SPI_CORE_H +#define __PLAT_S3C_SPI_CORE_H + +/* These functions are only for use with the core support code, such as + * the cpu specific initialisation code + */ + +/* re-define device name depending on support. */ +static inline void s3c64xx_spi_setname(char *name) +{ +#ifdef CONFIG_S3C64XX_DEV_SPI0 + s3c64xx_device_spi0.name = name; +#endif +#ifdef CONFIG_S3C64XX_DEV_SPI1 + s3c64xx_device_spi1.name = name; +#endif +#ifdef CONFIG_S3C64XX_DEV_SPI2 + s3c64xx_device_spi2.name = name; +#endif +} + +#endif /* __PLAT_S3C_SPI_CORE_H */ diff --git a/arch/arm/plat-samsung/include/plat/spi-core.h b/arch/arm/plat-samsung/include/plat/spi-core.h deleted file mode 100644 index 0b9428ab3fc3..000000000000 --- a/arch/arm/plat-samsung/include/plat/spi-core.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2012 Heiko Stuebner - * - * 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. - */ - -#ifndef __PLAT_S3C_SPI_CORE_H -#define __PLAT_S3C_SPI_CORE_H - -/* These functions are only for use with the core support code, such as - * the cpu specific initialisation code - */ - -/* re-define device name depending on support. */ -static inline void s3c64xx_spi_setname(char *name) -{ -#ifdef CONFIG_S3C64XX_DEV_SPI0 - s3c64xx_device_spi0.name = name; -#endif -#ifdef CONFIG_S3C64XX_DEV_SPI1 - s3c64xx_device_spi1.name = name; -#endif -#ifdef CONFIG_S3C64XX_DEV_SPI2 - s3c64xx_device_spi2.name = name; -#endif -} - -#endif /* __PLAT_S3C_SPI_CORE_H */ -- cgit v1.2.3 From 3b0a5a96d0784305a0fc91702780c99e75134b26 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 02:00:36 +0900 Subject: ARM: SAMSUNG: local regs-usb-hsotg-phy header in mach-s3c64xx This patch moves regs-usb-hsotg-phy header file into mach-s3c64xx. Because it is not used for others except mach-s3c64xx. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c64xx/regs-usb-hsotg-phy.h | 50 +++++++++++++++++++++ arch/arm/mach-s3c64xx/setup-usb-phy.c | 2 +- .../plat-samsung/include/plat/regs-usb-hsotg-phy.h | 51 ---------------------- 3 files changed, 51 insertions(+), 52 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/regs-usb-hsotg-phy.h delete mode 100644 arch/arm/plat-samsung/include/plat/regs-usb-hsotg-phy.h diff --git a/arch/arm/mach-s3c64xx/regs-usb-hsotg-phy.h b/arch/arm/mach-s3c64xx/regs-usb-hsotg-phy.h new file mode 100644 index 000000000000..eae3c311e590 --- /dev/null +++ b/arch/arm/mach-s3c64xx/regs-usb-hsotg-phy.h @@ -0,0 +1,50 @@ +/* + * Copyright 2008 Openmoko, Inc. + * Copyright 2008 Simtec Electronics + * http://armlinux.simtec.co.uk/ + * Ben Dooks + * + * S3C - USB2.0 Highspeed/OtG device PHY registers + * + * 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. +*/ + +/* Note, this is a separate header file as some of the clock framework + * needs to touch this if the clk_48m is used as the USB OHCI or other + * peripheral source. +*/ + +#ifndef __PLAT_S3C64XX_REGS_USB_HSOTG_PHY_H +#define __PLAT_S3C64XX_REGS_USB_HSOTG_PHY_H __FILE__ + +/* S3C64XX_PA_USB_HSPHY */ + +#define S3C_HSOTG_PHYREG(x) ((x) + S3C_VA_USB_HSPHY) + +#define S3C_PHYPWR S3C_HSOTG_PHYREG(0x00) +#define S3C_PHYPWR_NORMAL_MASK (0x19 << 0) +#define S3C_PHYPWR_OTG_DISABLE (1 << 4) +#define S3C_PHYPWR_ANALOG_POWERDOWN (1 << 3) +#define SRC_PHYPWR_FORCE_SUSPEND (1 << 1) + +#define S3C_PHYCLK S3C_HSOTG_PHYREG(0x04) +#define S3C_PHYCLK_MODE_USB11 (1 << 6) +#define S3C_PHYCLK_EXT_OSC (1 << 5) +#define S3C_PHYCLK_CLK_FORCE (1 << 4) +#define S3C_PHYCLK_ID_PULL (1 << 2) +#define S3C_PHYCLK_CLKSEL_MASK (0x3 << 0) +#define S3C_PHYCLK_CLKSEL_SHIFT (0) +#define S3C_PHYCLK_CLKSEL_48M (0x0 << 0) +#define S3C_PHYCLK_CLKSEL_12M (0x2 << 0) +#define S3C_PHYCLK_CLKSEL_24M (0x3 << 0) + +#define S3C_RSTCON S3C_HSOTG_PHYREG(0x08) +#define S3C_RSTCON_PHYCLK (1 << 2) +#define S3C_RSTCON_HCLK (1 << 1) +#define S3C_RSTCON_PHY (1 << 0) + +#define S3C_PHYTUNE S3C_HSOTG_PHYREG(0x20) + +#endif /* __PLAT_S3C64XX_REGS_USB_HSOTG_PHY_H */ diff --git a/arch/arm/mach-s3c64xx/setup-usb-phy.c b/arch/arm/mach-s3c64xx/setup-usb-phy.c index ca960bda02fd..2b17b7f5152f 100644 --- a/arch/arm/mach-s3c64xx/setup-usb-phy.c +++ b/arch/arm/mach-s3c64xx/setup-usb-phy.c @@ -16,10 +16,10 @@ #include #include #include -#include #include #include "regs-sys.h" +#include "regs-usb-hsotg-phy.h" static int s3c_usb_otgphy_init(struct platform_device *pdev) { diff --git a/arch/arm/plat-samsung/include/plat/regs-usb-hsotg-phy.h b/arch/arm/plat-samsung/include/plat/regs-usb-hsotg-phy.h deleted file mode 100644 index fcf279662067..000000000000 --- a/arch/arm/plat-samsung/include/plat/regs-usb-hsotg-phy.h +++ /dev/null @@ -1,51 +0,0 @@ -/* arch/arm/plat-s3c/include/plat/regs-usb-hsotg-phy.h - * - * Copyright 2008 Openmoko, Inc. - * Copyright 2008 Simtec Electronics - * http://armlinux.simtec.co.uk/ - * Ben Dooks - * - * S3C - USB2.0 Highspeed/OtG device PHY registers - * - * 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. -*/ - -/* Note, this is a separate header file as some of the clock framework - * needs to touch this if the clk_48m is used as the USB OHCI or other - * peripheral source. -*/ - -#ifndef __PLAT_S3C64XX_REGS_USB_HSOTG_PHY_H -#define __PLAT_S3C64XX_REGS_USB_HSOTG_PHY_H __FILE__ - -/* S3C64XX_PA_USB_HSPHY */ - -#define S3C_HSOTG_PHYREG(x) ((x) + S3C_VA_USB_HSPHY) - -#define S3C_PHYPWR S3C_HSOTG_PHYREG(0x00) -#define S3C_PHYPWR_NORMAL_MASK (0x19 << 0) -#define S3C_PHYPWR_OTG_DISABLE (1 << 4) -#define S3C_PHYPWR_ANALOG_POWERDOWN (1 << 3) -#define SRC_PHYPWR_FORCE_SUSPEND (1 << 1) - -#define S3C_PHYCLK S3C_HSOTG_PHYREG(0x04) -#define S3C_PHYCLK_MODE_USB11 (1 << 6) -#define S3C_PHYCLK_EXT_OSC (1 << 5) -#define S3C_PHYCLK_CLK_FORCE (1 << 4) -#define S3C_PHYCLK_ID_PULL (1 << 2) -#define S3C_PHYCLK_CLKSEL_MASK (0x3 << 0) -#define S3C_PHYCLK_CLKSEL_SHIFT (0) -#define S3C_PHYCLK_CLKSEL_48M (0x0 << 0) -#define S3C_PHYCLK_CLKSEL_12M (0x2 << 0) -#define S3C_PHYCLK_CLKSEL_24M (0x3 << 0) - -#define S3C_RSTCON S3C_HSOTG_PHYREG(0x08) -#define S3C_RSTCON_PHYCLK (1 << 2) -#define S3C_RSTCON_HCLK (1 << 1) -#define S3C_RSTCON_PHY (1 << 0) - -#define S3C_PHYTUNE S3C_HSOTG_PHYREG(0x20) - -#endif /* __PLAT_S3C64XX_REGS_USB_HSOTG_PHY_H */ -- cgit v1.2.3 From e979b1a9b47dbe56fa7543bde3dc093231c1eb6e Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 02:00:36 +0900 Subject: ARM: SAMSUNG: local ata-core header in mach-s3c64xx This patch moves ata-core header file into mach-s3c64xx. Because it is not used for others except mach-s3c64xx. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c64xx/ata-core.h | 27 ++++++++++++++++++++++++++ arch/arm/mach-s3c64xx/s3c6410.c | 2 +- arch/arm/plat-samsung/include/plat/ata-core.h | 28 --------------------------- 3 files changed, 28 insertions(+), 29 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/ata-core.h delete mode 100644 arch/arm/plat-samsung/include/plat/ata-core.h diff --git a/arch/arm/mach-s3c64xx/ata-core.h b/arch/arm/mach-s3c64xx/ata-core.h new file mode 100644 index 000000000000..5951f24a9ec8 --- /dev/null +++ b/arch/arm/mach-s3c64xx/ata-core.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2010 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Samsung CF-ATA Controller core functions + * + * 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. +*/ + +#ifndef __ASM_PLAT_ATA_CORE_H +#define __ASM_PLAT_ATA_CORE_H __FILE__ + +/* These functions are only for use with the core support code, such as + * the cpu specific initialisation code +*/ + +/* re-define device name depending on support. */ +static inline void s3c_cfcon_setname(char *name) +{ +#ifdef CONFIG_SAMSUNG_DEV_IDE + s3c_device_cfcon.name = name; +#endif +} + +#endif /* __ASM_PLAT_ATA_CORE_H */ diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c index b2a7930548d9..5081f08f56d3 100644 --- a/arch/arm/mach-s3c64xx/s3c6410.c +++ b/arch/arm/mach-s3c64xx/s3c6410.c @@ -41,11 +41,11 @@ #include #include #include -#include #include #include #include +#include "ata-core.h" #include "common.h" void __init s3c6410_map_io(void) diff --git a/arch/arm/plat-samsung/include/plat/ata-core.h b/arch/arm/plat-samsung/include/plat/ata-core.h deleted file mode 100644 index f5a4ec7141b1..000000000000 --- a/arch/arm/plat-samsung/include/plat/ata-core.h +++ /dev/null @@ -1,28 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/ata-core.h - * - * Copyright (c) 2010 Samsung Electronics Co., Ltd. - * http://www.samsung.com - * - * Samsung CF-ATA Controller core functions - * - * 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. -*/ - -#ifndef __ASM_PLAT_ATA_CORE_H -#define __ASM_PLAT_ATA_CORE_H __FILE__ - -/* These functions are only for use with the core support code, such as - * the cpu specific initialisation code -*/ - -/* re-define device name depending on support. */ -static inline void s3c_cfcon_setname(char *name) -{ -#ifdef CONFIG_SAMSUNG_DEV_IDE - s3c_device_cfcon.name = name; -#endif -} - -#endif /* __ASM_PLAT_ATA_CORE_H */ -- cgit v1.2.3 From 4a7bf56f7f98fee929c74dd579fa19529712974d Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 02:00:36 +0900 Subject: ARM: SAMSUNG: local backlight header in mach-s3c64xx This patch moves backlight header file into mach-s3c64xx. Because it is not used for others except mach-s3c64xx. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c64xx/backlight.h | 25 +++++++++++++++++++++++++ arch/arm/mach-s3c64xx/dev-backlight.c | 3 ++- arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +- arch/arm/plat-samsung/include/plat/backlight.h | 26 -------------------------- 4 files changed, 28 insertions(+), 28 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/backlight.h delete mode 100644 arch/arm/plat-samsung/include/plat/backlight.h diff --git a/arch/arm/mach-s3c64xx/backlight.h b/arch/arm/mach-s3c64xx/backlight.h new file mode 100644 index 000000000000..8dcacac523a2 --- /dev/null +++ b/arch/arm/mach-s3c64xx/backlight.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2011 Samsung Electronics Co., Ltd. + * http://www.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. + */ + +#ifndef __ASM_PLAT_BACKLIGHT_H +#define __ASM_PLAT_BACKLIGHT_H __FILE__ + +/* samsung_bl_gpio_info - GPIO info for PWM Backlight control + * @no: GPIO number for PWM timer out + * @func: Special function of GPIO line for PWM timer + */ +struct samsung_bl_gpio_info { + int no; + int func; +}; + +extern void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, + struct platform_pwm_backlight_data *bl_data); + +#endif /* __ASM_PLAT_BACKLIGHT_H */ diff --git a/arch/arm/mach-s3c64xx/dev-backlight.c b/arch/arm/mach-s3c64xx/dev-backlight.c index 62f4648830b5..38c323e68e3f 100644 --- a/arch/arm/mach-s3c64xx/dev-backlight.c +++ b/arch/arm/mach-s3c64xx/dev-backlight.c @@ -17,7 +17,8 @@ #include #include -#include + +#include "backlight.h" struct samsung_bl_drvdata { struct platform_pwm_backlight_data plat_data; diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index b7447a92276e..d590b88bd8a8 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c @@ -68,9 +68,9 @@ #include #include #include -#include #include +#include "backlight.h" #include "common.h" #include "regs-modem.h" #include "regs-srom.h" diff --git a/arch/arm/plat-samsung/include/plat/backlight.h b/arch/arm/plat-samsung/include/plat/backlight.h deleted file mode 100644 index ad530c78fe8c..000000000000 --- a/arch/arm/plat-samsung/include/plat/backlight.h +++ /dev/null @@ -1,26 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/backlight.h - * - * Copyright (c) 2011 Samsung Electronics Co., Ltd. - * http://www.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. - */ - -#ifndef __ASM_PLAT_BACKLIGHT_H -#define __ASM_PLAT_BACKLIGHT_H __FILE__ - -/* samsung_bl_gpio_info - GPIO info for PWM Backlight control - * @no: GPIO number for PWM timer out - * @func: Special function of GPIO line for PWM timer - */ -struct samsung_bl_gpio_info { - int no; - int func; -}; - -extern void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, - struct platform_pwm_backlight_data *bl_data); - -#endif /* __ASM_PLAT_BACKLIGHT_H */ -- cgit v1.2.3 From 876ba9bafbc8aba7854c785ca5d13bbb5ef7b3cf Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 02:00:38 +0900 Subject: ARM: SAMSUNG: local irq-uart header in mach-s3c64xx This patch moves irq-uart header file into mach-s3c64xx. Because it is not used for others except mach-s3c64xx. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c64xx/common.c | 2 +- arch/arm/mach-s3c64xx/irq-uart.h | 19 +++++++++++++++++++ arch/arm/plat-samsung/include/plat/irq-uart.h | 20 -------------------- 3 files changed, 20 insertions(+), 21 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/irq-uart.h delete mode 100644 arch/arm/plat-samsung/include/plat/irq-uart.h diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index 16547f2641a3..316df5a3dc82 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c @@ -48,12 +48,12 @@ #include #include #include -#include #include #include #include #include "common.h" +#include "irq-uart.h" /* External clock frequency */ static unsigned long xtal_f = 12000000, xusbxti_f = 48000000; diff --git a/arch/arm/mach-s3c64xx/irq-uart.h b/arch/arm/mach-s3c64xx/irq-uart.h new file mode 100644 index 000000000000..4b296132962f --- /dev/null +++ b/arch/arm/mach-s3c64xx/irq-uart.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2010 Simtec Electronics + * Ben Dooks + * + * Header file for Samsung SoC UART IRQ demux for S3C64XX and later + * + * 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 s3c_uart_irq { + void __iomem *regs; + unsigned int base_irq; + unsigned int parent_irq; +}; + +extern void s3c_init_uart_irqs(struct s3c_uart_irq *irq, unsigned int nr_irqs); + diff --git a/arch/arm/plat-samsung/include/plat/irq-uart.h b/arch/arm/plat-samsung/include/plat/irq-uart.h deleted file mode 100644 index a9331e49bea3..000000000000 --- a/arch/arm/plat-samsung/include/plat/irq-uart.h +++ /dev/null @@ -1,20 +0,0 @@ -/* arch/arm/plat-samsung/include/plat/irq-uart.h - * - * Copyright (c) 2010 Simtec Electronics - * Ben Dooks - * - * Header file for Samsung SoC UART IRQ demux for S3C64XX and later - * - * 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 s3c_uart_irq { - void __iomem *regs; - unsigned int base_irq; - unsigned int parent_irq; -}; - -extern void s3c_init_uart_irqs(struct s3c_uart_irq *irq, unsigned int nr_irqs); - -- cgit v1.2.3 From fe31d04416e8a019a4ce8dca49aef80f10397aaf Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 02:00:47 +0900 Subject: ARM: SAMSUNG: local onenand-core header in mach-s3c64xx This patch moves onenand-core header file into mach-s3c64xx. Because it is not used for others except mach-s3c64xx. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c64xx/onenand-core.h | 35 +++++++++++++++++++++ arch/arm/mach-s3c64xx/s3c6400.c | 2 +- arch/arm/mach-s3c64xx/s3c6410.c | 2 +- arch/arm/plat-samsung/include/plat/onenand-core.h | 37 ----------------------- 4 files changed, 37 insertions(+), 39 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/onenand-core.h delete mode 100644 arch/arm/plat-samsung/include/plat/onenand-core.h diff --git a/arch/arm/mach-s3c64xx/onenand-core.h b/arch/arm/mach-s3c64xx/onenand-core.h new file mode 100644 index 000000000000..925eb13bbb60 --- /dev/null +++ b/arch/arm/mach-s3c64xx/onenand-core.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2010 Samsung Electronics + * Kyungmin Park + * Marek Szyprowski + * + * Samsung OneNAD Controller core functions + * + * 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. +*/ + +#ifndef __ASM_ARCH_ONENAND_CORE_H +#define __ASM_ARCH_ONENAND_CORE_H __FILE__ + +/* These functions are only for use with the core support code, such as + * the cpu specific initialisation code + */ + +/* re-define device name depending on support. */ +static inline void s3c_onenand_setname(char *name) +{ +#ifdef CONFIG_S3C_DEV_ONENAND + s3c_device_onenand.name = name; +#endif +} + +static inline void s3c64xx_onenand1_setname(char *name) +{ +#ifdef CONFIG_S3C64XX_DEV_ONENAND1 + s3c64xx_device_onenand1.name = name; +#endif +} + +#endif /* __ASM_ARCH_ONENAND_CORE_H */ diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c index 1ce48c54cd9c..33273abef669 100644 --- a/arch/arm/mach-s3c64xx/s3c6400.c +++ b/arch/arm/mach-s3c64xx/s3c6400.c @@ -41,9 +41,9 @@ #include #include #include -#include #include "common.h" +#include "onenand-core.h" void __init s3c6400_map_io(void) { diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c index 5081f08f56d3..eadc48dee0e4 100644 --- a/arch/arm/mach-s3c64xx/s3c6410.c +++ b/arch/arm/mach-s3c64xx/s3c6410.c @@ -43,10 +43,10 @@ #include #include #include -#include #include "ata-core.h" #include "common.h" +#include "onenand-core.h" void __init s3c6410_map_io(void) { diff --git a/arch/arm/plat-samsung/include/plat/onenand-core.h b/arch/arm/plat-samsung/include/plat/onenand-core.h deleted file mode 100644 index 7701cb7020c8..000000000000 --- a/arch/arm/plat-samsung/include/plat/onenand-core.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * linux/arch/arm/plat-samsung/onenand-core.h - * - * Copyright (c) 2010 Samsung Electronics - * Kyungmin Park - * Marek Szyprowski - * - * Samsung OneNAD Controller core functions - * - * 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. -*/ - -#ifndef __ASM_ARCH_ONENAND_CORE_H -#define __ASM_ARCH_ONENAND_CORE_H __FILE__ - -/* These functions are only for use with the core support code, such as - * the cpu specific initialisation code - */ - -/* re-define device name depending on support. */ -static inline void s3c_onenand_setname(char *name) -{ -#ifdef CONFIG_S3C_DEV_ONENAND - s3c_device_onenand.name = name; -#endif -} - -static inline void s3c64xx_onenand1_setname(char *name) -{ -#ifdef CONFIG_S3C64XX_DEV_ONENAND1 - s3c64xx_device_onenand1.name = name; -#endif -} - -#endif /* __ASM_ARCH_ONENAND_CORE_H */ -- cgit v1.2.3 From 96bc024cdcfc4087a592ae258f21355509e21614 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 02:00:52 +0900 Subject: ARM: SAMSUNG: local watchdog-reset header in mach-s3c64xx This patch moves watchdog-reset header file into mach-s3c64xx. Because it is not used for others except mach-s3c64xx. Cc: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c64xx/common.c | 2 +- arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 3 +-- arch/arm/mach-s3c64xx/watchdog-reset.h | 19 +++++++++++++++++++ arch/arm/plat-samsung/include/plat/watchdog-reset.h | 20 -------------------- 4 files changed, 21 insertions(+), 23 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/watchdog-reset.h delete mode 100644 arch/arm/plat-samsung/include/plat/watchdog-reset.h diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index 316df5a3dc82..4a9621b1226e 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c @@ -50,10 +50,10 @@ #include #include #include -#include #include "common.h" #include "irq-uart.h" +#include "watchdog-reset.h" /* External clock frequency */ static unsigned long xtal_f = 12000000, xusbxti_f = 48000000; diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c index 2fddf38192df..ead3766672bb 100644 --- a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c +++ b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c @@ -15,11 +15,10 @@ #include #include -#include - #include #include "common.h" +#include "watchdog-reset.h" /* * IO mapping for shared system controller IP. diff --git a/arch/arm/mach-s3c64xx/watchdog-reset.h b/arch/arm/mach-s3c64xx/watchdog-reset.h new file mode 100644 index 000000000000..42707dfbda9c --- /dev/null +++ b/arch/arm/mach-s3c64xx/watchdog-reset.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2008 Simtec Electronics + * Ben Dooks + * + * S3C2410 - System define for arch_reset() function + * + * 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. +*/ + +#ifndef __PLAT_SAMSUNG_WATCHDOG_RESET_H +#define __PLAT_SAMSUNG_WATCHDOG_RESET_H + +extern void samsung_wdt_reset(void); +extern void samsung_wdt_reset_of_init(void); +extern void samsung_wdt_reset_init(void __iomem *base); + +#endif /* __PLAT_SAMSUNG_WATCHDOG_RESET_H */ diff --git a/arch/arm/plat-samsung/include/plat/watchdog-reset.h b/arch/arm/plat-samsung/include/plat/watchdog-reset.h deleted file mode 100644 index 0386b8f76623..000000000000 --- a/arch/arm/plat-samsung/include/plat/watchdog-reset.h +++ /dev/null @@ -1,20 +0,0 @@ -/* arch/arm/plat-s3c/include/plat/watchdog-reset.h - * - * Copyright (c) 2008 Simtec Electronics - * Ben Dooks - * - * S3C2410 - System define for arch_reset() function - * - * 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. -*/ - -#ifndef __PLAT_SAMSUNG_WATCHDOG_RESET_H -#define __PLAT_SAMSUNG_WATCHDOG_RESET_H - -extern void samsung_wdt_reset(void); -extern void samsung_wdt_reset_of_init(void); -extern void samsung_wdt_reset_init(void __iomem *base); - -#endif /* __PLAT_SAMSUNG_WATCHDOG_RESET_H */ -- cgit v1.2.3 From d306d08f07183fe1504257101b25b5b33d77bae9 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Thu, 30 Jul 2015 02:02:06 +0900 Subject: ARM: SAMSUNG: remove keypad-core header in plat-samsung Since keypad-core header is not used, this patch removes it. Cc: Krzysztof Kozlowski Cc: Joonyoung Shim Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/include/plat/keypad-core.h | 31 ------------------------ 1 file changed, 31 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/keypad-core.h diff --git a/arch/arm/plat-samsung/include/plat/keypad-core.h b/arch/arm/plat-samsung/include/plat/keypad-core.h deleted file mode 100644 index d513e1b3a31e..000000000000 --- a/arch/arm/plat-samsung/include/plat/keypad-core.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * linux/arch/arm/plat-samsung/include/plat/keypad-core.h - * - * Copyright (C) 2010 Samsung Electronics Co.Ltd - * Author: Joonyoung Shim - * - * Samsung keypad controller core function - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - */ - -#ifndef __ASM_ARCH_KEYPAD_CORE_H -#define __ASM_ARCH_KEYPAD_CORE_H - -/* These function are only for use with the core support code, such as - * the cpu specific initialisation code - */ - -/* re-define device name depending on support. */ -static inline void samsung_keypad_setname(char *name) -{ -#ifdef CONFIG_SAMSUNG_DEV_KEYPAD - samsung_device_keypad.name = name; -#endif -} - -#endif /* __ASM_ARCH_KEYPAD_CORE_H */ -- cgit v1.2.3