ARM: SoC cleanups for 3.17
This merge window brings a good size of cleanups on various platforms. Among the bigger ones: * Removal of Samsung s5pc100 and s5p64xx platforms. Both of these have lacked active support for quite a while, and after asking around nobody showed interest in keeping them around. If needed, they could be resurrected in the future but it's more likely that we would prefer reintroduction of them as DT and multiplatform-enabled platforms instead. * OMAP4 controller code register define diet. They defined a lot of registers that were never actually used, etc. * Move of some of the Tegra platform code (PMC, APBIO, fuse, powergate) to drivers/soc so it can be shared with 64-bit code. This also converts them over to traditional driver models where possible. * Removal of legacy gpio-samsung driver, since the last users have been removed (moved to pinctrl) Plus a bunch of smaller changes for various platforms that sort of dissapear in the diffstat for the above. clps711x cleanups, shmobile header file refactoring/moves for multiplatform friendliness, some misc cleanups, etc. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQIcBAABAgAGBQJT5DYPAAoJEIwa5zzehBx37egQAIiatNiLLqZnfo3rwGADRz/a POfPovktj68aPcobyzoyhFtToMqGvi9PpysyFTIQD2HJFG+5BtiIAuqtg0875zDe EpBWgsfugrm0YktJWAtUerj60oAmNPbKfaEm1cOOWuM2lb2mV+QkRrwSTAgsqkT7 927BzMXKKBRPOVLL0RYhoF8EXa0Eg8kCqAHP8fJrzVYkRp+UrZJDnGiUP1XmWJN+ VXQMu5SEjcPMtqT7+tfX455RfREHJfBcJ1ZN/dPF8HMWDwClQG0lyc6hifh1MxwO 8DjIZNkfZeKqgDqVyC17re7pc7p8md5HL8WXbrKpK0A9vQ5bRexbPHxcwJ1T/C2Y 465H+st5XXbuzV1gbMwjK1/ycsH0tCyffckk8Yl/2e1Fs7GgPNbAELtTdl+5vV1Y xmDXkyo/9WlRM3LQ23IGKwW7VzN86EfWVuShssfro0fO7xDdb4OOYLdQI+4bCG+h ytQYun1vU32OEyNik5RVNQuZaMrv2c93a3bID4owwuPHPmYOPVUQaqnRX/0E51eA aHZYbk2GlUOV3Kq5aSS4iyLg1Yj+I9/NeH9U+A4nc+PQ5FlgGToaVSCuYuw4DqbP AAG+sqQHbkBMvDPobQz/yd1qZbAb4eLhGy11XK1t5S65rApWI55GwNXnvbyxqt8x wpmxJTASGxcfuZZgKXm7 =gbcE -----END PGP SIGNATURE----- Merge tag 'cleanup-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC cleanups from Olof Johansson: "This merge window brings a good size of cleanups on various platforms. Among the bigger ones: - Removal of Samsung s5pc100 and s5p64xx platforms. Both of these have lacked active support for quite a while, and after asking around nobody showed interest in keeping them around. If needed, they could be resurrected in the future but it's more likely that we would prefer reintroduction of them as DT and multiplatform-enabled platforms instead. - OMAP4 controller code register define diet. They defined a lot of registers that were never actually used, etc. - Move of some of the Tegra platform code (PMC, APBIO, fuse, powergate) to drivers/soc so it can be shared with 64-bit code. This also converts them over to traditional driver models where possible. - Removal of legacy gpio-samsung driver, since the last users have been removed (moved to pinctrl) Plus a bunch of smaller changes for various platforms that sort of dissapear in the diffstat for the above. clps711x cleanups, shmobile header file refactoring/moves for multiplatform friendliness, some misc cleanups, etc" * tag 'cleanup-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (117 commits) drivers: CCI: Correct use of ! and & video: clcd-versatile: Depend on ARM video: fix up versatile CLCD helper move MAINTAINERS: Add sdhci-st file to ARCH/STI architecture ARM: EXYNOS: Fix build breakge with PM_SLEEP=n MAINTAINERS: Remove Kirkwood ARM: tegra: Convert PMC to a driver soc/tegra: fuse: Set up in early initcall ARM: tegra: Always lock the CPU reset vector ARM: tegra: Setup CPU hotplug in a pure initcall soc/tegra: Implement runtime check for Tegra SoCs soc/tegra: fuse: fix dummy functions soc/tegra: fuse: move APB DMA into Tegra20 fuse driver soc/tegra: Add efuse and apbmisc bindings soc/tegra: Add efuse driver for Tegra ARM: tegra: move fuse exports to soc/tegra/fuse.h ARM: tegra: export apb dma readl/writel ARM: tegra: Use a function to get the chip ID ARM: tegra: Sort includes alphabetically ARM: tegra: Move includes to include/soc/tegra ...
This commit is contained in:
commit
44c916d58b
|
@ -0,0 +1,11 @@
|
|||
What: /sys/devices/*/<our-device>/fuse
|
||||
Date: February 2014
|
||||
Contact: Peter De Schrijver <pdeschrijver@nvidia.com>
|
||||
Description: read-only access to the efuses on Tegra20, Tegra30, Tegra114
|
||||
and Tegra124 SoC's from NVIDIA. The efuses contain write once
|
||||
data programmed at the factory. The data is layed out in 32bit
|
||||
words in LSB first format. Each bit represents a single value
|
||||
as decoded from the fuse registers. Bits order/assignment
|
||||
exactly matches the HW registers, including any unused bits.
|
||||
Users: any user space application which wants to read the efuses on
|
||||
Tegra SoC's
|
|
@ -13,8 +13,6 @@ Introduction
|
|||
|
||||
- S3C24XX: See Documentation/arm/Samsung-S3C24XX/Overview.txt for full list
|
||||
- S3C64XX: S3C6400 and S3C6410
|
||||
- S5P6440
|
||||
- S5PC100
|
||||
- S5PC110 / S5PV210
|
||||
|
||||
|
||||
|
@ -34,8 +32,6 @@ Configuration
|
|||
A number of configurations are supplied, as there is no current way of
|
||||
unifying all the SoCs into one kernel.
|
||||
|
||||
s5p6440_defconfig - S5P6440 specific default configuration
|
||||
s5pc100_defconfig - S5PC100 specific default configuration
|
||||
s5pc110_defconfig - S5PC110 specific default configuration
|
||||
s5pv210_defconfig - S5PV210 specific default configuration
|
||||
|
||||
|
@ -67,13 +63,6 @@ Layout changes
|
|||
where to simplify the include and dependency issues involved with having
|
||||
so many different platform directories.
|
||||
|
||||
It was decided to remove plat-s5pc1xx as some of the support was already
|
||||
in plat-s5p or plat-samsung, with the S5PC110 support added with S5PV210
|
||||
the only user was the S5PC100. The S5PC100 specific items where moved to
|
||||
arch/arm/mach-s5pc100.
|
||||
|
||||
|
||||
|
||||
|
||||
Port Contributors
|
||||
-----------------
|
||||
|
|
|
@ -68,7 +68,6 @@ BEGIN {
|
|||
|
||||
while (getline line < ARGV[1] > 0) {
|
||||
if (line ~ /\#define.*_MASK/ &&
|
||||
!(line ~ /S5PC100_EPLL_MASK/) &&
|
||||
!(line ~ /USB_SIG_MASK/)) {
|
||||
splitdefine(line, fields)
|
||||
name = fields[0]
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
NVIDIA Tegra20/Tegra30/Tegr114/Tegra124 fuse block.
|
||||
|
||||
Required properties:
|
||||
- compatible : should be:
|
||||
"nvidia,tegra20-efuse"
|
||||
"nvidia,tegra30-efuse"
|
||||
"nvidia,tegra114-efuse"
|
||||
"nvidia,tegra124-efuse"
|
||||
Details:
|
||||
nvidia,tegra20-efuse: Tegra20 requires using APB DMA to read the fuse data
|
||||
due to a hardware bug. Tegra20 also lacks certain information which is
|
||||
available in later generations such as fab code, lot code, wafer id,..
|
||||
nvidia,tegra30-efuse, nvidia,tegra114-efuse and nvidia,tegra124-efuse:
|
||||
The differences between these SoCs are the size of the efuse array,
|
||||
the location of the spare (OEM programmable) bits and the location of
|
||||
the speedo data.
|
||||
- reg: Should contain 1 entry: the entry gives the physical address and length
|
||||
of the fuse registers.
|
||||
- clocks: Must contain an entry for each entry in clock-names.
|
||||
See ../clocks/clock-bindings.txt for details.
|
||||
- clock-names: Must include the following entries:
|
||||
- fuse
|
||||
- resets: Must contain an entry for each entry in reset-names.
|
||||
See ../reset/reset.txt for details.
|
||||
- reset-names: Must include the following entries:
|
||||
- fuse
|
||||
|
||||
Example:
|
||||
|
||||
fuse@7000f800 {
|
||||
compatible = "nvidia,tegra20-efuse";
|
||||
reg = <0x7000F800 0x400>,
|
||||
<0x70000000 0x400>;
|
||||
clocks = <&tegra_car TEGRA20_CLK_FUSE>;
|
||||
clock-names = "fuse";
|
||||
resets = <&tegra_car 39>;
|
||||
reset-names = "fuse";
|
||||
};
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
NVIDIA Tegra20/Tegra30/Tegr114/Tegra124 apbmisc block
|
||||
|
||||
Required properties:
|
||||
- compatible : should be:
|
||||
"nvidia,tegra20-apbmisc"
|
||||
"nvidia,tegra30-apbmisc"
|
||||
"nvidia,tegra114-apbmisc"
|
||||
"nvidia,tegra124-apbmisc"
|
||||
- reg: Should contain 2 entries: the first entry gives the physical address
|
||||
and length of the registers which contain revision and debug features.
|
||||
The second entry gives the physical address and length of the
|
||||
registers indicating the strapping options.
|
||||
|
|
@ -8,7 +8,6 @@ Required SoC Specific Properties:
|
|||
- compatible: should be one of the following.
|
||||
- samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms
|
||||
- samsung,s3c6410-spi: for s3c6410 platforms
|
||||
- samsung,s5p6440-spi: for s5p6440 and s5p6450 platforms
|
||||
- samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms
|
||||
- samsung,exynos4210-spi: for exynos4 and exynos5 platforms
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@ Required properties:
|
|||
- compatible: value should be one of the following
|
||||
"samsung,s3c2443-fimd"; /* for S3C24XX SoCs */
|
||||
"samsung,s3c6400-fimd"; /* for S3C64XX SoCs */
|
||||
"samsung,s5p6440-fimd"; /* for S5P64X0 SoCs */
|
||||
"samsung,s5pc100-fimd"; /* for S5PC100 SoC */
|
||||
"samsung,s5pv210-fimd"; /* for S5PV210 SoC */
|
||||
"samsung,exynos4210-fimd"; /* for Exynos4 SoCs */
|
||||
"samsung,exynos5250-fimd"; /* for Exynos5 SoCs */
|
||||
|
|
|
@ -1116,14 +1116,13 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
|||
S: Maintained
|
||||
F: arch/arm/mach-berlin/
|
||||
|
||||
ARM/Marvell Dove/Kirkwood/MV78xx0/Orion SOC support
|
||||
ARM/Marvell Dove/MV78xx0/Orion SOC support
|
||||
M: Jason Cooper <jason@lakedaemon.net>
|
||||
M: Andrew Lunn <andrew@lunn.ch>
|
||||
M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: arch/arm/mach-dove/
|
||||
F: arch/arm/mach-kirkwood/
|
||||
F: arch/arm/mach-mv78xx0/
|
||||
F: arch/arm/mach-orion5x/
|
||||
F: arch/arm/plat-orion/
|
||||
|
@ -1376,6 +1375,7 @@ F: drivers/pinctrl/pinctrl-st.c
|
|||
F: drivers/media/rc/st_rc.c
|
||||
F: drivers/i2c/busses/i2c-st.c
|
||||
F: drivers/tty/serial/st-asc.c
|
||||
F: drivers/mmc/host/sdhci-st.c
|
||||
|
||||
ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT
|
||||
M: Lennert Buytenhek <kernel@wantstofly.org>
|
||||
|
|
|
@ -239,13 +239,6 @@ config ARM_PATCH_PHYS_VIRT
|
|||
this feature (eg, building a kernel for a single machine) and
|
||||
you need to shrink the kernel to the minimal size.
|
||||
|
||||
config NEED_MACH_GPIO_H
|
||||
bool
|
||||
help
|
||||
Select this when mach/gpio.h is required to provide special
|
||||
definitions for this platform. The need for mach/gpio.h should
|
||||
be avoided when possible.
|
||||
|
||||
config NEED_MACH_IO_H
|
||||
bool
|
||||
help
|
||||
|
@ -334,7 +327,6 @@ config ARCH_INTEGRATOR
|
|||
select HAVE_TCM
|
||||
select ICST
|
||||
select MULTI_IRQ_HANDLER
|
||||
select NEED_MACH_MEMORY_H
|
||||
select PLAT_VERSATILE
|
||||
select SPARSE_IRQ
|
||||
select USE_OF
|
||||
|
@ -354,7 +346,6 @@ config ARCH_REALVIEW
|
|||
select ICST
|
||||
select NEED_MACH_MEMORY_H
|
||||
select PLAT_VERSATILE
|
||||
select PLAT_VERSATILE_CLCD
|
||||
help
|
||||
This enables support for ARM Ltd RealView boards.
|
||||
|
||||
|
@ -369,7 +360,6 @@ config ARCH_VERSATILE
|
|||
select HAVE_MACH_CLKDEV
|
||||
select ICST
|
||||
select PLAT_VERSATILE
|
||||
select PLAT_VERSATILE_CLCD
|
||||
select PLAT_VERSATILE_CLOCK
|
||||
select VERSATILE_FPGA_IRQ
|
||||
help
|
||||
|
@ -772,42 +762,6 @@ config ARCH_S3C64XX
|
|||
help
|
||||
Samsung S3C64XX series based systems
|
||||
|
||||
config ARCH_S5P64X0
|
||||
bool "Samsung S5P6440 S5P6450"
|
||||
select ATAGS
|
||||
select CLKDEV_LOOKUP
|
||||
select CLKSRC_SAMSUNG_PWM
|
||||
select CPU_V6
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GPIO_SAMSUNG
|
||||
select HAVE_S3C2410_I2C if I2C
|
||||
select HAVE_S3C2410_WATCHDOG if WATCHDOG
|
||||
select HAVE_S3C_RTC if RTC_CLASS
|
||||
select NEED_MACH_GPIO_H
|
||||
select SAMSUNG_ATAGS
|
||||
select SAMSUNG_WDT_RESET
|
||||
help
|
||||
Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440,
|
||||
SMDK6450.
|
||||
|
||||
config ARCH_S5PC100
|
||||
bool "Samsung S5PC100"
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select ATAGS
|
||||
select CLKDEV_LOOKUP
|
||||
select CLKSRC_SAMSUNG_PWM
|
||||
select CPU_V7
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GPIO_SAMSUNG
|
||||
select HAVE_S3C2410_I2C if I2C
|
||||
select HAVE_S3C2410_WATCHDOG if WATCHDOG
|
||||
select HAVE_S3C_RTC if RTC_CLASS
|
||||
select NEED_MACH_GPIO_H
|
||||
select SAMSUNG_ATAGS
|
||||
select SAMSUNG_WDT_RESET
|
||||
help
|
||||
Samsung S5PC100 series based systems
|
||||
|
||||
config ARCH_S5PV210
|
||||
bool "Samsung S5PV210/S5PC110"
|
||||
select ARCH_HAS_HOLES_MEMORYMODEL
|
||||
|
@ -821,7 +775,6 @@ config ARCH_S5PV210
|
|||
select HAVE_S3C2410_I2C if I2C
|
||||
select HAVE_S3C2410_WATCHDOG if WATCHDOG
|
||||
select HAVE_S3C_RTC if RTC_CLASS
|
||||
select NEED_MACH_GPIO_H
|
||||
select NEED_MACH_MEMORY_H
|
||||
select SAMSUNG_ATAGS
|
||||
help
|
||||
|
@ -1018,10 +971,6 @@ source "arch/arm/mach-s3c24xx/Kconfig"
|
|||
|
||||
source "arch/arm/mach-s3c64xx/Kconfig"
|
||||
|
||||
source "arch/arm/mach-s5p64x0/Kconfig"
|
||||
|
||||
source "arch/arm/mach-s5pc100/Kconfig"
|
||||
|
||||
source "arch/arm/mach-s5pv210/Kconfig"
|
||||
|
||||
source "arch/arm/mach-exynos/Kconfig"
|
||||
|
@ -1583,7 +1532,7 @@ source kernel/Kconfig.preempt
|
|||
|
||||
config HZ_FIXED
|
||||
int
|
||||
default 200 if ARCH_EBSA110 || ARCH_S3C24XX || ARCH_S5P64X0 || \
|
||||
default 200 if ARCH_EBSA110 || ARCH_S3C24XX || \
|
||||
ARCH_S5PV210 || ARCH_EXYNOS4
|
||||
default AT91_TIMER_HZ if ARCH_AT91
|
||||
default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE_LEGACY
|
||||
|
@ -2208,7 +2157,6 @@ menu "Power management options"
|
|||
source "kernel/power/Kconfig"
|
||||
|
||||
config ARCH_SUSPEND_POSSIBLE
|
||||
depends on !ARCH_S5PC100
|
||||
depends on CPU_ARM920T || CPU_ARM926T || CPU_FEROCEON || CPU_SA1100 || \
|
||||
CPU_V6 || CPU_V6K || CPU_V7 || CPU_V7M || CPU_XSC3 || CPU_XSCALE || CPU_MOHAWK
|
||||
def_bool y
|
||||
|
|
|
@ -617,53 +617,41 @@ choice
|
|||
depends on PLAT_SAMSUNG
|
||||
select DEBUG_EXYNOS_UART if ARCH_EXYNOS
|
||||
select DEBUG_S3C24XX_UART if ARCH_S3C24XX
|
||||
bool "Use S3C UART 0 for low-level debug"
|
||||
bool "Use Samsung S3C UART 0 for low-level debug"
|
||||
help
|
||||
Say Y here if you want the debug print routines to direct
|
||||
their output to UART 0. The port must have been initialised
|
||||
by the boot-loader before use.
|
||||
|
||||
The uncompressor code port configuration is now handled
|
||||
by CONFIG_S3C_LOWLEVEL_UART_PORT.
|
||||
|
||||
config DEBUG_S3C_UART1
|
||||
depends on PLAT_SAMSUNG
|
||||
select DEBUG_EXYNOS_UART if ARCH_EXYNOS
|
||||
select DEBUG_S3C24XX_UART if ARCH_S3C24XX
|
||||
bool "Use S3C UART 1 for low-level debug"
|
||||
bool "Use Samsung S3C UART 1 for low-level debug"
|
||||
help
|
||||
Say Y here if you want the debug print routines to direct
|
||||
their output to UART 1. The port must have been initialised
|
||||
by the boot-loader before use.
|
||||
|
||||
The uncompressor code port configuration is now handled
|
||||
by CONFIG_S3C_LOWLEVEL_UART_PORT.
|
||||
|
||||
config DEBUG_S3C_UART2
|
||||
depends on PLAT_SAMSUNG
|
||||
select DEBUG_EXYNOS_UART if ARCH_EXYNOS
|
||||
select DEBUG_S3C24XX_UART if ARCH_S3C24XX
|
||||
bool "Use S3C UART 2 for low-level debug"
|
||||
bool "Use Samsung S3C UART 2 for low-level debug"
|
||||
help
|
||||
Say Y here if you want the debug print routines to direct
|
||||
their output to UART 2. The port must have been initialised
|
||||
by the boot-loader before use.
|
||||
|
||||
The uncompressor code port configuration is now handled
|
||||
by CONFIG_S3C_LOWLEVEL_UART_PORT.
|
||||
|
||||
config DEBUG_S3C_UART3
|
||||
depends on PLAT_SAMSUNG && ARCH_EXYNOS
|
||||
select DEBUG_EXYNOS_UART
|
||||
bool "Use S3C UART 3 for low-level debug"
|
||||
bool "Use Samsung S3C UART 3 for low-level debug"
|
||||
help
|
||||
Say Y here if you want the debug print routines to direct
|
||||
their output to UART 3. The port must have been initialised
|
||||
by the boot-loader before use.
|
||||
|
||||
The uncompressor code port configuration is now handled
|
||||
by CONFIG_S3C_LOWLEVEL_UART_PORT.
|
||||
|
||||
config DEBUG_S3C2410_UART0
|
||||
depends on ARCH_S3C24XX
|
||||
select DEBUG_S3C2410_UART
|
||||
|
@ -991,6 +979,7 @@ config DEBUG_STI_UART
|
|||
config DEBUG_LL_INCLUDE
|
||||
string
|
||||
default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250
|
||||
default "debug/clps711x.S" if DEBUG_CLPS711X_UART1 || DEBUG_CLPS711X_UART2
|
||||
default "debug/pl01x.S" if DEBUG_LL_UART_PL01X || DEBUG_UART_PL01X
|
||||
default "debug/exynos.S" if DEBUG_EXYNOS_UART
|
||||
default "debug/efm32.S" if DEBUG_LL_UART_EFM32
|
||||
|
|
|
@ -190,8 +190,6 @@ machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
|
|||
machine-$(CONFIG_ARCH_RPC) += rpc
|
||||
machine-$(CONFIG_ARCH_S3C24XX) += s3c24xx
|
||||
machine-$(CONFIG_ARCH_S3C64XX) += s3c64xx
|
||||
machine-$(CONFIG_ARCH_S5P64X0) += s5p64x0
|
||||
machine-$(CONFIG_ARCH_S5PC100) += s5pc100
|
||||
machine-$(CONFIG_ARCH_S5PV210) += s5pv210
|
||||
machine-$(CONFIG_ARCH_SA1100) += sa1100
|
||||
machine-$(CONFIG_ARCH_SHMOBILE) += shmobile
|
||||
|
|
|
@ -31,11 +31,13 @@
|
|||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a9";
|
||||
reg = <0>;
|
||||
clock-frequency = <533000000>;
|
||||
};
|
||||
cpu@1 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a9";
|
||||
reg = <1>;
|
||||
clock-frequency = <533000000>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
/ {
|
||||
model = "ARM Integrator/AP";
|
||||
compatible = "arm,integrator-ap";
|
||||
dma-ranges = <0x80000000 0x0 0x80000000>;
|
||||
|
||||
aliases {
|
||||
arm,timer-primary = &timer2;
|
||||
|
|
|
@ -985,6 +985,66 @@
|
|||
dma-names = "audio_tx";
|
||||
};
|
||||
};
|
||||
|
||||
abb_mpu: regulator-abb-mpu {
|
||||
compatible = "ti,abb-v2";
|
||||
regulator-name = "abb_mpu";
|
||||
#address-cells = <0>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&sys_clkin>;
|
||||
ti,settling-time = <50>;
|
||||
ti,clock-cycles = <16>;
|
||||
|
||||
reg = <0x4ae07cdc 0x8>, <0x4ae06014 0x4>,
|
||||
<0x4a0021c4 0x8>, <0x4ae0c318 0x4>;
|
||||
reg-names = "base-address", "int-address",
|
||||
"efuse-address", "ldo-address";
|
||||
ti,tranxdone-status-mask = <0x80>;
|
||||
/* LDOVBBMPU_MUX_CTRL */
|
||||
ti,ldovbb-override-mask = <0x400>;
|
||||
/* LDOVBBMPU_VSET_OUT */
|
||||
ti,ldovbb-vset-mask = <0x1F>;
|
||||
|
||||
/*
|
||||
* NOTE: only FBB mode used but actual vset will
|
||||
* determine final biasing
|
||||
*/
|
||||
ti,abb_info = <
|
||||
/*uV ABB efuse rbb_m fbb_m vset_m*/
|
||||
1060000 0 0x0 0 0x02000000 0x01F00000
|
||||
1250000 0 0x4 0 0x02000000 0x01F00000
|
||||
>;
|
||||
};
|
||||
|
||||
abb_mm: regulator-abb-mm {
|
||||
compatible = "ti,abb-v2";
|
||||
regulator-name = "abb_mm";
|
||||
#address-cells = <0>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&sys_clkin>;
|
||||
ti,settling-time = <50>;
|
||||
ti,clock-cycles = <16>;
|
||||
|
||||
reg = <0x4ae07ce4 0x8>, <0x4ae06010 0x4>,
|
||||
<0x4a0021a4 0x8>, <0x4ae0c314 0x4>;
|
||||
reg-names = "base-address", "int-address",
|
||||
"efuse-address", "ldo-address";
|
||||
ti,tranxdone-status-mask = <0x80000000>;
|
||||
/* LDOVBBMM_MUX_CTRL */
|
||||
ti,ldovbb-override-mask = <0x400>;
|
||||
/* LDOVBBMM_VSET_OUT */
|
||||
ti,ldovbb-vset-mask = <0x1F>;
|
||||
|
||||
/*
|
||||
* NOTE: only FBB mode used but actual vset will
|
||||
* determine final biasing
|
||||
*/
|
||||
ti,abb_info = <
|
||||
/*uV ABB efuse rbb_m fbb_m vset_m*/
|
||||
1025000 0 0x0 0 0x02000000 0x01F00000
|
||||
1120000 0 0x4 0 0x02000000 0x01F00000
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -144,6 +144,7 @@
|
|||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a9";
|
||||
reg = <0>;
|
||||
clock-frequency = <400000000>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -220,6 +220,12 @@
|
|||
interrupt-controller;
|
||||
};
|
||||
|
||||
apbmisc@70000800 {
|
||||
compatible = "nvidia,tegra114-apbmisc", "nvidia,tegra20-apbmisc";
|
||||
reg = <0x70000800 0x64 /* Chip revision */
|
||||
0x70000008 0x04>; /* Strapping options */
|
||||
};
|
||||
|
||||
pinmux: pinmux@70000868 {
|
||||
compatible = "nvidia,tegra114-pinmux";
|
||||
reg = <0x70000868 0x148 /* Pad control registers */
|
||||
|
@ -485,6 +491,15 @@
|
|||
clock-names = "pclk", "clk32k_in";
|
||||
};
|
||||
|
||||
fuse@7000f800 {
|
||||
compatible = "nvidia,tegra114-efuse";
|
||||
reg = <0x7000f800 0x400>;
|
||||
clocks = <&tegra_car TEGRA114_CLK_FUSE>;
|
||||
clock-names = "fuse";
|
||||
resets = <&tegra_car 39>;
|
||||
reset-names = "fuse";
|
||||
};
|
||||
|
||||
iommu@70019010 {
|
||||
compatible = "nvidia,tegra114-smmu", "nvidia,tegra30-smmu";
|
||||
reg = <0x70019010 0x02c
|
||||
|
|
|
@ -179,6 +179,12 @@
|
|||
#dma-cells = <1>;
|
||||
};
|
||||
|
||||
apbmisc@0,70000800 {
|
||||
compatible = "nvidia,tegra124-apbmisc", "nvidia,tegra20-apbmisc";
|
||||
reg = <0x0 0x70000800 0x0 0x64>, /* Chip revision */
|
||||
<0x0 0x7000E864 0x0 0x04>; /* Strapping options */
|
||||
};
|
||||
|
||||
pinmux: pinmux@0,70000868 {
|
||||
compatible = "nvidia,tegra124-pinmux";
|
||||
reg = <0x0 0x70000868 0x0 0x164>, /* Pad control registers */
|
||||
|
@ -449,6 +455,15 @@
|
|||
clock-names = "pclk", "clk32k_in";
|
||||
};
|
||||
|
||||
fuse@0,7000f800 {
|
||||
compatible = "nvidia,tegra124-efuse";
|
||||
reg = <0x0 0x7000f800 0x0 0x400>;
|
||||
clocks = <&tegra_car TEGRA124_CLK_FUSE>;
|
||||
clock-names = "fuse";
|
||||
resets = <&tegra_car 39>;
|
||||
reset-names = "fuse";
|
||||
};
|
||||
|
||||
sdhci@0,700b0000 {
|
||||
compatible = "nvidia,tegra124-sdhci";
|
||||
reg = <0x0 0x700b0000 0x0 0x200>;
|
||||
|
|
|
@ -236,6 +236,12 @@
|
|||
interrupt-controller;
|
||||
};
|
||||
|
||||
apbmisc@70000800 {
|
||||
compatible = "nvidia,tegra20-apbmisc";
|
||||
reg = <0x70000800 0x64 /* Chip revision */
|
||||
0x70000008 0x04>; /* Strapping options */
|
||||
};
|
||||
|
||||
pinmux: pinmux@70000014 {
|
||||
compatible = "nvidia,tegra20-pinmux";
|
||||
reg = <0x70000014 0x10 /* Tri-state registers */
|
||||
|
@ -545,6 +551,15 @@
|
|||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
fuse@7000f800 {
|
||||
compatible = "nvidia,tegra20-efuse";
|
||||
reg = <0x7000F800 0x400>;
|
||||
clocks = <&tegra_car TEGRA20_CLK_FUSE>;
|
||||
clock-names = "fuse";
|
||||
resets = <&tegra_car 39>;
|
||||
reset-names = "fuse";
|
||||
};
|
||||
|
||||
pcie-controller@80003000 {
|
||||
compatible = "nvidia,tegra20-pcie";
|
||||
device_type = "pci";
|
||||
|
|
|
@ -335,6 +335,12 @@
|
|||
interrupt-controller;
|
||||
};
|
||||
|
||||
apbmisc@70000800 {
|
||||
compatible = "nvidia,tegra30-apbmisc", "nvidia,tegra20-apbmisc";
|
||||
reg = <0x70000800 0x64 /* Chip revision */
|
||||
0x70000008 0x04>; /* Strapping options */
|
||||
};
|
||||
|
||||
pinmux: pinmux@70000868 {
|
||||
compatible = "nvidia,tegra30-pinmux";
|
||||
reg = <0x70000868 0xd4 /* Pad control registers */
|
||||
|
@ -631,6 +637,15 @@
|
|||
nvidia,ahb = <&ahb>;
|
||||
};
|
||||
|
||||
fuse@7000f800 {
|
||||
compatible = "nvidia,tegra30-efuse";
|
||||
reg = <0x7000f800 0x400>;
|
||||
clocks = <&tegra_car TEGRA30_CLK_FUSE>;
|
||||
clock-names = "fuse";
|
||||
resets = <&tegra_car 39>;
|
||||
reset-names = "fuse";
|
||||
};
|
||||
|
||||
ahub@70080000 {
|
||||
compatible = "nvidia,tegra30-ahub";
|
||||
reg = <0x70080000 0x200
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_ARCH_S5P64X0=y
|
||||
CONFIG_S3C_BOOT_ERROR_RESET=y
|
||||
CONFIG_S3C_LOWLEVEL_UART_PORT=1
|
||||
CONFIG_MACH_SMDK6440=y
|
||||
CONFIG_MACH_SMDK6450=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_AEABI=y
|
||||
CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x20800000,8M console=ttySAC1,115200 init=/linuxrc"
|
||||
CONFIG_FPE_NWFPE=y
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||
# CONFIG_MISC_DEVICES is not set
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=3
|
||||
CONFIG_SERIAL_SAMSUNG=y
|
||||
CONFIG_SERIAL_SAMSUNG_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
# CONFIG_HWMON is not set
|
||||
CONFIG_DISPLAY_SUPPORT=y
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT3_FS_POSIX_ACL=y
|
||||
CONFIG_EXT3_FS_SECURITY=y
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_CRAMFS=y
|
||||
CONFIG_ROMFS_FS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ASCII=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_DEBUG_RT_MUTEXES=y
|
||||
CONFIG_DEBUG_SPINLOCK=y
|
||||
CONFIG_DEBUG_MUTEXES=y
|
||||
CONFIG_DEBUG_SPINLOCK_SLEEP=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
|
||||
CONFIG_SYSCTL_SYSCALL_CHECK=y
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_DEBUG_ERRORS=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
CONFIG_DEBUG_S3C_UART=1
|
||||
CONFIG_CRYPTO=y
|
||||
# CONFIG_CRYPTO_ANSI_CPRNG is not set
|
||||
CONFIG_CRC_CCITT=y
|
|
@ -1,49 +0,0 @@
|
|||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_ARCH_S5PC100=y
|
||||
CONFIG_MACH_SMDKC100=y
|
||||
CONFIG_AEABI=y
|
||||
CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=cramfs init=/linuxrc console=ttySAC2,115200 mem=128M"
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||
CONFIG_EEPROM_AT24=y
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_SAMSUNG=y
|
||||
CONFIG_SERIAL_SAMSUNG_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_DEBUG=y
|
||||
CONFIG_MMC_UNSAFE_RESUME=y
|
||||
CONFIG_SDIO_UART=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT3_FS_POSIX_ACL=y
|
||||
CONFIG_EXT3_FS_SECURITY=y
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_CRAMFS=y
|
||||
CONFIG_ROMFS_FS=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_DEBUG_RT_MUTEXES=y
|
||||
CONFIG_DEBUG_SPINLOCK=y
|
||||
CONFIG_DEBUG_MUTEXES=y
|
||||
CONFIG_DEBUG_SPINLOCK_SLEEP=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
|
||||
CONFIG_SYSCTL_SYSCALL_CHECK=y
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_DEBUG_ERRORS=y
|
||||
CONFIG_DEBUG_LL=y
|
|
@ -5,12 +5,6 @@
|
|||
#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO
|
||||
#endif
|
||||
|
||||
/* not all ARM platforms necessarily support this API ... */
|
||||
#ifdef CONFIG_NEED_MACH_GPIO_H
|
||||
#include <mach/gpio.h>
|
||||
#endif
|
||||
|
||||
#ifndef __ARM_GPIOLIB_COMPLEX
|
||||
/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
|
||||
#include <asm-generic/gpio.h>
|
||||
|
||||
|
@ -18,7 +12,6 @@
|
|||
#define gpio_get_value __gpio_get_value
|
||||
#define gpio_set_value __gpio_set_value
|
||||
#define gpio_cansleep __gpio_cansleep
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Provide a default gpio_to_irq() which should satisfy every case.
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DEBUG_CLPS711X_UART2
|
||||
#define CLPS711X_UART_PADDR (0x80000000 + 0x0000)
|
||||
#define CLPS711X_UART_VADDR (0xfeff0000 + 0x0000)
|
||||
#else
|
||||
#define CLPS711X_UART_PADDR (0x80000000 + 0x1000)
|
||||
#define CLPS711X_UART_VADDR (0xfeff0000 + 0x1000)
|
||||
#endif
|
||||
|
||||
#define SYSFLG (0x0140)
|
||||
#define SYSFLG_UBUSY (1 << 11)
|
||||
#define UARTDR (0x0480)
|
||||
|
||||
.macro addruart, rp, rv, tmp
|
||||
ldr \rv, =CLPS711X_UART_VADDR
|
||||
ldr \rp, =CLPS711X_UART_PADDR
|
||||
.endm
|
||||
|
||||
.macro waituart,rd,rx
|
||||
.endm
|
||||
|
||||
.macro senduart,rd,rx
|
||||
str \rd, [\rx, #UARTDR]
|
||||
.endm
|
||||
|
||||
.macro busyuart,rd,rx
|
||||
1001: ldr \rd, [\rx, #SYSFLG]
|
||||
tst \rd, #SYSFLG_UBUSY
|
||||
bne 1001b
|
||||
.endm
|
|
@ -266,7 +266,6 @@ MACHINE_START(AUTCPU12, "autronix autcpu12")
|
|||
/* Maintainer: Thomas Gleixner */
|
||||
.atag_offset = 0x20000,
|
||||
.map_io = clps711x_map_io,
|
||||
.init_early = clps711x_init_early,
|
||||
.init_irq = clps711x_init_irq,
|
||||
.init_time = clps711x_timer_init,
|
||||
.init_machine = autcpu12_init,
|
||||
|
|
|
@ -140,7 +140,6 @@ MACHINE_START(CDB89712, "Cirrus-CDB89712")
|
|||
/* Maintainer: Ray Lehtiniemi */
|
||||
.atag_offset = 0x100,
|
||||
.map_io = clps711x_map_io,
|
||||
.init_early = clps711x_init_early,
|
||||
.init_irq = clps711x_init_irq,
|
||||
.init_time = clps711x_timer_init,
|
||||
.init_machine = cdb89712_init,
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <asm/mach/arch.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "devices.h"
|
||||
|
||||
static void __init
|
||||
fixup_clep7312(struct tag *tags, char **cmdline)
|
||||
|
@ -37,8 +38,8 @@ MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312")
|
|||
.atag_offset = 0x0100,
|
||||
.fixup = fixup_clep7312,
|
||||
.map_io = clps711x_map_io,
|
||||
.init_early = clps711x_init_early,
|
||||
.init_irq = clps711x_init_irq,
|
||||
.init_time = clps711x_timer_init,
|
||||
.init_machine = clps711x_devices_init,
|
||||
.restart = clps711x_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -148,11 +148,6 @@ fixup_edb7211(struct tag *tags, char **cmdline)
|
|||
memblock_add(0xc1000000, SZ_8M);
|
||||
}
|
||||
|
||||
static void __init edb7211_init(void)
|
||||
{
|
||||
clps711x_devices_init();
|
||||
}
|
||||
|
||||
static void __init edb7211_init_late(void)
|
||||
{
|
||||
gpio_request_array(edb7211_gpios, ARRAY_SIZE(edb7211_gpios));
|
||||
|
@ -178,10 +173,9 @@ MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")
|
|||
.fixup = fixup_edb7211,
|
||||
.reserve = edb7211_reserve,
|
||||
.map_io = clps711x_map_io,
|
||||
.init_early = clps711x_init_early,
|
||||
.init_irq = clps711x_init_irq,
|
||||
.init_time = clps711x_timer_init,
|
||||
.init_machine = edb7211_init,
|
||||
.init_machine = clps711x_devices_init,
|
||||
.init_late = edb7211_init_late,
|
||||
.restart = clps711x_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -365,7 +365,6 @@ MACHINE_START(P720T, "ARM-Prospector720T")
|
|||
.atag_offset = 0x100,
|
||||
.fixup = fixup_p720t,
|
||||
.map_io = clps711x_map_io,
|
||||
.init_early = clps711x_init_early,
|
||||
.init_irq = clps711x_init_irq,
|
||||
.init_time = clps711x_timer_init,
|
||||
.init_machine = p720t_init,
|
||||
|
|
|
@ -193,15 +193,3 @@ void clps711x_restart(enum reboot_mode mode, const char *cmd)
|
|||
{
|
||||
soft_restart(0);
|
||||
}
|
||||
|
||||
static void clps711x_idle(void)
|
||||
{
|
||||
clps_writel(1, HALT);
|
||||
asm("mov r0, r0");
|
||||
asm("mov r0, r0");
|
||||
}
|
||||
|
||||
void __init clps711x_init_early(void)
|
||||
{
|
||||
arm_pm_idle = clps711x_idle;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ extern void clps711x_map_io(void);
|
|||
extern void clps711x_init_irq(void);
|
||||
extern void clps711x_timer_init(void);
|
||||
extern void clps711x_restart(enum reboot_mode mode, const char *cmd);
|
||||
extern void clps711x_init_early(void);
|
||||
|
||||
/* drivers/irqchip/irq-clps711x.c */
|
||||
void clps711x_intc_init(phys_addr_t, resource_size_t);
|
||||
|
|
|
@ -14,6 +14,15 @@
|
|||
|
||||
#include <mach/hardware.h>
|
||||
|
||||
static const struct resource clps711x_cpuidle_res __initconst =
|
||||
DEFINE_RES_MEM(CLPS711X_PHYS_BASE + HALT, SZ_128);
|
||||
|
||||
static void __init clps711x_add_cpuidle(void)
|
||||
{
|
||||
platform_device_register_simple("clps711x-cpuidle", PLATFORM_DEVID_NONE,
|
||||
&clps711x_cpuidle_res, 1);
|
||||
}
|
||||
|
||||
static const phys_addr_t clps711x_gpios[][2] __initconst = {
|
||||
{ PADR, PADDR },
|
||||
{ PBDR, PBDDR },
|
||||
|
@ -83,6 +92,7 @@ static void __init clps711x_add_uart(void)
|
|||
|
||||
void __init clps711x_devices_init(void)
|
||||
{
|
||||
clps711x_add_cpuidle();
|
||||
clps711x_add_gpio();
|
||||
clps711x_add_syscon();
|
||||
clps711x_add_uart();
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
/* arch/arm/mach-clps711x/include/mach/debug-macro.S
|
||||
*
|
||||
* Debugging macro include header
|
||||
*
|
||||
* Copyright (C) 1994-1999 Russell King
|
||||
* Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <mach/hardware.h>
|
||||
|
||||
.macro addruart, rp, rv, tmp
|
||||
#ifndef CONFIG_DEBUG_CLPS711X_UART2
|
||||
mov \rp, #0x0000 @ UART1
|
||||
#else
|
||||
mov \rp, #0x1000 @ UART2
|
||||
#endif
|
||||
orr \rv, \rp, #CLPS711X_VIRT_BASE
|
||||
orr \rp, \rp, #CLPS711X_PHYS_BASE
|
||||
.endm
|
||||
|
||||
.macro senduart,rd,rx
|
||||
str \rd, [\rx, #0x0480] @ UARTDR
|
||||
.endm
|
||||
|
||||
.macro waituart,rd,rx
|
||||
.endm
|
||||
|
||||
.macro busyuart,rd,rx
|
||||
1001: ldr \rd, [\rx, #0x0140] @ SYSFLGx
|
||||
tst \rd, #1 << 11 @ UBUSYx
|
||||
bne 1001b
|
||||
.endm
|
||||
|
|
@ -24,10 +24,7 @@
|
|||
|
||||
#include <mach/clps711x.h>
|
||||
|
||||
#define IO_ADDRESS(x) (0xdc000000 + (((x) & 0x03ffffff) | \
|
||||
(((x) >> 2) & 0x3c000000)))
|
||||
|
||||
#define CLPS711X_VIRT_BASE IOMEM(IO_ADDRESS(CLPS711X_PHYS_BASE))
|
||||
#define CLPS711X_VIRT_BASE IOMEM(0xfeff0000)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#define clps_readb(off) readb(CLPS711X_VIRT_BASE + (off))
|
||||
|
|
|
@ -111,25 +111,14 @@ IS_SAMSUNG_CPU(exynos5800, EXYNOS5800_SOC_ID, EXYNOS5_SOC_MASK)
|
|||
#define soc_is_exynos5() (soc_is_exynos5250() || soc_is_exynos5410() || \
|
||||
soc_is_exynos5420() || soc_is_exynos5800())
|
||||
|
||||
void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
|
||||
|
||||
struct map_desc;
|
||||
extern void __iomem *sysram_ns_base_addr;
|
||||
extern void __iomem *sysram_base_addr;
|
||||
void exynos_init_io(void);
|
||||
void exynos_restart(enum reboot_mode mode, const char *cmd);
|
||||
extern void __iomem *pmu_base_addr;
|
||||
void exynos_sysram_init(void);
|
||||
void exynos_cpuidle_init(void);
|
||||
void exynos_cpufreq_init(void);
|
||||
void exynos_init_late(void);
|
||||
|
||||
void exynos_firmware_init(void);
|
||||
|
||||
#ifdef CONFIG_PINCTRL_EXYNOS
|
||||
extern u32 exynos_get_eint_wake_mask(void);
|
||||
#else
|
||||
static inline u32 exynos_get_eint_wake_mask(void) { return 0xffffffff; }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
extern void __init exynos_pm_init(void);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_domain.h>
|
||||
#include <linux/irqchip.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
|
@ -29,6 +30,9 @@
|
|||
#include "common.h"
|
||||
#include "mfc.h"
|
||||
#include "regs-pmu.h"
|
||||
#include "regs-sys.h"
|
||||
|
||||
void __iomem *pmu_base_addr;
|
||||
|
||||
static struct map_desc exynos4_iodesc[] __initdata = {
|
||||
{
|
||||
|
@ -143,7 +147,7 @@ static struct map_desc exynos5_iodesc[] __initdata = {
|
|||
},
|
||||
};
|
||||
|
||||
void exynos_restart(enum reboot_mode mode, const char *cmd)
|
||||
static void exynos_restart(enum reboot_mode mode, const char *cmd)
|
||||
{
|
||||
struct device_node *np;
|
||||
u32 val = 0x1;
|
||||
|
@ -204,7 +208,7 @@ void __init exynos_sysram_init(void)
|
|||
}
|
||||
}
|
||||
|
||||
void __init exynos_init_late(void)
|
||||
static void __init exynos_init_late(void)
|
||||
{
|
||||
if (of_machine_is_compatible("samsung,exynos5440"))
|
||||
/* to be supported later */
|
||||
|
@ -251,7 +255,7 @@ static void __init exynos_map_io(void)
|
|||
iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc));
|
||||
}
|
||||
|
||||
void __init exynos_init_io(void)
|
||||
static void __init exynos_init_io(void)
|
||||
{
|
||||
debug_ll_io_init();
|
||||
|
||||
|
@ -263,6 +267,39 @@ void __init exynos_init_io(void)
|
|||
exynos_map_io();
|
||||
}
|
||||
|
||||
static const struct of_device_id exynos_dt_pmu_match[] = {
|
||||
{ .compatible = "samsung,exynos3250-pmu" },
|
||||
{ .compatible = "samsung,exynos4210-pmu" },
|
||||
{ .compatible = "samsung,exynos4212-pmu" },
|
||||
{ .compatible = "samsung,exynos4412-pmu" },
|
||||
{ .compatible = "samsung,exynos5250-pmu" },
|
||||
{ .compatible = "samsung,exynos5420-pmu" },
|
||||
{ /*sentinel*/ },
|
||||
};
|
||||
|
||||
static void exynos_map_pmu(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
|
||||
np = of_find_matching_node(NULL, exynos_dt_pmu_match);
|
||||
if (np)
|
||||
pmu_base_addr = of_iomap(np, 0);
|
||||
|
||||
if (!pmu_base_addr)
|
||||
panic("failed to find exynos pmu register\n");
|
||||
}
|
||||
|
||||
static void __init exynos_init_irq(void)
|
||||
{
|
||||
irqchip_init();
|
||||
/*
|
||||
* Since platsmp.c needs pmu base address by the time
|
||||
* DT is not unflatten so we can't use DT APIs before
|
||||
* init_irq
|
||||
*/
|
||||
exynos_map_pmu();
|
||||
}
|
||||
|
||||
static void __init exynos_dt_machine_init(void)
|
||||
{
|
||||
struct device_node *i2c_np;
|
||||
|
@ -352,6 +389,7 @@ DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)")
|
|||
.smp = smp_ops(exynos_smp_ops),
|
||||
.map_io = exynos_init_io,
|
||||
.init_early = exynos_firmware_init,
|
||||
.init_irq = exynos_init_irq,
|
||||
.init_machine = exynos_dt_machine_init,
|
||||
.init_late = exynos_init_late,
|
||||
.dt_compat = exynos_dt_compat,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
* linux/arch/arm/mach-exynos4/headsmp.S
|
||||
*
|
||||
* Cloned from linux/arch/arm/mach-realview/headsmp.S
|
||||
*
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* linux arch/arm/mach-exynos4/hotplug.c
|
||||
*
|
||||
/*
|
||||
* Cloned from linux/arch/arm/mach-realview/hotplug.c
|
||||
*
|
||||
* Copyright (C) 2002 ARM Ltd.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* linux/arch/arm/mach-exynos/include/mach/map.h
|
||||
*
|
||||
/*
|
||||
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com/
|
||||
*
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* linux/arch/arm/mach-exynos4/include/mach/memory.h
|
||||
*
|
||||
/*
|
||||
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* linux/arch/arm/mach-exynos4/platsmp.c
|
||||
*
|
||||
/*
|
||||
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
|
@ -32,6 +31,72 @@
|
|||
|
||||
extern void exynos4_secondary_startup(void);
|
||||
|
||||
/**
|
||||
* exynos_core_power_down : power down the specified cpu
|
||||
* @cpu : the cpu to power down
|
||||
*
|
||||
* Power down the specified cpu. The sequence must be finished by a
|
||||
* call to cpu_do_idle()
|
||||
*
|
||||
*/
|
||||
void exynos_cpu_power_down(int cpu)
|
||||
{
|
||||
__raw_writel(0, EXYNOS_ARM_CORE_CONFIGURATION(cpu));
|
||||
}
|
||||
|
||||
/**
|
||||
* exynos_cpu_power_up : power up the specified cpu
|
||||
* @cpu : the cpu to power up
|
||||
*
|
||||
* Power up the specified cpu
|
||||
*/
|
||||
void exynos_cpu_power_up(int cpu)
|
||||
{
|
||||
__raw_writel(S5P_CORE_LOCAL_PWR_EN,
|
||||
EXYNOS_ARM_CORE_CONFIGURATION(cpu));
|
||||
}
|
||||
|
||||
/**
|
||||
* exynos_cpu_power_state : returns the power state of the cpu
|
||||
* @cpu : the cpu to retrieve the power state from
|
||||
*
|
||||
*/
|
||||
int exynos_cpu_power_state(int cpu)
|
||||
{
|
||||
return (__raw_readl(EXYNOS_ARM_CORE_STATUS(cpu)) &
|
||||
S5P_CORE_LOCAL_PWR_EN);
|
||||
}
|
||||
|
||||
/**
|
||||
* exynos_cluster_power_down : power down the specified cluster
|
||||
* @cluster : the cluster to power down
|
||||
*/
|
||||
void exynos_cluster_power_down(int cluster)
|
||||
{
|
||||
__raw_writel(0, EXYNOS_COMMON_CONFIGURATION(cluster));
|
||||
}
|
||||
|
||||
/**
|
||||
* exynos_cluster_power_up : power up the specified cluster
|
||||
* @cluster : the cluster to power up
|
||||
*/
|
||||
void exynos_cluster_power_up(int cluster)
|
||||
{
|
||||
__raw_writel(S5P_CORE_LOCAL_PWR_EN,
|
||||
EXYNOS_COMMON_CONFIGURATION(cluster));
|
||||
}
|
||||
|
||||
/**
|
||||
* exynos_cluster_power_state : returns the power state of the cluster
|
||||
* @cluster : the cluster to retrieve the power state from
|
||||
*
|
||||
*/
|
||||
int exynos_cluster_power_state(int cluster)
|
||||
{
|
||||
return (__raw_readl(EXYNOS_COMMON_STATUS(cluster)) &
|
||||
S5P_CORE_LOCAL_PWR_EN);
|
||||
}
|
||||
|
||||
static inline void __iomem *cpu_boot_reg_base(void)
|
||||
{
|
||||
if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1)
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "common.h"
|
||||
#include "regs-pmu.h"
|
||||
#include "regs-sys.h"
|
||||
|
||||
/**
|
||||
* struct exynos_wkup_irq - Exynos GIC to PMU IRQ mapping
|
||||
|
@ -100,72 +101,6 @@ static int exynos_irq_set_wake(struct irq_data *data, unsigned int state)
|
|||
return -ENOENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* exynos_core_power_down : power down the specified cpu
|
||||
* @cpu : the cpu to power down
|
||||
*
|
||||
* Power down the specified cpu. The sequence must be finished by a
|
||||
* call to cpu_do_idle()
|
||||
*
|
||||
*/
|
||||
void exynos_cpu_power_down(int cpu)
|
||||
{
|
||||
__raw_writel(0, EXYNOS_ARM_CORE_CONFIGURATION(cpu));
|
||||
}
|
||||
|
||||
/**
|
||||
* exynos_cpu_power_up : power up the specified cpu
|
||||
* @cpu : the cpu to power up
|
||||
*
|
||||
* Power up the specified cpu
|
||||
*/
|
||||
void exynos_cpu_power_up(int cpu)
|
||||
{
|
||||
__raw_writel(S5P_CORE_LOCAL_PWR_EN,
|
||||
EXYNOS_ARM_CORE_CONFIGURATION(cpu));
|
||||
}
|
||||
|
||||
/**
|
||||
* exynos_cpu_power_state : returns the power state of the cpu
|
||||
* @cpu : the cpu to retrieve the power state from
|
||||
*
|
||||
*/
|
||||
int exynos_cpu_power_state(int cpu)
|
||||
{
|
||||
return (__raw_readl(EXYNOS_ARM_CORE_STATUS(cpu)) &
|
||||
S5P_CORE_LOCAL_PWR_EN);
|
||||
}
|
||||
|
||||
/**
|
||||
* exynos_cluster_power_down : power down the specified cluster
|
||||
* @cluster : the cluster to power down
|
||||
*/
|
||||
void exynos_cluster_power_down(int cluster)
|
||||
{
|
||||
__raw_writel(0, EXYNOS_COMMON_CONFIGURATION(cluster));
|
||||
}
|
||||
|
||||
/**
|
||||
* exynos_cluster_power_up : power up the specified cluster
|
||||
* @cluster : the cluster to power up
|
||||
*/
|
||||
void exynos_cluster_power_up(int cluster)
|
||||
{
|
||||
__raw_writel(S5P_CORE_LOCAL_PWR_EN,
|
||||
EXYNOS_COMMON_CONFIGURATION(cluster));
|
||||
}
|
||||
|
||||
/**
|
||||
* exynos_cluster_power_state : returns the power state of the cluster
|
||||
* @cluster : the cluster to retrieve the power state from
|
||||
*
|
||||
*/
|
||||
int exynos_cluster_power_state(int cluster)
|
||||
{
|
||||
return (__raw_readl(EXYNOS_COMMON_STATUS(cluster)) &
|
||||
S5P_CORE_LOCAL_PWR_EN);
|
||||
}
|
||||
|
||||
#define EXYNOS_BOOT_VECTOR_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \
|
||||
S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
|
||||
(sysram_base_addr + 0x24) : S5P_INFORM0))
|
||||
|
|
|
@ -23,8 +23,7 @@
|
|||
#include <linux/of_platform.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include "regs-pmu.h"
|
||||
|
||||
#define INT_LOCAL_PWR_EN 0x7
|
||||
#define MAX_CLK_PER_DOMAIN 4
|
||||
|
||||
/*
|
||||
|
@ -63,13 +62,13 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
|
|||
}
|
||||
}
|
||||
|
||||
pwr = power_on ? S5P_INT_LOCAL_PWR_EN : 0;
|
||||
pwr = power_on ? INT_LOCAL_PWR_EN : 0;
|
||||
__raw_writel(pwr, base);
|
||||
|
||||
/* Wait max 1ms */
|
||||
timeout = 10;
|
||||
|
||||
while ((__raw_readl(base + 0x4) & S5P_INT_LOCAL_PWR_EN) != pwr) {
|
||||
while ((__raw_readl(base + 0x4) & INT_LOCAL_PWR_EN) != pwr) {
|
||||
if (!timeout) {
|
||||
op = (power_on) ? "enable" : "disable";
|
||||
pr_err("Power domain %s %s failed\n", domain->name, op);
|
||||
|
@ -231,7 +230,7 @@ static __init int exynos4_pm_init_power_domain(void)
|
|||
no_clk:
|
||||
platform_set_drvdata(pdev, pd);
|
||||
|
||||
on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN;
|
||||
on = __raw_readl(pd->base + 0x4) & INT_LOCAL_PWR_EN;
|
||||
|
||||
pm_genpd_init(&pd->pd, NULL, !on);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/bug.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "regs-pmu.h"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include <mach/map.h>
|
||||
|
||||
#define S5P_PMUREG(x) (S5P_VA_PMU + (x))
|
||||
#define S5P_SYSREG(x) (S3C_VA_SYS + (x))
|
||||
|
||||
#define S5P_CENTRAL_SEQ_CONFIGURATION S5P_PMUREG(0x0200)
|
||||
|
||||
|
@ -127,7 +126,6 @@
|
|||
#define S5P_PAD_RET_EBIB_OPTION S5P_PMUREG(0x31A8)
|
||||
|
||||
#define S5P_CORE_LOCAL_PWR_EN 0x3
|
||||
#define S5P_INT_LOCAL_PWR_EN 0x7
|
||||
|
||||
/* Only for EXYNOS4210 */
|
||||
#define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154)
|
||||
|
@ -188,8 +186,6 @@
|
|||
|
||||
/* For EXYNOS5 */
|
||||
|
||||
#define EXYNOS5_SYS_I2C_CFG S5P_SYSREG(0x0234)
|
||||
|
||||
#define EXYNOS5_AUTO_WDTRESET_DISABLE S5P_PMUREG(0x0408)
|
||||
#define EXYNOS5_MASK_WDTRESET_REQUEST S5P_PMUREG(0x040C)
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2014 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* EXYNOS - system register definition
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_REGS_SYS_H
|
||||
#define __ASM_ARCH_REGS_SYS_H __FILE__
|
||||
|
||||
#include <mach/map.h>
|
||||
|
||||
#define S5P_SYSREG(x) (S3C_VA_SYS + (x))
|
||||
|
||||
/* For EXYNOS5 */
|
||||
#define EXYNOS5_SYS_I2C_CFG S5P_SYSREG(0x0234)
|
||||
|
||||
#endif /* __ASM_ARCH_REGS_SYS_H */
|
|
@ -17,7 +17,6 @@ config ARCH_INTEGRATOR_CP
|
|||
bool "Support Integrator/CP platform"
|
||||
select ARCH_CINTEGRATOR
|
||||
select ARM_TIMER_SP804
|
||||
select PLAT_VERSATILE_CLCD
|
||||
select SERIAL_AMBA_PL011 if TTY
|
||||
select SERIAL_AMBA_PL011_CONSOLE if TTY
|
||||
select SOC_BUS
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* arch/arm/mach-integrator/include/mach/memory.h
|
||||
*
|
||||
* Copyright (C) 1999 ARM Limited
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#ifndef __ASM_ARCH_MEMORY_H
|
||||
#define __ASM_ARCH_MEMORY_H
|
||||
|
||||
#define BUS_OFFSET UL(0x80000000)
|
||||
#define __virt_to_bus(x) ((x) - PAGE_OFFSET + BUS_OFFSET)
|
||||
#define __bus_to_virt(x) ((x) - BUS_OFFSET + PAGE_OFFSET)
|
||||
#define __pfn_to_bus(x) (__pfn_to_phys(x) + (BUS_OFFSET - PHYS_OFFSET))
|
||||
#define __bus_to_pfn(x) __phys_to_pfn((x) - (BUS_OFFSET - PHYS_OFFSET))
|
||||
|
||||
#endif
|
|
@ -18,6 +18,7 @@
|
|||
#include <linux/amba/bus.h>
|
||||
#include <linux/amba/kmi.h>
|
||||
#include <linux/amba/clcd.h>
|
||||
#include <linux/platform_data/video-clcd-versatile.h>
|
||||
#include <linux/amba/mmci.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/irqchip/versatile-fpga.h>
|
||||
|
@ -36,8 +37,6 @@
|
|||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
#include <plat/clcd.h>
|
||||
|
||||
#include "hardware.h"
|
||||
#include "cm.h"
|
||||
#include "common.h"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#define SM_nCS0_nCS0 MFP_CFG(SM_nCS0, AF0)
|
||||
#define SM_ADV_SM_ADV MFP_CFG(SM_ADV, AF0)
|
||||
#define SM_SCLK_SM_SCLK MFP_CFG(SM_SCLK, AF0)
|
||||
#define SM_SCLK_SM_SCLK MFP_CFG(SM_SCLK, AF0)
|
||||
#define SM_BE0_SM_BE0 MFP_CFG(SM_BE0, AF1)
|
||||
#define SM_BE1_SM_BE1 MFP_CFG(SM_BE1, AF1)
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@ static struct clk *ocpi_ck;
|
|||
|
||||
/*
|
||||
* Enables device access to OMAP buses via the OCPI bridge
|
||||
* FIXME: Add locking
|
||||
*/
|
||||
int ocpi_enable(void)
|
||||
{
|
||||
|
|
|
@ -21,10 +21,7 @@
|
|||
|
||||
#include <asm/div64.h>
|
||||
|
||||
#include "soc.h"
|
||||
#include "clock.h"
|
||||
#include "cm-regbits-24xx.h"
|
||||
#include "cm-regbits-34xx.h"
|
||||
|
||||
/* DPLL rate rounding: minimum DPLL multiplier, divider values */
|
||||
#define DPLL_MIN_MULTIPLIER 2
|
||||
|
@ -44,20 +41,12 @@
|
|||
#define DPLL_ROUNDING_VAL ((DPLL_SCALE_BASE / 2) * \
|
||||
(DPLL_SCALE_FACTOR / DPLL_SCALE_BASE))
|
||||
|
||||
/* DPLL valid Fint frequency band limits - from 34xx TRM Section 4.7.6.2 */
|
||||
#define OMAP3430_DPLL_FINT_BAND1_MIN 750000
|
||||
#define OMAP3430_DPLL_FINT_BAND1_MAX 2100000
|
||||
#define OMAP3430_DPLL_FINT_BAND2_MIN 7500000
|
||||
#define OMAP3430_DPLL_FINT_BAND2_MAX 21000000
|
||||
|
||||
/*
|
||||
* DPLL valid Fint frequency range for OMAP36xx and OMAP4xxx.
|
||||
* From device data manual section 4.3 "DPLL and DLL Specifications".
|
||||
*/
|
||||
#define OMAP3PLUS_DPLL_FINT_JTYPE_MIN 500000
|
||||
#define OMAP3PLUS_DPLL_FINT_JTYPE_MAX 2500000
|
||||
#define OMAP3PLUS_DPLL_FINT_MIN 32000
|
||||
#define OMAP3PLUS_DPLL_FINT_MAX 52000000
|
||||
|
||||
/* _dpll_test_fint() return codes */
|
||||
#define DPLL_FINT_UNDERFLOW -1
|
||||
|
@ -87,33 +76,31 @@ static int _dpll_test_fint(struct clk_hw_omap *clk, unsigned int n)
|
|||
/* DPLL divider must result in a valid jitter correction val */
|
||||
fint = __clk_get_rate(__clk_get_parent(clk->hw.clk)) / n;
|
||||
|
||||
if (cpu_is_omap24xx()) {
|
||||
/* Should not be called for OMAP2, so warn if it is called */
|
||||
WARN(1, "No fint limits available for OMAP2!\n");
|
||||
return DPLL_FINT_INVALID;
|
||||
} else if (cpu_is_omap3430()) {
|
||||
fint_min = OMAP3430_DPLL_FINT_BAND1_MIN;
|
||||
fint_max = OMAP3430_DPLL_FINT_BAND2_MAX;
|
||||
} else if (dd->flags & DPLL_J_TYPE) {
|
||||
if (dd->flags & DPLL_J_TYPE) {
|
||||
fint_min = OMAP3PLUS_DPLL_FINT_JTYPE_MIN;
|
||||
fint_max = OMAP3PLUS_DPLL_FINT_JTYPE_MAX;
|
||||
} else {
|
||||
fint_min = OMAP3PLUS_DPLL_FINT_MIN;
|
||||
fint_max = OMAP3PLUS_DPLL_FINT_MAX;
|
||||
fint_min = ti_clk_features.fint_min;
|
||||
fint_max = ti_clk_features.fint_max;
|
||||
}
|
||||
|
||||
if (fint < fint_min) {
|
||||
if (!fint_min || !fint_max) {
|
||||
WARN(1, "No fint limits available!\n");
|
||||
return DPLL_FINT_INVALID;
|
||||
}
|
||||
|
||||
if (fint < ti_clk_features.fint_min) {
|
||||
pr_debug("rejecting n=%d due to Fint failure, lowering max_divider\n",
|
||||
n);
|
||||
dd->max_divider = n;
|
||||
ret = DPLL_FINT_UNDERFLOW;
|
||||
} else if (fint > fint_max) {
|
||||
} else if (fint > ti_clk_features.fint_max) {
|
||||
pr_debug("rejecting n=%d due to Fint failure, boosting min_divider\n",
|
||||
n);
|
||||
dd->min_divider = n;
|
||||
ret = DPLL_FINT_INVALID;
|
||||
} else if (cpu_is_omap3430() && fint > OMAP3430_DPLL_FINT_BAND1_MAX &&
|
||||
fint < OMAP3430_DPLL_FINT_BAND2_MIN) {
|
||||
} else if (fint > ti_clk_features.fint_band1_max &&
|
||||
fint < ti_clk_features.fint_band2_min) {
|
||||
pr_debug("rejecting n=%d due to Fint failure\n", n);
|
||||
ret = DPLL_FINT_INVALID;
|
||||
}
|
||||
|
@ -185,6 +172,34 @@ static int _dpll_test_mult(int *m, int n, unsigned long *new_rate,
|
|||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* _omap2_dpll_is_in_bypass - check if DPLL is in bypass mode or not
|
||||
* @v: bitfield value of the DPLL enable
|
||||
*
|
||||
* Checks given DPLL enable bitfield to see whether the DPLL is in bypass
|
||||
* mode or not. Returns 1 if the DPLL is in bypass, 0 otherwise.
|
||||
*/
|
||||
static int _omap2_dpll_is_in_bypass(u32 v)
|
||||
{
|
||||
u8 mask, val;
|
||||
|
||||
mask = ti_clk_features.dpll_bypass_vals;
|
||||
|
||||
/*
|
||||
* Each set bit in the mask corresponds to a bypass value equal
|
||||
* to the bitshift. Go through each set-bit in the mask and
|
||||
* compare against the given register value.
|
||||
*/
|
||||
while (mask) {
|
||||
val = __ffs(mask);
|
||||
mask ^= (1 << val);
|
||||
if (v == val)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Public functions */
|
||||
u8 omap2_init_dpll_parent(struct clk_hw *hw)
|
||||
{
|
||||
|
@ -201,20 +216,9 @@ u8 omap2_init_dpll_parent(struct clk_hw *hw)
|
|||
v >>= __ffs(dd->enable_mask);
|
||||
|
||||
/* Reparent the struct clk in case the dpll is in bypass */
|
||||
if (cpu_is_omap24xx()) {
|
||||
if (v == OMAP2XXX_EN_DPLL_LPBYPASS ||
|
||||
v == OMAP2XXX_EN_DPLL_FRBYPASS)
|
||||
return 1;
|
||||
} else if (cpu_is_omap34xx()) {
|
||||
if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
|
||||
v == OMAP3XXX_EN_DPLL_FRBYPASS)
|
||||
return 1;
|
||||
} else if (soc_is_am33xx() || cpu_is_omap44xx() || soc_is_am43xx()) {
|
||||
if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
|
||||
v == OMAP4XXX_EN_DPLL_FRBYPASS ||
|
||||
v == OMAP4XXX_EN_DPLL_MNBYPASS)
|
||||
return 1;
|
||||
}
|
||||
if (_omap2_dpll_is_in_bypass(v))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -247,20 +251,8 @@ unsigned long omap2_get_dpll_rate(struct clk_hw_omap *clk)
|
|||
v &= dd->enable_mask;
|
||||
v >>= __ffs(dd->enable_mask);
|
||||
|
||||
if (cpu_is_omap24xx()) {
|
||||
if (v == OMAP2XXX_EN_DPLL_LPBYPASS ||
|
||||
v == OMAP2XXX_EN_DPLL_FRBYPASS)
|
||||
return __clk_get_rate(dd->clk_bypass);
|
||||
} else if (cpu_is_omap34xx()) {
|
||||
if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
|
||||
v == OMAP3XXX_EN_DPLL_FRBYPASS)
|
||||
return __clk_get_rate(dd->clk_bypass);
|
||||
} else if (soc_is_am33xx() || cpu_is_omap44xx() || soc_is_am43xx()) {
|
||||
if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
|
||||
v == OMAP4XXX_EN_DPLL_FRBYPASS ||
|
||||
v == OMAP4XXX_EN_DPLL_MNBYPASS)
|
||||
return __clk_get_rate(dd->clk_bypass);
|
||||
}
|
||||
if (_omap2_dpll_is_in_bypass(v))
|
||||
return __clk_get_rate(dd->clk_bypass);
|
||||
|
||||
v = omap2_clk_readl(clk, dd->mult_div1_reg);
|
||||
dpll_mult = v & dd->mult_mask;
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
#include <linux/clk-provider.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
|
||||
#include "clock.h"
|
||||
#include "clock2xxx.h"
|
||||
#include "cm2xxx_3xxx.h"
|
||||
#include "cm-regbits-24xx.h"
|
||||
|
||||
/* Register offsets */
|
||||
#define CM_AUTOIDLE 0x30
|
||||
#define CM_ICLKEN 0x10
|
||||
|
||||
/* Private functions */
|
||||
|
||||
|
|
|
@ -46,6 +46,24 @@
|
|||
|
||||
u16 cpu_mask;
|
||||
|
||||
/*
|
||||
* Clock features setup. Used instead of CPU type checks.
|
||||
*/
|
||||
struct ti_clk_features ti_clk_features;
|
||||
|
||||
/* DPLL valid Fint frequency band limits - from 34xx TRM Section 4.7.6.2 */
|
||||
#define OMAP3430_DPLL_FINT_BAND1_MIN 750000
|
||||
#define OMAP3430_DPLL_FINT_BAND1_MAX 2100000
|
||||
#define OMAP3430_DPLL_FINT_BAND2_MIN 7500000
|
||||
#define OMAP3430_DPLL_FINT_BAND2_MAX 21000000
|
||||
|
||||
/*
|
||||
* DPLL valid Fint frequency range for OMAP36xx and OMAP4xxx.
|
||||
* From device data manual section 4.3 "DPLL and DLL Specifications".
|
||||
*/
|
||||
#define OMAP3PLUS_DPLL_FINT_MIN 32000
|
||||
#define OMAP3PLUS_DPLL_FINT_MAX 52000000
|
||||
|
||||
/*
|
||||
* clkdm_control: if true, then when a clock is enabled in the
|
||||
* hardware, its clockdomain will first be enabled; and when a clock
|
||||
|
@ -287,13 +305,7 @@ void omap2_clk_dflt_find_idlest(struct clk_hw_omap *clk,
|
|||
* 34xx reverses this, just to keep us on our toes
|
||||
* AM35xx uses both, depending on the module.
|
||||
*/
|
||||
if (cpu_is_omap24xx())
|
||||
*idlest_val = OMAP24XX_CM_IDLEST_VAL;
|
||||
else if (cpu_is_omap34xx())
|
||||
*idlest_val = OMAP34XX_CM_IDLEST_VAL;
|
||||
else
|
||||
BUG();
|
||||
|
||||
*idlest_val = ti_clk_features.cm_idlest_val;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -731,3 +743,53 @@ void __init omap2_clk_print_new_rates(const char *hfclkin_ck_name,
|
|||
(clk_get_rate(core_ck) / 1000000),
|
||||
(clk_get_rate(mpu_ck) / 1000000));
|
||||
}
|
||||
|
||||
/**
|
||||
* ti_clk_init_features - init clock features struct for the SoC
|
||||
*
|
||||
* Initializes the clock features struct based on the SoC type.
|
||||
*/
|
||||
void __init ti_clk_init_features(void)
|
||||
{
|
||||
/* Fint setup for DPLLs */
|
||||
if (cpu_is_omap3430()) {
|
||||
ti_clk_features.fint_min = OMAP3430_DPLL_FINT_BAND1_MIN;
|
||||
ti_clk_features.fint_max = OMAP3430_DPLL_FINT_BAND2_MAX;
|
||||
ti_clk_features.fint_band1_max = OMAP3430_DPLL_FINT_BAND1_MAX;
|
||||
ti_clk_features.fint_band2_min = OMAP3430_DPLL_FINT_BAND2_MIN;
|
||||
} else {
|
||||
ti_clk_features.fint_min = OMAP3PLUS_DPLL_FINT_MIN;
|
||||
ti_clk_features.fint_max = OMAP3PLUS_DPLL_FINT_MAX;
|
||||
}
|
||||
|
||||
/* Bypass value setup for DPLLs */
|
||||
if (cpu_is_omap24xx()) {
|
||||
ti_clk_features.dpll_bypass_vals |=
|
||||
(1 << OMAP2XXX_EN_DPLL_LPBYPASS) |
|
||||
(1 << OMAP2XXX_EN_DPLL_FRBYPASS);
|
||||
} else if (cpu_is_omap34xx()) {
|
||||
ti_clk_features.dpll_bypass_vals |=
|
||||
(1 << OMAP3XXX_EN_DPLL_LPBYPASS) |
|
||||
(1 << OMAP3XXX_EN_DPLL_FRBYPASS);
|
||||
} else if (soc_is_am33xx() || cpu_is_omap44xx() || soc_is_am43xx() ||
|
||||
soc_is_omap54xx() || soc_is_dra7xx()) {
|
||||
ti_clk_features.dpll_bypass_vals |=
|
||||
(1 << OMAP4XXX_EN_DPLL_LPBYPASS) |
|
||||
(1 << OMAP4XXX_EN_DPLL_FRBYPASS) |
|
||||
(1 << OMAP4XXX_EN_DPLL_MNBYPASS);
|
||||
}
|
||||
|
||||
/* Jitter correction only available on OMAP343X */
|
||||
if (cpu_is_omap343x())
|
||||
ti_clk_features.flags |= TI_CLK_DPLL_HAS_FREQSEL;
|
||||
|
||||
/* Idlest value for interface clocks.
|
||||
* 24xx uses 0 to indicate not ready, and 1 to indicate ready.
|
||||
* 34xx reverses this, just to keep us on our toes
|
||||
* AM35xx uses both, depending on the module.
|
||||
*/
|
||||
if (cpu_is_omap24xx())
|
||||
ti_clk_features.cm_idlest_val = OMAP24XX_CM_IDLEST_VAL;
|
||||
else if (cpu_is_omap34xx())
|
||||
ti_clk_features.cm_idlest_val = OMAP34XX_CM_IDLEST_VAL;
|
||||
}
|
||||
|
|
|
@ -101,31 +101,6 @@ struct clockdomain;
|
|||
}; \
|
||||
DEFINE_STRUCT_CLK(_name, _parent_names, _ops);
|
||||
|
||||
#define DEFINE_CLK_OMAP_HSDIVIDER(_name, _parent_name, \
|
||||
_parent_ptr, _flags, \
|
||||
_clksel_reg, _clksel_mask) \
|
||||
static const struct clksel _name##_div[] = { \
|
||||
{ \
|
||||
.parent = _parent_ptr, \
|
||||
.rates = div31_1to31_rates \
|
||||
}, \
|
||||
{ .parent = NULL }, \
|
||||
}; \
|
||||
static struct clk _name; \
|
||||
static const char *_name##_parent_names[] = { \
|
||||
_parent_name, \
|
||||
}; \
|
||||
static struct clk_hw_omap _name##_hw = { \
|
||||
.hw = { \
|
||||
.clk = &_name, \
|
||||
}, \
|
||||
.clksel = _name##_div, \
|
||||
.clksel_reg = _clksel_reg, \
|
||||
.clksel_mask = _clksel_mask, \
|
||||
.ops = &clkhwops_omap4_dpllmx, \
|
||||
}; \
|
||||
DEFINE_STRUCT_CLK(_name, _name##_parent_names, omap_hsdivider_ops);
|
||||
|
||||
/* struct clksel_rate.flags possibilities */
|
||||
#define RATE_IN_242X (1 << 0)
|
||||
#define RATE_IN_243X (1 << 1)
|
||||
|
@ -248,6 +223,23 @@ void omap2_clk_writel(u32 val, struct clk_hw_omap *clk, void __iomem *reg);
|
|||
|
||||
extern u16 cpu_mask;
|
||||
|
||||
/*
|
||||
* Clock features setup. Used instead of CPU type checks.
|
||||
*/
|
||||
struct ti_clk_features {
|
||||
u32 flags;
|
||||
long fint_min;
|
||||
long fint_max;
|
||||
long fint_band1_max;
|
||||
long fint_band2_min;
|
||||
u8 dpll_bypass_vals;
|
||||
u8 cm_idlest_val;
|
||||
};
|
||||
|
||||
#define TI_CLK_DPLL_HAS_FREQSEL (1 << 0)
|
||||
|
||||
extern struct ti_clk_features ti_clk_features;
|
||||
|
||||
extern const struct clkops clkops_omap2_dflt_wait;
|
||||
extern const struct clkops clkops_dummy;
|
||||
extern const struct clkops clkops_omap2_dflt;
|
||||
|
@ -286,4 +278,6 @@ extern int omap2_clkops_enable_clkdm(struct clk_hw *hw);
|
|||
extern void omap2_clkops_disable_clkdm(struct clk_hw *hw);
|
||||
|
||||
extern void omap_clocks_register(struct omap_clk *oclks, int cnt);
|
||||
|
||||
void __init ti_clk_init_features(void);
|
||||
#endif
|
||||
|
|
|
@ -44,8 +44,7 @@ struct omap3_scratchpad {
|
|||
};
|
||||
|
||||
struct omap3_scratchpad_prcm_block {
|
||||
u32 prm_clksrc_ctrl;
|
||||
u32 prm_clksel;
|
||||
u32 prm_contents[2];
|
||||
u32 cm_contents[11];
|
||||
u32 prcm_block_size;
|
||||
};
|
||||
|
@ -282,13 +281,9 @@ void omap3_clear_scratchpad_contents(void)
|
|||
void __iomem *v_addr;
|
||||
u32 offset = 0;
|
||||
v_addr = OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD_ROM);
|
||||
if (omap2_prm_read_mod_reg(OMAP3430_GR_MOD, OMAP3_PRM_RSTST_OFFSET) &
|
||||
OMAP3430_GLOBAL_COLD_RST_MASK) {
|
||||
if (omap3xxx_prm_clear_global_cold_reset()) {
|
||||
for ( ; offset <= max_offset; offset += 0x4)
|
||||
writel_relaxed(0x0, (v_addr + offset));
|
||||
omap2_prm_set_mod_reg_bits(OMAP3430_GLOBAL_COLD_RST_MASK,
|
||||
OMAP3430_GR_MOD,
|
||||
OMAP3_PRM_RSTST_OFFSET);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -331,13 +326,7 @@ void omap3_save_scratchpad_contents(void)
|
|||
scratchpad_contents.sdrc_block_offset = 0x64;
|
||||
|
||||
/* Populate the PRCM block contents */
|
||||
prcm_block_contents.prm_clksrc_ctrl =
|
||||
omap2_prm_read_mod_reg(OMAP3430_GR_MOD,
|
||||
OMAP3_PRM_CLKSRC_CTRL_OFFSET);
|
||||
prcm_block_contents.prm_clksel =
|
||||
omap2_prm_read_mod_reg(OMAP3430_CCR_MOD,
|
||||
OMAP3_PRM_CLKSEL_OFFSET);
|
||||
|
||||
omap3_prm_save_scratchpad_contents(prcm_block_contents.prm_contents);
|
||||
omap3_cm_save_scratchpad_contents(prcm_block_contents.cm_contents);
|
||||
|
||||
prcm_block_contents.prcm_block_size = 0x0;
|
||||
|
@ -575,9 +564,50 @@ int omap3_ctrl_save_padconf(void)
|
|||
* Sets the bootmode for IVA2 to idle. This is needed by the PM code to
|
||||
* force disable IVA2 so that it does not prevent any low-power states.
|
||||
*/
|
||||
void omap3_ctrl_set_iva_bootmode_idle(void)
|
||||
static void __init omap3_ctrl_set_iva_bootmode_idle(void)
|
||||
{
|
||||
omap_ctrl_writel(OMAP3_IVA2_BOOTMOD_IDLE,
|
||||
OMAP343X_CONTROL_IVA2_BOOTMOD);
|
||||
}
|
||||
|
||||
/**
|
||||
* omap3_ctrl_setup_d2d_padconf - setup stacked modem pads for idle
|
||||
*
|
||||
* Sets up the pads controlling the stacked modem in such way that the
|
||||
* device can enter idle.
|
||||
*/
|
||||
static void __init omap3_ctrl_setup_d2d_padconf(void)
|
||||
{
|
||||
u16 mask, padconf;
|
||||
|
||||
/*
|
||||
* In a stand alone OMAP3430 where there is not a stacked
|
||||
* modem for the D2D Idle Ack and D2D MStandby must be pulled
|
||||
* high. S CONTROL_PADCONF_SAD2D_IDLEACK and
|
||||
* CONTROL_PADCONF_SAD2D_MSTDBY to have a pull up.
|
||||
*/
|
||||
mask = (1 << 4) | (1 << 3); /* pull-up, enabled */
|
||||
padconf = omap_ctrl_readw(OMAP3_PADCONF_SAD2D_MSTANDBY);
|
||||
padconf |= mask;
|
||||
omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_MSTANDBY);
|
||||
|
||||
padconf = omap_ctrl_readw(OMAP3_PADCONF_SAD2D_IDLEACK);
|
||||
padconf |= mask;
|
||||
omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_IDLEACK);
|
||||
}
|
||||
|
||||
/**
|
||||
* omap3_ctrl_init - does static initializations for control module
|
||||
*
|
||||
* Initializes system control module. This sets up the sysconfig autoidle,
|
||||
* and sets up modem and iva2 so that they can be idled properly.
|
||||
*/
|
||||
void __init omap3_ctrl_init(void)
|
||||
{
|
||||
omap_ctrl_writel(OMAP3430_AUTOIDLE_MASK, OMAP2_CONTROL_SYSCONFIG);
|
||||
|
||||
omap3_ctrl_set_iva_bootmode_idle();
|
||||
|
||||
omap3_ctrl_setup_d2d_padconf();
|
||||
}
|
||||
#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */
|
||||
|
|
|
@ -16,11 +16,6 @@
|
|||
#ifndef __ARCH_ARM_MACH_OMAP2_CONTROL_H
|
||||
#define __ARCH_ARM_MACH_OMAP2_CONTROL_H
|
||||
|
||||
#include "ctrl_module_core_44xx.h"
|
||||
#include "ctrl_module_wkup_44xx.h"
|
||||
#include "ctrl_module_pad_core_44xx.h"
|
||||
#include "ctrl_module_pad_wkup_44xx.h"
|
||||
|
||||
#include "am33xx.h"
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
@ -254,6 +249,39 @@
|
|||
/* TI81XX CONTROL_DEVCONF register offsets */
|
||||
#define TI81XX_CONTROL_DEVICE_ID (TI81XX_CONTROL_DEVCONF + 0x000)
|
||||
|
||||
/* OMAP4 CONTROL MODULE */
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP 0x4a31e000
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_I2C_2 0x0604
|
||||
#define OMAP4_CTRL_MODULE_CORE_STATUS 0x02c4
|
||||
#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_PROD_ID_1 0x0218
|
||||
#define OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR 0x0304
|
||||
#define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY 0x0618
|
||||
#define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_CAMERA_RX 0x0608
|
||||
|
||||
/* OMAP4 CONTROL_DSIPHY */
|
||||
#define OMAP4_DSI2_LANEENABLE_SHIFT 29
|
||||
#define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29)
|
||||
#define OMAP4_DSI1_LANEENABLE_SHIFT 24
|
||||
#define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24)
|
||||
#define OMAP4_DSI1_PIPD_SHIFT 19
|
||||
#define OMAP4_DSI1_PIPD_MASK (0x1f << 19)
|
||||
#define OMAP4_DSI2_PIPD_SHIFT 14
|
||||
#define OMAP4_DSI2_PIPD_MASK (0x1f << 14)
|
||||
|
||||
/* OMAP4 CONTROL_CAMERA_RX */
|
||||
#define OMAP4_CAMERARX_CSI21_LANEENABLE_SHIFT 24
|
||||
#define OMAP4_CAMERARX_CSI21_LANEENABLE_MASK (0x1f << 24)
|
||||
#define OMAP4_CAMERARX_CSI22_LANEENABLE_SHIFT 29
|
||||
#define OMAP4_CAMERARX_CSI22_LANEENABLE_MASK (0x3 << 29)
|
||||
#define OMAP4_CAMERARX_CSI22_CTRLCLKEN_SHIFT 21
|
||||
#define OMAP4_CAMERARX_CSI22_CTRLCLKEN_MASK (1 << 21)
|
||||
#define OMAP4_CAMERARX_CSI22_CAMMODE_SHIFT 19
|
||||
#define OMAP4_CAMERARX_CSI22_CAMMODE_MASK (0x3 << 19)
|
||||
#define OMAP4_CAMERARX_CSI21_CTRLCLKEN_SHIFT 18
|
||||
#define OMAP4_CAMERARX_CSI21_CTRLCLKEN_MASK (1 << 18)
|
||||
#define OMAP4_CAMERARX_CSI21_CAMMODE_SHIFT 16
|
||||
#define OMAP4_CAMERARX_CSI21_CAMMODE_MASK (0x3 << 16)
|
||||
|
||||
/* OMAP54XX CONTROL STATUS register */
|
||||
#define OMAP5XXX_CONTROL_STATUS 0x134
|
||||
#define OMAP5_DEVICETYPE_MASK (0x7 << 6)
|
||||
|
@ -427,7 +455,7 @@ extern void omap_ctrl_write_dsp_boot_addr(u32 bootaddr);
|
|||
extern void omap_ctrl_write_dsp_boot_mode(u8 bootmode);
|
||||
extern void omap3630_ctrl_disable_rta(void);
|
||||
extern int omap3_ctrl_save_padconf(void);
|
||||
extern void omap3_ctrl_set_iva_bootmode_idle(void);
|
||||
void omap3_ctrl_init(void);
|
||||
extern void omap2_set_globals_control(void __iomem *ctrl,
|
||||
void __iomem *ctrl_pad);
|
||||
#else
|
||||
|
|
|
@ -1,392 +0,0 @@
|
|||
/*
|
||||
* OMAP44xx CTRL_MODULE_CORE registers and bitfields
|
||||
*
|
||||
* Copyright (C) 2009-2010 Texas Instruments, Inc.
|
||||
*
|
||||
* Benoit Cousson (b-cousson@ti.com)
|
||||
* Santosh Shilimkar (santosh.shilimkar@ti.com)
|
||||
*
|
||||
* This file is automatically generated from the OMAP hardware databases.
|
||||
* We respectfully ask that any modifications to this file be coordinated
|
||||
* with the public linux-omap@vger.kernel.org mailing list and the
|
||||
* authors above to ensure that the autogeneration scripts are kept
|
||||
* up-to-date with the file contents.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ARM_MACH_OMAP2_CTRL_MODULE_CORE_44XX_H
|
||||
#define __ARCH_ARM_MACH_OMAP2_CTRL_MODULE_CORE_44XX_H
|
||||
|
||||
|
||||
/* Base address */
|
||||
#define OMAP4_CTRL_MODULE_CORE 0x4a002000
|
||||
|
||||
/* Registers offset */
|
||||
#define OMAP4_CTRL_MODULE_CORE_IP_REVISION 0x0000
|
||||
#define OMAP4_CTRL_MODULE_CORE_IP_HWINFO 0x0004
|
||||
#define OMAP4_CTRL_MODULE_CORE_IP_SYSCONFIG 0x0010
|
||||
#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_DIE_ID_0 0x0200
|
||||
#define OMAP4_CTRL_MODULE_CORE_ID_CODE 0x0204
|
||||
#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_DIE_ID_1 0x0208
|
||||
#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_DIE_ID_2 0x020c
|
||||
#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_DIE_ID_3 0x0210
|
||||
#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_PROD_ID_0 0x0214
|
||||
#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_PROD_ID_1 0x0218
|
||||
#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_USB_CONF 0x021c
|
||||
#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_OPP_VDD_WKUP 0x0228
|
||||
#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_OPP_BGAP 0x0260
|
||||
#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_OPP_DPLL_0 0x0264
|
||||
#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_OPP_DPLL_1 0x0268
|
||||
#define OMAP4_CTRL_MODULE_CORE_STATUS 0x02c4
|
||||
#define OMAP4_CTRL_MODULE_CORE_DEV_CONF 0x0300
|
||||
#define OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR 0x0304
|
||||
#define OMAP4_CTRL_MODULE_CORE_LDOVBB_IVA_VOLTAGE_CTRL 0x0314
|
||||
#define OMAP4_CTRL_MODULE_CORE_LDOVBB_MPU_VOLTAGE_CTRL 0x0318
|
||||
#define OMAP4_CTRL_MODULE_CORE_LDOSRAM_IVA_VOLTAGE_CTRL 0x0320
|
||||
#define OMAP4_CTRL_MODULE_CORE_LDOSRAM_MPU_VOLTAGE_CTRL 0x0324
|
||||
#define OMAP4_CTRL_MODULE_CORE_LDOSRAM_CORE_VOLTAGE_CTRL 0x0328
|
||||
#define OMAP4_CTRL_MODULE_CORE_TEMP_SENSOR 0x032c
|
||||
#define OMAP4_CTRL_MODULE_CORE_DPLL_NWELL_TRIM_0 0x0330
|
||||
#define OMAP4_CTRL_MODULE_CORE_DPLL_NWELL_TRIM_1 0x0334
|
||||
#define OMAP4_CTRL_MODULE_CORE_USBOTGHS_CONTROL 0x033c
|
||||
#define OMAP4_CTRL_MODULE_CORE_DSS_CONTROL 0x0340
|
||||
#define OMAP4_CTRL_MODULE_CORE_HWOBS_CONTROL 0x0350
|
||||
#define OMAP4_CTRL_MODULE_CORE_DEBOBS_FINAL_MUX_SEL 0x0400
|
||||
#define OMAP4_CTRL_MODULE_CORE_DEBOBS_MMR_MPU 0x0408
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_SDMA_REQ_SEL0 0x042c
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_SDMA_REQ_SEL1 0x0430
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_SDMA_REQ_SEL2 0x0434
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_SDMA_REQ_SEL3 0x0438
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_CLK_SEL0 0x0440
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_CLK_SEL1 0x0444
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_CLK_SEL2 0x0448
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DPLL_FREQLOCK_SEL 0x044c
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DPLL_TINITZ_SEL 0x0450
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DPLL_PHASELOCK_SEL 0x0454
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_0 0x0480
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_1 0x0484
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_2 0x0488
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_3 0x048c
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_4 0x0490
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_5 0x0494
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_6 0x0498
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_7 0x049c
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_8 0x04a0
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_9 0x04a4
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_10 0x04a8
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_11 0x04ac
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_12 0x04b0
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_13 0x04b4
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_14 0x04b8
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_15 0x04bc
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_16 0x04c0
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_17 0x04c4
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_18 0x04c8
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_19 0x04cc
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_20 0x04d0
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_21 0x04d4
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_22 0x04d8
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_23 0x04dc
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_24 0x04e0
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_25 0x04e4
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_26 0x04e8
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_27 0x04ec
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_28 0x04f0
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_29 0x04f4
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_30 0x04f8
|
||||
#define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_31 0x04fc
|
||||
|
||||
/* Registers shifts and masks */
|
||||
|
||||
/* IP_REVISION */
|
||||
#define OMAP4_IP_REV_SCHEME_SHIFT 30
|
||||
#define OMAP4_IP_REV_SCHEME_MASK (0x3 << 30)
|
||||
#define OMAP4_IP_REV_FUNC_SHIFT 16
|
||||
#define OMAP4_IP_REV_FUNC_MASK (0xfff << 16)
|
||||
#define OMAP4_IP_REV_RTL_SHIFT 11
|
||||
#define OMAP4_IP_REV_RTL_MASK (0x1f << 11)
|
||||
#define OMAP4_IP_REV_MAJOR_SHIFT 8
|
||||
#define OMAP4_IP_REV_MAJOR_MASK (0x7 << 8)
|
||||
#define OMAP4_IP_REV_CUSTOM_SHIFT 6
|
||||
#define OMAP4_IP_REV_CUSTOM_MASK (0x3 << 6)
|
||||
#define OMAP4_IP_REV_MINOR_SHIFT 0
|
||||
#define OMAP4_IP_REV_MINOR_MASK (0x3f << 0)
|
||||
|
||||
/* IP_HWINFO */
|
||||
#define OMAP4_IP_HWINFO_SHIFT 0
|
||||
#define OMAP4_IP_HWINFO_MASK (0xffffffff << 0)
|
||||
|
||||
/* IP_SYSCONFIG */
|
||||
#define OMAP4_IP_SYSCONFIG_IDLEMODE_SHIFT 2
|
||||
#define OMAP4_IP_SYSCONFIG_IDLEMODE_MASK (0x3 << 2)
|
||||
|
||||
/* STD_FUSE_DIE_ID_0 */
|
||||
#define OMAP4_STD_FUSE_DIE_ID_0_SHIFT 0
|
||||
#define OMAP4_STD_FUSE_DIE_ID_0_MASK (0xffffffff << 0)
|
||||
|
||||
/* ID_CODE */
|
||||
#define OMAP4_STD_FUSE_IDCODE_SHIFT 0
|
||||
#define OMAP4_STD_FUSE_IDCODE_MASK (0xffffffff << 0)
|
||||
|
||||
/* STD_FUSE_DIE_ID_1 */
|
||||
#define OMAP4_STD_FUSE_DIE_ID_1_SHIFT 0
|
||||
#define OMAP4_STD_FUSE_DIE_ID_1_MASK (0xffffffff << 0)
|
||||
|
||||
/* STD_FUSE_DIE_ID_2 */
|
||||
#define OMAP4_STD_FUSE_DIE_ID_2_SHIFT 0
|
||||
#define OMAP4_STD_FUSE_DIE_ID_2_MASK (0xffffffff << 0)
|
||||
|
||||
/* STD_FUSE_DIE_ID_3 */
|
||||
#define OMAP4_STD_FUSE_DIE_ID_3_SHIFT 0
|
||||
#define OMAP4_STD_FUSE_DIE_ID_3_MASK (0xffffffff << 0)
|
||||
|
||||
/* STD_FUSE_PROD_ID_0 */
|
||||
#define OMAP4_STD_FUSE_PROD_ID_0_SHIFT 0
|
||||
#define OMAP4_STD_FUSE_PROD_ID_0_MASK (0xffffffff << 0)
|
||||
|
||||
/* STD_FUSE_PROD_ID_1 */
|
||||
#define OMAP4_STD_FUSE_PROD_ID_1_SHIFT 0
|
||||
#define OMAP4_STD_FUSE_PROD_ID_1_MASK (0xffffffff << 0)
|
||||
|
||||
/* STD_FUSE_USB_CONF */
|
||||
#define OMAP4_USB_PROD_ID_SHIFT 16
|
||||
#define OMAP4_USB_PROD_ID_MASK (0xffff << 16)
|
||||
#define OMAP4_USB_VENDOR_ID_SHIFT 0
|
||||
#define OMAP4_USB_VENDOR_ID_MASK (0xffff << 0)
|
||||
|
||||
/* STD_FUSE_OPP_VDD_WKUP */
|
||||
#define OMAP4_STD_FUSE_OPP_VDD_WKUP_SHIFT 0
|
||||
#define OMAP4_STD_FUSE_OPP_VDD_WKUP_MASK (0xffffffff << 0)
|
||||
|
||||
/* STD_FUSE_OPP_BGAP */
|
||||
#define OMAP4_STD_FUSE_OPP_BGAP_SHIFT 0
|
||||
#define OMAP4_STD_FUSE_OPP_BGAP_MASK (0xffffffff << 0)
|
||||
|
||||
/* STD_FUSE_OPP_DPLL_0 */
|
||||
#define OMAP4_STD_FUSE_OPP_DPLL_0_SHIFT 0
|
||||
#define OMAP4_STD_FUSE_OPP_DPLL_0_MASK (0xffffffff << 0)
|
||||
|
||||
/* STD_FUSE_OPP_DPLL_1 */
|
||||
#define OMAP4_STD_FUSE_OPP_DPLL_1_SHIFT 0
|
||||
#define OMAP4_STD_FUSE_OPP_DPLL_1_MASK (0xffffffff << 0)
|
||||
|
||||
/* STATUS */
|
||||
#define OMAP4_ATTILA_CONF_SHIFT 11
|
||||
#define OMAP4_ATTILA_CONF_MASK (0x3 << 11)
|
||||
#define OMAP4_DEVICE_TYPE_SHIFT 8
|
||||
#define OMAP4_DEVICE_TYPE_MASK (0x7 << 8)
|
||||
#define OMAP4_SYS_BOOT_SHIFT 0
|
||||
#define OMAP4_SYS_BOOT_MASK (0xff << 0)
|
||||
|
||||
/* DEV_CONF */
|
||||
#define OMAP4_DEV_CONF_SHIFT 1
|
||||
#define OMAP4_DEV_CONF_MASK (0x7fffffff << 1)
|
||||
#define OMAP4_USBPHY_PD_SHIFT 0
|
||||
#define OMAP4_USBPHY_PD_MASK (1 << 0)
|
||||
|
||||
/* LDOVBB_IVA_VOLTAGE_CTRL */
|
||||
#define OMAP4_LDOVBBIVA_RBB_MUX_CTRL_SHIFT 26
|
||||
#define OMAP4_LDOVBBIVA_RBB_MUX_CTRL_MASK (1 << 26)
|
||||
#define OMAP4_LDOVBBIVA_RBB_VSET_IN_SHIFT 21
|
||||
#define OMAP4_LDOVBBIVA_RBB_VSET_IN_MASK (0x1f << 21)
|
||||
#define OMAP4_LDOVBBIVA_RBB_VSET_OUT_SHIFT 16
|
||||
#define OMAP4_LDOVBBIVA_RBB_VSET_OUT_MASK (0x1f << 16)
|
||||
#define OMAP4_LDOVBBIVA_FBB_MUX_CTRL_SHIFT 10
|
||||
#define OMAP4_LDOVBBIVA_FBB_MUX_CTRL_MASK (1 << 10)
|
||||
#define OMAP4_LDOVBBIVA_FBB_VSET_IN_SHIFT 5
|
||||
#define OMAP4_LDOVBBIVA_FBB_VSET_IN_MASK (0x1f << 5)
|
||||
#define OMAP4_LDOVBBIVA_FBB_VSET_OUT_SHIFT 0
|
||||
#define OMAP4_LDOVBBIVA_FBB_VSET_OUT_MASK (0x1f << 0)
|
||||
|
||||
/* LDOVBB_MPU_VOLTAGE_CTRL */
|
||||
#define OMAP4_LDOVBBMPU_RBB_MUX_CTRL_SHIFT 26
|
||||
#define OMAP4_LDOVBBMPU_RBB_MUX_CTRL_MASK (1 << 26)
|
||||
#define OMAP4_LDOVBBMPU_RBB_VSET_IN_SHIFT 21
|
||||
#define OMAP4_LDOVBBMPU_RBB_VSET_IN_MASK (0x1f << 21)
|
||||
#define OMAP4_LDOVBBMPU_RBB_VSET_OUT_SHIFT 16
|
||||
#define OMAP4_LDOVBBMPU_RBB_VSET_OUT_MASK (0x1f << 16)
|
||||
#define OMAP4_LDOVBBMPU_FBB_MUX_CTRL_SHIFT 10
|
||||
#define OMAP4_LDOVBBMPU_FBB_MUX_CTRL_MASK (1 << 10)
|
||||
#define OMAP4_LDOVBBMPU_FBB_VSET_IN_SHIFT 5
|
||||
#define OMAP4_LDOVBBMPU_FBB_VSET_IN_MASK (0x1f << 5)
|
||||
#define OMAP4_LDOVBBMPU_FBB_VSET_OUT_SHIFT 0
|
||||
#define OMAP4_LDOVBBMPU_FBB_VSET_OUT_MASK (0x1f << 0)
|
||||
|
||||
/* LDOSRAM_IVA_VOLTAGE_CTRL */
|
||||
#define OMAP4_LDOSRAMIVA_RETMODE_MUX_CTRL_SHIFT 26
|
||||
#define OMAP4_LDOSRAMIVA_RETMODE_MUX_CTRL_MASK (1 << 26)
|
||||
#define OMAP4_LDOSRAMIVA_RETMODE_VSET_IN_SHIFT 21
|
||||
#define OMAP4_LDOSRAMIVA_RETMODE_VSET_IN_MASK (0x1f << 21)
|
||||
#define OMAP4_LDOSRAMIVA_RETMODE_VSET_OUT_SHIFT 16
|
||||
#define OMAP4_LDOSRAMIVA_RETMODE_VSET_OUT_MASK (0x1f << 16)
|
||||
#define OMAP4_LDOSRAMIVA_ACTMODE_MUX_CTRL_SHIFT 10
|
||||
#define OMAP4_LDOSRAMIVA_ACTMODE_MUX_CTRL_MASK (1 << 10)
|
||||
#define OMAP4_LDOSRAMIVA_ACTMODE_VSET_IN_SHIFT 5
|
||||
#define OMAP4_LDOSRAMIVA_ACTMODE_VSET_IN_MASK (0x1f << 5)
|
||||
#define OMAP4_LDOSRAMIVA_ACTMODE_VSET_OUT_SHIFT 0
|
||||
#define OMAP4_LDOSRAMIVA_ACTMODE_VSET_OUT_MASK (0x1f << 0)
|
||||
|
||||
/* LDOSRAM_MPU_VOLTAGE_CTRL */
|
||||
#define OMAP4_LDOSRAMMPU_RETMODE_MUX_CTRL_SHIFT 26
|
||||
#define OMAP4_LDOSRAMMPU_RETMODE_MUX_CTRL_MASK (1 << 26)
|
||||
#define OMAP4_LDOSRAMMPU_RETMODE_VSET_IN_SHIFT 21
|
||||
#define OMAP4_LDOSRAMMPU_RETMODE_VSET_IN_MASK (0x1f << 21)
|
||||
#define OMAP4_LDOSRAMMPU_RETMODE_VSET_OUT_SHIFT 16
|
||||
#define OMAP4_LDOSRAMMPU_RETMODE_VSET_OUT_MASK (0x1f << 16)
|
||||
#define OMAP4_LDOSRAMMPU_ACTMODE_MUX_CTRL_SHIFT 10
|
||||
#define OMAP4_LDOSRAMMPU_ACTMODE_MUX_CTRL_MASK (1 << 10)
|
||||
#define OMAP4_LDOSRAMMPU_ACTMODE_VSET_IN_SHIFT 5
|
||||
#define OMAP4_LDOSRAMMPU_ACTMODE_VSET_IN_MASK (0x1f << 5)
|
||||
#define OMAP4_LDOSRAMMPU_ACTMODE_VSET_OUT_SHIFT 0
|
||||
#define OMAP4_LDOSRAMMPU_ACTMODE_VSET_OUT_MASK (0x1f << 0)
|
||||
|
||||
/* LDOSRAM_CORE_VOLTAGE_CTRL */
|
||||
#define OMAP4_LDOSRAMCORE_RETMODE_MUX_CTRL_SHIFT 26
|
||||
#define OMAP4_LDOSRAMCORE_RETMODE_MUX_CTRL_MASK (1 << 26)
|
||||
#define OMAP4_LDOSRAMCORE_RETMODE_VSET_IN_SHIFT 21
|
||||
#define OMAP4_LDOSRAMCORE_RETMODE_VSET_IN_MASK (0x1f << 21)
|
||||
#define OMAP4_LDOSRAMCORE_RETMODE_VSET_OUT_SHIFT 16
|
||||
#define OMAP4_LDOSRAMCORE_RETMODE_VSET_OUT_MASK (0x1f << 16)
|
||||
#define OMAP4_LDOSRAMCORE_ACTMODE_MUX_CTRL_SHIFT 10
|
||||
#define OMAP4_LDOSRAMCORE_ACTMODE_MUX_CTRL_MASK (1 << 10)
|
||||
#define OMAP4_LDOSRAMCORE_ACTMODE_VSET_IN_SHIFT 5
|
||||
#define OMAP4_LDOSRAMCORE_ACTMODE_VSET_IN_MASK (0x1f << 5)
|
||||
#define OMAP4_LDOSRAMCORE_ACTMODE_VSET_OUT_SHIFT 0
|
||||
#define OMAP4_LDOSRAMCORE_ACTMODE_VSET_OUT_MASK (0x1f << 0)
|
||||
|
||||
/* TEMP_SENSOR */
|
||||
#define OMAP4_BGAP_TEMPSOFF_SHIFT 12
|
||||
#define OMAP4_BGAP_TEMPSOFF_MASK (1 << 12)
|
||||
#define OMAP4_BGAP_TSHUT_SHIFT 11
|
||||
#define OMAP4_BGAP_TSHUT_MASK (1 << 11)
|
||||
#define OMAP4_BGAP_TEMP_SENSOR_CONTCONV_SHIFT 10
|
||||
#define OMAP4_BGAP_TEMP_SENSOR_CONTCONV_MASK (1 << 10)
|
||||
#define OMAP4_BGAP_TEMP_SENSOR_SOC_SHIFT 9
|
||||
#define OMAP4_BGAP_TEMP_SENSOR_SOC_MASK (1 << 9)
|
||||
#define OMAP4_BGAP_TEMP_SENSOR_EOCZ_SHIFT 8
|
||||
#define OMAP4_BGAP_TEMP_SENSOR_EOCZ_MASK (1 << 8)
|
||||
#define OMAP4_BGAP_TEMP_SENSOR_DTEMP_SHIFT 0
|
||||
#define OMAP4_BGAP_TEMP_SENSOR_DTEMP_MASK (0xff << 0)
|
||||
|
||||
/* DPLL_NWELL_TRIM_0 */
|
||||
#define OMAP4_DPLL_ABE_NWELL_TRIM_MUX_CTRL_SHIFT 29
|
||||
#define OMAP4_DPLL_ABE_NWELL_TRIM_MUX_CTRL_MASK (1 << 29)
|
||||
#define OMAP4_DPLL_ABE_NWELL_TRIM_SHIFT 24
|
||||
#define OMAP4_DPLL_ABE_NWELL_TRIM_MASK (0x1f << 24)
|
||||
#define OMAP4_DPLL_PER_NWELL_TRIM_MUX_CTRL_SHIFT 23
|
||||
#define OMAP4_DPLL_PER_NWELL_TRIM_MUX_CTRL_MASK (1 << 23)
|
||||
#define OMAP4_DPLL_PER_NWELL_TRIM_SHIFT 18
|
||||
#define OMAP4_DPLL_PER_NWELL_TRIM_MASK (0x1f << 18)
|
||||
#define OMAP4_DPLL_CORE_NWELL_TRIM_MUX_CTRL_SHIFT 17
|
||||
#define OMAP4_DPLL_CORE_NWELL_TRIM_MUX_CTRL_MASK (1 << 17)
|
||||
#define OMAP4_DPLL_CORE_NWELL_TRIM_SHIFT 12
|
||||
#define OMAP4_DPLL_CORE_NWELL_TRIM_MASK (0x1f << 12)
|
||||
#define OMAP4_DPLL_IVA_NWELL_TRIM_MUX_CTRL_SHIFT 11
|
||||
#define OMAP4_DPLL_IVA_NWELL_TRIM_MUX_CTRL_MASK (1 << 11)
|
||||
#define OMAP4_DPLL_IVA_NWELL_TRIM_SHIFT 6
|
||||
#define OMAP4_DPLL_IVA_NWELL_TRIM_MASK (0x1f << 6)
|
||||
#define OMAP4_DPLL_MPU_NWELL_TRIM_MUX_CTRL_SHIFT 5
|
||||
#define OMAP4_DPLL_MPU_NWELL_TRIM_MUX_CTRL_MASK (1 << 5)
|
||||
#define OMAP4_DPLL_MPU_NWELL_TRIM_SHIFT 0
|
||||
#define OMAP4_DPLL_MPU_NWELL_TRIM_MASK (0x1f << 0)
|
||||
|
||||
/* DPLL_NWELL_TRIM_1 */
|
||||
#define OMAP4_DPLL_UNIPRO_NWELL_TRIM_MUX_CTRL_SHIFT 29
|
||||
#define OMAP4_DPLL_UNIPRO_NWELL_TRIM_MUX_CTRL_MASK (1 << 29)
|
||||
#define OMAP4_DPLL_UNIPRO_NWELL_TRIM_SHIFT 24
|
||||
#define OMAP4_DPLL_UNIPRO_NWELL_TRIM_MASK (0x1f << 24)
|
||||
#define OMAP4_DPLL_USB_NWELL_TRIM_MUX_CTRL_SHIFT 23
|
||||
#define OMAP4_DPLL_USB_NWELL_TRIM_MUX_CTRL_MASK (1 << 23)
|
||||
#define OMAP4_DPLL_USB_NWELL_TRIM_SHIFT 18
|
||||
#define OMAP4_DPLL_USB_NWELL_TRIM_MASK (0x1f << 18)
|
||||
#define OMAP4_DPLL_HDMI_NWELL_TRIM_MUX_CTRL_SHIFT 17
|
||||
#define OMAP4_DPLL_HDMI_NWELL_TRIM_MUX_CTRL_MASK (1 << 17)
|
||||
#define OMAP4_DPLL_HDMI_NWELL_TRIM_SHIFT 12
|
||||
#define OMAP4_DPLL_HDMI_NWELL_TRIM_MASK (0x1f << 12)
|
||||
#define OMAP4_DPLL_DSI2_NWELL_TRIM_MUX_CTRL_SHIFT 11
|
||||
#define OMAP4_DPLL_DSI2_NWELL_TRIM_MUX_CTRL_MASK (1 << 11)
|
||||
#define OMAP4_DPLL_DSI2_NWELL_TRIM_SHIFT 6
|
||||
#define OMAP4_DPLL_DSI2_NWELL_TRIM_MASK (0x1f << 6)
|
||||
#define OMAP4_DPLL_DSI1_NWELL_TRIM_MUX_CTRL_SHIFT 5
|
||||
#define OMAP4_DPLL_DSI1_NWELL_TRIM_MUX_CTRL_MASK (1 << 5)
|
||||
#define OMAP4_DPLL_DSI1_NWELL_TRIM_SHIFT 0
|
||||
#define OMAP4_DPLL_DSI1_NWELL_TRIM_MASK (0x1f << 0)
|
||||
|
||||
/* USBOTGHS_CONTROL */
|
||||
#define OMAP4_DISCHRGVBUS_SHIFT 8
|
||||
#define OMAP4_DISCHRGVBUS_MASK (1 << 8)
|
||||
#define OMAP4_CHRGVBUS_SHIFT 7
|
||||
#define OMAP4_CHRGVBUS_MASK (1 << 7)
|
||||
#define OMAP4_DRVVBUS_SHIFT 6
|
||||
#define OMAP4_DRVVBUS_MASK (1 << 6)
|
||||
#define OMAP4_IDPULLUP_SHIFT 5
|
||||
#define OMAP4_IDPULLUP_MASK (1 << 5)
|
||||
#define OMAP4_IDDIG_SHIFT 4
|
||||
#define OMAP4_IDDIG_MASK (1 << 4)
|
||||
#define OMAP4_SESSEND_SHIFT 3
|
||||
#define OMAP4_SESSEND_MASK (1 << 3)
|
||||
#define OMAP4_VBUSVALID_SHIFT 2
|
||||
#define OMAP4_VBUSVALID_MASK (1 << 2)
|
||||
#define OMAP4_BVALID_SHIFT 1
|
||||
#define OMAP4_BVALID_MASK (1 << 1)
|
||||
#define OMAP4_AVALID_SHIFT 0
|
||||
#define OMAP4_AVALID_MASK (1 << 0)
|
||||
|
||||
/* DSS_CONTROL */
|
||||
#define OMAP4_DSS_MUX6_SELECT_SHIFT 0
|
||||
#define OMAP4_DSS_MUX6_SELECT_MASK (1 << 0)
|
||||
|
||||
/* HWOBS_CONTROL */
|
||||
#define OMAP4_HWOBS_CLKDIV_SEL_SHIFT 3
|
||||
#define OMAP4_HWOBS_CLKDIV_SEL_MASK (0x1f << 3)
|
||||
#define OMAP4_HWOBS_ALL_ZERO_MODE_SHIFT 2
|
||||
#define OMAP4_HWOBS_ALL_ZERO_MODE_MASK (1 << 2)
|
||||
#define OMAP4_HWOBS_ALL_ONE_MODE_SHIFT 1
|
||||
#define OMAP4_HWOBS_ALL_ONE_MODE_MASK (1 << 1)
|
||||
#define OMAP4_HWOBS_MACRO_ENABLE_SHIFT 0
|
||||
#define OMAP4_HWOBS_MACRO_ENABLE_MASK (1 << 0)
|
||||
|
||||
/* DEBOBS_FINAL_MUX_SEL */
|
||||
#define OMAP4_SELECT_SHIFT 0
|
||||
#define OMAP4_SELECT_MASK (0xffffffff << 0)
|
||||
|
||||
/* DEBOBS_MMR_MPU */
|
||||
#define OMAP4_SELECT_DEBOBS_MMR_MPU_SHIFT 0
|
||||
#define OMAP4_SELECT_DEBOBS_MMR_MPU_MASK (0xf << 0)
|
||||
|
||||
/* CONF_SDMA_REQ_SEL0 */
|
||||
#define OMAP4_MULT_SHIFT 0
|
||||
#define OMAP4_MULT_MASK (0x7f << 0)
|
||||
|
||||
/* CONF_CLK_SEL0 */
|
||||
#define OMAP4_MULT_CONF_CLK_SEL0_SHIFT 0
|
||||
#define OMAP4_MULT_CONF_CLK_SEL0_MASK (0x7 << 0)
|
||||
|
||||
/* CONF_CLK_SEL1 */
|
||||
#define OMAP4_MULT_CONF_CLK_SEL1_SHIFT 0
|
||||
#define OMAP4_MULT_CONF_CLK_SEL1_MASK (0x7 << 0)
|
||||
|
||||
/* CONF_CLK_SEL2 */
|
||||
#define OMAP4_MULT_CONF_CLK_SEL2_SHIFT 0
|
||||
#define OMAP4_MULT_CONF_CLK_SEL2_MASK (0x7 << 0)
|
||||
|
||||
/* CONF_DPLL_FREQLOCK_SEL */
|
||||
#define OMAP4_MULT_CONF_DPLL_FREQLOCK_SEL_SHIFT 0
|
||||
#define OMAP4_MULT_CONF_DPLL_FREQLOCK_SEL_MASK (0x7 << 0)
|
||||
|
||||
/* CONF_DPLL_TINITZ_SEL */
|
||||
#define OMAP4_MULT_CONF_DPLL_TINITZ_SEL_SHIFT 0
|
||||
#define OMAP4_MULT_CONF_DPLL_TINITZ_SEL_MASK (0x7 << 0)
|
||||
|
||||
/* CONF_DPLL_PHASELOCK_SEL */
|
||||
#define OMAP4_MULT_CONF_DPLL_PHASELOCK_SEL_SHIFT 0
|
||||
#define OMAP4_MULT_CONF_DPLL_PHASELOCK_SEL_MASK (0x7 << 0)
|
||||
|
||||
/* CONF_DEBUG_SEL_TST_0 */
|
||||
#define OMAP4_MODE_SHIFT 0
|
||||
#define OMAP4_MODE_MASK (0xf << 0)
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -1,236 +0,0 @@
|
|||
/*
|
||||
* OMAP44xx CTRL_MODULE_PAD_WKUP registers and bitfields
|
||||
*
|
||||
* Copyright (C) 2009-2010 Texas Instruments, Inc.
|
||||
*
|
||||
* Benoit Cousson (b-cousson@ti.com)
|
||||
* Santosh Shilimkar (santosh.shilimkar@ti.com)
|
||||
*
|
||||
* This file is automatically generated from the OMAP hardware databases.
|
||||
* We respectfully ask that any modifications to this file be coordinated
|
||||
* with the public linux-omap@vger.kernel.org mailing list and the
|
||||
* authors above to ensure that the autogeneration scripts are kept
|
||||
* up-to-date with the file contents.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ARM_MACH_OMAP2_CTRL_MODULE_PAD_WKUP_44XX_H
|
||||
#define __ARCH_ARM_MACH_OMAP2_CTRL_MODULE_PAD_WKUP_44XX_H
|
||||
|
||||
|
||||
/* Base address */
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP 0x4a31e000
|
||||
|
||||
/* Registers offset */
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_IP_REVISION 0x0000
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_IP_HWINFO 0x0004
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_IP_SYSCONFIG 0x0010
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_PADCONF_WAKEUPEVENT_0 0x007c
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_SMART1NOPMIO_PADCONF_0 0x05a0
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_SMART1NOPMIO_PADCONF_1 0x05a4
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_PADCONF_MODE 0x05a8
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_XTAL_OSCILLATOR 0x05ac
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_USIMIO 0x0600
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_I2C_2 0x0604
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_JTAG 0x0608
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_SYS 0x060c
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_WKUP_CONTROL_SPARE_RW 0x0614
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_WKUP_CONTROL_SPARE_R 0x0618
|
||||
#define OMAP4_CTRL_MODULE_PAD_WKUP_WKUP_CONTROL_SPARE_R_C0 0x061c
|
||||
|
||||
/* Registers shifts and masks */
|
||||
|
||||
/* IP_REVISION */
|
||||
#define OMAP4_IP_REV_SCHEME_SHIFT 30
|
||||
#define OMAP4_IP_REV_SCHEME_MASK (0x3 << 30)
|
||||
#define OMAP4_IP_REV_FUNC_SHIFT 16
|
||||
#define OMAP4_IP_REV_FUNC_MASK (0xfff << 16)
|
||||
#define OMAP4_IP_REV_RTL_SHIFT 11
|
||||
#define OMAP4_IP_REV_RTL_MASK (0x1f << 11)
|
||||
#define OMAP4_IP_REV_MAJOR_SHIFT 8
|
||||
#define OMAP4_IP_REV_MAJOR_MASK (0x7 << 8)
|
||||
#define OMAP4_IP_REV_CUSTOM_SHIFT 6
|
||||
#define OMAP4_IP_REV_CUSTOM_MASK (0x3 << 6)
|
||||
#define OMAP4_IP_REV_MINOR_SHIFT 0
|
||||
#define OMAP4_IP_REV_MINOR_MASK (0x3f << 0)
|
||||
|
||||
/* IP_HWINFO */
|
||||
#define OMAP4_IP_HWINFO_SHIFT 0
|
||||
#define OMAP4_IP_HWINFO_MASK (0xffffffff << 0)
|
||||
|
||||
/* IP_SYSCONFIG */
|
||||
#define OMAP4_IP_SYSCONFIG_IDLEMODE_SHIFT 2
|
||||
#define OMAP4_IP_SYSCONFIG_IDLEMODE_MASK (0x3 << 2)
|
||||
|
||||
/* PADCONF_WAKEUPEVENT_0 */
|
||||
#define OMAP4_JTAG_TDO_DUPLICATEWAKEUPEVENT_SHIFT 24
|
||||
#define OMAP4_JTAG_TDO_DUPLICATEWAKEUPEVENT_MASK (1 << 24)
|
||||
#define OMAP4_JTAG_TDI_DUPLICATEWAKEUPEVENT_SHIFT 23
|
||||
#define OMAP4_JTAG_TDI_DUPLICATEWAKEUPEVENT_MASK (1 << 23)
|
||||
#define OMAP4_JTAG_TMS_TMSC_DUPLICATEWAKEUPEVENT_SHIFT 22
|
||||
#define OMAP4_JTAG_TMS_TMSC_DUPLICATEWAKEUPEVENT_MASK (1 << 22)
|
||||
#define OMAP4_JTAG_RTCK_DUPLICATEWAKEUPEVENT_SHIFT 21
|
||||
#define OMAP4_JTAG_RTCK_DUPLICATEWAKEUPEVENT_MASK (1 << 21)
|
||||
#define OMAP4_JTAG_TCK_DUPLICATEWAKEUPEVENT_SHIFT 20
|
||||
#define OMAP4_JTAG_TCK_DUPLICATEWAKEUPEVENT_MASK (1 << 20)
|
||||
#define OMAP4_JTAG_NTRST_DUPLICATEWAKEUPEVENT_SHIFT 19
|
||||
#define OMAP4_JTAG_NTRST_DUPLICATEWAKEUPEVENT_MASK (1 << 19)
|
||||
#define OMAP4_SYS_BOOT7_DUPLICATEWAKEUPEVENT_SHIFT 18
|
||||
#define OMAP4_SYS_BOOT7_DUPLICATEWAKEUPEVENT_MASK (1 << 18)
|
||||
#define OMAP4_SYS_BOOT6_DUPLICATEWAKEUPEVENT_SHIFT 17
|
||||
#define OMAP4_SYS_BOOT6_DUPLICATEWAKEUPEVENT_MASK (1 << 17)
|
||||
#define OMAP4_SYS_PWRON_RESET_OUT_DUPLICATEWAKEUPEVENT_SHIFT 16
|
||||
#define OMAP4_SYS_PWRON_RESET_OUT_DUPLICATEWAKEUPEVENT_MASK (1 << 16)
|
||||
#define OMAP4_SYS_PWR_REQ_DUPLICATEWAKEUPEVENT_SHIFT 15
|
||||
#define OMAP4_SYS_PWR_REQ_DUPLICATEWAKEUPEVENT_MASK (1 << 15)
|
||||
#define OMAP4_SYS_NRESWARM_DUPLICATEWAKEUPEVENT_SHIFT 14
|
||||
#define OMAP4_SYS_NRESWARM_DUPLICATEWAKEUPEVENT_MASK (1 << 14)
|
||||
#define OMAP4_SYS_32K_DUPLICATEWAKEUPEVENT_SHIFT 13
|
||||
#define OMAP4_SYS_32K_DUPLICATEWAKEUPEVENT_MASK (1 << 13)
|
||||
#define OMAP4_FREF_CLK4_OUT_DUPLICATEWAKEUPEVENT_SHIFT 12
|
||||
#define OMAP4_FREF_CLK4_OUT_DUPLICATEWAKEUPEVENT_MASK (1 << 12)
|
||||
#define OMAP4_FREF_CLK4_REQ_DUPLICATEWAKEUPEVENT_SHIFT 11
|
||||
#define OMAP4_FREF_CLK4_REQ_DUPLICATEWAKEUPEVENT_MASK (1 << 11)
|
||||
#define OMAP4_FREF_CLK3_OUT_DUPLICATEWAKEUPEVENT_SHIFT 10
|
||||
#define OMAP4_FREF_CLK3_OUT_DUPLICATEWAKEUPEVENT_MASK (1 << 10)
|
||||
#define OMAP4_FREF_CLK3_REQ_DUPLICATEWAKEUPEVENT_SHIFT 9
|
||||
#define OMAP4_FREF_CLK3_REQ_DUPLICATEWAKEUPEVENT_MASK (1 << 9)
|
||||
#define OMAP4_FREF_CLK0_OUT_DUPLICATEWAKEUPEVENT_SHIFT 8
|
||||
#define OMAP4_FREF_CLK0_OUT_DUPLICATEWAKEUPEVENT_MASK (1 << 8)
|
||||
#define OMAP4_FREF_CLK_IOREQ_DUPLICATEWAKEUPEVENT_SHIFT 7
|
||||
#define OMAP4_FREF_CLK_IOREQ_DUPLICATEWAKEUPEVENT_MASK (1 << 7)
|
||||
#define OMAP4_SR_SDA_DUPLICATEWAKEUPEVENT_SHIFT 6
|
||||
#define OMAP4_SR_SDA_DUPLICATEWAKEUPEVENT_MASK (1 << 6)
|
||||
#define OMAP4_SR_SCL_DUPLICATEWAKEUPEVENT_SHIFT 5
|
||||
#define OMAP4_SR_SCL_DUPLICATEWAKEUPEVENT_MASK (1 << 5)
|
||||
#define OMAP4_SIM_PWRCTRL_DUPLICATEWAKEUPEVENT_SHIFT 4
|
||||
#define OMAP4_SIM_PWRCTRL_DUPLICATEWAKEUPEVENT_MASK (1 << 4)
|
||||
#define OMAP4_SIM_CD_DUPLICATEWAKEUPEVENT_SHIFT 3
|
||||
#define OMAP4_SIM_CD_DUPLICATEWAKEUPEVENT_MASK (1 << 3)
|
||||
#define OMAP4_SIM_RESET_DUPLICATEWAKEUPEVENT_SHIFT 2
|
||||
#define OMAP4_SIM_RESET_DUPLICATEWAKEUPEVENT_MASK (1 << 2)
|
||||
#define OMAP4_SIM_CLK_DUPLICATEWAKEUPEVENT_SHIFT 1
|
||||
#define OMAP4_SIM_CLK_DUPLICATEWAKEUPEVENT_MASK (1 << 1)
|
||||
#define OMAP4_SIM_IO_DUPLICATEWAKEUPEVENT_SHIFT 0
|
||||
#define OMAP4_SIM_IO_DUPLICATEWAKEUPEVENT_MASK (1 << 0)
|
||||
|
||||
/* CONTROL_SMART1NOPMIO_PADCONF_0 */
|
||||
#define OMAP4_FREF_DR0_SC_SHIFT 30
|
||||
#define OMAP4_FREF_DR0_SC_MASK (0x3 << 30)
|
||||
#define OMAP4_FREF_DR1_SC_SHIFT 28
|
||||
#define OMAP4_FREF_DR1_SC_MASK (0x3 << 28)
|
||||
#define OMAP4_FREF_DR4_SC_SHIFT 26
|
||||
#define OMAP4_FREF_DR4_SC_MASK (0x3 << 26)
|
||||
#define OMAP4_FREF_DR5_SC_SHIFT 24
|
||||
#define OMAP4_FREF_DR5_SC_MASK (0x3 << 24)
|
||||
#define OMAP4_FREF_DR6_SC_SHIFT 22
|
||||
#define OMAP4_FREF_DR6_SC_MASK (0x3 << 22)
|
||||
#define OMAP4_FREF_DR7_SC_SHIFT 20
|
||||
#define OMAP4_FREF_DR7_SC_MASK (0x3 << 20)
|
||||
#define OMAP4_GPIO_DR7_SC_SHIFT 18
|
||||
#define OMAP4_GPIO_DR7_SC_MASK (0x3 << 18)
|
||||
#define OMAP4_DPM_DR0_SC_SHIFT 14
|
||||
#define OMAP4_DPM_DR0_SC_MASK (0x3 << 14)
|
||||
#define OMAP4_SIM_DR0_SC_SHIFT 12
|
||||
#define OMAP4_SIM_DR0_SC_MASK (0x3 << 12)
|
||||
|
||||
/* CONTROL_SMART1NOPMIO_PADCONF_1 */
|
||||
#define OMAP4_FREF_DR0_LB_SHIFT 30
|
||||
#define OMAP4_FREF_DR0_LB_MASK (0x3 << 30)
|
||||
#define OMAP4_FREF_DR1_LB_SHIFT 28
|
||||
#define OMAP4_FREF_DR1_LB_MASK (0x3 << 28)
|
||||
#define OMAP4_FREF_DR4_LB_SHIFT 26
|
||||
#define OMAP4_FREF_DR4_LB_MASK (0x3 << 26)
|
||||
#define OMAP4_FREF_DR5_LB_SHIFT 24
|
||||
#define OMAP4_FREF_DR5_LB_MASK (0x3 << 24)
|
||||
#define OMAP4_FREF_DR6_LB_SHIFT 22
|
||||
#define OMAP4_FREF_DR6_LB_MASK (0x3 << 22)
|
||||
#define OMAP4_FREF_DR7_LB_SHIFT 20
|
||||
#define OMAP4_FREF_DR7_LB_MASK (0x3 << 20)
|
||||
#define OMAP4_GPIO_DR7_LB_SHIFT 18
|
||||
#define OMAP4_GPIO_DR7_LB_MASK (0x3 << 18)
|
||||
#define OMAP4_DPM_DR0_LB_SHIFT 14
|
||||
#define OMAP4_DPM_DR0_LB_MASK (0x3 << 14)
|
||||
#define OMAP4_SIM_DR0_LB_SHIFT 12
|
||||
#define OMAP4_SIM_DR0_LB_MASK (0x3 << 12)
|
||||
|
||||
/* CONTROL_PADCONF_MODE */
|
||||
#define OMAP4_VDDS_DV_FREF_SHIFT 31
|
||||
#define OMAP4_VDDS_DV_FREF_MASK (1 << 31)
|
||||
#define OMAP4_VDDS_DV_BANK2_SHIFT 30
|
||||
#define OMAP4_VDDS_DV_BANK2_MASK (1 << 30)
|
||||
|
||||
/* CONTROL_XTAL_OSCILLATOR */
|
||||
#define OMAP4_OSCILLATOR_BOOST_SHIFT 31
|
||||
#define OMAP4_OSCILLATOR_BOOST_MASK (1 << 31)
|
||||
#define OMAP4_OSCILLATOR_OS_OUT_SHIFT 30
|
||||
#define OMAP4_OSCILLATOR_OS_OUT_MASK (1 << 30)
|
||||
|
||||
/* CONTROL_USIMIO */
|
||||
#define OMAP4_PAD_USIM_CLK_LOW_SHIFT 31
|
||||
#define OMAP4_PAD_USIM_CLK_LOW_MASK (1 << 31)
|
||||
#define OMAP4_PAD_USIM_RST_LOW_SHIFT 29
|
||||
#define OMAP4_PAD_USIM_RST_LOW_MASK (1 << 29)
|
||||
#define OMAP4_USIM_PWRDNZ_SHIFT 28
|
||||
#define OMAP4_USIM_PWRDNZ_MASK (1 << 28)
|
||||
|
||||
/* CONTROL_I2C_2 */
|
||||
#define OMAP4_SR_SDA_GLFENB_SHIFT 31
|
||||
#define OMAP4_SR_SDA_GLFENB_MASK (1 << 31)
|
||||
#define OMAP4_SR_SDA_LOAD_BITS_SHIFT 29
|
||||
#define OMAP4_SR_SDA_LOAD_BITS_MASK (0x3 << 29)
|
||||
#define OMAP4_SR_SDA_PULLUPRESX_SHIFT 28
|
||||
#define OMAP4_SR_SDA_PULLUPRESX_MASK (1 << 28)
|
||||
#define OMAP4_SR_SCL_GLFENB_SHIFT 27
|
||||
#define OMAP4_SR_SCL_GLFENB_MASK (1 << 27)
|
||||
#define OMAP4_SR_SCL_LOAD_BITS_SHIFT 25
|
||||
#define OMAP4_SR_SCL_LOAD_BITS_MASK (0x3 << 25)
|
||||
#define OMAP4_SR_SCL_PULLUPRESX_SHIFT 24
|
||||
#define OMAP4_SR_SCL_PULLUPRESX_MASK (1 << 24)
|
||||
|
||||
/* CONTROL_JTAG */
|
||||
#define OMAP4_JTAG_NTRST_EN_SHIFT 31
|
||||
#define OMAP4_JTAG_NTRST_EN_MASK (1 << 31)
|
||||
#define OMAP4_JTAG_TCK_EN_SHIFT 30
|
||||
#define OMAP4_JTAG_TCK_EN_MASK (1 << 30)
|
||||
#define OMAP4_JTAG_RTCK_EN_SHIFT 29
|
||||
#define OMAP4_JTAG_RTCK_EN_MASK (1 << 29)
|
||||
#define OMAP4_JTAG_TDI_EN_SHIFT 28
|
||||
#define OMAP4_JTAG_TDI_EN_MASK (1 << 28)
|
||||
#define OMAP4_JTAG_TDO_EN_SHIFT 27
|
||||
#define OMAP4_JTAG_TDO_EN_MASK (1 << 27)
|
||||
|
||||
/* CONTROL_SYS */
|
||||
#define OMAP4_SYS_NRESWARM_PIPU_SHIFT 31
|
||||
#define OMAP4_SYS_NRESWARM_PIPU_MASK (1 << 31)
|
||||
|
||||
/* WKUP_CONTROL_SPARE_RW */
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_RW_SHIFT 0
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_RW_MASK (0xffffffff << 0)
|
||||
|
||||
/* WKUP_CONTROL_SPARE_R */
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_SHIFT 0
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_MASK (0xffffffff << 0)
|
||||
|
||||
/* WKUP_CONTROL_SPARE_R_C0 */
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C0_SHIFT 31
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C0_MASK (1 << 31)
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C1_SHIFT 30
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C1_MASK (1 << 30)
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C2_SHIFT 29
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C2_MASK (1 << 29)
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C3_SHIFT 28
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C3_MASK (1 << 28)
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C4_SHIFT 27
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C4_MASK (1 << 27)
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C5_SHIFT 26
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C5_MASK (1 << 26)
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C6_SHIFT 25
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C6_MASK (1 << 25)
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C7_SHIFT 24
|
||||
#define OMAP4_WKUP_CONTROL_SPARE_R_C7_MASK (1 << 24)
|
||||
|
||||
#endif
|
|
@ -28,11 +28,8 @@
|
|||
#include <linux/bitops.h>
|
||||
#include <linux/clkdev.h>
|
||||
|
||||
#include "soc.h"
|
||||
#include "clockdomain.h"
|
||||
#include "clock.h"
|
||||
#include "cm2xxx_3xxx.h"
|
||||
#include "cm-regbits-34xx.h"
|
||||
|
||||
/* CM_AUTOIDLE_PLL*.AUTO_* bit values */
|
||||
#define DPLL_AUTOIDLE_DISABLE 0x0
|
||||
|
@ -310,7 +307,7 @@ static int omap3_noncore_dpll_program(struct clk_hw_omap *clk, u16 freqsel)
|
|||
* Set jitter correction. Jitter correction applicable for OMAP343X
|
||||
* only since freqsel field is no longer present on other devices.
|
||||
*/
|
||||
if (cpu_is_omap343x()) {
|
||||
if (ti_clk_features.flags & TI_CLK_DPLL_HAS_FREQSEL) {
|
||||
v = omap2_clk_readl(clk, dd->control_reg);
|
||||
v &= ~dd->freqsel_mask;
|
||||
v |= freqsel << __ffs(dd->freqsel_mask);
|
||||
|
@ -512,7 +509,7 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
|
|||
return -EINVAL;
|
||||
|
||||
/* Freqsel is available only on OMAP343X devices */
|
||||
if (cpu_is_omap343x()) {
|
||||
if (ti_clk_features.flags & TI_CLK_DPLL_HAS_FREQSEL) {
|
||||
freqsel = _omap3_dpll_compute_freqsel(clk,
|
||||
dd->last_rounded_n);
|
||||
WARN_ON(!freqsel);
|
||||
|
|
|
@ -15,10 +15,7 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
#include "soc.h"
|
||||
#include "clock.h"
|
||||
#include "clock44xx.h"
|
||||
#include "cm-regbits-44xx.h"
|
||||
|
||||
/*
|
||||
* Maximum DPLL input frequency (FINT) and output frequency (FOUT) that
|
||||
|
@ -29,13 +26,23 @@
|
|||
#define OMAP4_DPLL_LP_FINT_MAX 1000000
|
||||
#define OMAP4_DPLL_LP_FOUT_MAX 100000000
|
||||
|
||||
/*
|
||||
* Bitfield declarations
|
||||
*/
|
||||
#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8)
|
||||
#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK (1 << 10)
|
||||
#define OMAP4430_DPLL_REGM4XEN_MASK (1 << 11)
|
||||
|
||||
/* Static rate multiplier for OMAP4 REGM4XEN clocks */
|
||||
#define OMAP4430_REGM4XEN_MULT 4
|
||||
|
||||
/* Supported only on OMAP4 */
|
||||
int omap4_dpllmx_gatectrl_read(struct clk_hw_omap *clk)
|
||||
{
|
||||
u32 v;
|
||||
u32 mask;
|
||||
|
||||
if (!clk || !clk->clksel_reg || !cpu_is_omap44xx())
|
||||
if (!clk || !clk->clksel_reg)
|
||||
return -EINVAL;
|
||||
|
||||
mask = clk->flags & CLOCK_CLKOUTX2 ?
|
||||
|
@ -54,7 +61,7 @@ void omap4_dpllmx_allow_gatectrl(struct clk_hw_omap *clk)
|
|||
u32 v;
|
||||
u32 mask;
|
||||
|
||||
if (!clk || !clk->clksel_reg || !cpu_is_omap44xx())
|
||||
if (!clk || !clk->clksel_reg)
|
||||
return;
|
||||
|
||||
mask = clk->flags & CLOCK_CLKOUTX2 ?
|
||||
|
@ -72,7 +79,7 @@ void omap4_dpllmx_deny_gatectrl(struct clk_hw_omap *clk)
|
|||
u32 v;
|
||||
u32 mask;
|
||||
|
||||
if (!clk || !clk->clksel_reg || !cpu_is_omap44xx())
|
||||
if (!clk || !clk->clksel_reg)
|
||||
return;
|
||||
|
||||
mask = clk->flags & CLOCK_CLKOUTX2 ?
|
||||
|
|
|
@ -24,25 +24,6 @@
|
|||
/* minimum size for IO mapping */
|
||||
#define NAND_IO_SIZE 4
|
||||
|
||||
static struct resource gpmc_nand_resource[] = {
|
||||
{
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device gpmc_nand_device = {
|
||||
.name = "omap2-nand",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(gpmc_nand_resource),
|
||||
.resource = gpmc_nand_resource,
|
||||
};
|
||||
|
||||
static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt)
|
||||
{
|
||||
/* platforms which support all ECC schemes */
|
||||
|
@ -95,43 +76,41 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
|
|||
{
|
||||
int err = 0;
|
||||
struct gpmc_settings s;
|
||||
struct device *dev = &gpmc_nand_device.dev;
|
||||
struct platform_device *pdev;
|
||||
struct resource gpmc_nand_res[] = {
|
||||
{ .flags = IORESOURCE_MEM, },
|
||||
{ .flags = IORESOURCE_IRQ, },
|
||||
{ .flags = IORESOURCE_IRQ, },
|
||||
};
|
||||
|
||||
memset(&s, 0, sizeof(struct gpmc_settings));
|
||||
|
||||
gpmc_nand_device.dev.platform_data = gpmc_nand_data;
|
||||
BUG_ON(gpmc_nand_data->cs >= GPMC_CS_NUM);
|
||||
|
||||
err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE,
|
||||
(unsigned long *)&gpmc_nand_resource[0].start);
|
||||
(unsigned long *)&gpmc_nand_res[0].start);
|
||||
if (err < 0) {
|
||||
dev_err(dev, "Cannot request GPMC CS %d, error %d\n",
|
||||
gpmc_nand_data->cs, err);
|
||||
pr_err("omap2-gpmc: Cannot request GPMC CS %d, error %d\n",
|
||||
gpmc_nand_data->cs, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
gpmc_nand_resource[0].end = gpmc_nand_resource[0].start +
|
||||
NAND_IO_SIZE - 1;
|
||||
|
||||
gpmc_nand_resource[1].start =
|
||||
gpmc_get_client_irq(GPMC_IRQ_FIFOEVENTENABLE);
|
||||
gpmc_nand_resource[2].start =
|
||||
gpmc_get_client_irq(GPMC_IRQ_COUNT_EVENT);
|
||||
gpmc_nand_res[0].end = gpmc_nand_res[0].start + NAND_IO_SIZE - 1;
|
||||
gpmc_nand_res[1].start = gpmc_get_client_irq(GPMC_IRQ_FIFOEVENTENABLE);
|
||||
gpmc_nand_res[2].start = gpmc_get_client_irq(GPMC_IRQ_COUNT_EVENT);
|
||||
|
||||
if (gpmc_t) {
|
||||
err = gpmc_cs_set_timings(gpmc_nand_data->cs, gpmc_t);
|
||||
if (err < 0) {
|
||||
dev_err(dev, "Unable to set gpmc timings: %d\n", err);
|
||||
pr_err("omap2-gpmc: Unable to set gpmc timings: %d\n", err);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
memset(&s, 0, sizeof(struct gpmc_settings));
|
||||
if (gpmc_nand_data->of_node)
|
||||
gpmc_read_settings_dt(gpmc_nand_data->of_node, &s);
|
||||
else
|
||||
gpmc_set_legacy(gpmc_nand_data, &s);
|
||||
|
||||
s.device_nand = true;
|
||||
|
||||
err = gpmc_cs_program_settings(gpmc_nand_data->cs, &s);
|
||||
if (err < 0)
|
||||
goto out_free_cs;
|
||||
|
@ -143,18 +122,34 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
|
|||
gpmc_update_nand_reg(&gpmc_nand_data->reg, gpmc_nand_data->cs);
|
||||
|
||||
if (!gpmc_hwecc_bch_capable(gpmc_nand_data->ecc_opt)) {
|
||||
dev_err(dev, "Unsupported NAND ECC scheme selected\n");
|
||||
return -EINVAL;
|
||||
pr_err("omap2-nand: Unsupported NAND ECC scheme selected\n");
|
||||
err = -EINVAL;
|
||||
goto out_free_cs;
|
||||
}
|
||||
|
||||
err = platform_device_register(&gpmc_nand_device);
|
||||
if (err < 0) {
|
||||
dev_err(dev, "Unable to register NAND device\n");
|
||||
goto out_free_cs;
|
||||
|
||||
pdev = platform_device_alloc("omap2-nand", gpmc_nand_data->cs);
|
||||
if (pdev) {
|
||||
err = platform_device_add_resources(pdev, gpmc_nand_res,
|
||||
ARRAY_SIZE(gpmc_nand_res));
|
||||
if (!err)
|
||||
pdev->dev.platform_data = gpmc_nand_data;
|
||||
} else {
|
||||
err = -ENOMEM;
|
||||
}
|
||||
if (err)
|
||||
goto out_free_pdev;
|
||||
|
||||
err = platform_device_add(pdev);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "Unable to register NAND device\n");
|
||||
goto out_free_pdev;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
out_free_pdev:
|
||||
platform_device_put(pdev);
|
||||
out_free_cs:
|
||||
gpmc_cs_free(gpmc_nand_data->cs);
|
||||
|
||||
|
|
|
@ -728,6 +728,8 @@ int __init omap_clk_init(void)
|
|||
if (!omap_clk_soc_init)
|
||||
return 0;
|
||||
|
||||
ti_clk_init_features();
|
||||
|
||||
ret = of_prcm_init();
|
||||
if (!ret)
|
||||
ret = omap_clk_soc_init();
|
||||
|
|
|
@ -75,9 +75,9 @@ static int omap2_enter_full_retention(void)
|
|||
|
||||
/* Clear old wake-up events */
|
||||
/* REVISIT: These write to reserved bits? */
|
||||
omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, PM_WKST1);
|
||||
omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, OMAP24XX_PM_WKST2);
|
||||
omap2_prm_write_mod_reg(0xffffffff, WKUP_MOD, PM_WKST);
|
||||
omap2xxx_prm_clear_mod_irqs(CORE_MOD, PM_WKST1, ~0);
|
||||
omap2xxx_prm_clear_mod_irqs(CORE_MOD, OMAP24XX_PM_WKST2, ~0);
|
||||
omap2xxx_prm_clear_mod_irqs(WKUP_MOD, PM_WKST, ~0);
|
||||
|
||||
pwrdm_set_next_pwrst(core_pwrdm, PWRDM_POWER_RET);
|
||||
pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_RET);
|
||||
|
@ -104,23 +104,18 @@ no_sleep:
|
|||
clk_enable(osc_ck);
|
||||
|
||||
/* clear CORE wake-up events */
|
||||
omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, PM_WKST1);
|
||||
omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, OMAP24XX_PM_WKST2);
|
||||
omap2xxx_prm_clear_mod_irqs(CORE_MOD, PM_WKST1, ~0);
|
||||
omap2xxx_prm_clear_mod_irqs(CORE_MOD, OMAP24XX_PM_WKST2, ~0);
|
||||
|
||||
/* wakeup domain events - bit 1: GPT1, bit5 GPIO */
|
||||
omap2_prm_clear_mod_reg_bits(0x4 | 0x1, WKUP_MOD, PM_WKST);
|
||||
omap2xxx_prm_clear_mod_irqs(WKUP_MOD, PM_WKST, 0x4 | 0x1);
|
||||
|
||||
/* MPU domain wake events */
|
||||
l = omap2_prm_read_mod_reg(OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET);
|
||||
if (l & 0x01)
|
||||
omap2_prm_write_mod_reg(0x01, OCP_MOD,
|
||||
OMAP2_PRCM_IRQSTATUS_MPU_OFFSET);
|
||||
if (l & 0x20)
|
||||
omap2_prm_write_mod_reg(0x20, OCP_MOD,
|
||||
OMAP2_PRCM_IRQSTATUS_MPU_OFFSET);
|
||||
omap2xxx_prm_clear_mod_irqs(OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET,
|
||||
0x1);
|
||||
|
||||
/* Mask future PRCM-to-MPU interrupts */
|
||||
omap2_prm_write_mod_reg(0x0, OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET);
|
||||
omap2xxx_prm_clear_mod_irqs(OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET,
|
||||
0x20);
|
||||
|
||||
pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON);
|
||||
pwrdm_set_next_pwrst(core_pwrdm, PWRDM_POWER_ON);
|
||||
|
@ -148,9 +143,9 @@ static void omap2_enter_mpu_retention(void)
|
|||
* it is in retention mode. */
|
||||
if (omap2_allow_mpu_retention()) {
|
||||
/* REVISIT: These write to reserved bits? */
|
||||
omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, PM_WKST1);
|
||||
omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, OMAP24XX_PM_WKST2);
|
||||
omap2_prm_write_mod_reg(0xffffffff, WKUP_MOD, PM_WKST);
|
||||
omap2xxx_prm_clear_mod_irqs(CORE_MOD, PM_WKST1, ~0);
|
||||
omap2xxx_prm_clear_mod_irqs(CORE_MOD, OMAP24XX_PM_WKST2, ~0);
|
||||
omap2xxx_prm_clear_mod_irqs(WKUP_MOD, PM_WKST, ~0);
|
||||
|
||||
/* Try to enter MPU retention */
|
||||
pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_RET);
|
||||
|
|
|
@ -133,60 +133,13 @@ static void omap3_save_secure_ram_context(void)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* PRCM Interrupt Handler Helper Function
|
||||
*
|
||||
* The purpose of this function is to clear any wake-up events latched
|
||||
* in the PRCM PM_WKST_x registers. It is possible that a wake-up event
|
||||
* may occur whilst attempting to clear a PM_WKST_x register and thus
|
||||
* set another bit in this register. A while loop is used to ensure
|
||||
* that any peripheral wake-up events occurring while attempting to
|
||||
* clear the PM_WKST_x are detected and cleared.
|
||||
*/
|
||||
static int prcm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits)
|
||||
{
|
||||
u32 wkst, fclk, iclk, clken;
|
||||
u16 wkst_off = (regs == 3) ? OMAP3430ES2_PM_WKST3 : PM_WKST1;
|
||||
u16 fclk_off = (regs == 3) ? OMAP3430ES2_CM_FCLKEN3 : CM_FCLKEN1;
|
||||
u16 iclk_off = (regs == 3) ? CM_ICLKEN3 : CM_ICLKEN1;
|
||||
u16 grpsel_off = (regs == 3) ?
|
||||
OMAP3430ES2_PM_MPUGRPSEL3 : OMAP3430_PM_MPUGRPSEL;
|
||||
int c = 0;
|
||||
|
||||
wkst = omap2_prm_read_mod_reg(module, wkst_off);
|
||||
wkst &= omap2_prm_read_mod_reg(module, grpsel_off);
|
||||
wkst &= ~ignore_bits;
|
||||
if (wkst) {
|
||||
iclk = omap2_cm_read_mod_reg(module, iclk_off);
|
||||
fclk = omap2_cm_read_mod_reg(module, fclk_off);
|
||||
while (wkst) {
|
||||
clken = wkst;
|
||||
omap2_cm_set_mod_reg_bits(clken, module, iclk_off);
|
||||
/*
|
||||
* For USBHOST, we don't know whether HOST1 or
|
||||
* HOST2 woke us up, so enable both f-clocks
|
||||
*/
|
||||
if (module == OMAP3430ES2_USBHOST_MOD)
|
||||
clken |= 1 << OMAP3430ES2_EN_USBHOST2_SHIFT;
|
||||
omap2_cm_set_mod_reg_bits(clken, module, fclk_off);
|
||||
omap2_prm_write_mod_reg(wkst, module, wkst_off);
|
||||
wkst = omap2_prm_read_mod_reg(module, wkst_off);
|
||||
wkst &= ~ignore_bits;
|
||||
c++;
|
||||
}
|
||||
omap2_cm_write_mod_reg(iclk, module, iclk_off);
|
||||
omap2_cm_write_mod_reg(fclk, module, fclk_off);
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static irqreturn_t _prcm_int_handle_io(int irq, void *unused)
|
||||
{
|
||||
int c;
|
||||
|
||||
c = prcm_clear_mod_irqs(WKUP_MOD, 1,
|
||||
~(OMAP3430_ST_IO_MASK | OMAP3430_ST_IO_CHAIN_MASK));
|
||||
c = omap3xxx_prm_clear_mod_irqs(WKUP_MOD, 1,
|
||||
~(OMAP3430_ST_IO_MASK |
|
||||
OMAP3430_ST_IO_CHAIN_MASK));
|
||||
|
||||
return c ? IRQ_HANDLED : IRQ_NONE;
|
||||
}
|
||||
|
@ -200,13 +153,14 @@ static irqreturn_t _prcm_int_handle_wakeup(int irq, void *unused)
|
|||
* these are handled in a separate handler to avoid acking
|
||||
* IO events before parsing in mux code
|
||||
*/
|
||||
c = prcm_clear_mod_irqs(WKUP_MOD, 1,
|
||||
OMAP3430_ST_IO_MASK | OMAP3430_ST_IO_CHAIN_MASK);
|
||||
c += prcm_clear_mod_irqs(CORE_MOD, 1, 0);
|
||||
c += prcm_clear_mod_irqs(OMAP3430_PER_MOD, 1, 0);
|
||||
c = omap3xxx_prm_clear_mod_irqs(WKUP_MOD, 1,
|
||||
OMAP3430_ST_IO_MASK |
|
||||
OMAP3430_ST_IO_CHAIN_MASK);
|
||||
c += omap3xxx_prm_clear_mod_irqs(CORE_MOD, 1, 0);
|
||||
c += omap3xxx_prm_clear_mod_irqs(OMAP3430_PER_MOD, 1, 0);
|
||||
if (omap_rev() > OMAP3430_REV_ES1_0) {
|
||||
c += prcm_clear_mod_irqs(CORE_MOD, 3, 0);
|
||||
c += prcm_clear_mod_irqs(OMAP3430ES2_USBHOST_MOD, 1, 0);
|
||||
c += omap3xxx_prm_clear_mod_irqs(CORE_MOD, 3, 0);
|
||||
c += omap3xxx_prm_clear_mod_irqs(OMAP3430ES2_USBHOST_MOD, 1, 0);
|
||||
}
|
||||
|
||||
return c ? IRQ_HANDLED : IRQ_NONE;
|
||||
|
@ -399,159 +353,11 @@ restore:
|
|||
#define omap3_pm_suspend NULL
|
||||
#endif /* CONFIG_SUSPEND */
|
||||
|
||||
|
||||
/**
|
||||
* omap3_iva_idle(): ensure IVA is in idle so it can be put into
|
||||
* retention
|
||||
*
|
||||
* In cases where IVA2 is activated by bootcode, it may prevent
|
||||
* full-chip retention or off-mode because it is not idle. This
|
||||
* function forces the IVA2 into idle state so it can go
|
||||
* into retention/off and thus allow full-chip retention/off.
|
||||
*
|
||||
**/
|
||||
static void __init omap3_iva_idle(void)
|
||||
{
|
||||
/* ensure IVA2 clock is disabled */
|
||||
omap2_cm_write_mod_reg(0, OMAP3430_IVA2_MOD, CM_FCLKEN);
|
||||
|
||||
/* if no clock activity, nothing else to do */
|
||||
if (!(omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSTST) &
|
||||
OMAP3430_CLKACTIVITY_IVA2_MASK))
|
||||
return;
|
||||
|
||||
/* Reset IVA2 */
|
||||
omap2_prm_write_mod_reg(OMAP3430_RST1_IVA2_MASK |
|
||||
OMAP3430_RST2_IVA2_MASK |
|
||||
OMAP3430_RST3_IVA2_MASK,
|
||||
OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);
|
||||
|
||||
/* Enable IVA2 clock */
|
||||
omap2_cm_write_mod_reg(OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_MASK,
|
||||
OMAP3430_IVA2_MOD, CM_FCLKEN);
|
||||
|
||||
/* Set IVA2 boot mode to 'idle' */
|
||||
omap3_ctrl_set_iva_bootmode_idle();
|
||||
|
||||
/* Un-reset IVA2 */
|
||||
omap2_prm_write_mod_reg(0, OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);
|
||||
|
||||
/* Disable IVA2 clock */
|
||||
omap2_cm_write_mod_reg(0, OMAP3430_IVA2_MOD, CM_FCLKEN);
|
||||
|
||||
/* Reset IVA2 */
|
||||
omap2_prm_write_mod_reg(OMAP3430_RST1_IVA2_MASK |
|
||||
OMAP3430_RST2_IVA2_MASK |
|
||||
OMAP3430_RST3_IVA2_MASK,
|
||||
OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);
|
||||
}
|
||||
|
||||
static void __init omap3_d2d_idle(void)
|
||||
{
|
||||
u16 mask, padconf;
|
||||
|
||||
/* In a stand alone OMAP3430 where there is not a stacked
|
||||
* modem for the D2D Idle Ack and D2D MStandby must be pulled
|
||||
* high. S CONTROL_PADCONF_SAD2D_IDLEACK and
|
||||
* CONTROL_PADCONF_SAD2D_MSTDBY to have a pull up. */
|
||||
mask = (1 << 4) | (1 << 3); /* pull-up, enabled */
|
||||
padconf = omap_ctrl_readw(OMAP3_PADCONF_SAD2D_MSTANDBY);
|
||||
padconf |= mask;
|
||||
omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_MSTANDBY);
|
||||
|
||||
padconf = omap_ctrl_readw(OMAP3_PADCONF_SAD2D_IDLEACK);
|
||||
padconf |= mask;
|
||||
omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_IDLEACK);
|
||||
|
||||
/* reset modem */
|
||||
omap2_prm_write_mod_reg(OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK |
|
||||
OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RST_MASK,
|
||||
CORE_MOD, OMAP2_RM_RSTCTRL);
|
||||
omap2_prm_write_mod_reg(0, CORE_MOD, OMAP2_RM_RSTCTRL);
|
||||
}
|
||||
|
||||
static void __init prcm_setup_regs(void)
|
||||
{
|
||||
u32 omap3630_en_uart4_mask = cpu_is_omap3630() ?
|
||||
OMAP3630_EN_UART4_MASK : 0;
|
||||
u32 omap3630_grpsel_uart4_mask = cpu_is_omap3630() ?
|
||||
OMAP3630_GRPSEL_UART4_MASK : 0;
|
||||
omap3_ctrl_init();
|
||||
|
||||
/* XXX This should be handled by hwmod code or SCM init code */
|
||||
omap_ctrl_writel(OMAP3430_AUTOIDLE_MASK, OMAP2_CONTROL_SYSCONFIG);
|
||||
|
||||
/*
|
||||
* Enable control of expternal oscillator through
|
||||
* sys_clkreq. In the long run clock framework should
|
||||
* take care of this.
|
||||
*/
|
||||
omap2_prm_rmw_mod_reg_bits(OMAP_AUTOEXTCLKMODE_MASK,
|
||||
1 << OMAP_AUTOEXTCLKMODE_SHIFT,
|
||||
OMAP3430_GR_MOD,
|
||||
OMAP3_PRM_CLKSRC_CTRL_OFFSET);
|
||||
|
||||
/* setup wakup source */
|
||||
omap2_prm_write_mod_reg(OMAP3430_EN_IO_MASK | OMAP3430_EN_GPIO1_MASK |
|
||||
OMAP3430_EN_GPT1_MASK | OMAP3430_EN_GPT12_MASK,
|
||||
WKUP_MOD, PM_WKEN);
|
||||
/* No need to write EN_IO, that is always enabled */
|
||||
omap2_prm_write_mod_reg(OMAP3430_GRPSEL_GPIO1_MASK |
|
||||
OMAP3430_GRPSEL_GPT1_MASK |
|
||||
OMAP3430_GRPSEL_GPT12_MASK,
|
||||
WKUP_MOD, OMAP3430_PM_MPUGRPSEL);
|
||||
|
||||
/* Enable PM_WKEN to support DSS LPR */
|
||||
omap2_prm_write_mod_reg(OMAP3430_PM_WKEN_DSS_EN_DSS_MASK,
|
||||
OMAP3430_DSS_MOD, PM_WKEN);
|
||||
|
||||
/* Enable wakeups in PER */
|
||||
omap2_prm_write_mod_reg(omap3630_en_uart4_mask |
|
||||
OMAP3430_EN_GPIO2_MASK | OMAP3430_EN_GPIO3_MASK |
|
||||
OMAP3430_EN_GPIO4_MASK | OMAP3430_EN_GPIO5_MASK |
|
||||
OMAP3430_EN_GPIO6_MASK | OMAP3430_EN_UART3_MASK |
|
||||
OMAP3430_EN_MCBSP2_MASK | OMAP3430_EN_MCBSP3_MASK |
|
||||
OMAP3430_EN_MCBSP4_MASK,
|
||||
OMAP3430_PER_MOD, PM_WKEN);
|
||||
/* and allow them to wake up MPU */
|
||||
omap2_prm_write_mod_reg(omap3630_grpsel_uart4_mask |
|
||||
OMAP3430_GRPSEL_GPIO2_MASK |
|
||||
OMAP3430_GRPSEL_GPIO3_MASK |
|
||||
OMAP3430_GRPSEL_GPIO4_MASK |
|
||||
OMAP3430_GRPSEL_GPIO5_MASK |
|
||||
OMAP3430_GRPSEL_GPIO6_MASK |
|
||||
OMAP3430_GRPSEL_UART3_MASK |
|
||||
OMAP3430_GRPSEL_MCBSP2_MASK |
|
||||
OMAP3430_GRPSEL_MCBSP3_MASK |
|
||||
OMAP3430_GRPSEL_MCBSP4_MASK,
|
||||
OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL);
|
||||
|
||||
/* Don't attach IVA interrupts */
|
||||
if (omap3_has_iva()) {
|
||||
omap2_prm_write_mod_reg(0, WKUP_MOD, OMAP3430_PM_IVAGRPSEL);
|
||||
omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430_PM_IVAGRPSEL1);
|
||||
omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430ES2_PM_IVAGRPSEL3);
|
||||
omap2_prm_write_mod_reg(0, OMAP3430_PER_MOD,
|
||||
OMAP3430_PM_IVAGRPSEL);
|
||||
}
|
||||
|
||||
/* Clear any pending 'reset' flags */
|
||||
omap2_prm_write_mod_reg(0xffffffff, MPU_MOD, OMAP2_RM_RSTST);
|
||||
omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, OMAP2_RM_RSTST);
|
||||
omap2_prm_write_mod_reg(0xffffffff, OMAP3430_PER_MOD, OMAP2_RM_RSTST);
|
||||
omap2_prm_write_mod_reg(0xffffffff, OMAP3430_EMU_MOD, OMAP2_RM_RSTST);
|
||||
omap2_prm_write_mod_reg(0xffffffff, OMAP3430_NEON_MOD, OMAP2_RM_RSTST);
|
||||
omap2_prm_write_mod_reg(0xffffffff, OMAP3430_DSS_MOD, OMAP2_RM_RSTST);
|
||||
omap2_prm_write_mod_reg(0xffffffff, OMAP3430ES2_USBHOST_MOD, OMAP2_RM_RSTST);
|
||||
|
||||
/* Clear any pending PRCM interrupts */
|
||||
omap2_prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
|
||||
|
||||
/*
|
||||
* We need to idle iva2_pwrdm even on am3703 with no iva2.
|
||||
*/
|
||||
omap3_iva_idle();
|
||||
|
||||
omap3_d2d_idle();
|
||||
omap3_prm_init_pm(cpu_is_omap3630(), omap3_has_iva());
|
||||
}
|
||||
|
||||
void omap3_pm_off_mode_enable(int enable)
|
||||
|
|
|
@ -114,6 +114,24 @@ void omap2xxx_prm_dpll_reset(void)
|
|||
omap2_prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTCTRL);
|
||||
}
|
||||
|
||||
/**
|
||||
* omap2xxx_prm_clear_mod_irqs - clear wakeup status bits for a module
|
||||
* @module: PRM module to clear wakeups from
|
||||
* @regs: register offset to clear
|
||||
* @wkst_mask: wakeup status mask to clear
|
||||
*
|
||||
* Clears wakeup status bits for a given module, so that the device can
|
||||
* re-enter idle.
|
||||
*/
|
||||
void omap2xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask)
|
||||
{
|
||||
u32 wkst;
|
||||
|
||||
wkst = omap2_prm_read_mod_reg(module, regs);
|
||||
wkst &= wkst_mask;
|
||||
omap2_prm_write_mod_reg(wkst, module, regs);
|
||||
}
|
||||
|
||||
int omap2xxx_clkdm_sleep(struct clockdomain *clkdm)
|
||||
{
|
||||
omap2_prm_set_mod_reg_bits(OMAP24XX_FORCESTATE_MASK,
|
||||
|
|
|
@ -125,6 +125,7 @@ extern int omap2xxx_clkdm_sleep(struct clockdomain *clkdm);
|
|||
extern int omap2xxx_clkdm_wakeup(struct clockdomain *clkdm);
|
||||
|
||||
extern void omap2xxx_prm_dpll_reset(void);
|
||||
void omap2xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask);
|
||||
|
||||
extern int __init omap2xxx_prm_init(void);
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "prm2xxx_3xxx.h"
|
||||
#include "cm2xxx_3xxx.h"
|
||||
#include "prm-regbits-34xx.h"
|
||||
#include "cm3xxx.h"
|
||||
#include "cm-regbits-34xx.h"
|
||||
|
||||
static const struct omap_prcm_irq omap3_prcm_irqs[] = {
|
||||
OMAP_PRCM_IRQ("wkup", 0, 0),
|
||||
|
@ -205,6 +207,167 @@ void omap3xxx_prm_restore_irqen(u32 *saved_mask)
|
|||
OMAP3_PRM_IRQENABLE_MPU_OFFSET);
|
||||
}
|
||||
|
||||
/**
|
||||
* omap3xxx_prm_clear_mod_irqs - clear wake-up events from PRCM interrupt
|
||||
* @module: PRM module to clear wakeups from
|
||||
* @regs: register set to clear, 1 or 3
|
||||
* @ignore_bits: wakeup status bits to ignore
|
||||
*
|
||||
* The purpose of this function is to clear any wake-up events latched
|
||||
* in the PRCM PM_WKST_x registers. It is possible that a wake-up event
|
||||
* may occur whilst attempting to clear a PM_WKST_x register and thus
|
||||
* set another bit in this register. A while loop is used to ensure
|
||||
* that any peripheral wake-up events occurring while attempting to
|
||||
* clear the PM_WKST_x are detected and cleared.
|
||||
*/
|
||||
int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits)
|
||||
{
|
||||
u32 wkst, fclk, iclk, clken;
|
||||
u16 wkst_off = (regs == 3) ? OMAP3430ES2_PM_WKST3 : PM_WKST1;
|
||||
u16 fclk_off = (regs == 3) ? OMAP3430ES2_CM_FCLKEN3 : CM_FCLKEN1;
|
||||
u16 iclk_off = (regs == 3) ? CM_ICLKEN3 : CM_ICLKEN1;
|
||||
u16 grpsel_off = (regs == 3) ?
|
||||
OMAP3430ES2_PM_MPUGRPSEL3 : OMAP3430_PM_MPUGRPSEL;
|
||||
int c = 0;
|
||||
|
||||
wkst = omap2_prm_read_mod_reg(module, wkst_off);
|
||||
wkst &= omap2_prm_read_mod_reg(module, grpsel_off);
|
||||
wkst &= ~ignore_bits;
|
||||
if (wkst) {
|
||||
iclk = omap2_cm_read_mod_reg(module, iclk_off);
|
||||
fclk = omap2_cm_read_mod_reg(module, fclk_off);
|
||||
while (wkst) {
|
||||
clken = wkst;
|
||||
omap2_cm_set_mod_reg_bits(clken, module, iclk_off);
|
||||
/*
|
||||
* For USBHOST, we don't know whether HOST1 or
|
||||
* HOST2 woke us up, so enable both f-clocks
|
||||
*/
|
||||
if (module == OMAP3430ES2_USBHOST_MOD)
|
||||
clken |= 1 << OMAP3430ES2_EN_USBHOST2_SHIFT;
|
||||
omap2_cm_set_mod_reg_bits(clken, module, fclk_off);
|
||||
omap2_prm_write_mod_reg(wkst, module, wkst_off);
|
||||
wkst = omap2_prm_read_mod_reg(module, wkst_off);
|
||||
wkst &= ~ignore_bits;
|
||||
c++;
|
||||
}
|
||||
omap2_cm_write_mod_reg(iclk, module, iclk_off);
|
||||
omap2_cm_write_mod_reg(fclk, module, fclk_off);
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
/**
|
||||
* omap3_prm_reset_modem - toggle reset signal for modem
|
||||
*
|
||||
* Toggles the reset signal to modem IP block. Required to allow
|
||||
* OMAP3430 without stacked modem to idle properly.
|
||||
*/
|
||||
void __init omap3_prm_reset_modem(void)
|
||||
{
|
||||
omap2_prm_write_mod_reg(
|
||||
OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK |
|
||||
OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RST_MASK,
|
||||
CORE_MOD, OMAP2_RM_RSTCTRL);
|
||||
omap2_prm_write_mod_reg(0, CORE_MOD, OMAP2_RM_RSTCTRL);
|
||||
}
|
||||
|
||||
/**
|
||||
* omap3_prm_init_pm - initialize PM related registers for PRM
|
||||
* @has_uart4: SoC has UART4
|
||||
* @has_iva: SoC has IVA
|
||||
*
|
||||
* Initializes PRM registers for PM use. Called from PM init.
|
||||
*/
|
||||
void __init omap3_prm_init_pm(bool has_uart4, bool has_iva)
|
||||
{
|
||||
u32 en_uart4_mask;
|
||||
u32 grpsel_uart4_mask;
|
||||
|
||||
/*
|
||||
* Enable control of expternal oscillator through
|
||||
* sys_clkreq. In the long run clock framework should
|
||||
* take care of this.
|
||||
*/
|
||||
omap2_prm_rmw_mod_reg_bits(OMAP_AUTOEXTCLKMODE_MASK,
|
||||
1 << OMAP_AUTOEXTCLKMODE_SHIFT,
|
||||
OMAP3430_GR_MOD,
|
||||
OMAP3_PRM_CLKSRC_CTRL_OFFSET);
|
||||
|
||||
/* setup wakup source */
|
||||
omap2_prm_write_mod_reg(OMAP3430_EN_IO_MASK | OMAP3430_EN_GPIO1_MASK |
|
||||
OMAP3430_EN_GPT1_MASK | OMAP3430_EN_GPT12_MASK,
|
||||
WKUP_MOD, PM_WKEN);
|
||||
/* No need to write EN_IO, that is always enabled */
|
||||
omap2_prm_write_mod_reg(OMAP3430_GRPSEL_GPIO1_MASK |
|
||||
OMAP3430_GRPSEL_GPT1_MASK |
|
||||
OMAP3430_GRPSEL_GPT12_MASK,
|
||||
WKUP_MOD, OMAP3430_PM_MPUGRPSEL);
|
||||
|
||||
/* Enable PM_WKEN to support DSS LPR */
|
||||
omap2_prm_write_mod_reg(OMAP3430_PM_WKEN_DSS_EN_DSS_MASK,
|
||||
OMAP3430_DSS_MOD, PM_WKEN);
|
||||
|
||||
if (has_uart4) {
|
||||
en_uart4_mask = OMAP3630_EN_UART4_MASK;
|
||||
grpsel_uart4_mask = OMAP3630_GRPSEL_UART4_MASK;
|
||||
}
|
||||
|
||||
/* Enable wakeups in PER */
|
||||
omap2_prm_write_mod_reg(en_uart4_mask |
|
||||
OMAP3430_EN_GPIO2_MASK |
|
||||
OMAP3430_EN_GPIO3_MASK |
|
||||
OMAP3430_EN_GPIO4_MASK |
|
||||
OMAP3430_EN_GPIO5_MASK |
|
||||
OMAP3430_EN_GPIO6_MASK |
|
||||
OMAP3430_EN_UART3_MASK |
|
||||
OMAP3430_EN_MCBSP2_MASK |
|
||||
OMAP3430_EN_MCBSP3_MASK |
|
||||
OMAP3430_EN_MCBSP4_MASK,
|
||||
OMAP3430_PER_MOD, PM_WKEN);
|
||||
|
||||
/* and allow them to wake up MPU */
|
||||
omap2_prm_write_mod_reg(grpsel_uart4_mask |
|
||||
OMAP3430_GRPSEL_GPIO2_MASK |
|
||||
OMAP3430_GRPSEL_GPIO3_MASK |
|
||||
OMAP3430_GRPSEL_GPIO4_MASK |
|
||||
OMAP3430_GRPSEL_GPIO5_MASK |
|
||||
OMAP3430_GRPSEL_GPIO6_MASK |
|
||||
OMAP3430_GRPSEL_UART3_MASK |
|
||||
OMAP3430_GRPSEL_MCBSP2_MASK |
|
||||
OMAP3430_GRPSEL_MCBSP3_MASK |
|
||||
OMAP3430_GRPSEL_MCBSP4_MASK,
|
||||
OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL);
|
||||
|
||||
/* Don't attach IVA interrupts */
|
||||
if (has_iva) {
|
||||
omap2_prm_write_mod_reg(0, WKUP_MOD, OMAP3430_PM_IVAGRPSEL);
|
||||
omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430_PM_IVAGRPSEL1);
|
||||
omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430ES2_PM_IVAGRPSEL3);
|
||||
omap2_prm_write_mod_reg(0, OMAP3430_PER_MOD,
|
||||
OMAP3430_PM_IVAGRPSEL);
|
||||
}
|
||||
|
||||
/* Clear any pending 'reset' flags */
|
||||
omap2_prm_write_mod_reg(0xffffffff, MPU_MOD, OMAP2_RM_RSTST);
|
||||
omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, OMAP2_RM_RSTST);
|
||||
omap2_prm_write_mod_reg(0xffffffff, OMAP3430_PER_MOD, OMAP2_RM_RSTST);
|
||||
omap2_prm_write_mod_reg(0xffffffff, OMAP3430_EMU_MOD, OMAP2_RM_RSTST);
|
||||
omap2_prm_write_mod_reg(0xffffffff, OMAP3430_NEON_MOD, OMAP2_RM_RSTST);
|
||||
omap2_prm_write_mod_reg(0xffffffff, OMAP3430_DSS_MOD, OMAP2_RM_RSTST);
|
||||
omap2_prm_write_mod_reg(0xffffffff, OMAP3430ES2_USBHOST_MOD,
|
||||
OMAP2_RM_RSTST);
|
||||
|
||||
/* Clear any pending PRCM interrupts */
|
||||
omap2_prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
|
||||
|
||||
/* We need to idle iva2_pwrdm even on am3703 with no iva2. */
|
||||
omap3xxx_prm_iva_idle();
|
||||
|
||||
omap3_prm_reset_modem();
|
||||
}
|
||||
|
||||
/**
|
||||
* omap3xxx_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain
|
||||
*
|
||||
|
@ -276,6 +439,76 @@ static u32 omap3xxx_prm_read_reset_sources(void)
|
|||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* omap3xxx_prm_iva_idle - ensure IVA is in idle so it can be put into retention
|
||||
*
|
||||
* In cases where IVA2 is activated by bootcode, it may prevent
|
||||
* full-chip retention or off-mode because it is not idle. This
|
||||
* function forces the IVA2 into idle state so it can go
|
||||
* into retention/off and thus allow full-chip retention/off.
|
||||
*/
|
||||
void omap3xxx_prm_iva_idle(void)
|
||||
{
|
||||
/* ensure IVA2 clock is disabled */
|
||||
omap2_cm_write_mod_reg(0, OMAP3430_IVA2_MOD, CM_FCLKEN);
|
||||
|
||||
/* if no clock activity, nothing else to do */
|
||||
if (!(omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSTST) &
|
||||
OMAP3430_CLKACTIVITY_IVA2_MASK))
|
||||
return;
|
||||
|
||||
/* Reset IVA2 */
|
||||
omap2_prm_write_mod_reg(OMAP3430_RST1_IVA2_MASK |
|
||||
OMAP3430_RST2_IVA2_MASK |
|
||||
OMAP3430_RST3_IVA2_MASK,
|
||||
OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);
|
||||
|
||||
/* Enable IVA2 clock */
|
||||
omap2_cm_write_mod_reg(OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_MASK,
|
||||
OMAP3430_IVA2_MOD, CM_FCLKEN);
|
||||
|
||||
/* Un-reset IVA2 */
|
||||
omap2_prm_write_mod_reg(0, OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);
|
||||
|
||||
/* Disable IVA2 clock */
|
||||
omap2_cm_write_mod_reg(0, OMAP3430_IVA2_MOD, CM_FCLKEN);
|
||||
|
||||
/* Reset IVA2 */
|
||||
omap2_prm_write_mod_reg(OMAP3430_RST1_IVA2_MASK |
|
||||
OMAP3430_RST2_IVA2_MASK |
|
||||
OMAP3430_RST3_IVA2_MASK,
|
||||
OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);
|
||||
}
|
||||
|
||||
/**
|
||||
* omap3xxx_prm_clear_global_cold_reset - checks the global cold reset status
|
||||
* and clears it if asserted
|
||||
*
|
||||
* Checks if cold-reset has occurred and clears the status bit if yes. Returns
|
||||
* 1 if cold-reset has occurred, 0 otherwise.
|
||||
*/
|
||||
int omap3xxx_prm_clear_global_cold_reset(void)
|
||||
{
|
||||
if (omap2_prm_read_mod_reg(OMAP3430_GR_MOD, OMAP3_PRM_RSTST_OFFSET) &
|
||||
OMAP3430_GLOBAL_COLD_RST_MASK) {
|
||||
omap2_prm_set_mod_reg_bits(OMAP3430_GLOBAL_COLD_RST_MASK,
|
||||
OMAP3430_GR_MOD,
|
||||
OMAP3_PRM_RSTST_OFFSET);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void omap3_prm_save_scratchpad_contents(u32 *ptr)
|
||||
{
|
||||
*ptr++ = omap2_prm_read_mod_reg(OMAP3430_GR_MOD,
|
||||
OMAP3_PRM_CLKSRC_CTRL_OFFSET);
|
||||
|
||||
*ptr++ = omap2_prm_read_mod_reg(OMAP3430_GR_MOD,
|
||||
OMAP3_PRM_CLKSEL_OFFSET);
|
||||
}
|
||||
|
||||
/* Powerdomain low-level functions */
|
||||
|
||||
static int omap3_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
|
||||
|
|
|
@ -162,6 +162,12 @@ extern void omap3xxx_prm_dpll3_reset(void);
|
|||
|
||||
extern int __init omap3xxx_prm_init(void);
|
||||
extern u32 omap3xxx_prm_get_reset_sources(void);
|
||||
int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits);
|
||||
void omap3xxx_prm_iva_idle(void);
|
||||
void omap3_prm_reset_modem(void);
|
||||
int omap3xxx_prm_clear_global_cold_reset(void);
|
||||
void omap3_prm_save_scratchpad_contents(u32 *ptr);
|
||||
void omap3_prm_init_pm(bool has_uart4, bool has_iva);
|
||||
|
||||
#endif /* __ASSEMBLER */
|
||||
|
||||
|
|
|
@ -95,7 +95,6 @@ static int tusb_set_sync_mode(unsigned sysclk_ps)
|
|||
dev_t.t_avdp_w = t_scsnh_advnh;
|
||||
dev_t.cyc_aavdh_we = 3;
|
||||
dev_t.cyc_wpl = 6;
|
||||
dev_t.t_ce_rdyz = 7000;
|
||||
|
||||
gpmc_calc_timings(&t, &tusb_sync, &dev_t);
|
||||
|
||||
|
|
|
@ -514,7 +514,7 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = {
|
|||
.gpio_pullup = CORGI_GPIO_USB_PULLUP,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MASTER)
|
||||
#if IS_ENABLED(CONFIG_SPI_PXA2XX)
|
||||
static struct pxa2xx_spi_master corgi_spi_info = {
|
||||
.num_chipselect = 3,
|
||||
};
|
||||
|
|
|
@ -90,19 +90,15 @@ EXPORT_SYMBOL(get_clk_frequency_khz);
|
|||
*/
|
||||
static struct map_desc common_io_desc[] __initdata = {
|
||||
{ /* Devs */
|
||||
.virtual = 0xf2000000,
|
||||
.pfn = __phys_to_pfn(0x40000000),
|
||||
.length = 0x02000000,
|
||||
.type = MT_DEVICE
|
||||
}, { /* UNCACHED_PHYS_0 */
|
||||
.virtual = 0xff000000,
|
||||
.pfn = __phys_to_pfn(0x00000000),
|
||||
.length = 0x00100000,
|
||||
.virtual = (unsigned long)PERIPH_VIRT,
|
||||
.pfn = __phys_to_pfn(PERIPH_PHYS),
|
||||
.length = PERIPH_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
void __init pxa_map_io(void)
|
||||
{
|
||||
debug_ll_io_init();
|
||||
iotable_init(ARRAY_AND_SIZE(common_io_desc));
|
||||
}
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
* Workarounds for at least 2 errata so far require this.
|
||||
* The mapping is set in mach-pxa/generic.c.
|
||||
*/
|
||||
#define UNCACHED_PHYS_0 0xff000000
|
||||
#define UNCACHED_ADDR UNCACHED_PHYS_0
|
||||
#define UNCACHED_PHYS_0 0xfe000000
|
||||
#define UNCACHED_PHYS_0_SIZE 0x00100000
|
||||
|
||||
/*
|
||||
* Intel PXA2xx internal register mapping:
|
||||
|
|
|
@ -331,7 +331,12 @@ static struct map_desc pxa25x_io_desc[] __initdata = {
|
|||
{ /* Mem Ctl */
|
||||
.virtual = (unsigned long)SMEMC_VIRT,
|
||||
.pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE),
|
||||
.length = 0x00200000,
|
||||
.length = SMEMC_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, { /* UNCACHED_PHYS_0 */
|
||||
.virtual = UNCACHED_PHYS_0,
|
||||
.pfn = __phys_to_pfn(0x00000000),
|
||||
.length = UNCACHED_PHYS_0_SIZE,
|
||||
.type = MT_DEVICE
|
||||
},
|
||||
};
|
||||
|
|
|
@ -402,12 +402,12 @@ static struct map_desc pxa27x_io_desc[] __initdata = {
|
|||
{ /* Mem Ctl */
|
||||
.virtual = (unsigned long)SMEMC_VIRT,
|
||||
.pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE),
|
||||
.length = 0x00200000,
|
||||
.length = SMEMC_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, { /* IMem ctl */
|
||||
.virtual = 0xfe000000,
|
||||
.pfn = __phys_to_pfn(0x58000000),
|
||||
.length = 0x00100000,
|
||||
}, { /* UNCACHED_PHYS_0 */
|
||||
.virtual = UNCACHED_PHYS_0,
|
||||
.pfn = __phys_to_pfn(0x00000000),
|
||||
.length = UNCACHED_PHYS_0_SIZE,
|
||||
.type = MT_DEVICE
|
||||
},
|
||||
};
|
||||
|
|
|
@ -416,7 +416,7 @@ static struct map_desc pxa3xx_io_desc[] __initdata = {
|
|||
{ /* Mem Ctl */
|
||||
.virtual = (unsigned long)SMEMC_VIRT,
|
||||
.pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE),
|
||||
.length = 0x00200000,
|
||||
.length = SMEMC_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
|
|
|
@ -157,7 +157,7 @@ pxa_cpu_do_suspend:
|
|||
@ Do not reorder...
|
||||
@ Intel PXA270 Specification Update notes problems performing
|
||||
@ external accesses after SDRAM is put in self-refresh mode
|
||||
@ (see Errata 39 ...hangs when entering self-refresh mode)
|
||||
@ (see Errata 38 ...hangs when entering self-refresh mode)
|
||||
|
||||
@ force address lines low by reading at physical address 0
|
||||
ldr r3, [r2]
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/amba/bus.h>
|
||||
#include <linux/amba/clcd.h>
|
||||
#include <linux/platform_data/video-clcd-versatile.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/smsc911x.h>
|
||||
#include <linux/ata_platform.h>
|
||||
|
@ -48,7 +49,6 @@
|
|||
#include <mach/irqs.h>
|
||||
#include <asm/hardware/timer-sp.h>
|
||||
|
||||
#include <plat/clcd.h>
|
||||
#include <plat/sched_clock.h>
|
||||
|
||||
#include "core.h"
|
||||
|
|
|
@ -1,102 +0,0 @@
|
|||
# arch/arm/mach-s5p64x0/Kconfig
|
||||
#
|
||||
# Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
|
||||
# http://www.samsung.com/
|
||||
#
|
||||
# Licensed under GPLv2
|
||||
|
||||
if ARCH_S5P64X0
|
||||
|
||||
config CPU_S5P6440
|
||||
bool
|
||||
select ARM_AMBA
|
||||
select PL330_DMA if DMADEVICES
|
||||
select S5P_SLEEP if PM
|
||||
select SAMSUNG_WAKEMASK if PM
|
||||
help
|
||||
Enable S5P6440 CPU support
|
||||
|
||||
config CPU_S5P6450
|
||||
bool
|
||||
select ARM_AMBA
|
||||
select PL330_DMA if DMADEVICES
|
||||
select S5P_SLEEP if PM
|
||||
select SAMSUNG_WAKEMASK if PM
|
||||
help
|
||||
Enable S5P6450 CPU support
|
||||
|
||||
config S5P64X0_SETUP_FB_24BPP
|
||||
bool
|
||||
help
|
||||
Common setup code for S5P64X0 based boards with a LCD display
|
||||
through RGB interface.
|
||||
|
||||
config S5P64X0_SETUP_I2C1
|
||||
bool
|
||||
help
|
||||
Common setup code for i2c bus 1.
|
||||
|
||||
config S5P64X0_SETUP_SPI
|
||||
bool
|
||||
help
|
||||
Common setup code for SPI GPIO configurations
|
||||
|
||||
config S5P64X0_SETUP_SDHCI_GPIO
|
||||
bool
|
||||
help
|
||||
Common setup code for SDHCI gpio.
|
||||
|
||||
# machine support
|
||||
|
||||
config MACH_SMDK6440
|
||||
bool "SMDK6440"
|
||||
select CPU_S5P6440
|
||||
select S3C_DEV_FB
|
||||
select S3C_DEV_HSMMC
|
||||
select S3C_DEV_HSMMC1
|
||||
select S3C_DEV_HSMMC2
|
||||
select S3C_DEV_I2C1
|
||||
select S3C_DEV_RTC
|
||||
select S3C_DEV_WDT
|
||||
select S5P64X0_SETUP_FB_24BPP
|
||||
select S5P64X0_SETUP_I2C1
|
||||
select S5P64X0_SETUP_SDHCI_GPIO
|
||||
select SAMSUNG_DEV_ADC
|
||||
select SAMSUNG_DEV_BACKLIGHT
|
||||
select SAMSUNG_DEV_PWM
|
||||
select SAMSUNG_DEV_TS
|
||||
help
|
||||
Machine support for the Samsung SMDK6440
|
||||
|
||||
config MACH_SMDK6450
|
||||
bool "SMDK6450"
|
||||
select CPU_S5P6450
|
||||
select S3C_DEV_FB
|
||||
select S3C_DEV_HSMMC
|
||||
select S3C_DEV_HSMMC1
|
||||
select S3C_DEV_HSMMC2
|
||||
select S3C_DEV_I2C1
|
||||
select S3C_DEV_RTC
|
||||
select S3C_DEV_WDT
|
||||
select S5P64X0_SETUP_FB_24BPP
|
||||
select S5P64X0_SETUP_I2C1
|
||||
select S5P64X0_SETUP_SDHCI_GPIO
|
||||
select SAMSUNG_DEV_ADC
|
||||
select SAMSUNG_DEV_BACKLIGHT
|
||||
select SAMSUNG_DEV_PWM
|
||||
select SAMSUNG_DEV_TS
|
||||
help
|
||||
Machine support for the Samsung SMDK6450
|
||||
|
||||
menu "Use 8-bit SDHCI bus width"
|
||||
|
||||
config S5P64X0_SD_CH1_8BIT
|
||||
bool "SDHCI Channel 1 (Slot 1)"
|
||||
depends on MACH_SMDK6450 || MACH_SMDK6440
|
||||
help
|
||||
Support SDHCI Channel 1 8-bit bus.
|
||||
If selected, Channel 2 is disabled.
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
|
@ -1,36 +0,0 @@
|
|||
# arch/arm/mach-s5p64x0/Makefile
|
||||
#
|
||||
# Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
|
||||
# http://www.samsung.com
|
||||
#
|
||||
# Licensed under GPLv2
|
||||
|
||||
obj-y :=
|
||||
obj-m :=
|
||||
obj-n :=
|
||||
obj- :=
|
||||
|
||||
# Core
|
||||
|
||||
obj-y += common.o clock.o
|
||||
obj-$(CONFIG_CPU_S5P6440) += clock-s5p6440.o
|
||||
obj-$(CONFIG_CPU_S5P6450) += clock-s5p6450.o
|
||||
|
||||
obj-$(CONFIG_PM) += pm.o irq-pm.o
|
||||
|
||||
obj-y += dma.o
|
||||
|
||||
# machine support
|
||||
|
||||
obj-$(CONFIG_MACH_SMDK6440) += mach-smdk6440.o
|
||||
obj-$(CONFIG_MACH_SMDK6450) += mach-smdk6450.o
|
||||
|
||||
# device support
|
||||
|
||||
obj-y += dev-audio.o
|
||||
|
||||
obj-y += setup-i2c0.o
|
||||
obj-$(CONFIG_S5P64X0_SETUP_I2C1) += setup-i2c1.o
|
||||
obj-$(CONFIG_S5P64X0_SETUP_FB_24BPP) += setup-fb-24bpp.o
|
||||
obj-$(CONFIG_S5P64X0_SETUP_SPI) += setup-spi.o
|
||||
obj-$(CONFIG_S5P64X0_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
|
|
@ -1,2 +0,0 @@
|
|||
zreladdr-y += 0x20008000
|
||||
params_phys-y := 0x20000100
|
|
@ -1,632 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/clock-s5p6440.c
|
||||
*
|
||||
* Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P6440 - Clock support
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/map.h>
|
||||
#include <mach/regs-clock.h>
|
||||
|
||||
#include <plat/cpu-freq.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/pll.h>
|
||||
#include <plat/s5p-clock.h>
|
||||
#include <plat/clock-clksrc.h>
|
||||
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
|
||||
static u32 epll_div[][5] = {
|
||||
{ 36000000, 0, 48, 1, 4 },
|
||||
{ 48000000, 0, 32, 1, 3 },
|
||||
{ 60000000, 0, 40, 1, 3 },
|
||||
{ 72000000, 0, 48, 1, 3 },
|
||||
{ 84000000, 0, 28, 1, 2 },
|
||||
{ 96000000, 0, 32, 1, 2 },
|
||||
{ 32768000, 45264, 43, 1, 4 },
|
||||
{ 45158000, 6903, 30, 1, 3 },
|
||||
{ 49152000, 50332, 32, 1, 3 },
|
||||
{ 67738000, 10398, 45, 1, 3 },
|
||||
{ 73728000, 9961, 49, 1, 3 }
|
||||
};
|
||||
|
||||
static int s5p6440_epll_set_rate(struct clk *clk, unsigned long rate)
|
||||
{
|
||||
unsigned int epll_con, epll_con_k;
|
||||
unsigned int i;
|
||||
|
||||
if (clk->rate == rate) /* Return if nothing changed */
|
||||
return 0;
|
||||
|
||||
epll_con = __raw_readl(S5P64X0_EPLL_CON);
|
||||
epll_con_k = __raw_readl(S5P64X0_EPLL_CON_K);
|
||||
|
||||
epll_con_k &= ~(PLL90XX_KDIV_MASK);
|
||||
epll_con &= ~(PLL90XX_MDIV_MASK | PLL90XX_PDIV_MASK | PLL90XX_SDIV_MASK);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(epll_div); i++) {
|
||||
if (epll_div[i][0] == rate) {
|
||||
epll_con_k |= (epll_div[i][1] << PLL90XX_KDIV_SHIFT);
|
||||
epll_con |= (epll_div[i][2] << PLL90XX_MDIV_SHIFT) |
|
||||
(epll_div[i][3] << PLL90XX_PDIV_SHIFT) |
|
||||
(epll_div[i][4] << PLL90XX_SDIV_SHIFT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == ARRAY_SIZE(epll_div)) {
|
||||
printk(KERN_ERR "%s: Invalid Clock EPLL Frequency\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
__raw_writel(epll_con, S5P64X0_EPLL_CON);
|
||||
__raw_writel(epll_con_k, S5P64X0_EPLL_CON_K);
|
||||
|
||||
printk(KERN_WARNING "EPLL Rate changes from %lu to %lu\n",
|
||||
clk->rate, rate);
|
||||
|
||||
clk->rate = rate;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct clk_ops s5p6440_epll_ops = {
|
||||
.get_rate = s5p_epll_get_rate,
|
||||
.set_rate = s5p6440_epll_set_rate,
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_hclk = {
|
||||
.clk = {
|
||||
.name = "clk_hclk",
|
||||
.parent = &clk_armclk.clk,
|
||||
},
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 8, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_pclk = {
|
||||
.clk = {
|
||||
.name = "clk_pclk",
|
||||
.parent = &clk_hclk.clk,
|
||||
},
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 },
|
||||
};
|
||||
static struct clksrc_clk clk_hclk_low = {
|
||||
.clk = {
|
||||
.name = "clk_hclk_low",
|
||||
},
|
||||
.sources = &clkset_hclk_low,
|
||||
.reg_src = { .reg = S5P64X0_SYS_OTHERS, .shift = 6, .size = 1 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 8, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_pclk_low = {
|
||||
.clk = {
|
||||
.name = "clk_pclk_low",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
},
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 },
|
||||
};
|
||||
|
||||
/*
|
||||
* The following clocks will be disabled during clock initialization. It is
|
||||
* recommended to keep the following clocks disabled until the driver requests
|
||||
* for enabling the clock.
|
||||
*/
|
||||
static struct clk init_clocks_off[] = {
|
||||
{
|
||||
.name = "nand",
|
||||
.parent = &clk_hclk.clk,
|
||||
.enable = s5p64x0_mem_ctrl,
|
||||
.ctrlbit = (1 << 2),
|
||||
}, {
|
||||
.name = "post",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 5)
|
||||
}, {
|
||||
.name = "2d",
|
||||
.parent = &clk_hclk.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 8),
|
||||
}, {
|
||||
.name = "dma",
|
||||
.devname = "dma-pl330",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 12),
|
||||
}, {
|
||||
.name = "hsmmc",
|
||||
.devname = "s3c-sdhci.0",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 17),
|
||||
}, {
|
||||
.name = "hsmmc",
|
||||
.devname = "s3c-sdhci.1",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 18),
|
||||
}, {
|
||||
.name = "hsmmc",
|
||||
.devname = "s3c-sdhci.2",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 19),
|
||||
}, {
|
||||
.name = "otg",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 20)
|
||||
}, {
|
||||
.name = "irom",
|
||||
.parent = &clk_hclk.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 25),
|
||||
}, {
|
||||
.name = "lcd",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk1_ctrl,
|
||||
.ctrlbit = (1 << 1),
|
||||
}, {
|
||||
.name = "hclk_fimgvg",
|
||||
.parent = &clk_hclk.clk,
|
||||
.enable = s5p64x0_hclk1_ctrl,
|
||||
.ctrlbit = (1 << 2),
|
||||
}, {
|
||||
.name = "tsi",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk1_ctrl,
|
||||
.ctrlbit = (1 << 0),
|
||||
}, {
|
||||
.name = "watchdog",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 5),
|
||||
}, {
|
||||
.name = "rtc",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 6),
|
||||
}, {
|
||||
.name = "timers",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 7),
|
||||
}, {
|
||||
.name = "pcm",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 8),
|
||||
}, {
|
||||
.name = "adc",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 12),
|
||||
}, {
|
||||
.name = "i2c",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 17),
|
||||
}, {
|
||||
.name = "spi",
|
||||
.devname = "s5p64x0-spi.0",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 21),
|
||||
}, {
|
||||
.name = "spi",
|
||||
.devname = "s5p64x0-spi.1",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 22),
|
||||
}, {
|
||||
.name = "gps",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 25),
|
||||
}, {
|
||||
.name = "dsim",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 28),
|
||||
}, {
|
||||
.name = "etm",
|
||||
.parent = &clk_pclk.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 29),
|
||||
}, {
|
||||
.name = "dmc0",
|
||||
.parent = &clk_pclk.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 30),
|
||||
}, {
|
||||
.name = "pclk_fimgvg",
|
||||
.parent = &clk_pclk.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 31),
|
||||
}, {
|
||||
.name = "mmc_48m",
|
||||
.devname = "s3c-sdhci.0",
|
||||
.parent = &clk_48m,
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
.ctrlbit = (1 << 27),
|
||||
}, {
|
||||
.name = "mmc_48m",
|
||||
.devname = "s3c-sdhci.1",
|
||||
.parent = &clk_48m,
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
.ctrlbit = (1 << 28),
|
||||
}, {
|
||||
.name = "mmc_48m",
|
||||
.devname = "s3c-sdhci.2",
|
||||
.parent = &clk_48m,
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
.ctrlbit = (1 << 29),
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* The following clocks will be enabled during clock initialization.
|
||||
*/
|
||||
static struct clk init_clocks[] = {
|
||||
{
|
||||
.name = "intc",
|
||||
.parent = &clk_hclk.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 1),
|
||||
}, {
|
||||
.name = "mem",
|
||||
.parent = &clk_hclk.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 21),
|
||||
}, {
|
||||
.name = "uart",
|
||||
.devname = "s3c6400-uart.0",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 1),
|
||||
}, {
|
||||
.name = "uart",
|
||||
.devname = "s3c6400-uart.1",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 2),
|
||||
}, {
|
||||
.name = "uart",
|
||||
.devname = "s3c6400-uart.2",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 3),
|
||||
}, {
|
||||
.name = "uart",
|
||||
.devname = "s3c6400-uart.3",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 4),
|
||||
}, {
|
||||
.name = "gpio",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 18),
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk clk_iis_cd_v40 = {
|
||||
.name = "iis_cdclk_v40",
|
||||
};
|
||||
|
||||
static struct clk clk_pcm_cd = {
|
||||
.name = "pcm_cdclk",
|
||||
};
|
||||
|
||||
static struct clk *clkset_group1_list[] = {
|
||||
&clk_mout_epll.clk,
|
||||
&clk_dout_mpll.clk,
|
||||
&clk_fin_epll,
|
||||
};
|
||||
|
||||
static struct clksrc_sources clkset_group1 = {
|
||||
.sources = clkset_group1_list,
|
||||
.nr_sources = ARRAY_SIZE(clkset_group1_list),
|
||||
};
|
||||
|
||||
static struct clk *clkset_uart_list[] = {
|
||||
&clk_mout_epll.clk,
|
||||
&clk_dout_mpll.clk,
|
||||
};
|
||||
|
||||
static struct clksrc_sources clkset_uart = {
|
||||
.sources = clkset_uart_list,
|
||||
.nr_sources = ARRAY_SIZE(clkset_uart_list),
|
||||
};
|
||||
|
||||
static struct clk *clkset_audio_list[] = {
|
||||
&clk_mout_epll.clk,
|
||||
&clk_dout_mpll.clk,
|
||||
&clk_fin_epll,
|
||||
&clk_iis_cd_v40,
|
||||
&clk_pcm_cd,
|
||||
};
|
||||
|
||||
static struct clksrc_sources clkset_audio = {
|
||||
.sources = clkset_audio_list,
|
||||
.nr_sources = ARRAY_SIZE(clkset_audio_list),
|
||||
};
|
||||
|
||||
static struct clksrc_clk clksrcs[] = {
|
||||
{
|
||||
.clk = {
|
||||
.name = "sclk_post",
|
||||
.ctrlbit = (1 << 10),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group1,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 26, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 12, .size = 4 },
|
||||
}, {
|
||||
.clk = {
|
||||
.name = "sclk_dispcon",
|
||||
.ctrlbit = (1 << 1),
|
||||
.enable = s5p64x0_sclk1_ctrl,
|
||||
},
|
||||
.sources = &clkset_group1,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC1, .shift = 4, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 0, .size = 4 },
|
||||
}, {
|
||||
.clk = {
|
||||
.name = "sclk_fimgvg",
|
||||
.ctrlbit = (1 << 2),
|
||||
.enable = s5p64x0_sclk1_ctrl,
|
||||
},
|
||||
.sources = &clkset_group1,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC1, .shift = 8, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 4, .size = 4 },
|
||||
},
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_mmc0 = {
|
||||
.clk = {
|
||||
.name = "sclk_mmc",
|
||||
.devname = "s3c-sdhci.0",
|
||||
.ctrlbit = (1 << 24),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group1,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 18, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 0, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_mmc1 = {
|
||||
.clk = {
|
||||
.name = "sclk_mmc",
|
||||
.devname = "s3c-sdhci.1",
|
||||
.ctrlbit = (1 << 25),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group1,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 20, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 4, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_mmc2 = {
|
||||
.clk = {
|
||||
.name = "sclk_mmc",
|
||||
.devname = "s3c-sdhci.2",
|
||||
.ctrlbit = (1 << 26),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group1,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 22, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 8, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_uclk = {
|
||||
.clk = {
|
||||
.name = "uclk1",
|
||||
.ctrlbit = (1 << 5),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_uart,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 13, .size = 1 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 16, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clk clk_i2s0 = {
|
||||
.name = "iis",
|
||||
.devname = "samsung-i2s.0",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 26),
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_audio_bus2 = {
|
||||
.clk = {
|
||||
.name = "sclk_audio2",
|
||||
.devname = "samsung-i2s.0",
|
||||
.ctrlbit = (1 << 11),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_audio,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC1, .shift = 0, .size = 3 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 24, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_spi0 = {
|
||||
.clk = {
|
||||
.name = "sclk_spi",
|
||||
.devname = "s5p64x0-spi.0",
|
||||
.ctrlbit = (1 << 20),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group1,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 14, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 0, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_spi1 = {
|
||||
.clk = {
|
||||
.name = "sclk_spi",
|
||||
.devname = "s5p64x0-spi.1",
|
||||
.ctrlbit = (1 << 21),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group1,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 16, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 4, .size = 4 },
|
||||
};
|
||||
|
||||
/* Clock initialization code */
|
||||
static struct clksrc_clk *sysclks[] = {
|
||||
&clk_mout_apll,
|
||||
&clk_mout_epll,
|
||||
&clk_mout_mpll,
|
||||
&clk_dout_mpll,
|
||||
&clk_armclk,
|
||||
&clk_hclk,
|
||||
&clk_pclk,
|
||||
&clk_hclk_low,
|
||||
&clk_pclk_low,
|
||||
};
|
||||
|
||||
static struct clk dummy_apb_pclk = {
|
||||
.name = "apb_pclk",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct clk *clk_cdev[] = {
|
||||
&clk_i2s0,
|
||||
};
|
||||
|
||||
static struct clksrc_clk *clksrc_cdev[] = {
|
||||
&clk_sclk_uclk,
|
||||
&clk_sclk_spi0,
|
||||
&clk_sclk_spi1,
|
||||
&clk_sclk_mmc0,
|
||||
&clk_sclk_mmc1,
|
||||
&clk_sclk_mmc2,
|
||||
&clk_audio_bus2,
|
||||
};
|
||||
|
||||
static struct clk_lookup s5p6440_clk_lookup[] = {
|
||||
CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_pclk_low.clk),
|
||||
CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_sclk_uclk.clk),
|
||||
CLKDEV_INIT(NULL, "spi_busclk0", &clk_p),
|
||||
CLKDEV_INIT("s5p64x0-spi.0", "spi_busclk1", &clk_sclk_spi0.clk),
|
||||
CLKDEV_INIT("s5p64x0-spi.1", "spi_busclk1", &clk_sclk_spi1.clk),
|
||||
CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &clk_sclk_mmc0.clk),
|
||||
CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &clk_sclk_mmc1.clk),
|
||||
CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &clk_sclk_mmc2.clk),
|
||||
CLKDEV_INIT("samsung-i2s.0", "i2s_opclk0", &clk_i2s0),
|
||||
CLKDEV_INIT("samsung-i2s.0", "i2s_opclk1", &clk_audio_bus2.clk),
|
||||
};
|
||||
|
||||
void __init_or_cpufreq s5p6440_setup_clocks(void)
|
||||
{
|
||||
struct clk *xtal_clk;
|
||||
|
||||
unsigned long xtal;
|
||||
unsigned long fclk;
|
||||
unsigned long hclk;
|
||||
unsigned long hclk_low;
|
||||
unsigned long pclk;
|
||||
unsigned long pclk_low;
|
||||
|
||||
unsigned long apll;
|
||||
unsigned long mpll;
|
||||
unsigned long epll;
|
||||
unsigned int ptr;
|
||||
|
||||
/* Set S5P6440 functions for clk_fout_epll */
|
||||
|
||||
clk_fout_epll.enable = s5p_epll_enable;
|
||||
clk_fout_epll.ops = &s5p6440_epll_ops;
|
||||
|
||||
clk_48m.enable = s5p64x0_clk48m_ctrl;
|
||||
|
||||
xtal_clk = clk_get(NULL, "ext_xtal");
|
||||
BUG_ON(IS_ERR(xtal_clk));
|
||||
|
||||
xtal = clk_get_rate(xtal_clk);
|
||||
clk_put(xtal_clk);
|
||||
|
||||
apll = s5p_get_pll45xx(xtal, __raw_readl(S5P64X0_APLL_CON), pll_4502);
|
||||
mpll = s5p_get_pll45xx(xtal, __raw_readl(S5P64X0_MPLL_CON), pll_4502);
|
||||
epll = s5p_get_pll90xx(xtal, __raw_readl(S5P64X0_EPLL_CON),
|
||||
__raw_readl(S5P64X0_EPLL_CON_K));
|
||||
|
||||
clk_fout_apll.rate = apll;
|
||||
clk_fout_mpll.rate = mpll;
|
||||
clk_fout_epll.rate = epll;
|
||||
|
||||
printk(KERN_INFO "S5P6440: PLL settings, A=%ld.%ldMHz, M=%ld.%ldMHz," \
|
||||
" E=%ld.%ldMHz\n",
|
||||
print_mhz(apll), print_mhz(mpll), print_mhz(epll));
|
||||
|
||||
fclk = clk_get_rate(&clk_armclk.clk);
|
||||
hclk = clk_get_rate(&clk_hclk.clk);
|
||||
pclk = clk_get_rate(&clk_pclk.clk);
|
||||
hclk_low = clk_get_rate(&clk_hclk_low.clk);
|
||||
pclk_low = clk_get_rate(&clk_pclk_low.clk);
|
||||
|
||||
printk(KERN_INFO "S5P6440: HCLK=%ld.%ldMHz, HCLK_LOW=%ld.%ldMHz," \
|
||||
" PCLK=%ld.%ldMHz, PCLK_LOW=%ld.%ldMHz\n",
|
||||
print_mhz(hclk), print_mhz(hclk_low),
|
||||
print_mhz(pclk), print_mhz(pclk_low));
|
||||
|
||||
clk_f.rate = fclk;
|
||||
clk_h.rate = hclk;
|
||||
clk_p.rate = pclk;
|
||||
|
||||
for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
|
||||
s3c_set_clksrc(&clksrcs[ptr], true);
|
||||
}
|
||||
|
||||
static struct clk *clks[] __initdata = {
|
||||
&clk_ext,
|
||||
&clk_iis_cd_v40,
|
||||
&clk_pcm_cd,
|
||||
};
|
||||
|
||||
void __init s5p6440_register_clocks(void)
|
||||
{
|
||||
int ptr;
|
||||
unsigned int cnt;
|
||||
|
||||
s3c24xx_register_clocks(clks, ARRAY_SIZE(clks));
|
||||
|
||||
for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++)
|
||||
s3c_register_clksrc(sysclks[ptr], 1);
|
||||
|
||||
s3c24xx_register_clocks(clk_cdev, ARRAY_SIZE(clk_cdev));
|
||||
for (cnt = 0; cnt < ARRAY_SIZE(clk_cdev); cnt++)
|
||||
s3c_disable_clocks(clk_cdev[cnt], 1);
|
||||
|
||||
s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
|
||||
s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
|
||||
for (ptr = 0; ptr < ARRAY_SIZE(clksrc_cdev); ptr++)
|
||||
s3c_register_clksrc(clksrc_cdev[ptr], 1);
|
||||
|
||||
s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
|
||||
s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
|
||||
clkdev_add_table(s5p6440_clk_lookup, ARRAY_SIZE(s5p6440_clk_lookup));
|
||||
|
||||
s3c24xx_register_clock(&dummy_apb_pclk);
|
||||
}
|
|
@ -1,701 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/clock-s5p6450.c
|
||||
*
|
||||
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P6450 - Clock support
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/map.h>
|
||||
#include <mach/regs-clock.h>
|
||||
|
||||
#include <plat/cpu-freq.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/pll.h>
|
||||
#include <plat/s5p-clock.h>
|
||||
#include <plat/clock-clksrc.h>
|
||||
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
|
||||
static struct clksrc_clk clk_mout_dpll = {
|
||||
.clk = {
|
||||
.name = "mout_dpll",
|
||||
},
|
||||
.sources = &clk_src_dpll,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 5, .size = 1 },
|
||||
};
|
||||
|
||||
static u32 epll_div[][5] = {
|
||||
{ 133000000, 27307, 55, 2, 2 },
|
||||
{ 100000000, 43691, 41, 2, 2 },
|
||||
{ 480000000, 0, 80, 2, 0 },
|
||||
};
|
||||
|
||||
static int s5p6450_epll_set_rate(struct clk *clk, unsigned long rate)
|
||||
{
|
||||
unsigned int epll_con, epll_con_k;
|
||||
unsigned int i;
|
||||
|
||||
if (clk->rate == rate) /* Return if nothing changed */
|
||||
return 0;
|
||||
|
||||
epll_con = __raw_readl(S5P64X0_EPLL_CON);
|
||||
epll_con_k = __raw_readl(S5P64X0_EPLL_CON_K);
|
||||
|
||||
epll_con_k &= ~(PLL90XX_KDIV_MASK);
|
||||
epll_con &= ~(PLL90XX_MDIV_MASK | PLL90XX_PDIV_MASK | PLL90XX_SDIV_MASK);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(epll_div); i++) {
|
||||
if (epll_div[i][0] == rate) {
|
||||
epll_con_k |= (epll_div[i][1] << PLL90XX_KDIV_SHIFT);
|
||||
epll_con |= (epll_div[i][2] << PLL90XX_MDIV_SHIFT) |
|
||||
(epll_div[i][3] << PLL90XX_PDIV_SHIFT) |
|
||||
(epll_div[i][4] << PLL90XX_SDIV_SHIFT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == ARRAY_SIZE(epll_div)) {
|
||||
printk(KERN_ERR "%s: Invalid Clock EPLL Frequency\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
__raw_writel(epll_con, S5P64X0_EPLL_CON);
|
||||
__raw_writel(epll_con_k, S5P64X0_EPLL_CON_K);
|
||||
|
||||
printk(KERN_WARNING "EPLL Rate changes from %lu to %lu\n",
|
||||
clk->rate, rate);
|
||||
|
||||
clk->rate = rate;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct clk_ops s5p6450_epll_ops = {
|
||||
.get_rate = s5p_epll_get_rate,
|
||||
.set_rate = s5p6450_epll_set_rate,
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_dout_epll = {
|
||||
.clk = {
|
||||
.name = "dout_epll",
|
||||
.parent = &clk_mout_epll.clk,
|
||||
},
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 24, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_mout_hclk_sel = {
|
||||
.clk = {
|
||||
.name = "mout_hclk_sel",
|
||||
},
|
||||
.sources = &clkset_hclk_low,
|
||||
.reg_src = { .reg = S5P64X0_OTHERS, .shift = 15, .size = 1 },
|
||||
};
|
||||
|
||||
static struct clk *clkset_hclk_list[] = {
|
||||
&clk_mout_hclk_sel.clk,
|
||||
&clk_armclk.clk,
|
||||
};
|
||||
|
||||
static struct clksrc_sources clkset_hclk = {
|
||||
.sources = clkset_hclk_list,
|
||||
.nr_sources = ARRAY_SIZE(clkset_hclk_list),
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_hclk = {
|
||||
.clk = {
|
||||
.name = "clk_hclk",
|
||||
},
|
||||
.sources = &clkset_hclk,
|
||||
.reg_src = { .reg = S5P64X0_OTHERS, .shift = 14, .size = 1 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 8, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_pclk = {
|
||||
.clk = {
|
||||
.name = "clk_pclk",
|
||||
.parent = &clk_hclk.clk,
|
||||
},
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 },
|
||||
};
|
||||
static struct clksrc_clk clk_dout_pwm_ratio0 = {
|
||||
.clk = {
|
||||
.name = "clk_dout_pwm_ratio0",
|
||||
.parent = &clk_mout_hclk_sel.clk,
|
||||
},
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 16, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_pclk_to_wdt_pwm = {
|
||||
.clk = {
|
||||
.name = "clk_pclk_to_wdt_pwm",
|
||||
.parent = &clk_dout_pwm_ratio0.clk,
|
||||
},
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 20, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_hclk_low = {
|
||||
.clk = {
|
||||
.name = "clk_hclk_low",
|
||||
},
|
||||
.sources = &clkset_hclk_low,
|
||||
.reg_src = { .reg = S5P64X0_OTHERS, .shift = 6, .size = 1 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 8, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_pclk_low = {
|
||||
.clk = {
|
||||
.name = "clk_pclk_low",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
},
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 },
|
||||
};
|
||||
|
||||
/*
|
||||
* The following clocks will be disabled during clock initialization. It is
|
||||
* recommended to keep the following clocks disabled until the driver requests
|
||||
* for enabling the clock.
|
||||
*/
|
||||
static struct clk init_clocks_off[] = {
|
||||
{
|
||||
.name = "usbhost",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 3),
|
||||
}, {
|
||||
.name = "dma",
|
||||
.devname = "dma-pl330",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 12),
|
||||
}, {
|
||||
.name = "hsmmc",
|
||||
.devname = "s3c-sdhci.0",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 17),
|
||||
}, {
|
||||
.name = "hsmmc",
|
||||
.devname = "s3c-sdhci.1",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 18),
|
||||
}, {
|
||||
.name = "hsmmc",
|
||||
.devname = "s3c-sdhci.2",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 19),
|
||||
}, {
|
||||
.name = "usbotg",
|
||||
.parent = &clk_hclk_low.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 20),
|
||||
}, {
|
||||
.name = "lcd",
|
||||
.parent = &clk_h,
|
||||
.enable = s5p64x0_hclk1_ctrl,
|
||||
.ctrlbit = (1 << 1),
|
||||
}, {
|
||||
.name = "watchdog",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 5),
|
||||
}, {
|
||||
.name = "rtc",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 6),
|
||||
}, {
|
||||
.name = "adc",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 12),
|
||||
}, {
|
||||
.name = "i2c",
|
||||
.devname = "s3c2440-i2c.0",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 17),
|
||||
}, {
|
||||
.name = "spi",
|
||||
.devname = "s5p64x0-spi.0",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 21),
|
||||
}, {
|
||||
.name = "spi",
|
||||
.devname = "s5p64x0-spi.1",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 22),
|
||||
}, {
|
||||
.name = "i2c",
|
||||
.devname = "s3c2440-i2c.1",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 27),
|
||||
}, {
|
||||
.name = "dmc0",
|
||||
.parent = &clk_pclk.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 30),
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* The following clocks will be enabled during clock initialization.
|
||||
*/
|
||||
static struct clk init_clocks[] = {
|
||||
{
|
||||
.name = "intc",
|
||||
.parent = &clk_hclk.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 1),
|
||||
}, {
|
||||
.name = "mem",
|
||||
.parent = &clk_hclk.clk,
|
||||
.enable = s5p64x0_hclk0_ctrl,
|
||||
.ctrlbit = (1 << 21),
|
||||
}, {
|
||||
.name = "uart",
|
||||
.devname = "s3c6400-uart.0",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 1),
|
||||
}, {
|
||||
.name = "uart",
|
||||
.devname = "s3c6400-uart.1",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 2),
|
||||
}, {
|
||||
.name = "uart",
|
||||
.devname = "s3c6400-uart.2",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 3),
|
||||
}, {
|
||||
.name = "uart",
|
||||
.devname = "s3c6400-uart.3",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 4),
|
||||
}, {
|
||||
.name = "timers",
|
||||
.parent = &clk_pclk_to_wdt_pwm.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 7),
|
||||
}, {
|
||||
.name = "gpio",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 18),
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk *clkset_uart_list[] = {
|
||||
&clk_dout_epll.clk,
|
||||
&clk_dout_mpll.clk,
|
||||
};
|
||||
|
||||
static struct clksrc_sources clkset_uart = {
|
||||
.sources = clkset_uart_list,
|
||||
.nr_sources = ARRAY_SIZE(clkset_uart_list),
|
||||
};
|
||||
|
||||
static struct clk *clkset_mali_list[] = {
|
||||
&clk_mout_epll.clk,
|
||||
&clk_mout_apll.clk,
|
||||
&clk_mout_mpll.clk,
|
||||
};
|
||||
|
||||
static struct clksrc_sources clkset_mali = {
|
||||
.sources = clkset_mali_list,
|
||||
.nr_sources = ARRAY_SIZE(clkset_mali_list),
|
||||
};
|
||||
|
||||
static struct clk *clkset_group2_list[] = {
|
||||
&clk_dout_epll.clk,
|
||||
&clk_dout_mpll.clk,
|
||||
&clk_ext_xtal_mux,
|
||||
};
|
||||
|
||||
static struct clksrc_sources clkset_group2 = {
|
||||
.sources = clkset_group2_list,
|
||||
.nr_sources = ARRAY_SIZE(clkset_group2_list),
|
||||
};
|
||||
|
||||
static struct clk *clkset_dispcon_list[] = {
|
||||
&clk_dout_epll.clk,
|
||||
&clk_dout_mpll.clk,
|
||||
&clk_ext_xtal_mux,
|
||||
&clk_mout_dpll.clk,
|
||||
};
|
||||
|
||||
static struct clksrc_sources clkset_dispcon = {
|
||||
.sources = clkset_dispcon_list,
|
||||
.nr_sources = ARRAY_SIZE(clkset_dispcon_list),
|
||||
};
|
||||
|
||||
static struct clk *clkset_hsmmc44_list[] = {
|
||||
&clk_dout_epll.clk,
|
||||
&clk_dout_mpll.clk,
|
||||
&clk_ext_xtal_mux,
|
||||
&s5p_clk_27m,
|
||||
&clk_48m,
|
||||
};
|
||||
|
||||
static struct clksrc_sources clkset_hsmmc44 = {
|
||||
.sources = clkset_hsmmc44_list,
|
||||
.nr_sources = ARRAY_SIZE(clkset_hsmmc44_list),
|
||||
};
|
||||
|
||||
static struct clk *clkset_sclk_audio0_list[] = {
|
||||
[0] = &clk_dout_epll.clk,
|
||||
[1] = &clk_dout_mpll.clk,
|
||||
[2] = &clk_ext_xtal_mux,
|
||||
[3] = NULL,
|
||||
[4] = NULL,
|
||||
};
|
||||
|
||||
static struct clksrc_sources clkset_sclk_audio0 = {
|
||||
.sources = clkset_sclk_audio0_list,
|
||||
.nr_sources = ARRAY_SIZE(clkset_sclk_audio0_list),
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_audio0 = {
|
||||
.clk = {
|
||||
.name = "audio-bus",
|
||||
.devname = "samsung-i2s.0",
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
.ctrlbit = (1 << 8),
|
||||
.parent = &clk_dout_epll.clk,
|
||||
},
|
||||
.sources = &clkset_sclk_audio0,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC1, .shift = 10, .size = 3 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 8, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clksrcs[] = {
|
||||
{
|
||||
.clk = {
|
||||
.name = "sclk_fimc",
|
||||
.ctrlbit = (1 << 10),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group2,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 26, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 12, .size = 4 },
|
||||
}, {
|
||||
.clk = {
|
||||
.name = "aclk_mali",
|
||||
.ctrlbit = (1 << 2),
|
||||
.enable = s5p64x0_sclk1_ctrl,
|
||||
},
|
||||
.sources = &clkset_mali,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC1, .shift = 8, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 4, .size = 4 },
|
||||
}, {
|
||||
.clk = {
|
||||
.name = "sclk_2d",
|
||||
.ctrlbit = (1 << 12),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_mali,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 30, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 20, .size = 4 },
|
||||
}, {
|
||||
.clk = {
|
||||
.name = "sclk_usi",
|
||||
.ctrlbit = (1 << 7),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group2,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 10, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 16, .size = 4 },
|
||||
}, {
|
||||
.clk = {
|
||||
.name = "sclk_camif",
|
||||
.ctrlbit = (1 << 6),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group2,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 28, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 20, .size = 4 },
|
||||
}, {
|
||||
.clk = {
|
||||
.name = "sclk_dispcon",
|
||||
.ctrlbit = (1 << 1),
|
||||
.enable = s5p64x0_sclk1_ctrl,
|
||||
},
|
||||
.sources = &clkset_dispcon,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC1, .shift = 4, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 0, .size = 4 },
|
||||
}, {
|
||||
.clk = {
|
||||
.name = "sclk_hsmmc44",
|
||||
.ctrlbit = (1 << 30),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_hsmmc44,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 6, .size = 3 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 28, .size = 4 },
|
||||
},
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_mmc0 = {
|
||||
.clk = {
|
||||
.name = "sclk_mmc",
|
||||
.devname = "s3c-sdhci.0",
|
||||
.ctrlbit = (1 << 24),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group2,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 18, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 0, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_mmc1 = {
|
||||
.clk = {
|
||||
.name = "sclk_mmc",
|
||||
.devname = "s3c-sdhci.1",
|
||||
.ctrlbit = (1 << 25),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group2,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 20, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 4, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_mmc2 = {
|
||||
.clk = {
|
||||
.name = "sclk_mmc",
|
||||
.devname = "s3c-sdhci.2",
|
||||
.ctrlbit = (1 << 26),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group2,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 22, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 8, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_uclk = {
|
||||
.clk = {
|
||||
.name = "uclk1",
|
||||
.ctrlbit = (1 << 5),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_uart,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 13, .size = 1 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 16, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_spi0 = {
|
||||
.clk = {
|
||||
.name = "sclk_spi",
|
||||
.devname = "s5p64x0-spi.0",
|
||||
.ctrlbit = (1 << 20),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group2,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 14, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 0, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clksrc_clk clk_sclk_spi1 = {
|
||||
.clk = {
|
||||
.name = "sclk_spi",
|
||||
.devname = "s5p64x0-spi.1",
|
||||
.ctrlbit = (1 << 21),
|
||||
.enable = s5p64x0_sclk_ctrl,
|
||||
},
|
||||
.sources = &clkset_group2,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 16, .size = 2 },
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 4, .size = 4 },
|
||||
};
|
||||
|
||||
static struct clk clk_i2s0 = {
|
||||
.name = "iis",
|
||||
.devname = "samsung-i2s.0",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 26),
|
||||
};
|
||||
|
||||
static struct clk clk_i2s1 = {
|
||||
.name = "iis",
|
||||
.devname = "samsung-i2s.1",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 15),
|
||||
};
|
||||
|
||||
static struct clk clk_i2s2 = {
|
||||
.name = "iis",
|
||||
.devname = "samsung-i2s.2",
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 16),
|
||||
};
|
||||
|
||||
static struct clk *clk_cdev[] = {
|
||||
&clk_i2s0,
|
||||
&clk_i2s1,
|
||||
&clk_i2s2,
|
||||
};
|
||||
|
||||
static struct clksrc_clk *clksrc_cdev[] = {
|
||||
&clk_sclk_uclk,
|
||||
&clk_sclk_spi0,
|
||||
&clk_sclk_spi1,
|
||||
&clk_sclk_mmc0,
|
||||
&clk_sclk_mmc1,
|
||||
&clk_sclk_mmc2,
|
||||
&clk_sclk_audio0,
|
||||
};
|
||||
|
||||
static struct clk_lookup s5p6450_clk_lookup[] = {
|
||||
CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_pclk_low.clk),
|
||||
CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_sclk_uclk.clk),
|
||||
CLKDEV_INIT(NULL, "spi_busclk0", &clk_p),
|
||||
CLKDEV_INIT("s5p64x0-spi.0", "spi_busclk1", &clk_sclk_spi0.clk),
|
||||
CLKDEV_INIT("s5p64x0-spi.1", "spi_busclk1", &clk_sclk_spi1.clk),
|
||||
CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &clk_sclk_mmc0.clk),
|
||||
CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &clk_sclk_mmc1.clk),
|
||||
CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &clk_sclk_mmc2.clk),
|
||||
CLKDEV_INIT("samsung-i2s.0", "i2s_opclk0", &clk_i2s0),
|
||||
CLKDEV_INIT("samsung-i2s.0", "i2s_opclk1", &clk_sclk_audio0.clk),
|
||||
CLKDEV_INIT("samsung-i2s.1", "i2s_opclk0", &clk_i2s1),
|
||||
CLKDEV_INIT("samsung-i2s.2", "i2s_opclk0", &clk_i2s2),
|
||||
};
|
||||
|
||||
/* Clock initialization code */
|
||||
static struct clksrc_clk *sysclks[] = {
|
||||
&clk_mout_apll,
|
||||
&clk_mout_epll,
|
||||
&clk_dout_epll,
|
||||
&clk_mout_mpll,
|
||||
&clk_dout_mpll,
|
||||
&clk_armclk,
|
||||
&clk_mout_hclk_sel,
|
||||
&clk_dout_pwm_ratio0,
|
||||
&clk_pclk_to_wdt_pwm,
|
||||
&clk_hclk,
|
||||
&clk_pclk,
|
||||
&clk_hclk_low,
|
||||
&clk_pclk_low,
|
||||
};
|
||||
|
||||
static struct clk dummy_apb_pclk = {
|
||||
.name = "apb_pclk",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
void __init_or_cpufreq s5p6450_setup_clocks(void)
|
||||
{
|
||||
struct clk *xtal_clk;
|
||||
|
||||
unsigned long xtal;
|
||||
unsigned long fclk;
|
||||
unsigned long hclk;
|
||||
unsigned long hclk_low;
|
||||
unsigned long pclk;
|
||||
unsigned long pclk_low;
|
||||
|
||||
unsigned long apll;
|
||||
unsigned long mpll;
|
||||
unsigned long epll;
|
||||
unsigned long dpll;
|
||||
unsigned int ptr;
|
||||
|
||||
/* Set S5P6450 functions for clk_fout_epll */
|
||||
|
||||
clk_fout_epll.enable = s5p_epll_enable;
|
||||
clk_fout_epll.ops = &s5p6450_epll_ops;
|
||||
|
||||
clk_48m.enable = s5p64x0_clk48m_ctrl;
|
||||
|
||||
xtal_clk = clk_get(NULL, "ext_xtal");
|
||||
BUG_ON(IS_ERR(xtal_clk));
|
||||
|
||||
xtal = clk_get_rate(xtal_clk);
|
||||
clk_put(xtal_clk);
|
||||
|
||||
apll = s5p_get_pll45xx(xtal, __raw_readl(S5P64X0_APLL_CON), pll_4502);
|
||||
mpll = s5p_get_pll45xx(xtal, __raw_readl(S5P64X0_MPLL_CON), pll_4502);
|
||||
epll = s5p_get_pll90xx(xtal, __raw_readl(S5P64X0_EPLL_CON),
|
||||
__raw_readl(S5P64X0_EPLL_CON_K));
|
||||
dpll = s5p_get_pll46xx(xtal, __raw_readl(S5P6450_DPLL_CON),
|
||||
__raw_readl(S5P6450_DPLL_CON_K), pll_4650c);
|
||||
|
||||
clk_fout_apll.rate = apll;
|
||||
clk_fout_mpll.rate = mpll;
|
||||
clk_fout_epll.rate = epll;
|
||||
clk_fout_dpll.rate = dpll;
|
||||
|
||||
printk(KERN_INFO "S5P6450: PLL settings, A=%ld.%ldMHz, M=%ld.%ldMHz," \
|
||||
" E=%ld.%ldMHz, D=%ld.%ldMHz\n",
|
||||
print_mhz(apll), print_mhz(mpll), print_mhz(epll),
|
||||
print_mhz(dpll));
|
||||
|
||||
fclk = clk_get_rate(&clk_armclk.clk);
|
||||
hclk = clk_get_rate(&clk_hclk.clk);
|
||||
pclk = clk_get_rate(&clk_pclk.clk);
|
||||
hclk_low = clk_get_rate(&clk_hclk_low.clk);
|
||||
pclk_low = clk_get_rate(&clk_pclk_low.clk);
|
||||
|
||||
printk(KERN_INFO "S5P6450: HCLK=%ld.%ldMHz, HCLK_LOW=%ld.%ldMHz," \
|
||||
" PCLK=%ld.%ldMHz, PCLK_LOW=%ld.%ldMHz\n",
|
||||
print_mhz(hclk), print_mhz(hclk_low),
|
||||
print_mhz(pclk), print_mhz(pclk_low));
|
||||
|
||||
clk_f.rate = fclk;
|
||||
clk_h.rate = hclk;
|
||||
clk_p.rate = pclk;
|
||||
|
||||
for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
|
||||
s3c_set_clksrc(&clksrcs[ptr], true);
|
||||
}
|
||||
|
||||
void __init s5p6450_register_clocks(void)
|
||||
{
|
||||
int ptr;
|
||||
unsigned int cnt;
|
||||
|
||||
for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++)
|
||||
s3c_register_clksrc(sysclks[ptr], 1);
|
||||
|
||||
|
||||
s3c24xx_register_clocks(clk_cdev, ARRAY_SIZE(clk_cdev));
|
||||
for (cnt = 0; cnt < ARRAY_SIZE(clk_cdev); cnt++)
|
||||
s3c_disable_clocks(clk_cdev[cnt], 1);
|
||||
|
||||
s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
|
||||
s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
|
||||
for (ptr = 0; ptr < ARRAY_SIZE(clksrc_cdev); ptr++)
|
||||
s3c_register_clksrc(clksrc_cdev[ptr], 1);
|
||||
|
||||
s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
|
||||
s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
|
||||
clkdev_add_table(s5p6450_clk_lookup, ARRAY_SIZE(s5p6450_clk_lookup));
|
||||
|
||||
s3c24xx_register_clock(&dummy_apb_pclk);
|
||||
}
|
|
@ -1,236 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/clock.c
|
||||
*
|
||||
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P64X0 - Clock support
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/map.h>
|
||||
#include <mach/regs-clock.h>
|
||||
|
||||
#include <plat/cpu-freq.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/pll.h>
|
||||
#include <plat/s5p-clock.h>
|
||||
#include <plat/clock-clksrc.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
struct clksrc_clk clk_mout_apll = {
|
||||
.clk = {
|
||||
.name = "mout_apll",
|
||||
.id = -1,
|
||||
},
|
||||
.sources = &clk_src_apll,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 0, .size = 1 },
|
||||
};
|
||||
|
||||
struct clksrc_clk clk_mout_mpll = {
|
||||
.clk = {
|
||||
.name = "mout_mpll",
|
||||
.id = -1,
|
||||
},
|
||||
.sources = &clk_src_mpll,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 1, .size = 1 },
|
||||
};
|
||||
|
||||
struct clksrc_clk clk_mout_epll = {
|
||||
.clk = {
|
||||
.name = "mout_epll",
|
||||
.id = -1,
|
||||
},
|
||||
.sources = &clk_src_epll,
|
||||
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 2, .size = 1 },
|
||||
};
|
||||
|
||||
enum perf_level {
|
||||
L0 = 532*1000,
|
||||
L1 = 266*1000,
|
||||
L2 = 133*1000,
|
||||
};
|
||||
|
||||
static const u32 clock_table[][3] = {
|
||||
/*{ARM_CLK, DIVarm, DIVhclk}*/
|
||||
{L0 * 1000, (0 << ARM_DIV_RATIO_SHIFT), (3 << S5P64X0_CLKDIV0_HCLK_SHIFT)},
|
||||
{L1 * 1000, (1 << ARM_DIV_RATIO_SHIFT), (1 << S5P64X0_CLKDIV0_HCLK_SHIFT)},
|
||||
{L2 * 1000, (3 << ARM_DIV_RATIO_SHIFT), (0 << S5P64X0_CLKDIV0_HCLK_SHIFT)},
|
||||
};
|
||||
|
||||
static unsigned long s5p64x0_armclk_get_rate(struct clk *clk)
|
||||
{
|
||||
unsigned long rate = clk_get_rate(clk->parent);
|
||||
u32 clkdiv;
|
||||
|
||||
/* divisor mask starts at bit0, so no need to shift */
|
||||
clkdiv = __raw_readl(ARM_CLK_DIV) & ARM_DIV_MASK;
|
||||
|
||||
return rate / (clkdiv + 1);
|
||||
}
|
||||
|
||||
static unsigned long s5p64x0_armclk_round_rate(struct clk *clk,
|
||||
unsigned long rate)
|
||||
{
|
||||
u32 iter;
|
||||
|
||||
for (iter = 1 ; iter < ARRAY_SIZE(clock_table) ; iter++) {
|
||||
if (rate > clock_table[iter][0])
|
||||
return clock_table[iter-1][0];
|
||||
}
|
||||
|
||||
return clock_table[ARRAY_SIZE(clock_table) - 1][0];
|
||||
}
|
||||
|
||||
static int s5p64x0_armclk_set_rate(struct clk *clk, unsigned long rate)
|
||||
{
|
||||
u32 round_tmp;
|
||||
u32 iter;
|
||||
u32 clk_div0_tmp;
|
||||
u32 cur_rate = clk->ops->get_rate(clk);
|
||||
unsigned long flags;
|
||||
|
||||
round_tmp = clk->ops->round_rate(clk, rate);
|
||||
if (round_tmp == cur_rate)
|
||||
return 0;
|
||||
|
||||
|
||||
for (iter = 0 ; iter < ARRAY_SIZE(clock_table) ; iter++) {
|
||||
if (round_tmp == clock_table[iter][0])
|
||||
break;
|
||||
}
|
||||
|
||||
if (iter >= ARRAY_SIZE(clock_table))
|
||||
iter = ARRAY_SIZE(clock_table) - 1;
|
||||
|
||||
local_irq_save(flags);
|
||||
if (cur_rate > round_tmp) {
|
||||
/* Frequency Down */
|
||||
clk_div0_tmp = __raw_readl(ARM_CLK_DIV) & ~(ARM_DIV_MASK);
|
||||
clk_div0_tmp |= clock_table[iter][1];
|
||||
__raw_writel(clk_div0_tmp, ARM_CLK_DIV);
|
||||
|
||||
clk_div0_tmp = __raw_readl(ARM_CLK_DIV) &
|
||||
~(S5P64X0_CLKDIV0_HCLK_MASK);
|
||||
clk_div0_tmp |= clock_table[iter][2];
|
||||
__raw_writel(clk_div0_tmp, ARM_CLK_DIV);
|
||||
|
||||
|
||||
} else {
|
||||
/* Frequency Up */
|
||||
clk_div0_tmp = __raw_readl(ARM_CLK_DIV) &
|
||||
~(S5P64X0_CLKDIV0_HCLK_MASK);
|
||||
clk_div0_tmp |= clock_table[iter][2];
|
||||
__raw_writel(clk_div0_tmp, ARM_CLK_DIV);
|
||||
|
||||
clk_div0_tmp = __raw_readl(ARM_CLK_DIV) & ~(ARM_DIV_MASK);
|
||||
clk_div0_tmp |= clock_table[iter][1];
|
||||
__raw_writel(clk_div0_tmp, ARM_CLK_DIV);
|
||||
}
|
||||
local_irq_restore(flags);
|
||||
|
||||
clk->rate = clock_table[iter][0];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct clk_ops s5p64x0_clkarm_ops = {
|
||||
.get_rate = s5p64x0_armclk_get_rate,
|
||||
.set_rate = s5p64x0_armclk_set_rate,
|
||||
.round_rate = s5p64x0_armclk_round_rate,
|
||||
};
|
||||
|
||||
struct clksrc_clk clk_armclk = {
|
||||
.clk = {
|
||||
.name = "armclk",
|
||||
.id = 1,
|
||||
.parent = &clk_mout_apll.clk,
|
||||
.ops = &s5p64x0_clkarm_ops,
|
||||
},
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 0, .size = 4 },
|
||||
};
|
||||
|
||||
struct clksrc_clk clk_dout_mpll = {
|
||||
.clk = {
|
||||
.name = "dout_mpll",
|
||||
.id = -1,
|
||||
.parent = &clk_mout_mpll.clk,
|
||||
},
|
||||
.reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 4, .size = 1 },
|
||||
};
|
||||
|
||||
static struct clk *clkset_hclk_low_list[] = {
|
||||
&clk_mout_apll.clk,
|
||||
&clk_mout_mpll.clk,
|
||||
};
|
||||
|
||||
struct clksrc_sources clkset_hclk_low = {
|
||||
.sources = clkset_hclk_low_list,
|
||||
.nr_sources = ARRAY_SIZE(clkset_hclk_low_list),
|
||||
};
|
||||
|
||||
int s5p64x0_pclk_ctrl(struct clk *clk, int enable)
|
||||
{
|
||||
return s5p_gatectrl(S5P64X0_CLK_GATE_PCLK, clk, enable);
|
||||
}
|
||||
|
||||
int s5p64x0_hclk0_ctrl(struct clk *clk, int enable)
|
||||
{
|
||||
return s5p_gatectrl(S5P64X0_CLK_GATE_HCLK0, clk, enable);
|
||||
}
|
||||
|
||||
int s5p64x0_hclk1_ctrl(struct clk *clk, int enable)
|
||||
{
|
||||
return s5p_gatectrl(S5P64X0_CLK_GATE_HCLK1, clk, enable);
|
||||
}
|
||||
|
||||
int s5p64x0_sclk_ctrl(struct clk *clk, int enable)
|
||||
{
|
||||
return s5p_gatectrl(S5P64X0_CLK_GATE_SCLK0, clk, enable);
|
||||
}
|
||||
|
||||
int s5p64x0_sclk1_ctrl(struct clk *clk, int enable)
|
||||
{
|
||||
return s5p_gatectrl(S5P64X0_CLK_GATE_SCLK1, clk, enable);
|
||||
}
|
||||
|
||||
int s5p64x0_mem_ctrl(struct clk *clk, int enable)
|
||||
{
|
||||
return s5p_gatectrl(S5P64X0_CLK_GATE_MEM0, clk, enable);
|
||||
}
|
||||
|
||||
int s5p64x0_clk48m_ctrl(struct clk *clk, int enable)
|
||||
{
|
||||
unsigned long flags;
|
||||
u32 val;
|
||||
|
||||
/* can't rely on clock lock, this register has other usages */
|
||||
local_irq_save(flags);
|
||||
|
||||
val = __raw_readl(S5P64X0_OTHERS);
|
||||
if (enable)
|
||||
val |= S5P64X0_OTHERS_USB_SIG_MASK;
|
||||
else
|
||||
val &= ~S5P64X0_OTHERS_USB_SIG_MASK;
|
||||
|
||||
__raw_writel(val, S5P64X0_OTHERS);
|
||||
|
||||
local_irq_restore(flags);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* Header file for s5p64x0 clock support
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __MACH_S5P64X0_CLOCK_H
|
||||
#define __MACH_S5P64X0_CLOCK_H __FILE__
|
||||
|
||||
#include <linux/clk.h>
|
||||
|
||||
extern struct clksrc_clk clk_mout_apll;
|
||||
extern struct clksrc_clk clk_mout_mpll;
|
||||
extern struct clksrc_clk clk_mout_epll;
|
||||
|
||||
extern int s5p64x0_epll_enable(struct clk *clk, int enable);
|
||||
extern unsigned long s5p64x0_epll_get_rate(struct clk *clk);
|
||||
|
||||
extern struct clksrc_clk clk_armclk;
|
||||
extern struct clksrc_clk clk_dout_mpll;
|
||||
|
||||
extern struct clksrc_sources clkset_hclk_low;
|
||||
|
||||
extern int s5p64x0_pclk_ctrl(struct clk *clk, int enable);
|
||||
extern int s5p64x0_hclk0_ctrl(struct clk *clk, int enable);
|
||||
extern int s5p64x0_hclk1_ctrl(struct clk *clk, int enable);
|
||||
extern int s5p64x0_sclk_ctrl(struct clk *clk, int enable);
|
||||
extern int s5p64x0_sclk1_ctrl(struct clk *clk, int enable);
|
||||
extern int s5p64x0_mem_ctrl(struct clk *clk, int enable);
|
||||
|
||||
extern int s5p64x0_clk48m_ctrl(struct clk *clk, int enable);
|
||||
|
||||
#endif /* __MACH_S5P64X0_CLOCK_H */
|
|
@ -1,490 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2009-2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* Common Codes for S5P64X0 machines
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/serial_core.h>
|
||||
#include <linux/serial_s3c.h>
|
||||
#include <clocksource/samsung_pwm.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/reboot.h>
|
||||
|
||||
#include <asm/irq.h>
|
||||
#include <asm/proc-fns.h>
|
||||
#include <asm/system_misc.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/irq.h>
|
||||
|
||||
#include <mach/map.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/regs-clock.h>
|
||||
#include <mach/regs-gpio.h>
|
||||
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/devs.h>
|
||||
#include <plat/pm.h>
|
||||
#include <plat/sdhci.h>
|
||||
#include <plat/adc-core.h>
|
||||
#include <plat/fb-core.h>
|
||||
#include <plat/spi-core.h>
|
||||
#include <plat/gpio-cfg.h>
|
||||
#include <plat/pwm-core.h>
|
||||
#include <plat/regs-irqtype.h>
|
||||
#include <plat/watchdog-reset.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
static const char name_s5p6440[] = "S5P6440";
|
||||
static const char name_s5p6450[] = "S5P6450";
|
||||
|
||||
static struct cpu_table cpu_ids[] __initdata = {
|
||||
{
|
||||
.idcode = S5P6440_CPU_ID,
|
||||
.idmask = S5P64XX_CPU_MASK,
|
||||
.map_io = s5p6440_map_io,
|
||||
.init_clocks = s5p6440_init_clocks,
|
||||
.init_uarts = s5p6440_init_uarts,
|
||||
.init = s5p64x0_init,
|
||||
.name = name_s5p6440,
|
||||
}, {
|
||||
.idcode = S5P6450_CPU_ID,
|
||||
.idmask = S5P64XX_CPU_MASK,
|
||||
.map_io = s5p6450_map_io,
|
||||
.init_clocks = s5p6450_init_clocks,
|
||||
.init_uarts = s5p6450_init_uarts,
|
||||
.init = s5p64x0_init,
|
||||
.name = name_s5p6450,
|
||||
},
|
||||
};
|
||||
|
||||
/* Initial IO mappings */
|
||||
|
||||
static struct map_desc s5p64x0_iodesc[] __initdata = {
|
||||
{
|
||||
.virtual = (unsigned long)S5P_VA_CHIPID,
|
||||
.pfn = __phys_to_pfn(S5P64X0_PA_CHIPID),
|
||||
.length = SZ_4K,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = (unsigned long)S3C_VA_SYS,
|
||||
.pfn = __phys_to_pfn(S5P64X0_PA_SYSCON),
|
||||
.length = SZ_64K,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = (unsigned long)S3C_VA_TIMER,
|
||||
.pfn = __phys_to_pfn(S5P64X0_PA_TIMER),
|
||||
.length = SZ_16K,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = (unsigned long)S3C_VA_WATCHDOG,
|
||||
.pfn = __phys_to_pfn(S5P64X0_PA_WDT),
|
||||
.length = SZ_4K,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = (unsigned long)S5P_VA_SROMC,
|
||||
.pfn = __phys_to_pfn(S5P64X0_PA_SROMC),
|
||||
.length = SZ_4K,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = (unsigned long)S5P_VA_GPIO,
|
||||
.pfn = __phys_to_pfn(S5P64X0_PA_GPIO),
|
||||
.length = SZ_4K,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = (unsigned long)VA_VIC0,
|
||||
.pfn = __phys_to_pfn(S5P64X0_PA_VIC0),
|
||||
.length = SZ_16K,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = (unsigned long)VA_VIC1,
|
||||
.pfn = __phys_to_pfn(S5P64X0_PA_VIC1),
|
||||
.length = SZ_16K,
|
||||
.type = MT_DEVICE,
|
||||
},
|
||||
};
|
||||
|
||||
static struct map_desc s5p6440_iodesc[] __initdata = {
|
||||
{
|
||||
.virtual = (unsigned long)S3C_VA_UART,
|
||||
.pfn = __phys_to_pfn(S5P6440_PA_UART(0)),
|
||||
.length = SZ_4K,
|
||||
.type = MT_DEVICE,
|
||||
},
|
||||
};
|
||||
|
||||
static struct map_desc s5p6450_iodesc[] __initdata = {
|
||||
{
|
||||
.virtual = (unsigned long)S3C_VA_UART,
|
||||
.pfn = __phys_to_pfn(S5P6450_PA_UART(0)),
|
||||
.length = SZ_512K,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = (unsigned long)S3C_VA_UART + SZ_512K,
|
||||
.pfn = __phys_to_pfn(S5P6450_PA_UART(5)),
|
||||
.length = SZ_4K,
|
||||
.type = MT_DEVICE,
|
||||
},
|
||||
};
|
||||
|
||||
static void s5p64x0_idle(void)
|
||||
{
|
||||
unsigned long val;
|
||||
|
||||
val = __raw_readl(S5P64X0_PWR_CFG);
|
||||
val &= ~(0x3 << 5);
|
||||
val |= (0x1 << 5);
|
||||
__raw_writel(val, S5P64X0_PWR_CFG);
|
||||
|
||||
cpu_do_idle();
|
||||
}
|
||||
|
||||
static struct samsung_pwm_variant s5p64x0_pwm_variant = {
|
||||
.bits = 32,
|
||||
.div_base = 0,
|
||||
.has_tint_cstat = true,
|
||||
.tclk_mask = 0,
|
||||
};
|
||||
|
||||
void __init samsung_set_timer_source(unsigned int event, unsigned int source)
|
||||
{
|
||||
s5p64x0_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
|
||||
s5p64x0_pwm_variant.output_mask &= ~(BIT(event) | BIT(source));
|
||||
}
|
||||
|
||||
void __init samsung_timer_init(void)
|
||||
{
|
||||
unsigned int timer_irqs[SAMSUNG_PWM_NUM] = {
|
||||
IRQ_TIMER0_VIC, IRQ_TIMER1_VIC, IRQ_TIMER2_VIC,
|
||||
IRQ_TIMER3_VIC, IRQ_TIMER4_VIC,
|
||||
};
|
||||
|
||||
samsung_pwm_clocksource_init(S3C_VA_TIMER,
|
||||
timer_irqs, &s5p64x0_pwm_variant);
|
||||
}
|
||||
|
||||
/*
|
||||
* s5p64x0_map_io
|
||||
*
|
||||
* register the standard CPU IO areas
|
||||
*/
|
||||
|
||||
void __init s5p64x0_init_io(struct map_desc *mach_desc, int size)
|
||||
{
|
||||
/* initialize the io descriptors we need for initialization */
|
||||
iotable_init(s5p64x0_iodesc, ARRAY_SIZE(s5p64x0_iodesc));
|
||||
if (mach_desc)
|
||||
iotable_init(mach_desc, size);
|
||||
|
||||
/* detect cpu id and rev. */
|
||||
s5p_init_cpu(S5P64X0_SYS_ID);
|
||||
|
||||
s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
|
||||
samsung_wdt_reset_init(S3C_VA_WATCHDOG);
|
||||
|
||||
samsung_pwm_set_platdata(&s5p64x0_pwm_variant);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CPU_S5P6440
|
||||
void __init s5p6440_map_io(void)
|
||||
{
|
||||
/* initialize any device information early */
|
||||
s3c_adc_setname("s3c64xx-adc");
|
||||
s3c_fb_setname("s5p64x0-fb");
|
||||
s3c64xx_spi_setname("s5p64x0-spi");
|
||||
|
||||
s5p64x0_default_sdhci0();
|
||||
s5p64x0_default_sdhci1();
|
||||
s5p6440_default_sdhci2();
|
||||
|
||||
iotable_init(s5p6440_iodesc, ARRAY_SIZE(s5p6440_iodesc));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_S5P6450
|
||||
void __init s5p6450_map_io(void)
|
||||
{
|
||||
/* initialize any device information early */
|
||||
s3c_adc_setname("s3c64xx-adc");
|
||||
s3c_fb_setname("s5p64x0-fb");
|
||||
s3c64xx_spi_setname("s5p64x0-spi");
|
||||
|
||||
s5p64x0_default_sdhci0();
|
||||
s5p64x0_default_sdhci1();
|
||||
s5p6450_default_sdhci2();
|
||||
|
||||
iotable_init(s5p6450_iodesc, ARRAY_SIZE(s5p6450_iodesc));
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* s5p64x0_init_clocks
|
||||
*
|
||||
* register and setup the CPU clocks
|
||||
*/
|
||||
#ifdef CONFIG_CPU_S5P6440
|
||||
void __init s5p6440_init_clocks(int xtal)
|
||||
{
|
||||
printk(KERN_DEBUG "%s: initializing clocks\n", __func__);
|
||||
|
||||
s3c24xx_register_baseclocks(xtal);
|
||||
s5p_register_clocks(xtal);
|
||||
s5p6440_register_clocks();
|
||||
s5p6440_setup_clocks();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_S5P6450
|
||||
void __init s5p6450_init_clocks(int xtal)
|
||||
{
|
||||
printk(KERN_DEBUG "%s: initializing clocks\n", __func__);
|
||||
|
||||
s3c24xx_register_baseclocks(xtal);
|
||||
s5p_register_clocks(xtal);
|
||||
s5p6450_register_clocks();
|
||||
s5p6450_setup_clocks();
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* s5p64x0_init_irq
|
||||
*
|
||||
* register the CPU interrupts
|
||||
*/
|
||||
#ifdef CONFIG_CPU_S5P6440
|
||||
void __init s5p6440_init_irq(void)
|
||||
{
|
||||
/* S5P6440 supports 2 VIC */
|
||||
u32 vic[2];
|
||||
|
||||
/*
|
||||
* VIC0 is missing IRQ_VIC0[3, 4, 8, 10, (12-22)]
|
||||
* VIC1 is missing IRQ VIC1[1, 3, 4, 10, 11, 12, 14, 15, 22]
|
||||
*/
|
||||
vic[0] = 0xff800ae7;
|
||||
vic[1] = 0xffbf23e5;
|
||||
|
||||
s5p_init_irq(vic, ARRAY_SIZE(vic));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_S5P6450
|
||||
void __init s5p6450_init_irq(void)
|
||||
{
|
||||
/* S5P6450 supports only 2 VIC */
|
||||
u32 vic[2];
|
||||
|
||||
/*
|
||||
* VIC0 is missing IRQ_VIC0[(13-15), (21-22)]
|
||||
* VIC1 is missing IRQ VIC1[12, 14, 23]
|
||||
*/
|
||||
vic[0] = 0xff9f1fff;
|
||||
vic[1] = 0xff7fafff;
|
||||
|
||||
s5p_init_irq(vic, ARRAY_SIZE(vic));
|
||||
}
|
||||
#endif
|
||||
|
||||
struct bus_type s5p64x0_subsys = {
|
||||
.name = "s5p64x0-core",
|
||||
.dev_name = "s5p64x0-core",
|
||||
};
|
||||
|
||||
static struct device s5p64x0_dev = {
|
||||
.bus = &s5p64x0_subsys,
|
||||
};
|
||||
|
||||
static int __init s5p64x0_core_init(void)
|
||||
{
|
||||
return subsys_system_register(&s5p64x0_subsys, NULL);
|
||||
}
|
||||
core_initcall(s5p64x0_core_init);
|
||||
|
||||
int __init s5p64x0_init(void)
|
||||
{
|
||||
printk(KERN_INFO "S5P64X0(S5P6440/S5P6450): Initializing architecture\n");
|
||||
|
||||
/* set idle function */
|
||||
arm_pm_idle = s5p64x0_idle;
|
||||
|
||||
return device_register(&s5p64x0_dev);
|
||||
}
|
||||
|
||||
/* uart registration process */
|
||||
#ifdef CONFIG_CPU_S5P6440
|
||||
void __init s5p6440_init_uarts(struct s3c2410_uartcfg *cfg, int no)
|
||||
{
|
||||
int uart;
|
||||
|
||||
for (uart = 0; uart < no; uart++) {
|
||||
s5p_uart_resources[uart].resources->start = S5P6440_PA_UART(uart);
|
||||
s5p_uart_resources[uart].resources->end = S5P6440_PA_UART(uart) + S5P_SZ_UART;
|
||||
}
|
||||
|
||||
s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_S5P6450
|
||||
void __init s5p6450_init_uarts(struct s3c2410_uartcfg *cfg, int no)
|
||||
{
|
||||
s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define eint_offset(irq) ((irq) - IRQ_EINT(0))
|
||||
|
||||
static int s5p64x0_irq_eint_set_type(struct irq_data *data, unsigned int type)
|
||||
{
|
||||
int offs = eint_offset(data->irq);
|
||||
int shift;
|
||||
u32 ctrl, mask;
|
||||
u32 newvalue = 0;
|
||||
|
||||
if (offs > 15)
|
||||
return -EINVAL;
|
||||
|
||||
switch (type) {
|
||||
case IRQ_TYPE_NONE:
|
||||
printk(KERN_WARNING "No edge setting!\n");
|
||||
break;
|
||||
case IRQ_TYPE_EDGE_RISING:
|
||||
newvalue = S3C2410_EXTINT_RISEEDGE;
|
||||
break;
|
||||
case IRQ_TYPE_EDGE_FALLING:
|
||||
newvalue = S3C2410_EXTINT_FALLEDGE;
|
||||
break;
|
||||
case IRQ_TYPE_EDGE_BOTH:
|
||||
newvalue = S3C2410_EXTINT_BOTHEDGE;
|
||||
break;
|
||||
case IRQ_TYPE_LEVEL_LOW:
|
||||
newvalue = S3C2410_EXTINT_LOWLEV;
|
||||
break;
|
||||
case IRQ_TYPE_LEVEL_HIGH:
|
||||
newvalue = S3C2410_EXTINT_HILEV;
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "No such irq type %d", type);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
shift = (offs / 2) * 4;
|
||||
mask = 0x7 << shift;
|
||||
|
||||
ctrl = __raw_readl(S5P64X0_EINT0CON0) & ~mask;
|
||||
ctrl |= newvalue << shift;
|
||||
__raw_writel(ctrl, S5P64X0_EINT0CON0);
|
||||
|
||||
/* Configure the GPIO pin for 6450 or 6440 based on CPU ID */
|
||||
if (soc_is_s5p6450())
|
||||
s3c_gpio_cfgpin(S5P6450_GPN(offs), S3C_GPIO_SFN(2));
|
||||
else
|
||||
s3c_gpio_cfgpin(S5P6440_GPN(offs), S3C_GPIO_SFN(2));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* s5p64x0_irq_demux_eint
|
||||
*
|
||||
* This function demuxes the IRQ from the group0 external interrupts,
|
||||
* from IRQ_EINT(0) to IRQ_EINT(15). It is designed to be inlined into
|
||||
* the specific handlers s5p64x0_irq_demux_eintX_Y.
|
||||
*/
|
||||
static inline void s5p64x0_irq_demux_eint(unsigned int start, unsigned int end)
|
||||
{
|
||||
u32 status = __raw_readl(S5P64X0_EINT0PEND);
|
||||
u32 mask = __raw_readl(S5P64X0_EINT0MASK);
|
||||
unsigned int irq;
|
||||
|
||||
status &= ~mask;
|
||||
status >>= start;
|
||||
status &= (1 << (end - start + 1)) - 1;
|
||||
|
||||
for (irq = IRQ_EINT(start); irq <= IRQ_EINT(end); irq++) {
|
||||
if (status & 1)
|
||||
generic_handle_irq(irq);
|
||||
status >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void s5p64x0_irq_demux_eint0_3(unsigned int irq, struct irq_desc *desc)
|
||||
{
|
||||
s5p64x0_irq_demux_eint(0, 3);
|
||||
}
|
||||
|
||||
static void s5p64x0_irq_demux_eint4_11(unsigned int irq, struct irq_desc *desc)
|
||||
{
|
||||
s5p64x0_irq_demux_eint(4, 11);
|
||||
}
|
||||
|
||||
static void s5p64x0_irq_demux_eint12_15(unsigned int irq,
|
||||
struct irq_desc *desc)
|
||||
{
|
||||
s5p64x0_irq_demux_eint(12, 15);
|
||||
}
|
||||
|
||||
static int s5p64x0_alloc_gc(void)
|
||||
{
|
||||
struct irq_chip_generic *gc;
|
||||
struct irq_chip_type *ct;
|
||||
|
||||
gc = irq_alloc_generic_chip("s5p64x0-eint", 1, S5P_IRQ_EINT_BASE,
|
||||
S5P_VA_GPIO, handle_level_irq);
|
||||
if (!gc) {
|
||||
printk(KERN_ERR "%s: irq_alloc_generic_chip for group 0"
|
||||
"external interrupts failed\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ct = gc->chip_types;
|
||||
ct->chip.irq_ack = irq_gc_ack_set_bit;
|
||||
ct->chip.irq_mask = irq_gc_mask_set_bit;
|
||||
ct->chip.irq_unmask = irq_gc_mask_clr_bit;
|
||||
ct->chip.irq_set_type = s5p64x0_irq_eint_set_type;
|
||||
ct->chip.irq_set_wake = s3c_irqext_wake;
|
||||
ct->regs.ack = EINT0PEND_OFFSET;
|
||||
ct->regs.mask = EINT0MASK_OFFSET;
|
||||
irq_setup_generic_chip(gc, IRQ_MSK(16), IRQ_GC_INIT_MASK_CACHE,
|
||||
IRQ_NOREQUEST | IRQ_NOPROBE, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init s5p64x0_init_irq_eint(void)
|
||||
{
|
||||
int ret = s5p64x0_alloc_gc();
|
||||
irq_set_chained_handler(IRQ_EINT0_3, s5p64x0_irq_demux_eint0_3);
|
||||
irq_set_chained_handler(IRQ_EINT4_11, s5p64x0_irq_demux_eint4_11);
|
||||
irq_set_chained_handler(IRQ_EINT12_15, s5p64x0_irq_demux_eint12_15);
|
||||
|
||||
return ret;
|
||||
}
|
||||
arch_initcall(s5p64x0_init_irq_eint);
|
||||
|
||||
void s5p64x0_restart(enum reboot_mode mode, const char *cmd)
|
||||
{
|
||||
if (mode != REBOOT_SOFT)
|
||||
samsung_wdt_reset();
|
||||
|
||||
soft_restart(0);
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* Common Header for S5P64X0 machines
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ARM_MACH_S5P64X0_COMMON_H
|
||||
#define __ARCH_ARM_MACH_S5P64X0_COMMON_H
|
||||
|
||||
#include <linux/reboot.h>
|
||||
|
||||
void s5p6440_init_irq(void);
|
||||
void s5p6450_init_irq(void);
|
||||
void s5p64x0_init_io(struct map_desc *mach_desc, int size);
|
||||
|
||||
void s5p6440_register_clocks(void);
|
||||
void s5p6440_setup_clocks(void);
|
||||
|
||||
void s5p6450_register_clocks(void);
|
||||
void s5p6450_setup_clocks(void);
|
||||
|
||||
void s5p64x0_restart(enum reboot_mode mode, const char *cmd);
|
||||
extern int s5p64x0_init(void);
|
||||
|
||||
#ifdef CONFIG_CPU_S5P6440
|
||||
|
||||
extern void s5p6440_map_io(void);
|
||||
extern void s5p6440_init_clocks(int xtal);
|
||||
|
||||
extern void s5p6440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
|
||||
|
||||
#else
|
||||
#define s5p6440_init_clocks NULL
|
||||
#define s5p6440_init_uarts NULL
|
||||
#define s5p6440_map_io NULL
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_S5P6450
|
||||
|
||||
extern void s5p6450_map_io(void);
|
||||
extern void s5p6450_init_clocks(int xtal);
|
||||
|
||||
extern void s5p6450_init_uarts(struct s3c2410_uartcfg *cfg, int no);
|
||||
|
||||
#else
|
||||
#define s5p6450_init_clocks NULL
|
||||
#define s5p6450_init_uarts NULL
|
||||
#define s5p6450_map_io NULL
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_ARM_MACH_S5P64X0_COMMON_H */
|
|
@ -1,176 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/dev-audio.c
|
||||
*
|
||||
* Copyright (c) 2010 Samsung Electronics Co. Ltd
|
||||
* Jaswinder Singh <jassi.brar@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <plat/gpio-cfg.h>
|
||||
#include <linux/platform_data/asoc-s3c.h>
|
||||
|
||||
#include <mach/map.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
static int s5p6440_cfg_i2s(struct platform_device *pdev)
|
||||
{
|
||||
switch (pdev->id) {
|
||||
case 0:
|
||||
s3c_gpio_cfgpin_range(S5P6440_GPC(4), 2, S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin(S5P6440_GPC(7), S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin_range(S5P6440_GPH(6), 4, S3C_GPIO_SFN(5));
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "Invalid Device %d\n", pdev->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct s3c_audio_pdata s5p6440_i2s_pdata = {
|
||||
.cfg_gpio = s5p6440_cfg_i2s,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.quirks = QUIRK_PRI_6CHAN,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource s5p64x0_i2s0_resource[] = {
|
||||
[0] = DEFINE_RES_MEM(S5P64X0_PA_I2S, SZ_256),
|
||||
[1] = DEFINE_RES_DMA(DMACH_I2S0_TX),
|
||||
[2] = DEFINE_RES_DMA(DMACH_I2S0_RX),
|
||||
};
|
||||
|
||||
struct platform_device s5p6440_device_iis = {
|
||||
.name = "samsung-i2s",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(s5p64x0_i2s0_resource),
|
||||
.resource = s5p64x0_i2s0_resource,
|
||||
.dev = {
|
||||
.platform_data = &s5p6440_i2s_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static int s5p6450_cfg_i2s(struct platform_device *pdev)
|
||||
{
|
||||
switch (pdev->id) {
|
||||
case 0:
|
||||
s3c_gpio_cfgpin_range(S5P6450_GPR(4), 5, S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin_range(S5P6450_GPR(13), 2, S3C_GPIO_SFN(5));
|
||||
break;
|
||||
case 1:
|
||||
s3c_gpio_cfgpin(S5P6440_GPB(4), S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin_range(S5P6450_GPC(0), 4, S3C_GPIO_SFN(5));
|
||||
break;
|
||||
case 2:
|
||||
s3c_gpio_cfgpin_range(S5P6450_GPK(0), 5, S3C_GPIO_SFN(5));
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "Invalid Device %d\n", pdev->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct s3c_audio_pdata s5p6450_i2s0_pdata = {
|
||||
.cfg_gpio = s5p6450_cfg_i2s,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.quirks = QUIRK_PRI_6CHAN,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s5p6450_device_iis0 = {
|
||||
.name = "samsung-i2s",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(s5p64x0_i2s0_resource),
|
||||
.resource = s5p64x0_i2s0_resource,
|
||||
.dev = {
|
||||
.platform_data = &s5p6450_i2s0_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata s5p6450_i2s_pdata = {
|
||||
.cfg_gpio = s5p6450_cfg_i2s,
|
||||
};
|
||||
|
||||
static struct resource s5p6450_i2s1_resource[] = {
|
||||
[0] = DEFINE_RES_MEM(S5P6450_PA_I2S1, SZ_256),
|
||||
[1] = DEFINE_RES_DMA(DMACH_I2S1_TX),
|
||||
[2] = DEFINE_RES_DMA(DMACH_I2S1_RX),
|
||||
};
|
||||
|
||||
struct platform_device s5p6450_device_iis1 = {
|
||||
.name = "samsung-i2s",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(s5p6450_i2s1_resource),
|
||||
.resource = s5p6450_i2s1_resource,
|
||||
.dev = {
|
||||
.platform_data = &s5p6450_i2s_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource s5p6450_i2s2_resource[] = {
|
||||
[0] = DEFINE_RES_MEM(S5P6450_PA_I2S2, SZ_256),
|
||||
[1] = DEFINE_RES_DMA(DMACH_I2S2_TX),
|
||||
[2] = DEFINE_RES_DMA(DMACH_I2S2_RX),
|
||||
};
|
||||
|
||||
struct platform_device s5p6450_device_iis2 = {
|
||||
.name = "samsung-i2s",
|
||||
.id = 2,
|
||||
.num_resources = ARRAY_SIZE(s5p6450_i2s2_resource),
|
||||
.resource = s5p6450_i2s2_resource,
|
||||
.dev = {
|
||||
.platform_data = &s5p6450_i2s_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
/* PCM Controller platform_devices */
|
||||
|
||||
static int s5p6440_pcm_cfg_gpio(struct platform_device *pdev)
|
||||
{
|
||||
switch (pdev->id) {
|
||||
case 0:
|
||||
s3c_gpio_cfgpin_range(S5P6440_GPR(6), 3, S3C_GPIO_SFN(2));
|
||||
s3c_gpio_cfgpin_range(S5P6440_GPR(13), 2, S3C_GPIO_SFN(2));
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(KERN_DEBUG "Invalid PCM Controller number!");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct s3c_audio_pdata s5p6440_pcm_pdata = {
|
||||
.cfg_gpio = s5p6440_pcm_cfg_gpio,
|
||||
};
|
||||
|
||||
static struct resource s5p6440_pcm0_resource[] = {
|
||||
[0] = DEFINE_RES_MEM(S5P64X0_PA_PCM, SZ_256),
|
||||
[1] = DEFINE_RES_DMA(DMACH_PCM0_TX),
|
||||
[2] = DEFINE_RES_DMA(DMACH_PCM0_RX),
|
||||
};
|
||||
|
||||
struct platform_device s5p6440_device_pcm = {
|
||||
.name = "samsung-pcm",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(s5p6440_pcm0_resource),
|
||||
.resource = s5p6440_pcm0_resource,
|
||||
.dev = {
|
||||
.platform_data = &s5p6440_pcm_pdata,
|
||||
},
|
||||
};
|
|
@ -1,128 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/dma.c
|
||||
*
|
||||
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* Copyright (C) 2010 Samsung Electronics Co. Ltd.
|
||||
* Jaswinder Singh <jassi.brar@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/amba/bus.h>
|
||||
#include <linux/amba/pl330.h>
|
||||
|
||||
#include <asm/irq.h>
|
||||
|
||||
#include <mach/map.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/regs-clock.h>
|
||||
#include <mach/dma.h>
|
||||
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/devs.h>
|
||||
#include <plat/irqs.h>
|
||||
|
||||
static u8 s5p6440_pdma_peri[] = {
|
||||
DMACH_UART0_RX,
|
||||
DMACH_UART0_TX,
|
||||
DMACH_UART1_RX,
|
||||
DMACH_UART1_TX,
|
||||
DMACH_UART2_RX,
|
||||
DMACH_UART2_TX,
|
||||
DMACH_UART3_RX,
|
||||
DMACH_UART3_TX,
|
||||
DMACH_MAX,
|
||||
DMACH_MAX,
|
||||
DMACH_PCM0_TX,
|
||||
DMACH_PCM0_RX,
|
||||
DMACH_I2S0_TX,
|
||||
DMACH_I2S0_RX,
|
||||
DMACH_SPI0_TX,
|
||||
DMACH_SPI0_RX,
|
||||
DMACH_MAX,
|
||||
DMACH_MAX,
|
||||
DMACH_MAX,
|
||||
DMACH_MAX,
|
||||
DMACH_SPI1_TX,
|
||||
DMACH_SPI1_RX,
|
||||
};
|
||||
|
||||
static struct dma_pl330_platdata s5p6440_pdma_pdata = {
|
||||
.nr_valid_peri = ARRAY_SIZE(s5p6440_pdma_peri),
|
||||
.peri_id = s5p6440_pdma_peri,
|
||||
};
|
||||
|
||||
static u8 s5p6450_pdma_peri[] = {
|
||||
DMACH_UART0_RX,
|
||||
DMACH_UART0_TX,
|
||||
DMACH_UART1_RX,
|
||||
DMACH_UART1_TX,
|
||||
DMACH_UART2_RX,
|
||||
DMACH_UART2_TX,
|
||||
DMACH_UART3_RX,
|
||||
DMACH_UART3_TX,
|
||||
DMACH_UART4_RX,
|
||||
DMACH_UART4_TX,
|
||||
DMACH_PCM0_TX,
|
||||
DMACH_PCM0_RX,
|
||||
DMACH_I2S0_TX,
|
||||
DMACH_I2S0_RX,
|
||||
DMACH_SPI0_TX,
|
||||
DMACH_SPI0_RX,
|
||||
DMACH_PCM1_TX,
|
||||
DMACH_PCM1_RX,
|
||||
DMACH_PCM2_TX,
|
||||
DMACH_PCM2_RX,
|
||||
DMACH_SPI1_TX,
|
||||
DMACH_SPI1_RX,
|
||||
DMACH_USI_TX,
|
||||
DMACH_USI_RX,
|
||||
DMACH_MAX,
|
||||
DMACH_I2S1_TX,
|
||||
DMACH_I2S1_RX,
|
||||
DMACH_I2S2_TX,
|
||||
DMACH_I2S2_RX,
|
||||
DMACH_PWM,
|
||||
DMACH_UART5_RX,
|
||||
DMACH_UART5_TX,
|
||||
};
|
||||
|
||||
static struct dma_pl330_platdata s5p6450_pdma_pdata = {
|
||||
.nr_valid_peri = ARRAY_SIZE(s5p6450_pdma_peri),
|
||||
.peri_id = s5p6450_pdma_peri,
|
||||
};
|
||||
|
||||
static AMBA_AHB_DEVICE(s5p64x0_pdma, "dma-pl330", 0x00041330,
|
||||
S5P64X0_PA_PDMA, {IRQ_DMA0}, NULL);
|
||||
|
||||
static int __init s5p64x0_dma_init(void)
|
||||
{
|
||||
if (soc_is_s5p6450()) {
|
||||
dma_cap_set(DMA_SLAVE, s5p6450_pdma_pdata.cap_mask);
|
||||
dma_cap_set(DMA_CYCLIC, s5p6450_pdma_pdata.cap_mask);
|
||||
s5p64x0_pdma_device.dev.platform_data = &s5p6450_pdma_pdata;
|
||||
} else {
|
||||
dma_cap_set(DMA_SLAVE, s5p6440_pdma_pdata.cap_mask);
|
||||
dma_cap_set(DMA_CYCLIC, s5p6440_pdma_pdata.cap_mask);
|
||||
s5p64x0_pdma_device.dev.platform_data = &s5p6440_pdma_pdata;
|
||||
}
|
||||
|
||||
amba_device_register(&s5p64x0_pdma_device, &iomem_resource);
|
||||
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(s5p64x0_dma_init);
|
|
@ -1,16 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P64X0 I2C configuration
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
extern void s5p6440_i2c0_cfg_gpio(struct platform_device *dev);
|
||||
extern void s5p6440_i2c1_cfg_gpio(struct platform_device *dev);
|
||||
|
||||
extern void s5p6450_i2c0_cfg_gpio(struct platform_device *dev);
|
||||
extern void s5p6450_i2c1_cfg_gpio(struct platform_device *dev);
|
|
@ -1,32 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/include/mach/debug-macro.S
|
||||
*
|
||||
* Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
/* pull in the relevant register and map files. */
|
||||
|
||||
#include <linux/serial_s3c.h>
|
||||
#include <plat/map-base.h>
|
||||
#include <plat/map-s5p.h>
|
||||
|
||||
.macro addruart, rp, rv, tmp
|
||||
mov \rp, #0xE0000000
|
||||
orr \rp, \rp, #0x00100000
|
||||
ldr \rp, [\rp, #0x118 ]
|
||||
and \rp, \rp, #0xff000
|
||||
teq \rp, #0x50000 @@ S5P6450
|
||||
ldreq \rp, =0xEC800000
|
||||
movne \rp, #0xEC000000 @@ S5P6440
|
||||
ldrne \rv, = S3C_VA_UART
|
||||
#if CONFIG_DEBUG_S3C_UART != 0
|
||||
add \rp, \rp, #(0x400 * CONFIG_DEBUG_S3C_UART)
|
||||
add \rv, \rv, #(0x400 * CONFIG_DEBUG_S3C_UART)
|
||||
#endif
|
||||
.endm
|
||||
|
||||
#include <debug/samsung.S>
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2010 Samsung Electronics Co. Ltd.
|
||||
* Jaswinder Singh <jassi.brar@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __MACH_DMA_H
|
||||
#define __MACH_DMA_H
|
||||
|
||||
/* This platform uses the common common DMA API driver for PL330 */
|
||||
#include <plat/dma-pl330.h>
|
||||
|
||||
#endif /* __MACH_DMA_H */
|
|
@ -1,132 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/include/mach/gpio.h
|
||||
*
|
||||
* Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P64X0 - GPIO lib support
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_GPIO_H
|
||||
#define __ASM_ARCH_GPIO_H __FILE__
|
||||
|
||||
/* GPIO bank sizes */
|
||||
|
||||
#define S5P6440_GPIO_A_NR (6)
|
||||
#define S5P6440_GPIO_B_NR (7)
|
||||
#define S5P6440_GPIO_C_NR (8)
|
||||
#define S5P6440_GPIO_F_NR (16)
|
||||
#define S5P6440_GPIO_G_NR (7)
|
||||
#define S5P6440_GPIO_H_NR (10)
|
||||
#define S5P6440_GPIO_I_NR (16)
|
||||
#define S5P6440_GPIO_J_NR (12)
|
||||
#define S5P6440_GPIO_N_NR (16)
|
||||
#define S5P6440_GPIO_P_NR (8)
|
||||
#define S5P6440_GPIO_R_NR (15)
|
||||
|
||||
#define S5P6450_GPIO_A_NR (6)
|
||||
#define S5P6450_GPIO_B_NR (7)
|
||||
#define S5P6450_GPIO_C_NR (8)
|
||||
#define S5P6450_GPIO_D_NR (8)
|
||||
#define S5P6450_GPIO_F_NR (16)
|
||||
#define S5P6450_GPIO_G_NR (14)
|
||||
#define S5P6450_GPIO_H_NR (10)
|
||||
#define S5P6450_GPIO_I_NR (16)
|
||||
#define S5P6450_GPIO_J_NR (12)
|
||||
#define S5P6450_GPIO_K_NR (5)
|
||||
#define S5P6450_GPIO_N_NR (16)
|
||||
#define S5P6450_GPIO_P_NR (11)
|
||||
#define S5P6450_GPIO_Q_NR (14)
|
||||
#define S5P6450_GPIO_R_NR (15)
|
||||
#define S5P6450_GPIO_S_NR (8)
|
||||
|
||||
/* GPIO bank numbers */
|
||||
|
||||
/* CONFIG_S3C_GPIO_SPACE allows the user to select extra
|
||||
* space for debugging purposes so that any accidental
|
||||
* change from one gpio bank to another can be caught.
|
||||
*/
|
||||
|
||||
#define S5P64X0_GPIO_NEXT(__gpio) \
|
||||
((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1)
|
||||
|
||||
enum s5p6440_gpio_number {
|
||||
S5P6440_GPIO_A_START = 0,
|
||||
S5P6440_GPIO_B_START = S5P64X0_GPIO_NEXT(S5P6440_GPIO_A),
|
||||
S5P6440_GPIO_C_START = S5P64X0_GPIO_NEXT(S5P6440_GPIO_B),
|
||||
S5P6440_GPIO_F_START = S5P64X0_GPIO_NEXT(S5P6440_GPIO_C),
|
||||
S5P6440_GPIO_G_START = S5P64X0_GPIO_NEXT(S5P6440_GPIO_F),
|
||||
S5P6440_GPIO_H_START = S5P64X0_GPIO_NEXT(S5P6440_GPIO_G),
|
||||
S5P6440_GPIO_I_START = S5P64X0_GPIO_NEXT(S5P6440_GPIO_H),
|
||||
S5P6440_GPIO_J_START = S5P64X0_GPIO_NEXT(S5P6440_GPIO_I),
|
||||
S5P6440_GPIO_N_START = S5P64X0_GPIO_NEXT(S5P6440_GPIO_J),
|
||||
S5P6440_GPIO_P_START = S5P64X0_GPIO_NEXT(S5P6440_GPIO_N),
|
||||
S5P6440_GPIO_R_START = S5P64X0_GPIO_NEXT(S5P6440_GPIO_P),
|
||||
};
|
||||
|
||||
enum s5p6450_gpio_number {
|
||||
S5P6450_GPIO_A_START = 0,
|
||||
S5P6450_GPIO_B_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_A),
|
||||
S5P6450_GPIO_C_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_B),
|
||||
S5P6450_GPIO_D_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_C),
|
||||
S5P6450_GPIO_F_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_D),
|
||||
S5P6450_GPIO_G_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_F),
|
||||
S5P6450_GPIO_H_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_G),
|
||||
S5P6450_GPIO_I_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_H),
|
||||
S5P6450_GPIO_J_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_I),
|
||||
S5P6450_GPIO_K_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_J),
|
||||
S5P6450_GPIO_N_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_K),
|
||||
S5P6450_GPIO_P_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_N),
|
||||
S5P6450_GPIO_Q_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_P),
|
||||
S5P6450_GPIO_R_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_Q),
|
||||
S5P6450_GPIO_S_START = S5P64X0_GPIO_NEXT(S5P6450_GPIO_R),
|
||||
};
|
||||
|
||||
/* GPIO number definitions */
|
||||
|
||||
#define S5P6440_GPA(_nr) (S5P6440_GPIO_A_START + (_nr))
|
||||
#define S5P6440_GPB(_nr) (S5P6440_GPIO_B_START + (_nr))
|
||||
#define S5P6440_GPC(_nr) (S5P6440_GPIO_C_START + (_nr))
|
||||
#define S5P6440_GPF(_nr) (S5P6440_GPIO_F_START + (_nr))
|
||||
#define S5P6440_GPG(_nr) (S5P6440_GPIO_G_START + (_nr))
|
||||
#define S5P6440_GPH(_nr) (S5P6440_GPIO_H_START + (_nr))
|
||||
#define S5P6440_GPI(_nr) (S5P6440_GPIO_I_START + (_nr))
|
||||
#define S5P6440_GPJ(_nr) (S5P6440_GPIO_J_START + (_nr))
|
||||
#define S5P6440_GPN(_nr) (S5P6440_GPIO_N_START + (_nr))
|
||||
#define S5P6440_GPP(_nr) (S5P6440_GPIO_P_START + (_nr))
|
||||
#define S5P6440_GPR(_nr) (S5P6440_GPIO_R_START + (_nr))
|
||||
|
||||
#define S5P6450_GPA(_nr) (S5P6450_GPIO_A_START + (_nr))
|
||||
#define S5P6450_GPB(_nr) (S5P6450_GPIO_B_START + (_nr))
|
||||
#define S5P6450_GPC(_nr) (S5P6450_GPIO_C_START + (_nr))
|
||||
#define S5P6450_GPD(_nr) (S5P6450_GPIO_D_START + (_nr))
|
||||
#define S5P6450_GPF(_nr) (S5P6450_GPIO_F_START + (_nr))
|
||||
#define S5P6450_GPG(_nr) (S5P6450_GPIO_G_START + (_nr))
|
||||
#define S5P6450_GPH(_nr) (S5P6450_GPIO_H_START + (_nr))
|
||||
#define S5P6450_GPI(_nr) (S5P6450_GPIO_I_START + (_nr))
|
||||
#define S5P6450_GPJ(_nr) (S5P6450_GPIO_J_START + (_nr))
|
||||
#define S5P6450_GPK(_nr) (S5P6450_GPIO_K_START + (_nr))
|
||||
#define S5P6450_GPN(_nr) (S5P6450_GPIO_N_START + (_nr))
|
||||
#define S5P6450_GPP(_nr) (S5P6450_GPIO_P_START + (_nr))
|
||||
#define S5P6450_GPQ(_nr) (S5P6450_GPIO_Q_START + (_nr))
|
||||
#define S5P6450_GPR(_nr) (S5P6450_GPIO_R_START + (_nr))
|
||||
#define S5P6450_GPS(_nr) (S5P6450_GPIO_S_START + (_nr))
|
||||
|
||||
/* the end of the S5P64X0 specific gpios */
|
||||
|
||||
#define S5P6440_GPIO_END (S5P6440_GPR(S5P6440_GPIO_R_NR) + 1)
|
||||
#define S5P6450_GPIO_END (S5P6450_GPS(S5P6450_GPIO_S_NR) + 1)
|
||||
|
||||
#define S5P64X0_GPIO_END (S5P6440_GPIO_END > S5P6450_GPIO_END ? \
|
||||
S5P6440_GPIO_END : S5P6450_GPIO_END)
|
||||
|
||||
#define S3C_GPIO_END S5P64X0_GPIO_END
|
||||
|
||||
/* define the number of gpios we need to the one after the last GPIO range */
|
||||
|
||||
#define ARCH_NR_GPIOS (S5P64X0_GPIO_END + CONFIG_SAMSUNG_GPIO_EXTRA)
|
||||
|
||||
#endif /* __ASM_ARCH_GPIO_H */
|
|
@ -1,18 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/include/mach/hardware.h
|
||||
*
|
||||
* Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P64X0 - Hardware support
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_HARDWARE_H
|
||||
#define __ASM_ARCH_HARDWARE_H __FILE__
|
||||
|
||||
/* currently nothing here, placeholder */
|
||||
|
||||
#endif /* __ASM_ARCH_HARDWARE_H */
|
|
@ -1,148 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/include/mach/irqs.h
|
||||
*
|
||||
* Copyright 2009-2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P64X0 - IRQ definitions
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_IRQS_H
|
||||
#define __ASM_ARCH_IRQS_H __FILE__
|
||||
|
||||
#include <plat/irqs.h>
|
||||
|
||||
/* VIC0 */
|
||||
|
||||
#define IRQ_EINT0_3 S5P_IRQ_VIC0(0)
|
||||
#define IRQ_EINT4_11 S5P_IRQ_VIC0(1)
|
||||
#define IRQ_RTC_TIC S5P_IRQ_VIC0(2)
|
||||
#define IRQ_IIS1 S5P_IRQ_VIC0(3) /* for only S5P6450 */
|
||||
#define IRQ_IIS2 S5P_IRQ_VIC0(4) /* for only S5P6450 */
|
||||
#define IRQ_IIC1 S5P_IRQ_VIC0(5)
|
||||
#define IRQ_I2SV40 S5P_IRQ_VIC0(6)
|
||||
#define IRQ_GPS S5P_IRQ_VIC0(7) /* for only S5P6450 */
|
||||
|
||||
#define IRQ_2D S5P_IRQ_VIC0(11)
|
||||
#define IRQ_TIMER0_VIC S5P_IRQ_VIC0(23)
|
||||
#define IRQ_TIMER1_VIC S5P_IRQ_VIC0(24)
|
||||
#define IRQ_TIMER2_VIC S5P_IRQ_VIC0(25)
|
||||
#define IRQ_WDT S5P_IRQ_VIC0(26)
|
||||
#define IRQ_TIMER3_VIC S5P_IRQ_VIC0(27)
|
||||
#define IRQ_TIMER4_VIC S5P_IRQ_VIC0(28)
|
||||
#define IRQ_DISPCON0 S5P_IRQ_VIC0(29)
|
||||
#define IRQ_DISPCON1 S5P_IRQ_VIC0(30)
|
||||
#define IRQ_DISPCON2 S5P_IRQ_VIC0(31)
|
||||
|
||||
/* VIC1 */
|
||||
|
||||
#define IRQ_EINT12_15 S5P_IRQ_VIC1(0)
|
||||
#define IRQ_PCM0 S5P_IRQ_VIC1(2)
|
||||
#define IRQ_PCM1 S5P_IRQ_VIC1(3) /* for only S5P6450 */
|
||||
#define IRQ_PCM2 S5P_IRQ_VIC1(4) /* for only S5P6450 */
|
||||
#define IRQ_UART0 S5P_IRQ_VIC1(5)
|
||||
#define IRQ_UART1 S5P_IRQ_VIC1(6)
|
||||
#define IRQ_UART2 S5P_IRQ_VIC1(7)
|
||||
#define IRQ_UART3 S5P_IRQ_VIC1(8)
|
||||
#define IRQ_DMA0 S5P_IRQ_VIC1(9)
|
||||
#define IRQ_UART4 S5P_IRQ_VIC1(10) /* S5P6450 */
|
||||
#define IRQ_UART5 S5P_IRQ_VIC1(11) /* S5P6450 */
|
||||
#define IRQ_NFC S5P_IRQ_VIC1(13)
|
||||
#define IRQ_USI S5P_IRQ_VIC1(15) /* S5P6450 */
|
||||
#define IRQ_SPI0 S5P_IRQ_VIC1(16)
|
||||
#define IRQ_SPI1 S5P_IRQ_VIC1(17)
|
||||
#define IRQ_HSMMC2 S5P_IRQ_VIC1(17) /* Shared */
|
||||
#define IRQ_IIC S5P_IRQ_VIC1(18)
|
||||
#define IRQ_DISPCON3 S5P_IRQ_VIC1(19)
|
||||
#define IRQ_EINT_GROUPS S5P_IRQ_VIC1(21)
|
||||
#define IRQ_PMU S5P_IRQ_VIC1(23) /* S5P6440 */
|
||||
#define IRQ_HSMMC0 S5P_IRQ_VIC1(24)
|
||||
#define IRQ_HSMMC1 S5P_IRQ_VIC1(25)
|
||||
#define IRQ_OTG S5P_IRQ_VIC1(26)
|
||||
#define IRQ_DSI S5P_IRQ_VIC1(27)
|
||||
#define IRQ_RTC_ALARM S5P_IRQ_VIC1(28)
|
||||
#define IRQ_TSI S5P_IRQ_VIC1(29)
|
||||
#define IRQ_PENDN S5P_IRQ_VIC1(30)
|
||||
#define IRQ_TC IRQ_PENDN
|
||||
#define IRQ_ADC S5P_IRQ_VIC1(31)
|
||||
|
||||
/* UART interrupts, S5P6450 has 5 UARTs */
|
||||
#define IRQ_S5P_UART_BASE4 (96)
|
||||
#define IRQ_S5P_UART_BASE5 (100)
|
||||
|
||||
#define IRQ_S5P_UART_RX4 (IRQ_S5P_UART_BASE4 + UART_IRQ_RXD)
|
||||
#define IRQ_S5P_UART_TX4 (IRQ_S5P_UART_BASE4 + UART_IRQ_TXD)
|
||||
#define IRQ_S5P_UART_ERR4 (IRQ_S5P_UART_BASE4 + UART_IRQ_ERR)
|
||||
|
||||
#define IRQ_S5P_UART_RX5 (IRQ_S5P_UART_BASE5 + UART_IRQ_RXD)
|
||||
#define IRQ_S5P_UART_TX5 (IRQ_S5P_UART_BASE5 + UART_IRQ_TXD)
|
||||
#define IRQ_S5P_UART_ERR5 (IRQ_S5P_UART_BASE5 + UART_IRQ_ERR)
|
||||
|
||||
/* S3C compatibilty defines */
|
||||
#define IRQ_S3CUART_RX4 IRQ_S5P_UART_RX4
|
||||
#define IRQ_S3CUART_RX5 IRQ_S5P_UART_RX5
|
||||
|
||||
#define IRQ_I2S0 IRQ_I2SV40
|
||||
|
||||
#define IRQ_LCD_FIFO IRQ_DISPCON0
|
||||
#define IRQ_LCD_VSYNC IRQ_DISPCON1
|
||||
#define IRQ_LCD_SYSTEM IRQ_DISPCON2
|
||||
|
||||
/* S5P6450 EINT feature will be added */
|
||||
|
||||
/*
|
||||
* Since the IRQ_EINT(x) are a linear mapping on s5p6440 we just defined
|
||||
* them as an IRQ_EINT(x) macro from S5P_IRQ_EINT_BASE which we place
|
||||
* after the pair of VICs.
|
||||
*/
|
||||
|
||||
#define S5P_IRQ_EINT_BASE (S5P_IRQ_VIC1(31) + 6)
|
||||
|
||||
#define S5P_EINT(x) ((x) + S5P_IRQ_EINT_BASE)
|
||||
|
||||
#define S5P_EINT_BASE1 (S5P_IRQ_EINT_BASE)
|
||||
/*
|
||||
* S5P6440 has 0-15 external interrupts in group 0. Only these can be used
|
||||
* to wake up from sleep. If request is beyond this range, by mistake, a large
|
||||
* return value for an irq number should be indication of something amiss.
|
||||
*/
|
||||
#define S5P_EINT_BASE2 (0xf0000000)
|
||||
|
||||
/*
|
||||
* Next the external interrupt groups. These are similar to the IRQ_EINT(x)
|
||||
* that they are sourced from the GPIO pins but with a different scheme for
|
||||
* priority and source indication.
|
||||
*
|
||||
* The IRQ_EINT(x) can be thought of as 'group 0' of the available GPIO
|
||||
* interrupts, but for historical reasons they are kept apart from these
|
||||
* next interrupts.
|
||||
*
|
||||
* Use IRQ_EINT_GROUP(group, offset) to get the number for use in the
|
||||
* machine specific support files.
|
||||
*/
|
||||
|
||||
/* Actually, #6 and #7 are missing in the EINT_GROUP1 */
|
||||
#define IRQ_EINT_GROUP1_NR (15)
|
||||
#define IRQ_EINT_GROUP2_NR (8)
|
||||
#define IRQ_EINT_GROUP5_NR (7)
|
||||
#define IRQ_EINT_GROUP6_NR (10)
|
||||
/* Actually, #0, #1 and #2 are missing in the EINT_GROUP8 */
|
||||
#define IRQ_EINT_GROUP8_NR (11)
|
||||
|
||||
#define IRQ_EINT_GROUP_BASE S5P_EINT(16)
|
||||
#define IRQ_EINT_GROUP1_BASE (IRQ_EINT_GROUP_BASE + 0)
|
||||
#define IRQ_EINT_GROUP2_BASE (IRQ_EINT_GROUP1_BASE + IRQ_EINT_GROUP1_NR)
|
||||
#define IRQ_EINT_GROUP5_BASE (IRQ_EINT_GROUP2_BASE + IRQ_EINT_GROUP2_NR)
|
||||
#define IRQ_EINT_GROUP6_BASE (IRQ_EINT_GROUP5_BASE + IRQ_EINT_GROUP5_NR)
|
||||
#define IRQ_EINT_GROUP8_BASE (IRQ_EINT_GROUP6_BASE + IRQ_EINT_GROUP6_NR)
|
||||
|
||||
#define IRQ_EINT_GROUP(grp, x) (IRQ_EINT_GROUP##grp##_BASE + (x))
|
||||
|
||||
/* Set the default NR_IRQS */
|
||||
|
||||
#define NR_IRQS (IRQ_EINT_GROUP8_BASE + IRQ_EINT_GROUP8_NR + 1)
|
||||
|
||||
#endif /* __ASM_ARCH_IRQS_H */
|
|
@ -1,96 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/include/mach/map.h
|
||||
*
|
||||
* Copyright (c) 2009-2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P64X0 - Memory map definitions
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_MAP_H
|
||||
#define __ASM_ARCH_MAP_H __FILE__
|
||||
|
||||
#include <plat/map-base.h>
|
||||
#include <plat/map-s5p.h>
|
||||
|
||||
#define S5P64X0_PA_SDRAM 0x20000000
|
||||
|
||||
#define S5P64X0_PA_CHIPID 0xE0000000
|
||||
|
||||
#define S5P64X0_PA_SYSCON 0xE0100000
|
||||
|
||||
#define S5P64X0_PA_GPIO 0xE0308000
|
||||
|
||||
#define S5P64X0_PA_VIC0 0xE4000000
|
||||
#define S5P64X0_PA_VIC1 0xE4100000
|
||||
|
||||
#define S5P64X0_PA_SROMC 0xE7000000
|
||||
|
||||
#define S5P64X0_PA_PDMA 0xE9000000
|
||||
|
||||
#define S5P64X0_PA_TIMER 0xEA000000
|
||||
#define S5P64X0_PA_RTC 0xEA100000
|
||||
#define S5P64X0_PA_WDT 0xEA200000
|
||||
|
||||
#define S5P6440_PA_IIC0 0xEC104000
|
||||
#define S5P6440_PA_IIC1 0xEC20F000
|
||||
#define S5P6450_PA_IIC0 0xEC100000
|
||||
#define S5P6450_PA_IIC1 0xEC200000
|
||||
|
||||
#define S5P64X0_PA_SPI0 0xEC400000
|
||||
#define S5P64X0_PA_SPI1 0xEC500000
|
||||
|
||||
#define S5P64X0_PA_HSOTG 0xED100000
|
||||
|
||||
#define S5P64X0_PA_HSMMC(x) (0xED800000 + ((x) * 0x100000))
|
||||
|
||||
#define S5P64X0_PA_FB 0xEE000000
|
||||
|
||||
#define S5P64X0_PA_I2S 0xF2000000
|
||||
#define S5P6450_PA_I2S1 0xF2800000
|
||||
#define S5P6450_PA_I2S2 0xF2900000
|
||||
|
||||
#define S5P64X0_PA_PCM 0xF2100000
|
||||
|
||||
#define S5P64X0_PA_ADC 0xF3000000
|
||||
|
||||
/* Compatibiltiy Defines */
|
||||
|
||||
#define S3C_PA_HSMMC0 S5P64X0_PA_HSMMC(0)
|
||||
#define S3C_PA_HSMMC1 S5P64X0_PA_HSMMC(1)
|
||||
#define S3C_PA_HSMMC2 S5P64X0_PA_HSMMC(2)
|
||||
#define S3C_PA_IIC S5P6440_PA_IIC0
|
||||
#define S3C_PA_IIC1 S5P6440_PA_IIC1
|
||||
#define S3C_PA_RTC S5P64X0_PA_RTC
|
||||
#define S3C_PA_WDT S5P64X0_PA_WDT
|
||||
#define S3C_PA_FB S5P64X0_PA_FB
|
||||
#define S3C_PA_SPI0 S5P64X0_PA_SPI0
|
||||
#define S3C_PA_SPI1 S5P64X0_PA_SPI1
|
||||
|
||||
#define S5P_PA_CHIPID S5P64X0_PA_CHIPID
|
||||
#define S5P_PA_SROMC S5P64X0_PA_SROMC
|
||||
#define S5P_PA_SYSCON S5P64X0_PA_SYSCON
|
||||
#define S5P_PA_TIMER S5P64X0_PA_TIMER
|
||||
|
||||
#define SAMSUNG_PA_ADC S5P64X0_PA_ADC
|
||||
#define SAMSUNG_PA_TIMER S5P64X0_PA_TIMER
|
||||
|
||||
/* UART */
|
||||
|
||||
#define S5P6440_PA_UART(x) (0xEC000000 + ((x) * S3C_UART_OFFSET))
|
||||
#define S5P6450_PA_UART(x) ((x < 5) ? (0xEC800000 + ((x) * S3C_UART_OFFSET)) : (0xEC000000))
|
||||
|
||||
#define S5P_PA_UART0 S5P6450_PA_UART(0)
|
||||
#define S5P_PA_UART1 S5P6450_PA_UART(1)
|
||||
#define S5P_PA_UART2 S5P6450_PA_UART(2)
|
||||
#define S5P_PA_UART3 S5P6450_PA_UART(3)
|
||||
#define S5P_PA_UART4 S5P6450_PA_UART(4)
|
||||
#define S5P_PA_UART5 S5P6450_PA_UART(5)
|
||||
|
||||
#define S5P_SZ_UART SZ_256
|
||||
#define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET))
|
||||
|
||||
#endif /* __ASM_ARCH_MAP_H */
|
|
@ -1,119 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/include/mach/pm-core.h
|
||||
*
|
||||
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P64X0 - PM core support for arch/arm/plat-samsung/pm.c
|
||||
*
|
||||
* Based on PM core support for S3C64XX by Ben Dooks
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/serial_s3c.h>
|
||||
|
||||
#include <mach/regs-gpio.h>
|
||||
|
||||
static inline void s3c_pm_debug_init_uart(void)
|
||||
{
|
||||
u32 tmp = __raw_readl(S5P64X0_CLK_GATE_PCLK);
|
||||
|
||||
/*
|
||||
* As a note, since the S5P64X0 UARTs generally have multiple
|
||||
* clock sources, we simply enable PCLK at the moment and hope
|
||||
* that the resume settings for the UART are suitable for the
|
||||
* use with PCLK.
|
||||
*/
|
||||
tmp |= S5P64X0_CLK_GATE_PCLK_UART0;
|
||||
tmp |= S5P64X0_CLK_GATE_PCLK_UART1;
|
||||
tmp |= S5P64X0_CLK_GATE_PCLK_UART2;
|
||||
tmp |= S5P64X0_CLK_GATE_PCLK_UART3;
|
||||
|
||||
__raw_writel(tmp, S5P64X0_CLK_GATE_PCLK);
|
||||
udelay(10);
|
||||
}
|
||||
|
||||
static inline void s3c_pm_arch_prepare_irqs(void)
|
||||
{
|
||||
/* VIC should have already been taken care of */
|
||||
|
||||
/* clear any pending EINT0 interrupts */
|
||||
__raw_writel(__raw_readl(S5P64X0_EINT0PEND), S5P64X0_EINT0PEND);
|
||||
}
|
||||
|
||||
static inline void s3c_pm_arch_stop_clocks(void) { }
|
||||
static inline void s3c_pm_arch_show_resume_irqs(void) { }
|
||||
|
||||
/*
|
||||
* make these defines, we currently do not have any need to change
|
||||
* the IRQ wake controls depending on the CPU we are running on
|
||||
*/
|
||||
#define s3c_irqwake_eintallow ((1 << 16) - 1)
|
||||
#define s3c_irqwake_intallow (~0)
|
||||
|
||||
static inline void s3c_pm_arch_update_uart(void __iomem *regs,
|
||||
struct pm_uart_save *save)
|
||||
{
|
||||
u32 ucon = __raw_readl(regs + S3C2410_UCON);
|
||||
u32 ucon_clk = ucon & S3C6400_UCON_CLKMASK;
|
||||
u32 save_clk = save->ucon & S3C6400_UCON_CLKMASK;
|
||||
u32 new_ucon;
|
||||
u32 delta;
|
||||
|
||||
/*
|
||||
* S5P64X0 UART blocks only support level interrupts, so ensure that
|
||||
* when we restore unused UART blocks we force the level interrupt
|
||||
* settings.
|
||||
*/
|
||||
save->ucon |= S3C2410_UCON_TXILEVEL | S3C2410_UCON_RXILEVEL;
|
||||
|
||||
/*
|
||||
* We have a constraint on changing the clock type of the UART
|
||||
* between UCLKx and PCLK, so ensure that when we restore UCON
|
||||
* that the CLK field is correctly modified if the bootloader
|
||||
* has changed anything.
|
||||
*/
|
||||
if (ucon_clk != save_clk) {
|
||||
new_ucon = save->ucon;
|
||||
delta = ucon_clk ^ save_clk;
|
||||
|
||||
/*
|
||||
* change from UCLKx => wrong PCLK,
|
||||
* either UCLK can be tested for by a bit-test
|
||||
* with UCLK0
|
||||
*/
|
||||
if (ucon_clk & S3C6400_UCON_UCLK0 &&
|
||||
!(save_clk & S3C6400_UCON_UCLK0) &&
|
||||
delta & S3C6400_UCON_PCLK2) {
|
||||
new_ucon &= ~S3C6400_UCON_UCLK0;
|
||||
} else if (delta == S3C6400_UCON_PCLK2) {
|
||||
/*
|
||||
* as a precaution, don't change from
|
||||
* PCLK2 => PCLK or vice-versa
|
||||
*/
|
||||
new_ucon ^= S3C6400_UCON_PCLK2;
|
||||
}
|
||||
|
||||
S3C_PMDBG("ucon change %04x => %04x (save=%04x)\n",
|
||||
ucon, new_ucon, save->ucon);
|
||||
save->ucon = new_ucon;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void s3c_pm_restored_gpios(void)
|
||||
{
|
||||
/* ensure sleep mode has been cleared from the system */
|
||||
__raw_writel(0, S5P64X0_SLPEN);
|
||||
}
|
||||
|
||||
static inline void samsung_pm_saved_gpios(void)
|
||||
{
|
||||
/*
|
||||
* turn on the sleep mode and keep it there, as it seems that during
|
||||
* suspend the xCON registers get re-set and thus you can end up with
|
||||
* problems between going to sleep and resuming.
|
||||
*/
|
||||
__raw_writel(S5P64X0_SLPEN_USE_xSLP, S5P64X0_SLPEN);
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/include/mach/regs-clock.h
|
||||
*
|
||||
* Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P64X0 - Clock register definitions
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_REGS_CLOCK_H
|
||||
#define __ASM_ARCH_REGS_CLOCK_H __FILE__
|
||||
|
||||
#include <mach/map.h>
|
||||
|
||||
#define S5P_CLKREG(x) (S3C_VA_SYS + (x))
|
||||
|
||||
#define S5P64X0_APLL_CON S5P_CLKREG(0x0C)
|
||||
#define S5P64X0_MPLL_CON S5P_CLKREG(0x10)
|
||||
#define S5P64X0_EPLL_CON S5P_CLKREG(0x14)
|
||||
#define S5P64X0_EPLL_CON_K S5P_CLKREG(0x18)
|
||||
|
||||
#define S5P64X0_CLK_SRC0 S5P_CLKREG(0x1C)
|
||||
|
||||
#define S5P64X0_CLK_DIV0 S5P_CLKREG(0x20)
|
||||
#define S5P64X0_CLK_DIV1 S5P_CLKREG(0x24)
|
||||
#define S5P64X0_CLK_DIV2 S5P_CLKREG(0x28)
|
||||
|
||||
#define S5P64X0_CLK_GATE_HCLK0 S5P_CLKREG(0x30)
|
||||
#define S5P64X0_CLK_GATE_PCLK S5P_CLKREG(0x34)
|
||||
#define S5P64X0_CLK_GATE_SCLK0 S5P_CLKREG(0x38)
|
||||
#define S5P64X0_CLK_GATE_MEM0 S5P_CLKREG(0x3C)
|
||||
|
||||
#define S5P64X0_CLK_DIV3 S5P_CLKREG(0x40)
|
||||
|
||||
#define S5P64X0_CLK_GATE_HCLK1 S5P_CLKREG(0x44)
|
||||
#define S5P64X0_CLK_GATE_SCLK1 S5P_CLKREG(0x48)
|
||||
|
||||
#define S5P6450_DPLL_CON S5P_CLKREG(0x50)
|
||||
#define S5P6450_DPLL_CON_K S5P_CLKREG(0x54)
|
||||
|
||||
#define S5P64X0_AHB_CON0 S5P_CLKREG(0x100)
|
||||
#define S5P64X0_CLK_SRC1 S5P_CLKREG(0x10C)
|
||||
|
||||
#define S5P64X0_SYS_ID S5P_CLKREG(0x118)
|
||||
#define S5P64X0_SYS_OTHERS S5P_CLKREG(0x11C)
|
||||
|
||||
#define S5P64X0_PWR_CFG S5P_CLKREG(0x804)
|
||||
#define S5P64X0_EINT_WAKEUP_MASK S5P_CLKREG(0x808)
|
||||
#define S5P64X0_SLEEP_CFG S5P_CLKREG(0x818)
|
||||
#define S5P64X0_PWR_STABLE S5P_CLKREG(0x828)
|
||||
|
||||
#define S5P64X0_OTHERS S5P_CLKREG(0x900)
|
||||
#define S5P64X0_WAKEUP_STAT S5P_CLKREG(0x908)
|
||||
|
||||
#define S5P64X0_INFORM0 S5P_CLKREG(0xA00)
|
||||
|
||||
#define S5P64X0_CLKDIV0_HCLK_SHIFT (8)
|
||||
#define S5P64X0_CLKDIV0_HCLK_MASK (0xF << S5P64X0_CLKDIV0_HCLK_SHIFT)
|
||||
|
||||
/* HCLK GATE Registers */
|
||||
#define S5P64X0_CLK_GATE_HCLK1_FIMGVG (1 << 2)
|
||||
#define S5P64X0_CLK_GATE_SCLK1_FIMGVG (1 << 2)
|
||||
|
||||
/* PCLK GATE Registers */
|
||||
#define S5P64X0_CLK_GATE_PCLK_UART3 (1 << 4)
|
||||
#define S5P64X0_CLK_GATE_PCLK_UART2 (1 << 3)
|
||||
#define S5P64X0_CLK_GATE_PCLK_UART1 (1 << 2)
|
||||
#define S5P64X0_CLK_GATE_PCLK_UART0 (1 << 1)
|
||||
|
||||
#define S5P64X0_PWR_CFG_MMC1_DISABLE (1 << 15)
|
||||
#define S5P64X0_PWR_CFG_MMC0_DISABLE (1 << 14)
|
||||
#define S5P64X0_PWR_CFG_RTC_TICK_DISABLE (1 << 11)
|
||||
#define S5P64X0_PWR_CFG_RTC_ALRM_DISABLE (1 << 10)
|
||||
#define S5P64X0_PWR_CFG_WFI_MASK (3 << 5)
|
||||
#define S5P64X0_PWR_CFG_WFI_SLEEP (3 << 5)
|
||||
|
||||
#define S5P64X0_SLEEP_CFG_OSC_EN (1 << 0)
|
||||
|
||||
#define S5P64X0_PWR_STABLE_PWR_CNT_VAL4 (4 << 0)
|
||||
|
||||
#define S5P6450_OTHERS_DISABLE_INT (1 << 31)
|
||||
#define S5P64X0_OTHERS_RET_UART (1 << 26)
|
||||
#define S5P64X0_OTHERS_RET_MMC1 (1 << 25)
|
||||
#define S5P64X0_OTHERS_RET_MMC0 (1 << 24)
|
||||
#define S5P64X0_OTHERS_USB_SIG_MASK (1 << 16)
|
||||
|
||||
/* Compatibility defines */
|
||||
|
||||
#define ARM_CLK_DIV S5P64X0_CLK_DIV0
|
||||
#define ARM_DIV_RATIO_SHIFT 0
|
||||
#define ARM_DIV_MASK (0xF << ARM_DIV_RATIO_SHIFT)
|
||||
|
||||
#define S5P_EPLL_CON S5P64X0_EPLL_CON
|
||||
|
||||
#endif /* __ASM_ARCH_REGS_CLOCK_H */
|
|
@ -1,68 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h
|
||||
*
|
||||
* Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P64X0 - GPIO register definitions
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_REGS_GPIO_H
|
||||
#define __ASM_ARCH_REGS_GPIO_H __FILE__
|
||||
|
||||
#include <mach/map.h>
|
||||
|
||||
/* Base addresses for each of the banks */
|
||||
|
||||
#define S5P64X0_GPA_BASE (S5P_VA_GPIO + 0x0000)
|
||||
#define S5P64X0_GPB_BASE (S5P_VA_GPIO + 0x0020)
|
||||
#define S5P64X0_GPC_BASE (S5P_VA_GPIO + 0x0040)
|
||||
#define S5P64X0_GPF_BASE (S5P_VA_GPIO + 0x00A0)
|
||||
#define S5P64X0_GPG_BASE (S5P_VA_GPIO + 0x00C0)
|
||||
#define S5P64X0_GPH_BASE (S5P_VA_GPIO + 0x00E0)
|
||||
#define S5P64X0_GPI_BASE (S5P_VA_GPIO + 0x0100)
|
||||
#define S5P64X0_GPJ_BASE (S5P_VA_GPIO + 0x0120)
|
||||
#define S5P64X0_GPN_BASE (S5P_VA_GPIO + 0x0830)
|
||||
#define S5P64X0_GPP_BASE (S5P_VA_GPIO + 0x0160)
|
||||
#define S5P64X0_GPR_BASE (S5P_VA_GPIO + 0x0290)
|
||||
|
||||
#define S5P6450_GPD_BASE (S5P_VA_GPIO + 0x0060)
|
||||
#define S5P6450_GPK_BASE (S5P_VA_GPIO + 0x0140)
|
||||
#define S5P6450_GPQ_BASE (S5P_VA_GPIO + 0x0180)
|
||||
#define S5P6450_GPS_BASE (S5P_VA_GPIO + 0x0300)
|
||||
|
||||
#define S5P64X0_SPCON0 (S5P_VA_GPIO + 0x1A0)
|
||||
#define S5P64X0_SPCON0_LCD_SEL_MASK (0x3 << 0)
|
||||
#define S5P64X0_SPCON0_LCD_SEL_RGB (0x1 << 0)
|
||||
#define S5P64X0_SPCON1 (S5P_VA_GPIO + 0x2B0)
|
||||
|
||||
#define S5P64X0_MEM0CONSLP0 (S5P_VA_GPIO + 0x1C0)
|
||||
#define S5P64X0_MEM0CONSLP1 (S5P_VA_GPIO + 0x1C4)
|
||||
#define S5P64X0_MEM0DRVCON (S5P_VA_GPIO + 0x1D0)
|
||||
#define S5P64X0_MEM1DRVCON (S5P_VA_GPIO + 0x1D4)
|
||||
|
||||
#define S5P64X0_EINT12CON (S5P_VA_GPIO + 0x200)
|
||||
#define S5P64X0_EINT12FLTCON (S5P_VA_GPIO + 0x220)
|
||||
#define S5P64X0_EINT12MASK (S5P_VA_GPIO + 0x240)
|
||||
|
||||
/* External interrupt control registers for group0 */
|
||||
|
||||
#define EINT0CON0_OFFSET (0x900)
|
||||
#define EINT0FLTCON0_OFFSET (0x910)
|
||||
#define EINT0FLTCON1_OFFSET (0x914)
|
||||
#define EINT0MASK_OFFSET (0x920)
|
||||
#define EINT0PEND_OFFSET (0x924)
|
||||
|
||||
#define S5P64X0_EINT0CON0 (S5P_VA_GPIO + EINT0CON0_OFFSET)
|
||||
#define S5P64X0_EINT0FLTCON0 (S5P_VA_GPIO + EINT0FLTCON0_OFFSET)
|
||||
#define S5P64X0_EINT0FLTCON1 (S5P_VA_GPIO + EINT0FLTCON1_OFFSET)
|
||||
#define S5P64X0_EINT0MASK (S5P_VA_GPIO + EINT0MASK_OFFSET)
|
||||
#define S5P64X0_EINT0PEND (S5P_VA_GPIO + EINT0PEND_OFFSET)
|
||||
|
||||
#define S5P64X0_SLPEN (S5P_VA_GPIO + 0x930)
|
||||
#define S5P64X0_SLPEN_USE_xSLP (1 << 0)
|
||||
|
||||
#endif /* __ASM_ARCH_REGS_GPIO_H */
|
|
@ -1,18 +0,0 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/include/mach/regs-irq.h
|
||||
*
|
||||
* Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P64X0 - IRQ register definitions
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_REGS_IRQ_H
|
||||
#define __ASM_ARCH_REGS_IRQ_H __FILE__
|
||||
|
||||
#include <mach/map.h>
|
||||
|
||||
#endif /* __ASM_ARCH_REGS_IRQ_H */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue