Commit 51378066 authored by Olof Johansson's avatar Olof Johansson

Merge tag 'samsung-fixes-1' of...

Merge tag 'samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes

From Kukjin Kim:
Samsung fixes for v3.11
- fix kernel booting on exynos5440
  skip pm which is not supported
  update regarding LPAE features
- fix s3c2440 uart with adding clkdev entries
- fix compilatioin for Samsung SoCs with selecting pm
- update ARCH_NR_GPIO to support exynos4412 has more gpios

* tag 'samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: Update CONFIG_ARCH_NR_GPIO for Exynos
  ARM: EXYNOS: Fix low level debug support
  ARM: SAMSUNG: Save/restore only selected uart's registers
  ARM: SAMSUNG: Add SAMSUNG_PM config option to select pm
  ARM: S3C24XX: Add missing clkdev entries for s3c2440 UART
  ARM: EXYNOS: Enable 64-bit DMA for EXYNOS5440 if LPAE is enabled
  ARM: EXYNOS: change the PHYSMEM_BITS and SECTION_SIZE
  ARM: EXYNOS: skip pm support on exynos5440
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents f82a3133 53302bf6
...@@ -1600,8 +1600,7 @@ config LOCAL_TIMERS ...@@ -1600,8 +1600,7 @@ config LOCAL_TIMERS
config ARCH_NR_GPIO config ARCH_NR_GPIO
int int
default 1024 if ARCH_SHMOBILE || ARCH_TEGRA default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
default 512 if SOC_OMAP5 default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5
default 512 if ARCH_KEYSTONE
default 392 if ARCH_U8500 default 392 if ARCH_U8500
default 352 if ARCH_VT8500 default 352 if ARCH_VT8500
default 288 if ARCH_SUNXI default 288 if ARCH_SUNXI
......
...@@ -92,6 +92,7 @@ config SOC_EXYNOS5440 ...@@ -92,6 +92,7 @@ config SOC_EXYNOS5440
bool "SAMSUNG EXYNOS5440" bool "SAMSUNG EXYNOS5440"
default y default y
depends on ARCH_EXYNOS5 depends on ARCH_EXYNOS5
select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
select ARCH_HAS_OPP select ARCH_HAS_OPP
select HAVE_ARM_ARCH_TIMER select HAVE_ARM_ARCH_TIMER
select AUTO_ZRELADDR select AUTO_ZRELADDR
......
...@@ -14,7 +14,7 @@ obj- := ...@@ -14,7 +14,7 @@ obj- :=
obj-$(CONFIG_ARCH_EXYNOS) += common.o obj-$(CONFIG_ARCH_EXYNOS) += common.o
obj-$(CONFIG_PM) += pm.o obj-$(CONFIG_S5P_PM) += pm.o
obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o
......
...@@ -58,7 +58,6 @@ static const char name_exynos5440[] = "EXYNOS5440"; ...@@ -58,7 +58,6 @@ static const char name_exynos5440[] = "EXYNOS5440";
static void exynos4_map_io(void); static void exynos4_map_io(void);
static void exynos5_map_io(void); static void exynos5_map_io(void);
static void exynos5440_map_io(void);
static int exynos_init(void); static int exynos_init(void);
static struct cpu_table cpu_ids[] __initdata = { static struct cpu_table cpu_ids[] __initdata = {
...@@ -95,7 +94,6 @@ static struct cpu_table cpu_ids[] __initdata = { ...@@ -95,7 +94,6 @@ static struct cpu_table cpu_ids[] __initdata = {
}, { }, {
.idcode = EXYNOS5440_SOC_ID, .idcode = EXYNOS5440_SOC_ID,
.idmask = EXYNOS5_SOC_MASK, .idmask = EXYNOS5_SOC_MASK,
.map_io = exynos5440_map_io,
.init = exynos_init, .init = exynos_init,
.name = name_exynos5440, .name = name_exynos5440,
}, },
...@@ -149,11 +147,6 @@ static struct map_desc exynos4_iodesc[] __initdata = { ...@@ -149,11 +147,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
.pfn = __phys_to_pfn(EXYNOS4_PA_GIC_DIST), .pfn = __phys_to_pfn(EXYNOS4_PA_GIC_DIST),
.length = SZ_64K, .length = SZ_64K,
.type = MT_DEVICE, .type = MT_DEVICE,
}, {
.virtual = (unsigned long)S3C_VA_UART,
.pfn = __phys_to_pfn(EXYNOS4_PA_UART),
.length = SZ_512K,
.type = MT_DEVICE,
}, { }, {
.virtual = (unsigned long)S5P_VA_CMU, .virtual = (unsigned long)S5P_VA_CMU,
.pfn = __phys_to_pfn(EXYNOS4_PA_CMU), .pfn = __phys_to_pfn(EXYNOS4_PA_CMU),
...@@ -268,20 +261,6 @@ static struct map_desc exynos5_iodesc[] __initdata = { ...@@ -268,20 +261,6 @@ static struct map_desc exynos5_iodesc[] __initdata = {
.pfn = __phys_to_pfn(EXYNOS5_PA_PMU), .pfn = __phys_to_pfn(EXYNOS5_PA_PMU),
.length = SZ_64K, .length = SZ_64K,
.type = MT_DEVICE, .type = MT_DEVICE,
}, {
.virtual = (unsigned long)S3C_VA_UART,
.pfn = __phys_to_pfn(EXYNOS5_PA_UART),
.length = SZ_512K,
.type = MT_DEVICE,
},
};
static struct map_desc exynos5440_iodesc0[] __initdata = {
{
.virtual = (unsigned long)S3C_VA_UART,
.pfn = __phys_to_pfn(EXYNOS5440_PA_UART0),
.length = SZ_512K,
.type = MT_DEVICE,
}, },
}; };
...@@ -388,11 +367,6 @@ static void __init exynos5_map_io(void) ...@@ -388,11 +367,6 @@ static void __init exynos5_map_io(void)
iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc)); iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc));
} }
static void __init exynos5440_map_io(void)
{
iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0));
}
void __init exynos_init_time(void) void __init exynos_init_time(void)
{ {
of_clk_init(NULL); of_clk_init(NULL);
......
...@@ -97,6 +97,5 @@ struct exynos_pmu_conf { ...@@ -97,6 +97,5 @@ struct exynos_pmu_conf {
}; };
extern void exynos_sys_powerdown_conf(enum sys_powerdown mode); extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
extern void s3c_cpu_resume(void);
#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */ #endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <mach/regs-pmu.h> #include <mach/regs-pmu.h>
#include <plat/cpu.h> #include <plat/cpu.h>
#include <plat/pm.h>
#include "common.h" #include "common.h"
......
...@@ -15,8 +15,13 @@ ...@@ -15,8 +15,13 @@
#define PLAT_PHYS_OFFSET UL(0x40000000) #define PLAT_PHYS_OFFSET UL(0x40000000)
#ifndef CONFIG_ARM_LPAE
/* Maximum of 256MiB in one bank */ /* Maximum of 256MiB in one bank */
#define MAX_PHYSMEM_BITS 32 #define MAX_PHYSMEM_BITS 32
#define SECTION_SIZE_BITS 28 #define SECTION_SIZE_BITS 28
#else
#define MAX_PHYSMEM_BITS 36
#define SECTION_SIZE_BITS 31
#endif
#endif /* __ASM_ARCH_MEMORY_H */ #endif /* __ASM_ARCH_MEMORY_H */
...@@ -217,6 +217,9 @@ static __init int exynos_pm_drvinit(void) ...@@ -217,6 +217,9 @@ static __init int exynos_pm_drvinit(void)
struct clk *pll_base; struct clk *pll_base;
unsigned int tmp; unsigned int tmp;
if (soc_is_exynos5440())
return 0;
s3c_pm_init(); s3c_pm_init();
/* All wakeup disable */ /* All wakeup disable */
...@@ -340,6 +343,9 @@ static struct syscore_ops exynos_pm_syscore_ops = { ...@@ -340,6 +343,9 @@ static struct syscore_ops exynos_pm_syscore_ops = {
static __init int exynos_pm_syscore_init(void) static __init int exynos_pm_syscore_init(void)
{ {
if (soc_is_exynos5440())
return 0;
register_syscore_ops(&exynos_pm_syscore_ops); register_syscore_ops(&exynos_pm_syscore_ops);
return 0; return 0;
} }
......
...@@ -119,66 +119,101 @@ static struct clk init_clocks_off[] = { ...@@ -119,66 +119,101 @@ static struct clk init_clocks_off[] = {
} }
}; };
static struct clk init_clocks[] = { static struct clk clk_lcd = {
{ .name = "lcd",
.name = "lcd", .parent = &clk_h,
.parent = &clk_h, .enable = s3c2410_clkcon_enable,
.enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_LCDC,
.ctrlbit = S3C2410_CLKCON_LCDC, };
}, {
.name = "gpio", static struct clk clk_gpio = {
.parent = &clk_p, .name = "gpio",
.enable = s3c2410_clkcon_enable, .parent = &clk_p,
.ctrlbit = S3C2410_CLKCON_GPIO, .enable = s3c2410_clkcon_enable,
}, { .ctrlbit = S3C2410_CLKCON_GPIO,
.name = "usb-host", };
.parent = &clk_h,
.enable = s3c2410_clkcon_enable, static struct clk clk_usb_host = {
.ctrlbit = S3C2410_CLKCON_USBH, .name = "usb-host",
}, { .parent = &clk_h,
.name = "usb-device", .enable = s3c2410_clkcon_enable,
.parent = &clk_h, .ctrlbit = S3C2410_CLKCON_USBH,
.enable = s3c2410_clkcon_enable, };
.ctrlbit = S3C2410_CLKCON_USBD,
}, { static struct clk clk_usb_device = {
.name = "timers", .name = "usb-device",
.parent = &clk_p, .parent = &clk_h,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_PWMT, .ctrlbit = S3C2410_CLKCON_USBD,
}, { };
.name = "uart",
.devname = "s3c2410-uart.0", static struct clk clk_timers = {
.parent = &clk_p, .name = "timers",
.enable = s3c2410_clkcon_enable, .parent = &clk_p,
.ctrlbit = S3C2410_CLKCON_UART0, .enable = s3c2410_clkcon_enable,
}, { .ctrlbit = S3C2410_CLKCON_PWMT,
.name = "uart", };
.devname = "s3c2410-uart.1",
.parent = &clk_p, struct clk s3c24xx_clk_uart0 = {
.enable = s3c2410_clkcon_enable, .name = "uart",
.ctrlbit = S3C2410_CLKCON_UART1, .devname = "s3c2410-uart.0",
}, { .parent = &clk_p,
.name = "uart", .enable = s3c2410_clkcon_enable,
.devname = "s3c2410-uart.2", .ctrlbit = S3C2410_CLKCON_UART0,
.parent = &clk_p, };
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART2, struct clk s3c24xx_clk_uart1 = {
}, { .name = "uart",
.name = "rtc", .devname = "s3c2410-uart.1",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_RTC, .ctrlbit = S3C2410_CLKCON_UART1,
}, { };
.name = "watchdog",
.parent = &clk_p, struct clk s3c24xx_clk_uart2 = {
.ctrlbit = 0, .name = "uart",
}, { .devname = "s3c2410-uart.2",
.name = "usb-bus-host", .parent = &clk_p,
.parent = &clk_usb_bus, .enable = s3c2410_clkcon_enable,
}, { .ctrlbit = S3C2410_CLKCON_UART2,
.name = "usb-bus-gadget", };
.parent = &clk_usb_bus,
}, static struct clk clk_rtc = {
.name = "rtc",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_RTC,
};
static struct clk clk_watchdog = {
.name = "watchdog",
.parent = &clk_p,
.ctrlbit = 0,
};
static struct clk clk_usb_bus_host = {
.name = "usb-bus-host",
.parent = &clk_usb_bus,
};
static struct clk clk_usb_bus_gadget = {
.name = "usb-bus-gadget",
.parent = &clk_usb_bus,
};
static struct clk *init_clocks[] = {
&clk_lcd,
&clk_gpio,
&clk_usb_host,
&clk_usb_device,
&clk_timers,
&s3c24xx_clk_uart0,
&s3c24xx_clk_uart1,
&s3c24xx_clk_uart2,
&clk_rtc,
&clk_watchdog,
&clk_usb_bus_host,
&clk_usb_bus_gadget,
}; };
/* s3c2410_baseclk_add() /* s3c2410_baseclk_add()
...@@ -195,7 +230,6 @@ int __init s3c2410_baseclk_add(void) ...@@ -195,7 +230,6 @@ int __init s3c2410_baseclk_add(void)
{ {
unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW); unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
unsigned long clkcon = __raw_readl(S3C2410_CLKCON); unsigned long clkcon = __raw_readl(S3C2410_CLKCON);
struct clk *clkp;
struct clk *xtal; struct clk *xtal;
int ret; int ret;
int ptr; int ptr;
...@@ -207,8 +241,9 @@ int __init s3c2410_baseclk_add(void) ...@@ -207,8 +241,9 @@ int __init s3c2410_baseclk_add(void)
/* register clocks from clock array */ /* register clocks from clock array */
clkp = init_clocks; for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++) {
for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) { struct clk *clkp = init_clocks[ptr];
/* ensure that we note the clock state */ /* ensure that we note the clock state */
clkp->usage = clkcon & clkp->ctrlbit ? 1 : 0; clkp->usage = clkcon & clkp->ctrlbit ? 1 : 0;
......
...@@ -166,6 +166,9 @@ static struct clk_lookup s3c2440_clk_lookup[] = { ...@@ -166,6 +166,9 @@ static struct clk_lookup s3c2440_clk_lookup[] = {
CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk), CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk),
CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p),
CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n), CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n),
CLKDEV_INIT("s3c2440-uart.0", "uart", &s3c24xx_clk_uart0),
CLKDEV_INIT("s3c2440-uart.1", "uart", &s3c24xx_clk_uart1),
CLKDEV_INIT("s3c2440-uart.2", "uart", &s3c24xx_clk_uart2),
CLKDEV_INIT("s3c2440-camif", "camera", &s3c2440_clk_cam_upll), CLKDEV_INIT("s3c2440-camif", "camera", &s3c2440_clk_cam_upll),
}; };
......
...@@ -29,6 +29,13 @@ config PLAT_S5P ...@@ -29,6 +29,13 @@ config PLAT_S5P
help help
Base platform code for Samsung's S5P series SoC. Base platform code for Samsung's S5P series SoC.
config SAMSUNG_PM
bool
depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5P64X0 || S5P_PM)
default y
help
Base platform power management code for samsung code
if PLAT_SAMSUNG if PLAT_SAMSUNG
# boot configurations # boot configurations
......
...@@ -51,7 +51,7 @@ obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o ...@@ -51,7 +51,7 @@ obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o
# PM support # PM support
obj-$(CONFIG_PM) += pm.o obj-$(CONFIG_SAMSUNG_PM) += pm.o
obj-$(CONFIG_SAMSUNG_PM_GPIO) += pm-gpio.o obj-$(CONFIG_SAMSUNG_PM_GPIO) += pm-gpio.o
obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o
......
...@@ -83,6 +83,11 @@ extern struct clk clk_ext; ...@@ -83,6 +83,11 @@ extern struct clk clk_ext;
extern struct clksrc_clk clk_epllref; extern struct clksrc_clk clk_epllref;
extern struct clksrc_clk clk_esysclk; extern struct clksrc_clk clk_esysclk;
/* S3C24XX UART clocks */
extern struct clk s3c24xx_clk_uart0;
extern struct clk s3c24xx_clk_uart1;
extern struct clk s3c24xx_clk_uart2;
/* S3C64XX specific clocks */ /* S3C64XX specific clocks */
extern struct clk clk_h2; extern struct clk clk_h2;
extern struct clk clk_27m; extern struct clk clk_27m;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
struct device; struct device;
#ifdef CONFIG_PM #ifdef CONFIG_SAMSUNG_PM
extern __init int s3c_pm_init(void); extern __init int s3c_pm_init(void);
extern __init int s3c64xx_pm_init(void); extern __init int s3c64xx_pm_init(void);
...@@ -58,8 +58,6 @@ extern unsigned char pm_uart_udivslot; /* true to save UART UDIVSLOT */ ...@@ -58,8 +58,6 @@ extern unsigned char pm_uart_udivslot; /* true to save UART UDIVSLOT */
/* from sleep.S */ /* from sleep.S */
extern void s3c_cpu_resume(void);
extern int s3c2410_cpu_suspend(unsigned long); extern int s3c2410_cpu_suspend(unsigned long);
/* sleep save info */ /* sleep save info */
...@@ -106,12 +104,14 @@ extern void s3c_pm_do_save(struct sleep_save *ptr, int count); ...@@ -106,12 +104,14 @@ extern void s3c_pm_do_save(struct sleep_save *ptr, int count);
extern void s3c_pm_do_restore(struct sleep_save *ptr, int count); extern void s3c_pm_do_restore(struct sleep_save *ptr, int count);
extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count); extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count);
#ifdef CONFIG_PM #ifdef CONFIG_SAMSUNG_PM
extern int s3c_irq_wake(struct irq_data *data, unsigned int state); extern int s3c_irq_wake(struct irq_data *data, unsigned int state);
extern int s3c_irqext_wake(struct irq_data *data, unsigned int state); extern int s3c_irqext_wake(struct irq_data *data, unsigned int state);
extern void s3c_cpu_resume(void);
#else #else
#define s3c_irq_wake NULL #define s3c_irq_wake NULL
#define s3c_irqext_wake NULL #define s3c_irqext_wake NULL
#define s3c_cpu_resume NULL
#endif #endif
/* PM debug functions */ /* PM debug functions */
......
...@@ -80,7 +80,7 @@ unsigned char pm_uart_udivslot; ...@@ -80,7 +80,7 @@ unsigned char pm_uart_udivslot;
#ifdef CONFIG_SAMSUNG_PM_DEBUG #ifdef CONFIG_SAMSUNG_PM_DEBUG
static struct pm_uart_save uart_save[CONFIG_SERIAL_SAMSUNG_UARTS]; static struct pm_uart_save uart_save;
static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save)
{ {
...@@ -101,11 +101,7 @@ static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) ...@@ -101,11 +101,7 @@ static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save)
static void s3c_pm_save_uarts(void) static void s3c_pm_save_uarts(void)
{ {
struct pm_uart_save *save = uart_save; s3c_pm_save_uart(CONFIG_DEBUG_S3C_UART, &uart_save);
unsigned int uart;
for (uart = 0; uart < CONFIG_SERIAL_SAMSUNG_UARTS; uart++, save++)
s3c_pm_save_uart(uart, save);
} }
static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save) static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save)
...@@ -126,11 +122,7 @@ static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save) ...@@ -126,11 +122,7 @@ static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save)
static void s3c_pm_restore_uarts(void) static void s3c_pm_restore_uarts(void)
{ {
struct pm_uart_save *save = uart_save; s3c_pm_restore_uart(CONFIG_DEBUG_S3C_UART, &uart_save);
unsigned int uart;
for (uart = 0; uart < CONFIG_SERIAL_SAMSUNG_UARTS; uart++, save++)
s3c_pm_restore_uart(uart, save);
} }
#else #else
static void s3c_pm_save_uarts(void) { } static void s3c_pm_save_uarts(void) { }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment