diff options
author | Paul Walmsley <paul@pwsan.com> | 2012-09-23 19:28:23 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2012-09-23 19:28:23 -0400 |
commit | 5486474cff36517fa1c8d62573d4f7b504817e98 (patch) | |
tree | db3ac3fc02d2e30b6cbad4480ed9a26414dbc721 /arch/arm/mach-omap2 | |
parent | 7460f1407ed8d46042b81a4227f19bc03e4d1072 (diff) |
ARM: OMAP3: hwmod data: add mmu data for iva and isp
Add mmu hwmod data for iva and isp.
Due to compatibility an ifdef CONFIG_OMAP_IOMMU_IVA2 needs to be
propagated (previously on iommu resource info) to hwmod data in OMAP3,
so users of iommu and tidspbridge can avoid issues of two modules
managing mmu data/irqs/resets; this until tidspbridge can be migrated
to iommu framework.
Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>
[paul@pwsan.com: fixed some kerneldoc and whitespace; ISP MMUs not present
on AM35xx so restricted these hwmods to 34xx/36xx]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index f1328bce5f3c..11442d84dacd 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <plat/mcbsp.h> | 27 | #include <plat/mcbsp.h> |
28 | #include <plat/mcspi.h> | 28 | #include <plat/mcspi.h> |
29 | #include <plat/dmtimer.h> | 29 | #include <plat/dmtimer.h> |
30 | #include <plat/iommu.h> | ||
30 | 31 | ||
31 | #include <mach/am35xx.h> | 32 | #include <mach/am35xx.h> |
32 | 33 | ||
@@ -2858,6 +2859,122 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = { | |||
2858 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2859 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2859 | }; | 2860 | }; |
2860 | 2861 | ||
2862 | /* | ||
2863 | * 'mmu' class | ||
2864 | * The memory management unit performs virtual to physical address translation | ||
2865 | * for its requestors. | ||
2866 | */ | ||
2867 | |||
2868 | static struct omap_hwmod_class_sysconfig mmu_sysc = { | ||
2869 | .rev_offs = 0x000, | ||
2870 | .sysc_offs = 0x010, | ||
2871 | .syss_offs = 0x014, | ||
2872 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
2873 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
2874 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
2875 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2876 | }; | ||
2877 | |||
2878 | static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = { | ||
2879 | .name = "mmu", | ||
2880 | .sysc = &mmu_sysc, | ||
2881 | }; | ||
2882 | |||
2883 | /* mmu isp */ | ||
2884 | |||
2885 | static struct omap_mmu_dev_attr mmu_isp_dev_attr = { | ||
2886 | .da_start = 0x0, | ||
2887 | .da_end = 0xfffff000, | ||
2888 | .nr_tlb_entries = 8, | ||
2889 | }; | ||
2890 | |||
2891 | static struct omap_hwmod omap3xxx_mmu_isp_hwmod; | ||
2892 | static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = { | ||
2893 | { .irq = 24 }, | ||
2894 | { .irq = -1 } | ||
2895 | }; | ||
2896 | |||
2897 | static struct omap_hwmod_addr_space omap3xxx_mmu_isp_addrs[] = { | ||
2898 | { | ||
2899 | .pa_start = 0x480bd400, | ||
2900 | .pa_end = 0x480bd47f, | ||
2901 | .flags = ADDR_TYPE_RT, | ||
2902 | }, | ||
2903 | { } | ||
2904 | }; | ||
2905 | |||
2906 | /* l4_core -> mmu isp */ | ||
2907 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = { | ||
2908 | .master = &omap3xxx_l4_core_hwmod, | ||
2909 | .slave = &omap3xxx_mmu_isp_hwmod, | ||
2910 | .addr = omap3xxx_mmu_isp_addrs, | ||
2911 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2912 | }; | ||
2913 | |||
2914 | static struct omap_hwmod omap3xxx_mmu_isp_hwmod = { | ||
2915 | .name = "mmu_isp", | ||
2916 | .class = &omap3xxx_mmu_hwmod_class, | ||
2917 | .mpu_irqs = omap3xxx_mmu_isp_irqs, | ||
2918 | .main_clk = "cam_ick", | ||
2919 | .dev_attr = &mmu_isp_dev_attr, | ||
2920 | .flags = HWMOD_NO_IDLEST, | ||
2921 | }; | ||
2922 | |||
2923 | #ifdef CONFIG_OMAP_IOMMU_IVA2 | ||
2924 | |||
2925 | /* mmu iva */ | ||
2926 | |||
2927 | static struct omap_mmu_dev_attr mmu_iva_dev_attr = { | ||
2928 | .da_start = 0x11000000, | ||
2929 | .da_end = 0xfffff000, | ||
2930 | .nr_tlb_entries = 32, | ||
2931 | }; | ||
2932 | |||
2933 | static struct omap_hwmod omap3xxx_mmu_iva_hwmod; | ||
2934 | static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = { | ||
2935 | { .irq = 28 }, | ||
2936 | { .irq = -1 } | ||
2937 | }; | ||
2938 | |||
2939 | static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = { | ||
2940 | { .name = "mmu", .rst_shift = 1, .st_shift = 9 }, | ||
2941 | }; | ||
2942 | |||
2943 | static struct omap_hwmod_addr_space omap3xxx_mmu_iva_addrs[] = { | ||
2944 | { | ||
2945 | .pa_start = 0x5d000000, | ||
2946 | .pa_end = 0x5d00007f, | ||
2947 | .flags = ADDR_TYPE_RT, | ||
2948 | }, | ||
2949 | { } | ||
2950 | }; | ||
2951 | |||
2952 | /* l3_main -> iva mmu */ | ||
2953 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = { | ||
2954 | .master = &omap3xxx_l3_main_hwmod, | ||
2955 | .slave = &omap3xxx_mmu_iva_hwmod, | ||
2956 | .addr = omap3xxx_mmu_iva_addrs, | ||
2957 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2958 | }; | ||
2959 | |||
2960 | static struct omap_hwmod omap3xxx_mmu_iva_hwmod = { | ||
2961 | .name = "mmu_iva", | ||
2962 | .class = &omap3xxx_mmu_hwmod_class, | ||
2963 | .mpu_irqs = omap3xxx_mmu_iva_irqs, | ||
2964 | .rst_lines = omap3xxx_mmu_iva_resets, | ||
2965 | .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets), | ||
2966 | .main_clk = "iva2_ck", | ||
2967 | .prcm = { | ||
2968 | .omap2 = { | ||
2969 | .module_offs = OMAP3430_IVA2_MOD, | ||
2970 | }, | ||
2971 | }, | ||
2972 | .dev_attr = &mmu_iva_dev_attr, | ||
2973 | .flags = HWMOD_NO_IDLEST, | ||
2974 | }; | ||
2975 | |||
2976 | #endif | ||
2977 | |||
2861 | /* l4_per -> gpio4 */ | 2978 | /* l4_per -> gpio4 */ |
2862 | static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = { | 2979 | static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = { |
2863 | { | 2980 | { |
@@ -3407,6 +3524,10 @@ static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = { | |||
3407 | &omap3xxx_l4_core__mailbox, | 3524 | &omap3xxx_l4_core__mailbox, |
3408 | &omap3xxx_l4_core__hdq1w, | 3525 | &omap3xxx_l4_core__hdq1w, |
3409 | &omap3xxx_sad2d__l3, | 3526 | &omap3xxx_sad2d__l3, |
3527 | &omap3xxx_l4_core__mmu_isp, | ||
3528 | #ifdef CONFIG_OMAP_IOMMU_IVA2 | ||
3529 | &omap3xxx_l3_main__mmu_iva, | ||
3530 | #endif | ||
3410 | NULL | 3531 | NULL |
3411 | }; | 3532 | }; |
3412 | 3533 | ||
@@ -3428,6 +3549,10 @@ static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = { | |||
3428 | &omap3xxx_l4_core__es3plus_mmc2, | 3549 | &omap3xxx_l4_core__es3plus_mmc2, |
3429 | &omap3xxx_l4_core__hdq1w, | 3550 | &omap3xxx_l4_core__hdq1w, |
3430 | &omap3xxx_sad2d__l3, | 3551 | &omap3xxx_sad2d__l3, |
3552 | &omap3xxx_l4_core__mmu_isp, | ||
3553 | #ifdef CONFIG_OMAP_IOMMU_IVA2 | ||
3554 | &omap3xxx_l3_main__mmu_iva, | ||
3555 | #endif | ||
3431 | NULL | 3556 | NULL |
3432 | }; | 3557 | }; |
3433 | 3558 | ||