diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-19 05:27:32 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-19 05:28:41 -0400 |
commit | 929bf0d0156562ce631728b6fa53d68004d456d2 (patch) | |
tree | 739063990a8077b29ef97e69d73bce94573daae4 /arch/arm/plat-s3c/include/plat | |
parent | def0a9b2573e00ab0b486cb5382625203ab4c4a6 (diff) | |
parent | 202c4675c55ddf6b443c7e057d2dff6b42ef71aa (diff) |
Merge branch 'linus' into perfcounters/core
Merge reason: Bring in tracing changes we depend on.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/arm/plat-s3c/include/plat')
-rw-r--r-- | arch/arm/plat-s3c/include/plat/adc.h | 8 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/cpu-freq.h | 87 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/cpu.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/devs.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/hwmon.h | 41 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/map-base.h | 8 |
6 files changed, 127 insertions, 21 deletions
diff --git a/arch/arm/plat-s3c/include/plat/adc.h b/arch/arm/plat-s3c/include/plat/adc.h index d847bd476b6c..5f3b1cd53b90 100644 --- a/arch/arm/plat-s3c/include/plat/adc.h +++ b/arch/arm/plat-s3c/include/plat/adc.h | |||
@@ -19,10 +19,14 @@ struct s3c_adc_client; | |||
19 | extern int s3c_adc_start(struct s3c_adc_client *client, | 19 | extern int s3c_adc_start(struct s3c_adc_client *client, |
20 | unsigned int channel, unsigned int nr_samples); | 20 | unsigned int channel, unsigned int nr_samples); |
21 | 21 | ||
22 | extern int s3c_adc_read(struct s3c_adc_client *client, unsigned int ch); | ||
23 | |||
22 | extern struct s3c_adc_client * | 24 | extern struct s3c_adc_client * |
23 | s3c_adc_register(struct platform_device *pdev, | 25 | s3c_adc_register(struct platform_device *pdev, |
24 | void (*select)(unsigned selected), | 26 | void (*select)(struct s3c_adc_client *client, |
25 | void (*conv)(unsigned d0, unsigned d1, | 27 | unsigned selected), |
28 | void (*conv)(struct s3c_adc_client *client, | ||
29 | unsigned d0, unsigned d1, | ||
26 | unsigned *samples_left), | 30 | unsigned *samples_left), |
27 | unsigned int is_ts); | 31 | unsigned int is_ts); |
28 | 32 | ||
diff --git a/arch/arm/plat-s3c/include/plat/cpu-freq.h b/arch/arm/plat-s3c/include/plat/cpu-freq.h index c86a13307e90..7b982b7f28cd 100644 --- a/arch/arm/plat-s3c/include/plat/cpu-freq.h +++ b/arch/arm/plat-s3c/include/plat/cpu-freq.h | |||
@@ -17,6 +17,21 @@ struct s3c_cpufreq_info; | |||
17 | struct s3c_cpufreq_board; | 17 | struct s3c_cpufreq_board; |
18 | struct s3c_iotimings; | 18 | struct s3c_iotimings; |
19 | 19 | ||
20 | /** | ||
21 | * struct s3c_freq - frequency information (mainly for core drivers) | ||
22 | * @fclk: The FCLK frequency in Hz. | ||
23 | * @armclk: The ARMCLK frequency in Hz. | ||
24 | * @hclk_tns: HCLK cycle time in 10ths of nano-seconds. | ||
25 | * @hclk: The HCLK frequency in Hz. | ||
26 | * @pclk: The PCLK frequency in Hz. | ||
27 | * | ||
28 | * This contains the frequency information about the current configuration | ||
29 | * mainly for the core drivers to ensure we do not end up passing about | ||
30 | * a large number of parameters. | ||
31 | * | ||
32 | * The @hclk_tns field is a useful cache for the parts of the drivers that | ||
33 | * need to calculate IO timings and suchlike. | ||
34 | */ | ||
20 | struct s3c_freq { | 35 | struct s3c_freq { |
21 | unsigned long fclk; | 36 | unsigned long fclk; |
22 | unsigned long armclk; | 37 | unsigned long armclk; |
@@ -25,48 +40,84 @@ struct s3c_freq { | |||
25 | unsigned long pclk; | 40 | unsigned long pclk; |
26 | }; | 41 | }; |
27 | 42 | ||
28 | /* wrapper 'struct cpufreq_freqs' so that any drivers receiving the | 43 | /** |
44 | * struct s3c_cpufreq_freqs - s3c cpufreq notification information. | ||
45 | * @freqs: The cpufreq setting information. | ||
46 | * @old: The old clock settings. | ||
47 | * @new: The new clock settings. | ||
48 | * @pll_changing: Set if the PLL is changing. | ||
49 | * | ||
50 | * Wrapper 'struct cpufreq_freqs' so that any drivers receiving the | ||
29 | * notification can use this information that is not provided by just | 51 | * notification can use this information that is not provided by just |
30 | * having the core frequency alone. | 52 | * having the core frequency alone. |
53 | * | ||
54 | * The pll_changing flag is used to indicate if the PLL itself is | ||
55 | * being set during this change. This is important as the clocks | ||
56 | * will temporarily be set to the XTAL clock during this time, so | ||
57 | * drivers may want to close down their output during this time. | ||
58 | * | ||
59 | * Note, this is not being used by any current drivers and therefore | ||
60 | * may be removed in the future. | ||
31 | */ | 61 | */ |
32 | |||
33 | struct s3c_cpufreq_freqs { | 62 | struct s3c_cpufreq_freqs { |
34 | struct cpufreq_freqs freqs; | 63 | struct cpufreq_freqs freqs; |
35 | struct s3c_freq old; | 64 | struct s3c_freq old; |
36 | struct s3c_freq new; | 65 | struct s3c_freq new; |
66 | |||
67 | unsigned int pll_changing:1; | ||
37 | }; | 68 | }; |
38 | 69 | ||
39 | #define to_s3c_cpufreq(_cf) container_of(_cf, struct s3c_cpufreq_freqs, freqs) | 70 | #define to_s3c_cpufreq(_cf) container_of(_cf, struct s3c_cpufreq_freqs, freqs) |
40 | 71 | ||
72 | /** | ||
73 | * struct s3c_clkdivs - clock divisor information | ||
74 | * @p_divisor: Divisor from FCLK to PCLK. | ||
75 | * @h_divisor: Divisor from FCLK to HCLK. | ||
76 | * @arm_divisor: Divisor from FCLK to ARMCLK (not all CPUs). | ||
77 | * @dvs: Non-zero if using DVS mode for ARMCLK. | ||
78 | * | ||
79 | * Divisor settings for the core clocks. | ||
80 | */ | ||
41 | struct s3c_clkdivs { | 81 | struct s3c_clkdivs { |
42 | int p_divisor; /* fclk / pclk */ | 82 | int p_divisor; |
43 | int h_divisor; /* fclk / hclk */ | 83 | int h_divisor; |
44 | int arm_divisor; /* not all cpus have this. */ | 84 | int arm_divisor; |
45 | unsigned char dvs; /* using dvs mode to arm. */ | 85 | unsigned char dvs; |
46 | }; | 86 | }; |
47 | 87 | ||
48 | #define PLLVAL(_m, _p, _s) (((_m) << 12) | ((_p) << 4) | (_s)) | 88 | #define PLLVAL(_m, _p, _s) (((_m) << 12) | ((_p) << 4) | (_s)) |
49 | 89 | ||
90 | /** | ||
91 | * struct s3c_pllval - PLL value entry. | ||
92 | * @freq: The frequency for this entry in Hz. | ||
93 | * @pll_reg: The PLL register setting for this PLL value. | ||
94 | */ | ||
50 | struct s3c_pllval { | 95 | struct s3c_pllval { |
51 | unsigned long freq; | 96 | unsigned long freq; |
52 | unsigned long pll_reg; | 97 | unsigned long pll_reg; |
53 | }; | 98 | }; |
54 | 99 | ||
55 | struct s3c_cpufreq_config { | 100 | /** |
56 | struct s3c_freq freq; | 101 | * struct s3c_cpufreq_board - per-board cpu frequency informatin |
57 | struct s3c_pllval pll; | 102 | * @refresh: The SDRAM refresh period in nanoseconds. |
58 | struct s3c_clkdivs divs; | 103 | * @auto_io: Set if the IO timing settings should be generated from the |
59 | struct s3c_cpufreq_info *info; /* for core, not drivers */ | 104 | * initialisation time hardware registers. |
60 | struct s3c_cpufreq_board *board; | 105 | * @need_io: Set if the board has external IO on any of the chipselect |
61 | }; | 106 | * lines that will require the hardware timing registers to be |
62 | 107 | * updated on a clock change. | |
63 | /* s3c_cpufreq_board | 108 | * @max: The maxium frequency limits for the system. Any field that |
109 | * is left at zero will use the CPU's settings. | ||
110 | * | ||
111 | * This contains the board specific settings that affect how the CPU | ||
112 | * drivers chose settings. These include the memory refresh and IO | ||
113 | * timing information. | ||
64 | * | 114 | * |
65 | * per-board configuraton information, such as memory refresh and | 115 | * Registration depends on the driver being used, the ARMCLK only |
66 | * how to initialise IO timings. | 116 | * implementation does not currently need this but the older style |
117 | * driver requires this to be available. | ||
67 | */ | 118 | */ |
68 | struct s3c_cpufreq_board { | 119 | struct s3c_cpufreq_board { |
69 | unsigned int refresh; /* refresh period in ns */ | 120 | unsigned int refresh; |
70 | unsigned int auto_io:1; /* automatically init io timings. */ | 121 | unsigned int auto_io:1; /* automatically init io timings. */ |
71 | unsigned int need_io:1; /* set if needs io timing support. */ | 122 | unsigned int need_io:1; /* set if needs io timing support. */ |
72 | 123 | ||
diff --git a/arch/arm/plat-s3c/include/plat/cpu.h b/arch/arm/plat-s3c/include/plat/cpu.h index be541cbba070..fbc3d498e02e 100644 --- a/arch/arm/plat-s3c/include/plat/cpu.h +++ b/arch/arm/plat-s3c/include/plat/cpu.h | |||
@@ -65,6 +65,7 @@ extern struct sys_timer s3c24xx_timer; | |||
65 | /* system device classes */ | 65 | /* system device classes */ |
66 | 66 | ||
67 | extern struct sysdev_class s3c2410_sysclass; | 67 | extern struct sysdev_class s3c2410_sysclass; |
68 | extern struct sysdev_class s3c2410a_sysclass; | ||
68 | extern struct sysdev_class s3c2412_sysclass; | 69 | extern struct sysdev_class s3c2412_sysclass; |
69 | extern struct sysdev_class s3c2440_sysclass; | 70 | extern struct sysdev_class s3c2440_sysclass; |
70 | extern struct sysdev_class s3c2442_sysclass; | 71 | extern struct sysdev_class s3c2442_sysclass; |
diff --git a/arch/arm/plat-s3c/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h index 2e170827e0b0..0f540ea1e999 100644 --- a/arch/arm/plat-s3c/include/plat/devs.h +++ b/arch/arm/plat-s3c/include/plat/devs.h | |||
@@ -46,6 +46,8 @@ extern struct platform_device s3c_device_hsmmc2; | |||
46 | extern struct platform_device s3c_device_spi0; | 46 | extern struct platform_device s3c_device_spi0; |
47 | extern struct platform_device s3c_device_spi1; | 47 | extern struct platform_device s3c_device_spi1; |
48 | 48 | ||
49 | extern struct platform_device s3c_device_hwmon; | ||
50 | |||
49 | extern struct platform_device s3c_device_nand; | 51 | extern struct platform_device s3c_device_nand; |
50 | 52 | ||
51 | extern struct platform_device s3c_device_usbgadget; | 53 | extern struct platform_device s3c_device_usbgadget; |
@@ -56,5 +58,6 @@ extern struct platform_device s3c_device_usb_hsotg; | |||
56 | #ifdef CONFIG_CPU_S3C2440 | 58 | #ifdef CONFIG_CPU_S3C2440 |
57 | 59 | ||
58 | extern struct platform_device s3c_device_camif; | 60 | extern struct platform_device s3c_device_camif; |
61 | extern struct platform_device s3c_device_ac97; | ||
59 | 62 | ||
60 | #endif | 63 | #endif |
diff --git a/arch/arm/plat-s3c/include/plat/hwmon.h b/arch/arm/plat-s3c/include/plat/hwmon.h new file mode 100644 index 000000000000..1ba88ea0aa31 --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/hwmon.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* linux/arch/arm/plat-s3c/include/plat/hwmon.h | ||
2 | * | ||
3 | * Copyright 2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C - HWMon interface for ADC | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_ADC_HWMON_H | ||
15 | #define __ASM_ARCH_ADC_HWMON_H __FILE__ | ||
16 | |||
17 | /** | ||
18 | * s3c_hwmon_chcfg - channel configuration | ||
19 | * @name: The name to give this channel. | ||
20 | * @mult: Multiply the ADC value read by this. | ||
21 | * @div: Divide the value from the ADC by this. | ||
22 | * | ||
23 | * The value read from the ADC is converted to a value that | ||
24 | * hwmon expects (mV) by result = (value_read * @mult) / @div. | ||
25 | */ | ||
26 | struct s3c_hwmon_chcfg { | ||
27 | const char *name; | ||
28 | unsigned int mult; | ||
29 | unsigned int div; | ||
30 | }; | ||
31 | |||
32 | /** | ||
33 | * s3c_hwmon_pdata - HWMON platform data | ||
34 | * @in: One configuration for each possible channel used. | ||
35 | */ | ||
36 | struct s3c_hwmon_pdata { | ||
37 | struct s3c_hwmon_chcfg *in[8]; | ||
38 | }; | ||
39 | |||
40 | #endif /* __ASM_ARCH_ADC_HWMON_H */ | ||
41 | |||
diff --git a/arch/arm/plat-s3c/include/plat/map-base.h b/arch/arm/plat-s3c/include/plat/map-base.h index b84289d32a54..250be311c85b 100644 --- a/arch/arm/plat-s3c/include/plat/map-base.h +++ b/arch/arm/plat-s3c/include/plat/map-base.h | |||
@@ -32,9 +32,15 @@ | |||
32 | 32 | ||
33 | #define S3C_VA_IRQ S3C_ADDR(0x00000000) /* irq controller(s) */ | 33 | #define S3C_VA_IRQ S3C_ADDR(0x00000000) /* irq controller(s) */ |
34 | #define S3C_VA_SYS S3C_ADDR(0x00100000) /* system control */ | 34 | #define S3C_VA_SYS S3C_ADDR(0x00100000) /* system control */ |
35 | #define S3C_VA_MEM S3C_ADDR(0x00200000) /* system control */ | 35 | #define S3C_VA_MEM S3C_ADDR(0x00200000) /* memory control */ |
36 | #define S3C_VA_TIMER S3C_ADDR(0x00300000) /* timer block */ | 36 | #define S3C_VA_TIMER S3C_ADDR(0x00300000) /* timer block */ |
37 | #define S3C_VA_WATCHDOG S3C_ADDR(0x00400000) /* watchdog */ | 37 | #define S3C_VA_WATCHDOG S3C_ADDR(0x00400000) /* watchdog */ |
38 | #define S3C_VA_UART S3C_ADDR(0x01000000) /* UART */ | 38 | #define S3C_VA_UART S3C_ADDR(0x01000000) /* UART */ |
39 | 39 | ||
40 | /* This is used for the CPU specific mappings that may be needed, so that | ||
41 | * they do not need to directly used S3C_ADDR() and thus make it easier to | ||
42 | * modify the space for mapping. | ||
43 | */ | ||
44 | #define S3C_ADDR_CPU(x) S3C_ADDR(0x00500000 + (x)) | ||
45 | |||
40 | #endif /* __ASM_PLAT_MAP_H */ | 46 | #endif /* __ASM_PLAT_MAP_H */ |