diff options
| -rw-r--r-- | arch/arm/mach-omap2/pmu.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c index cf68bab4fde1..af35c77c4ab4 100644 --- a/arch/arm/mach-omap2/pmu.c +++ b/arch/arm/mach-omap2/pmu.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | static char *omap2_pmu_oh_names[] = {"mpu"}; | 20 | static char *omap2_pmu_oh_names[] = {"mpu"}; |
| 21 | static char *omap3_pmu_oh_names[] = {"mpu", "debugss"}; | 21 | static char *omap3_pmu_oh_names[] = {"mpu", "debugss"}; |
| 22 | static char *omap4430_pmu_oh_names[] = {"l3_main_3", "l3_instr", "debugss"}; | ||
| 22 | static struct platform_device *omap_pmu_dev; | 23 | static struct platform_device *omap_pmu_dev; |
| 23 | 24 | ||
| 24 | /** | 25 | /** |
| @@ -27,16 +28,16 @@ static struct platform_device *omap_pmu_dev; | |||
| 27 | * @oh_names: Array of OMAP HWMODS names required to create PMU device | 28 | * @oh_names: Array of OMAP HWMODS names required to create PMU device |
| 28 | * | 29 | * |
| 29 | * Uses OMAP HWMOD framework to create and register an ARM PMU device | 30 | * Uses OMAP HWMOD framework to create and register an ARM PMU device |
| 30 | * from a list of HWMOD names passed. Currently supports OMAP2 and | 31 | * from a list of HWMOD names passed. Currently supports OMAP2, OMAP3 |
| 31 | * OMAP3 devices. | 32 | * and OMAP4430 devices. |
| 32 | */ | 33 | */ |
| 33 | static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[]) | 34 | static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[]) |
| 34 | { | 35 | { |
| 35 | int i; | 36 | int i; |
| 36 | struct omap_hwmod *oh[2]; | 37 | struct omap_hwmod *oh[3]; |
| 37 | char *dev_name = "arm-pmu"; | 38 | char *dev_name = "arm-pmu"; |
| 38 | 39 | ||
| 39 | if ((!oh_num) || (oh_num > 2)) | 40 | if ((!oh_num) || (oh_num > 3)) |
| 40 | return -EINVAL; | 41 | return -EINVAL; |
| 41 | 42 | ||
| 42 | for (i = 0; i < oh_num; i++) { | 43 | for (i = 0; i < oh_num; i++) { |
| @@ -66,6 +67,7 @@ static int __init omap_init_pmu(void) | |||
| 66 | * | 67 | * |
| 67 | * OMAP24xx: mpu | 68 | * OMAP24xx: mpu |
| 68 | * OMAP3xxx: mpu, debugss | 69 | * OMAP3xxx: mpu, debugss |
| 70 | * OMAP4430: l3_main_3, l3_instr, debugss | ||
| 69 | */ | 71 | */ |
| 70 | if (cpu_is_omap24xx()) { | 72 | if (cpu_is_omap24xx()) { |
| 71 | oh_num = ARRAY_SIZE(omap2_pmu_oh_names); | 73 | oh_num = ARRAY_SIZE(omap2_pmu_oh_names); |
| @@ -73,6 +75,12 @@ static int __init omap_init_pmu(void) | |||
| 73 | } else if (cpu_is_omap34xx()) { | 75 | } else if (cpu_is_omap34xx()) { |
| 74 | oh_num = ARRAY_SIZE(omap3_pmu_oh_names); | 76 | oh_num = ARRAY_SIZE(omap3_pmu_oh_names); |
| 75 | oh_names = omap3_pmu_oh_names; | 77 | oh_names = omap3_pmu_oh_names; |
| 78 | } else if (cpu_is_omap443x()) { | ||
| 79 | oh_num = ARRAY_SIZE(omap4430_pmu_oh_names); | ||
| 80 | oh_names = omap4430_pmu_oh_names; | ||
| 81 | /* XXX Remove the next two lines when CTI driver available */ | ||
| 82 | pr_info("ARM PMU: not yet supported on OMAP4430 due to missing CTI driver\n"); | ||
| 83 | return 0; | ||
| 76 | } else { | 84 | } else { |
| 77 | return 0; | 85 | return 0; |
| 78 | } | 86 | } |
