aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410/mach-bast.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c2410/mach-bast.c')
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index ce3baba2cd7f..647c9adb018f 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -45,6 +45,7 @@
45#include <mach/regs-mem.h> 45#include <mach/regs-mem.h>
46#include <mach/regs-lcd.h> 46#include <mach/regs-lcd.h>
47 47
48#include <plat/hwmon.h>
48#include <plat/nand.h> 49#include <plat/nand.h>
49#include <plat/iic.h> 50#include <plat/iic.h>
50#include <mach/fb.h> 51#include <mach/fb.h>
@@ -59,6 +60,7 @@
59#include <plat/clock.h> 60#include <plat/clock.h>
60#include <plat/devs.h> 61#include <plat/devs.h>
61#include <plat/cpu.h> 62#include <plat/cpu.h>
63#include <plat/cpu-freq.h>
62 64
63#include "usb-simtec.h" 65#include "usb-simtec.h"
64#include "nor-simtec.h" 66#include "nor-simtec.h"
@@ -547,7 +549,35 @@ static struct i2c_board_info bast_i2c_devs[] __initdata = {
547 }, 549 },
548}; 550};
549 551
552static struct s3c_hwmon_pdata bast_hwmon_info = {
553 /* LCD contrast (0-6.6V) */
554 .in[0] = &(struct s3c_hwmon_chcfg) {
555 .name = "lcd-contrast",
556 .mult = 3300,
557 .div = 512,
558 },
559 /* LED current feedback */
560 .in[1] = &(struct s3c_hwmon_chcfg) {
561 .name = "led-feedback",
562 .mult = 3300,
563 .div = 1024,
564 },
565 /* LCD feedback (0-6.6V) */
566 .in[2] = &(struct s3c_hwmon_chcfg) {
567 .name = "lcd-feedback",
568 .mult = 3300,
569 .div = 512,
570 },
571 /* Vcore (1.8-2.0V), Vref 3.3V */
572 .in[3] = &(struct s3c_hwmon_chcfg) {
573 .name = "vcore",
574 .mult = 3300,
575 .div = 1024,
576 },
577};
578
550/* Standard BAST devices */ 579/* Standard BAST devices */
580// cat /sys/devices/platform/s3c24xx-adc/s3c-hwmon/in_0
551 581
552static struct platform_device *bast_devices[] __initdata = { 582static struct platform_device *bast_devices[] __initdata = {
553 &s3c_device_usb, 583 &s3c_device_usb,
@@ -556,6 +586,8 @@ static struct platform_device *bast_devices[] __initdata = {
556 &s3c_device_i2c0, 586 &s3c_device_i2c0,
557 &s3c_device_rtc, 587 &s3c_device_rtc,
558 &s3c_device_nand, 588 &s3c_device_nand,
589 &s3c_device_adc,
590 &s3c_device_hwmon,
559 &bast_device_dm9k, 591 &bast_device_dm9k,
560 &bast_device_asix, 592 &bast_device_asix,
561 &bast_device_axpp, 593 &bast_device_axpp,
@@ -570,6 +602,12 @@ static struct clk *bast_clocks[] __initdata = {
570 &s3c24xx_uclk, 602 &s3c24xx_uclk,
571}; 603};
572 604
605static struct s3c_cpufreq_board __initdata bast_cpufreq = {
606 .refresh = 7800, /* 7.8usec */
607 .auto_io = 1,
608 .need_io = 1,
609};
610
573static void __init bast_map_io(void) 611static void __init bast_map_io(void)
574{ 612{
575 /* initialise the clocks */ 613 /* initialise the clocks */
@@ -588,6 +626,7 @@ static void __init bast_map_io(void)
588 s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks)); 626 s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks));
589 627
590 s3c_device_nand.dev.platform_data = &bast_nand_info; 628 s3c_device_nand.dev.platform_data = &bast_nand_info;
629 s3c_device_hwmon.dev.platform_data = &bast_hwmon_info;
591 630
592 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); 631 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
593 s3c24xx_init_clocks(0); 632 s3c24xx_init_clocks(0);
@@ -608,6 +647,8 @@ static void __init bast_init(void)
608 647
609 usb_simtec_init(); 648 usb_simtec_init();
610 nor_simtec_init(); 649 nor_simtec_init();
650
651 s3c_cpufreq_setboard(&bast_cpufreq);
611} 652}
612 653
613MACHINE_START(BAST, "Simtec-BAST") 654MACHINE_START(BAST, "Simtec-BAST")