diff options
Diffstat (limited to 'arch/arm/mach-s3c2410/devs.c')
-rw-r--r-- | arch/arm/mach-s3c2410/devs.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c index 0077937a7ab8..08bc7d95a45d 100644 --- a/arch/arm/mach-s3c2410/devs.c +++ b/arch/arm/mach-s3c2410/devs.c | |||
@@ -47,7 +47,7 @@ struct platform_device *s3c24xx_uart_devs[3]; | |||
47 | static struct resource s3c_usb_resource[] = { | 47 | static struct resource s3c_usb_resource[] = { |
48 | [0] = { | 48 | [0] = { |
49 | .start = S3C2410_PA_USBHOST, | 49 | .start = S3C2410_PA_USBHOST, |
50 | .end = S3C2410_PA_USBHOST + S3C24XX_SZ_USBHOST, | 50 | .end = S3C2410_PA_USBHOST + S3C24XX_SZ_USBHOST - 1, |
51 | .flags = IORESOURCE_MEM, | 51 | .flags = IORESOURCE_MEM, |
52 | }, | 52 | }, |
53 | [1] = { | 53 | [1] = { |
@@ -77,7 +77,7 @@ EXPORT_SYMBOL(s3c_device_usb); | |||
77 | static struct resource s3c_lcd_resource[] = { | 77 | static struct resource s3c_lcd_resource[] = { |
78 | [0] = { | 78 | [0] = { |
79 | .start = S3C2410_PA_LCD, | 79 | .start = S3C2410_PA_LCD, |
80 | .end = S3C2410_PA_LCD + S3C24XX_SZ_LCD, | 80 | .end = S3C2410_PA_LCD + S3C24XX_SZ_LCD - 1, |
81 | .flags = IORESOURCE_MEM, | 81 | .flags = IORESOURCE_MEM, |
82 | }, | 82 | }, |
83 | [1] = { | 83 | [1] = { |
@@ -103,21 +103,25 @@ struct platform_device s3c_device_lcd = { | |||
103 | 103 | ||
104 | EXPORT_SYMBOL(s3c_device_lcd); | 104 | EXPORT_SYMBOL(s3c_device_lcd); |
105 | 105 | ||
106 | static struct s3c2410fb_mach_info s3c2410fb_info; | 106 | void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) |
107 | |||
108 | void __init set_s3c2410fb_info(struct s3c2410fb_mach_info *hard_s3c2410fb_info) | ||
109 | { | 107 | { |
110 | memcpy(&s3c2410fb_info,hard_s3c2410fb_info,sizeof(struct s3c2410fb_mach_info)); | 108 | struct s3c2410fb_mach_info *npd; |
111 | s3c_device_lcd.dev.platform_data = &s3c2410fb_info; | 109 | |
110 | npd = kmalloc(sizeof(*npd), GFP_KERNEL); | ||
111 | if (npd) { | ||
112 | memcpy(npd, pd, sizeof(*npd)); | ||
113 | s3c_device_lcd.dev.platform_data = npd; | ||
114 | } else { | ||
115 | printk(KERN_ERR "no memory for LCD platform data\n"); | ||
116 | } | ||
112 | } | 117 | } |
113 | EXPORT_SYMBOL(set_s3c2410fb_info); | ||
114 | 118 | ||
115 | /* NAND Controller */ | 119 | /* NAND Controller */ |
116 | 120 | ||
117 | static struct resource s3c_nand_resource[] = { | 121 | static struct resource s3c_nand_resource[] = { |
118 | [0] = { | 122 | [0] = { |
119 | .start = S3C2410_PA_NAND, | 123 | .start = S3C2410_PA_NAND, |
120 | .end = S3C2410_PA_NAND + S3C24XX_SZ_NAND, | 124 | .end = S3C2410_PA_NAND + S3C24XX_SZ_NAND - 1, |
121 | .flags = IORESOURCE_MEM, | 125 | .flags = IORESOURCE_MEM, |
122 | } | 126 | } |
123 | }; | 127 | }; |
@@ -136,7 +140,7 @@ EXPORT_SYMBOL(s3c_device_nand); | |||
136 | static struct resource s3c_usbgadget_resource[] = { | 140 | static struct resource s3c_usbgadget_resource[] = { |
137 | [0] = { | 141 | [0] = { |
138 | .start = S3C2410_PA_USBDEV, | 142 | .start = S3C2410_PA_USBDEV, |
139 | .end = S3C2410_PA_USBDEV + S3C24XX_SZ_USBDEV, | 143 | .end = S3C2410_PA_USBDEV + S3C24XX_SZ_USBDEV - 1, |
140 | .flags = IORESOURCE_MEM, | 144 | .flags = IORESOURCE_MEM, |
141 | }, | 145 | }, |
142 | [1] = { | 146 | [1] = { |
@@ -161,7 +165,7 @@ EXPORT_SYMBOL(s3c_device_usbgadget); | |||
161 | static struct resource s3c_wdt_resource[] = { | 165 | static struct resource s3c_wdt_resource[] = { |
162 | [0] = { | 166 | [0] = { |
163 | .start = S3C2410_PA_WATCHDOG, | 167 | .start = S3C2410_PA_WATCHDOG, |
164 | .end = S3C2410_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG, | 168 | .end = S3C2410_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1, |
165 | .flags = IORESOURCE_MEM, | 169 | .flags = IORESOURCE_MEM, |
166 | }, | 170 | }, |
167 | [1] = { | 171 | [1] = { |
@@ -186,7 +190,7 @@ EXPORT_SYMBOL(s3c_device_wdt); | |||
186 | static struct resource s3c_i2c_resource[] = { | 190 | static struct resource s3c_i2c_resource[] = { |
187 | [0] = { | 191 | [0] = { |
188 | .start = S3C2410_PA_IIC, | 192 | .start = S3C2410_PA_IIC, |
189 | .end = S3C2410_PA_IIC + S3C24XX_SZ_IIC, | 193 | .end = S3C2410_PA_IIC + S3C24XX_SZ_IIC - 1, |
190 | .flags = IORESOURCE_MEM, | 194 | .flags = IORESOURCE_MEM, |
191 | }, | 195 | }, |
192 | [1] = { | 196 | [1] = { |
@@ -211,7 +215,7 @@ EXPORT_SYMBOL(s3c_device_i2c); | |||
211 | static struct resource s3c_iis_resource[] = { | 215 | static struct resource s3c_iis_resource[] = { |
212 | [0] = { | 216 | [0] = { |
213 | .start = S3C2410_PA_IIS, | 217 | .start = S3C2410_PA_IIS, |
214 | .end = S3C2410_PA_IIS + S3C24XX_SZ_IIS, | 218 | .end = S3C2410_PA_IIS + S3C24XX_SZ_IIS -1, |
215 | .flags = IORESOURCE_MEM, | 219 | .flags = IORESOURCE_MEM, |
216 | } | 220 | } |
217 | }; | 221 | }; |
@@ -265,7 +269,7 @@ EXPORT_SYMBOL(s3c_device_rtc); | |||
265 | static struct resource s3c_adc_resource[] = { | 269 | static struct resource s3c_adc_resource[] = { |
266 | [0] = { | 270 | [0] = { |
267 | .start = S3C2410_PA_ADC, | 271 | .start = S3C2410_PA_ADC, |
268 | .end = S3C2410_PA_ADC + S3C24XX_SZ_ADC, | 272 | .end = S3C2410_PA_ADC + S3C24XX_SZ_ADC - 1, |
269 | .flags = IORESOURCE_MEM, | 273 | .flags = IORESOURCE_MEM, |
270 | }, | 274 | }, |
271 | [1] = { | 275 | [1] = { |
@@ -288,7 +292,7 @@ struct platform_device s3c_device_adc = { | |||
288 | static struct resource s3c_sdi_resource[] = { | 292 | static struct resource s3c_sdi_resource[] = { |
289 | [0] = { | 293 | [0] = { |
290 | .start = S3C2410_PA_SDI, | 294 | .start = S3C2410_PA_SDI, |
291 | .end = S3C2410_PA_SDI + S3C24XX_SZ_SDI, | 295 | .end = S3C2410_PA_SDI + S3C24XX_SZ_SDI - 1, |
292 | .flags = IORESOURCE_MEM, | 296 | .flags = IORESOURCE_MEM, |
293 | }, | 297 | }, |
294 | [1] = { | 298 | [1] = { |
@@ -465,7 +469,7 @@ EXPORT_SYMBOL(s3c_device_timer3); | |||
465 | static struct resource s3c_camif_resource[] = { | 469 | static struct resource s3c_camif_resource[] = { |
466 | [0] = { | 470 | [0] = { |
467 | .start = S3C2440_PA_CAMIF, | 471 | .start = S3C2440_PA_CAMIF, |
468 | .end = S3C2440_PA_CAMIF + S3C2440_SZ_CAMIF, | 472 | .end = S3C2440_PA_CAMIF + S3C2440_SZ_CAMIF - 1, |
469 | .flags = IORESOURCE_MEM, | 473 | .flags = IORESOURCE_MEM, |
470 | }, | 474 | }, |
471 | [1] = { | 475 | [1] = { |