diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/arm/mach-s3c2412 | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'arch/arm/mach-s3c2412')
-rw-r--r-- | arch/arm/mach-s3c2412/Kconfig | 88 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/Makefile | 13 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/cpu-freq.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/gpio.c | 2 |
4 files changed, 107 insertions, 10 deletions
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig index 495f6928cba..c2cf4e56998 100644 --- a/arch/arm/mach-s3c2412/Kconfig +++ b/arch/arm/mach-s3c2412/Kconfig | |||
@@ -2,12 +2,98 @@ | |||
2 | # | 2 | # |
3 | # Licensed under GPLv2 | 3 | # Licensed under GPLv2 |
4 | 4 | ||
5 | config CPU_S3C2412 | ||
6 | bool | ||
7 | depends on ARCH_S3C2410 | ||
8 | select CPU_ARM926T | ||
9 | select CPU_LLSERIAL_S3C2440 | ||
10 | select S3C2412_PM if PM | ||
11 | select S3C2412_DMA if S3C2410_DMA | ||
12 | select S3C2410_GPIO | ||
13 | help | ||
14 | Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line | ||
15 | |||
16 | config CPU_S3C2412_ONLY | ||
17 | bool | ||
18 | depends on ARCH_S3C2410 && !CPU_S3C2410 && \ | ||
19 | !CPU_S3C2416 && !CPU_S3C2440 && !CPU_S3C2442 && \ | ||
20 | !CPU_S3C2443 && CPU_S3C2412 | ||
21 | default y if CPU_S3C2412 | ||
22 | |||
23 | config S3C2412_DMA | ||
24 | bool | ||
25 | depends on CPU_S3C2412 | ||
26 | help | ||
27 | Internal config node for S3C2412 DMA support | ||
28 | |||
29 | config S3C2412_PM | ||
30 | bool | ||
31 | select S3C2412_PM_SLEEP | ||
32 | help | ||
33 | Internal config node to apply S3C2412 power management | ||
34 | |||
35 | config S3C2412_PM_SLEEP | ||
36 | bool | ||
37 | help | ||
38 | Internal config node to apply sleep for S3C2412 power management. | ||
39 | Can be selected by another SoCs with similar sleep procedure. | ||
40 | |||
5 | # Note, the S3C2412 IOtiming support is in plat-s3c24xx | 41 | # Note, the S3C2412 IOtiming support is in plat-s3c24xx |
6 | 42 | ||
7 | config S3C2412_CPUFREQ | 43 | config S3C2412_CPUFREQ |
8 | bool | 44 | bool |
9 | depends on CPU_FREQ_S3C24XX && CPU_S3C2412 | 45 | depends on CPU_FREQ_S3C24XX && CPU_S3C2412 |
10 | default y | ||
11 | select S3C2412_IOTIMING | 46 | select S3C2412_IOTIMING |
47 | default y | ||
12 | help | 48 | help |
13 | CPU Frequency scaling support for S3C2412 and S3C2413 SoC CPUs. | 49 | CPU Frequency scaling support for S3C2412 and S3C2413 SoC CPUs. |
50 | |||
51 | menu "S3C2412 Machines" | ||
52 | |||
53 | config MACH_JIVE | ||
54 | bool "Logitech Jive" | ||
55 | select CPU_S3C2412 | ||
56 | select S3C_DEV_USB_HOST | ||
57 | select S3C_DEV_NAND | ||
58 | help | ||
59 | Say Y here if you are using the Logitech Jive. | ||
60 | |||
61 | config MACH_JIVE_SHOW_BOOTLOADER | ||
62 | bool "Allow access to bootloader partitions in MTD (EXPERIMENTAL)" | ||
63 | depends on MACH_JIVE && EXPERIMENTAL | ||
64 | |||
65 | config MACH_SMDK2413 | ||
66 | bool "SMDK2413" | ||
67 | select CPU_S3C2412 | ||
68 | select MACH_S3C2413 | ||
69 | select MACH_SMDK | ||
70 | select S3C_DEV_USB_HOST | ||
71 | select S3C_DEV_NAND | ||
72 | help | ||
73 | Say Y here if you are using an SMDK2413 | ||
74 | |||
75 | config MACH_S3C2413 | ||
76 | bool | ||
77 | help | ||
78 | Internal node for S3C2413 version of SMDK2413, so that | ||
79 | machine_is_s3c2413() will work when MACH_SMDK2413 is | ||
80 | selected | ||
81 | |||
82 | config MACH_SMDK2412 | ||
83 | bool "SMDK2412" | ||
84 | select MACH_SMDK2413 | ||
85 | help | ||
86 | Say Y here if you are using an SMDK2412 | ||
87 | |||
88 | Note, this shares support with SMDK2413, so will automatically | ||
89 | select MACH_SMDK2413. | ||
90 | |||
91 | config MACH_VSTMS | ||
92 | bool "VMSTMS" | ||
93 | select CPU_S3C2412 | ||
94 | select S3C_DEV_USB_HOST | ||
95 | select S3C_DEV_NAND | ||
96 | help | ||
97 | Say Y here if you are using an VSTMS board | ||
98 | |||
99 | endmenu | ||
diff --git a/arch/arm/mach-s3c2412/Makefile b/arch/arm/mach-s3c2412/Makefile index 41a6c279fb2..6c48a91ea39 100644 --- a/arch/arm/mach-s3c2412/Makefile +++ b/arch/arm/mach-s3c2412/Makefile | |||
@@ -9,4 +9,17 @@ obj-m := | |||
9 | obj-n := | 9 | obj-n := |
10 | obj- := | 10 | obj- := |
11 | 11 | ||
12 | obj-$(CONFIG_CPU_S3C2412) += s3c2412.o | ||
13 | obj-$(CONFIG_CPU_S3C2412) += irq.o | ||
14 | obj-$(CONFIG_CPU_S3C2412) += clock.o | ||
15 | obj-$(CONFIG_CPU_S3C2412) += gpio.o | ||
16 | obj-$(CONFIG_S3C2412_DMA) += dma.o | ||
17 | obj-$(CONFIG_S3C2412_PM) += pm.o | ||
18 | obj-$(CONFIG_S3C2412_PM_SLEEP) += sleep.o | ||
12 | obj-$(CONFIG_S3C2412_CPUFREQ) += cpu-freq.o | 19 | obj-$(CONFIG_S3C2412_CPUFREQ) += cpu-freq.o |
20 | |||
21 | # Machine support | ||
22 | |||
23 | obj-$(CONFIG_MACH_JIVE) += mach-jive.o | ||
24 | obj-$(CONFIG_MACH_SMDK2413) += mach-smdk2413.o | ||
25 | obj-$(CONFIG_MACH_VSTMS) += mach-vstms.o | ||
diff --git a/arch/arm/mach-s3c2412/cpu-freq.c b/arch/arm/mach-s3c2412/cpu-freq.c index 125be7d5fa6..eb3ea172133 100644 --- a/arch/arm/mach-s3c2412/cpu-freq.c +++ b/arch/arm/mach-s3c2412/cpu-freq.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
18 | #include <linux/cpufreq.h> | 18 | #include <linux/cpufreq.h> |
19 | #include <linux/device.h> | 19 | #include <linux/sysdev.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
@@ -194,8 +194,7 @@ static struct s3c_cpufreq_info s3c2412_cpufreq_info = { | |||
194 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2412_iotiming_debugfs), | 194 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2412_iotiming_debugfs), |
195 | }; | 195 | }; |
196 | 196 | ||
197 | static int s3c2412_cpufreq_add(struct device *dev, | 197 | static int s3c2412_cpufreq_add(struct sys_device *sysdev) |
198 | struct subsys_interface *sif) | ||
199 | { | 198 | { |
200 | unsigned long fclk_rate; | 199 | unsigned long fclk_rate; |
201 | 200 | ||
@@ -245,15 +244,14 @@ err_fclk: | |||
245 | return -ENOENT; | 244 | return -ENOENT; |
246 | } | 245 | } |
247 | 246 | ||
248 | static struct subsys_interface s3c2412_cpufreq_interface = { | 247 | static struct sysdev_driver s3c2412_cpufreq_driver = { |
249 | .name = "s3c2412_cpufreq", | 248 | .add = s3c2412_cpufreq_add, |
250 | .subsys = &s3c2412_subsys, | ||
251 | .add_dev = s3c2412_cpufreq_add, | ||
252 | }; | 249 | }; |
253 | 250 | ||
254 | static int s3c2412_cpufreq_init(void) | 251 | static int s3c2412_cpufreq_init(void) |
255 | { | 252 | { |
256 | return subsys_interface_register(&s3c2412_cpufreq_interface); | 253 | return sysdev_driver_register(&s3c2412_sysclass, |
254 | &s3c2412_cpufreq_driver); | ||
257 | } | 255 | } |
258 | 256 | ||
259 | arch_initcall(s3c2412_cpufreq_init); | 257 | arch_initcall(s3c2412_cpufreq_init); |
diff --git a/arch/arm/mach-s3c2412/gpio.c b/arch/arm/mach-s3c2412/gpio.c index 4526f6ba31a..3404a876b33 100644 --- a/arch/arm/mach-s3c2412/gpio.c +++ b/arch/arm/mach-s3c2412/gpio.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | int s3c2412_gpio_set_sleepcfg(unsigned int pin, unsigned int state) | 29 | int s3c2412_gpio_set_sleepcfg(unsigned int pin, unsigned int state) |
30 | { | 30 | { |
31 | struct samsung_gpio_chip *chip = samsung_gpiolib_getchip(pin); | 31 | struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin); |
32 | unsigned long offs = pin - chip->chip.base; | 32 | unsigned long offs = pin - chip->chip.base; |
33 | unsigned long flags; | 33 | unsigned long flags; |
34 | unsigned long slpcon; | 34 | unsigned long slpcon; |