Commit 465c335b authored by Olof Johansson's avatar Olof Johansson

Merge tag 'samsung-soc-s3c-5.10' of...

Merge tag 'samsung-soc-s3c-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc

Samsung S3C24xx and S3C64xx machine code cleanup for v5.10

Big cleanup for the Samsung S3C24xx and S3C64xx platforms, although it
also touches files shared with S5Pv210 and Exynos.  This is mostly Arnd
Bergmann work which Krzysztof Kozlowski took over, rebased and polished.

The goal is to cleanup, merge and finally make the Samsung S3C24xx and
S3C64xx architectures multiplatform.  The multiplatform did not happen
yet here - just cleaning up and merging into one arch/arm/mach-s3c
directory.  However this is step forward for multiplatform or at least
to keep this code still maintainable.

This pulls also branch with changes for Samsung SoC sound drivers from
broonie/sound because the cleanups there were part of this series and
all further patches depend on them.

* tag 'samsung-soc-s3c-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (62 commits)
  ARM: s3c: Avoid naming clash of S3C24xx and S3C64xx timer setup
  ARM: s3c: Cleanup from old plat-samsung include
  ARM: s3c: make headers local if possible
  ARM: s3c: move into a common directory
  ARM: s3c24xx: stop including mach/hardware.h from mach/io.h
  cpufreq: s3c24xx: move low-level clk reg access into platform code
  cpufreq: s3c2412: use global s3c2412_cpufreq_setrefresh
  ARM: s3c: remove cpufreq header dependencies
  cpufreq: s3c24xx: split out registers
  fbdev: s3c2410fb: remove mach header dependency
  ARM: s3c24xx: bast: avoid irq_desc array usage
  ARM: s3c24xx: spi: avoid hardcoding fiq number in driver
  ARM: s3c24xx: include mach/irqs.h where needed
  ARM: s3c24xx: move s3cmci pinctrl handling into board files
  ARM: s3c24xx: move iis pinctrl config into boards
  ARM: s3c24xx: move spi fiq handler into platform
  ARM: s3c: adc: move header to linux/soc/samsung
  ARM: s3c24xx: move irqchip driver back into platform
  ARM: s3c24xx: move regs-spi.h into spi driver
  ARM: s3c64xx: remove mach/hardware.h
  ...

Link: https://lore.kernel.org/r/20200831154751.7551-1-krzk@kernel.orgSigned-off-by: default avatarOlof Johansson <olof@lixom.net>
parents f75aef39 a1342f6a
......@@ -2220,8 +2220,8 @@ ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT
L: openmoko-kernel@lists.openmoko.org (subscribers-only)
S: Orphan
W: http://wiki.openmoko.org/wiki/Neo_FreeRunner
F: arch/arm/mach-s3c24xx/gta02.h
F: arch/arm/mach-s3c24xx/mach-gta02.c
F: arch/arm/mach-s3c/gta02.h
F: arch/arm/mach-s3c/mach-gta02.c
ARM/Orion SoC/Technologic Systems TS-78xx platform support
M: Alexander Clouter <alex@digriz.org.uk>
......@@ -2410,10 +2410,8 @@ F: arch/arm/boot/dts/exynos*
F: arch/arm/boot/dts/s3c*
F: arch/arm/boot/dts/s5p*
F: arch/arm/mach-exynos*/
F: arch/arm/mach-s3c24*/
F: arch/arm/mach-s3c64xx/
F: arch/arm/mach-s3c/
F: arch/arm/mach-s5p*/
F: arch/arm/plat-samsung/
F: arch/arm64/boot/dts/exynos/
F: drivers/*/*/*s3c24*
F: drivers/*/*s3c24*
......@@ -2424,6 +2422,9 @@ F: drivers/soc/samsung/
F: drivers/tty/serial/samsung*
F: include/linux/soc/samsung/
N: exynos
N: s3c2410
N: s3c64xx
N: s5pv210
ARM/SAMSUNG MOBILE MACHINE SUPPORT
M: Kyungmin Park <kyungmin.park@samsung.com>
......@@ -15302,6 +15303,8 @@ F: Documentation/devicetree/bindings/clock/samsung,s3c*
F: Documentation/devicetree/bindings/clock/samsung,s5p*
F: drivers/clk/samsung/
F: include/dt-bindings/clock/exynos*.h
F: include/linux/clk/samsung.h
F: include/linux/platform_data/clk-s3c2410.h
SAMSUNG SPI DRIVERS
M: Kukjin Kim <kgene@kernel.org>
......@@ -15313,6 +15316,7 @@ S: Maintained
F: Documentation/devicetree/bindings/spi/spi-samsung.txt
F: drivers/spi/spi-s3c*
F: include/linux/platform_data/spi-s3c64xx.h
F: include/linux/spi/s3c24xx-fiq.h
SAMSUNG SXGBE DRIVERS
M: Byungho An <bh74.an@samsung.com>
......@@ -15826,19 +15830,17 @@ F: drivers/video/fbdev/simplefb.c
F: include/linux/platform_data/simplefb.h
SIMTEC EB110ATX (Chalice CATS)
M: Vincent Sanders <vince@simtec.co.uk>
M: Simtec Linux Team <linux@simtec.co.uk>
S: Supported
W: http://www.simtec.co.uk/products/EB110ATX/
SIMTEC EB2410ITX (BAST)
M: Vincent Sanders <vince@simtec.co.uk>
M: Simtec Linux Team <linux@simtec.co.uk>
S: Supported
W: http://www.simtec.co.uk/products/EB2410ITX/
F: arch/arm/mach-s3c24xx/bast-ide.c
F: arch/arm/mach-s3c24xx/bast-irq.c
F: arch/arm/mach-s3c24xx/mach-bast.c
F: arch/arm/mach-s3c/bast-ide.c
F: arch/arm/mach-s3c/bast-irq.c
F: arch/arm/mach-s3c/mach-bast.c
SIOX
M: Thorsten Scherer <t.scherer@eckelmann.de>
......@@ -18757,7 +18759,7 @@ F: Documentation/devicetree/bindings/mfd/wm831x.txt
F: Documentation/devicetree/bindings/regulator/wlf,arizona.yaml
F: Documentation/devicetree/bindings/sound/wlf,arizona.yaml
F: Documentation/hwmon/wm83??.rst
F: arch/arm/mach-s3c64xx/mach-crag6410*
F: arch/arm/mach-s3c/mach-crag6410*
F: drivers/clk/clk-wm83*.c
F: drivers/extcon/extcon-arizona.c
F: drivers/gpio/gpio-*wm*.c
......
......@@ -503,11 +503,12 @@ config ARCH_S3C24XX
select GPIOLIB
select GENERIC_IRQ_MULTI_HANDLER
select HAVE_S3C2410_I2C if I2C
select HAVE_S3C2410_WATCHDOG if WATCHDOG
select HAVE_S3C_RTC if RTC_CLASS
select NEED_MACH_IO_H
select S3C2410_WATCHDOG
select SAMSUNG_ATAGS
select USE_OF
select WATCHDOG
help
Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
and S3C2450 SoCs based systems, such as the Simtec Electronics BAST
......@@ -636,7 +637,6 @@ source "arch/arm/mach-dove/Kconfig"
source "arch/arm/mach-ep93xx/Kconfig"
source "arch/arm/mach-exynos/Kconfig"
source "arch/arm/plat-samsung/Kconfig"
source "arch/arm/mach-footbridge/Kconfig"
......@@ -709,9 +709,7 @@ source "arch/arm/mach-realview/Kconfig"
source "arch/arm/mach-rockchip/Kconfig"
source "arch/arm/mach-s3c24xx/Kconfig"
source "arch/arm/mach-s3c64xx/Kconfig"
source "arch/arm/mach-s3c/Kconfig"
source "arch/arm/mach-s5pv210/Kconfig"
......
......@@ -1005,7 +1005,7 @@ choice
via SCIFA4 on Renesas SH-Mobile AG5 (SH73A0).
config DEBUG_S3C_UART0
depends on PLAT_SAMSUNG
depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
select DEBUG_EXYNOS_UART if ARCH_EXYNOS
select DEBUG_S3C24XX_UART if ARCH_S3C24XX
select DEBUG_S3C64XX_UART if ARCH_S3C64XX
......@@ -1017,7 +1017,7 @@ choice
by the boot-loader before use.
config DEBUG_S3C_UART1
depends on PLAT_SAMSUNG
depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
select DEBUG_EXYNOS_UART if ARCH_EXYNOS
select DEBUG_S3C24XX_UART if ARCH_S3C24XX
select DEBUG_S3C64XX_UART if ARCH_S3C64XX
......@@ -1029,7 +1029,7 @@ choice
by the boot-loader before use.
config DEBUG_S3C_UART2
depends on PLAT_SAMSUNG
depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
select DEBUG_EXYNOS_UART if ARCH_EXYNOS
select DEBUG_S3C24XX_UART if ARCH_S3C24XX
select DEBUG_S3C64XX_UART if ARCH_S3C64XX
......@@ -1041,7 +1041,7 @@ choice
by the boot-loader before use.
config DEBUG_S3C_UART3
depends on PLAT_SAMSUNG && (ARCH_EXYNOS || ARCH_S5PV210)
depends on ARCH_EXYNOS || ARCH_S5PV210
select DEBUG_EXYNOS_UART if ARCH_EXYNOS
select DEBUG_S3C64XX_UART if ARCH_S3C64XX
select DEBUG_S5PV210_UART if ARCH_S5PV210
......@@ -1497,6 +1497,16 @@ config DEBUG_S3C64XX_UART
config DEBUG_S5PV210_UART
bool
config DEBUG_S3C_UART
depends on DEBUG_S3C2410_UART || DEBUG_S3C24XX_UART || \
DEBUG_S3C64XX_UART || DEBUG_S5PV210_UART || \
DEBUG_EXYNOS_UART
int
default "0" if DEBUG_S3C_UART0
default "1" if DEBUG_S3C_UART1
default "2" if DEBUG_S3C_UART2
default "3" if DEBUG_S3C_UART3
config DEBUG_OMAP2PLUS_UART
bool
depends on ARCH_OMAP2PLUS
......
......@@ -209,8 +209,7 @@ machine-$(CONFIG_ARCH_REALTEK) += realtek
machine-$(CONFIG_ARCH_REALVIEW) += realview
machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
machine-$(CONFIG_ARCH_RPC) += rpc
machine-$(CONFIG_ARCH_S3C24XX) += s3c24xx
machine-$(CONFIG_ARCH_S3C64XX) += s3c64xx
machine-$(CONFIG_PLAT_SAMSUNG) += s3c
machine-$(CONFIG_ARCH_S5PV210) += s5pv210
machine-$(CONFIG_ARCH_SA1100) += sa1100
machine-$(CONFIG_ARCH_RENESAS) += shmobile
......@@ -232,13 +231,9 @@ machine-$(CONFIG_PLAT_SPEAR) += spear
# Platform directory name. This list is sorted alphanumerically
# by CONFIG_* macro name.
plat-$(CONFIG_ARCH_EXYNOS) += samsung
plat-$(CONFIG_ARCH_OMAP) += omap
plat-$(CONFIG_ARCH_S3C64XX) += samsung
plat-$(CONFIG_ARCH_S5PV210) += samsung
plat-$(CONFIG_PLAT_ORION) += orion
plat-$(CONFIG_PLAT_PXA) += pxa
plat-$(CONFIG_PLAT_S3C24XX) += samsung
plat-$(CONFIG_PLAT_VERSATILE) += versatile
ifeq ($(CONFIG_ARCH_EBSA110),y)
......
......@@ -24,7 +24,6 @@ menuconfig ARCH_EXYNOS
select HAVE_ARM_ARCH_TIMER if ARCH_EXYNOS5
select HAVE_ARM_SCU if SMP
select HAVE_S3C2410_I2C if I2C
select HAVE_S3C2410_WATCHDOG if WATCHDOG
select HAVE_S3C_RTC if RTC_CLASS
select PINCTRL
select PINCTRL_EXYNOS
......
......@@ -3,10 +3,6 @@
# Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
# http://www.samsung.com/
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
# Core
obj-$(CONFIG_ARCH_EXYNOS) += exynos.o exynos-smc.o firmware.o
obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o sleep.o
......
......@@ -24,12 +24,12 @@
#define EXYNOS5800_SOC_ID 0xE5422000
#define EXYNOS5_SOC_MASK 0xFFFFF000
extern unsigned long samsung_cpu_id;
extern unsigned long exynos_cpu_id;
#define IS_SAMSUNG_CPU(name, id, mask) \
static inline int is_samsung_##name(void) \
{ \
return ((samsung_cpu_id & mask) == (id & mask)); \
return ((exynos_cpu_id & mask) == (id & mask)); \
}
IS_SAMSUNG_CPU(exynos3250, EXYNOS3250_SOC_ID, EXYNOS3_SOC_MASK)
......@@ -147,7 +147,7 @@ extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data;
extern void exynos_set_delayed_reset_assertion(bool enable);
extern unsigned int samsung_rev(void);
extern unsigned int exynos_rev(void);
extern void exynos_core_restart(u32 core_id);
extern int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr);
extern int exynos_get_boot_addr(u32 core_id, unsigned long *boot_addr);
......
......@@ -19,11 +19,12 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <mach/map.h>
#include <plat/cpu.h>
#include "common.h"
#define S3C_ADDR_BASE 0xF6000000
#define S3C_ADDR(x) ((void __iomem __force *)S3C_ADDR_BASE + (x))
#define S5P_VA_CHIPID S3C_ADDR(0x02000000)
static struct platform_device exynos_cpuidle = {
.name = "exynos_cpuidle",
#ifdef CONFIG_ARM_EXYNOS_CPUIDLE
......@@ -36,6 +37,14 @@ void __iomem *sysram_base_addr __ro_after_init;
phys_addr_t sysram_base_phys __ro_after_init;
void __iomem *sysram_ns_base_addr __ro_after_init;
unsigned long exynos_cpu_id;
static unsigned int exynos_cpu_rev;
unsigned int exynos_rev(void)
{
return exynos_cpu_rev;
}
void __init exynos_sysram_init(void)
{
struct device_node *node;
......@@ -86,7 +95,11 @@ static void __init exynos_init_io(void)
of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
/* detect cpu id and rev. */
s5p_init_cpu(S5P_VA_CHIPID);
exynos_cpu_id = readl_relaxed(S5P_VA_CHIPID);
exynos_cpu_rev = exynos_cpu_id & 0xFF;
pr_info("Samsung CPU ID: 0x%08lx\n", exynos_cpu_id);
}
/*
......
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* Exynos - Memory map definitions
*/
#ifndef __ASM_ARCH_MAP_H
#define __ASM_ARCH_MAP_H __FILE__
#include <plat/map-base.h>
#include <plat/map-s5p.h>
#define EXYNOS_PA_CHIPID 0x10000000
#endif /* __ASM_ARCH_MAP_H */
......@@ -22,8 +22,6 @@
#include <asm/smp_scu.h>
#include <asm/firmware.h>
#include <mach/map.h>
#include "common.h"
extern void exynos4_secondary_startup(void);
......@@ -188,7 +186,7 @@ void exynos_scu_enable(void)
static void __iomem *cpu_boot_reg_base(void)
{
if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1)
if (soc_is_exynos4210() && exynos_rev() == EXYNOS4210_REV_1_1)
return pmu_base_addr + S5P_INFORM5;
return sysram_base_addr;
}
......
......@@ -26,18 +26,18 @@
static inline void __iomem *exynos_boot_vector_addr(void)
{
if (samsung_rev() == EXYNOS4210_REV_1_1)
if (exynos_rev() == EXYNOS4210_REV_1_1)
return pmu_base_addr + S5P_INFORM7;
else if (samsung_rev() == EXYNOS4210_REV_1_0)
else if (exynos_rev() == EXYNOS4210_REV_1_0)
return sysram_base_addr + 0x24;
return pmu_base_addr + S5P_INFORM0;
}
static inline void __iomem *exynos_boot_vector_flag(void)
{
if (samsung_rev() == EXYNOS4210_REV_1_1)
if (exynos_rev() == EXYNOS4210_REV_1_1)
return pmu_base_addr + S5P_INFORM6;
else if (samsung_rev() == EXYNOS4210_REV_1_0)
else if (exynos_rev() == EXYNOS4210_REV_1_0)
return sysram_base_addr + 0x20;
return pmu_base_addr + S5P_INFORM1;
}
......
......@@ -2,12 +2,16 @@
#
# Copyright 2009 Simtec Electronics
source "arch/arm/mach-s3c/Kconfig.s3c24xx"
source "arch/arm/mach-s3c/Kconfig.s3c64xx"
config PLAT_SAMSUNG
bool
depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_EXYNOS || ARCH_S5PV210
depends on PLAT_S3C24XX || ARCH_S3C64XX
default y
select GENERIC_IRQ_CHIP
select NO_IOPORT_MAP
select SOC_SAMSUNG
help
Base platform code for all Samsung SoC based systems
......@@ -154,7 +158,7 @@ config S3C_DEV_WDT
bool
default y if ARCH_S3C24XX
help
Complie in platform device definition for Watchdog Timer
Compile in platform device definition for Watchdog Timer
config S3C_DEV_NAND
bool
......@@ -169,7 +173,7 @@ config S3C_DEV_ONENAND
config S3C_DEV_RTC
bool
help
Complie in platform device definition for RTC
Compile in platform device definition for RTC
config SAMSUNG_DEV_ADC
bool
......@@ -234,54 +238,6 @@ config SAMSUNG_PM_GPIO
pinctrl-samsung driver.
endif
comment "Power management"
config SAMSUNG_PM_DEBUG
bool "Samsung PM Suspend debug"
depends on PM && DEBUG_KERNEL
depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
depends on DEBUG_EXYNOS_UART || DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
help
Say Y here if you want verbose debugging from the PM Suspend and
Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
for more information.
config S3C_PM_DEBUG_LED_SMDK
bool "SMDK LED suspend/resume debugging"
depends on PM && (MACH_SMDK6410)
help
Say Y here to enable the use of the SMDK LEDs on the baseboard
for debugging of the state of the suspend and resume process.
Note, this currently only works for S3C64XX based SMDK boards.
config SAMSUNG_PM_CHECK
bool "S3C2410 PM Suspend Memory CRC"
depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210)
select CRC32
help
Enable the PM code's memory area checksum over sleep. This option
will generate CRCs of all blocks of memory, and store them before
going to sleep. The blocks are then checked on resume for any
errors.
Note, this can take several seconds depending on memory size
and CPU speed.
See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
config SAMSUNG_PM_CHECK_CHUNKSIZE
int "S3C2410 PM Suspend CRC Chunksize (KiB)"
depends on PM && SAMSUNG_PM_CHECK
default 64
help
Set the chunksize in Kilobytes of the CRC for checking memory
corruption over suspend and resume. A smaller value will mean that
the CRC data block will take more memory, but will identify any
faults with better precision.
See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
config SAMSUNG_WAKEMASK
bool
depends on PM
......@@ -290,19 +246,5 @@ config SAMSUNG_WAKEMASK
and above. This code allows a set of interrupt to wakeup-mask
mappings. See <plat/wakeup-mask.h>
config SAMSUNG_WDT_RESET
bool
help
Compile support for system restart by triggering watchdog reset.
Used on SoCs that do not provide dedicated reset control.
config DEBUG_S3C_UART
depends on PLAT_SAMSUNG
int
default "0" if DEBUG_S3C_UART0
default "1" if DEBUG_S3C_UART1
default "2" if DEBUG_S3C_UART2
default "3" if DEBUG_S3C_UART3
endmenu
endif
......@@ -123,11 +123,6 @@ 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
......@@ -137,13 +132,6 @@ config S3C2410_IOTIMING
Internal node to select io timing code that is common to the s3c2410
and s3c2440/s3c2442 cpu frequency support.
config S3C2410_CPUFREQ_UTILS
bool
depends on ARM_S3C24XX_CPUFREQ
help
Internal node to select timing code that is common to the s3c2410
and s3c2440/s3c244 cpu frequency support.
# cpu frequency support common to s3c2412, s3c2413 and s3c2442
config S3C2412_IOTIMING
......@@ -468,7 +456,6 @@ config MACH_MINI2440
select NEW_LEDS
select S3C_DEV_NAND
select S3C_DEV_USB_HOST
select S3C_SETUP_CAMIF
help
Say Y here to select support for the MINI2440. Is a 10cm x 10cm board
available via various sources. It can come with a 3.5" or 7" touch LCD.
......
......@@ -13,15 +13,15 @@ menuconfig ARCH_S3C64XX
select GPIO_SAMSUNG if ATAGS
select GPIOLIB
select HAVE_S3C2410_I2C if I2C
select HAVE_S3C2410_WATCHDOG if WATCHDOG
select HAVE_TCM
select PLAT_SAMSUNG
select PM_GENERIC_DOMAINS if PM
select S3C_DEV_NAND if ATAGS
select S3C_GPIO_TRACK if ATAGS
select S3C2410_WATCHDOG
select SAMSUNG_ATAGS if ATAGS
select SAMSUNG_WAKEMASK if PM
select SAMSUNG_WDT_RESET
select WATCHDOG
help
Samsung S3C64XX series based systems
......@@ -165,7 +165,6 @@ config MACH_SMDK6410
bool "SMDK6410"
depends on ATAGS
select CPU_S3C6410
select HAVE_S3C2410_WATCHDOG if WATCHDOG
select S3C64XX_SETUP_FB_24BPP
select S3C64XX_SETUP_I2C1
select S3C64XX_SETUP_IDE
......
......@@ -2,9 +2,16 @@
#
# Copyright 2009 Simtec Electronics
ccflags-$(CONFIG_ARCH_S3C64XX) := -I$(srctree)/arch/arm/mach-s3c64xx/include
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include
ifdef CONFIG_ARCH_S3C24XX
include $(src)/Makefile.s3c24xx
endif
ifdef CONFIG_ARCH_S3C64XX
include $(src)/Makefile.s3c64xx
endif
# Objects we always build independent of SoC choice
obj-y += init.o cpu.o
......@@ -24,12 +31,7 @@ obj-$(CONFIG_GPIO_SAMSUNG) += gpio-samsung.o
# PM support
obj-$(CONFIG_PM_SLEEP) += pm-common.o
obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm-common.o
obj-$(CONFIG_SAMSUNG_PM) += pm.o
obj-$(CONFIG_SAMSUNG_PM) += pm.o pm-common.o
obj-$(CONFIG_SAMSUNG_PM_GPIO) += pm-gpio.o
obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o
obj-$(CONFIG_SAMSUNG_PM_DEBUG) += pm-debug.o
obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o
obj-$(CONFIG_SAMSUNG_WDT_RESET) += watchdog-reset.o
......@@ -7,7 +7,10 @@
# core
obj-y += common.o
obj-y += s3c24xx.o
obj-y += irq-s3c24xx.o
obj-$(CONFIG_SPI_S3C24XX_FIQ) += irq-s3c24xx-fiq.o
obj-$(CONFIG_SPI_S3C24XX_FIQ) += irq-s3c24xx-fiq-exports.o
obj-$(CONFIG_CPU_S3C2410) += s3c2410.o
obj-$(CONFIG_S3C2410_PLL) += pll-s3c2410.o
......@@ -30,12 +33,12 @@ obj-$(CONFIG_CPU_S3C2443) += s3c2443.o
# PM
obj-$(CONFIG_PM) += pm.o
obj-$(CONFIG_PM_SLEEP) += irq-pm.o sleep.o
obj-$(CONFIG_PM) += pm-s3c24xx.o
obj-$(CONFIG_PM_SLEEP) += irq-pm-s3c24xx.o sleep-s3c24xx.o
# common code
obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += cpufreq-utils.o
obj-$(CONFIG_ARM_S3C24XX_CPUFREQ) += cpufreq-utils-s3c24xx.o
obj-$(CONFIG_S3C2410_IOTIMING) += iotiming-s3c2410.o
obj-$(CONFIG_S3C2412_IOTIMING) += iotiming-s3c2412.o
......@@ -80,7 +83,7 @@ obj-$(CONFIG_MACH_SMDK2443) += mach-smdk2443.o
# common bits of machine support
obj-$(CONFIG_S3C24XX_SMDK) += common-smdk.o
obj-$(CONFIG_S3C24XX_SMDK) += common-smdk-s3c24xx.o
obj-$(CONFIG_S3C24XX_SIMTEC_AUDIO) += simtec-audio.o
obj-$(CONFIG_S3C24XX_SIMTEC_NOR) += simtec-nor.o
obj-$(CONFIG_S3C24XX_SIMTEC_PM) += simtec-pm.o
......@@ -93,8 +96,7 @@ obj-$(CONFIG_MACH_OSIRIS_DVS) += mach-osiris-dvs.o
# device setup
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
obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO) += setup-sdhci-gpio-s3c24xx.o
obj-$(CONFIG_S3C2443_SETUP_SPI) += setup-spi-s3c24xx.o
obj-$(CONFIG_ARCH_S3C24XX) += setup-i2c-s3c24xx.o
obj-$(CONFIG_S3C24XX_SETUP_TS) += setup-ts-s3c24xx.o
......@@ -3,22 +3,22 @@
# Copyright 2008 Openmoko, Inc.
# Copyright 2008 Simtec Electronics
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
asflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
asflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
# PM
obj-$(CONFIG_PM) += pm.o
obj-$(CONFIG_PM_SLEEP) += sleep.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
obj-$(CONFIG_PM) += pm-s3c64xx.o
obj-$(CONFIG_PM_SLEEP) += sleep-s3c64xx.o
obj-$(CONFIG_CPU_IDLE) += cpuidle-s3c64xx.o
ifdef CONFIG_SAMSUNG_ATAGS
obj-$(CONFIG_PM_SLEEP) += irq-pm.o
obj-$(CONFIG_PM_SLEEP) += irq-pm-s3c64xx.o
# Core
obj-y += common.o
obj-y += s3c64xx.o
obj-$(CONFIG_CPU_S3C6400) += s3c6400.o
obj-$(CONFIG_CPU_S3C6410) += s3c6410.o
......@@ -28,21 +28,21 @@ obj-$(CONFIG_S3C64XX_PL080) += pl080.o
# Device support
obj-y += dev-uart.o
obj-y += dev-audio.o
obj-y += dev-uart-s3c64xx.o
obj-y += dev-audio-s3c64xx.o
# Device setup
obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o
obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o
obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o
obj-$(CONFIG_S3C64XX_SETUP_IDE) += setup-ide.o
obj-$(CONFIG_S3C64XX_SETUP_KEYPAD) += setup-keypad.o
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_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp-s3c64xx.o
obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0-s3c64xx.o
obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1-s3c64xx.o
obj-$(CONFIG_S3C64XX_SETUP_IDE) += setup-ide-s3c64xx.o
obj-$(CONFIG_S3C64XX_SETUP_KEYPAD) += setup-keypad-s3c64xx.o
obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio-s3c64xx.o
obj-$(CONFIG_S3C64XX_SETUP_SPI) += setup-spi-s3c64xx.o
obj-$(CONFIG_S3C64XX_SETUP_USB_PHY) += setup-usb-phy-s3c64xx.o
obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o
obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight-s3c64xx.o
# Machine support
......
......@@ -19,8 +19,8 @@
#include <linux/io.h>
#include <linux/regulator/consumer.h>
#include <plat/regs-adc.h>
#include <plat/adc.h>
#include "regs-adc.h"
#include <linux/soc/samsung/s3c-adc.h>
/* This driver is designed to control the usage of the ADC block between
* the touchscreen and any other drivers that may need to use it, such as
......
......@@ -6,8 +6,8 @@
* Samsung CF-ATA Controller core functions
*/
#ifndef __ASM_PLAT_ATA_CORE_H
#define __ASM_PLAT_ATA_CORE_H __FILE__
#ifndef __ASM_PLAT_ATA_CORE_S3C64XX_H
#define __ASM_PLAT_ATA_CORE_S3C64XX_H __FILE__
/* These functions are only for use with the core support code, such as
* the cpu specific initialisation code
......@@ -21,4 +21,4 @@ static inline void s3c_cfcon_setname(char *name)
#endif
}
#endif /* __ASM_PLAT_ATA_CORE_H */
#endif /* __ASM_PLAT_ATA_CORE_S3C64XX_H */
......@@ -4,8 +4,8 @@
* http://www.samsung.com
*/
#ifndef __ASM_PLAT_BACKLIGHT_H
#define __ASM_PLAT_BACKLIGHT_H __FILE__
#ifndef __ASM_PLAT_BACKLIGHT_S3C64XX_H
#define __ASM_PLAT_BACKLIGHT_S3C64XX_H __FILE__
/* samsung_bl_gpio_info - GPIO info for PWM Backlight control
* @no: GPIO number for PWM timer out
......@@ -19,4 +19,4 @@ struct samsung_bl_gpio_info {
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 */
#endif /* __ASM_PLAT_BACKLIGHT_S3C64XX_H */
......@@ -19,7 +19,8 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <mach/map.h>
#include "map.h"
#include <mach/irqs.h>
#include "bast.h"
......
......@@ -15,8 +15,8 @@
#include <asm/mach-types.h>
#include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/regs-irq.h>
#include "regs-irq.h"
#include <mach/irqs.h>
#include "bast.h"
......@@ -62,7 +62,7 @@ bast_pc104_mask(struct irq_data *data)
static void
bast_pc104_maskack(struct irq_data *data)
{
struct irq_desc *desc = irq_desc + BAST_IRQ_ISA;
struct irq_desc *desc = irq_to_desc(BAST_IRQ_ISA);
bast_pc104_mask(data);
desc->irq_data.chip->irq_ack(&desc->irq_data);
......@@ -94,8 +94,6 @@ static void bast_irq_pc104_demux(struct irq_desc *desc)
if (unlikely(stat == 0)) {
/* ack if we get an irq with nothing (ie, startup) */
desc = irq_desc + BAST_IRQ_ISA;
desc->irq_data.chip->irq_ack(&desc->irq_data);
} else {
/* handle the IRQ */
......
......@@ -29,19 +29,18 @@
#include <asm/mach/irq.h>
#include <asm/mach-types.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <mach/regs-gpio.h>
#include <mach/gpio-samsung.h>
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <linux/platform_data/leds-s3c24xx.h>
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <plat/gpio-cfg.h>
#include <plat/devs.h>
#include <plat/pm.h>
#include "gpio-cfg.h"
#include "devs.h"
#include "pm.h"
#include "common-smdk.h"
#include "common-smdk-s3c24xx.h"
/* LED devices */
......
......@@ -10,17 +10,10 @@
#include <linux/init.h>
#include <linux/io.h>
#include <plat/map-base.h>
#include <plat/cpu.h>
#include <mach/map-base.h>
#include "cpu.h"
unsigned long samsung_cpu_id;
static unsigned int samsung_cpu_rev;
unsigned int samsung_rev(void)
{
return samsung_cpu_rev;
}
EXPORT_SYMBOL(samsung_rev);
void __init s3c64xx_init_cpu(void)
{
......@@ -34,15 +27,5 @@ void __init s3c64xx_init_cpu(void)
samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0xA1C);
}
samsung_cpu_rev = 0;
pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id);
}
void __init s5p_init_cpu(const void __iomem *cpuid_addr)
{
samsung_cpu_id = readl_relaxed(cpuid_addr);
samsung_cpu_rev = samsung_cpu_id & 0xFF;
pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id);
}
......@@ -109,9 +109,6 @@ extern void s3c_init_cpu(unsigned long idcode,
extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
extern void s3c64xx_init_cpu(void);
extern void s5p_init_cpu(const void __iomem *cpuid_addr);
extern unsigned int samsung_rev(void);
extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
......@@ -126,15 +123,6 @@ extern struct syscore_ops s3c2412_pm_syscore_ops;
extern struct syscore_ops s3c2416_pm_syscore_ops;
extern struct syscore_ops s3c244x_pm_syscore_ops;
/* system device subsystems */
extern struct bus_type s3c2410_subsys;
extern struct bus_type s3c2410a_subsys;
extern struct bus_type s3c2412_subsys;
extern struct bus_type s3c2416_subsys;
extern struct bus_type s3c2440_subsys;
extern struct bus_type s3c2442_subsys;
extern struct bus_type s3c2443_subsys;
extern struct bus_type s3c6410_subsys;
#endif
......@@ -12,12 +12,12 @@
#include <linux/io.h>
#include <linux/clk.h>
#include <mach/map.h>
#include <mach/regs-clock.h>
#include "map.h"
#include "regs-clock.h"
#include <plat/cpu-freq-core.h>
#include <linux/soc/samsung/s3c-cpufreq-core.h>
#include "regs-mem.h"
#include "regs-mem-s3c24xx.h"
/**
* s3c2410_cpufreq_setrefresh - set SDRAM refresh value
......@@ -60,3 +60,35 @@ void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg)
if (!IS_ERR(cfg->mpll))
clk_set_rate(cfg->mpll, cfg->pll.frequency);
}
#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
u32 s3c2440_read_camdivn(void)
{
return __raw_readl(S3C2440_CAMDIVN);
}
void s3c2440_write_camdivn(u32 camdiv)
{
__raw_writel(camdiv, S3C2440_CAMDIVN);
}
#endif
u32 s3c24xx_read_clkdivn(void)
{
return __raw_readl(S3C2410_CLKDIVN);
}
void s3c24xx_write_clkdivn(u32 clkdiv)
{
__raw_writel(clkdiv, S3C2410_CLKDIVN);
}
u32 s3c24xx_read_mpllcon(void)
{
return __raw_readl(S3C2410_MPLLCON);
}
void s3c24xx_write_locktime(u32 locktime)
{
return __raw_writel(locktime, S3C2410_LOCKTIME);
}
......@@ -13,11 +13,11 @@
#include <asm/cpuidle.h>
#include <plat/cpu.h>
#include <mach/map.h>
#include "cpu.h"
#include "map.h"
#include "regs-sys.h"
#include "regs-syscon-power.h"
#include "regs-sys-s3c64xx.h"
#include "regs-syscon-power-s3c64xx.h"
static int s3c64xx_enter_idle(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
......
......@@ -8,7 +8,7 @@
#ifndef MACH_CRAG6410_H
#define MACH_CRAG6410_H
#include <mach/gpio-samsung.h>
#include "gpio-samsung.h"
#define GLENFARCLAS_PMIC_IRQ_BASE IRQ_BOARD_START
#define BANFF_PMIC_IRQ_BASE (IRQ_BOARD_START + 64)
......
......@@ -11,13 +11,12 @@
#include <linux/export.h>
#include <mach/irqs.h>
#include <mach/map.h>
#include <mach/dma.h>
#include "map.h"
#include <plat/devs.h>
#include "devs.h"
#include <linux/platform_data/asoc-s3c.h>
#include <plat/gpio-cfg.h>
#include <mach/gpio-samsung.h>
#include "gpio-cfg.h"
#include "gpio-samsung.h"
static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev)
{
......
......@@ -11,10 +11,10 @@
#include <linux/io.h>
#include <linux/pwm_backlight.h>
#include <plat/devs.h>
#include <plat/gpio-cfg.h>
#include "devs.h"
#include "gpio-cfg.h"
#include "backlight.h"
#include "backlight-s3c64xx.h"
struct samsung_bl_drvdata {
struct platform_pwm_backlight_data plat_data;
......
......@@ -15,11 +15,10 @@
#include <asm/mach/arch.h>
#include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/map.h>
#include "map.h"
#include <mach/irqs.h>
#include <plat/devs.h>
#include "devs.h"
/* Serial port registrations */
......
......@@ -10,7 +10,7 @@
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <plat/devs.h>
#include "devs.h"
/* uart devices */
......
......@@ -5,6 +5,7 @@
//
// Base Samsung platform device definitions
#include <linux/gpio.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/interrupt.h>
......@@ -37,28 +38,32 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <mach/dma.h>
#include <mach/irqs.h>
#include <mach/map.h>
#include "map.h"
#include "gpio-samsung.h"
#include "gpio-cfg.h"
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/adc.h>
#ifdef CONFIG_PLAT_S3C24XX
#include "regs-s3c2443-clock.h"
#endif /* CONFIG_PLAT_S3C24XX */
#include "cpu.h"
#include "devs.h"
#include <linux/soc/samsung/s3c-adc.h>
#include <linux/platform_data/ata-samsung_cf.h>
#include <plat/fb.h>
#include <plat/fb-s3c2410.h>
#include "fb.h"
#include <linux/platform_data/fb-s3c2410.h>
#include <linux/platform_data/hwmon-s3c.h>
#include <linux/platform_data/i2c-s3c2410.h>
#include <plat/keypad.h>
#include "keypad.h"
#include <linux/platform_data/mmc-s3cmci.h>
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <plat/pwm-core.h>
#include <plat/sdhci.h>
#include "pwm-core.h"
#include "sdhci.h"
#include <linux/platform_data/touchscreen-s3c2410.h>
#include <linux/platform_data/usb-s3c2410_udc.h>
#include <linux/platform_data/usb-ohci-s3c2410.h>
#include <plat/usb-phy.h>
#include <plat/regs-spi.h>
#include "usb-phy.h"
#include <linux/platform_data/asoc-s3c.h>
#include <linux/platform_data/spi-s3c64xx.h>
......@@ -833,16 +838,42 @@ struct platform_device s3c_device_rtc = {
/* SDI */
#ifdef CONFIG_PLAT_S3C24XX
void s3c24xx_mci_def_set_power(unsigned char power_mode, unsigned short vdd)
{
switch (power_mode) {
case MMC_POWER_ON:
case MMC_POWER_UP:
/* Configure GPE5...GPE10 pins in SD mode */
s3c_gpio_cfgall_range(S3C2410_GPE(5), 6, S3C_GPIO_SFN(2),
S3C_GPIO_PULL_NONE);
break;
case MMC_POWER_OFF:
default:
gpio_direction_output(S3C2410_GPE(5), 0);
break;
}
}
static struct resource s3c_sdi_resource[] = {
[0] = DEFINE_RES_MEM(S3C24XX_PA_SDI, S3C24XX_SZ_SDI),
[1] = DEFINE_RES_IRQ(IRQ_SDI),
};
static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
/* This is currently here to avoid a number of if (host->pdata)
* checks. Any zero fields to ensure reasonable defaults are picked. */
.no_wprotect = 1,
.no_detect = 1,
.set_power = s3c24xx_mci_def_set_power,
};
struct platform_device s3c_device_sdi = {
.name = "s3c2410-sdi",
.id = -1,
.num_resources = ARRAY_SIZE(s3c_sdi_resource),
.resource = s3c_sdi_resource,
.dev.platform_data = &s3cmci_def_pdata,
};
void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata)
......@@ -1038,6 +1069,8 @@ struct platform_device s3c_device_usb_hsudc = {
void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd)
{
s3c_set_platdata(pd, sizeof(*pd), &s3c_device_usb_hsudc);
pd->phy_init = s3c_hsudc_init_phy;
pd->phy_uninit = s3c_hsudc_uninit_phy;
}
#endif /* CONFIG_PLAT_S3C24XX */
......
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef CONFIG_ARCH_S3C24XX
#include "dma-s3c24xx.h"
#endif
#ifdef CONFIG_ARCH_S3C64XX
#include "dma-s3c64xx.h"
#endif
......@@ -5,8 +5,8 @@
*
* Samsung framebuffer driver core functions
*/
#ifndef __ASM_PLAT_FB_CORE_H
#define __ASM_PLAT_FB_CORE_H __FILE__
#ifndef __ASM_PLAT_FB_CORE_S3C24XX_H
#define __ASM_PLAT_FB_CORE_S3C24XX_H __FILE__
/*
* These functions are only for use with the core support code, such as
......@@ -21,4 +21,4 @@ static inline void s3c_fb_setname(char *name)
#endif
}
#endif /* __ASM_PLAT_FB_CORE_H */
#endif /* __ASM_PLAT_FB_CORE_S3C24XX_H */
......@@ -11,7 +11,7 @@
#define __PLAT_SAMSUNG_GPIO_CORE_H
/* Bring in machine-local definitions, especially S3C_GPIO_END */
#include <mach/gpio-samsung.h>
#include "gpio-samsung.h"
#include <linux/gpio/driver.h>
#define GPIOCON_OFF (0x00)
......
......@@ -14,6 +14,8 @@
#ifndef GPIO_SAMSUNG_S3C24XX_H
#define GPIO_SAMSUNG_S3C24XX_H
#include "map.h"
/*
* GPIO sizes for various SoCs:
*
......
......@@ -27,15 +27,15 @@
#include <asm/irq.h>
#include <mach/irqs.h>
#include <mach/map.h>
#include <mach/regs-gpio.h>
#include <mach/gpio-samsung.h>
#include <plat/cpu.h>
#include <plat/gpio-core.h>
#include <plat/gpio-cfg.h>
#include <plat/gpio-cfg-helpers.h>
#include <plat/pm.h>
#include "map.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include "cpu.h"
#include "gpio-core.h"
#include "gpio-cfg.h"
#include "gpio-cfg-helpers.h"
#include "pm.h"
int samsung_gpio_setpull_updown(struct samsung_gpio_chip *chip,
unsigned int off, samsung_gpio_pull_t pull)
......
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef CONFIG_ARCH_S3C24XX
#include "gpio-samsung-s3c24xx.h"
#endif
#ifdef CONFIG_ARCH_S3C64XX
#include "gpio-samsung-s3c64xx.h"
#endif
......@@ -6,7 +6,7 @@
#ifndef __MACH_S3C24XX_GTA02_H
#define __MACH_S3C24XX_GTA02_H __FILE__
#include <mach/regs-gpio.h>
#include "regs-gpio.h"
#define GTA02_GPIO_AUX_LED S3C2410_GPB(2)
#define GTA02_GPIO_USB_PULLUP S3C2410_GPB(9)
......
......@@ -13,10 +13,9 @@
#include <linux/gpio.h>
#include <linux/rfkill.h>
#include <plat/gpio-cfg.h>
#include <mach/hardware.h>
#include <mach/regs-gpio.h>
#include <mach/gpio-samsung.h>
#include "gpio-cfg.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include "h1940.h"
......
......@@ -6,16 +6,9 @@
* S3C2410 - hardware
*/
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
#ifndef __ASSEMBLY__
#ifndef __ASM_ARCH_HARDWARE_S3C24XX_H
#define __ASM_ARCH_HARDWARE_S3C24XX_H
extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg);
#endif /* __ASSEMBLY__ */
#include <linux/sizes.h>
#include <mach/map.h>
#endif /* __ASM_ARCH_HARDWARE_H */
#endif /* __ASM_ARCH_HARDWARE_S3C24XX_H */
/* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/arm/mach-s3c2410/include/mach/io.h
* from arch/arm/mach-rpc/include/mach/io.h
*
* Copyright (C) 1997 Russell King
* (C) 2003 Simtec Electronics
*/
#ifndef __ASM_ARM_ARCH_IO_S3C24XX_H
#define __ASM_ARM_ARCH_IO_S3C24XX_H
#include <mach/map-base.h>
/*
* ISA style IO, for each machine to sort out mappings for,
* if it implements it. We reserve two 16M regions for ISA,
* so the PC/104 can use separate addresses for 8-bit and
* 16-bit port I/O.
*/
#define PCIO_BASE S3C_ADDR(0x02000000)
#define IO_SPACE_LIMIT 0x00ffffff
#define S3C24XX_VA_ISA_WORD (PCIO_BASE)
#define S3C24XX_VA_ISA_BYTE (PCIO_BASE + 0x01000000)
#ifdef CONFIG_ISA
#define inb(p) readb(S3C24XX_VA_ISA_BYTE + (p))
#define inw(p) readw(S3C24XX_VA_ISA_WORD + (p))
#define inl(p) readl(S3C24XX_VA_ISA_WORD + (p))
#define outb(v,p) writeb((v), S3C24XX_VA_ISA_BYTE + (p))
#define outw(v,p) writew((v), S3C24XX_VA_ISA_WORD + (p))
#define outl(v,p) writel((v), S3C24XX_VA_ISA_WORD + (p))
#define insb(p,d,l) readsb(S3C24XX_VA_ISA_BYTE + (p),d,l)
#define insw(p,d,l) readsw(S3C24XX_VA_ISA_WORD + (p),d,l)
#define insl(p,d,l) readsl(S3C24XX_VA_ISA_WORD + (p),d,l)
#define outsb(p,d,l) writesb(S3C24XX_VA_ISA_BYTE + (p),d,l)
#define outsw(p,d,l) writesw(S3C24XX_VA_ISA_WORD + (p),d,l)
#define outsl(p,d,l) writesl(S3C24XX_VA_ISA_WORD + (p),d,l)
#else
#define __io(x) (PCIO_BASE + (x))
#endif
#endif
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2020 Krzysztof Kozlowski <krzk@kernel.org>
*/
#ifdef CONFIG_ARCH_S3C24XX
#include "io-s3c24xx.h"
#endif
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef CONFIG_ARCH_S3C24XX
#include "irqs-s3c24xx.h"
#endif
#ifdef CONFIG_ARCH_S3C64XX
#include "irqs-s3c64xx.h"
#endif
......@@ -23,8 +23,8 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <plat/cpu.h>
#include <plat/devs.h>
#include "cpu.h"
#include "devs.h"
static struct cpu_table *cpu;
......
......@@ -14,12 +14,12 @@
#include <linux/io.h>
#include <linux/slab.h>
#include <mach/map.h>
#include <mach/regs-clock.h>
#include "map.h"
#include "regs-clock.h"
#include <plat/cpu-freq-core.h>
#include <linux/soc/samsung/s3c-cpufreq-core.h>
#include "regs-mem.h"
#include "regs-mem-s3c24xx.h"
#define print_ns(x) ((x) / 10), ((x) % 10)
......@@ -129,7 +129,7 @@ static unsigned int calc_0124(unsigned int cyc, unsigned long hclk_tns,
return 0;
}
int calc_tacp(unsigned int cyc, unsigned long hclk, unsigned long *v)
static int calc_tacp(unsigned int cyc, unsigned long hclk, unsigned long *v)
{
/* Currently no support for Tacp calculations. */
return 0;
......@@ -288,8 +288,8 @@ static unsigned int get_0124(unsigned long hclk_tns,
* Given the BANKCON setting in @bt and the current frequency settings
* in @cfg, update the cycle timing information.
*/
void s3c2410_iotiming_getbank(struct s3c_cpufreq_config *cfg,
struct s3c2410_iobank_timing *bt)
static void s3c2410_iotiming_getbank(struct s3c_cpufreq_config *cfg,
struct s3c2410_iobank_timing *bt)
{
unsigned long bankcon = bt->bankcon;
unsigned long hclk = cfg->freq.hclk_tns;
......
......@@ -23,10 +23,10 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <plat/cpu.h>
#include <plat/cpu-freq-core.h>
#include "cpu.h"
#include <linux/soc/samsung/s3c-cpufreq-core.h>
#include <mach/s3c2412.h>
#include "s3c2412.h"
#define print_ns(x) ((x) / 10), ((x) % 10)
......
......@@ -13,14 +13,14 @@
#include <linux/syscore_ops.h>
#include <linux/io.h>
#include <plat/cpu.h>
#include <plat/pm.h>
#include <plat/map-base.h>
#include <plat/map-s3c.h>
#include <mach/regs-irq.h>
#include <mach/regs-gpio.h>
#include <mach/pm-core.h>
#include "cpu.h"
#include "pm.h"
#include <mach/map-base.h>
#include "map-s3c.h"
#include "regs-irq.h"
#include "regs-gpio.h"
#include "pm-core.h"
#include <asm/irq.h>
......
......@@ -20,11 +20,11 @@
#include <linux/io.h>
#include <linux/of.h>
#include <mach/map.h>
#include "map.h"
#include <mach/regs-gpio.h>
#include <plat/cpu.h>
#include <plat/pm.h>
#include "regs-gpio.h"
#include "cpu.h"
#include "pm.h"
/* We handled all the IRQ types in this code, to save having to make several
* small files to handle each different type separately. Having the EINT_GRP
......
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/stddef.h>
#include <linux/export.h>
#include <linux/spi/s3c24xx-fiq.h>
EXPORT_SYMBOL(s3c24xx_spi_fiq_rx);
EXPORT_SYMBOL(s3c24xx_spi_fiq_txrx);
EXPORT_SYMBOL(s3c24xx_spi_fiq_tx);
......@@ -10,11 +10,13 @@
#include <linux/linkage.h>
#include <asm/assembler.h>
#include <mach/map.h>
#include <mach/regs-irq.h>
#include <plat/regs-spi.h>
#include "map.h"
#include "regs-irq.h"
#include "spi-s3c24xx-fiq.h"
#include <linux/spi/s3c24xx-fiq.h>
#define S3C2410_SPTDAT (0x10)
#define S3C2410_SPRDAT (0x14)
.text
......
......@@ -25,12 +25,13 @@
#include <asm/exception.h>
#include <asm/mach/irq.h>
#include <mach/regs-irq.h>
#include <mach/regs-gpio.h>
#include <mach/irqs.h>
#include "regs-irq.h"
#include "regs-gpio.h"
#include <plat/cpu.h>
#include <plat/regs-irqtype.h>
#include <plat/pm.h>
#include "cpu.h"
#include "regs-irqtype.h"
#include "pm.h"
#define S3C_IRQTYPE_NONE 0
#define S3C_IRQTYPE_EINT 1
......@@ -375,14 +376,17 @@ asmlinkage void __exception_irq_entry s3c24xx_handle_irq(struct pt_regs *regs)
/**
* s3c24xx_set_fiq - set the FIQ routing
* @irq: IRQ number to route to FIQ on processor.
* @ack_ptr: pointer to a location for storing the bit mask
* @on: Whether to route @irq to the FIQ, or to remove the FIQ routing.
*
* Change the state of the IRQ to FIQ routing depending on @irq and @on. If
* @on is true, the @irq is checked to see if it can be routed and the
* interrupt controller updated to route the IRQ. If @on is false, the FIQ
* routing is cleared, regardless of which @irq is specified.
*
* returns the mask value for the register.
*/
int s3c24xx_set_fiq(unsigned int irq, bool on)
int s3c24xx_set_fiq(unsigned int irq, u32 *ack_ptr, bool on)
{
u32 intmod;
unsigned offs;
......@@ -390,15 +394,18 @@ int s3c24xx_set_fiq(unsigned int irq, bool on)
if (on) {
offs = irq - FIQ_START;
if (offs > 31)
return -EINVAL;
return 0;
intmod = 1 << offs;
} else {
intmod = 0;
}
if (ack_ptr)
*ack_ptr = intmod;
writel_relaxed(intmod, S3C2410_INTMOD);
return 0;
return intmod;
}
EXPORT_SYMBOL_GPL(s3c24xx_set_fiq);
......
......@@ -13,6 +13,7 @@
#include <linux/list.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/gpio/machine.h>
#include <linux/gpio.h>
#include <linux/device.h>
#include <linux/platform_device.h>
......@@ -26,28 +27,24 @@
#include <asm/mach/irq.h>
#include <asm/mach/flash.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <mach/fb.h>
#include <linux/platform_data/fb-s3c2410.h>
#include <mach/regs-lcd.h>
#include <mach/regs-gpio.h>
#include <mach/gpio-samsung.h>
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <linux/platform_data/i2c-s3c2410.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/gpio-cfg.h>
#include "devs.h"
#include "cpu.h"
#include "gpio-cfg.h"
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/map.h>
#include <linux/mtd/physmap.h>
#include <plat/samsung-time.h>
#include "common.h"
#include "s3c24xx.h"
static struct resource amlm5900_nor_resource =
DEFINE_RES_MEM(0x00000000, SZ_16M);
......@@ -124,6 +121,19 @@ static struct s3c2410_uartcfg amlm5900_uartcfgs[] = {
}
};
static struct gpiod_lookup_table amlm5900_mmc_gpio_table = {
.dev_id = "s3c2410-sdi",
.table = {
/* bus pins */
GPIO_LOOKUP_IDX("GPIOE", 5, "bus", 0, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 6, "bus", 1, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 7, "bus", 2, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 8, "bus", 3, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 9, "bus", 4, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
{ },
},
};
static struct platform_device *amlm5900_devices[] __initdata = {
#ifdef CONFIG_FB_S3C2410
......@@ -143,13 +153,13 @@ static void __init amlm5900_map_io(void)
{
s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc));
s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
}
static void __init amlm5900_init_time(void)
{
s3c2410_init_clocks(12000000);
samsung_timer_init();
s3c24xx_timer_init();
}
#ifdef CONFIG_FB_S3C2410
......@@ -180,13 +190,17 @@ static struct s3c2410fb_mach_info __initdata amlm5900_fb_info = {
.gpccon = 0xaaaaaaaa,
.gpccon_mask = 0xffffffff,
.gpccon_reg = S3C2410_GPCCON,
.gpcup = 0x0000ffff,
.gpcup_mask = 0xffffffff,
.gpcup_reg = S3C2410_GPCUP,
.gpdcon = 0xaaaaaaaa,
.gpdcon_mask = 0xffffffff,
.gpdcon_reg = S3C2410_GPDCON,
.gpdup = 0x0000ffff,
.gpdup_mask = 0xffffffff,
.gpdup_reg = S3C2410_GPDUP,
};
#endif
......@@ -219,6 +233,7 @@ static void __init amlm5900_init(void)
s3c24xx_fb_set_platdata(&amlm5900_fb_info);
#endif
s3c_i2c0_set_platdata(NULL);
gpiod_add_lookup_table(&amlm5900_mmc_gpio_table);
platform_add_devices(amlm5900_devices, ARRAY_SIZE(amlm5900_devices));
}
......
......@@ -24,13 +24,11 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include <mach/gpio-samsung.h>
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <linux/platform_data/i2c-s3c2410.h>
......@@ -41,13 +39,12 @@
#include <net/ax88796.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include "devs.h"
#include "cpu.h"
#include <linux/platform_data/asoc-s3c24xx_simtec.h>
#include <plat/samsung-time.h>
#include "anubis.h"
#include "common.h"
#include "s3c24xx.h"
#include "simtec.h"
#define COPYRIGHT ", Copyright 2005-2009 Simtec Electronics"
......@@ -384,7 +381,7 @@ static void __init anubis_map_io(void)
{
s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
/* check for the newer revision boards with large page nand */
......@@ -403,7 +400,7 @@ static void __init anubis_map_io(void)
static void __init anubis_init_time(void)
{
s3c2440_init_clocks(12000000);
samsung_timer_init();
s3c24xx_timer_init();
}
static void __init anubis_init(void)
......
......@@ -30,24 +30,22 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/map.h>
#include "map.h"
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <linux/platform_data/i2c-s3c2410.h>
#include <plat/fb.h>
#include "fb.h"
#include <plat/devs.h>
#include <plat/cpu.h>
#include "devs.h"
#include "cpu.h"
#include <mach/irqs.h>
#include <mach/regs-gpio.h>
#include <mach/gpio-samsung.h>
#include <plat/samsung-time.h>
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include "common.h"
#include "regs-modem.h"
#include "s3c64xx.h"
#include "regs-modem-s3c64xx.h"
/* DM9000 */
#define ANW6410_PA_DM9000 (0x18000000)
......@@ -204,7 +202,7 @@ static void __init anw6410_map_io(void)
s3c64xx_init_io(anw6410_iodesc, ARRAY_SIZE(anw6410_iodesc));
s3c64xx_set_xtal_freq(12000000);
s3c24xx_init_uarts(anw6410_uartcfgs, ARRAY_SIZE(anw6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c64xx_set_timer_source(S3C64XX_PWM3, S3C64XX_PWM4);
anw6410_lcd_mode_set();
}
......@@ -228,6 +226,5 @@ MACHINE_START(ANW6410, "A&W6410")
.init_irq = s3c6410_init_irq,
.map_io = anw6410_map_io,
.init_machine = anw6410_machine_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
.init_time = s3c64xx_timer_init,
MACHINE_END
......@@ -24,14 +24,12 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/fb.h>
#include <linux/platform_data/fb-s3c2410.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include <mach/gpio-samsung.h>
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <linux/platform_data/i2c-s3c2410.h>
......@@ -40,12 +38,11 @@
#include <linux/mtd/nand_ecc.h>
#include <linux/mtd/partitions.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include "devs.h"
#include "cpu.h"
#include <linux/platform_data/mmc-s3cmci.h>
#include <plat/samsung-time.h>
#include "common.h"
#include "s3c24xx.h"
static struct map_desc at2440evb_iodesc[] __initdata = {
/* Nothing here */
......@@ -136,18 +133,26 @@ static struct platform_device at2440evb_device_eth = {
};
static struct s3c24xx_mci_pdata at2440evb_mci_pdata __initdata = {
/* Intentionally left blank */
.set_power = s3c24xx_mci_def_set_power,
};
static struct gpiod_lookup_table at2440evb_mci_gpio_table = {
.dev_id = "s3c2410-sdi",
.table = {
/* Card detect S3C2410_GPG(10) */
GPIO_LOOKUP("GPG", 10, "cd", GPIO_ACTIVE_LOW),
GPIO_LOOKUP("GPIOG", 10, "cd", GPIO_ACTIVE_LOW),
/* bus pins */
GPIO_LOOKUP_IDX("GPIOE", 5, "bus", 0, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 6, "bus", 1, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 7, "bus", 2, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 8, "bus", 3, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 9, "bus", 4, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
{ },
},
};
/* 7" LCD panel */
static struct s3c2410fb_display at2440evb_lcd_cfg __initdata = {
......@@ -197,13 +202,13 @@ static void __init at2440evb_map_io(void)
{
s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc));
s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
}
static void __init at2440evb_init_time(void)
{
s3c2440_init_clocks(16934400);
samsung_timer_init();
s3c24xx_timer_init();
}
static void __init at2440evb_init(void)
......
......@@ -40,20 +40,17 @@
#include <asm/mach/irq.h>
#include <asm/mach-types.h>
#include <mach/fb.h>
#include <mach/hardware.h>
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include <mach/gpio-samsung.h>
#include <plat/cpu.h>
#include <plat/cpu-freq.h>
#include <plat/devs.h>
#include <plat/gpio-cfg.h>
#include <plat/samsung-time.h>
#include <linux/platform_data/fb-s3c2410.h>
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include "cpu.h"
#include <linux/soc/samsung/s3c-cpu-freq.h>
#include "devs.h"
#include "gpio-cfg.h"
#include "bast.h"
#include "common.h"
#include "s3c24xx.h"
#include "simtec.h"
#define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics"
......@@ -550,13 +547,13 @@ static void __init bast_map_io(void)
s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
}
static void __init bast_init_time(void)
{
s3c2410_init_clocks(12000000);
samsung_timer_init();
s3c24xx_timer_init();
}
static void __init bast_init(void)
......
......@@ -27,7 +27,7 @@
#include <linux/platform_data/spi-s3c64xx.h>
#include <plat/cpu.h>
#include "cpu.h"
#include <mach/irqs.h>
#include "crag6410.h"
......@@ -378,8 +378,7 @@ static const struct {
.i2c_devs = wm2200_i2c, .num_i2c_devs = ARRAY_SIZE(wm2200_i2c) },
};
static int wlf_gf_module_probe(struct i2c_client *i2c,
const struct i2c_device_id *i2c_id)
static int wlf_gf_module_probe(struct i2c_client *i2c)
{
int ret, i, j, id, rev;
......@@ -432,7 +431,7 @@ static struct i2c_driver wlf_gf_module_driver = {
.driver = {
.name = "wlf-gf-module"
},
.probe = wlf_gf_module_probe,
.probe_new = wlf_gf_module_probe,
.id_table = wlf_gf_module_id,
};
......
......@@ -44,30 +44,28 @@
#include <asm/mach-types.h>
#include <video/samsung_fimd.h>
#include <mach/hardware.h>
#include <mach/map.h>
#include <mach/regs-gpio.h>
#include <mach/gpio-samsung.h>
#include "map.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <mach/irqs.h>
#include <plat/fb.h>
#include <plat/sdhci.h>
#include <plat/gpio-cfg.h>
#include "fb.h"
#include "sdhci.h"
#include "gpio-cfg.h"
#include <linux/platform_data/spi-s3c64xx.h>
#include <plat/keypad.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/adc.h>
#include "keypad.h"
#include "devs.h"
#include "cpu.h"
#include <linux/soc/samsung/s3c-adc.h>
#include <linux/platform_data/i2c-s3c2410.h>
#include <plat/pm.h>
#include <plat/samsung-time.h>
#include "pm.h"
#include "common.h"
#include "s3c64xx.h"
#include "crag6410.h"
#include "regs-gpio-memport.h"
#include "regs-modem.h"
#include "regs-sys.h"
#include "regs-gpio-memport-s3c64xx.h"
#include "regs-modem-s3c64xx.h"
#include "regs-sys-s3c64xx.h"
/* serial port setup */
......@@ -750,7 +748,7 @@ static void __init crag6410_map_io(void)
s3c64xx_init_io(NULL, 0);
s3c64xx_set_xtal_freq(12000000);
s3c24xx_init_uarts(crag6410_uartcfgs, ARRAY_SIZE(crag6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c64xx_set_timer_source(S3C64XX_PWM3, S3C64XX_PWM4);
/* LCD type and Bypass set by bootloader */
}
......@@ -877,6 +875,5 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410")
.init_irq = s3c6410_init_irq,
.map_io = crag6410_map_io,
.init_machine = crag6410_machine_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
.init_time = s3c64xx_timer_init,
MACHINE_END
......@@ -15,6 +15,7 @@
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/gpio/machine.h>
#include <linux/gpio.h>
#include <linux/gpio_keys.h>
#include <linux/workqueue.h>
......@@ -56,20 +57,18 @@
#include <linux/platform_data/touchscreen-s3c2410.h>
#include <linux/platform_data/usb-ohci-s3c2410.h>
#include <linux/platform_data/usb-s3c2410_udc.h>
#include <linux/platform_data/fb-s3c2410.h>
#include <mach/fb.h>
#include <mach/hardware.h>
#include <mach/regs-gpio.h>
#include <mach/regs-irq.h>
#include <mach/gpio-samsung.h>
#include "regs-gpio.h"
#include "regs-irq.h"
#include "gpio-samsung.h"
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/gpio-cfg.h>
#include <plat/pm.h>
#include <plat/samsung-time.h>
#include "cpu.h"
#include "devs.h"
#include "gpio-cfg.h"
#include "pm.h"
#include "common.h"
#include "s3c24xx.h"
#include "gta02.h"
static struct pcf50633 *gta02_pcf;
......@@ -474,11 +473,39 @@ static struct platform_device gta02_buttons_device = {
},
};
static struct gpiod_lookup_table gta02_audio_gpio_table = {
.dev_id = "neo1973-audio",
.table = {
GPIO_LOOKUP("GPIOJ", 2, "amp-shut", GPIO_ACTIVE_HIGH),
GPIO_LOOKUP("GPIOJ", 1, "hp", GPIO_ACTIVE_HIGH),
{ },
},
};
static struct platform_device gta02_audio = {
.name = "neo1973-audio",
.id = -1,
};
static struct gpiod_lookup_table gta02_mmc_gpio_table = {
.dev_id = "s3c2410-sdi",
.table = {
/* bus pins */
GPIO_LOOKUP_IDX("GPIOE", 5, "bus", 0, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 6, "bus", 1, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 7, "bus", 2, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 8, "bus", 3, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 9, "bus", 4, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
{ },
},
};
static void __init gta02_map_io(void)
{
s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc));
s3c24xx_init_uarts(gta02_uartcfgs, ARRAY_SIZE(gta02_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
}
......@@ -498,6 +525,7 @@ static struct platform_device *gta02_devices[] __initdata = {
&gta02_buttons_device,
&s3c_device_adc,
&s3c_device_ts,
&gta02_audio,
};
static void gta02_poweroff(void)
......@@ -524,6 +552,12 @@ static void __init gta02_machine_init(void)
i2c_register_board_info(0, gta02_i2c_devs, ARRAY_SIZE(gta02_i2c_devs));
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
S3C_GPIO_PULL_NONE);
gpiod_add_lookup_table(&gta02_audio_gpio_table);
gpiod_add_lookup_table(&gta02_mmc_gpio_table);
platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
pm_power_off = gta02_poweroff;
......@@ -533,7 +567,7 @@ static void __init gta02_machine_init(void)
static void __init gta02_init_time(void)
{
s3c2442_init_clocks(12000000);
samsung_timer_init();
s3c24xx_timer_init();
}
MACHINE_START(NEO1973_GTA02, "GTA02")
......
......@@ -47,20 +47,19 @@
#include <sound/uda1380.h>
#include <mach/fb.h>
#include <mach/hardware.h>
#include <mach/regs-clock.h>
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include <mach/gpio-samsung.h>
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/gpio-cfg.h>
#include <plat/pm.h>
#include <plat/samsung-time.h>
#include "common.h"
#include <linux/platform_data/fb-s3c2410.h>
#include "map.h"
#include "hardware-s3c24xx.h"
#include "regs-clock.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include "cpu.h"
#include "devs.h"
#include "gpio-cfg.h"
#include "pm.h"
#include "s3c24xx.h"
#include "h1940.h"
#define H1940_LATCH ((void __force __iomem *)0xF8000000)
......@@ -180,9 +179,9 @@ static struct s3c2410_ts_mach_info h1940_ts_cfg __initdata = {
.cfg_gpio = s3c24xx_ts_cfg_gpio,
};
/**
/*
* Set lcd on or off
**/
*/
static struct s3c2410fb_display h1940_lcd __initdata = {
.lcdcon5= S3C2410_LCDCON5_FRM565 | \
S3C2410_LCDCON5_INVVLINE | \
......@@ -211,12 +210,16 @@ static struct s3c2410fb_mach_info h1940_fb_info __initdata = {
.lpcsel = 0x02,
.gpccon = 0xaa940659,
.gpccon_mask = 0xffffc0f0,
.gpccon_reg = S3C2410_GPCCON,
.gpcup = 0x0000ffff,
.gpcup_mask = 0xffffffff,
.gpcup_reg = S3C2410_GPCUP,
.gpdcon = 0xaa84aaa0,
.gpdcon_mask = 0xffffffff,
.gpdcon_reg = S3C2410_GPDCON,
.gpdup = 0x0000faff,
.gpdup_mask = 0xffffffff,
.gpdup_reg = S3C2410_GPDUP,
};
static int power_supply_init(struct device *dev)
......@@ -446,6 +449,8 @@ static struct platform_device h1940_device_bluetooth = {
static void h1940_set_mmc_power(unsigned char power_mode, unsigned short vdd)
{
s3c24xx_mci_def_set_power(power_mode, vdd);
switch (power_mode) {
case MMC_POWER_OFF:
gpio_set_value(H1940_LATCH_SD_POWER, 0);
......@@ -468,13 +473,36 @@ static struct gpiod_lookup_table h1940_mmc_gpio_table = {
.dev_id = "s3c2410-sdi",
.table = {
/* Card detect S3C2410_GPF(5) */
GPIO_LOOKUP("GPF", 5, "cd", GPIO_ACTIVE_LOW),
GPIO_LOOKUP("GPIOF", 5, "cd", GPIO_ACTIVE_LOW),
/* Write protect S3C2410_GPH(8) */
GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_LOW),
GPIO_LOOKUP("GPIOH", 8, "wp", GPIO_ACTIVE_LOW),
/* bus pins */
GPIO_LOOKUP_IDX("GPIOE", 5, "bus", 0, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 6, "bus", 1, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 7, "bus", 2, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 8, "bus", 3, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 9, "bus", 4, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
{ },
},
};
static struct gpiod_lookup_table h1940_audio_gpio_table = {
.dev_id = "h1940-audio",
.table = {
GPIO_LOOKUP("H1940_LATCH",
H1940_LATCH_AUDIO_POWER - H1940_LATCH_GPIO(0),
"speaker-power", GPIO_ACTIVE_HIGH),
GPIO_LOOKUP("GPIOG", 4, "hp", GPIO_ACTIVE_HIGH),
{ },
},
};
static struct platform_device h1940_audio = {
.name = "h1940-audio",
.id = -1,
};
static struct pwm_lookup h1940_pwm_lookup[] = {
PWM_LOOKUP("samsung-pwm", 0, "pwm-backlight", NULL, 36296,
PWM_POLARITY_NORMAL),
......@@ -651,13 +679,14 @@ static struct platform_device *h1940_devices[] __initdata = {
&s3c_device_ts,
&power_supply,
&h1940_battery,
&h1940_audio,
};
static void __init h1940_map_io(void)
{
s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc));
s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
/* setup PM */
......@@ -674,7 +703,7 @@ static void __init h1940_map_io(void)
static void __init h1940_init_time(void)
{
s3c2410_init_clocks(12000000);
samsung_timer_init();
s3c24xx_timer_init();
}
/* H1940 and RX3715 need to reserve this for suspend */
......@@ -690,6 +719,10 @@ static void __init h1940_init(void)
s3c24xx_fb_set_platdata(&h1940_fb_info);
gpiod_add_lookup_table(&h1940_mmc_gpio_table);
gpiod_add_lookup_table(&h1940_audio_gpio_table);
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
S3C_GPIO_PULL_NONE);
s3c24xx_mci_set_platdata(&h1940_mmc_cfg);
s3c24xx_udc_set_platdata(&h1940_udc_cfg);
s3c24xx_ts_set_platdata(&h1940_ts_cfg);
......
......@@ -25,23 +25,21 @@
#include <asm/mach/irq.h>
#include <video/samsung_fimd.h>
#include <mach/hardware.h>
#include <mach/map.h>
#include "map.h"
#include <mach/irqs.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <linux/platform_data/i2c-s3c2410.h>
#include <mach/gpio-samsung.h>
#include <plat/fb.h>
#include "gpio-samsung.h"
#include "fb.h"
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/samsung-time.h>
#include "devs.h"
#include "cpu.h"
#include "common.h"
#include "s3c64xx.h"
#define UCON S3C2410_UCON_DEFAULT
#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)
......@@ -251,7 +249,7 @@ static void __init hmt_map_io(void)
s3c64xx_init_io(hmt_iodesc, ARRAY_SIZE(hmt_iodesc));
s3c64xx_set_xtal_freq(12000000);
s3c24xx_init_uarts(hmt_uartcfgs, ARRAY_SIZE(hmt_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c64xx_set_timer_source(S3C64XX_PWM3, S3C64XX_PWM4);
}
static void __init hmt_machine_init(void)
......@@ -280,6 +278,5 @@ MACHINE_START(HMT, "Airgoo-HMT")
.init_irq = s3c6410_init_irq,
.map_io = hmt_map_io,
.init_machine = hmt_machine_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
.init_time = s3c64xx_timer_init,
MACHINE_END
......@@ -31,10 +31,10 @@
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <linux/platform_data/i2c-s3c2410.h>
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include <mach/fb.h>
#include <mach/gpio-samsung.h>
#include "hardware-s3c24xx.h"
#include "regs-gpio.h"
#include <linux/platform_data/fb-s3c2410.h>
#include "gpio-samsung.h"
#include <asm/mach-types.h>
......@@ -43,14 +43,13 @@
#include <linux/mtd/nand_ecc.h>
#include <linux/mtd/partitions.h>
#include <plat/gpio-cfg.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/pm.h>
#include "gpio-cfg.h"
#include "devs.h"
#include "cpu.h"
#include "pm.h"
#include <linux/platform_data/usb-s3c2410_udc.h>
#include <plat/samsung-time.h>
#include "common.h"
#include "s3c24xx.h"
#include "s3c2412-power.h"
static struct map_desc jive_iodesc[] __initdata = {
......@@ -321,6 +320,7 @@ static struct s3c2410fb_mach_info jive_lcd_config = {
* data. */
.gpcup = (0xf << 1) | (0x3f << 10),
.gpcup_reg = S3C2410_GPCUP,
.gpccon = (S3C2410_GPC1_VCLK | S3C2410_GPC2_VLINE |
S3C2410_GPC3_VFRAME | S3C2410_GPC4_VM |
......@@ -334,8 +334,12 @@ static struct s3c2410fb_mach_info jive_lcd_config = {
S3C2410_GPCCON_MASK(12) | S3C2410_GPCCON_MASK(13) |
S3C2410_GPCCON_MASK(14) | S3C2410_GPCCON_MASK(15)),
.gpccon_reg = S3C2410_GPCCON,
.gpdup = (0x3f << 2) | (0x3f << 10),
.gpdup_reg = S3C2410_GPDUP,
.gpdcon = (S3C2410_GPD2_VD10 | S3C2410_GPD3_VD11 |
S3C2410_GPD4_VD12 | S3C2410_GPD5_VD13 |
S3C2410_GPD6_VD14 | S3C2410_GPD7_VD15 |
......@@ -349,6 +353,8 @@ static struct s3c2410fb_mach_info jive_lcd_config = {
S3C2410_GPDCON_MASK(10) | S3C2410_GPDCON_MASK(11)|
S3C2410_GPDCON_MASK(12) | S3C2410_GPDCON_MASK(13)|
S3C2410_GPDCON_MASK(14) | S3C2410_GPDCON_MASK(15)),
.gpdcon_reg = S3C2410_GPDCON,
};
/* ILI9320 support. */
......@@ -523,13 +529,13 @@ static void __init jive_map_io(void)
{
s3c24xx_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc));
s3c24xx_init_uarts(jive_uartcfgs, ARRAY_SIZE(jive_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
}
static void __init jive_init_time(void)
{
s3c2412_init_clocks(12000000);
samsung_timer_init();
s3c24xx_timer_init();
}
static void jive_power_off(void)
......
......@@ -30,15 +30,13 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <mach/hardware.h>
#include <mach/fb.h>
#include <linux/platform_data/fb-s3c2410.h>
#include <asm/mach-types.h>
#include <mach/regs-gpio.h>
#include "regs-gpio.h"
#include <linux/platform_data/leds-s3c24xx.h>
#include <mach/regs-lcd.h>
#include <mach/irqs.h>
#include <mach/gpio-samsung.h>
#include "gpio-samsung.h"
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <linux/platform_data/i2c-s3c2410.h>
#include <linux/platform_data/mmc-s3cmci.h>
......@@ -49,14 +47,13 @@
#include <linux/mtd/nand_ecc.h>
#include <linux/mtd/partitions.h>
#include <plat/gpio-cfg.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/samsung-time.h>
#include "gpio-cfg.h"
#include "devs.h"
#include "cpu.h"
#include <sound/s3c24xx_uda134x.h>
#include "common.h"
#include "s3c24xx.h"
#define MACH_MINI2440_DM9K_BASE (S3C2410_CS4 + 0x300)
......@@ -215,6 +212,9 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
S3C2410_GPCCON_MASK(12) | S3C2410_GPCCON_MASK(13) |
S3C2410_GPCCON_MASK(14) | S3C2410_GPCCON_MASK(15)),
.gpccon_reg = S3C2410_GPCCON,
.gpcup_reg = S3C2410_GPCUP,
.gpdup = (0x3f << 2) | (0x3f << 10),
.gpdcon = (S3C2410_GPD2_VD10 | S3C2410_GPD3_VD11 |
......@@ -230,13 +230,16 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
S3C2410_GPDCON_MASK(10) | S3C2410_GPDCON_MASK(11)|
S3C2410_GPDCON_MASK(12) | S3C2410_GPDCON_MASK(13)|
S3C2410_GPDCON_MASK(14) | S3C2410_GPDCON_MASK(15)),
.gpdcon_reg = S3C2410_GPDCON,
.gpdup_reg = S3C2410_GPDUP,
};
/* MMC/SD */
static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = {
.wprotect_invert = 1,
.set_power = NULL,
.set_power = s3c24xx_mci_def_set_power,
.ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
};
......@@ -244,9 +247,16 @@ static struct gpiod_lookup_table mini2440_mmc_gpio_table = {
.dev_id = "s3c2410-sdi",
.table = {
/* Card detect S3C2410_GPG(8) */
GPIO_LOOKUP("GPG", 8, "cd", GPIO_ACTIVE_LOW),
GPIO_LOOKUP("GPIOG", 8, "cd", GPIO_ACTIVE_LOW),
/* Write protect S3C2410_GPH(8) */
GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_HIGH),
GPIO_LOOKUP("GPIOH", 8, "wp", GPIO_ACTIVE_HIGH),
/* bus pins */
GPIO_LOOKUP_IDX("GPIOE", 5, "bus", 0, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 6, "bus", 1, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 7, "bus", 2, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 8, "bus", 3, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 9, "bus", 4, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
{ },
},
};
......@@ -587,13 +597,13 @@ static void __init mini2440_map_io(void)
{
s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc));
s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
}
static void __init mini2440_init_time(void)
{
s3c2440_init_clocks(12000000);
samsung_timer_init();
s3c24xx_timer_init();
}
/*
......@@ -716,6 +726,11 @@ static void __init mini2440_init(void)
s3c_gpio_setpull(mini2440_buttons[i].gpio, S3C_GPIO_PULL_UP);
s3c_gpio_cfgpin(mini2440_buttons[i].gpio, S3C2410_GPIO_INPUT);
}
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
S3C_GPIO_PULL_NONE);
if (features.lcd_index != -1) {
int li;
......
......@@ -23,27 +23,26 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <mach/map.h>
#include <mach/regs-gpio.h>
#include <mach/gpio-samsung.h>
#include <plat/adc.h>
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/fb.h>
#include "map.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <linux/soc/samsung/s3c-adc.h>
#include "cpu.h"
#include "devs.h"
#include "fb.h"
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <linux/platform_data/mmc-sdhci-s3c.h>
#include <plat/sdhci.h>
#include "sdhci.h"
#include <linux/platform_data/touchscreen-s3c2410.h>
#include <mach/irqs.h>
#include <video/platform_lcd.h>
#include <video/samsung_fimd.h>
#include <plat/samsung-time.h>
#include "common.h"
#include "regs-modem.h"
#include "regs-srom.h"
#include "s3c64xx.h"
#include "regs-modem-s3c64xx.h"
#include "regs-srom-s3c64xx.h"
#define UCON S3C2410_UCON_DEFAULT
#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
......@@ -238,7 +237,7 @@ static void __init mini6410_map_io(void)
s3c64xx_init_io(NULL, 0);
s3c64xx_set_xtal_freq(12000000);
s3c24xx_init_uarts(mini6410_uartcfgs, ARRAY_SIZE(mini6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c64xx_set_timer_source(S3C64XX_PWM3, S3C64XX_PWM4);
/* set the LCD type */
tmp = __raw_readl(S3C64XX_SPCON);
......@@ -362,6 +361,5 @@ MACHINE_START(MINI6410, "MINI6410")
.init_irq = s3c6410_init_irq,
.map_io = mini6410_map_io,
.init_machine = mini6410_machine_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
.init_time = s3c64xx_timer_init,
MACHINE_END
......@@ -27,15 +27,15 @@
#include <linux/io.h>
#include <linux/mmc/host.h>
#include <mach/hardware.h>
#include "hardware-s3c24xx.h"
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <mach/fb.h>
#include <linux/platform_data/fb-s3c2410.h>
#include <linux/platform_data/leds-s3c24xx.h>
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include <mach/gpio-samsung.h>
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include "gpio-cfg.h"
#include <asm/mach/arch.h>
#include <asm/mach/irq.h>
......@@ -43,14 +43,12 @@
#include <linux/platform_data/i2c-s3c2410.h>
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/gpio-cfg.h>
#include "cpu.h"
#include "devs.h"
#include <linux/platform_data/mmc-s3cmci.h>
#include <linux/platform_data/usb-s3c2410_udc.h>
#include <plat/samsung-time.h>
#include "common.h"
#include "s3c24xx.h"
static struct map_desc n30_iodesc[] __initdata = {
/* nothing here yet */
......@@ -368,6 +366,8 @@ static struct s3c2410fb_mach_info n30_fb_info __initdata = {
static void n30_sdi_set_power(unsigned char power_mode, unsigned short vdd)
{
s3c24xx_mci_def_set_power(power_mode, vdd);
switch (power_mode) {
case MMC_POWER_ON:
case MMC_POWER_UP:
......@@ -389,10 +389,17 @@ static struct gpiod_lookup_table n30_mci_gpio_table = {
.dev_id = "s3c2410-sdi",
.table = {
/* Card detect S3C2410_GPF(1) */
GPIO_LOOKUP("GPF", 1, "cd", GPIO_ACTIVE_LOW),
GPIO_LOOKUP("GPIOF", 1, "cd", GPIO_ACTIVE_LOW),
/* Write protect S3C2410_GPG(10) */
GPIO_LOOKUP("GPG", 10, "wp", GPIO_ACTIVE_LOW),
GPIO_LOOKUP("GPIOG", 10, "wp", GPIO_ACTIVE_LOW),
{ },
/* bus pins */
GPIO_LOOKUP_IDX("GPIOE", 5, "bus", 0, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 6, "bus", 1, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 7, "bus", 2, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 8, "bus", 3, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 9, "bus", 4, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
},
};
......@@ -572,13 +579,13 @@ static void __init n30_map_io(void)
s3c24xx_init_io(n30_iodesc, ARRAY_SIZE(n30_iodesc));
n30_hwinit();
s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
}
static void __init n30_init_time(void)
{
s3c2410_init_clocks(12000000);
samsung_timer_init();
s3c24xx_timer_init();
}
/* GPB3 is the line that controls the pull-up for the USB D+ line */
......@@ -600,6 +607,10 @@ static void __init n30_init(void)
S3C2410_MISCCR_USBSUSPND0 |
S3C2410_MISCCR_USBSUSPND1, 0x0);
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
S3C_GPIO_PULL_NONE);
if (machine_is_n30()) {
/* Turn off suspend on both USB ports, and switch the
* selectable USB port to USB device mode. */
......
......@@ -25,20 +25,18 @@
#include <asm/mach/irq.h>
#include <mach/irqs.h>
#include <mach/hardware.h>
#include <mach/map.h>
#include "map.h"
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <linux/platform_data/i2c-s3c2410.h>
#include <plat/fb.h>
#include "fb.h"
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/samsung-time.h>
#include "devs.h"
#include "cpu.h"
#include "common.h"
#include "s3c64xx.h"
#define UCON S3C2410_UCON_DEFAULT
#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE
......@@ -81,7 +79,7 @@ static void __init ncp_map_io(void)
s3c64xx_init_io(ncp_iodesc, ARRAY_SIZE(ncp_iodesc));
s3c64xx_set_xtal_freq(12000000);
s3c24xx_init_uarts(ncp_uartcfgs, ARRAY_SIZE(ncp_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c64xx_set_timer_source(S3C64XX_PWM3, S3C64XX_PWM4);
}
static void __init ncp_machine_init(void)
......@@ -98,6 +96,5 @@ MACHINE_START(NCP, "NCP")
.init_irq = s3c6410_init_irq,
.map_io = ncp_map_io,
.init_machine = ncp_machine_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
.init_time = s3c64xx_timer_init,
MACHINE_END
......@@ -28,21 +28,19 @@
#include <asm/mach/irq.h>
#include <asm/setup.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
//#include <asm/debug-ll.h>
#include <mach/regs-gpio.h>
#include <mach/gpio-samsung.h>
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <linux/platform_data/i2c-s3c2410.h>
#include <plat/gpio-cfg.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/samsung-time.h>
#include "gpio-cfg.h"
#include "devs.h"
#include "cpu.h"
#include "common.h"
#include "s3c24xx.h"
static struct map_desc nexcoder_iodesc[] __initdata = {
/* nothing here yet */
......@@ -131,7 +129,7 @@ static void __init nexcoder_map_io(void)
{
s3c24xx_init_io(nexcoder_iodesc, ARRAY_SIZE(nexcoder_iodesc));
s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
nexcoder_sensorboard_init();
}
......@@ -139,12 +137,17 @@ static void __init nexcoder_map_io(void)
static void __init nexcoder_init_time(void)
{
s3c2440_init_clocks(12000000);
samsung_timer_init();
s3c24xx_timer_init();
}
static void __init nexcoder_init(void)
{
s3c_i2c0_set_platdata(NULL);
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
S3C_GPIO_PULL_NONE);
platform_add_devices(nexcoder_devices, ARRAY_SIZE(nexcoder_devices));
};
......
......@@ -14,8 +14,8 @@
#include <linux/mfd/tps65010.h>
#include <plat/cpu-freq.h>
#include <mach/gpio-samsung.h>
#include <linux/soc/samsung/s3c-cpu-freq.h>
#include "gpio-samsung.h"
#define OSIRIS_GPIO_DVS S3C2410_GPB(5)
......
......@@ -36,20 +36,17 @@
#include <linux/mtd/nand_ecc.h>
#include <linux/mtd/partitions.h>
#include <plat/cpu.h>
#include <plat/cpu-freq.h>
#include <plat/devs.h>
#include <plat/gpio-cfg.h>
#include <plat/samsung-time.h>
#include <mach/hardware.h>
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include <mach/gpio-samsung.h>
#include "common.h"
#include "cpu.h"
#include <linux/soc/samsung/s3c-cpu-freq.h>
#include "devs.h"
#include "gpio-cfg.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include "s3c24xx.h"
#include "osiris.h"
#include "regs-mem.h"
#include "regs-mem-s3c24xx.h"
/* onboard perihperal map */
......@@ -359,7 +356,7 @@ static void __init osiris_map_io(void)
s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc));
s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
/* check for the newer revision boards with large page nand */
......@@ -384,7 +381,7 @@ static void __init osiris_map_io(void)
static void __init osiris_init_time(void)
{
s3c2440_init_clocks(12000000);
samsung_timer_init();
s3c24xx_timer_init();
}
static void __init osiris_init(void)
......
......@@ -22,14 +22,13 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/regs-gpio.h>
#include "gpio-samsung.h"
#include "gpio-cfg.h"
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/samsung-time.h>
#include "cpu.h"
#include "devs.h"
#include "common.h"
#include "s3c24xx.h"
#include "otom.h"
static struct map_desc otom11_iodesc[] __initdata = {
......@@ -95,18 +94,22 @@ static void __init otom11_map_io(void)
{
s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc));
s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
}
static void __init otom11_init_time(void)
{
s3c2410_init_clocks(12000000);
samsung_timer_init();
s3c24xx_timer_init();
}
static void __init otom11_init(void)
{
s3c_i2c0_set_platdata(NULL);
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
S3C_GPIO_PULL_NONE);
platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices));
}
......
......@@ -28,26 +28,23 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <linux/platform_data/leds-s3c24xx.h>
#include <mach/regs-lcd.h>
#include <mach/fb.h>
#include <linux/platform_data/fb-s3c2410.h>
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <linux/platform_data/usb-s3c2410_udc.h>
#include <linux/platform_data/i2c-s3c2410.h>
#include <mach/gpio-samsung.h>
#include "gpio-samsung.h"
#include <plat/gpio-cfg.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/pm.h>
#include <plat/samsung-time.h>
#include "gpio-cfg.h"
#include "devs.h"
#include "cpu.h"
#include "pm.h"
#include "common.h"
#include "common-smdk.h"
#include "s3c24xx.h"
#include "common-smdk-s3c24xx.h"
static struct map_desc qt2410_iodesc[] __initdata = {
{ 0xe0000000, __phys_to_pfn(S3C2410_CS3+0x01000000), SZ_1M, MT_DEVICE }
......@@ -225,6 +222,20 @@ static struct gpiod_lookup_table qt2410_spi_gpiod_table = {
},
};
static struct gpiod_lookup_table qt2410_mmc_gpiod_table = {
.dev_id = "s3c2410-sdi",
.table = {
/* bus pins */
GPIO_LOOKUP_IDX("GPIOE", 5, "bus", 0, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 6, "bus", 1, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 7, "bus", 2, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 8, "bus", 3, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 9, "bus", 4, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
{ },
},
};
/* Board devices */
static struct platform_device *qt2410_devices[] __initdata = {
......@@ -309,13 +320,13 @@ static void __init qt2410_map_io(void)
{
s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc));
s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
}
static void __init qt2410_init_time(void)
{
s3c2410_init_clocks(12000000);
samsung_timer_init();
s3c24xx_timer_init();
}
static void __init qt2410_machine_init(void)
......@@ -343,9 +354,13 @@ static void __init qt2410_machine_init(void)
s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
s3c_i2c0_set_platdata(NULL);
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
S3C_GPIO_PULL_NONE);
gpiod_add_lookup_table(&qt2410_spi_gpiod_table);
s3c_gpio_setpull(S3C2410_GPB(0), S3C_GPIO_PULL_NONE);
gpiod_add_lookup_table(&qt2410_led_gpio_table);
gpiod_add_lookup_table(&qt2410_mmc_gpiod_table);
platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices));
s3c_pm_init();
}
......
......@@ -24,25 +24,24 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <mach/map.h>
#include <mach/regs-gpio.h>
#include <mach/gpio-samsung.h>
#include "map.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <mach/irqs.h>
#include <plat/adc.h>
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/fb.h>
#include <linux/soc/samsung/s3c-adc.h>
#include "cpu.h"
#include "devs.h"
#include "fb.h"
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <linux/platform_data/touchscreen-s3c2410.h>
#include <video/platform_lcd.h>
#include <video/samsung_fimd.h>
#include <plat/samsung-time.h>
#include "common.h"
#include "regs-modem.h"
#include "regs-srom.h"
#include "s3c64xx.h"
#include "regs-modem-s3c64xx.h"
#include "regs-srom-s3c64xx.h"
#define UCON S3C2410_UCON_DEFAULT
#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
......@@ -208,7 +207,7 @@ static void __init real6410_map_io(void)
s3c64xx_init_io(NULL, 0);
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c64xx_set_timer_source(S3C64XX_PWM3, S3C64XX_PWM4);
/* set the LCD type */
tmp = __raw_readl(S3C64XX_SPCON);
......@@ -330,6 +329,5 @@ MACHINE_START(REAL6410, "REAL6410")
.init_irq = s3c6410_init_irq,
.map_io = real6410_map_io,
.init_machine = real6410_machine_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
.init_time = s3c64xx_timer_init,
MACHINE_END
......@@ -42,21 +42,20 @@
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <linux/platform_data/touchscreen-s3c2410.h>
#include <linux/platform_data/usb-s3c2410_udc.h>
#include <linux/platform_data/fb-s3c2410.h>
#include <sound/uda1380.h>
#include <mach/fb.h>
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include <mach/gpio-samsung.h>
#include "hardware-s3c24xx.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/pm.h>
#include <plat/samsung-time.h>
#include <plat/gpio-cfg.h>
#include "cpu.h"
#include "devs.h"
#include "pm.h"
#include "gpio-cfg.h"
#include "common.h"
#include "s3c24xx.h"
#include "h1940.h"
#define LCD_PWM_PERIOD 192960
......@@ -361,14 +360,17 @@ static struct s3c2410fb_mach_info rx1950_lcd_cfg = {
.lpcsel = 0x02,
.gpccon = 0xaa9556a9,
.gpccon_mask = 0xffc003fc,
.gpccon_reg = S3C2410_GPCCON,
.gpcup = 0x0000ffff,
.gpcup_mask = 0xffffffff,
.gpcup_reg = S3C2410_GPCUP,
.gpdcon = 0xaa90aaa1,
.gpdcon_mask = 0xffc0fff0,
.gpdcon_reg = S3C2410_GPDCON,
.gpdup = 0x0000fcfd,
.gpdup_mask = 0xffffffff,
.gpdup_reg = S3C2410_GPDUP,
};
static struct pwm_lookup rx1950_pwm_lookup[] = {
......@@ -549,6 +551,8 @@ static struct platform_device rx1950_backlight = {
static void rx1950_set_mmc_power(unsigned char power_mode, unsigned short vdd)
{
s3c24xx_mci_def_set_power(power_mode, vdd);
switch (power_mode) {
case MMC_POWER_OFF:
gpio_direction_output(S3C2410_GPJ(1), 0);
......@@ -571,9 +575,16 @@ static struct gpiod_lookup_table rx1950_mmc_gpio_table = {
.dev_id = "s3c2410-sdi",
.table = {
/* Card detect S3C2410_GPF(5) */
GPIO_LOOKUP("GPF", 5, "cd", GPIO_ACTIVE_LOW),
GPIO_LOOKUP("GPIOF", 5, "cd", GPIO_ACTIVE_LOW),
/* Write protect S3C2410_GPH(8) */
GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_LOW),
GPIO_LOOKUP("GPIOH", 8, "wp", GPIO_ACTIVE_LOW),
/* bus pins */
GPIO_LOOKUP_IDX("GPIOE", 5, "bus", 0, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 6, "bus", 1, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 7, "bus", 2, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 8, "bus", 3, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 9, "bus", 4, GPIO_ACTIVE_HIGH),
GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
{ },
},
};
......@@ -728,6 +739,20 @@ static struct i2c_board_info rx1950_i2c_devices[] = {
},
};
static struct gpiod_lookup_table rx1950_audio_gpio_table = {
.dev_id = "rx1950-audio",
.table = {
GPIO_LOOKUP("GPIOG", 12, "hp-gpio", GPIO_ACTIVE_HIGH),
GPIO_LOOKUP("GPIOA", 1, "speaker-power", GPIO_ACTIVE_HIGH),
{ },
},
};
static struct platform_device rx1950_audio = {
.name = "rx1950-audio",
.id = -1,
};
static struct platform_device *rx1950_devices[] __initdata = {
&s3c2410_device_dclk,
&s3c_device_lcd,
......@@ -746,13 +771,14 @@ static struct platform_device *rx1950_devices[] __initdata = {
&power_supply,
&rx1950_battery,
&rx1950_leds,
&rx1950_audio,
};
static void __init rx1950_map_io(void)
{
s3c24xx_init_io(rx1950_iodesc, ARRAY_SIZE(rx1950_iodesc));
s3c24xx_init_uarts(rx1950_uartcfgs, ARRAY_SIZE(rx1950_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
/* setup PM */
......@@ -766,7 +792,7 @@ static void __init rx1950_map_io(void)
static void __init rx1950_init_time(void)
{
s3c2442_init_clocks(16934000);
samsung_timer_init();
s3c24xx_timer_init();
}
static void __init rx1950_init_machine(void)
......@@ -813,6 +839,10 @@ static void __init rx1950_init_machine(void)
gpio_direction_output(S3C2410_GPJ(6), 0);
pwm_add_table(rx1950_pwm_lookup, ARRAY_SIZE(rx1950_pwm_lookup));
gpiod_add_lookup_table(&rx1950_audio_gpio_table);
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
S3C_GPIO_PULL_NONE);
platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices));
i2c_register_board_info(0, rx1950_i2c_devices,
......
......@@ -30,22 +30,20 @@
#include <asm/mach/map.h>
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <linux/platform_data/fb-s3c2410.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <mach/fb.h>
#include <mach/hardware.h>
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include <mach/gpio-samsung.h>
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include "gpio-cfg.h"
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/pm.h>
#include <plat/samsung-time.h>
#include "cpu.h"
#include "devs.h"
#include "pm.h"
#include "common.h"
#include "s3c24xx.h"
#include "h1940.h"
static struct map_desc rx3715_iodesc[] __initdata = {
......@@ -125,13 +123,17 @@ static struct s3c2410fb_mach_info rx3715_fb_info __initdata = {
.gpccon = 0xaa955699,
.gpccon_mask = 0xffc003cc,
.gpccon_reg = S3C2410_GPCCON,
.gpcup = 0x0000ffff,
.gpcup_mask = 0xffffffff,
.gpcup_reg = S3C2410_GPCUP,
.gpdcon = 0xaa95aaa1,
.gpdcon_mask = 0xffc0fff0,
.gpdcon_reg = S3C2410_GPDCON,
.gpdup = 0x0000faff,
.gpdup_mask = 0xffffffff,
.gpdup_reg = S3C2410_GPDUP,
};
static struct mtd_partition __initdata rx3715_nand_part[] = {
......@@ -174,13 +176,13 @@ static void __init rx3715_map_io(void)
{
s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc));
s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
}
static void __init rx3715_init_time(void)
{
s3c2440_init_clocks(16934000);
samsung_timer_init();
s3c24xx_timer_init();
}
/* H1940 and RX3715 need to reserve this for suspend */
......@@ -199,6 +201,9 @@ static void __init rx3715_init_machine(void)
s3c_nand_set_platdata(&rx3715_nand_info);
s3c24xx_fb_set_platdata(&rx3715_fb_info);
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
S3C_GPIO_PULL_NONE);
platform_add_devices(rx3715_devices, ARRAY_SIZE(rx3715_devices));
}
......
......@@ -16,12 +16,12 @@
#include <linux/serial_s3c.h>
#include <asm/mach/arch.h>
#include <mach/map.h>
#include "map.h"
#include <plat/cpu.h>
#include <plat/pm.h>
#include "cpu.h"
#include "pm.h"
#include "common.h"
#include "s3c24xx.h"
static void __init s3c2416_dt_map_io(void)
{
......
......@@ -8,11 +8,10 @@
#include <asm/mach/map.h>
#include <asm/system_misc.h>
#include <plat/cpu.h>
#include <mach/map.h>
#include "cpu.h"
#include "map.h"
#include "common.h"
#include "watchdog-reset.h"
#include "s3c64xx.h"
/*
* IO mapping for shared system controller IP.
......@@ -39,20 +38,6 @@ static void __init s3c64xx_dt_map_io(void)
panic("SoC is not S3C64xx!");
}
static void __init s3c64xx_dt_init_machine(void)
{
samsung_wdt_reset_of_init();
}
static void s3c64xx_dt_restart(enum reboot_mode mode, const char *cmd)
{
if (mode != REBOOT_SOFT)
samsung_wdt_reset();
/* if all else fails, or mode was for soft, jump to 0 */
soft_restart(0);
}
static const char *const s3c64xx_dt_compat[] __initconst = {
"samsung,s3c6400",
"samsung,s3c6410",
......@@ -63,6 +48,4 @@ DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)")
/* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */
.dt_compat = s3c64xx_dt_compat,
.map_io = s3c64xx_dt_map_io,
.init_machine = s3c64xx_dt_init_machine,
.restart = s3c64xx_dt_restart,
MACHINE_END
......@@ -18,25 +18,24 @@
#include <asm/mach-types.h>
#include <asm/mach/map.h>
#include <mach/map.h>
#include <mach/regs-gpio.h>
#include <mach/gpio-samsung.h>
#include "map.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <plat/cpu.h>
#include <plat/devs.h>
#include "cpu.h"
#include "devs.h"
#include <linux/platform_data/i2c-s3c2410.h>
#include <plat/gpio-cfg.h>
#include "gpio-cfg.h"
#include <linux/platform_data/hwmon-s3c.h>
#include <linux/platform_data/usb-ohci-s3c2410.h>
#include <plat/sdhci.h>
#include "sdhci.h"
#include <linux/platform_data/touchscreen-s3c2410.h>
#include <video/platform_lcd.h>
#include <plat/samsung-time.h>
#include "common.h"
#include "s3c64xx.h"
#include "mach-smartq.h"
#include "regs-modem.h"
#include "regs-modem-s3c64xx.h"
#define UCON S3C2410_UCON_DEFAULT
#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)
......@@ -384,7 +383,7 @@ void __init smartq_map_io(void)
s3c64xx_set_xtal_freq(12000000);
s3c64xx_set_xusbxti_freq(12000000);
s3c24xx_init_uarts(smartq_uartcfgs, ARRAY_SIZE(smartq_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
s3c64xx_set_timer_source(S3C64XX_PWM3, S3C64XX_PWM4);
smartq_lcd_mode_set();
}
......
......@@ -15,17 +15,16 @@
#include <video/samsung_fimd.h>
#include <mach/irqs.h>
#include <mach/map.h>
#include <mach/regs-gpio.h>
#include <mach/gpio-samsung.h>
#include "map.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/fb.h>
#include <plat/gpio-cfg.h>
#include <plat/samsung-time.h>
#include "cpu.h"
#include "devs.h"
#include "fb.h"
#include "gpio-cfg.h"
#include "common.h"
#include "s3c64xx.h"
#include "mach-smartq.h"
static struct gpio_led smartq5_leds[] = {
......@@ -151,6 +150,5 @@ MACHINE_START(SMARTQ5, "SmartQ 5")
.init_irq = s3c6410_init_irq,
.map_io = smartq_map_io,
.init_machine = smartq5_machine_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
.init_time = s3c64xx_timer_init,
MACHINE_END
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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