diff options
author | José Pekkarinen <jose.pekkarinen@nokia.com> | 2016-04-11 10:41:07 +0300 |
---|---|---|
committer | José Pekkarinen <jose.pekkarinen@nokia.com> | 2016-04-13 08:17:18 +0300 |
commit | e09b41010ba33a20a87472ee821fa407a5b8da36 (patch) | |
tree | d10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/arch/arm/mach-s3c24xx | |
parent | f93b97fd65072de626c074dbe099a1fff05ce060 (diff) |
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page.
During the rebasing, the following patch collided:
Force tick interrupt and get rid of softirq magic(I70131fb85).
Collisions have been removed because its logic was found on the
source already.
Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769
Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/arch/arm/mach-s3c24xx')
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/Kconfig | 5 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/Makefile | 1 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/bast-irq.c | 6 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/fb-core.h | 27 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/mach-h1940.c | 10 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/mach-rx1950.c | 8 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c | 2 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/nand-core.h | 27 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c | 2 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c | 2 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/s3c2412.c | 2 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/s3c2416.c | 6 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/s3c2443.c | 7 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/s3c244x.c | 2 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/setup-camif.c | 71 | ||||
-rw-r--r-- | kernel/arch/arm/mach-s3c24xx/spi-core.h | 30 |
16 files changed, 188 insertions, 20 deletions
diff --git a/kernel/arch/arm/mach-s3c24xx/Kconfig b/kernel/arch/arm/mach-s3c24xx/Kconfig index 23bec3a85..ef68ecb27 100644 --- a/kernel/arch/arm/mach-s3c24xx/Kconfig +++ b/kernel/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/kernel/arch/arm/mach-s3c24xx/Makefile b/kernel/arch/arm/mach-s3c24xx/Makefile index 05920c8a5..8ac2f58a3 100644 --- a/kernel/arch/arm/mach-s3c24xx/Makefile +++ b/kernel/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/kernel/arch/arm/mach-s3c24xx/bast-irq.c b/kernel/arch/arm/mach-s3c24xx/bast-irq.c index cb1b79195..2bb08961e 100644 --- a/kernel/arch/arm/mach-s3c24xx/bast-irq.c +++ b/kernel/arch/arm/mach-s3c24xx/bast-irq.c @@ -100,9 +100,7 @@ static struct irq_chip bast_pc104_chip = { .irq_ack = bast_pc104_maskack }; -static void -bast_irq_pc104_demux(unsigned int irq, - struct irq_desc *desc) +static void bast_irq_pc104_demux(struct irq_desc *desc) { unsigned int stat; unsigned int irqno; @@ -147,7 +145,7 @@ static __init int bast_irq_init(void) irq_set_chip_and_handler(irqno, &bast_pc104_chip, handle_level_irq); - set_irq_flags(irqno, IRQF_VALID); + irq_clear_status_flags(irqno, IRQ_NOREQUEST); } } diff --git a/kernel/arch/arm/mach-s3c24xx/fb-core.h b/kernel/arch/arm/mach-s3c24xx/fb-core.h new file mode 100644 index 000000000..103bdbadd --- /dev/null +++ b/kernel/arch/arm/mach-s3c24xx/fb-core.h @@ -0,0 +1,27 @@ +/* + * Copyright 2010 Samsung Electronics Co., Ltd. + * Pawel Osciak <p.osciak@samsung.com> + * + * 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/kernel/arch/arm/mach-s3c24xx/mach-h1940.c b/kernel/arch/arm/mach-s3c24xx/mach-h1940.c index d40d4f524..9f54300df 100644 --- a/kernel/arch/arm/mach-s3c24xx/mach-h1940.c +++ b/kernel/arch/arm/mach-s3c24xx/mach-h1940.c @@ -25,6 +25,7 @@ #include <linux/gpio.h> #include <linux/input.h> #include <linux/gpio_keys.h> +#include <linux/pwm.h> #include <linux/pwm_backlight.h> #include <linux/i2c.h> #include <linux/leds.h> @@ -469,6 +470,11 @@ static struct s3c24xx_mci_pdata h1940_mmc_cfg __initdata = { .ocr_avail = MMC_VDD_32_33, }; +static struct pwm_lookup h1940_pwm_lookup[] = { + PWM_LOOKUP("samsung-pwm", 0, "pwm-backlight", NULL, 36296, + PWM_POLARITY_NORMAL), +}; + static int h1940_backlight_init(struct device *dev) { gpio_request(S3C2410_GPB(0), "Backlight"); @@ -503,11 +509,8 @@ static void h1940_backlight_exit(struct device *dev) static struct platform_pwm_backlight_data backlight_data = { - .pwm_id = 0, .max_brightness = 100, .dft_brightness = 50, - /* tcnt = 0x31 */ - .pwm_period_ns = 36296, .enable_gpio = -1, .init = h1940_backlight_init, .notify = h1940_backlight_notify, @@ -725,6 +728,7 @@ static void __init h1940_init(void) gpio_request(H1940_LATCH_SD_POWER, "SD power"); gpio_direction_output(H1940_LATCH_SD_POWER, 0); + pwm_add_table(h1940_pwm_lookup, ARRAY_SIZE(h1940_pwm_lookup)); platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); gpio_request(S3C2410_GPA(1), "Red LED blink"); diff --git a/kernel/arch/arm/mach-s3c24xx/mach-rx1950.c b/kernel/arch/arm/mach-s3c24xx/mach-rx1950.c index 1d35ff375..774c982a7 100644 --- a/kernel/arch/arm/mach-s3c24xx/mach-rx1950.c +++ b/kernel/arch/arm/mach-s3c24xx/mach-rx1950.c @@ -375,6 +375,11 @@ static struct s3c2410fb_mach_info rx1950_lcd_cfg = { }; +static struct pwm_lookup rx1950_pwm_lookup[] = { + PWM_LOOKUP("samsung-pwm", 0, "pwm-backlight.0", NULL, 48000, + PWM_POLARITY_NORMAL), +}; + static struct pwm_device *lcd_pwm; static void rx1950_lcd_power(int enable) @@ -520,10 +525,8 @@ static int rx1950_backlight_notify(struct device *dev, int brightness) } static struct platform_pwm_backlight_data rx1950_backlight_data = { - .pwm_id = 0, .max_brightness = 24, .dft_brightness = 4, - .pwm_period_ns = 48000, .enable_gpio = -1, .init = rx1950_backlight_init, .notify = rx1950_backlight_notify, @@ -792,6 +795,7 @@ static void __init rx1950_init_machine(void) gpio_direction_output(S3C2410_GPA(4), 0); gpio_direction_output(S3C2410_GPJ(6), 0); + pwm_add_table(rx1950_pwm_lookup, ARRAY_SIZE(rx1950_pwm_lookup)); platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices)); i2c_register_board_info(0, rx1950_i2c_devices, diff --git a/kernel/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c b/kernel/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c index f886478b8..5f028ff84 100644 --- a/kernel/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c +++ b/kernel/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c @@ -39,7 +39,7 @@ static void __init s3c2416_dt_machine_init(void) s3c_pm_init(); } -static char const *s3c2416_dt_compat[] __initdata = { +static const char *const s3c2416_dt_compat[] __initconst = { "samsung,s3c2416", "samsung,s3c2450", NULL diff --git a/kernel/arch/arm/mach-s3c24xx/nand-core.h b/kernel/arch/arm/mach-s3c24xx/nand-core.h new file mode 100644 index 000000000..7e811fe1c --- /dev/null +++ b/kernel/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/kernel/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/kernel/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c index a19460e6e..b355fca6c 100644 --- a/kernel/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c +++ b/kernel/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c @@ -20,7 +20,7 @@ #include <plat/cpu.h> #include <plat/cpu-freq-core.h> -static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = { +static struct cpufreq_frequency_table s3c2440_plls_12[] = { { .frequency = 75000000, .driver_data = PLLVAL(0x75, 3, 3), }, /* FVco 600.000000 */ { .frequency = 80000000, .driver_data = PLLVAL(0x98, 4, 3), }, /* FVco 640.000000 */ { .frequency = 90000000, .driver_data = PLLVAL(0x70, 2, 3), }, /* FVco 720.000000 */ diff --git a/kernel/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/kernel/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c index 1191b2905..be9a248b5 100644 --- a/kernel/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c +++ b/kernel/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c @@ -20,7 +20,7 @@ #include <plat/cpu.h> #include <plat/cpu-freq-core.h> -static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = { +static struct cpufreq_frequency_table s3c2440_plls_169344[] = { { .frequency = 78019200, .driver_data = PLLVAL(121, 5, 3), }, /* FVco 624.153600 */ { .frequency = 84067200, .driver_data = PLLVAL(131, 5, 3), }, /* FVco 672.537600 */ { .frequency = 90115200, .driver_data = PLLVAL(141, 5, 3), }, /* FVco 720.921600 */ diff --git a/kernel/arch/arm/mach-s3c24xx/s3c2412.c b/kernel/arch/arm/mach-s3c24xx/s3c2412.c index 64a13605c..fb5ee8d38 100644 --- a/kernel/arch/arm/mach-s3c24xx/s3c2412.c +++ b/kernel/arch/arm/mach-s3c24xx/s3c2412.c @@ -40,11 +40,11 @@ #include <plat/cpu.h> #include <plat/cpu-freq.h> #include <plat/devs.h> -#include <plat/nand-core.h> #include <plat/pm.h> #include <plat/regs-spi.h> #include "common.h" +#include "nand-core.h" #include "regs-dsc.h" #include "s3c2412-power.h" diff --git a/kernel/arch/arm/mach-s3c24xx/s3c2416.c b/kernel/arch/arm/mach-s3c24xx/s3c2416.c index 3f8ca2a3e..621b8648a 100644 --- a/kernel/arch/arm/mach-s3c24xx/s3c2416.c +++ b/kernel/arch/arm/mach-s3c24xx/s3c2416.c @@ -59,12 +59,12 @@ #include <plat/pm.h> #include <plat/iic-core.h> -#include <plat/fb-core.h> -#include <plat/nand-core.h> #include <plat/adc-core.h> -#include <plat/spi-core.h> #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/kernel/arch/arm/mach-s3c24xx/s3c2443.c b/kernel/arch/arm/mach-s3c24xx/s3c2443.c index 87b6b89d8..b559d378c 100644 --- a/kernel/arch/arm/mach-s3c24xx/s3c2443.c +++ b/kernel/arch/arm/mach-s3c24xx/s3c2443.c @@ -41,10 +41,11 @@ #include <plat/gpio-cfg-helpers.h> #include <plat/devs.h> #include <plat/cpu.h> -#include <plat/fb-core.h> -#include <plat/nand-core.h> #include <plat/adc-core.h> -#include <plat/spi-core.h> + +#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/kernel/arch/arm/mach-s3c24xx/s3c244x.c b/kernel/arch/arm/mach-s3c24xx/s3c244x.c index b14119585..31fd27326 100644 --- a/kernel/arch/arm/mach-s3c24xx/s3c244x.c +++ b/kernel/arch/arm/mach-s3c24xx/s3c244x.c @@ -41,9 +41,9 @@ #include <plat/devs.h> #include <plat/cpu.h> #include <plat/pm.h> -#include <plat/nand-core.h> #include "common.h" +#include "nand-core.h" #include "regs-dsc.h" static struct map_desc s3c244x_iodesc[] __initdata = { diff --git a/kernel/arch/arm/mach-s3c24xx/setup-camif.c b/kernel/arch/arm/mach-s3c24xx/setup-camif.c new file mode 100644 index 000000000..72d8edb89 --- /dev/null +++ b/kernel/arch/arm/mach-s3c24xx/setup-camif.c @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2012 Sylwester Nawrocki <sylvester.nawrocki@gmail.com> + * + * 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 <linux/gpio.h> +#include <plat/gpio-cfg.h> +#include <mach/gpio-samsung.h> + +/* 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/kernel/arch/arm/mach-s3c24xx/spi-core.h b/kernel/arch/arm/mach-s3c24xx/spi-core.h new file mode 100644 index 000000000..0b9428ab3 --- /dev/null +++ b/kernel/arch/arm/mach-s3c24xx/spi-core.h @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2012 Heiko Stuebner <heiko@sntech.de> + * + * 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 */ |