diff options
Diffstat (limited to 'arch/arm/mach-s3c2412')
-rw-r--r-- | arch/arm/mach-s3c2412/dma.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/s3c2412.c | 33 |
2 files changed, 35 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c index d0f4695c09d9..668cccefe7b0 100644 --- a/arch/arm/mach-s3c2412/dma.c +++ b/arch/arm/mach-s3c2412/dma.c | |||
@@ -59,8 +59,8 @@ static struct s3c24xx_dma_map __initdata s3c2412_dma_mappings[] = { | |||
59 | [DMACH_SPI1] = { | 59 | [DMACH_SPI1] = { |
60 | .name = "spi1", | 60 | .name = "spi1", |
61 | .channels = MAP(S3C2412_DMAREQSEL_SPI1TX), | 61 | .channels = MAP(S3C2412_DMAREQSEL_SPI1TX), |
62 | .hw_addr.to = S3C2410_PA_SPI + 0x20 + S3C2410_SPTDAT, | 62 | .hw_addr.to = S3C2410_PA_SPI + S3C2412_SPI1 + S3C2410_SPTDAT, |
63 | .hw_addr.from = S3C2410_PA_SPI + 0x20 + S3C2410_SPRDAT, | 63 | .hw_addr.from = S3C2410_PA_SPI + S3C2412_SPI1 + S3C2410_SPRDAT, |
64 | }, | 64 | }, |
65 | [DMACH_UART0] = { | 65 | [DMACH_UART0] = { |
66 | .name = "uart0", | 66 | .name = "uart0", |
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c index aafe0bc593f1..782b5814ced2 100644 --- a/arch/arm/mach-s3c2412/s3c2412.c +++ b/arch/arm/mach-s3c2412/s3c2412.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/delay.h> | ||
19 | #include <linux/sysdev.h> | 20 | #include <linux/sysdev.h> |
20 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
@@ -29,6 +30,7 @@ | |||
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
31 | 32 | ||
33 | #include <asm/arch/reset.h> | ||
32 | #include <asm/arch/idle.h> | 34 | #include <asm/arch/idle.h> |
33 | 35 | ||
34 | #include <asm/arch/regs-clock.h> | 36 | #include <asm/arch/regs-clock.h> |
@@ -37,6 +39,8 @@ | |||
37 | #include <asm/arch/regs-gpio.h> | 39 | #include <asm/arch/regs-gpio.h> |
38 | #include <asm/arch/regs-gpioj.h> | 40 | #include <asm/arch/regs-gpioj.h> |
39 | #include <asm/arch/regs-dsc.h> | 41 | #include <asm/arch/regs-dsc.h> |
42 | #include <asm/arch/regs-spi.h> | ||
43 | #include <asm/arch/regs-s3c2412.h> | ||
40 | 44 | ||
41 | #include <asm/plat-s3c24xx/s3c2412.h> | 45 | #include <asm/plat-s3c24xx/s3c2412.h> |
42 | #include <asm/plat-s3c24xx/cpu.h> | 46 | #include <asm/plat-s3c24xx/cpu.h> |
@@ -74,6 +78,14 @@ void __init s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no) | |||
74 | s3c_device_sdi.name = "s3c2412-sdi"; | 78 | s3c_device_sdi.name = "s3c2412-sdi"; |
75 | s3c_device_lcd.name = "s3c2412-lcd"; | 79 | s3c_device_lcd.name = "s3c2412-lcd"; |
76 | s3c_device_nand.name = "s3c2412-nand"; | 80 | s3c_device_nand.name = "s3c2412-nand"; |
81 | |||
82 | /* spi channel related changes, s3c2412/13 specific */ | ||
83 | s3c_device_spi0.name = "s3c2412-spi"; | ||
84 | s3c_device_spi0.resource[0].end = S3C24XX_PA_SPI + 0x24; | ||
85 | s3c_device_spi1.name = "s3c2412-spi"; | ||
86 | s3c_device_spi1.resource[0].start = S3C24XX_PA_SPI + S3C2412_SPI1; | ||
87 | s3c_device_spi1.resource[0].end = S3C24XX_PA_SPI + S3C2412_SPI1 + 0x24; | ||
88 | |||
77 | } | 89 | } |
78 | 90 | ||
79 | /* s3c2412_idle | 91 | /* s3c2412_idle |
@@ -97,6 +109,23 @@ static void s3c2412_idle(void) | |||
97 | cpu_do_idle(); | 109 | cpu_do_idle(); |
98 | } | 110 | } |
99 | 111 | ||
112 | static void s3c2412_hard_reset(void) | ||
113 | { | ||
114 | /* errata "Watch-dog/Software Reset Problem" specifies that | ||
115 | * this reset must be done with the SYSCLK sourced from | ||
116 | * EXTCLK instead of FOUT to avoid a glitch in the reset | ||
117 | * mechanism. | ||
118 | * | ||
119 | * See the watchdog section of the S3C2412 manual for more | ||
120 | * information on this fix. | ||
121 | */ | ||
122 | |||
123 | __raw_writel(0x00, S3C2412_CLKSRC); | ||
124 | __raw_writel(S3C2412_SWRST_RESET, S3C2412_SWRST); | ||
125 | |||
126 | mdelay(1); | ||
127 | } | ||
128 | |||
100 | /* s3c2412_map_io | 129 | /* s3c2412_map_io |
101 | * | 130 | * |
102 | * register the standard cpu IO areas, and any passed in from the | 131 | * register the standard cpu IO areas, and any passed in from the |
@@ -113,6 +142,10 @@ void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size) | |||
113 | 142 | ||
114 | s3c24xx_idle = s3c2412_idle; | 143 | s3c24xx_idle = s3c2412_idle; |
115 | 144 | ||
145 | /* set custom reset hook */ | ||
146 | |||
147 | s3c24xx_reset_hook = s3c2412_hard_reset; | ||
148 | |||
116 | /* register our io-tables */ | 149 | /* register our io-tables */ |
117 | 150 | ||
118 | iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); | 151 | iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); |