aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2440/mach-osiris.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c2440/mach-osiris.c')
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c47
1 files changed, 40 insertions, 7 deletions
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c
index 2105a41281a4..015dfb2a80da 100644
--- a/arch/arm/mach-s3c2440/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -1,6 +1,6 @@
1/* linux/arch/arm/mach-s3c2440/mach-osiris.c 1/* linux/arch/arm/mach-s3c2440/mach-osiris.c
2 * 2 *
3 * Copyright (c) 2005,2008 Simtec Electronics 3 * Copyright (c) 2005-2008 Simtec Electronics
4 * http://armlinux.simtec.co.uk/ 4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk> 5 * Ben Dooks <ben@simtec.co.uk>
6 * 6 *
@@ -23,6 +23,8 @@
23#include <linux/i2c.h> 23#include <linux/i2c.h>
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <linux/i2c/tps65010.h>
27
26#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 29#include <asm/mach/map.h>
28#include <asm/mach/irq.h> 30#include <asm/mach/irq.h>
@@ -148,7 +150,7 @@ static int external_map[] = { 2 };
148static int chip0_map[] = { 0 }; 150static int chip0_map[] = { 0 };
149static int chip1_map[] = { 1 }; 151static int chip1_map[] = { 1 };
150 152
151static struct mtd_partition osiris_default_nand_part[] = { 153static struct mtd_partition __initdata osiris_default_nand_part[] = {
152 [0] = { 154 [0] = {
153 .name = "Boot Agent", 155 .name = "Boot Agent",
154 .size = SZ_16K, 156 .size = SZ_16K,
@@ -171,7 +173,7 @@ static struct mtd_partition osiris_default_nand_part[] = {
171 } 173 }
172}; 174};
173 175
174static struct mtd_partition osiris_default_nand_part_large[] = { 176static struct mtd_partition __initdata osiris_default_nand_part_large[] = {
175 [0] = { 177 [0] = {
176 .name = "Boot Agent", 178 .name = "Boot Agent",
177 .size = SZ_128K, 179 .size = SZ_128K,
@@ -201,7 +203,7 @@ static struct mtd_partition osiris_default_nand_part_large[] = {
201 * socket. 203 * socket.
202*/ 204*/
203 205
204static struct s3c2410_nand_set osiris_nand_sets[] = { 206static struct s3c2410_nand_set __initdata osiris_nand_sets[] = {
205 [1] = { 207 [1] = {
206 .name = "External", 208 .name = "External",
207 .nr_chips = 1, 209 .nr_chips = 1,
@@ -243,7 +245,7 @@ static void osiris_nand_select(struct s3c2410_nand_set *set, int slot)
243 __raw_writeb(tmp, OSIRIS_VA_CTRL0); 245 __raw_writeb(tmp, OSIRIS_VA_CTRL0);
244} 246}
245 247
246static struct s3c2410_platform_nand osiris_nand_info = { 248static struct s3c2410_platform_nand __initdata osiris_nand_info = {
247 .tacls = 25, 249 .tacls = 25,
248 .twrph0 = 60, 250 .twrph0 = 60,
249 .twrph1 = 60, 251 .twrph1 = 60,
@@ -326,12 +328,44 @@ static struct sys_device osiris_pm_sysdev = {
326 .cls = &osiris_pm_sysclass, 328 .cls = &osiris_pm_sysclass,
327}; 329};
328 330
331/* Link for DVS driver to TPS65011 */
332
333static void osiris_tps_release(struct device *dev)
334{
335 /* static device, do not need to release anything */
336}
337
338static struct platform_device osiris_tps_device = {
339 .name = "osiris-dvs",
340 .id = -1,
341 .dev.release = osiris_tps_release,
342};
343
344static int osiris_tps_setup(struct i2c_client *client, void *context)
345{
346 osiris_tps_device.dev.parent = &client->dev;
347 return platform_device_register(&osiris_tps_device);
348}
349
350static int osiris_tps_remove(struct i2c_client *client, void *context)
351{
352 platform_device_unregister(&osiris_tps_device);
353 return 0;
354}
355
356static struct tps65010_board osiris_tps_board = {
357 .base = -1, /* GPIO can go anywhere at the moment */
358 .setup = osiris_tps_setup,
359 .teardown = osiris_tps_remove,
360};
361
329/* I2C devices fitted. */ 362/* I2C devices fitted. */
330 363
331static struct i2c_board_info osiris_i2c_devs[] __initdata = { 364static struct i2c_board_info osiris_i2c_devs[] __initdata = {
332 { 365 {
333 I2C_BOARD_INFO("tps65011", 0x48), 366 I2C_BOARD_INFO("tps65011", 0x48),
334 .irq = IRQ_EINT20, 367 .irq = IRQ_EINT20,
368 .platform_data = &osiris_tps_board,
335 }, 369 },
336}; 370};
337 371
@@ -377,8 +411,6 @@ static void __init osiris_map_io(void)
377 411
378 s3c24xx_register_clocks(osiris_clocks, ARRAY_SIZE(osiris_clocks)); 412 s3c24xx_register_clocks(osiris_clocks, ARRAY_SIZE(osiris_clocks));
379 413
380 s3c_device_nand.dev.platform_data = &osiris_nand_info;
381
382 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc)); 414 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc));
383 s3c24xx_init_clocks(0); 415 s3c24xx_init_clocks(0);
384 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); 416 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs));
@@ -408,6 +440,7 @@ static void __init osiris_init(void)
408 sysdev_register(&osiris_pm_sysdev); 440 sysdev_register(&osiris_pm_sysdev);
409 441
410 s3c_i2c0_set_platdata(NULL); 442 s3c_i2c0_set_platdata(NULL);
443 s3c_nand_set_platdata(&osiris_nand_info);
411 444
412 s3c_cpufreq_setboard(&osiris_cpufreq); 445 s3c_cpufreq_setboard(&osiris_cpufreq);
413 446