diff options
author | Ben Dooks <ben@simtec.co.uk> | 2009-07-30 23:23:42 +0100 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-07-30 23:22:56 +0100 |
commit | e6d197a6954c8a9ff85727c31ca61fc1da78628a (patch) | |
tree | 4f83b37f17499111ae9381746b3427996eb75007 /arch/arm/plat-s3c24xx/s3c2410-iotiming.c | |
parent | dfff4e95d749c414af3f7350835139103408a50d (diff) | |
download | kernel_goldelico_gta04-e6d197a6954c8a9ff85727c31ca61fc1da78628a.zip kernel_goldelico_gta04-e6d197a6954c8a9ff85727c31ca61fc1da78628a.tar.gz kernel_goldelico_gta04-e6d197a6954c8a9ff85727c31ca61fc1da78628a.tar.bz2 |
ARM: S3C: CPUFREQ: Add debugfs support for cpufreq
Add debugfs support for the cpufreq driver to allow
information about the system state to be exported to
the user.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c24xx/s3c2410-iotiming.c')
-rw-r--r-- | arch/arm/plat-s3c24xx/s3c2410-iotiming.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c24xx/s3c2410-iotiming.c b/arch/arm/plat-s3c24xx/s3c2410-iotiming.c index 26fe212..d0a3a14 100644 --- a/arch/arm/plat-s3c24xx/s3c2410-iotiming.c +++ b/arch/arm/plat-s3c24xx/s3c2410-iotiming.c @@ -15,6 +15,7 @@ #include <linux/kernel.h> #include <linux/errno.h> #include <linux/cpufreq.h> +#include <linux/seq_file.h> #include <linux/io.h> #include <mach/map.h> @@ -304,6 +305,50 @@ void s3c2410_iotiming_getbank(struct s3c_cpufreq_config *cfg, } /** + * s3c2410_iotiming_debugfs - debugfs show io bank timing information + * @seq: The seq_file to write output to using seq_printf(). + * @cfg: The current configuration. + * @iob: The IO bank information to decode. + */ +void s3c2410_iotiming_debugfs(struct seq_file *seq, + struct s3c_cpufreq_config *cfg, + union s3c_iobank *iob) +{ + struct s3c2410_iobank_timing *bt = iob->io_2410; + unsigned long bankcon = bt->bankcon; + unsigned long hclk = cfg->freq.hclk_tns; + unsigned int tacs; + unsigned int tcos; + unsigned int tacc; + unsigned int tcoh; + unsigned int tcah; + + seq_printf(seq, "BANKCON=0x%08lx\n", bankcon); + + tcah = get_0124(hclk, bankcon >> S3C2410_BANKCON_Tcah_SHIFT); + tcoh = get_0124(hclk, bankcon >> S3C2410_BANKCON_Tcoh_SHIFT); + tcos = get_0124(hclk, bankcon >> S3C2410_BANKCON_Tcos_SHIFT); + tacs = get_0124(hclk, bankcon >> S3C2410_BANKCON_Tacs_SHIFT); + tacc = get_tacc(hclk, bankcon >> S3C2410_BANKCON_Tacc_SHIFT); + + seq_printf(seq, + "\tRead: Tacs=%d.%d, Tcos=%d.%d, Tacc=%d.%d, Tcoh=%d.%d, Tcah=%d.%d\n", + print_ns(bt->tacs), + print_ns(bt->tcos), + print_ns(bt->tacc), + print_ns(bt->tcoh), + print_ns(bt->tcah)); + + seq_printf(seq, + "\t Set: Tacs=%d.%d, Tcos=%d.%d, Tacc=%d.%d, Tcoh=%d.%d, Tcah=%d.%d\n", + print_ns(tacs), + print_ns(tcos), + print_ns(tacc), + print_ns(tcoh), + print_ns(tcah)); +} + +/** * s3c2410_iotiming_calc - Calculate bank timing for frequency change. * @cfg: The frequency configuration * @iot: The IO timing information to fill out. |