Skip to content

Commit

Permalink
Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/kgene/linux-samsung into devel-stable

Conflicts:
	arch/arm/mach-s3c64xx/dev-audio.c
  • Loading branch information
Russell King committed Oct 28, 2010
2 parents 9ae21ca + cbff3eb commit f9cef50
Show file tree
Hide file tree
Showing 157 changed files with 6,574 additions and 1,314 deletions.
6 changes: 6 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,11 @@ config ARCH_S5PC100
config ARCH_S5PV210
bool "Samsung S5PV210/S5PC110"
select CPU_V7
select ARCH_SPARSEMEM_ENABLE
select GENERIC_GPIO
select HAVE_CLK
select ARM_L1_CACHE_SHIFT_6
select ARCH_HAS_CPUFREQ
select ARCH_USES_GETTIMEOFFSET
select HAVE_S3C2410_I2C
select HAVE_S3C_RTC
Expand All @@ -740,9 +742,13 @@ config ARCH_S5PV210
config ARCH_S5PV310
bool "Samsung S5PV310/S5PC210"
select CPU_V7
select ARCH_SPARSEMEM_ENABLE
select GENERIC_GPIO
select HAVE_CLK
select GENERIC_CLOCKEVENTS
select HAVE_S3C_RTC
select HAVE_S3C2410_I2C
select HAVE_S3C2410_WATCHDOG
help
Samsung S5PV310 series based systems

Expand Down
4 changes: 4 additions & 0 deletions arch/arm/include/asm/hardware/cache-l2x0.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
#define L2X0_LINE_DATA 0xF10
#define L2X0_LINE_TAG 0xF30
#define L2X0_DEBUG_CTRL 0xF40
#define L2X0_PREFETCH_CTRL 0xF60
#define L2X0_POWER_CTRL 0xF80
#define L2X0_DYNAMIC_CLK_GATING_EN (1 << 1)
#define L2X0_STNDBY_MODE_EN (1 << 0)

#ifndef __ASSEMBLY__
extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask);
Expand Down
10 changes: 7 additions & 3 deletions arch/arm/mach-s3c2410/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#ifdef CONFIG_CPU_S3C244X
#define ARCH_NR_GPIOS (32 * 9 + CONFIG_S3C24XX_GPIO_EXTRA)
#elif defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
#define ARCH_NR_GPIOS (32 * 12 + CONFIG_S3C24XX_GPIO_EXTRA)
#else
#define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA)
#endif
Expand All @@ -30,8 +32,10 @@
#include <mach/gpio-nrs.h>
#include <mach/gpio-fns.h>

#ifdef CONFIG_CPU_S3C24XX
#define S3C_GPIO_END (S3C2410_GPIO_BANKJ + 32)
#ifdef CONFIG_CPU_S3C244X
#define S3C_GPIO_END (S3C2410_GPJ(0) + 32)
#elif defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
#define S3C_GPIO_END (S3C2410_GPM(0) + 32)
#else
#define S3C_GPIO_END (S3C2410_GPIO_BANKH + 32)
#define S3C_GPIO_END (S3C2410_GPH(0) + 32)
#endif
2 changes: 2 additions & 0 deletions arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
#define S3C2443_SCLKCON_UARTCLK (1<<8)
#define S3C2443_SCLKCON_USBHOST (1<<1)

#define S3C2443_PWRCFG_SLEEP (1<<15)

#include <asm/div64.h>

static inline unsigned int
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2410/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
#ifndef __ASM_ARCH_VMALLOC_H
#define __ASM_ARCH_VMALLOC_H

#define VMALLOC_END 0xE0000000UL
#define VMALLOC_END 0xF6000000UL

#endif /* __ASM_ARCH_VMALLOC_H */
3 changes: 2 additions & 1 deletion arch/arm/mach-s3c2412/s3c2412.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <plat/clock.h>
#include <plat/pm.h>
#include <plat/pll.h>
#include <plat/nand-core.h>

#ifndef CONFIG_CPU_S3C2412_ONLY
void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO;
Expand Down Expand Up @@ -92,7 +93,7 @@ void __init s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no)
/* rename devices that are s3c2412/s3c2413 specific */
s3c_device_sdi.name = "s3c2412-sdi";
s3c_device_lcd.name = "s3c2412-lcd";
s3c_device_nand.name = "s3c2412-nand";
s3c_nand_setname("s3c2412-nand");

/* alter IRQ of SDI controller */

Expand Down
6 changes: 6 additions & 0 deletions arch/arm/mach-s3c2416/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ config S3C2416_DMA
help
Internal config node for S3C2416 DMA support

config S3C2416_PM
bool
help
Internal config node to apply S3C2416 power management

menu "S3C2416 Machines"

config MACH_SMDK2416
Expand All @@ -33,6 +38,7 @@ config MACH_SMDK2416
select S3C_DEV_FB
select S3C_DEV_HSMMC
select S3C_DEV_HSMMC1
select S3C2416_PM if PM
help
Say Y here if you are using an SMDK2416

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2416/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ obj- :=

obj-$(CONFIG_CPU_S3C2416) += s3c2416.o clock.o
obj-$(CONFIG_CPU_S3C2416) += irq.o

obj-$(CONFIG_S3C2416_PM) += pm.o
#obj-$(CONFIG_S3C2416_DMA) += dma.o

# Machine support
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-s3c2416/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ static int __init s3c2416_irq_add(struct sys_device *sysdev)

static struct sysdev_driver s3c2416_irq_driver = {
.add = s3c2416_irq_add,
.suspend = s3c24xx_irq_suspend,
.resume = s3c24xx_irq_resume,
};

static int __init s3c2416_irq_init(void)
Expand Down
84 changes: 84 additions & 0 deletions arch/arm/mach-s3c2416/pm.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/* linux/arch/arm/mach-s3c2416/pm.c
*
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
* S3C2416 - PM support (Based on Ben Dooks' S3C2412 PM support)
*
* 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/sysdev.h>
#include <linux/io.h>

#include <asm/cacheflush.h>

#include <mach/regs-power.h>
#include <mach/regs-s3c2443-clock.h>

#include <plat/cpu.h>
#include <plat/pm.h>

extern void s3c2412_sleep_enter(void);

static void s3c2416_cpu_suspend(void)
{
flush_cache_all();

/* enable wakeup sources regardless of battery state */
__raw_writel(S3C2443_PWRCFG_SLEEP, S3C2443_PWRCFG);

/* set the mode as sleep, 2BED represents "Go to BED" */
__raw_writel(0x2BED, S3C2443_PWRMODE);

s3c2412_sleep_enter();
}

static void s3c2416_pm_prepare(void)
{
/*
* write the magic value u-boot uses to check for resume into
* the INFORM0 register, and ensure INFORM1 is set to the
* correct address to resume from.
*/
__raw_writel(0x2BED, S3C2412_INFORM0);
__raw_writel(virt_to_phys(s3c_cpu_resume), S3C2412_INFORM1);
}

static int s3c2416_pm_add(struct sys_device *sysdev)
{
pm_cpu_prep = s3c2416_pm_prepare;
pm_cpu_sleep = s3c2416_cpu_suspend;

return 0;
}

static int s3c2416_pm_suspend(struct sys_device *dev, pm_message_t state)
{
return 0;
}

static int s3c2416_pm_resume(struct sys_device *dev)
{
/* unset the return-from-sleep amd inform flags */
__raw_writel(0x0, S3C2443_PWRMODE);
__raw_writel(0x0, S3C2412_INFORM0);
__raw_writel(0x0, S3C2412_INFORM1);

return 0;
}

static struct sysdev_driver s3c2416_pm_driver = {
.add = s3c2416_pm_add,
.suspend = s3c2416_pm_suspend,
.resume = s3c2416_pm_resume,
};

static __init int s3c2416_pm_init(void)
{
return sysdev_driver_register(&s3c2416_sysclass, &s3c2416_pm_driver);
}

arch_initcall(s3c2416_pm_init);
3 changes: 2 additions & 1 deletion arch/arm/mach-s3c2416/s3c2416.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@

#include <plat/iic-core.h>
#include <plat/fb-core.h>
#include <plat/nand-core.h>

static struct map_desc s3c2416_iodesc[] __initdata = {
IODESC_ENT(WATCHDOG),
Expand Down Expand Up @@ -100,7 +101,7 @@ void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no)
{
s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg, no);

s3c_device_nand.name = "s3c2416-nand";
s3c_nand_setname("s3c2412-nand");
}

/* s3c2416_map_io
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-s3c2440/s3c244x.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include <plat/cpu.h>
#include <plat/pm.h>
#include <plat/pll.h>
#include <plat/nand-core.h>

static struct map_desc s3c244x_iodesc[] __initdata = {
IODESC_ENT(CLKPWR),
Expand All @@ -68,7 +69,7 @@ void __init s3c244x_map_io(void)

s3c_device_sdi.name = "s3c2440-sdi";
s3c_device_i2c0.name = "s3c2440-i2c";
s3c_device_nand.name = "s3c2440-nand";
s3c_nand_setname("s3c2440-nand");
s3c_device_ts.name = "s3c2440-ts";
s3c_device_usbgadget.name = "s3c2440-usbgadget";
}
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-s3c2443/s3c2443.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/fb-core.h>
#include <plat/nand-core.h>

static struct map_desc s3c2443_iodesc[] __initdata = {
IODESC_ENT(WATCHDOG),
Expand All @@ -62,7 +63,7 @@ int __init s3c2443_init(void)

s3c24xx_reset_hook = s3c2443_hard_reset;

s3c_device_nand.name = "s3c2412-nand";
s3c_nand_setname("s3c2412-nand");
s3c_fb_setname("s3c2443-fb");

/* change WDT IRQ number */
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c24a0/include/mach/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
#ifndef __ASM_ARCH_VMALLOC_H
#define __ASM_ARCH_VMALLOC_H

#define VMALLOC_END (0xe0000000UL)
#define VMALLOC_END 0xF6000000UL

#endif /* __ASM_ARCH_VMALLOC_H */
21 changes: 21 additions & 0 deletions arch/arm/mach-s3c64xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,33 @@ config MACH_ANW6410
help
Machine support for the A&W6410

config MACH_MINI6410
bool "MINI6410"
select CPU_S3C6410
select S3C_DEV_HSMMC
select S3C_DEV_HSMMC1
select S3C64XX_SETUP_SDHCI
select S3C_DEV_USB_HOST
select S3C_DEV_NAND
select S3C_DEV_FB
select S3C64XX_SETUP_FB_24BPP
select SAMSUNG_DEV_ADC
select SAMSUNG_DEV_TS
help
Machine support for the FriendlyARM MINI6410

config MACH_REAL6410
bool "REAL6410"
select CPU_S3C6410
select S3C_DEV_HSMMC
select S3C_DEV_HSMMC1
select S3C64XX_SETUP_SDHCI
select S3C_DEV_FB
select S3C64XX_SETUP_FB_24BPP
select S3C_DEV_NAND
select SAMSUNG_DEV_ADC
select SAMSUNG_DEV_TS
select S3C_DEV_USB_HOST
help
Machine support for the CoreWind REAL6410

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-s3c64xx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ obj-$(CONFIG_MACH_ANW6410) += mach-anw6410.o
obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o
obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o
obj-$(CONFIG_MACH_REAL6410) += mach-real6410.o
obj-$(CONFIG_MACH_MINI6410) += mach-mini6410.o
obj-$(CONFIG_MACH_NCP) += mach-ncp.o
obj-$(CONFIG_MACH_HMT) += mach-hmt.o
obj-$(CONFIG_MACH_SMARTQ) += mach-smartq.o
Expand Down
Loading

0 comments on commit f9cef50

Please sign in to comment.