diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-02-23 00:09:34 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-02-24 19:45:14 -0500 |
commit | 43b40992ce21def8d5957f32d7ddb728af89bfce (patch) | |
tree | 2e6f25d2d3d5cfbea42564d25cd887279ee8ab00 /arch/arm/mach-omap2/omap_hwmod_common_data.c | |
parent | 7359154e94623f6a5a68a77b9fcfbef40633c93f (diff) |
OMAP hwmod: add hwmod class support
Add support for categorizing and iterating over hardware IP blocks by
the "class" of the IP block. The class is the type of the IP block:
e.g., "timer", "timer1ms", etc. Move the OCP_SYSCONFIG/SYSSTATUS data
from the struct omap_hwmod into the struct omap_hwmod_class, since
it's expected to stay consistent for each class. While here, fix some
comments.
The hwmod_class structures in this patch were designed and proposed by
Benoît Cousson <b-cousson@ti.com> and were refined in a discussion
between Thara Gopinath <thara@ti.com>, Kevin Hilman
<khilman@deeprootsystems.com>, and myself.
This patch uses WARN() lines that are longer than 80 characters, as
Kevin noted a broader lkml consensus to increase greppability by
keeping the messages all on one line.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Benoît Cousson <b-cousson@ti.com>
Cc: Thara Gopinath <thara@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod_common_data.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_common_data.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.c b/arch/arm/mach-omap2/omap_hwmod_common_data.c index 2567c6edc6af..1e80b914fa1a 100644 --- a/arch/arm/mach-omap2/omap_hwmod_common_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_common_data.c | |||
@@ -3,6 +3,10 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2010 Texas Instruments, Inc. |
5 | * Thara Gopinath <thara@ti.com> | 5 | * Thara Gopinath <thara@ti.com> |
6 | * Benoît Cousson | ||
7 | * | ||
8 | * Copyright (C) 2010 Nokia Corporation | ||
9 | * Paul Walmsley | ||
6 | * | 10 | * |
7 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
@@ -14,6 +18,8 @@ | |||
14 | 18 | ||
15 | #include <plat/omap_hwmod.h> | 19 | #include <plat/omap_hwmod.h> |
16 | 20 | ||
21 | #include "omap_hwmod_common_data.h" | ||
22 | |||
17 | /** | 23 | /** |
18 | * struct omap_hwmod_sysc_type1 - TYPE1 sysconfig scheme. | 24 | * struct omap_hwmod_sysc_type1 - TYPE1 sysconfig scheme. |
19 | * | 25 | * |
@@ -42,3 +48,21 @@ struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2 = { | |||
42 | .sidle_shift = SYSC_TYPE2_SIDLEMODE_SHIFT, | 48 | .sidle_shift = SYSC_TYPE2_SIDLEMODE_SHIFT, |
43 | .srst_shift = SYSC_TYPE2_SOFTRESET_SHIFT, | 49 | .srst_shift = SYSC_TYPE2_SOFTRESET_SHIFT, |
44 | }; | 50 | }; |
51 | |||
52 | |||
53 | /* | ||
54 | * omap_hwmod class data | ||
55 | */ | ||
56 | |||
57 | struct omap_hwmod_class l3_hwmod_class = { | ||
58 | .name = "l3" | ||
59 | }; | ||
60 | |||
61 | struct omap_hwmod_class l4_hwmod_class = { | ||
62 | .name = "l4" | ||
63 | }; | ||
64 | |||
65 | struct omap_hwmod_class mpu_hwmod_class = { | ||
66 | .name = "mpu" | ||
67 | }; | ||
68 | |||