aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-04-19 20:43:42 -0400
committerTony Lindgren <tony@atomide.com>2012-04-19 20:43:42 -0400
commit9c3a3009f1c66f4a758b1e5d31b6977185d70a56 (patch)
tree63677cc0258ecc6ad6d076af200f6944978390a5
parente816b57a337ea3b755de72bec38c10c864f23015 (diff)
parent3af35fbcd088e0b675fa423a879c596384894180 (diff)
Merge tag 'omap-cleanup-b-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into cleanup-hwmod
Clean up various aspects of the OMAP hwmod code, which is the IP block control code for OMAP SoCs. In particular, this series results in a considerable diffstat savings by changing the way that IP block interconnections are defined.
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c1160
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c1527
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c1922
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c266
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c562
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c3002
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c4940
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_common_data.h71
-rw-r--r--arch/arm/mach-omap2/timer.c15
-rw-r--r--arch/arm/plat-omap/include/plat/omap_hwmod.h44
10 files changed, 5688 insertions, 7821 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 2c27fdb61e66..bf86f7e8f91f 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2,7 +2,7 @@
2 * omap_hwmod implementation for OMAP2/3/4 2 * omap_hwmod implementation for OMAP2/3/4
3 * 3 *
4 * Copyright (C) 2009-2011 Nokia Corporation 4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2011 Texas Instruments, Inc. 5 * Copyright (C) 2011-2012 Texas Instruments, Inc.
6 * 6 *
7 * Paul Walmsley, Benoît Cousson, Kevin Hilman 7 * Paul Walmsley, Benoît Cousson, Kevin Hilman
8 * 8 *
@@ -137,6 +137,7 @@
137#include <linux/mutex.h> 137#include <linux/mutex.h>
138#include <linux/spinlock.h> 138#include <linux/spinlock.h>
139#include <linux/slab.h> 139#include <linux/slab.h>
140#include <linux/bootmem.h>
140 141
141#include "common.h" 142#include "common.h"
142#include <plat/cpu.h> 143#include <plat/cpu.h>
@@ -159,16 +160,58 @@
159/* Name of the OMAP hwmod for the MPU */ 160/* Name of the OMAP hwmod for the MPU */
160#define MPU_INITIATOR_NAME "mpu" 161#define MPU_INITIATOR_NAME "mpu"
161 162
163/*
164 * Number of struct omap_hwmod_link records per struct
165 * omap_hwmod_ocp_if record (master->slave and slave->master)
166 */
167#define LINKS_PER_OCP_IF 2
168
162/* omap_hwmod_list contains all registered struct omap_hwmods */ 169/* omap_hwmod_list contains all registered struct omap_hwmods */
163static LIST_HEAD(omap_hwmod_list); 170static LIST_HEAD(omap_hwmod_list);
164 171
165/* mpu_oh: used to add/remove MPU initiator from sleepdep list */ 172/* mpu_oh: used to add/remove MPU initiator from sleepdep list */
166static struct omap_hwmod *mpu_oh; 173static struct omap_hwmod *mpu_oh;
167 174
175/*
176 * linkspace: ptr to a buffer that struct omap_hwmod_link records are
177 * allocated from - used to reduce the number of small memory
178 * allocations, which has a significant impact on performance
179 */
180static struct omap_hwmod_link *linkspace;
181
182/*
183 * free_ls, max_ls: array indexes into linkspace; representing the
184 * next free struct omap_hwmod_link index, and the maximum number of
185 * struct omap_hwmod_link records allocated (respectively)
186 */
187static unsigned short free_ls, max_ls, ls_supp;
168 188
169/* Private functions */ 189/* Private functions */
170 190
171/** 191/**
192 * _fetch_next_ocp_if - return the next OCP interface in a list
193 * @p: ptr to a ptr to the list_head inside the ocp_if to return
194 * @i: pointer to the index of the element pointed to by @p in the list
195 *
196 * Return a pointer to the struct omap_hwmod_ocp_if record
197 * containing the struct list_head pointed to by @p, and increment
198 * @p such that a future call to this routine will return the next
199 * record.
200 */
201static struct omap_hwmod_ocp_if *_fetch_next_ocp_if(struct list_head **p,
202 int *i)
203{
204 struct omap_hwmod_ocp_if *oi;
205
206 oi = list_entry(*p, struct omap_hwmod_link, node)->ocp_if;
207 *p = (*p)->next;
208
209 *i = *i + 1;
210
211 return oi;
212}
213
214/**
172 * _update_sysc_cache - return the module OCP_SYSCONFIG register, keep copy 215 * _update_sysc_cache - return the module OCP_SYSCONFIG register, keep copy
173 * @oh: struct omap_hwmod * 216 * @oh: struct omap_hwmod *
174 * 217 *
@@ -582,16 +625,16 @@ static int _init_main_clk(struct omap_hwmod *oh)
582 */ 625 */
583static int _init_interface_clks(struct omap_hwmod *oh) 626static int _init_interface_clks(struct omap_hwmod *oh)
584{ 627{
628 struct omap_hwmod_ocp_if *os;
629 struct list_head *p;
585 struct clk *c; 630 struct clk *c;
586 int i; 631 int i = 0;
587 int ret = 0; 632 int ret = 0;
588 633
589 if (oh->slaves_cnt == 0) 634 p = oh->slave_ports.next;
590 return 0;
591
592 for (i = 0; i < oh->slaves_cnt; i++) {
593 struct omap_hwmod_ocp_if *os = oh->slaves[i];
594 635
636 while (i < oh->slaves_cnt) {
637 os = _fetch_next_ocp_if(&p, &i);
595 if (!os->clk) 638 if (!os->clk)
596 continue; 639 continue;
597 640
@@ -643,21 +686,22 @@ static int _init_opt_clks(struct omap_hwmod *oh)
643 */ 686 */
644static int _enable_clocks(struct omap_hwmod *oh) 687static int _enable_clocks(struct omap_hwmod *oh)
645{ 688{
646 int i; 689 struct omap_hwmod_ocp_if *os;
690 struct list_head *p;
691 int i = 0;
647 692
648 pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name); 693 pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name);
649 694
650 if (oh->_clk) 695 if (oh->_clk)
651 clk_enable(oh->_clk); 696 clk_enable(oh->_clk);
652 697
653 if (oh->slaves_cnt > 0) { 698 p = oh->slave_ports.next;
654 for (i = 0; i < oh->slaves_cnt; i++) {
655 struct omap_hwmod_ocp_if *os = oh->slaves[i];
656 struct clk *c = os->_clk;
657 699
658 if (c && (os->flags & OCPIF_SWSUP_IDLE)) 700 while (i < oh->slaves_cnt) {
659 clk_enable(c); 701 os = _fetch_next_ocp_if(&p, &i);
660 } 702
703 if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE))
704 clk_enable(os->_clk);
661 } 705 }
662 706
663 /* The opt clocks are controlled by the device driver. */ 707 /* The opt clocks are controlled by the device driver. */
@@ -673,21 +717,22 @@ static int _enable_clocks(struct omap_hwmod *oh)
673 */ 717 */
674static int _disable_clocks(struct omap_hwmod *oh) 718static int _disable_clocks(struct omap_hwmod *oh)
675{ 719{
676 int i; 720 struct omap_hwmod_ocp_if *os;
721 struct list_head *p;
722 int i = 0;
677 723
678 pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name); 724 pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name);
679 725
680 if (oh->_clk) 726 if (oh->_clk)
681 clk_disable(oh->_clk); 727 clk_disable(oh->_clk);
682 728
683 if (oh->slaves_cnt > 0) { 729 p = oh->slave_ports.next;
684 for (i = 0; i < oh->slaves_cnt; i++) {
685 struct omap_hwmod_ocp_if *os = oh->slaves[i];
686 struct clk *c = os->_clk;
687 730
688 if (c && (os->flags & OCPIF_SWSUP_IDLE)) 731 while (i < oh->slaves_cnt) {
689 clk_disable(c); 732 os = _fetch_next_ocp_if(&p, &i);
690 } 733
734 if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE))
735 clk_disable(os->_clk);
691 } 736 }
692 737
693 /* The opt clocks are controlled by the device driver. */ 738 /* The opt clocks are controlled by the device driver. */
@@ -781,39 +826,6 @@ static int _omap4_wait_target_disable(struct omap_hwmod *oh)
781} 826}
782 827
783/** 828/**
784 * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4
785 * @oh: struct omap_hwmod *
786 *
787 * Disable the PRCM module mode related to the hwmod @oh.
788 * Return EINVAL if the modulemode is not supported and 0 in case of success.
789 */
790static int _omap4_disable_module(struct omap_hwmod *oh)
791{
792 int v;
793
794 /* The module mode does not exist prior OMAP4 */
795 if (!cpu_is_omap44xx())
796 return -EINVAL;
797
798 if (!oh->clkdm || !oh->prcm.omap4.modulemode)
799 return -EINVAL;
800
801 pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
802
803 omap4_cminst_module_disable(oh->clkdm->prcm_partition,
804 oh->clkdm->cm_inst,
805 oh->clkdm->clkdm_offs,
806 oh->prcm.omap4.clkctrl_offs);
807
808 v = _omap4_wait_target_disable(oh);
809 if (v)
810 pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
811 oh->name);
812
813 return 0;
814}
815
816/**
817 * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh 829 * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh
818 * @oh: struct omap_hwmod *oh 830 * @oh: struct omap_hwmod *oh
819 * 831 *
@@ -883,59 +895,220 @@ static int _count_ocp_if_addr_spaces(struct omap_hwmod_ocp_if *os)
883} 895}
884 896
885/** 897/**
886 * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use 898 * _get_mpu_irq_by_name - fetch MPU interrupt line number by name
887 * @oh: struct omap_hwmod * 899 * @oh: struct omap_hwmod * to operate on
900 * @name: pointer to the name of the MPU interrupt number to fetch (optional)
901 * @irq: pointer to an unsigned int to store the MPU IRQ number to
888 * 902 *
889 * Returns the array index of the OCP slave port that the MPU 903 * Retrieve a MPU hardware IRQ line number named by @name associated
890 * addresses the device on, or -EINVAL upon error or not found. 904 * with the IP block pointed to by @oh. The IRQ number will be filled
905 * into the address pointed to by @dma. When @name is non-null, the
906 * IRQ line number associated with the named entry will be returned.
907 * If @name is null, the first matching entry will be returned. Data
908 * order is not meaningful in hwmod data, so callers are strongly
909 * encouraged to use a non-null @name whenever possible to avoid
910 * unpredictable effects if hwmod data is later added that causes data
911 * ordering to change. Returns 0 upon success or a negative error
912 * code upon error.
891 */ 913 */
892static int __init _find_mpu_port_index(struct omap_hwmod *oh) 914static int _get_mpu_irq_by_name(struct omap_hwmod *oh, const char *name,
915 unsigned int *irq)
893{ 916{
894 int i; 917 int i;
895 int found = 0; 918 bool found = false;
896 919
897 if (!oh || oh->slaves_cnt == 0) 920 if (!oh->mpu_irqs)
898 return -EINVAL; 921 return -ENOENT;
899 922
900 for (i = 0; i < oh->slaves_cnt; i++) { 923 i = 0;
901 struct omap_hwmod_ocp_if *os = oh->slaves[i]; 924 while (oh->mpu_irqs[i].irq != -1) {
925 if (name == oh->mpu_irqs[i].name ||
926 !strcmp(name, oh->mpu_irqs[i].name)) {
927 found = true;
928 break;
929 }
930 i++;
931 }
902 932
903 if (os->user & OCP_USER_MPU) { 933 if (!found)
904 found = 1; 934 return -ENOENT;
935
936 *irq = oh->mpu_irqs[i].irq;
937
938 return 0;
939}
940
941/**
942 * _get_sdma_req_by_name - fetch SDMA request line ID by name
943 * @oh: struct omap_hwmod * to operate on
944 * @name: pointer to the name of the SDMA request line to fetch (optional)
945 * @dma: pointer to an unsigned int to store the request line ID to
946 *
947 * Retrieve an SDMA request line ID named by @name on the IP block
948 * pointed to by @oh. The ID will be filled into the address pointed
949 * to by @dma. When @name is non-null, the request line ID associated
950 * with the named entry will be returned. If @name is null, the first
951 * matching entry will be returned. Data order is not meaningful in
952 * hwmod data, so callers are strongly encouraged to use a non-null
953 * @name whenever possible to avoid unpredictable effects if hwmod
954 * data is later added that causes data ordering to change. Returns 0
955 * upon success or a negative error code upon error.
956 */
957static int _get_sdma_req_by_name(struct omap_hwmod *oh, const char *name,
958 unsigned int *dma)
959{
960 int i;
961 bool found = false;
962
963 if (!oh->sdma_reqs)
964 return -ENOENT;
965
966 i = 0;
967 while (oh->sdma_reqs[i].dma_req != -1) {
968 if (name == oh->sdma_reqs[i].name ||
969 !strcmp(name, oh->sdma_reqs[i].name)) {
970 found = true;
905 break; 971 break;
906 } 972 }
973 i++;
907 } 974 }
908 975
909 if (found) 976 if (!found)
910 pr_debug("omap_hwmod: %s: MPU OCP slave port ID %d\n", 977 return -ENOENT;
911 oh->name, i); 978
912 else 979 *dma = oh->sdma_reqs[i].dma_req;
913 pr_debug("omap_hwmod: %s: no MPU OCP slave port found\n",
914 oh->name);
915 980
916 return (found) ? i : -EINVAL; 981 return 0;
917} 982}
918 983
919/** 984/**
920 * _find_mpu_rt_base - find hwmod register target base addr accessible by MPU 985 * _get_addr_space_by_name - fetch address space start & end by name
921 * @oh: struct omap_hwmod * 986 * @oh: struct omap_hwmod * to operate on
987 * @name: pointer to the name of the address space to fetch (optional)
988 * @pa_start: pointer to a u32 to store the starting address to
989 * @pa_end: pointer to a u32 to store the ending address to
922 * 990 *
923 * Return the virtual address of the base of the register target of 991 * Retrieve address space start and end addresses for the IP block
924 * device @oh, or NULL on error. 992 * pointed to by @oh. The data will be filled into the addresses
993 * pointed to by @pa_start and @pa_end. When @name is non-null, the
994 * address space data associated with the named entry will be
995 * returned. If @name is null, the first matching entry will be
996 * returned. Data order is not meaningful in hwmod data, so callers
997 * are strongly encouraged to use a non-null @name whenever possible
998 * to avoid unpredictable effects if hwmod data is later added that
999 * causes data ordering to change. Returns 0 upon success or a
1000 * negative error code upon error.
925 */ 1001 */
926static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index) 1002static int _get_addr_space_by_name(struct omap_hwmod *oh, const char *name,
1003 u32 *pa_start, u32 *pa_end)
927{ 1004{
1005 int i, j;
928 struct omap_hwmod_ocp_if *os; 1006 struct omap_hwmod_ocp_if *os;
929 struct omap_hwmod_addr_space *mem; 1007 struct list_head *p = NULL;
930 int i = 0, found = 0; 1008 bool found = false;
931 void __iomem *va_start; 1009
1010 p = oh->slave_ports.next;
1011
1012 i = 0;
1013 while (i < oh->slaves_cnt) {
1014 os = _fetch_next_ocp_if(&p, &i);
1015
1016 if (!os->addr)
1017 return -ENOENT;
1018
1019 j = 0;
1020 while (os->addr[j].pa_start != os->addr[j].pa_end) {
1021 if (name == os->addr[j].name ||
1022 !strcmp(name, os->addr[j].name)) {
1023 found = true;
1024 break;
1025 }
1026 j++;
1027 }
1028
1029 if (found)
1030 break;
1031 }
1032
1033 if (!found)
1034 return -ENOENT;
932 1035
933 if (!oh || oh->slaves_cnt == 0) 1036 *pa_start = os->addr[j].pa_start;
1037 *pa_end = os->addr[j].pa_end;
1038
1039 return 0;
1040}
1041
1042/**
1043 * _save_mpu_port_index - find and save the index to @oh's MPU port
1044 * @oh: struct omap_hwmod *
1045 *
1046 * Determines the array index of the OCP slave port that the MPU uses
1047 * to address the device, and saves it into the struct omap_hwmod.
1048 * Intended to be called during hwmod registration only. No return
1049 * value.
1050 */
1051static void __init _save_mpu_port_index(struct omap_hwmod *oh)
1052{
1053 struct omap_hwmod_ocp_if *os = NULL;
1054 struct list_head *p;
1055 int i = 0;
1056
1057 if (!oh)
1058 return;
1059
1060 oh->_int_flags |= _HWMOD_NO_MPU_PORT;
1061
1062 p = oh->slave_ports.next;
1063
1064 while (i < oh->slaves_cnt) {
1065 os = _fetch_next_ocp_if(&p, &i);
1066 if (os->user & OCP_USER_MPU) {
1067 oh->_mpu_port = os;
1068 oh->_int_flags &= ~_HWMOD_NO_MPU_PORT;
1069 break;
1070 }
1071 }
1072
1073 return;
1074}
1075
1076/**
1077 * _find_mpu_rt_port - return omap_hwmod_ocp_if accessible by the MPU
1078 * @oh: struct omap_hwmod *
1079 *
1080 * Given a pointer to a struct omap_hwmod record @oh, return a pointer
1081 * to the struct omap_hwmod_ocp_if record that is used by the MPU to
1082 * communicate with the IP block. This interface need not be directly
1083 * connected to the MPU (and almost certainly is not), but is directly
1084 * connected to the IP block represented by @oh. Returns a pointer
1085 * to the struct omap_hwmod_ocp_if * upon success, or returns NULL upon
1086 * error or if there does not appear to be a path from the MPU to this
1087 * IP block.
1088 */
1089static struct omap_hwmod_ocp_if *_find_mpu_rt_port(struct omap_hwmod *oh)
1090{
1091 if (!oh || oh->_int_flags & _HWMOD_NO_MPU_PORT || oh->slaves_cnt == 0)
934 return NULL; 1092 return NULL;
935 1093
936 os = oh->slaves[index]; 1094 return oh->_mpu_port;
1095};
937 1096
938 if (!os->addr) 1097/**
1098 * _find_mpu_rt_addr_space - return MPU register target address space for @oh
1099 * @oh: struct omap_hwmod *
1100 *
1101 * Returns a pointer to the struct omap_hwmod_addr_space record representing
1102 * the register target MPU address space; or returns NULL upon error.
1103 */
1104static struct omap_hwmod_addr_space * __init _find_mpu_rt_addr_space(struct omap_hwmod *oh)
1105{
1106 struct omap_hwmod_ocp_if *os;
1107 struct omap_hwmod_addr_space *mem;
1108 int found = 0, i = 0;
1109
1110 os = _find_mpu_rt_port(oh);
1111 if (!os || !os->addr)
939 return NULL; 1112 return NULL;
940 1113
941 do { 1114 do {
@@ -944,20 +1117,7 @@ static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index)
944 found = 1; 1117 found = 1;
945 } while (!found && mem->pa_start != mem->pa_end); 1118 } while (!found && mem->pa_start != mem->pa_end);
946 1119
947 if (found) { 1120 return (found) ? mem : NULL;
948 va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
949 if (!va_start) {
950 pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name);
951 return NULL;
952 }
953 pr_debug("omap_hwmod: %s: MPU register target at va %p\n",
954 oh->name, va_start);
955 } else {
956 pr_debug("omap_hwmod: %s: no MPU register target found\n",
957 oh->name);
958 }
959
960 return (found) ? va_start : NULL;
961} 1121}
962 1122
963/** 1123/**
@@ -1205,12 +1365,11 @@ static int _wait_target_ready(struct omap_hwmod *oh)
1205 if (!oh) 1365 if (!oh)
1206 return -EINVAL; 1366 return -EINVAL;
1207 1367
1208 if (oh->_int_flags & _HWMOD_NO_MPU_PORT) 1368 if (oh->flags & HWMOD_NO_IDLEST)
1209 return 0; 1369 return 0;
1210 1370
1211 os = oh->slaves[oh->_mpu_port_index]; 1371 os = _find_mpu_rt_port(oh);
1212 1372 if (!os)
1213 if (oh->flags & HWMOD_NO_IDLEST)
1214 return 0; 1373 return 0;
1215 1374
1216 /* XXX check module SIDLEMODE */ 1375 /* XXX check module SIDLEMODE */
@@ -1378,13 +1537,73 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name)
1378} 1537}
1379 1538
1380/** 1539/**
1540 * _are_any_hardreset_lines_asserted - return true if part of @oh is hard-reset
1541 * @oh: struct omap_hwmod *
1542 *
1543 * If any hardreset line associated with @oh is asserted, then return true.
1544 * Otherwise, if @oh has no hardreset lines associated with it, or if
1545 * no hardreset lines associated with @oh are asserted, then return false.
1546 * This function is used to avoid executing some parts of the IP block
1547 * enable/disable sequence if a hardreset line is set.
1548 */
1549static bool _are_any_hardreset_lines_asserted(struct omap_hwmod *oh)
1550{
1551 int i;
1552
1553 if (oh->rst_lines_cnt == 0)
1554 return false;
1555
1556 for (i = 0; i < oh->rst_lines_cnt; i++)
1557 if (_read_hardreset(oh, oh->rst_lines[i].name) > 0)
1558 return true;
1559
1560 return false;
1561}
1562
1563/**
1564 * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4
1565 * @oh: struct omap_hwmod *
1566 *
1567 * Disable the PRCM module mode related to the hwmod @oh.
1568 * Return EINVAL if the modulemode is not supported and 0 in case of success.
1569 */
1570static int _omap4_disable_module(struct omap_hwmod *oh)
1571{
1572 int v;
1573
1574 /* The module mode does not exist prior OMAP4 */
1575 if (!cpu_is_omap44xx())
1576 return -EINVAL;
1577
1578 if (!oh->clkdm || !oh->prcm.omap4.modulemode)
1579 return -EINVAL;
1580
1581 pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
1582
1583 omap4_cminst_module_disable(oh->clkdm->prcm_partition,
1584 oh->clkdm->cm_inst,
1585 oh->clkdm->clkdm_offs,
1586 oh->prcm.omap4.clkctrl_offs);
1587
1588 if (_are_any_hardreset_lines_asserted(oh))
1589 return 0;
1590
1591 v = _omap4_wait_target_disable(oh);
1592 if (v)
1593 pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
1594 oh->name);
1595
1596 return 0;
1597}
1598
1599/**
1381 * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit 1600 * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit
1382 * @oh: struct omap_hwmod * 1601 * @oh: struct omap_hwmod *
1383 * 1602 *
1384 * Resets an omap_hwmod @oh via the OCP_SYSCONFIG bit. hwmod must be 1603 * Resets an omap_hwmod @oh via the OCP_SYSCONFIG bit. hwmod must be
1385 * enabled for this to work. Returns -EINVAL if the hwmod cannot be 1604 * enabled for this to work. Returns -ENOENT if the hwmod cannot be
1386 * reset this way or if the hwmod is in the wrong state, -ETIMEDOUT if 1605 * reset this way, -EINVAL if the hwmod is in the wrong state,
1387 * the module did not reset in time, or 0 upon success. 1606 * -ETIMEDOUT if the module did not reset in time, or 0 upon success.
1388 * 1607 *
1389 * In OMAP3 a specific SYSSTATUS register is used to get the reset status. 1608 * In OMAP3 a specific SYSSTATUS register is used to get the reset status.
1390 * Starting in OMAP4, some IPs do not have SYSSTATUS registers and instead 1609 * Starting in OMAP4, some IPs do not have SYSSTATUS registers and instead
@@ -1401,7 +1620,7 @@ static int _ocp_softreset(struct omap_hwmod *oh)
1401 1620
1402 if (!oh->class->sysc || 1621 if (!oh->class->sysc ||
1403 !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET)) 1622 !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET))
1404 return -EINVAL; 1623 return -ENOENT;
1405 1624
1406 /* clocks must be on for this operation */ 1625 /* clocks must be on for this operation */
1407 if (oh->_state != _HWMOD_STATE_ENABLED) { 1626 if (oh->_state != _HWMOD_STATE_ENABLED) {
@@ -1422,6 +1641,9 @@ static int _ocp_softreset(struct omap_hwmod *oh)
1422 goto dis_opt_clks; 1641 goto dis_opt_clks;
1423 _write_sysconfig(v, oh); 1642 _write_sysconfig(v, oh);
1424 1643
1644 if (oh->class->sysc->srst_udelay)
1645 udelay(oh->class->sysc->srst_udelay);
1646
1425 if (oh->class->sysc->sysc_flags & SYSS_HAS_RESET_STATUS) 1647 if (oh->class->sysc->sysc_flags & SYSS_HAS_RESET_STATUS)
1426 omap_test_timeout((omap_hwmod_read(oh, 1648 omap_test_timeout((omap_hwmod_read(oh,
1427 oh->class->sysc->syss_offs) 1649 oh->class->sysc->syss_offs)
@@ -1459,32 +1681,60 @@ dis_opt_clks:
1459 * _reset - reset an omap_hwmod 1681 * _reset - reset an omap_hwmod
1460 * @oh: struct omap_hwmod * 1682 * @oh: struct omap_hwmod *
1461 * 1683 *
1462 * Resets an omap_hwmod @oh. The default software reset mechanism for 1684 * Resets an omap_hwmod @oh. If the module has a custom reset
1463 * most OMAP IP blocks is triggered via the OCP_SYSCONFIG.SOFTRESET 1685 * function pointer defined, then call it to reset the IP block, and
1464 * bit. However, some hwmods cannot be reset via this method: some 1686 * pass along its return value to the caller. Otherwise, if the IP
1465 * are not targets and therefore have no OCP header registers to 1687 * block has an OCP_SYSCONFIG register with a SOFTRESET bitfield
1466 * access; others (like the IVA) have idiosyncratic reset sequences. 1688 * associated with it, call a function to reset the IP block via that
1467 * So for these relatively rare cases, custom reset code can be 1689 * method, and pass along the return value to the caller. Finally, if
1468 * supplied in the struct omap_hwmod_class .reset function pointer. 1690 * the IP block has some hardreset lines associated with it, assert
1469 * Passes along the return value from either _reset() or the custom 1691 * all of those, but do _not_ deassert them. (This is because driver
1470 * reset function - these must return -EINVAL if the hwmod cannot be 1692 * authors have expressed an apparent requirement to control the
1471 * reset this way or if the hwmod is in the wrong state, -ETIMEDOUT if 1693 * deassertion of the hardreset lines themselves.)
1472 * the module did not reset in time, or 0 upon success. 1694 *
1695 * The default software reset mechanism for most OMAP IP blocks is
1696 * triggered via the OCP_SYSCONFIG.SOFTRESET bit. However, some
1697 * hwmods cannot be reset via this method. Some are not targets and
1698 * therefore have no OCP header registers to access. Others (like the
1699 * IVA) have idiosyncratic reset sequences. So for these relatively
1700 * rare cases, custom reset code can be supplied in the struct
1701 * omap_hwmod_class .reset function pointer. Passes along the return
1702 * value from either _ocp_softreset() or the custom reset function -
1703 * these must return -EINVAL if the hwmod cannot be reset this way or
1704 * if the hwmod is in the wrong state, -ETIMEDOUT if the module did
1705 * not reset in time, or 0 upon success.
1473 */ 1706 */
1474static int _reset(struct omap_hwmod *oh) 1707static int _reset(struct omap_hwmod *oh)
1475{ 1708{
1476 int ret; 1709 int i, r;
1477 1710
1478 pr_debug("omap_hwmod: %s: resetting\n", oh->name); 1711 pr_debug("omap_hwmod: %s: resetting\n", oh->name);
1479 1712
1480 ret = (oh->class->reset) ? oh->class->reset(oh) : _ocp_softreset(oh); 1713 if (oh->class->reset) {
1714 r = oh->class->reset(oh);
1715 } else {
1716 if (oh->rst_lines_cnt > 0) {
1717 for (i = 0; i < oh->rst_lines_cnt; i++)
1718 _assert_hardreset(oh, oh->rst_lines[i].name);
1719 return 0;
1720 } else {
1721 r = _ocp_softreset(oh);
1722 if (r == -ENOENT)
1723 r = 0;
1724 }
1725 }
1481 1726
1727 /*
1728 * OCP_SYSCONFIG bits need to be reprogrammed after a
1729 * softreset. The _enable() function should be split to avoid
1730 * the rewrite of the OCP_SYSCONFIG register.
1731 */
1482 if (oh->class->sysc) { 1732 if (oh->class->sysc) {
1483 _update_sysc_cache(oh); 1733 _update_sysc_cache(oh);
1484 _enable_sysc(oh); 1734 _enable_sysc(oh);
1485 } 1735 }
1486 1736
1487 return ret; 1737 return r;
1488} 1738}
1489 1739
1490/** 1740/**
@@ -1503,10 +1753,9 @@ static int _enable(struct omap_hwmod *oh)
1503 pr_debug("omap_hwmod: %s: enabling\n", oh->name); 1753 pr_debug("omap_hwmod: %s: enabling\n", oh->name);
1504 1754
1505 /* 1755 /*
1506 * hwmods with HWMOD_INIT_NO_IDLE flag set are left 1756 * hwmods with HWMOD_INIT_NO_IDLE flag set are left in enabled
1507 * in enabled state at init. 1757 * state at init. Now that someone is really trying to enable
1508 * Now that someone is really trying to enable them, 1758 * them, just ensure that the hwmod mux is set.
1509 * just ensure that the hwmod mux is set.
1510 */ 1759 */
1511 if (oh->_int_flags & _HWMOD_SKIP_ENABLE) { 1760 if (oh->_int_flags & _HWMOD_SKIP_ENABLE) {
1512 /* 1761 /*
@@ -1529,15 +1778,17 @@ static int _enable(struct omap_hwmod *oh)
1529 return -EINVAL; 1778 return -EINVAL;
1530 } 1779 }
1531 1780
1532
1533 /* 1781 /*
1534 * If an IP contains only one HW reset line, then de-assert it in order 1782 * If an IP block contains HW reset lines and any of them are
1535 * to allow the module state transition. Otherwise the PRCM will return 1783 * asserted, we let integration code associated with that
1536 * Intransition status, and the init will failed. 1784 * block handle the enable. We've received very little
1785 * information on what those driver authors need, and until
1786 * detailed information is provided and the driver code is
1787 * posted to the public lists, this is probably the best we
1788 * can do.
1537 */ 1789 */
1538 if ((oh->_state == _HWMOD_STATE_INITIALIZED || 1790 if (_are_any_hardreset_lines_asserted(oh))
1539 oh->_state == _HWMOD_STATE_DISABLED) && oh->rst_lines_cnt == 1) 1791 return 0;
1540 _deassert_hardreset(oh, oh->rst_lines[0].name);
1541 1792
1542 /* Mux pins for device runtime if populated */ 1793 /* Mux pins for device runtime if populated */
1543 if (oh->mux && (!oh->mux->enabled || 1794 if (oh->mux && (!oh->mux->enabled ||
@@ -1612,6 +1863,9 @@ static int _idle(struct omap_hwmod *oh)
1612 return -EINVAL; 1863 return -EINVAL;
1613 } 1864 }
1614 1865
1866 if (_are_any_hardreset_lines_asserted(oh))
1867 return 0;
1868
1615 if (oh->class->sysc) 1869 if (oh->class->sysc)
1616 _idle_sysc(oh); 1870 _idle_sysc(oh);
1617 _del_initiator_dep(oh, mpu_oh); 1871 _del_initiator_dep(oh, mpu_oh);
@@ -1684,7 +1938,7 @@ int omap_hwmod_set_ocp_autoidle(struct omap_hwmod *oh, u8 autoidle)
1684 */ 1938 */
1685static int _shutdown(struct omap_hwmod *oh) 1939static int _shutdown(struct omap_hwmod *oh)
1686{ 1940{
1687 int ret; 1941 int ret, i;
1688 u8 prev_state; 1942 u8 prev_state;
1689 1943
1690 if (oh->_state != _HWMOD_STATE_IDLE && 1944 if (oh->_state != _HWMOD_STATE_IDLE &&
@@ -1694,6 +1948,9 @@ static int _shutdown(struct omap_hwmod *oh)
1694 return -EINVAL; 1948 return -EINVAL;
1695 } 1949 }
1696 1950
1951 if (_are_any_hardreset_lines_asserted(oh))
1952 return 0;
1953
1697 pr_debug("omap_hwmod: %s: disabling\n", oh->name); 1954 pr_debug("omap_hwmod: %s: disabling\n", oh->name);
1698 1955
1699 if (oh->class->pre_shutdown) { 1956 if (oh->class->pre_shutdown) {
@@ -1725,12 +1982,8 @@ static int _shutdown(struct omap_hwmod *oh)
1725 } 1982 }
1726 /* XXX Should this code also force-disable the optional clocks? */ 1983 /* XXX Should this code also force-disable the optional clocks? */
1727 1984
1728 /* 1985 for (i = 0; i < oh->rst_lines_cnt; i++)
1729 * If an IP contains only one HW reset line, then assert it 1986 _assert_hardreset(oh, oh->rst_lines[i].name);
1730 * after disabling the clocks and before shutting down the IP.
1731 */
1732 if (oh->rst_lines_cnt == 1)
1733 _assert_hardreset(oh, oh->rst_lines[0].name);
1734 1987
1735 /* Mux pins to safe mode or use populated off mode values */ 1988 /* Mux pins to safe mode or use populated off mode values */
1736 if (oh->mux) 1989 if (oh->mux)
@@ -1742,59 +1995,186 @@ static int _shutdown(struct omap_hwmod *oh)
1742} 1995}
1743 1996
1744/** 1997/**
1745 * _setup - do initial configuration of omap_hwmod 1998 * _init_mpu_rt_base - populate the virtual address for a hwmod
1746 * @oh: struct omap_hwmod * 1999 * @oh: struct omap_hwmod * to locate the virtual address
1747 * 2000 *
1748 * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh 2001 * Cache the virtual address used by the MPU to access this IP block's
1749 * OCP_SYSCONFIG register. Returns 0. 2002 * registers. This address is needed early so the OCP registers that
2003 * are part of the device's address space can be ioremapped properly.
2004 * No return value.
1750 */ 2005 */
1751static int _setup(struct omap_hwmod *oh, void *data) 2006static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
1752{ 2007{
1753 int i, r; 2008 struct omap_hwmod_addr_space *mem;
1754 u8 postsetup_state; 2009 void __iomem *va_start;
2010
2011 if (!oh)
2012 return;
2013
2014 _save_mpu_port_index(oh);
2015
2016 if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
2017 return;
2018
2019 mem = _find_mpu_rt_addr_space(oh);
2020 if (!mem) {
2021 pr_debug("omap_hwmod: %s: no MPU register target found\n",
2022 oh->name);
2023 return;
2024 }
2025
2026 va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
2027 if (!va_start) {
2028 pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name);
2029 return;
2030 }
2031
2032 pr_debug("omap_hwmod: %s: MPU register target at va %p\n",
2033 oh->name, va_start);
2034
2035 oh->_mpu_rt_va = va_start;
2036}
2037
2038/**
2039 * _init - initialize internal data for the hwmod @oh
2040 * @oh: struct omap_hwmod *
2041 * @n: (unused)
2042 *
2043 * Look up the clocks and the address space used by the MPU to access
2044 * registers belonging to the hwmod @oh. @oh must already be
2045 * registered at this point. This is the first of two phases for
2046 * hwmod initialization. Code called here does not touch any hardware
2047 * registers, it simply prepares internal data structures. Returns 0
2048 * upon success or if the hwmod isn't registered, or -EINVAL upon
2049 * failure.
2050 */
2051static int __init _init(struct omap_hwmod *oh, void *data)
2052{
2053 int r;
1755 2054
1756 if (oh->_state != _HWMOD_STATE_CLKS_INITED) 2055 if (oh->_state != _HWMOD_STATE_REGISTERED)
1757 return 0; 2056 return 0;
1758 2057
1759 /* Set iclk autoidle mode */ 2058 _init_mpu_rt_base(oh, NULL);
1760 if (oh->slaves_cnt > 0) {
1761 for (i = 0; i < oh->slaves_cnt; i++) {
1762 struct omap_hwmod_ocp_if *os = oh->slaves[i];
1763 struct clk *c = os->_clk;
1764 2059
1765 if (!c) 2060 r = _init_clocks(oh, NULL);
1766 continue; 2061 if (IS_ERR_VALUE(r)) {
2062 WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name);
2063 return -EINVAL;
2064 }
1767 2065
1768 if (os->flags & OCPIF_SWSUP_IDLE) { 2066 oh->_state = _HWMOD_STATE_INITIALIZED;
1769 /* XXX omap_iclk_deny_idle(c); */ 2067
1770 } else { 2068 return 0;
1771 /* XXX omap_iclk_allow_idle(c); */ 2069}
1772 clk_enable(c); 2070
1773 } 2071/**
2072 * _setup_iclk_autoidle - configure an IP block's interface clocks
2073 * @oh: struct omap_hwmod *
2074 *
2075 * Set up the module's interface clocks. XXX This function is still mostly
2076 * a stub; implementing this properly requires iclk autoidle usecounting in
2077 * the clock code. No return value.
2078 */
2079static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
2080{
2081 struct omap_hwmod_ocp_if *os;
2082 struct list_head *p;
2083 int i = 0;
2084 if (oh->_state != _HWMOD_STATE_INITIALIZED)
2085 return;
2086
2087 p = oh->slave_ports.next;
2088
2089 while (i < oh->slaves_cnt) {
2090 os = _fetch_next_ocp_if(&p, &i);
2091 if (!os->_clk)
2092 continue;
2093
2094 if (os->flags & OCPIF_SWSUP_IDLE) {
2095 /* XXX omap_iclk_deny_idle(c); */
2096 } else {
2097 /* XXX omap_iclk_allow_idle(c); */
2098 clk_enable(os->_clk);
1774 } 2099 }
1775 } 2100 }
1776 2101
1777 oh->_state = _HWMOD_STATE_INITIALIZED; 2102 return;
2103}
1778 2104
1779 /* 2105/**
1780 * In the case of hwmod with hardreset that should not be 2106 * _setup_reset - reset an IP block during the setup process
1781 * de-assert at boot time, we have to keep the module 2107 * @oh: struct omap_hwmod *
1782 * initialized, because we cannot enable it properly with the 2108 *
1783 * reset asserted. Exit without warning because that behavior is 2109 * Reset the IP block corresponding to the hwmod @oh during the setup
1784 * expected. 2110 * process. The IP block is first enabled so it can be successfully
1785 */ 2111 * reset. Returns 0 upon success or a negative error code upon
1786 if ((oh->flags & HWMOD_INIT_NO_RESET) && oh->rst_lines_cnt == 1) 2112 * failure.
1787 return 0; 2113 */
2114static int __init _setup_reset(struct omap_hwmod *oh)
2115{
2116 int r;
1788 2117
1789 r = _enable(oh); 2118 if (oh->_state != _HWMOD_STATE_INITIALIZED)
1790 if (r) { 2119 return -EINVAL;
1791 pr_warning("omap_hwmod: %s: cannot be enabled (%d)\n", 2120
1792 oh->name, oh->_state); 2121 if (oh->rst_lines_cnt == 0) {
1793 return 0; 2122 r = _enable(oh);
2123 if (r) {
2124 pr_warning("omap_hwmod: %s: cannot be enabled for reset (%d)\n",
2125 oh->name, oh->_state);
2126 return -EINVAL;
2127 }
1794 } 2128 }
1795 2129
1796 if (!(oh->flags & HWMOD_INIT_NO_RESET)) 2130 if (!(oh->flags & HWMOD_INIT_NO_RESET))
1797 _reset(oh); 2131 r = _reset(oh);
2132
2133 return r;
2134}
2135
2136/**
2137 * _setup_postsetup - transition to the appropriate state after _setup
2138 * @oh: struct omap_hwmod *
2139 *
2140 * Place an IP block represented by @oh into a "post-setup" state --
2141 * either IDLE, ENABLED, or DISABLED. ("post-setup" simply means that
2142 * this function is called at the end of _setup().) The postsetup
2143 * state for an IP block can be changed by calling
2144 * omap_hwmod_enter_postsetup_state() early in the boot process,
2145 * before one of the omap_hwmod_setup*() functions are called for the
2146 * IP block.
2147 *
2148 * The IP block stays in this state until a PM runtime-based driver is
2149 * loaded for that IP block. A post-setup state of IDLE is
2150 * appropriate for almost all IP blocks with runtime PM-enabled
2151 * drivers, since those drivers are able to enable the IP block. A
2152 * post-setup state of ENABLED is appropriate for kernels with PM
2153 * runtime disabled. The DISABLED state is appropriate for unusual IP
2154 * blocks such as the MPU WDTIMER on kernels without WDTIMER drivers
2155 * included, since the WDTIMER starts running on reset and will reset
2156 * the MPU if left active.
2157 *
2158 * This post-setup mechanism is deprecated. Once all of the OMAP
2159 * drivers have been converted to use PM runtime, and all of the IP
2160 * block data and interconnect data is available to the hwmod code, it
2161 * should be possible to replace this mechanism with a "lazy reset"
2162 * arrangement. In a "lazy reset" setup, each IP block is enabled
2163 * when the driver first probes, then all remaining IP blocks without
2164 * drivers are either shut down or enabled after the drivers have
2165 * loaded. However, this cannot take place until the above
2166 * preconditions have been met, since otherwise the late reset code
2167 * has no way of knowing which IP blocks are in use by drivers, and
2168 * which ones are unused.
2169 *
2170 * No return value.
2171 */
2172static void __init _setup_postsetup(struct omap_hwmod *oh)
2173{
2174 u8 postsetup_state;
2175
2176 if (oh->rst_lines_cnt > 0)
2177 return;
1798 2178
1799 postsetup_state = oh->_postsetup_state; 2179 postsetup_state = oh->_postsetup_state;
1800 if (postsetup_state == _HWMOD_STATE_UNKNOWN) 2180 if (postsetup_state == _HWMOD_STATE_UNKNOWN)
@@ -1818,6 +2198,35 @@ static int _setup(struct omap_hwmod *oh, void *data)
1818 WARN(1, "hwmod: %s: unknown postsetup state %d! defaulting to enabled\n", 2198 WARN(1, "hwmod: %s: unknown postsetup state %d! defaulting to enabled\n",
1819 oh->name, postsetup_state); 2199 oh->name, postsetup_state);
1820 2200
2201 return;
2202}
2203
2204/**
2205 * _setup - prepare IP block hardware for use
2206 * @oh: struct omap_hwmod *
2207 * @n: (unused, pass NULL)
2208 *
2209 * Configure the IP block represented by @oh. This may include
2210 * enabling the IP block, resetting it, and placing it into a
2211 * post-setup state, depending on the type of IP block and applicable
2212 * flags. IP blocks are reset to prevent any previous configuration
2213 * by the bootloader or previous operating system from interfering
2214 * with power management or other parts of the system. The reset can
2215 * be avoided; see omap_hwmod_no_setup_reset(). This is the second of
2216 * two phases for hwmod initialization. Code called here generally
2217 * affects the IP block hardware, or system integration hardware
2218 * associated with the IP block. Returns 0.
2219 */
2220static int __init _setup(struct omap_hwmod *oh, void *data)
2221{
2222 if (oh->_state != _HWMOD_STATE_INITIALIZED)
2223 return 0;
2224
2225 _setup_iclk_autoidle(oh);
2226
2227 if (!_setup_reset(oh))
2228 _setup_postsetup(oh);
2229
1821 return 0; 2230 return 0;
1822} 2231}
1823 2232
@@ -1840,8 +2249,6 @@ static int _setup(struct omap_hwmod *oh, void *data)
1840 */ 2249 */
1841static int __init _register(struct omap_hwmod *oh) 2250static int __init _register(struct omap_hwmod *oh)
1842{ 2251{
1843 int ms_id;
1844
1845 if (!oh || !oh->name || !oh->class || !oh->class->name || 2252 if (!oh || !oh->name || !oh->class || !oh->class->name ||
1846 (oh->_state != _HWMOD_STATE_UNKNOWN)) 2253 (oh->_state != _HWMOD_STATE_UNKNOWN))
1847 return -EINVAL; 2254 return -EINVAL;
@@ -1851,14 +2258,10 @@ static int __init _register(struct omap_hwmod *oh)
1851 if (_lookup(oh->name)) 2258 if (_lookup(oh->name))
1852 return -EEXIST; 2259 return -EEXIST;
1853 2260
1854 ms_id = _find_mpu_port_index(oh);
1855 if (!IS_ERR_VALUE(ms_id))
1856 oh->_mpu_port_index = ms_id;
1857 else
1858 oh->_int_flags |= _HWMOD_NO_MPU_PORT;
1859
1860 list_add_tail(&oh->node, &omap_hwmod_list); 2261 list_add_tail(&oh->node, &omap_hwmod_list);
1861 2262
2263 INIT_LIST_HEAD(&oh->master_ports);
2264 INIT_LIST_HEAD(&oh->slave_ports);
1862 spin_lock_init(&oh->_lock); 2265 spin_lock_init(&oh->_lock);
1863 2266
1864 oh->_state = _HWMOD_STATE_REGISTERED; 2267 oh->_state = _HWMOD_STATE_REGISTERED;
@@ -1873,6 +2276,160 @@ static int __init _register(struct omap_hwmod *oh)
1873 return 0; 2276 return 0;
1874} 2277}
1875 2278
2279/**
2280 * _alloc_links - return allocated memory for hwmod links
2281 * @ml: pointer to a struct omap_hwmod_link * for the master link
2282 * @sl: pointer to a struct omap_hwmod_link * for the slave link
2283 *
2284 * Return pointers to two struct omap_hwmod_link records, via the
2285 * addresses pointed to by @ml and @sl. Will first attempt to return
2286 * memory allocated as part of a large initial block, but if that has
2287 * been exhausted, will allocate memory itself. Since ideally this
2288 * second allocation path will never occur, the number of these
2289 * 'supplemental' allocations will be logged when debugging is
2290 * enabled. Returns 0.
2291 */
2292static int __init _alloc_links(struct omap_hwmod_link **ml,
2293 struct omap_hwmod_link **sl)
2294{
2295 unsigned int sz;
2296
2297 if ((free_ls + LINKS_PER_OCP_IF) <= max_ls) {
2298 *ml = &linkspace[free_ls++];
2299 *sl = &linkspace[free_ls++];
2300 return 0;
2301 }
2302
2303 sz = sizeof(struct omap_hwmod_link) * LINKS_PER_OCP_IF;
2304
2305 *sl = NULL;
2306 *ml = alloc_bootmem(sz);
2307
2308 memset(*ml, 0, sz);
2309
2310 *sl = (void *)(*ml) + sizeof(struct omap_hwmod_link);
2311
2312 ls_supp++;
2313 pr_debug("omap_hwmod: supplemental link allocations needed: %d\n",
2314 ls_supp * LINKS_PER_OCP_IF);
2315
2316 return 0;
2317};
2318
2319/**
2320 * _add_link - add an interconnect between two IP blocks
2321 * @oi: pointer to a struct omap_hwmod_ocp_if record
2322 *
2323 * Add struct omap_hwmod_link records connecting the master IP block
2324 * specified in @oi->master to @oi, and connecting the slave IP block
2325 * specified in @oi->slave to @oi. This code is assumed to run before
2326 * preemption or SMP has been enabled, thus avoiding the need for
2327 * locking in this code. Changes to this assumption will require
2328 * additional locking. Returns 0.
2329 */
2330static int __init _add_link(struct omap_hwmod_ocp_if *oi)
2331{
2332 struct omap_hwmod_link *ml, *sl;
2333
2334 pr_debug("omap_hwmod: %s -> %s: adding link\n", oi->master->name,
2335 oi->slave->name);
2336
2337 _alloc_links(&ml, &sl);
2338
2339 ml->ocp_if = oi;
2340 INIT_LIST_HEAD(&ml->node);
2341 list_add(&ml->node, &oi->master->master_ports);
2342 oi->master->masters_cnt++;
2343
2344 sl->ocp_if = oi;
2345 INIT_LIST_HEAD(&sl->node);
2346 list_add(&sl->node, &oi->slave->slave_ports);
2347 oi->slave->slaves_cnt++;
2348
2349 return 0;
2350}
2351
2352/**
2353 * _register_link - register a struct omap_hwmod_ocp_if
2354 * @oi: struct omap_hwmod_ocp_if *
2355 *
2356 * Registers the omap_hwmod_ocp_if record @oi. Returns -EEXIST if it
2357 * has already been registered; -EINVAL if @oi is NULL or if the
2358 * record pointed to by @oi is missing required fields; or 0 upon
2359 * success.
2360 *
2361 * XXX The data should be copied into bootmem, so the original data
2362 * should be marked __initdata and freed after init. This would allow
2363 * unneeded omap_hwmods to be freed on multi-OMAP configurations.
2364 */
2365static int __init _register_link(struct omap_hwmod_ocp_if *oi)
2366{
2367 if (!oi || !oi->master || !oi->slave || !oi->user)
2368 return -EINVAL;
2369
2370 if (oi->_int_flags & _OCPIF_INT_FLAGS_REGISTERED)
2371 return -EEXIST;
2372
2373 pr_debug("omap_hwmod: registering link from %s to %s\n",
2374 oi->master->name, oi->slave->name);
2375
2376 /*
2377 * Register the connected hwmods, if they haven't been
2378 * registered already
2379 */
2380 if (oi->master->_state != _HWMOD_STATE_REGISTERED)
2381 _register(oi->master);
2382
2383 if (oi->slave->_state != _HWMOD_STATE_REGISTERED)
2384 _register(oi->slave);
2385
2386 _add_link(oi);
2387
2388 oi->_int_flags |= _OCPIF_INT_FLAGS_REGISTERED;
2389
2390 return 0;
2391}
2392
2393/**
2394 * _alloc_linkspace - allocate large block of hwmod links
2395 * @ois: pointer to an array of struct omap_hwmod_ocp_if records to count
2396 *
2397 * Allocate a large block of struct omap_hwmod_link records. This
2398 * improves boot time significantly by avoiding the need to allocate
2399 * individual records one by one. If the number of records to
2400 * allocate in the block hasn't been manually specified, this function
2401 * will count the number of struct omap_hwmod_ocp_if records in @ois
2402 * and use that to determine the allocation size. For SoC families
2403 * that require multiple list registrations, such as OMAP3xxx, this
2404 * estimation process isn't optimal, so manual estimation is advised
2405 * in those cases. Returns -EEXIST if the allocation has already occurred
2406 * or 0 upon success.
2407 */
2408static int __init _alloc_linkspace(struct omap_hwmod_ocp_if **ois)
2409{
2410 unsigned int i = 0;
2411 unsigned int sz;
2412
2413 if (linkspace) {
2414 WARN(1, "linkspace already allocated\n");
2415 return -EEXIST;
2416 }
2417
2418 if (max_ls == 0)
2419 while (ois[i++])
2420 max_ls += LINKS_PER_OCP_IF;
2421
2422 sz = sizeof(struct omap_hwmod_link) * max_ls;
2423
2424 pr_debug("omap_hwmod: %s: allocating %d byte linkspace (%d links)\n",
2425 __func__, sz, max_ls);
2426
2427 linkspace = alloc_bootmem(sz);
2428
2429 memset(linkspace, 0, sz);
2430
2431 return 0;
2432}
1876 2433
1877/* Public functions */ 2434/* Public functions */
1878 2435
@@ -1903,10 +2460,20 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs)
1903 */ 2460 */
1904int omap_hwmod_softreset(struct omap_hwmod *oh) 2461int omap_hwmod_softreset(struct omap_hwmod *oh)
1905{ 2462{
1906 if (!oh) 2463 u32 v;
2464 int ret;
2465
2466 if (!oh || !(oh->_sysc_cache))
1907 return -EINVAL; 2467 return -EINVAL;
1908 2468
1909 return _ocp_softreset(oh); 2469 v = oh->_sysc_cache;
2470 ret = _set_softreset(oh, &v);
2471 if (ret)
2472 goto error;
2473 _write_sysconfig(v, oh);
2474
2475error:
2476 return ret;
1910} 2477}
1911 2478
1912/** 2479/**
@@ -1991,120 +2558,101 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
1991} 2558}
1992 2559
1993/** 2560/**
1994 * omap_hwmod_register - register an array of hwmods 2561 * omap_hwmod_register_links - register an array of hwmod links
1995 * @ohs: pointer to an array of omap_hwmods to register 2562 * @ois: pointer to an array of omap_hwmod_ocp_if to register
1996 * 2563 *
1997 * Intended to be called early in boot before the clock framework is 2564 * Intended to be called early in boot before the clock framework is
1998 * initialized. If @ohs is not null, will register all omap_hwmods 2565 * initialized. If @ois is not null, will register all omap_hwmods
1999 * listed in @ohs that are valid for this chip. Returns 0. 2566 * listed in @ois that are valid for this chip. Returns 0.
2000 */ 2567 */
2001int __init omap_hwmod_register(struct omap_hwmod **ohs) 2568int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
2002{ 2569{
2003 int r, i; 2570 int r, i;
2004 2571
2005 if (!ohs) 2572 if (!ois)
2006 return 0; 2573 return 0;
2007 2574
2575 if (!linkspace) {
2576 if (_alloc_linkspace(ois)) {
2577 pr_err("omap_hwmod: could not allocate link space\n");
2578 return -ENOMEM;
2579 }
2580 }
2581
2008 i = 0; 2582 i = 0;
2009 do { 2583 do {
2010 r = _register(ohs[i]); 2584 r = _register_link(ois[i]);
2011 WARN(r, "omap_hwmod: %s: _register returned %d\n", ohs[i]->name, 2585 WARN(r && r != -EEXIST,
2012 r); 2586 "omap_hwmod: _register_link(%s -> %s) returned %d\n",
2013 } while (ohs[++i]); 2587 ois[i]->master->name, ois[i]->slave->name, r);
2588 } while (ois[++i]);
2014 2589
2015 return 0; 2590 return 0;
2016} 2591}
2017 2592
2018/* 2593/**
2019 * _populate_mpu_rt_base - populate the virtual address for a hwmod 2594 * _ensure_mpu_hwmod_is_setup - ensure the MPU SS hwmod is init'ed and set up
2595 * @oh: pointer to the hwmod currently being set up (usually not the MPU)
2020 * 2596 *
2021 * Must be called only from omap_hwmod_setup_*() so ioremap works properly. 2597 * If the hwmod data corresponding to the MPU subsystem IP block
2022 * Assumes the caller takes care of locking if needed. 2598 * hasn't been initialized and set up yet, do so now. This must be
2599 * done first since sleep dependencies may be added from other hwmods
2600 * to the MPU. Intended to be called only by omap_hwmod_setup*(). No
2601 * return value.
2023 */ 2602 */
2024static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data) 2603static void __init _ensure_mpu_hwmod_is_setup(struct omap_hwmod *oh)
2025{ 2604{
2026 if (oh->_state != _HWMOD_STATE_REGISTERED) 2605 if (!mpu_oh || mpu_oh->_state == _HWMOD_STATE_UNKNOWN)
2027 return 0; 2606 pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet registered\n",
2028 2607 __func__, MPU_INITIATOR_NAME);
2029 if (oh->_int_flags & _HWMOD_NO_MPU_PORT) 2608 else if (mpu_oh->_state == _HWMOD_STATE_REGISTERED && oh != mpu_oh)
2030 return 0; 2609 omap_hwmod_setup_one(MPU_INITIATOR_NAME);
2031
2032 oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index);
2033
2034 return 0;
2035} 2610}
2036 2611
2037/** 2612/**
2038 * omap_hwmod_setup_one - set up a single hwmod 2613 * omap_hwmod_setup_one - set up a single hwmod
2039 * @oh_name: const char * name of the already-registered hwmod to set up 2614 * @oh_name: const char * name of the already-registered hwmod to set up
2040 * 2615 *
2041 * Must be called after omap2_clk_init(). Resolves the struct clk 2616 * Initialize and set up a single hwmod. Intended to be used for a
2042 * names to struct clk pointers for each registered omap_hwmod. Also 2617 * small number of early devices, such as the timer IP blocks used for
2043 * calls _setup() on each hwmod. Returns -EINVAL upon error or 0 upon 2618 * the scheduler clock. Must be called after omap2_clk_init().
2044 * success. 2619 * Resolves the struct clk names to struct clk pointers for each
2620 * registered omap_hwmod. Also calls _setup() on each hwmod. Returns
2621 * -EINVAL upon error or 0 upon success.
2045 */ 2622 */
2046int __init omap_hwmod_setup_one(const char *oh_name) 2623int __init omap_hwmod_setup_one(const char *oh_name)
2047{ 2624{
2048 struct omap_hwmod *oh; 2625 struct omap_hwmod *oh;
2049 int r;
2050 2626
2051 pr_debug("omap_hwmod: %s: %s\n", oh_name, __func__); 2627 pr_debug("omap_hwmod: %s: %s\n", oh_name, __func__);
2052 2628
2053 if (!mpu_oh) {
2054 pr_err("omap_hwmod: %s: cannot setup_one: MPU initiator hwmod %s not yet registered\n",
2055 oh_name, MPU_INITIATOR_NAME);
2056 return -EINVAL;
2057 }
2058
2059 oh = _lookup(oh_name); 2629 oh = _lookup(oh_name);
2060 if (!oh) { 2630 if (!oh) {
2061 WARN(1, "omap_hwmod: %s: hwmod not yet registered\n", oh_name); 2631 WARN(1, "omap_hwmod: %s: hwmod not yet registered\n", oh_name);
2062 return -EINVAL; 2632 return -EINVAL;
2063 } 2633 }
2064 2634
2065 if (mpu_oh->_state == _HWMOD_STATE_REGISTERED && oh != mpu_oh) 2635 _ensure_mpu_hwmod_is_setup(oh);
2066 omap_hwmod_setup_one(MPU_INITIATOR_NAME);
2067
2068 r = _populate_mpu_rt_base(oh, NULL);
2069 if (IS_ERR_VALUE(r)) {
2070 WARN(1, "omap_hwmod: %s: couldn't set mpu_rt_base\n", oh_name);
2071 return -EINVAL;
2072 }
2073
2074 r = _init_clocks(oh, NULL);
2075 if (IS_ERR_VALUE(r)) {
2076 WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh_name);
2077 return -EINVAL;
2078 }
2079 2636
2637 _init(oh, NULL);
2080 _setup(oh, NULL); 2638 _setup(oh, NULL);
2081 2639
2082 return 0; 2640 return 0;
2083} 2641}
2084 2642
2085/** 2643/**
2086 * omap_hwmod_setup - do some post-clock framework initialization 2644 * omap_hwmod_setup_all - set up all registered IP blocks
2087 * 2645 *
2088 * Must be called after omap2_clk_init(). Resolves the struct clk names 2646 * Initialize and set up all IP blocks registered with the hwmod code.
2089 * to struct clk pointers for each registered omap_hwmod. Also calls 2647 * Must be called after omap2_clk_init(). Resolves the struct clk
2090 * _setup() on each hwmod. Returns 0 upon success. 2648 * names to struct clk pointers for each registered omap_hwmod. Also
2649 * calls _setup() on each hwmod. Returns 0 upon success.
2091 */ 2650 */
2092static int __init omap_hwmod_setup_all(void) 2651static int __init omap_hwmod_setup_all(void)
2093{ 2652{
2094 int r; 2653 _ensure_mpu_hwmod_is_setup(NULL);
2095
2096 if (!mpu_oh) {
2097 pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet registered\n",
2098 __func__, MPU_INITIATOR_NAME);
2099 return -EINVAL;
2100 }
2101
2102 r = omap_hwmod_for_each(_populate_mpu_rt_base, NULL);
2103
2104 r = omap_hwmod_for_each(_init_clocks, NULL);
2105 WARN(IS_ERR_VALUE(r),
2106 "omap_hwmod: %s: _init_clocks failed\n", __func__);
2107 2654
2655 omap_hwmod_for_each(_init, NULL);
2108 omap_hwmod_for_each(_setup, NULL); 2656 omap_hwmod_for_each(_setup, NULL);
2109 2657
2110 return 0; 2658 return 0;
@@ -2261,6 +2809,10 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
2261 return r; 2809 return r;
2262} 2810}
2263 2811
2812/*
2813 * IP block data retrieval functions
2814 */
2815
2264/** 2816/**
2265 * omap_hwmod_count_resources - count number of struct resources needed by hwmod 2817 * omap_hwmod_count_resources - count number of struct resources needed by hwmod
2266 * @oh: struct omap_hwmod * 2818 * @oh: struct omap_hwmod *
@@ -2279,12 +2831,19 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
2279 */ 2831 */
2280int omap_hwmod_count_resources(struct omap_hwmod *oh) 2832int omap_hwmod_count_resources(struct omap_hwmod *oh)
2281{ 2833{
2282 int ret, i; 2834 struct omap_hwmod_ocp_if *os;
2835 struct list_head *p;
2836 int ret;
2837 int i = 0;
2283 2838
2284 ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh); 2839 ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
2285 2840
2286 for (i = 0; i < oh->slaves_cnt; i++) 2841 p = oh->slave_ports.next;
2287 ret += _count_ocp_if_addr_spaces(oh->slaves[i]); 2842
2843 while (i < oh->slaves_cnt) {
2844 os = _fetch_next_ocp_if(&p, &i);
2845 ret += _count_ocp_if_addr_spaces(os);
2846 }
2288 2847
2289 return ret; 2848 return ret;
2290} 2849}
@@ -2301,7 +2860,9 @@ int omap_hwmod_count_resources(struct omap_hwmod *oh)
2301 */ 2860 */
2302int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) 2861int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
2303{ 2862{
2304 int i, j, mpu_irqs_cnt, sdma_reqs_cnt; 2863 struct omap_hwmod_ocp_if *os;
2864 struct list_head *p;
2865 int i, j, mpu_irqs_cnt, sdma_reqs_cnt, addr_cnt;
2305 int r = 0; 2866 int r = 0;
2306 2867
2307 /* For each IRQ, DMA, memory area, fill in array.*/ 2868 /* For each IRQ, DMA, memory area, fill in array.*/
@@ -2324,11 +2885,11 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
2324 r++; 2885 r++;
2325 } 2886 }
2326 2887
2327 for (i = 0; i < oh->slaves_cnt; i++) { 2888 p = oh->slave_ports.next;
2328 struct omap_hwmod_ocp_if *os;
2329 int addr_cnt;
2330 2889
2331 os = oh->slaves[i]; 2890 i = 0;
2891 while (i < oh->slaves_cnt) {
2892 os = _fetch_next_ocp_if(&p, &i);
2332 addr_cnt = _count_ocp_if_addr_spaces(os); 2893 addr_cnt = _count_ocp_if_addr_spaces(os);
2333 2894
2334 for (j = 0; j < addr_cnt; j++) { 2895 for (j = 0; j < addr_cnt; j++) {
@@ -2344,6 +2905,69 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
2344} 2905}
2345 2906
2346/** 2907/**
2908 * omap_hwmod_get_resource_byname - fetch IP block integration data by name
2909 * @oh: struct omap_hwmod * to operate on
2910 * @type: one of the IORESOURCE_* constants from include/linux/ioport.h
2911 * @name: pointer to the name of the data to fetch (optional)
2912 * @rsrc: pointer to a struct resource, allocated by the caller
2913 *
2914 * Retrieve MPU IRQ, SDMA request line, or address space start/end
2915 * data for the IP block pointed to by @oh. The data will be filled
2916 * into a struct resource record pointed to by @rsrc. The struct
2917 * resource must be allocated by the caller. When @name is non-null,
2918 * the data associated with the matching entry in the IRQ/SDMA/address
2919 * space hwmod data arrays will be returned. If @name is null, the
2920 * first array entry will be returned. Data order is not meaningful
2921 * in hwmod data, so callers are strongly encouraged to use a non-null
2922 * @name whenever possible to avoid unpredictable effects if hwmod
2923 * data is later added that causes data ordering to change. This
2924 * function is only intended for use by OMAP core code. Device
2925 * drivers should not call this function - the appropriate bus-related
2926 * data accessor functions should be used instead. Returns 0 upon
2927 * success or a negative error code upon error.
2928 */
2929int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
2930 const char *name, struct resource *rsrc)
2931{
2932 int r;
2933 unsigned int irq, dma;
2934 u32 pa_start, pa_end;
2935
2936 if (!oh || !rsrc)
2937 return -EINVAL;
2938
2939 if (type == IORESOURCE_IRQ) {
2940 r = _get_mpu_irq_by_name(oh, name, &irq);
2941 if (r)
2942 return r;
2943
2944 rsrc->start = irq;
2945 rsrc->end = irq;
2946 } else if (type == IORESOURCE_DMA) {
2947 r = _get_sdma_req_by_name(oh, name, &dma);
2948 if (r)
2949 return r;
2950
2951 rsrc->start = dma;
2952 rsrc->end = dma;
2953 } else if (type == IORESOURCE_MEM) {
2954 r = _get_addr_space_by_name(oh, name, &pa_start, &pa_end);
2955 if (r)
2956 return r;
2957
2958 rsrc->start = pa_start;
2959 rsrc->end = pa_end;
2960 } else {
2961 return -EINVAL;
2962 }
2963
2964 rsrc->flags = type;
2965 rsrc->name = name;
2966
2967 return 0;
2968}
2969
2970/**
2347 * omap_hwmod_get_pwrdm - return pointer to this module's main powerdomain 2971 * omap_hwmod_get_pwrdm - return pointer to this module's main powerdomain
2348 * @oh: struct omap_hwmod * 2972 * @oh: struct omap_hwmod *
2349 * 2973 *
@@ -2357,6 +2981,7 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
2357struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh) 2981struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
2358{ 2982{
2359 struct clk *c; 2983 struct clk *c;
2984 struct omap_hwmod_ocp_if *oi;
2360 2985
2361 if (!oh) 2986 if (!oh)
2362 return NULL; 2987 return NULL;
@@ -2364,9 +2989,10 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
2364 if (oh->_clk) { 2989 if (oh->_clk) {
2365 c = oh->_clk; 2990 c = oh->_clk;
2366 } else { 2991 } else {
2367 if (oh->_int_flags & _HWMOD_NO_MPU_PORT) 2992 oi = _find_mpu_rt_port(oh);
2993 if (!oi)
2368 return NULL; 2994 return NULL;
2369 c = oh->slaves[oh->_mpu_port_index]->_clk; 2995 c = oi->_clk;
2370 } 2996 }
2371 2997
2372 if (!c->clkdm) 2998 if (!c->clkdm)
@@ -2640,10 +3266,10 @@ int omap_hwmod_for_each_by_class(const char *classname,
2640 * @state: state that _setup() should leave the hwmod in 3266 * @state: state that _setup() should leave the hwmod in
2641 * 3267 *
2642 * Sets the hwmod state that @oh will enter at the end of _setup() 3268 * Sets the hwmod state that @oh will enter at the end of _setup()
2643 * (called by omap_hwmod_setup_*()). Only valid to call between 3269 * (called by omap_hwmod_setup_*()). See also the documentation
2644 * calling omap_hwmod_register() and omap_hwmod_setup_*(). Returns 3270 * for _setup_postsetup(), above. Returns 0 upon success or
2645 * 0 upon success or -EINVAL if there is a problem with the arguments 3271 * -EINVAL if there is a problem with the arguments or if the hwmod is
2646 * or if the hwmod is in the wrong state. 3272 * in the wrong state.
2647 */ 3273 */
2648int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state) 3274int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state)
2649{ 3275{
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index a5409ce3f323..2c087ffc6a92 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -2,6 +2,7 @@
2 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips 2 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
3 * 3 *
4 * Copyright (C) 2009-2011 Nokia Corporation 4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley 6 * Paul Walmsley
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
@@ -32,707 +33,268 @@
32/* 33/*
33 * OMAP2420 hardware module integration data 34 * OMAP2420 hardware module integration data
34 * 35 *
35 * ALl of the data in this section should be autogeneratable from the 36 * All of the data in this section should be autogeneratable from the
36 * TI hardware database or other technical documentation. Data that 37 * TI hardware database or other technical documentation. Data that
37 * is driver-specific or driver-kernel integration-specific belongs 38 * is driver-specific or driver-kernel integration-specific belongs
38 * elsewhere. 39 * elsewhere.
39 */ 40 */
40 41
41static struct omap_hwmod omap2420_mpu_hwmod;
42static struct omap_hwmod omap2420_iva_hwmod;
43static struct omap_hwmod omap2420_l3_main_hwmod;
44static struct omap_hwmod omap2420_l4_core_hwmod;
45static struct omap_hwmod omap2420_dss_core_hwmod;
46static struct omap_hwmod omap2420_dss_dispc_hwmod;
47static struct omap_hwmod omap2420_dss_rfbi_hwmod;
48static struct omap_hwmod omap2420_dss_venc_hwmod;
49static struct omap_hwmod omap2420_wd_timer2_hwmod;
50static struct omap_hwmod omap2420_gpio1_hwmod;
51static struct omap_hwmod omap2420_gpio2_hwmod;
52static struct omap_hwmod omap2420_gpio3_hwmod;
53static struct omap_hwmod omap2420_gpio4_hwmod;
54static struct omap_hwmod omap2420_dma_system_hwmod;
55static struct omap_hwmod omap2420_mcspi1_hwmod;
56static struct omap_hwmod omap2420_mcspi2_hwmod;
57
58/* L3 -> L4_CORE interface */
59static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
60 .master = &omap2420_l3_main_hwmod,
61 .slave = &omap2420_l4_core_hwmod,
62 .user = OCP_USER_MPU | OCP_USER_SDMA,
63};
64
65/* MPU -> L3 interface */
66static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
67 .master = &omap2420_mpu_hwmod,
68 .slave = &omap2420_l3_main_hwmod,
69 .user = OCP_USER_MPU,
70};
71
72/* Slave interfaces on the L3 interconnect */
73static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
74 &omap2420_mpu__l3_main,
75};
76
77/* DSS -> l3 */
78static struct omap_hwmod_ocp_if omap2420_dss__l3 = {
79 .master = &omap2420_dss_core_hwmod,
80 .slave = &omap2420_l3_main_hwmod,
81 .fw = {
82 .omap2 = {
83 .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
84 .flags = OMAP_FIREWALL_L3,
85 }
86 },
87 .user = OCP_USER_MPU | OCP_USER_SDMA,
88};
89
90/* Master interfaces on the L3 interconnect */
91static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
92 &omap2420_l3_main__l4_core,
93};
94
95/* L3 */
96static struct omap_hwmod omap2420_l3_main_hwmod = {
97 .name = "l3_main",
98 .class = &l3_hwmod_class,
99 .masters = omap2420_l3_main_masters,
100 .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
101 .slaves = omap2420_l3_main_slaves,
102 .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
103 .flags = HWMOD_NO_IDLEST,
104};
105
106static struct omap_hwmod omap2420_l4_wkup_hwmod;
107static struct omap_hwmod omap2420_uart1_hwmod;
108static struct omap_hwmod omap2420_uart2_hwmod;
109static struct omap_hwmod omap2420_uart3_hwmod;
110static struct omap_hwmod omap2420_i2c1_hwmod;
111static struct omap_hwmod omap2420_i2c2_hwmod;
112static struct omap_hwmod omap2420_mcbsp1_hwmod;
113static struct omap_hwmod omap2420_mcbsp2_hwmod;
114
115/* l4 core -> mcspi1 interface */
116static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = {
117 .master = &omap2420_l4_core_hwmod,
118 .slave = &omap2420_mcspi1_hwmod,
119 .clk = "mcspi1_ick",
120 .addr = omap2_mcspi1_addr_space,
121 .user = OCP_USER_MPU | OCP_USER_SDMA,
122};
123
124/* l4 core -> mcspi2 interface */
125static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = {
126 .master = &omap2420_l4_core_hwmod,
127 .slave = &omap2420_mcspi2_hwmod,
128 .clk = "mcspi2_ick",
129 .addr = omap2_mcspi2_addr_space,
130 .user = OCP_USER_MPU | OCP_USER_SDMA,
131};
132
133/* L4_CORE -> L4_WKUP interface */
134static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
135 .master = &omap2420_l4_core_hwmod,
136 .slave = &omap2420_l4_wkup_hwmod,
137 .user = OCP_USER_MPU | OCP_USER_SDMA,
138};
139
140/* L4 CORE -> UART1 interface */
141static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
142 .master = &omap2420_l4_core_hwmod,
143 .slave = &omap2420_uart1_hwmod,
144 .clk = "uart1_ick",
145 .addr = omap2xxx_uart1_addr_space,
146 .user = OCP_USER_MPU | OCP_USER_SDMA,
147};
148
149/* L4 CORE -> UART2 interface */
150static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
151 .master = &omap2420_l4_core_hwmod,
152 .slave = &omap2420_uart2_hwmod,
153 .clk = "uart2_ick",
154 .addr = omap2xxx_uart2_addr_space,
155 .user = OCP_USER_MPU | OCP_USER_SDMA,
156};
157
158/* L4 PER -> UART3 interface */
159static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
160 .master = &omap2420_l4_core_hwmod,
161 .slave = &omap2420_uart3_hwmod,
162 .clk = "uart3_ick",
163 .addr = omap2xxx_uart3_addr_space,
164 .user = OCP_USER_MPU | OCP_USER_SDMA,
165};
166
167/* L4 CORE -> I2C1 interface */
168static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
169 .master = &omap2420_l4_core_hwmod,
170 .slave = &omap2420_i2c1_hwmod,
171 .clk = "i2c1_ick",
172 .addr = omap2_i2c1_addr_space,
173 .user = OCP_USER_MPU | OCP_USER_SDMA,
174};
175
176/* L4 CORE -> I2C2 interface */
177static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
178 .master = &omap2420_l4_core_hwmod,
179 .slave = &omap2420_i2c2_hwmod,
180 .clk = "i2c2_ick",
181 .addr = omap2_i2c2_addr_space,
182 .user = OCP_USER_MPU | OCP_USER_SDMA,
183};
184
185/* Slave interfaces on the L4_CORE interconnect */
186static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
187 &omap2420_l3_main__l4_core,
188};
189
190/* Master interfaces on the L4_CORE interconnect */
191static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
192 &omap2420_l4_core__l4_wkup,
193 &omap2_l4_core__uart1,
194 &omap2_l4_core__uart2,
195 &omap2_l4_core__uart3,
196 &omap2420_l4_core__i2c1,
197 &omap2420_l4_core__i2c2
198};
199
200/* L4 CORE */
201static struct omap_hwmod omap2420_l4_core_hwmod = {
202 .name = "l4_core",
203 .class = &l4_hwmod_class,
204 .masters = omap2420_l4_core_masters,
205 .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
206 .slaves = omap2420_l4_core_slaves,
207 .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
208 .flags = HWMOD_NO_IDLEST,
209};
210
211/* Slave interfaces on the L4_WKUP interconnect */
212static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
213 &omap2420_l4_core__l4_wkup,
214};
215
216/* Master interfaces on the L4_WKUP interconnect */
217static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
218};
219
220/* L4 WKUP */
221static struct omap_hwmod omap2420_l4_wkup_hwmod = {
222 .name = "l4_wkup",
223 .class = &l4_hwmod_class,
224 .masters = omap2420_l4_wkup_masters,
225 .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
226 .slaves = omap2420_l4_wkup_slaves,
227 .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
228 .flags = HWMOD_NO_IDLEST,
229};
230
231/* Master interfaces on the MPU device */
232static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
233 &omap2420_mpu__l3_main,
234};
235
236/* MPU */
237static struct omap_hwmod omap2420_mpu_hwmod = {
238 .name = "mpu",
239 .class = &mpu_hwmod_class,
240 .main_clk = "mpu_ck",
241 .masters = omap2420_mpu_masters,
242 .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
243};
244
245/* 42/*
246 * IVA1 interface data 43 * IP blocks
247 */ 44 */
248 45
249/* IVA <- L3 interface */ 46/* IVA1 (IVA1) */
250static struct omap_hwmod_ocp_if omap2420_l3__iva = { 47static struct omap_hwmod_class iva1_hwmod_class = {
251 .master = &omap2420_l3_main_hwmod, 48 .name = "iva1",
252 .slave = &omap2420_iva_hwmod,
253 .clk = "iva1_ifck",
254 .user = OCP_USER_MPU | OCP_USER_SDMA,
255}; 49};
256 50
257static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = { 51static struct omap_hwmod_rst_info omap2420_iva_resets[] = {
258 &omap2420_l3__iva, 52 { .name = "iva", .rst_shift = 8 },
259}; 53};
260 54
261/*
262 * IVA2 (IVA2)
263 */
264
265static struct omap_hwmod omap2420_iva_hwmod = { 55static struct omap_hwmod omap2420_iva_hwmod = {
266 .name = "iva", 56 .name = "iva",
267 .class = &iva_hwmod_class, 57 .class = &iva1_hwmod_class,
268 .masters = omap2420_iva_masters, 58 .clkdm_name = "iva1_clkdm",
269 .masters_cnt = ARRAY_SIZE(omap2420_iva_masters), 59 .rst_lines = omap2420_iva_resets,
60 .rst_lines_cnt = ARRAY_SIZE(omap2420_iva_resets),
61 .main_clk = "iva1_ifck",
270}; 62};
271 63
272/* always-on timers dev attribute */ 64/* DSP */
273static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { 65static struct omap_hwmod_class dsp_hwmod_class = {
274 .timer_capability = OMAP_TIMER_ALWON, 66 .name = "dsp",
275};
276
277/* pwm timers dev attribute */
278static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
279 .timer_capability = OMAP_TIMER_HAS_PWM,
280};
281
282/* timer1 */
283static struct omap_hwmod omap2420_timer1_hwmod;
284
285static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
286 {
287 .pa_start = 0x48028000,
288 .pa_end = 0x48028000 + SZ_1K - 1,
289 .flags = ADDR_TYPE_RT
290 },
291 { }
292}; 67};
293 68
294/* l4_wkup -> timer1 */ 69static struct omap_hwmod_rst_info omap2420_dsp_resets[] = {
295static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = { 70 { .name = "logic", .rst_shift = 0 },
296 .master = &omap2420_l4_wkup_hwmod, 71 { .name = "mmu", .rst_shift = 1 },
297 .slave = &omap2420_timer1_hwmod,
298 .clk = "gpt1_ick",
299 .addr = omap2420_timer1_addrs,
300 .user = OCP_USER_MPU | OCP_USER_SDMA,
301}; 72};
302 73
303/* timer1 slave port */ 74static struct omap_hwmod omap2420_dsp_hwmod = {
304static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = { 75 .name = "dsp",
305 &omap2420_l4_wkup__timer1, 76 .class = &dsp_hwmod_class,
77 .clkdm_name = "dsp_clkdm",
78 .rst_lines = omap2420_dsp_resets,
79 .rst_lines_cnt = ARRAY_SIZE(omap2420_dsp_resets),
80 .main_clk = "dsp_fck",
306}; 81};
307 82
308/* timer1 hwmod */ 83/* I2C common */
309static struct omap_hwmod omap2420_timer1_hwmod = { 84static struct omap_hwmod_class_sysconfig i2c_sysc = {
310 .name = "timer1", 85 .rev_offs = 0x00,
311 .mpu_irqs = omap2_timer1_mpu_irqs, 86 .sysc_offs = 0x20,
312 .main_clk = "gpt1_fck", 87 .syss_offs = 0x10,
313 .prcm = { 88 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
314 .omap2 = { 89 .sysc_fields = &omap_hwmod_sysc_type1,
315 .prcm_reg_id = 1,
316 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
317 .module_offs = WKUP_MOD,
318 .idlest_reg_id = 1,
319 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
320 },
321 },
322 .dev_attr = &capability_alwon_dev_attr,
323 .slaves = omap2420_timer1_slaves,
324 .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves),
325 .class = &omap2xxx_timer_hwmod_class,
326}; 90};
327 91
328/* timer2 */ 92static struct omap_hwmod_class i2c_class = {
329static struct omap_hwmod omap2420_timer2_hwmod; 93 .name = "i2c",
330 94 .sysc = &i2c_sysc,
331/* l4_core -> timer2 */ 95 .rev = OMAP_I2C_IP_VERSION_1,
332static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = { 96 .reset = &omap_i2c_reset,
333 .master = &omap2420_l4_core_hwmod,
334 .slave = &omap2420_timer2_hwmod,
335 .clk = "gpt2_ick",
336 .addr = omap2xxx_timer2_addrs,
337 .user = OCP_USER_MPU | OCP_USER_SDMA,
338}; 97};
339 98
340/* timer2 slave port */ 99static struct omap_i2c_dev_attr i2c_dev_attr = {
341static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = { 100 .flags = OMAP_I2C_FLAG_NO_FIFO |
342 &omap2420_l4_core__timer2, 101 OMAP_I2C_FLAG_SIMPLE_CLOCK |
102 OMAP_I2C_FLAG_16BIT_DATA_REG |
103 OMAP_I2C_FLAG_BUS_SHIFT_2,
343}; 104};
344 105
345/* timer2 hwmod */ 106/* I2C1 */
346static struct omap_hwmod omap2420_timer2_hwmod = { 107static struct omap_hwmod omap2420_i2c1_hwmod = {
347 .name = "timer2", 108 .name = "i2c1",
348 .mpu_irqs = omap2_timer2_mpu_irqs, 109 .mpu_irqs = omap2_i2c1_mpu_irqs,
349 .main_clk = "gpt2_fck", 110 .sdma_reqs = omap2_i2c1_sdma_reqs,
111 .main_clk = "i2c1_fck",
350 .prcm = { 112 .prcm = {
351 .omap2 = { 113 .omap2 = {
352 .prcm_reg_id = 1,
353 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
354 .module_offs = CORE_MOD, 114 .module_offs = CORE_MOD,
355 .idlest_reg_id = 1,
356 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
357 },
358 },
359 .dev_attr = &capability_alwon_dev_attr,
360 .slaves = omap2420_timer2_slaves,
361 .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves),
362 .class = &omap2xxx_timer_hwmod_class,
363};
364
365/* timer3 */
366static struct omap_hwmod omap2420_timer3_hwmod;
367
368/* l4_core -> timer3 */
369static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = {
370 .master = &omap2420_l4_core_hwmod,
371 .slave = &omap2420_timer3_hwmod,
372 .clk = "gpt3_ick",
373 .addr = omap2xxx_timer3_addrs,
374 .user = OCP_USER_MPU | OCP_USER_SDMA,
375};
376
377/* timer3 slave port */
378static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
379 &omap2420_l4_core__timer3,
380};
381
382/* timer3 hwmod */
383static struct omap_hwmod omap2420_timer3_hwmod = {
384 .name = "timer3",
385 .mpu_irqs = omap2_timer3_mpu_irqs,
386 .main_clk = "gpt3_fck",
387 .prcm = {
388 .omap2 = {
389 .prcm_reg_id = 1, 115 .prcm_reg_id = 1,
390 .module_bit = OMAP24XX_EN_GPT3_SHIFT, 116 .module_bit = OMAP2420_EN_I2C1_SHIFT,
391 .module_offs = CORE_MOD,
392 .idlest_reg_id = 1, 117 .idlest_reg_id = 1,
393 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT, 118 .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
394 }, 119 },
395 }, 120 },
396 .dev_attr = &capability_alwon_dev_attr, 121 .class = &i2c_class,
397 .slaves = omap2420_timer3_slaves, 122 .dev_attr = &i2c_dev_attr,
398 .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves), 123 .flags = HWMOD_16BIT_REG,
399 .class = &omap2xxx_timer_hwmod_class,
400};
401
402/* timer4 */
403static struct omap_hwmod omap2420_timer4_hwmod;
404
405/* l4_core -> timer4 */
406static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = {
407 .master = &omap2420_l4_core_hwmod,
408 .slave = &omap2420_timer4_hwmod,
409 .clk = "gpt4_ick",
410 .addr = omap2xxx_timer4_addrs,
411 .user = OCP_USER_MPU | OCP_USER_SDMA,
412};
413
414/* timer4 slave port */
415static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
416 &omap2420_l4_core__timer4,
417}; 124};
418 125
419/* timer4 hwmod */ 126/* I2C2 */
420static struct omap_hwmod omap2420_timer4_hwmod = { 127static struct omap_hwmod omap2420_i2c2_hwmod = {
421 .name = "timer4", 128 .name = "i2c2",
422 .mpu_irqs = omap2_timer4_mpu_irqs, 129 .mpu_irqs = omap2_i2c2_mpu_irqs,
423 .main_clk = "gpt4_fck", 130 .sdma_reqs = omap2_i2c2_sdma_reqs,
131 .main_clk = "i2c2_fck",
424 .prcm = { 132 .prcm = {
425 .omap2 = { 133 .omap2 = {
426 .prcm_reg_id = 1,
427 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
428 .module_offs = CORE_MOD, 134 .module_offs = CORE_MOD,
429 .idlest_reg_id = 1,
430 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
431 },
432 },
433 .dev_attr = &capability_alwon_dev_attr,
434 .slaves = omap2420_timer4_slaves,
435 .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves),
436 .class = &omap2xxx_timer_hwmod_class,
437};
438
439/* timer5 */
440static struct omap_hwmod omap2420_timer5_hwmod;
441
442/* l4_core -> timer5 */
443static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = {
444 .master = &omap2420_l4_core_hwmod,
445 .slave = &omap2420_timer5_hwmod,
446 .clk = "gpt5_ick",
447 .addr = omap2xxx_timer5_addrs,
448 .user = OCP_USER_MPU | OCP_USER_SDMA,
449};
450
451/* timer5 slave port */
452static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
453 &omap2420_l4_core__timer5,
454};
455
456/* timer5 hwmod */
457static struct omap_hwmod omap2420_timer5_hwmod = {
458 .name = "timer5",
459 .mpu_irqs = omap2_timer5_mpu_irqs,
460 .main_clk = "gpt5_fck",
461 .prcm = {
462 .omap2 = {
463 .prcm_reg_id = 1, 135 .prcm_reg_id = 1,
464 .module_bit = OMAP24XX_EN_GPT5_SHIFT, 136 .module_bit = OMAP2420_EN_I2C2_SHIFT,
465 .module_offs = CORE_MOD,
466 .idlest_reg_id = 1, 137 .idlest_reg_id = 1,
467 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, 138 .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
468 }, 139 },
469 }, 140 },
470 .dev_attr = &capability_alwon_dev_attr, 141 .class = &i2c_class,
471 .slaves = omap2420_timer5_slaves, 142 .dev_attr = &i2c_dev_attr,
472 .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves), 143 .flags = HWMOD_16BIT_REG,
473 .class = &omap2xxx_timer_hwmod_class,
474};
475
476
477/* timer6 */
478static struct omap_hwmod omap2420_timer6_hwmod;
479
480/* l4_core -> timer6 */
481static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = {
482 .master = &omap2420_l4_core_hwmod,
483 .slave = &omap2420_timer6_hwmod,
484 .clk = "gpt6_ick",
485 .addr = omap2xxx_timer6_addrs,
486 .user = OCP_USER_MPU | OCP_USER_SDMA,
487};
488
489/* timer6 slave port */
490static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = {
491 &omap2420_l4_core__timer6,
492}; 144};
493 145
494/* timer6 hwmod */ 146/* dma attributes */
495static struct omap_hwmod omap2420_timer6_hwmod = { 147static struct omap_dma_dev_attr dma_dev_attr = {
496 .name = "timer6", 148 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
497 .mpu_irqs = omap2_timer6_mpu_irqs, 149 IS_CSSA_32 | IS_CDSA_32,
498 .main_clk = "gpt6_fck", 150 .lch_count = 32,
499 .prcm = {
500 .omap2 = {
501 .prcm_reg_id = 1,
502 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
503 .module_offs = CORE_MOD,
504 .idlest_reg_id = 1,
505 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
506 },
507 },
508 .dev_attr = &capability_alwon_dev_attr,
509 .slaves = omap2420_timer6_slaves,
510 .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves),
511 .class = &omap2xxx_timer_hwmod_class,
512}; 151};
513 152
514/* timer7 */ 153static struct omap_hwmod omap2420_dma_system_hwmod = {
515static struct omap_hwmod omap2420_timer7_hwmod; 154 .name = "dma",
516 155 .class = &omap2xxx_dma_hwmod_class,
517/* l4_core -> timer7 */ 156 .mpu_irqs = omap2_dma_system_irqs,
518static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = { 157 .main_clk = "core_l3_ck",
519 .master = &omap2420_l4_core_hwmod, 158 .dev_attr = &dma_dev_attr,
520 .slave = &omap2420_timer7_hwmod, 159 .flags = HWMOD_NO_IDLEST,
521 .clk = "gpt7_ick",
522 .addr = omap2xxx_timer7_addrs,
523 .user = OCP_USER_MPU | OCP_USER_SDMA,
524}; 160};
525 161
526/* timer7 slave port */ 162/* mailbox */
527static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = { 163static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
528 &omap2420_l4_core__timer7, 164 { .name = "dsp", .irq = 26 },
165 { .name = "iva", .irq = 34 },
166 { .irq = -1 }
529}; 167};
530 168
531/* timer7 hwmod */ 169static struct omap_hwmod omap2420_mailbox_hwmod = {
532static struct omap_hwmod omap2420_timer7_hwmod = { 170 .name = "mailbox",
533 .name = "timer7", 171 .class = &omap2xxx_mailbox_hwmod_class,
534 .mpu_irqs = omap2_timer7_mpu_irqs, 172 .mpu_irqs = omap2420_mailbox_irqs,
535 .main_clk = "gpt7_fck", 173 .main_clk = "mailboxes_ick",
536 .prcm = { 174 .prcm = {
537 .omap2 = { 175 .omap2 = {
538 .prcm_reg_id = 1, 176 .prcm_reg_id = 1,
539 .module_bit = OMAP24XX_EN_GPT7_SHIFT, 177 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
540 .module_offs = CORE_MOD, 178 .module_offs = CORE_MOD,
541 .idlest_reg_id = 1, 179 .idlest_reg_id = 1,
542 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, 180 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
543 }, 181 },
544 }, 182 },
545 .dev_attr = &capability_alwon_dev_attr,
546 .slaves = omap2420_timer7_slaves,
547 .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves),
548 .class = &omap2xxx_timer_hwmod_class,
549}; 183};
550 184
551/* timer8 */ 185/*
552static struct omap_hwmod omap2420_timer8_hwmod; 186 * 'mcbsp' class
187 * multi channel buffered serial port controller
188 */
553 189
554/* l4_core -> timer8 */ 190static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
555static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = { 191 .name = "mcbsp",
556 .master = &omap2420_l4_core_hwmod,
557 .slave = &omap2420_timer8_hwmod,
558 .clk = "gpt8_ick",
559 .addr = omap2xxx_timer8_addrs,
560 .user = OCP_USER_MPU | OCP_USER_SDMA,
561}; 192};
562 193
563/* timer8 slave port */ 194/* mcbsp1 */
564static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = { 195static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
565 &omap2420_l4_core__timer8, 196 { .name = "tx", .irq = 59 },
197 { .name = "rx", .irq = 60 },
198 { .irq = -1 }
566}; 199};
567 200
568/* timer8 hwmod */ 201static struct omap_hwmod omap2420_mcbsp1_hwmod = {
569static struct omap_hwmod omap2420_timer8_hwmod = { 202 .name = "mcbsp1",
570 .name = "timer8", 203 .class = &omap2420_mcbsp_hwmod_class,
571 .mpu_irqs = omap2_timer8_mpu_irqs, 204 .mpu_irqs = omap2420_mcbsp1_irqs,
572 .main_clk = "gpt8_fck", 205 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
206 .main_clk = "mcbsp1_fck",
573 .prcm = { 207 .prcm = {
574 .omap2 = { 208 .omap2 = {
575 .prcm_reg_id = 1, 209 .prcm_reg_id = 1,
576 .module_bit = OMAP24XX_EN_GPT8_SHIFT, 210 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
577 .module_offs = CORE_MOD, 211 .module_offs = CORE_MOD,
578 .idlest_reg_id = 1, 212 .idlest_reg_id = 1,
579 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, 213 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
580 }, 214 },
581 }, 215 },
582 .dev_attr = &capability_alwon_dev_attr,
583 .slaves = omap2420_timer8_slaves,
584 .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves),
585 .class = &omap2xxx_timer_hwmod_class,
586};
587
588/* timer9 */
589static struct omap_hwmod omap2420_timer9_hwmod;
590
591/* l4_core -> timer9 */
592static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = {
593 .master = &omap2420_l4_core_hwmod,
594 .slave = &omap2420_timer9_hwmod,
595 .clk = "gpt9_ick",
596 .addr = omap2xxx_timer9_addrs,
597 .user = OCP_USER_MPU | OCP_USER_SDMA,
598}; 216};
599 217
600/* timer9 slave port */ 218/* mcbsp2 */
601static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = { 219static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
602 &omap2420_l4_core__timer9, 220 { .name = "tx", .irq = 62 },
221 { .name = "rx", .irq = 63 },
222 { .irq = -1 }
603}; 223};
604 224
605/* timer9 hwmod */ 225static struct omap_hwmod omap2420_mcbsp2_hwmod = {
606static struct omap_hwmod omap2420_timer9_hwmod = { 226 .name = "mcbsp2",
607 .name = "timer9", 227 .class = &omap2420_mcbsp_hwmod_class,
608 .mpu_irqs = omap2_timer9_mpu_irqs, 228 .mpu_irqs = omap2420_mcbsp2_irqs,
609 .main_clk = "gpt9_fck", 229 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
230 .main_clk = "mcbsp2_fck",
610 .prcm = { 231 .prcm = {
611 .omap2 = { 232 .omap2 = {
612 .prcm_reg_id = 1, 233 .prcm_reg_id = 1,
613 .module_bit = OMAP24XX_EN_GPT9_SHIFT, 234 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
614 .module_offs = CORE_MOD, 235 .module_offs = CORE_MOD,
615 .idlest_reg_id = 1, 236 .idlest_reg_id = 1,
616 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT, 237 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
617 }, 238 },
618 }, 239 },
619 .dev_attr = &capability_pwm_dev_attr,
620 .slaves = omap2420_timer9_slaves,
621 .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves),
622 .class = &omap2xxx_timer_hwmod_class,
623}; 240};
624 241
625/* timer10 */ 242/*
626static struct omap_hwmod omap2420_timer10_hwmod; 243 * interfaces
244 */
627 245
628/* l4_core -> timer10 */ 246/* L4 CORE -> I2C1 interface */
629static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = { 247static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
630 .master = &omap2420_l4_core_hwmod, 248 .master = &omap2xxx_l4_core_hwmod,
631 .slave = &omap2420_timer10_hwmod, 249 .slave = &omap2420_i2c1_hwmod,
632 .clk = "gpt10_ick", 250 .clk = "i2c1_ick",
633 .addr = omap2_timer10_addrs, 251 .addr = omap2_i2c1_addr_space,
634 .user = OCP_USER_MPU | OCP_USER_SDMA, 252 .user = OCP_USER_MPU | OCP_USER_SDMA,
635}; 253};
636 254
637/* timer10 slave port */ 255/* L4 CORE -> I2C2 interface */
638static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = { 256static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
639 &omap2420_l4_core__timer10, 257 .master = &omap2xxx_l4_core_hwmod,
640}; 258 .slave = &omap2420_i2c2_hwmod,
641 259 .clk = "i2c2_ick",
642/* timer10 hwmod */ 260 .addr = omap2_i2c2_addr_space,
643static struct omap_hwmod omap2420_timer10_hwmod = { 261 .user = OCP_USER_MPU | OCP_USER_SDMA,
644 .name = "timer10",
645 .mpu_irqs = omap2_timer10_mpu_irqs,
646 .main_clk = "gpt10_fck",
647 .prcm = {
648 .omap2 = {
649 .prcm_reg_id = 1,
650 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
651 .module_offs = CORE_MOD,
652 .idlest_reg_id = 1,
653 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
654 },
655 },
656 .dev_attr = &capability_pwm_dev_attr,
657 .slaves = omap2420_timer10_slaves,
658 .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves),
659 .class = &omap2xxx_timer_hwmod_class,
660}; 262};
661 263
662/* timer11 */ 264/* IVA <- L3 interface */
663static struct omap_hwmod omap2420_timer11_hwmod; 265static struct omap_hwmod_ocp_if omap2420_l3__iva = {
664 266 .master = &omap2xxx_l3_main_hwmod,
665/* l4_core -> timer11 */ 267 .slave = &omap2420_iva_hwmod,
666static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = { 268 .clk = "core_l3_ck",
667 .master = &omap2420_l4_core_hwmod,
668 .slave = &omap2420_timer11_hwmod,
669 .clk = "gpt11_ick",
670 .addr = omap2_timer11_addrs,
671 .user = OCP_USER_MPU | OCP_USER_SDMA, 269 .user = OCP_USER_MPU | OCP_USER_SDMA,
672}; 270};
673 271
674/* timer11 slave port */ 272/* DSP <- L3 interface */
675static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = { 273static struct omap_hwmod_ocp_if omap2420_l3__dsp = {
676 &omap2420_l4_core__timer11, 274 .master = &omap2xxx_l3_main_hwmod,
275 .slave = &omap2420_dsp_hwmod,
276 .clk = "dsp_ick",
277 .user = OCP_USER_MPU | OCP_USER_SDMA,
677}; 278};
678 279
679/* timer11 hwmod */ 280static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
680static struct omap_hwmod omap2420_timer11_hwmod = { 281 {
681 .name = "timer11", 282 .pa_start = 0x48028000,
682 .mpu_irqs = omap2_timer11_mpu_irqs, 283 .pa_end = 0x48028000 + SZ_1K - 1,
683 .main_clk = "gpt11_fck", 284 .flags = ADDR_TYPE_RT
684 .prcm = {
685 .omap2 = {
686 .prcm_reg_id = 1,
687 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
688 .module_offs = CORE_MOD,
689 .idlest_reg_id = 1,
690 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
691 },
692 }, 285 },
693 .dev_attr = &capability_pwm_dev_attr, 286 { }
694 .slaves = omap2420_timer11_slaves,
695 .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves),
696 .class = &omap2xxx_timer_hwmod_class,
697}; 287};
698 288
699/* timer12 */ 289/* l4_wkup -> timer1 */
700static struct omap_hwmod omap2420_timer12_hwmod; 290static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
701 291 .master = &omap2xxx_l4_wkup_hwmod,
702/* l4_core -> timer12 */ 292 .slave = &omap2xxx_timer1_hwmod,
703static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = { 293 .clk = "gpt1_ick",
704 .master = &omap2420_l4_core_hwmod, 294 .addr = omap2420_timer1_addrs,
705 .slave = &omap2420_timer12_hwmod,
706 .clk = "gpt12_ick",
707 .addr = omap2xxx_timer12_addrs,
708 .user = OCP_USER_MPU | OCP_USER_SDMA, 295 .user = OCP_USER_MPU | OCP_USER_SDMA,
709}; 296};
710 297
711/* timer12 slave port */
712static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = {
713 &omap2420_l4_core__timer12,
714};
715
716/* timer12 hwmod */
717static struct omap_hwmod omap2420_timer12_hwmod = {
718 .name = "timer12",
719 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
720 .main_clk = "gpt12_fck",
721 .prcm = {
722 .omap2 = {
723 .prcm_reg_id = 1,
724 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
725 .module_offs = CORE_MOD,
726 .idlest_reg_id = 1,
727 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
728 },
729 },
730 .dev_attr = &capability_pwm_dev_attr,
731 .slaves = omap2420_timer12_slaves,
732 .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves),
733 .class = &omap2xxx_timer_hwmod_class,
734};
735
736/* l4_wkup -> wd_timer2 */ 298/* l4_wkup -> wd_timer2 */
737static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { 299static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
738 { 300 {
@@ -744,364 +306,13 @@ static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
744}; 306};
745 307
746static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = { 308static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
747 .master = &omap2420_l4_wkup_hwmod, 309 .master = &omap2xxx_l4_wkup_hwmod,
748 .slave = &omap2420_wd_timer2_hwmod, 310 .slave = &omap2xxx_wd_timer2_hwmod,
749 .clk = "mpu_wdt_ick", 311 .clk = "mpu_wdt_ick",
750 .addr = omap2420_wd_timer2_addrs, 312 .addr = omap2420_wd_timer2_addrs,
751 .user = OCP_USER_MPU | OCP_USER_SDMA, 313 .user = OCP_USER_MPU | OCP_USER_SDMA,
752}; 314};
753 315
754/* wd_timer2 */
755static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
756 &omap2420_l4_wkup__wd_timer2,
757};
758
759static struct omap_hwmod omap2420_wd_timer2_hwmod = {
760 .name = "wd_timer2",
761 .class = &omap2xxx_wd_timer_hwmod_class,
762 .main_clk = "mpu_wdt_fck",
763 .prcm = {
764 .omap2 = {
765 .prcm_reg_id = 1,
766 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
767 .module_offs = WKUP_MOD,
768 .idlest_reg_id = 1,
769 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
770 },
771 },
772 .slaves = omap2420_wd_timer2_slaves,
773 .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
774};
775
776/* UART1 */
777
778static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
779 &omap2_l4_core__uart1,
780};
781
782static struct omap_hwmod omap2420_uart1_hwmod = {
783 .name = "uart1",
784 .mpu_irqs = omap2_uart1_mpu_irqs,
785 .sdma_reqs = omap2_uart1_sdma_reqs,
786 .main_clk = "uart1_fck",
787 .prcm = {
788 .omap2 = {
789 .module_offs = CORE_MOD,
790 .prcm_reg_id = 1,
791 .module_bit = OMAP24XX_EN_UART1_SHIFT,
792 .idlest_reg_id = 1,
793 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
794 },
795 },
796 .slaves = omap2420_uart1_slaves,
797 .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves),
798 .class = &omap2_uart_class,
799};
800
801/* UART2 */
802
803static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
804 &omap2_l4_core__uart2,
805};
806
807static struct omap_hwmod omap2420_uart2_hwmod = {
808 .name = "uart2",
809 .mpu_irqs = omap2_uart2_mpu_irqs,
810 .sdma_reqs = omap2_uart2_sdma_reqs,
811 .main_clk = "uart2_fck",
812 .prcm = {
813 .omap2 = {
814 .module_offs = CORE_MOD,
815 .prcm_reg_id = 1,
816 .module_bit = OMAP24XX_EN_UART2_SHIFT,
817 .idlest_reg_id = 1,
818 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
819 },
820 },
821 .slaves = omap2420_uart2_slaves,
822 .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves),
823 .class = &omap2_uart_class,
824};
825
826/* UART3 */
827
828static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
829 &omap2_l4_core__uart3,
830};
831
832static struct omap_hwmod omap2420_uart3_hwmod = {
833 .name = "uart3",
834 .mpu_irqs = omap2_uart3_mpu_irqs,
835 .sdma_reqs = omap2_uart3_sdma_reqs,
836 .main_clk = "uart3_fck",
837 .prcm = {
838 .omap2 = {
839 .module_offs = CORE_MOD,
840 .prcm_reg_id = 2,
841 .module_bit = OMAP24XX_EN_UART3_SHIFT,
842 .idlest_reg_id = 2,
843 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
844 },
845 },
846 .slaves = omap2420_uart3_slaves,
847 .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves),
848 .class = &omap2_uart_class,
849};
850
851/* dss */
852/* dss master ports */
853static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = {
854 &omap2420_dss__l3,
855};
856
857/* l4_core -> dss */
858static struct omap_hwmod_ocp_if omap2420_l4_core__dss = {
859 .master = &omap2420_l4_core_hwmod,
860 .slave = &omap2420_dss_core_hwmod,
861 .clk = "dss_ick",
862 .addr = omap2_dss_addrs,
863 .fw = {
864 .omap2 = {
865 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
866 .flags = OMAP_FIREWALL_L4,
867 }
868 },
869 .user = OCP_USER_MPU | OCP_USER_SDMA,
870};
871
872/* dss slave ports */
873static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = {
874 &omap2420_l4_core__dss,
875};
876
877static struct omap_hwmod_opt_clk dss_opt_clks[] = {
878 /*
879 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
880 * driver does not use these clocks.
881 */
882 { .role = "tv_clk", .clk = "dss_54m_fck" },
883 { .role = "sys_clk", .clk = "dss2_fck" },
884};
885
886static struct omap_hwmod omap2420_dss_core_hwmod = {
887 .name = "dss_core",
888 .class = &omap2_dss_hwmod_class,
889 .main_clk = "dss1_fck", /* instead of dss_fck */
890 .sdma_reqs = omap2xxx_dss_sdma_chs,
891 .prcm = {
892 .omap2 = {
893 .prcm_reg_id = 1,
894 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
895 .module_offs = CORE_MOD,
896 .idlest_reg_id = 1,
897 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
898 },
899 },
900 .opt_clks = dss_opt_clks,
901 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
902 .slaves = omap2420_dss_slaves,
903 .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves),
904 .masters = omap2420_dss_masters,
905 .masters_cnt = ARRAY_SIZE(omap2420_dss_masters),
906 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
907};
908
909/* l4_core -> dss_dispc */
910static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = {
911 .master = &omap2420_l4_core_hwmod,
912 .slave = &omap2420_dss_dispc_hwmod,
913 .clk = "dss_ick",
914 .addr = omap2_dss_dispc_addrs,
915 .fw = {
916 .omap2 = {
917 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
918 .flags = OMAP_FIREWALL_L4,
919 }
920 },
921 .user = OCP_USER_MPU | OCP_USER_SDMA,
922};
923
924/* dss_dispc slave ports */
925static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = {
926 &omap2420_l4_core__dss_dispc,
927};
928
929static struct omap_hwmod omap2420_dss_dispc_hwmod = {
930 .name = "dss_dispc",
931 .class = &omap2_dispc_hwmod_class,
932 .mpu_irqs = omap2_dispc_irqs,
933 .main_clk = "dss1_fck",
934 .prcm = {
935 .omap2 = {
936 .prcm_reg_id = 1,
937 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
938 .module_offs = CORE_MOD,
939 .idlest_reg_id = 1,
940 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
941 },
942 },
943 .slaves = omap2420_dss_dispc_slaves,
944 .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves),
945 .flags = HWMOD_NO_IDLEST,
946 .dev_attr = &omap2_3_dss_dispc_dev_attr
947};
948
949/* l4_core -> dss_rfbi */
950static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {
951 .master = &omap2420_l4_core_hwmod,
952 .slave = &omap2420_dss_rfbi_hwmod,
953 .clk = "dss_ick",
954 .addr = omap2_dss_rfbi_addrs,
955 .fw = {
956 .omap2 = {
957 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
958 .flags = OMAP_FIREWALL_L4,
959 }
960 },
961 .user = OCP_USER_MPU | OCP_USER_SDMA,
962};
963
964/* dss_rfbi slave ports */
965static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = {
966 &omap2420_l4_core__dss_rfbi,
967};
968
969static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
970 { .role = "ick", .clk = "dss_ick" },
971};
972
973static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
974 .name = "dss_rfbi",
975 .class = &omap2_rfbi_hwmod_class,
976 .main_clk = "dss1_fck",
977 .prcm = {
978 .omap2 = {
979 .prcm_reg_id = 1,
980 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
981 .module_offs = CORE_MOD,
982 },
983 },
984 .opt_clks = dss_rfbi_opt_clks,
985 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
986 .slaves = omap2420_dss_rfbi_slaves,
987 .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves),
988 .flags = HWMOD_NO_IDLEST,
989};
990
991/* l4_core -> dss_venc */
992static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
993 .master = &omap2420_l4_core_hwmod,
994 .slave = &omap2420_dss_venc_hwmod,
995 .clk = "dss_ick",
996 .addr = omap2_dss_venc_addrs,
997 .fw = {
998 .omap2 = {
999 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
1000 .flags = OMAP_FIREWALL_L4,
1001 }
1002 },
1003 .flags = OCPIF_SWSUP_IDLE,
1004 .user = OCP_USER_MPU | OCP_USER_SDMA,
1005};
1006
1007/* dss_venc slave ports */
1008static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = {
1009 &omap2420_l4_core__dss_venc,
1010};
1011
1012static struct omap_hwmod omap2420_dss_venc_hwmod = {
1013 .name = "dss_venc",
1014 .class = &omap2_venc_hwmod_class,
1015 .main_clk = "dss_54m_fck",
1016 .prcm = {
1017 .omap2 = {
1018 .prcm_reg_id = 1,
1019 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1020 .module_offs = CORE_MOD,
1021 },
1022 },
1023 .slaves = omap2420_dss_venc_slaves,
1024 .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves),
1025 .flags = HWMOD_NO_IDLEST,
1026};
1027
1028/* I2C common */
1029static struct omap_hwmod_class_sysconfig i2c_sysc = {
1030 .rev_offs = 0x00,
1031 .sysc_offs = 0x20,
1032 .syss_offs = 0x10,
1033 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1034 .sysc_fields = &omap_hwmod_sysc_type1,
1035};
1036
1037static struct omap_hwmod_class i2c_class = {
1038 .name = "i2c",
1039 .sysc = &i2c_sysc,
1040 .rev = OMAP_I2C_IP_VERSION_1,
1041 .reset = &omap_i2c_reset,
1042};
1043
1044static struct omap_i2c_dev_attr i2c_dev_attr = {
1045 .flags = OMAP_I2C_FLAG_NO_FIFO |
1046 OMAP_I2C_FLAG_SIMPLE_CLOCK |
1047 OMAP_I2C_FLAG_16BIT_DATA_REG |
1048 OMAP_I2C_FLAG_BUS_SHIFT_2,
1049};
1050
1051/* I2C1 */
1052
1053static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
1054 &omap2420_l4_core__i2c1,
1055};
1056
1057static struct omap_hwmod omap2420_i2c1_hwmod = {
1058 .name = "i2c1",
1059 .mpu_irqs = omap2_i2c1_mpu_irqs,
1060 .sdma_reqs = omap2_i2c1_sdma_reqs,
1061 .main_clk = "i2c1_fck",
1062 .prcm = {
1063 .omap2 = {
1064 .module_offs = CORE_MOD,
1065 .prcm_reg_id = 1,
1066 .module_bit = OMAP2420_EN_I2C1_SHIFT,
1067 .idlest_reg_id = 1,
1068 .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
1069 },
1070 },
1071 .slaves = omap2420_i2c1_slaves,
1072 .slaves_cnt = ARRAY_SIZE(omap2420_i2c1_slaves),
1073 .class = &i2c_class,
1074 .dev_attr = &i2c_dev_attr,
1075 .flags = HWMOD_16BIT_REG,
1076};
1077
1078/* I2C2 */
1079
1080static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
1081 &omap2420_l4_core__i2c2,
1082};
1083
1084static struct omap_hwmod omap2420_i2c2_hwmod = {
1085 .name = "i2c2",
1086 .mpu_irqs = omap2_i2c2_mpu_irqs,
1087 .sdma_reqs = omap2_i2c2_sdma_reqs,
1088 .main_clk = "i2c2_fck",
1089 .prcm = {
1090 .omap2 = {
1091 .module_offs = CORE_MOD,
1092 .prcm_reg_id = 1,
1093 .module_bit = OMAP2420_EN_I2C2_SHIFT,
1094 .idlest_reg_id = 1,
1095 .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
1096 },
1097 },
1098 .slaves = omap2420_i2c2_slaves,
1099 .slaves_cnt = ARRAY_SIZE(omap2420_i2c2_slaves),
1100 .class = &i2c_class,
1101 .dev_attr = &i2c_dev_attr,
1102 .flags = HWMOD_16BIT_REG,
1103};
1104
1105/* l4_wkup -> gpio1 */ 316/* l4_wkup -> gpio1 */
1106static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = { 317static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
1107 { 318 {
@@ -1113,8 +324,8 @@ static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
1113}; 324};
1114 325
1115static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = { 326static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
1116 .master = &omap2420_l4_wkup_hwmod, 327 .master = &omap2xxx_l4_wkup_hwmod,
1117 .slave = &omap2420_gpio1_hwmod, 328 .slave = &omap2xxx_gpio1_hwmod,
1118 .clk = "gpios_ick", 329 .clk = "gpios_ick",
1119 .addr = omap2420_gpio1_addr_space, 330 .addr = omap2420_gpio1_addr_space,
1120 .user = OCP_USER_MPU | OCP_USER_SDMA, 331 .user = OCP_USER_MPU | OCP_USER_SDMA,
@@ -1131,8 +342,8 @@ static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = {
1131}; 342};
1132 343
1133static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = { 344static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
1134 .master = &omap2420_l4_wkup_hwmod, 345 .master = &omap2xxx_l4_wkup_hwmod,
1135 .slave = &omap2420_gpio2_hwmod, 346 .slave = &omap2xxx_gpio2_hwmod,
1136 .clk = "gpios_ick", 347 .clk = "gpios_ick",
1137 .addr = omap2420_gpio2_addr_space, 348 .addr = omap2420_gpio2_addr_space,
1138 .user = OCP_USER_MPU | OCP_USER_SDMA, 349 .user = OCP_USER_MPU | OCP_USER_SDMA,
@@ -1149,8 +360,8 @@ static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = {
1149}; 360};
1150 361
1151static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = { 362static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
1152 .master = &omap2420_l4_wkup_hwmod, 363 .master = &omap2xxx_l4_wkup_hwmod,
1153 .slave = &omap2420_gpio3_hwmod, 364 .slave = &omap2xxx_gpio3_hwmod,
1154 .clk = "gpios_ick", 365 .clk = "gpios_ick",
1155 .addr = omap2420_gpio3_addr_space, 366 .addr = omap2420_gpio3_addr_space,
1156 .user = OCP_USER_MPU | OCP_USER_SDMA, 367 .user = OCP_USER_MPU | OCP_USER_SDMA,
@@ -1167,408 +378,100 @@ static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = {
1167}; 378};
1168 379
1169static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = { 380static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
1170 .master = &omap2420_l4_wkup_hwmod, 381 .master = &omap2xxx_l4_wkup_hwmod,
1171 .slave = &omap2420_gpio4_hwmod, 382 .slave = &omap2xxx_gpio4_hwmod,
1172 .clk = "gpios_ick", 383 .clk = "gpios_ick",
1173 .addr = omap2420_gpio4_addr_space, 384 .addr = omap2420_gpio4_addr_space,
1174 .user = OCP_USER_MPU | OCP_USER_SDMA, 385 .user = OCP_USER_MPU | OCP_USER_SDMA,
1175}; 386};
1176 387
1177/* gpio dev_attr */
1178static struct omap_gpio_dev_attr gpio_dev_attr = {
1179 .bank_width = 32,
1180 .dbck_flag = false,
1181};
1182
1183/* gpio1 */
1184static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
1185 &omap2420_l4_wkup__gpio1,
1186};
1187
1188static struct omap_hwmod omap2420_gpio1_hwmod = {
1189 .name = "gpio1",
1190 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1191 .mpu_irqs = omap2_gpio1_irqs,
1192 .main_clk = "gpios_fck",
1193 .prcm = {
1194 .omap2 = {
1195 .prcm_reg_id = 1,
1196 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1197 .module_offs = WKUP_MOD,
1198 .idlest_reg_id = 1,
1199 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1200 },
1201 },
1202 .slaves = omap2420_gpio1_slaves,
1203 .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves),
1204 .class = &omap2xxx_gpio_hwmod_class,
1205 .dev_attr = &gpio_dev_attr,
1206};
1207
1208/* gpio2 */
1209static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
1210 &omap2420_l4_wkup__gpio2,
1211};
1212
1213static struct omap_hwmod omap2420_gpio2_hwmod = {
1214 .name = "gpio2",
1215 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1216 .mpu_irqs = omap2_gpio2_irqs,
1217 .main_clk = "gpios_fck",
1218 .prcm = {
1219 .omap2 = {
1220 .prcm_reg_id = 1,
1221 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1222 .module_offs = WKUP_MOD,
1223 .idlest_reg_id = 1,
1224 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1225 },
1226 },
1227 .slaves = omap2420_gpio2_slaves,
1228 .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves),
1229 .class = &omap2xxx_gpio_hwmod_class,
1230 .dev_attr = &gpio_dev_attr,
1231};
1232
1233/* gpio3 */
1234static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
1235 &omap2420_l4_wkup__gpio3,
1236};
1237
1238static struct omap_hwmod omap2420_gpio3_hwmod = {
1239 .name = "gpio3",
1240 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1241 .mpu_irqs = omap2_gpio3_irqs,
1242 .main_clk = "gpios_fck",
1243 .prcm = {
1244 .omap2 = {
1245 .prcm_reg_id = 1,
1246 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1247 .module_offs = WKUP_MOD,
1248 .idlest_reg_id = 1,
1249 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1250 },
1251 },
1252 .slaves = omap2420_gpio3_slaves,
1253 .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves),
1254 .class = &omap2xxx_gpio_hwmod_class,
1255 .dev_attr = &gpio_dev_attr,
1256};
1257
1258/* gpio4 */
1259static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
1260 &omap2420_l4_wkup__gpio4,
1261};
1262
1263static struct omap_hwmod omap2420_gpio4_hwmod = {
1264 .name = "gpio4",
1265 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1266 .mpu_irqs = omap2_gpio4_irqs,
1267 .main_clk = "gpios_fck",
1268 .prcm = {
1269 .omap2 = {
1270 .prcm_reg_id = 1,
1271 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1272 .module_offs = WKUP_MOD,
1273 .idlest_reg_id = 1,
1274 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1275 },
1276 },
1277 .slaves = omap2420_gpio4_slaves,
1278 .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves),
1279 .class = &omap2xxx_gpio_hwmod_class,
1280 .dev_attr = &gpio_dev_attr,
1281};
1282
1283/* dma attributes */
1284static struct omap_dma_dev_attr dma_dev_attr = {
1285 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1286 IS_CSSA_32 | IS_CDSA_32,
1287 .lch_count = 32,
1288};
1289
1290/* dma_system -> L3 */ 388/* dma_system -> L3 */
1291static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = { 389static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
1292 .master = &omap2420_dma_system_hwmod, 390 .master = &omap2420_dma_system_hwmod,
1293 .slave = &omap2420_l3_main_hwmod, 391 .slave = &omap2xxx_l3_main_hwmod,
1294 .clk = "core_l3_ck", 392 .clk = "core_l3_ck",
1295 .user = OCP_USER_MPU | OCP_USER_SDMA, 393 .user = OCP_USER_MPU | OCP_USER_SDMA,
1296}; 394};
1297 395
1298/* dma_system master ports */
1299static struct omap_hwmod_ocp_if *omap2420_dma_system_masters[] = {
1300 &omap2420_dma_system__l3,
1301};
1302
1303/* l4_core -> dma_system */ 396/* l4_core -> dma_system */
1304static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = { 397static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
1305 .master = &omap2420_l4_core_hwmod, 398 .master = &omap2xxx_l4_core_hwmod,
1306 .slave = &omap2420_dma_system_hwmod, 399 .slave = &omap2420_dma_system_hwmod,
1307 .clk = "sdma_ick", 400 .clk = "sdma_ick",
1308 .addr = omap2_dma_system_addrs, 401 .addr = omap2_dma_system_addrs,
1309 .user = OCP_USER_MPU | OCP_USER_SDMA, 402 .user = OCP_USER_MPU | OCP_USER_SDMA,
1310}; 403};
1311 404
1312/* dma_system slave ports */
1313static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = {
1314 &omap2420_l4_core__dma_system,
1315};
1316
1317static struct omap_hwmod omap2420_dma_system_hwmod = {
1318 .name = "dma",
1319 .class = &omap2xxx_dma_hwmod_class,
1320 .mpu_irqs = omap2_dma_system_irqs,
1321 .main_clk = "core_l3_ck",
1322 .slaves = omap2420_dma_system_slaves,
1323 .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves),
1324 .masters = omap2420_dma_system_masters,
1325 .masters_cnt = ARRAY_SIZE(omap2420_dma_system_masters),
1326 .dev_attr = &dma_dev_attr,
1327 .flags = HWMOD_NO_IDLEST,
1328};
1329
1330/* mailbox */
1331static struct omap_hwmod omap2420_mailbox_hwmod;
1332static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
1333 { .name = "dsp", .irq = 26 },
1334 { .name = "iva", .irq = 34 },
1335 { .irq = -1 }
1336};
1337
1338/* l4_core -> mailbox */ 405/* l4_core -> mailbox */
1339static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = { 406static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
1340 .master = &omap2420_l4_core_hwmod, 407 .master = &omap2xxx_l4_core_hwmod,
1341 .slave = &omap2420_mailbox_hwmod, 408 .slave = &omap2420_mailbox_hwmod,
1342 .addr = omap2_mailbox_addrs, 409 .addr = omap2_mailbox_addrs,
1343 .user = OCP_USER_MPU | OCP_USER_SDMA, 410 .user = OCP_USER_MPU | OCP_USER_SDMA,
1344}; 411};
1345 412
1346/* mailbox slave ports */
1347static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
1348 &omap2420_l4_core__mailbox,
1349};
1350
1351static struct omap_hwmod omap2420_mailbox_hwmod = {
1352 .name = "mailbox",
1353 .class = &omap2xxx_mailbox_hwmod_class,
1354 .mpu_irqs = omap2420_mailbox_irqs,
1355 .main_clk = "mailboxes_ick",
1356 .prcm = {
1357 .omap2 = {
1358 .prcm_reg_id = 1,
1359 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
1360 .module_offs = CORE_MOD,
1361 .idlest_reg_id = 1,
1362 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1363 },
1364 },
1365 .slaves = omap2420_mailbox_slaves,
1366 .slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves),
1367};
1368
1369/* mcspi1 */
1370static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
1371 &omap2420_l4_core__mcspi1,
1372};
1373
1374static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1375 .num_chipselect = 4,
1376};
1377
1378static struct omap_hwmod omap2420_mcspi1_hwmod = {
1379 .name = "mcspi1_hwmod",
1380 .mpu_irqs = omap2_mcspi1_mpu_irqs,
1381 .sdma_reqs = omap2_mcspi1_sdma_reqs,
1382 .main_clk = "mcspi1_fck",
1383 .prcm = {
1384 .omap2 = {
1385 .module_offs = CORE_MOD,
1386 .prcm_reg_id = 1,
1387 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1388 .idlest_reg_id = 1,
1389 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1390 },
1391 },
1392 .slaves = omap2420_mcspi1_slaves,
1393 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves),
1394 .class = &omap2xxx_mcspi_class,
1395 .dev_attr = &omap_mcspi1_dev_attr,
1396};
1397
1398/* mcspi2 */
1399static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
1400 &omap2420_l4_core__mcspi2,
1401};
1402
1403static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1404 .num_chipselect = 2,
1405};
1406
1407static struct omap_hwmod omap2420_mcspi2_hwmod = {
1408 .name = "mcspi2_hwmod",
1409 .mpu_irqs = omap2_mcspi2_mpu_irqs,
1410 .sdma_reqs = omap2_mcspi2_sdma_reqs,
1411 .main_clk = "mcspi2_fck",
1412 .prcm = {
1413 .omap2 = {
1414 .module_offs = CORE_MOD,
1415 .prcm_reg_id = 1,
1416 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1417 .idlest_reg_id = 1,
1418 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1419 },
1420 },
1421 .slaves = omap2420_mcspi2_slaves,
1422 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves),
1423 .class = &omap2xxx_mcspi_class,
1424 .dev_attr = &omap_mcspi2_dev_attr,
1425};
1426
1427/*
1428 * 'mcbsp' class
1429 * multi channel buffered serial port controller
1430 */
1431
1432static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
1433 .name = "mcbsp",
1434};
1435
1436/* mcbsp1 */
1437static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
1438 { .name = "tx", .irq = 59 },
1439 { .name = "rx", .irq = 60 },
1440 { .irq = -1 }
1441};
1442
1443/* l4_core -> mcbsp1 */ 413/* l4_core -> mcbsp1 */
1444static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = { 414static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
1445 .master = &omap2420_l4_core_hwmod, 415 .master = &omap2xxx_l4_core_hwmod,
1446 .slave = &omap2420_mcbsp1_hwmod, 416 .slave = &omap2420_mcbsp1_hwmod,
1447 .clk = "mcbsp1_ick", 417 .clk = "mcbsp1_ick",
1448 .addr = omap2_mcbsp1_addrs, 418 .addr = omap2_mcbsp1_addrs,
1449 .user = OCP_USER_MPU | OCP_USER_SDMA, 419 .user = OCP_USER_MPU | OCP_USER_SDMA,
1450}; 420};
1451 421
1452/* mcbsp1 slave ports */
1453static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = {
1454 &omap2420_l4_core__mcbsp1,
1455};
1456
1457static struct omap_hwmod omap2420_mcbsp1_hwmod = {
1458 .name = "mcbsp1",
1459 .class = &omap2420_mcbsp_hwmod_class,
1460 .mpu_irqs = omap2420_mcbsp1_irqs,
1461 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
1462 .main_clk = "mcbsp1_fck",
1463 .prcm = {
1464 .omap2 = {
1465 .prcm_reg_id = 1,
1466 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1467 .module_offs = CORE_MOD,
1468 .idlest_reg_id = 1,
1469 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1470 },
1471 },
1472 .slaves = omap2420_mcbsp1_slaves,
1473 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves),
1474};
1475
1476/* mcbsp2 */
1477static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
1478 { .name = "tx", .irq = 62 },
1479 { .name = "rx", .irq = 63 },
1480 { .irq = -1 }
1481};
1482
1483/* l4_core -> mcbsp2 */ 422/* l4_core -> mcbsp2 */
1484static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = { 423static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
1485 .master = &omap2420_l4_core_hwmod, 424 .master = &omap2xxx_l4_core_hwmod,
1486 .slave = &omap2420_mcbsp2_hwmod, 425 .slave = &omap2420_mcbsp2_hwmod,
1487 .clk = "mcbsp2_ick", 426 .clk = "mcbsp2_ick",
1488 .addr = omap2xxx_mcbsp2_addrs, 427 .addr = omap2xxx_mcbsp2_addrs,
1489 .user = OCP_USER_MPU | OCP_USER_SDMA, 428 .user = OCP_USER_MPU | OCP_USER_SDMA,
1490}; 429};
1491 430
1492/* mcbsp2 slave ports */ 431static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
1493static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = { 432 &omap2xxx_l3_main__l4_core,
433 &omap2xxx_mpu__l3_main,
434 &omap2xxx_dss__l3,
435 &omap2xxx_l4_core__mcspi1,
436 &omap2xxx_l4_core__mcspi2,
437 &omap2xxx_l4_core__l4_wkup,
438 &omap2_l4_core__uart1,
439 &omap2_l4_core__uart2,
440 &omap2_l4_core__uart3,
441 &omap2420_l4_core__i2c1,
442 &omap2420_l4_core__i2c2,
443 &omap2420_l3__iva,
444 &omap2420_l3__dsp,
445 &omap2420_l4_wkup__timer1,
446 &omap2xxx_l4_core__timer2,
447 &omap2xxx_l4_core__timer3,
448 &omap2xxx_l4_core__timer4,
449 &omap2xxx_l4_core__timer5,
450 &omap2xxx_l4_core__timer6,
451 &omap2xxx_l4_core__timer7,
452 &omap2xxx_l4_core__timer8,
453 &omap2xxx_l4_core__timer9,
454 &omap2xxx_l4_core__timer10,
455 &omap2xxx_l4_core__timer11,
456 &omap2xxx_l4_core__timer12,
457 &omap2420_l4_wkup__wd_timer2,
458 &omap2xxx_l4_core__dss,
459 &omap2xxx_l4_core__dss_dispc,
460 &omap2xxx_l4_core__dss_rfbi,
461 &omap2xxx_l4_core__dss_venc,
462 &omap2420_l4_wkup__gpio1,
463 &omap2420_l4_wkup__gpio2,
464 &omap2420_l4_wkup__gpio3,
465 &omap2420_l4_wkup__gpio4,
466 &omap2420_dma_system__l3,
467 &omap2420_l4_core__dma_system,
468 &omap2420_l4_core__mailbox,
469 &omap2420_l4_core__mcbsp1,
1494 &omap2420_l4_core__mcbsp2, 470 &omap2420_l4_core__mcbsp2,
1495};
1496
1497static struct omap_hwmod omap2420_mcbsp2_hwmod = {
1498 .name = "mcbsp2",
1499 .class = &omap2420_mcbsp_hwmod_class,
1500 .mpu_irqs = omap2420_mcbsp2_irqs,
1501 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
1502 .main_clk = "mcbsp2_fck",
1503 .prcm = {
1504 .omap2 = {
1505 .prcm_reg_id = 1,
1506 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1507 .module_offs = CORE_MOD,
1508 .idlest_reg_id = 1,
1509 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1510 },
1511 },
1512 .slaves = omap2420_mcbsp2_slaves,
1513 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves),
1514};
1515
1516static __initdata struct omap_hwmod *omap2420_hwmods[] = {
1517 &omap2420_l3_main_hwmod,
1518 &omap2420_l4_core_hwmod,
1519 &omap2420_l4_wkup_hwmod,
1520 &omap2420_mpu_hwmod,
1521 &omap2420_iva_hwmod,
1522
1523 &omap2420_timer1_hwmod,
1524 &omap2420_timer2_hwmod,
1525 &omap2420_timer3_hwmod,
1526 &omap2420_timer4_hwmod,
1527 &omap2420_timer5_hwmod,
1528 &omap2420_timer6_hwmod,
1529 &omap2420_timer7_hwmod,
1530 &omap2420_timer8_hwmod,
1531 &omap2420_timer9_hwmod,
1532 &omap2420_timer10_hwmod,
1533 &omap2420_timer11_hwmod,
1534 &omap2420_timer12_hwmod,
1535
1536 &omap2420_wd_timer2_hwmod,
1537 &omap2420_uart1_hwmod,
1538 &omap2420_uart2_hwmod,
1539 &omap2420_uart3_hwmod,
1540 /* dss class */
1541 &omap2420_dss_core_hwmod,
1542 &omap2420_dss_dispc_hwmod,
1543 &omap2420_dss_rfbi_hwmod,
1544 &omap2420_dss_venc_hwmod,
1545 /* i2c class */
1546 &omap2420_i2c1_hwmod,
1547 &omap2420_i2c2_hwmod,
1548
1549 /* gpio class */
1550 &omap2420_gpio1_hwmod,
1551 &omap2420_gpio2_hwmod,
1552 &omap2420_gpio3_hwmod,
1553 &omap2420_gpio4_hwmod,
1554
1555 /* dma_system class*/
1556 &omap2420_dma_system_hwmod,
1557
1558 /* mailbox class */
1559 &omap2420_mailbox_hwmod,
1560
1561 /* mcbsp class */
1562 &omap2420_mcbsp1_hwmod,
1563 &omap2420_mcbsp2_hwmod,
1564
1565 /* mcspi class */
1566 &omap2420_mcspi1_hwmod,
1567 &omap2420_mcspi2_hwmod,
1568 NULL, 471 NULL,
1569}; 472};
1570 473
1571int __init omap2420_hwmod_init(void) 474int __init omap2420_hwmod_init(void)
1572{ 475{
1573 return omap_hwmod_register(omap2420_hwmods); 476 return omap_hwmod_register_links(omap2420_hwmod_ocp_ifs);
1574} 477}
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index c4f56cb60d7d..71d9f8824f9d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -2,6 +2,7 @@
2 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips 2 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
3 * 3 *
4 * Copyright (C) 2009-2011 Nokia Corporation 4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley 6 * Paul Walmsley
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
@@ -33,1045 +34,29 @@
33/* 34/*
34 * OMAP2430 hardware module integration data 35 * OMAP2430 hardware module integration data
35 * 36 *
36 * ALl of the data in this section should be autogeneratable from the 37 * All of the data in this section should be autogeneratable from the
37 * TI hardware database or other technical documentation. Data that 38 * TI hardware database or other technical documentation. Data that
38 * is driver-specific or driver-kernel integration-specific belongs 39 * is driver-specific or driver-kernel integration-specific belongs
39 * elsewhere. 40 * elsewhere.
40 */ 41 */
41 42
42static struct omap_hwmod omap2430_mpu_hwmod;
43static struct omap_hwmod omap2430_iva_hwmod;
44static struct omap_hwmod omap2430_l3_main_hwmod;
45static struct omap_hwmod omap2430_l4_core_hwmod;
46static struct omap_hwmod omap2430_dss_core_hwmod;
47static struct omap_hwmod omap2430_dss_dispc_hwmod;
48static struct omap_hwmod omap2430_dss_rfbi_hwmod;
49static struct omap_hwmod omap2430_dss_venc_hwmod;
50static struct omap_hwmod omap2430_wd_timer2_hwmod;
51static struct omap_hwmod omap2430_gpio1_hwmod;
52static struct omap_hwmod omap2430_gpio2_hwmod;
53static struct omap_hwmod omap2430_gpio3_hwmod;
54static struct omap_hwmod omap2430_gpio4_hwmod;
55static struct omap_hwmod omap2430_gpio5_hwmod;
56static struct omap_hwmod omap2430_dma_system_hwmod;
57static struct omap_hwmod omap2430_mcbsp1_hwmod;
58static struct omap_hwmod omap2430_mcbsp2_hwmod;
59static struct omap_hwmod omap2430_mcbsp3_hwmod;
60static struct omap_hwmod omap2430_mcbsp4_hwmod;
61static struct omap_hwmod omap2430_mcbsp5_hwmod;
62static struct omap_hwmod omap2430_mcspi1_hwmod;
63static struct omap_hwmod omap2430_mcspi2_hwmod;
64static struct omap_hwmod omap2430_mcspi3_hwmod;
65static struct omap_hwmod omap2430_mmc1_hwmod;
66static struct omap_hwmod omap2430_mmc2_hwmod;
67
68/* L3 -> L4_CORE interface */
69static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
70 .master = &omap2430_l3_main_hwmod,
71 .slave = &omap2430_l4_core_hwmod,
72 .user = OCP_USER_MPU | OCP_USER_SDMA,
73};
74
75/* MPU -> L3 interface */
76static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
77 .master = &omap2430_mpu_hwmod,
78 .slave = &omap2430_l3_main_hwmod,
79 .user = OCP_USER_MPU,
80};
81
82/* Slave interfaces on the L3 interconnect */
83static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
84 &omap2430_mpu__l3_main,
85};
86
87/* DSS -> l3 */
88static struct omap_hwmod_ocp_if omap2430_dss__l3 = {
89 .master = &omap2430_dss_core_hwmod,
90 .slave = &omap2430_l3_main_hwmod,
91 .fw = {
92 .omap2 = {
93 .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
94 .flags = OMAP_FIREWALL_L3,
95 }
96 },
97 .user = OCP_USER_MPU | OCP_USER_SDMA,
98};
99
100/* Master interfaces on the L3 interconnect */
101static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
102 &omap2430_l3_main__l4_core,
103};
104
105/* L3 */
106static struct omap_hwmod omap2430_l3_main_hwmod = {
107 .name = "l3_main",
108 .class = &l3_hwmod_class,
109 .masters = omap2430_l3_main_masters,
110 .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
111 .slaves = omap2430_l3_main_slaves,
112 .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
113 .flags = HWMOD_NO_IDLEST,
114};
115
116static struct omap_hwmod omap2430_l4_wkup_hwmod;
117static struct omap_hwmod omap2430_uart1_hwmod;
118static struct omap_hwmod omap2430_uart2_hwmod;
119static struct omap_hwmod omap2430_uart3_hwmod;
120static struct omap_hwmod omap2430_i2c1_hwmod;
121static struct omap_hwmod omap2430_i2c2_hwmod;
122
123static struct omap_hwmod omap2430_usbhsotg_hwmod;
124
125/* l3_core -> usbhsotg interface */
126static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
127 .master = &omap2430_usbhsotg_hwmod,
128 .slave = &omap2430_l3_main_hwmod,
129 .clk = "core_l3_ck",
130 .user = OCP_USER_MPU,
131};
132
133/* L4 CORE -> I2C1 interface */
134static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
135 .master = &omap2430_l4_core_hwmod,
136 .slave = &omap2430_i2c1_hwmod,
137 .clk = "i2c1_ick",
138 .addr = omap2_i2c1_addr_space,
139 .user = OCP_USER_MPU | OCP_USER_SDMA,
140};
141
142/* L4 CORE -> I2C2 interface */
143static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
144 .master = &omap2430_l4_core_hwmod,
145 .slave = &omap2430_i2c2_hwmod,
146 .clk = "i2c2_ick",
147 .addr = omap2_i2c2_addr_space,
148 .user = OCP_USER_MPU | OCP_USER_SDMA,
149};
150
151/* L4_CORE -> L4_WKUP interface */
152static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
153 .master = &omap2430_l4_core_hwmod,
154 .slave = &omap2430_l4_wkup_hwmod,
155 .user = OCP_USER_MPU | OCP_USER_SDMA,
156};
157
158/* L4 CORE -> UART1 interface */
159static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
160 .master = &omap2430_l4_core_hwmod,
161 .slave = &omap2430_uart1_hwmod,
162 .clk = "uart1_ick",
163 .addr = omap2xxx_uart1_addr_space,
164 .user = OCP_USER_MPU | OCP_USER_SDMA,
165};
166
167/* L4 CORE -> UART2 interface */
168static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
169 .master = &omap2430_l4_core_hwmod,
170 .slave = &omap2430_uart2_hwmod,
171 .clk = "uart2_ick",
172 .addr = omap2xxx_uart2_addr_space,
173 .user = OCP_USER_MPU | OCP_USER_SDMA,
174};
175
176/* L4 PER -> UART3 interface */
177static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
178 .master = &omap2430_l4_core_hwmod,
179 .slave = &omap2430_uart3_hwmod,
180 .clk = "uart3_ick",
181 .addr = omap2xxx_uart3_addr_space,
182 .user = OCP_USER_MPU | OCP_USER_SDMA,
183};
184
185/* 43/*
186* usbhsotg interface data 44 * IP blocks
187*/
188static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
189 {
190 .pa_start = OMAP243X_HS_BASE,
191 .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
192 .flags = ADDR_TYPE_RT
193 },
194 { }
195};
196
197/* l4_core ->usbhsotg interface */
198static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
199 .master = &omap2430_l4_core_hwmod,
200 .slave = &omap2430_usbhsotg_hwmod,
201 .clk = "usb_l4_ick",
202 .addr = omap2430_usbhsotg_addrs,
203 .user = OCP_USER_MPU,
204};
205
206static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {
207 &omap2430_usbhsotg__l3,
208};
209
210static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
211 &omap2430_l4_core__usbhsotg,
212};
213
214/* L4 CORE -> MMC1 interface */
215static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
216 .master = &omap2430_l4_core_hwmod,
217 .slave = &omap2430_mmc1_hwmod,
218 .clk = "mmchs1_ick",
219 .addr = omap2430_mmc1_addr_space,
220 .user = OCP_USER_MPU | OCP_USER_SDMA,
221};
222
223/* L4 CORE -> MMC2 interface */
224static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
225 .master = &omap2430_l4_core_hwmod,
226 .slave = &omap2430_mmc2_hwmod,
227 .clk = "mmchs2_ick",
228 .addr = omap2430_mmc2_addr_space,
229 .user = OCP_USER_MPU | OCP_USER_SDMA,
230};
231
232/* Slave interfaces on the L4_CORE interconnect */
233static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
234 &omap2430_l3_main__l4_core,
235};
236
237/* Master interfaces on the L4_CORE interconnect */
238static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
239 &omap2430_l4_core__l4_wkup,
240 &omap2430_l4_core__mmc1,
241 &omap2430_l4_core__mmc2,
242};
243
244/* L4 CORE */
245static struct omap_hwmod omap2430_l4_core_hwmod = {
246 .name = "l4_core",
247 .class = &l4_hwmod_class,
248 .masters = omap2430_l4_core_masters,
249 .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
250 .slaves = omap2430_l4_core_slaves,
251 .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
252 .flags = HWMOD_NO_IDLEST,
253};
254
255/* Slave interfaces on the L4_WKUP interconnect */
256static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
257 &omap2430_l4_core__l4_wkup,
258 &omap2_l4_core__uart1,
259 &omap2_l4_core__uart2,
260 &omap2_l4_core__uart3,
261};
262
263/* Master interfaces on the L4_WKUP interconnect */
264static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
265};
266
267/* l4 core -> mcspi1 interface */
268static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
269 .master = &omap2430_l4_core_hwmod,
270 .slave = &omap2430_mcspi1_hwmod,
271 .clk = "mcspi1_ick",
272 .addr = omap2_mcspi1_addr_space,
273 .user = OCP_USER_MPU | OCP_USER_SDMA,
274};
275
276/* l4 core -> mcspi2 interface */
277static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
278 .master = &omap2430_l4_core_hwmod,
279 .slave = &omap2430_mcspi2_hwmod,
280 .clk = "mcspi2_ick",
281 .addr = omap2_mcspi2_addr_space,
282 .user = OCP_USER_MPU | OCP_USER_SDMA,
283};
284
285/* l4 core -> mcspi3 interface */
286static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
287 .master = &omap2430_l4_core_hwmod,
288 .slave = &omap2430_mcspi3_hwmod,
289 .clk = "mcspi3_ick",
290 .addr = omap2430_mcspi3_addr_space,
291 .user = OCP_USER_MPU | OCP_USER_SDMA,
292};
293
294/* L4 WKUP */
295static struct omap_hwmod omap2430_l4_wkup_hwmod = {
296 .name = "l4_wkup",
297 .class = &l4_hwmod_class,
298 .masters = omap2430_l4_wkup_masters,
299 .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
300 .slaves = omap2430_l4_wkup_slaves,
301 .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
302 .flags = HWMOD_NO_IDLEST,
303};
304
305/* Master interfaces on the MPU device */
306static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
307 &omap2430_mpu__l3_main,
308};
309
310/* MPU */
311static struct omap_hwmod omap2430_mpu_hwmod = {
312 .name = "mpu",
313 .class = &mpu_hwmod_class,
314 .main_clk = "mpu_ck",
315 .masters = omap2430_mpu_masters,
316 .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
317};
318
319/*
320 * IVA2_1 interface data
321 */ 45 */
322 46
323/* IVA2 <- L3 interface */ 47/* IVA2 (IVA2) */
324static struct omap_hwmod_ocp_if omap2430_l3__iva = { 48static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
325 .master = &omap2430_l3_main_hwmod, 49 { .name = "logic", .rst_shift = 0 },
326 .slave = &omap2430_iva_hwmod, 50 { .name = "mmu", .rst_shift = 1 },
327 .clk = "dsp_fck",
328 .user = OCP_USER_MPU | OCP_USER_SDMA,
329};
330
331static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
332 &omap2430_l3__iva,
333}; 51};
334 52
335/*
336 * IVA2 (IVA2)
337 */
338
339static struct omap_hwmod omap2430_iva_hwmod = { 53static struct omap_hwmod omap2430_iva_hwmod = {
340 .name = "iva", 54 .name = "iva",
341 .class = &iva_hwmod_class, 55 .class = &iva_hwmod_class,
342 .masters = omap2430_iva_masters, 56 .clkdm_name = "dsp_clkdm",
343 .masters_cnt = ARRAY_SIZE(omap2430_iva_masters), 57 .rst_lines = omap2430_iva_resets,
344}; 58 .rst_lines_cnt = ARRAY_SIZE(omap2430_iva_resets),
345 59 .main_clk = "dsp_fck",
346/* always-on timers dev attribute */
347static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
348 .timer_capability = OMAP_TIMER_ALWON,
349};
350
351/* pwm timers dev attribute */
352static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
353 .timer_capability = OMAP_TIMER_HAS_PWM,
354};
355
356/* timer1 */
357static struct omap_hwmod omap2430_timer1_hwmod;
358
359static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
360 {
361 .pa_start = 0x49018000,
362 .pa_end = 0x49018000 + SZ_1K - 1,
363 .flags = ADDR_TYPE_RT
364 },
365 { }
366};
367
368/* l4_wkup -> timer1 */
369static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
370 .master = &omap2430_l4_wkup_hwmod,
371 .slave = &omap2430_timer1_hwmod,
372 .clk = "gpt1_ick",
373 .addr = omap2430_timer1_addrs,
374 .user = OCP_USER_MPU | OCP_USER_SDMA,
375};
376
377/* timer1 slave port */
378static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
379 &omap2430_l4_wkup__timer1,
380};
381
382/* timer1 hwmod */
383static struct omap_hwmod omap2430_timer1_hwmod = {
384 .name = "timer1",
385 .mpu_irqs = omap2_timer1_mpu_irqs,
386 .main_clk = "gpt1_fck",
387 .prcm = {
388 .omap2 = {
389 .prcm_reg_id = 1,
390 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
391 .module_offs = WKUP_MOD,
392 .idlest_reg_id = 1,
393 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
394 },
395 },
396 .dev_attr = &capability_alwon_dev_attr,
397 .slaves = omap2430_timer1_slaves,
398 .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
399 .class = &omap2xxx_timer_hwmod_class,
400};
401
402/* timer2 */
403static struct omap_hwmod omap2430_timer2_hwmod;
404
405/* l4_core -> timer2 */
406static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
407 .master = &omap2430_l4_core_hwmod,
408 .slave = &omap2430_timer2_hwmod,
409 .clk = "gpt2_ick",
410 .addr = omap2xxx_timer2_addrs,
411 .user = OCP_USER_MPU | OCP_USER_SDMA,
412};
413
414/* timer2 slave port */
415static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
416 &omap2430_l4_core__timer2,
417};
418
419/* timer2 hwmod */
420static struct omap_hwmod omap2430_timer2_hwmod = {
421 .name = "timer2",
422 .mpu_irqs = omap2_timer2_mpu_irqs,
423 .main_clk = "gpt2_fck",
424 .prcm = {
425 .omap2 = {
426 .prcm_reg_id = 1,
427 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
428 .module_offs = CORE_MOD,
429 .idlest_reg_id = 1,
430 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
431 },
432 },
433 .dev_attr = &capability_alwon_dev_attr,
434 .slaves = omap2430_timer2_slaves,
435 .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
436 .class = &omap2xxx_timer_hwmod_class,
437};
438
439/* timer3 */
440static struct omap_hwmod omap2430_timer3_hwmod;
441
442/* l4_core -> timer3 */
443static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
444 .master = &omap2430_l4_core_hwmod,
445 .slave = &omap2430_timer3_hwmod,
446 .clk = "gpt3_ick",
447 .addr = omap2xxx_timer3_addrs,
448 .user = OCP_USER_MPU | OCP_USER_SDMA,
449};
450
451/* timer3 slave port */
452static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
453 &omap2430_l4_core__timer3,
454};
455
456/* timer3 hwmod */
457static struct omap_hwmod omap2430_timer3_hwmod = {
458 .name = "timer3",
459 .mpu_irqs = omap2_timer3_mpu_irqs,
460 .main_clk = "gpt3_fck",
461 .prcm = {
462 .omap2 = {
463 .prcm_reg_id = 1,
464 .module_bit = OMAP24XX_EN_GPT3_SHIFT,
465 .module_offs = CORE_MOD,
466 .idlest_reg_id = 1,
467 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
468 },
469 },
470 .dev_attr = &capability_alwon_dev_attr,
471 .slaves = omap2430_timer3_slaves,
472 .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
473 .class = &omap2xxx_timer_hwmod_class,
474};
475
476/* timer4 */
477static struct omap_hwmod omap2430_timer4_hwmod;
478
479/* l4_core -> timer4 */
480static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
481 .master = &omap2430_l4_core_hwmod,
482 .slave = &omap2430_timer4_hwmod,
483 .clk = "gpt4_ick",
484 .addr = omap2xxx_timer4_addrs,
485 .user = OCP_USER_MPU | OCP_USER_SDMA,
486};
487
488/* timer4 slave port */
489static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
490 &omap2430_l4_core__timer4,
491};
492
493/* timer4 hwmod */
494static struct omap_hwmod omap2430_timer4_hwmod = {
495 .name = "timer4",
496 .mpu_irqs = omap2_timer4_mpu_irqs,
497 .main_clk = "gpt4_fck",
498 .prcm = {
499 .omap2 = {
500 .prcm_reg_id = 1,
501 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
502 .module_offs = CORE_MOD,
503 .idlest_reg_id = 1,
504 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
505 },
506 },
507 .dev_attr = &capability_alwon_dev_attr,
508 .slaves = omap2430_timer4_slaves,
509 .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
510 .class = &omap2xxx_timer_hwmod_class,
511};
512
513/* timer5 */
514static struct omap_hwmod omap2430_timer5_hwmod;
515
516/* l4_core -> timer5 */
517static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
518 .master = &omap2430_l4_core_hwmod,
519 .slave = &omap2430_timer5_hwmod,
520 .clk = "gpt5_ick",
521 .addr = omap2xxx_timer5_addrs,
522 .user = OCP_USER_MPU | OCP_USER_SDMA,
523};
524
525/* timer5 slave port */
526static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
527 &omap2430_l4_core__timer5,
528};
529
530/* timer5 hwmod */
531static struct omap_hwmod omap2430_timer5_hwmod = {
532 .name = "timer5",
533 .mpu_irqs = omap2_timer5_mpu_irqs,
534 .main_clk = "gpt5_fck",
535 .prcm = {
536 .omap2 = {
537 .prcm_reg_id = 1,
538 .module_bit = OMAP24XX_EN_GPT5_SHIFT,
539 .module_offs = CORE_MOD,
540 .idlest_reg_id = 1,
541 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
542 },
543 },
544 .dev_attr = &capability_alwon_dev_attr,
545 .slaves = omap2430_timer5_slaves,
546 .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
547 .class = &omap2xxx_timer_hwmod_class,
548};
549
550/* timer6 */
551static struct omap_hwmod omap2430_timer6_hwmod;
552
553/* l4_core -> timer6 */
554static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
555 .master = &omap2430_l4_core_hwmod,
556 .slave = &omap2430_timer6_hwmod,
557 .clk = "gpt6_ick",
558 .addr = omap2xxx_timer6_addrs,
559 .user = OCP_USER_MPU | OCP_USER_SDMA,
560};
561
562/* timer6 slave port */
563static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
564 &omap2430_l4_core__timer6,
565};
566
567/* timer6 hwmod */
568static struct omap_hwmod omap2430_timer6_hwmod = {
569 .name = "timer6",
570 .mpu_irqs = omap2_timer6_mpu_irqs,
571 .main_clk = "gpt6_fck",
572 .prcm = {
573 .omap2 = {
574 .prcm_reg_id = 1,
575 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
576 .module_offs = CORE_MOD,
577 .idlest_reg_id = 1,
578 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
579 },
580 },
581 .dev_attr = &capability_alwon_dev_attr,
582 .slaves = omap2430_timer6_slaves,
583 .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
584 .class = &omap2xxx_timer_hwmod_class,
585};
586
587/* timer7 */
588static struct omap_hwmod omap2430_timer7_hwmod;
589
590/* l4_core -> timer7 */
591static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
592 .master = &omap2430_l4_core_hwmod,
593 .slave = &omap2430_timer7_hwmod,
594 .clk = "gpt7_ick",
595 .addr = omap2xxx_timer7_addrs,
596 .user = OCP_USER_MPU | OCP_USER_SDMA,
597};
598
599/* timer7 slave port */
600static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
601 &omap2430_l4_core__timer7,
602};
603
604/* timer7 hwmod */
605static struct omap_hwmod omap2430_timer7_hwmod = {
606 .name = "timer7",
607 .mpu_irqs = omap2_timer7_mpu_irqs,
608 .main_clk = "gpt7_fck",
609 .prcm = {
610 .omap2 = {
611 .prcm_reg_id = 1,
612 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
613 .module_offs = CORE_MOD,
614 .idlest_reg_id = 1,
615 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
616 },
617 },
618 .dev_attr = &capability_alwon_dev_attr,
619 .slaves = omap2430_timer7_slaves,
620 .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
621 .class = &omap2xxx_timer_hwmod_class,
622};
623
624/* timer8 */
625static struct omap_hwmod omap2430_timer8_hwmod;
626
627/* l4_core -> timer8 */
628static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
629 .master = &omap2430_l4_core_hwmod,
630 .slave = &omap2430_timer8_hwmod,
631 .clk = "gpt8_ick",
632 .addr = omap2xxx_timer8_addrs,
633 .user = OCP_USER_MPU | OCP_USER_SDMA,
634};
635
636/* timer8 slave port */
637static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
638 &omap2430_l4_core__timer8,
639};
640
641/* timer8 hwmod */
642static struct omap_hwmod omap2430_timer8_hwmod = {
643 .name = "timer8",
644 .mpu_irqs = omap2_timer8_mpu_irqs,
645 .main_clk = "gpt8_fck",
646 .prcm = {
647 .omap2 = {
648 .prcm_reg_id = 1,
649 .module_bit = OMAP24XX_EN_GPT8_SHIFT,
650 .module_offs = CORE_MOD,
651 .idlest_reg_id = 1,
652 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
653 },
654 },
655 .dev_attr = &capability_alwon_dev_attr,
656 .slaves = omap2430_timer8_slaves,
657 .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
658 .class = &omap2xxx_timer_hwmod_class,
659};
660
661/* timer9 */
662static struct omap_hwmod omap2430_timer9_hwmod;
663
664/* l4_core -> timer9 */
665static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
666 .master = &omap2430_l4_core_hwmod,
667 .slave = &omap2430_timer9_hwmod,
668 .clk = "gpt9_ick",
669 .addr = omap2xxx_timer9_addrs,
670 .user = OCP_USER_MPU | OCP_USER_SDMA,
671};
672
673/* timer9 slave port */
674static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
675 &omap2430_l4_core__timer9,
676};
677
678/* timer9 hwmod */
679static struct omap_hwmod omap2430_timer9_hwmod = {
680 .name = "timer9",
681 .mpu_irqs = omap2_timer9_mpu_irqs,
682 .main_clk = "gpt9_fck",
683 .prcm = {
684 .omap2 = {
685 .prcm_reg_id = 1,
686 .module_bit = OMAP24XX_EN_GPT9_SHIFT,
687 .module_offs = CORE_MOD,
688 .idlest_reg_id = 1,
689 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
690 },
691 },
692 .dev_attr = &capability_pwm_dev_attr,
693 .slaves = omap2430_timer9_slaves,
694 .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
695 .class = &omap2xxx_timer_hwmod_class,
696};
697
698/* timer10 */
699static struct omap_hwmod omap2430_timer10_hwmod;
700
701/* l4_core -> timer10 */
702static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
703 .master = &omap2430_l4_core_hwmod,
704 .slave = &omap2430_timer10_hwmod,
705 .clk = "gpt10_ick",
706 .addr = omap2_timer10_addrs,
707 .user = OCP_USER_MPU | OCP_USER_SDMA,
708};
709
710/* timer10 slave port */
711static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
712 &omap2430_l4_core__timer10,
713};
714
715/* timer10 hwmod */
716static struct omap_hwmod omap2430_timer10_hwmod = {
717 .name = "timer10",
718 .mpu_irqs = omap2_timer10_mpu_irqs,
719 .main_clk = "gpt10_fck",
720 .prcm = {
721 .omap2 = {
722 .prcm_reg_id = 1,
723 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
724 .module_offs = CORE_MOD,
725 .idlest_reg_id = 1,
726 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
727 },
728 },
729 .dev_attr = &capability_pwm_dev_attr,
730 .slaves = omap2430_timer10_slaves,
731 .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
732 .class = &omap2xxx_timer_hwmod_class,
733};
734
735/* timer11 */
736static struct omap_hwmod omap2430_timer11_hwmod;
737
738/* l4_core -> timer11 */
739static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
740 .master = &omap2430_l4_core_hwmod,
741 .slave = &omap2430_timer11_hwmod,
742 .clk = "gpt11_ick",
743 .addr = omap2_timer11_addrs,
744 .user = OCP_USER_MPU | OCP_USER_SDMA,
745};
746
747/* timer11 slave port */
748static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
749 &omap2430_l4_core__timer11,
750};
751
752/* timer11 hwmod */
753static struct omap_hwmod omap2430_timer11_hwmod = {
754 .name = "timer11",
755 .mpu_irqs = omap2_timer11_mpu_irqs,
756 .main_clk = "gpt11_fck",
757 .prcm = {
758 .omap2 = {
759 .prcm_reg_id = 1,
760 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
761 .module_offs = CORE_MOD,
762 .idlest_reg_id = 1,
763 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
764 },
765 },
766 .dev_attr = &capability_pwm_dev_attr,
767 .slaves = omap2430_timer11_slaves,
768 .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
769 .class = &omap2xxx_timer_hwmod_class,
770};
771
772/* timer12 */
773static struct omap_hwmod omap2430_timer12_hwmod;
774
775/* l4_core -> timer12 */
776static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
777 .master = &omap2430_l4_core_hwmod,
778 .slave = &omap2430_timer12_hwmod,
779 .clk = "gpt12_ick",
780 .addr = omap2xxx_timer12_addrs,
781 .user = OCP_USER_MPU | OCP_USER_SDMA,
782};
783
784/* timer12 slave port */
785static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
786 &omap2430_l4_core__timer12,
787};
788
789/* timer12 hwmod */
790static struct omap_hwmod omap2430_timer12_hwmod = {
791 .name = "timer12",
792 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
793 .main_clk = "gpt12_fck",
794 .prcm = {
795 .omap2 = {
796 .prcm_reg_id = 1,
797 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
798 .module_offs = CORE_MOD,
799 .idlest_reg_id = 1,
800 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
801 },
802 },
803 .dev_attr = &capability_pwm_dev_attr,
804 .slaves = omap2430_timer12_slaves,
805 .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
806 .class = &omap2xxx_timer_hwmod_class,
807};
808
809/* l4_wkup -> wd_timer2 */
810static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
811 {
812 .pa_start = 0x49016000,
813 .pa_end = 0x4901607f,
814 .flags = ADDR_TYPE_RT
815 },
816 { }
817};
818
819static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
820 .master = &omap2430_l4_wkup_hwmod,
821 .slave = &omap2430_wd_timer2_hwmod,
822 .clk = "mpu_wdt_ick",
823 .addr = omap2430_wd_timer2_addrs,
824 .user = OCP_USER_MPU | OCP_USER_SDMA,
825};
826
827/* wd_timer2 */
828static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
829 &omap2430_l4_wkup__wd_timer2,
830};
831
832static struct omap_hwmod omap2430_wd_timer2_hwmod = {
833 .name = "wd_timer2",
834 .class = &omap2xxx_wd_timer_hwmod_class,
835 .main_clk = "mpu_wdt_fck",
836 .prcm = {
837 .omap2 = {
838 .prcm_reg_id = 1,
839 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
840 .module_offs = WKUP_MOD,
841 .idlest_reg_id = 1,
842 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
843 },
844 },
845 .slaves = omap2430_wd_timer2_slaves,
846 .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
847};
848
849/* UART1 */
850
851static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
852 &omap2_l4_core__uart1,
853};
854
855static struct omap_hwmod omap2430_uart1_hwmod = {
856 .name = "uart1",
857 .mpu_irqs = omap2_uart1_mpu_irqs,
858 .sdma_reqs = omap2_uart1_sdma_reqs,
859 .main_clk = "uart1_fck",
860 .prcm = {
861 .omap2 = {
862 .module_offs = CORE_MOD,
863 .prcm_reg_id = 1,
864 .module_bit = OMAP24XX_EN_UART1_SHIFT,
865 .idlest_reg_id = 1,
866 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
867 },
868 },
869 .slaves = omap2430_uart1_slaves,
870 .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
871 .class = &omap2_uart_class,
872};
873
874/* UART2 */
875
876static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
877 &omap2_l4_core__uart2,
878};
879
880static struct omap_hwmod omap2430_uart2_hwmod = {
881 .name = "uart2",
882 .mpu_irqs = omap2_uart2_mpu_irqs,
883 .sdma_reqs = omap2_uart2_sdma_reqs,
884 .main_clk = "uart2_fck",
885 .prcm = {
886 .omap2 = {
887 .module_offs = CORE_MOD,
888 .prcm_reg_id = 1,
889 .module_bit = OMAP24XX_EN_UART2_SHIFT,
890 .idlest_reg_id = 1,
891 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
892 },
893 },
894 .slaves = omap2430_uart2_slaves,
895 .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
896 .class = &omap2_uart_class,
897};
898
899/* UART3 */
900
901static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
902 &omap2_l4_core__uart3,
903};
904
905static struct omap_hwmod omap2430_uart3_hwmod = {
906 .name = "uart3",
907 .mpu_irqs = omap2_uart3_mpu_irqs,
908 .sdma_reqs = omap2_uart3_sdma_reqs,
909 .main_clk = "uart3_fck",
910 .prcm = {
911 .omap2 = {
912 .module_offs = CORE_MOD,
913 .prcm_reg_id = 2,
914 .module_bit = OMAP24XX_EN_UART3_SHIFT,
915 .idlest_reg_id = 2,
916 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
917 },
918 },
919 .slaves = omap2430_uart3_slaves,
920 .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
921 .class = &omap2_uart_class,
922};
923
924/* dss */
925/* dss master ports */
926static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
927 &omap2430_dss__l3,
928};
929
930/* l4_core -> dss */
931static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
932 .master = &omap2430_l4_core_hwmod,
933 .slave = &omap2430_dss_core_hwmod,
934 .clk = "dss_ick",
935 .addr = omap2_dss_addrs,
936 .user = OCP_USER_MPU | OCP_USER_SDMA,
937};
938
939/* dss slave ports */
940static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
941 &omap2430_l4_core__dss,
942};
943
944static struct omap_hwmod_opt_clk dss_opt_clks[] = {
945 /*
946 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
947 * driver does not use these clocks.
948 */
949 { .role = "tv_clk", .clk = "dss_54m_fck" },
950 { .role = "sys_clk", .clk = "dss2_fck" },
951};
952
953static struct omap_hwmod omap2430_dss_core_hwmod = {
954 .name = "dss_core",
955 .class = &omap2_dss_hwmod_class,
956 .main_clk = "dss1_fck", /* instead of dss_fck */
957 .sdma_reqs = omap2xxx_dss_sdma_chs,
958 .prcm = {
959 .omap2 = {
960 .prcm_reg_id = 1,
961 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
962 .module_offs = CORE_MOD,
963 .idlest_reg_id = 1,
964 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
965 },
966 },
967 .opt_clks = dss_opt_clks,
968 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
969 .slaves = omap2430_dss_slaves,
970 .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
971 .masters = omap2430_dss_masters,
972 .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
973 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
974};
975
976/* l4_core -> dss_dispc */
977static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
978 .master = &omap2430_l4_core_hwmod,
979 .slave = &omap2430_dss_dispc_hwmod,
980 .clk = "dss_ick",
981 .addr = omap2_dss_dispc_addrs,
982 .user = OCP_USER_MPU | OCP_USER_SDMA,
983};
984
985/* dss_dispc slave ports */
986static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
987 &omap2430_l4_core__dss_dispc,
988};
989
990static struct omap_hwmod omap2430_dss_dispc_hwmod = {
991 .name = "dss_dispc",
992 .class = &omap2_dispc_hwmod_class,
993 .mpu_irqs = omap2_dispc_irqs,
994 .main_clk = "dss1_fck",
995 .prcm = {
996 .omap2 = {
997 .prcm_reg_id = 1,
998 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
999 .module_offs = CORE_MOD,
1000 .idlest_reg_id = 1,
1001 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
1002 },
1003 },
1004 .slaves = omap2430_dss_dispc_slaves,
1005 .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
1006 .flags = HWMOD_NO_IDLEST,
1007 .dev_attr = &omap2_3_dss_dispc_dev_attr
1008};
1009
1010/* l4_core -> dss_rfbi */
1011static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
1012 .master = &omap2430_l4_core_hwmod,
1013 .slave = &omap2430_dss_rfbi_hwmod,
1014 .clk = "dss_ick",
1015 .addr = omap2_dss_rfbi_addrs,
1016 .user = OCP_USER_MPU | OCP_USER_SDMA,
1017};
1018
1019/* dss_rfbi slave ports */
1020static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
1021 &omap2430_l4_core__dss_rfbi,
1022};
1023
1024static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1025 { .role = "ick", .clk = "dss_ick" },
1026};
1027
1028static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
1029 .name = "dss_rfbi",
1030 .class = &omap2_rfbi_hwmod_class,
1031 .main_clk = "dss1_fck",
1032 .prcm = {
1033 .omap2 = {
1034 .prcm_reg_id = 1,
1035 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1036 .module_offs = CORE_MOD,
1037 },
1038 },
1039 .opt_clks = dss_rfbi_opt_clks,
1040 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
1041 .slaves = omap2430_dss_rfbi_slaves,
1042 .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
1043 .flags = HWMOD_NO_IDLEST,
1044};
1045
1046/* l4_core -> dss_venc */
1047static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
1048 .master = &omap2430_l4_core_hwmod,
1049 .slave = &omap2430_dss_venc_hwmod,
1050 .clk = "dss_ick",
1051 .addr = omap2_dss_venc_addrs,
1052 .flags = OCPIF_SWSUP_IDLE,
1053 .user = OCP_USER_MPU | OCP_USER_SDMA,
1054};
1055
1056/* dss_venc slave ports */
1057static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
1058 &omap2430_l4_core__dss_venc,
1059};
1060
1061static struct omap_hwmod omap2430_dss_venc_hwmod = {
1062 .name = "dss_venc",
1063 .class = &omap2_venc_hwmod_class,
1064 .main_clk = "dss_54m_fck",
1065 .prcm = {
1066 .omap2 = {
1067 .prcm_reg_id = 1,
1068 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1069 .module_offs = CORE_MOD,
1070 },
1071 },
1072 .slaves = omap2430_dss_venc_slaves,
1073 .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
1074 .flags = HWMOD_NO_IDLEST,
1075}; 60};
1076 61
1077/* I2C common */ 62/* I2C common */
@@ -1099,11 +84,6 @@ static struct omap_i2c_dev_attr i2c_dev_attr = {
1099}; 84};
1100 85
1101/* I2C1 */ 86/* I2C1 */
1102
1103static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
1104 &omap2430_l4_core__i2c1,
1105};
1106
1107static struct omap_hwmod omap2430_i2c1_hwmod = { 87static struct omap_hwmod omap2430_i2c1_hwmod = {
1108 .name = "i2c1", 88 .name = "i2c1",
1109 .flags = HWMOD_16BIT_REG, 89 .flags = HWMOD_16BIT_REG,
@@ -1127,18 +107,11 @@ static struct omap_hwmod omap2430_i2c1_hwmod = {
1127 .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT, 107 .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
1128 }, 108 },
1129 }, 109 },
1130 .slaves = omap2430_i2c1_slaves,
1131 .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
1132 .class = &i2c_class, 110 .class = &i2c_class,
1133 .dev_attr = &i2c_dev_attr, 111 .dev_attr = &i2c_dev_attr,
1134}; 112};
1135 113
1136/* I2C2 */ 114/* I2C2 */
1137
1138static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
1139 &omap2430_l4_core__i2c2,
1140};
1141
1142static struct omap_hwmod omap2430_i2c2_hwmod = { 115static struct omap_hwmod omap2430_i2c2_hwmod = {
1143 .name = "i2c2", 116 .name = "i2c2",
1144 .flags = HWMOD_16BIT_REG, 117 .flags = HWMOD_16BIT_REG,
@@ -1154,218 +127,16 @@ static struct omap_hwmod omap2430_i2c2_hwmod = {
1154 .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT, 127 .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
1155 }, 128 },
1156 }, 129 },
1157 .slaves = omap2430_i2c2_slaves,
1158 .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
1159 .class = &i2c_class, 130 .class = &i2c_class,
1160 .dev_attr = &i2c_dev_attr, 131 .dev_attr = &i2c_dev_attr,
1161}; 132};
1162 133
1163/* l4_wkup -> gpio1 */
1164static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
1165 {
1166 .pa_start = 0x4900C000,
1167 .pa_end = 0x4900C1ff,
1168 .flags = ADDR_TYPE_RT
1169 },
1170 { }
1171};
1172
1173static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
1174 .master = &omap2430_l4_wkup_hwmod,
1175 .slave = &omap2430_gpio1_hwmod,
1176 .clk = "gpios_ick",
1177 .addr = omap2430_gpio1_addr_space,
1178 .user = OCP_USER_MPU | OCP_USER_SDMA,
1179};
1180
1181/* l4_wkup -> gpio2 */
1182static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
1183 {
1184 .pa_start = 0x4900E000,
1185 .pa_end = 0x4900E1ff,
1186 .flags = ADDR_TYPE_RT
1187 },
1188 { }
1189};
1190
1191static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
1192 .master = &omap2430_l4_wkup_hwmod,
1193 .slave = &omap2430_gpio2_hwmod,
1194 .clk = "gpios_ick",
1195 .addr = omap2430_gpio2_addr_space,
1196 .user = OCP_USER_MPU | OCP_USER_SDMA,
1197};
1198
1199/* l4_wkup -> gpio3 */
1200static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
1201 {
1202 .pa_start = 0x49010000,
1203 .pa_end = 0x490101ff,
1204 .flags = ADDR_TYPE_RT
1205 },
1206 { }
1207};
1208
1209static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
1210 .master = &omap2430_l4_wkup_hwmod,
1211 .slave = &omap2430_gpio3_hwmod,
1212 .clk = "gpios_ick",
1213 .addr = omap2430_gpio3_addr_space,
1214 .user = OCP_USER_MPU | OCP_USER_SDMA,
1215};
1216
1217/* l4_wkup -> gpio4 */
1218static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
1219 {
1220 .pa_start = 0x49012000,
1221 .pa_end = 0x490121ff,
1222 .flags = ADDR_TYPE_RT
1223 },
1224 { }
1225};
1226
1227static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
1228 .master = &omap2430_l4_wkup_hwmod,
1229 .slave = &omap2430_gpio4_hwmod,
1230 .clk = "gpios_ick",
1231 .addr = omap2430_gpio4_addr_space,
1232 .user = OCP_USER_MPU | OCP_USER_SDMA,
1233};
1234
1235/* l4_core -> gpio5 */
1236static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
1237 {
1238 .pa_start = 0x480B6000,
1239 .pa_end = 0x480B61ff,
1240 .flags = ADDR_TYPE_RT
1241 },
1242 { }
1243};
1244
1245static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
1246 .master = &omap2430_l4_core_hwmod,
1247 .slave = &omap2430_gpio5_hwmod,
1248 .clk = "gpio5_ick",
1249 .addr = omap2430_gpio5_addr_space,
1250 .user = OCP_USER_MPU | OCP_USER_SDMA,
1251};
1252
1253/* gpio dev_attr */
1254static struct omap_gpio_dev_attr gpio_dev_attr = {
1255 .bank_width = 32,
1256 .dbck_flag = false,
1257};
1258
1259/* gpio1 */
1260static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
1261 &omap2430_l4_wkup__gpio1,
1262};
1263
1264static struct omap_hwmod omap2430_gpio1_hwmod = {
1265 .name = "gpio1",
1266 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1267 .mpu_irqs = omap2_gpio1_irqs,
1268 .main_clk = "gpios_fck",
1269 .prcm = {
1270 .omap2 = {
1271 .prcm_reg_id = 1,
1272 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1273 .module_offs = WKUP_MOD,
1274 .idlest_reg_id = 1,
1275 .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
1276 },
1277 },
1278 .slaves = omap2430_gpio1_slaves,
1279 .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
1280 .class = &omap2xxx_gpio_hwmod_class,
1281 .dev_attr = &gpio_dev_attr,
1282};
1283
1284/* gpio2 */
1285static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
1286 &omap2430_l4_wkup__gpio2,
1287};
1288
1289static struct omap_hwmod omap2430_gpio2_hwmod = {
1290 .name = "gpio2",
1291 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1292 .mpu_irqs = omap2_gpio2_irqs,
1293 .main_clk = "gpios_fck",
1294 .prcm = {
1295 .omap2 = {
1296 .prcm_reg_id = 1,
1297 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1298 .module_offs = WKUP_MOD,
1299 .idlest_reg_id = 1,
1300 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1301 },
1302 },
1303 .slaves = omap2430_gpio2_slaves,
1304 .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
1305 .class = &omap2xxx_gpio_hwmod_class,
1306 .dev_attr = &gpio_dev_attr,
1307};
1308
1309/* gpio3 */
1310static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
1311 &omap2430_l4_wkup__gpio3,
1312};
1313
1314static struct omap_hwmod omap2430_gpio3_hwmod = {
1315 .name = "gpio3",
1316 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1317 .mpu_irqs = omap2_gpio3_irqs,
1318 .main_clk = "gpios_fck",
1319 .prcm = {
1320 .omap2 = {
1321 .prcm_reg_id = 1,
1322 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1323 .module_offs = WKUP_MOD,
1324 .idlest_reg_id = 1,
1325 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1326 },
1327 },
1328 .slaves = omap2430_gpio3_slaves,
1329 .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
1330 .class = &omap2xxx_gpio_hwmod_class,
1331 .dev_attr = &gpio_dev_attr,
1332};
1333
1334/* gpio4 */
1335static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
1336 &omap2430_l4_wkup__gpio4,
1337};
1338
1339static struct omap_hwmod omap2430_gpio4_hwmod = {
1340 .name = "gpio4",
1341 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1342 .mpu_irqs = omap2_gpio4_irqs,
1343 .main_clk = "gpios_fck",
1344 .prcm = {
1345 .omap2 = {
1346 .prcm_reg_id = 1,
1347 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1348 .module_offs = WKUP_MOD,
1349 .idlest_reg_id = 1,
1350 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1351 },
1352 },
1353 .slaves = omap2430_gpio4_slaves,
1354 .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
1355 .class = &omap2xxx_gpio_hwmod_class,
1356 .dev_attr = &gpio_dev_attr,
1357};
1358
1359/* gpio5 */ 134/* gpio5 */
1360static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = { 135static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
1361 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */ 136 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
1362 { .irq = -1 } 137 { .irq = -1 }
1363}; 138};
1364 139
1365static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
1366 &omap2430_l4_core__gpio5,
1367};
1368
1369static struct omap_hwmod omap2430_gpio5_hwmod = { 140static struct omap_hwmod omap2430_gpio5_hwmod = {
1370 .name = "gpio5", 141 .name = "gpio5",
1371 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 142 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -1380,10 +151,8 @@ static struct omap_hwmod omap2430_gpio5_hwmod = {
1380 .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT, 151 .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
1381 }, 152 },
1382 }, 153 },
1383 .slaves = omap2430_gpio5_slaves,
1384 .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
1385 .class = &omap2xxx_gpio_hwmod_class, 154 .class = &omap2xxx_gpio_hwmod_class,
1386 .dev_attr = &gpio_dev_attr, 155 .dev_attr = &omap2xxx_gpio_dev_attr,
1387}; 156};
1388 157
1389/* dma attributes */ 158/* dma attributes */
@@ -1393,66 +162,21 @@ static struct omap_dma_dev_attr dma_dev_attr = {
1393 .lch_count = 32, 162 .lch_count = 32,
1394}; 163};
1395 164
1396/* dma_system -> L3 */
1397static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
1398 .master = &omap2430_dma_system_hwmod,
1399 .slave = &omap2430_l3_main_hwmod,
1400 .clk = "core_l3_ck",
1401 .user = OCP_USER_MPU | OCP_USER_SDMA,
1402};
1403
1404/* dma_system master ports */
1405static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
1406 &omap2430_dma_system__l3,
1407};
1408
1409/* l4_core -> dma_system */
1410static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
1411 .master = &omap2430_l4_core_hwmod,
1412 .slave = &omap2430_dma_system_hwmod,
1413 .clk = "sdma_ick",
1414 .addr = omap2_dma_system_addrs,
1415 .user = OCP_USER_MPU | OCP_USER_SDMA,
1416};
1417
1418/* dma_system slave ports */
1419static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
1420 &omap2430_l4_core__dma_system,
1421};
1422
1423static struct omap_hwmod omap2430_dma_system_hwmod = { 165static struct omap_hwmod omap2430_dma_system_hwmod = {
1424 .name = "dma", 166 .name = "dma",
1425 .class = &omap2xxx_dma_hwmod_class, 167 .class = &omap2xxx_dma_hwmod_class,
1426 .mpu_irqs = omap2_dma_system_irqs, 168 .mpu_irqs = omap2_dma_system_irqs,
1427 .main_clk = "core_l3_ck", 169 .main_clk = "core_l3_ck",
1428 .slaves = omap2430_dma_system_slaves,
1429 .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
1430 .masters = omap2430_dma_system_masters,
1431 .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
1432 .dev_attr = &dma_dev_attr, 170 .dev_attr = &dma_dev_attr,
1433 .flags = HWMOD_NO_IDLEST, 171 .flags = HWMOD_NO_IDLEST,
1434}; 172};
1435 173
1436/* mailbox */ 174/* mailbox */
1437static struct omap_hwmod omap2430_mailbox_hwmod;
1438static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { 175static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
1439 { .irq = 26 }, 176 { .irq = 26 },
1440 { .irq = -1 } 177 { .irq = -1 }
1441}; 178};
1442 179
1443/* l4_core -> mailbox */
1444static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
1445 .master = &omap2430_l4_core_hwmod,
1446 .slave = &omap2430_mailbox_hwmod,
1447 .addr = omap2_mailbox_addrs,
1448 .user = OCP_USER_MPU | OCP_USER_SDMA,
1449};
1450
1451/* mailbox slave ports */
1452static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
1453 &omap2430_l4_core__mailbox,
1454};
1455
1456static struct omap_hwmod omap2430_mailbox_hwmod = { 180static struct omap_hwmod omap2430_mailbox_hwmod = {
1457 .name = "mailbox", 181 .name = "mailbox",
1458 .class = &omap2xxx_mailbox_hwmod_class, 182 .class = &omap2xxx_mailbox_hwmod_class,
@@ -1467,66 +191,6 @@ static struct omap_hwmod omap2430_mailbox_hwmod = {
1467 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, 191 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1468 }, 192 },
1469 }, 193 },
1470 .slaves = omap2430_mailbox_slaves,
1471 .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
1472};
1473
1474/* mcspi1 */
1475static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
1476 &omap2430_l4_core__mcspi1,
1477};
1478
1479static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1480 .num_chipselect = 4,
1481};
1482
1483static struct omap_hwmod omap2430_mcspi1_hwmod = {
1484 .name = "mcspi1_hwmod",
1485 .mpu_irqs = omap2_mcspi1_mpu_irqs,
1486 .sdma_reqs = omap2_mcspi1_sdma_reqs,
1487 .main_clk = "mcspi1_fck",
1488 .prcm = {
1489 .omap2 = {
1490 .module_offs = CORE_MOD,
1491 .prcm_reg_id = 1,
1492 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1493 .idlest_reg_id = 1,
1494 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1495 },
1496 },
1497 .slaves = omap2430_mcspi1_slaves,
1498 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
1499 .class = &omap2xxx_mcspi_class,
1500 .dev_attr = &omap_mcspi1_dev_attr,
1501};
1502
1503/* mcspi2 */
1504static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
1505 &omap2430_l4_core__mcspi2,
1506};
1507
1508static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1509 .num_chipselect = 2,
1510};
1511
1512static struct omap_hwmod omap2430_mcspi2_hwmod = {
1513 .name = "mcspi2_hwmod",
1514 .mpu_irqs = omap2_mcspi2_mpu_irqs,
1515 .sdma_reqs = omap2_mcspi2_sdma_reqs,
1516 .main_clk = "mcspi2_fck",
1517 .prcm = {
1518 .omap2 = {
1519 .module_offs = CORE_MOD,
1520 .prcm_reg_id = 1,
1521 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1522 .idlest_reg_id = 1,
1523 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1524 },
1525 },
1526 .slaves = omap2430_mcspi2_slaves,
1527 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
1528 .class = &omap2xxx_mcspi_class,
1529 .dev_attr = &omap_mcspi2_dev_attr,
1530}; 194};
1531 195
1532/* mcspi3 */ 196/* mcspi3 */
@@ -1543,16 +207,12 @@ static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
1543 { .dma_req = -1 } 207 { .dma_req = -1 }
1544}; 208};
1545 209
1546static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
1547 &omap2430_l4_core__mcspi3,
1548};
1549
1550static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { 210static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1551 .num_chipselect = 2, 211 .num_chipselect = 2,
1552}; 212};
1553 213
1554static struct omap_hwmod omap2430_mcspi3_hwmod = { 214static struct omap_hwmod omap2430_mcspi3_hwmod = {
1555 .name = "mcspi3_hwmod", 215 .name = "mcspi3",
1556 .mpu_irqs = omap2430_mcspi3_mpu_irqs, 216 .mpu_irqs = omap2430_mcspi3_mpu_irqs,
1557 .sdma_reqs = omap2430_mcspi3_sdma_reqs, 217 .sdma_reqs = omap2430_mcspi3_sdma_reqs,
1558 .main_clk = "mcspi3_fck", 218 .main_clk = "mcspi3_fck",
@@ -1565,15 +225,11 @@ static struct omap_hwmod omap2430_mcspi3_hwmod = {
1565 .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT, 225 .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
1566 }, 226 },
1567 }, 227 },
1568 .slaves = omap2430_mcspi3_slaves,
1569 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
1570 .class = &omap2xxx_mcspi_class, 228 .class = &omap2xxx_mcspi_class,
1571 .dev_attr = &omap_mcspi3_dev_attr, 229 .dev_attr = &omap_mcspi3_dev_attr,
1572}; 230};
1573 231
1574/* 232/* usbhsotg */
1575 * usbhsotg
1576 */
1577static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = { 233static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
1578 .rev_offs = 0x0400, 234 .rev_offs = 0x0400,
1579 .sysc_offs = 0x0404, 235 .sysc_offs = 0x0404,
@@ -1612,10 +268,6 @@ static struct omap_hwmod omap2430_usbhsotg_hwmod = {
1612 .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT, 268 .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
1613 }, 269 },
1614 }, 270 },
1615 .masters = omap2430_usbhsotg_masters,
1616 .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
1617 .slaves = omap2430_usbhsotg_slaves,
1618 .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
1619 .class = &usbotg_class, 271 .class = &usbotg_class,
1620 /* 272 /*
1621 * Erratum ID: i479 idle_req / idle_ack mechanism potentially 273 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
@@ -1653,20 +305,6 @@ static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
1653 { .irq = -1 } 305 { .irq = -1 }
1654}; 306};
1655 307
1656/* l4_core -> mcbsp1 */
1657static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
1658 .master = &omap2430_l4_core_hwmod,
1659 .slave = &omap2430_mcbsp1_hwmod,
1660 .clk = "mcbsp1_ick",
1661 .addr = omap2_mcbsp1_addrs,
1662 .user = OCP_USER_MPU | OCP_USER_SDMA,
1663};
1664
1665/* mcbsp1 slave ports */
1666static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
1667 &omap2430_l4_core__mcbsp1,
1668};
1669
1670static struct omap_hwmod omap2430_mcbsp1_hwmod = { 308static struct omap_hwmod omap2430_mcbsp1_hwmod = {
1671 .name = "mcbsp1", 309 .name = "mcbsp1",
1672 .class = &omap2430_mcbsp_hwmod_class, 310 .class = &omap2430_mcbsp_hwmod_class,
@@ -1682,8 +320,6 @@ static struct omap_hwmod omap2430_mcbsp1_hwmod = {
1682 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT, 320 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1683 }, 321 },
1684 }, 322 },
1685 .slaves = omap2430_mcbsp1_slaves,
1686 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
1687}; 323};
1688 324
1689/* mcbsp2 */ 325/* mcbsp2 */
@@ -1694,20 +330,6 @@ static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
1694 { .irq = -1 } 330 { .irq = -1 }
1695}; 331};
1696 332
1697/* l4_core -> mcbsp2 */
1698static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
1699 .master = &omap2430_l4_core_hwmod,
1700 .slave = &omap2430_mcbsp2_hwmod,
1701 .clk = "mcbsp2_ick",
1702 .addr = omap2xxx_mcbsp2_addrs,
1703 .user = OCP_USER_MPU | OCP_USER_SDMA,
1704};
1705
1706/* mcbsp2 slave ports */
1707static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
1708 &omap2430_l4_core__mcbsp2,
1709};
1710
1711static struct omap_hwmod omap2430_mcbsp2_hwmod = { 333static struct omap_hwmod omap2430_mcbsp2_hwmod = {
1712 .name = "mcbsp2", 334 .name = "mcbsp2",
1713 .class = &omap2430_mcbsp_hwmod_class, 335 .class = &omap2430_mcbsp_hwmod_class,
@@ -1723,8 +345,6 @@ static struct omap_hwmod omap2430_mcbsp2_hwmod = {
1723 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT, 345 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1724 }, 346 },
1725 }, 347 },
1726 .slaves = omap2430_mcbsp2_slaves,
1727 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
1728}; 348};
1729 349
1730/* mcbsp3 */ 350/* mcbsp3 */
@@ -1735,30 +355,6 @@ static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
1735 { .irq = -1 } 355 { .irq = -1 }
1736}; 356};
1737 357
1738static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
1739 {
1740 .name = "mpu",
1741 .pa_start = 0x4808C000,
1742 .pa_end = 0x4808C0ff,
1743 .flags = ADDR_TYPE_RT
1744 },
1745 { }
1746};
1747
1748/* l4_core -> mcbsp3 */
1749static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
1750 .master = &omap2430_l4_core_hwmod,
1751 .slave = &omap2430_mcbsp3_hwmod,
1752 .clk = "mcbsp3_ick",
1753 .addr = omap2430_mcbsp3_addrs,
1754 .user = OCP_USER_MPU | OCP_USER_SDMA,
1755};
1756
1757/* mcbsp3 slave ports */
1758static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
1759 &omap2430_l4_core__mcbsp3,
1760};
1761
1762static struct omap_hwmod omap2430_mcbsp3_hwmod = { 358static struct omap_hwmod omap2430_mcbsp3_hwmod = {
1763 .name = "mcbsp3", 359 .name = "mcbsp3",
1764 .class = &omap2430_mcbsp_hwmod_class, 360 .class = &omap2430_mcbsp_hwmod_class,
@@ -1774,8 +370,6 @@ static struct omap_hwmod omap2430_mcbsp3_hwmod = {
1774 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT, 370 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
1775 }, 371 },
1776 }, 372 },
1777 .slaves = omap2430_mcbsp3_slaves,
1778 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
1779}; 373};
1780 374
1781/* mcbsp4 */ 375/* mcbsp4 */
@@ -1792,30 +386,6 @@ static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
1792 { .dma_req = -1 } 386 { .dma_req = -1 }
1793}; 387};
1794 388
1795static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
1796 {
1797 .name = "mpu",
1798 .pa_start = 0x4808E000,
1799 .pa_end = 0x4808E0ff,
1800 .flags = ADDR_TYPE_RT
1801 },
1802 { }
1803};
1804
1805/* l4_core -> mcbsp4 */
1806static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
1807 .master = &omap2430_l4_core_hwmod,
1808 .slave = &omap2430_mcbsp4_hwmod,
1809 .clk = "mcbsp4_ick",
1810 .addr = omap2430_mcbsp4_addrs,
1811 .user = OCP_USER_MPU | OCP_USER_SDMA,
1812};
1813
1814/* mcbsp4 slave ports */
1815static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
1816 &omap2430_l4_core__mcbsp4,
1817};
1818
1819static struct omap_hwmod omap2430_mcbsp4_hwmod = { 389static struct omap_hwmod omap2430_mcbsp4_hwmod = {
1820 .name = "mcbsp4", 390 .name = "mcbsp4",
1821 .class = &omap2430_mcbsp_hwmod_class, 391 .class = &omap2430_mcbsp_hwmod_class,
@@ -1831,8 +401,6 @@ static struct omap_hwmod omap2430_mcbsp4_hwmod = {
1831 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT, 401 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
1832 }, 402 },
1833 }, 403 },
1834 .slaves = omap2430_mcbsp4_slaves,
1835 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
1836}; 404};
1837 405
1838/* mcbsp5 */ 406/* mcbsp5 */
@@ -1849,30 +417,6 @@ static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
1849 { .dma_req = -1 } 417 { .dma_req = -1 }
1850}; 418};
1851 419
1852static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
1853 {
1854 .name = "mpu",
1855 .pa_start = 0x48096000,
1856 .pa_end = 0x480960ff,
1857 .flags = ADDR_TYPE_RT
1858 },
1859 { }
1860};
1861
1862/* l4_core -> mcbsp5 */
1863static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
1864 .master = &omap2430_l4_core_hwmod,
1865 .slave = &omap2430_mcbsp5_hwmod,
1866 .clk = "mcbsp5_ick",
1867 .addr = omap2430_mcbsp5_addrs,
1868 .user = OCP_USER_MPU | OCP_USER_SDMA,
1869};
1870
1871/* mcbsp5 slave ports */
1872static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
1873 &omap2430_l4_core__mcbsp5,
1874};
1875
1876static struct omap_hwmod omap2430_mcbsp5_hwmod = { 420static struct omap_hwmod omap2430_mcbsp5_hwmod = {
1877 .name = "mcbsp5", 421 .name = "mcbsp5",
1878 .class = &omap2430_mcbsp_hwmod_class, 422 .class = &omap2430_mcbsp_hwmod_class,
@@ -1888,12 +432,9 @@ static struct omap_hwmod omap2430_mcbsp5_hwmod = {
1888 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT, 432 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
1889 }, 433 },
1890 }, 434 },
1891 .slaves = omap2430_mcbsp5_slaves,
1892 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
1893}; 435};
1894 436
1895/* MMC/SD/SDIO common */ 437/* MMC/SD/SDIO common */
1896
1897static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = { 438static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
1898 .rev_offs = 0x1fc, 439 .rev_offs = 0x1fc,
1899 .sysc_offs = 0x10, 440 .sysc_offs = 0x10,
@@ -1911,7 +452,6 @@ static struct omap_hwmod_class omap2430_mmc_class = {
1911}; 452};
1912 453
1913/* MMC/SD/SDIO1 */ 454/* MMC/SD/SDIO1 */
1914
1915static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = { 455static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
1916 { .irq = 83 }, 456 { .irq = 83 },
1917 { .irq = -1 } 457 { .irq = -1 }
@@ -1927,10 +467,6 @@ static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
1927 { .role = "dbck", .clk = "mmchsdb1_fck" }, 467 { .role = "dbck", .clk = "mmchsdb1_fck" },
1928}; 468};
1929 469
1930static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
1931 &omap2430_l4_core__mmc1,
1932};
1933
1934static struct omap_mmc_dev_attr mmc1_dev_attr = { 470static struct omap_mmc_dev_attr mmc1_dev_attr = {
1935 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, 471 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1936}; 472};
@@ -1953,13 +489,10 @@ static struct omap_hwmod omap2430_mmc1_hwmod = {
1953 }, 489 },
1954 }, 490 },
1955 .dev_attr = &mmc1_dev_attr, 491 .dev_attr = &mmc1_dev_attr,
1956 .slaves = omap2430_mmc1_slaves,
1957 .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
1958 .class = &omap2430_mmc_class, 492 .class = &omap2430_mmc_class,
1959}; 493};
1960 494
1961/* MMC/SD/SDIO2 */ 495/* MMC/SD/SDIO2 */
1962
1963static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = { 496static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
1964 { .irq = 86 }, 497 { .irq = 86 },
1965 { .irq = -1 } 498 { .irq = -1 }
@@ -1975,10 +508,6 @@ static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
1975 { .role = "dbck", .clk = "mmchsdb2_fck" }, 508 { .role = "dbck", .clk = "mmchsdb2_fck" },
1976}; 509};
1977 510
1978static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
1979 &omap2430_l4_core__mmc2,
1980};
1981
1982static struct omap_hwmod omap2430_mmc2_hwmod = { 511static struct omap_hwmod omap2430_mmc2_hwmod = {
1983 .name = "mmc2", 512 .name = "mmc2",
1984 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 513 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -1996,78 +525,371 @@ static struct omap_hwmod omap2430_mmc2_hwmod = {
1996 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT, 525 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
1997 }, 526 },
1998 }, 527 },
1999 .slaves = omap2430_mmc2_slaves,
2000 .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
2001 .class = &omap2430_mmc_class, 528 .class = &omap2430_mmc_class,
2002}; 529};
2003 530
2004static __initdata struct omap_hwmod *omap2430_hwmods[] = { 531/*
2005 &omap2430_l3_main_hwmod, 532 * interfaces
2006 &omap2430_l4_core_hwmod, 533 */
2007 &omap2430_l4_wkup_hwmod, 534
2008 &omap2430_mpu_hwmod, 535/* L3 -> L4_CORE interface */
2009 &omap2430_iva_hwmod, 536/* l3_core -> usbhsotg interface */
2010 537static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
2011 &omap2430_timer1_hwmod, 538 .master = &omap2430_usbhsotg_hwmod,
2012 &omap2430_timer2_hwmod, 539 .slave = &omap2xxx_l3_main_hwmod,
2013 &omap2430_timer3_hwmod, 540 .clk = "core_l3_ck",
2014 &omap2430_timer4_hwmod, 541 .user = OCP_USER_MPU,
2015 &omap2430_timer5_hwmod, 542};
2016 &omap2430_timer6_hwmod, 543
2017 &omap2430_timer7_hwmod, 544/* L4 CORE -> I2C1 interface */
2018 &omap2430_timer8_hwmod, 545static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
2019 &omap2430_timer9_hwmod, 546 .master = &omap2xxx_l4_core_hwmod,
2020 &omap2430_timer10_hwmod, 547 .slave = &omap2430_i2c1_hwmod,
2021 &omap2430_timer11_hwmod, 548 .clk = "i2c1_ick",
2022 &omap2430_timer12_hwmod, 549 .addr = omap2_i2c1_addr_space,
2023 550 .user = OCP_USER_MPU | OCP_USER_SDMA,
2024 &omap2430_wd_timer2_hwmod, 551};
2025 &omap2430_uart1_hwmod, 552
2026 &omap2430_uart2_hwmod, 553/* L4 CORE -> I2C2 interface */
2027 &omap2430_uart3_hwmod, 554static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
2028 /* dss class */ 555 .master = &omap2xxx_l4_core_hwmod,
2029 &omap2430_dss_core_hwmod, 556 .slave = &omap2430_i2c2_hwmod,
2030 &omap2430_dss_dispc_hwmod, 557 .clk = "i2c2_ick",
2031 &omap2430_dss_rfbi_hwmod, 558 .addr = omap2_i2c2_addr_space,
2032 &omap2430_dss_venc_hwmod, 559 .user = OCP_USER_MPU | OCP_USER_SDMA,
2033 /* i2c class */ 560};
2034 &omap2430_i2c1_hwmod, 561
2035 &omap2430_i2c2_hwmod, 562static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
2036 &omap2430_mmc1_hwmod, 563 {
2037 &omap2430_mmc2_hwmod, 564 .pa_start = OMAP243X_HS_BASE,
2038 565 .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
2039 /* gpio class */ 566 .flags = ADDR_TYPE_RT
2040 &omap2430_gpio1_hwmod, 567 },
2041 &omap2430_gpio2_hwmod, 568 { }
2042 &omap2430_gpio3_hwmod, 569};
2043 &omap2430_gpio4_hwmod, 570
2044 &omap2430_gpio5_hwmod, 571/* l4_core ->usbhsotg interface */
2045 572static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
2046 /* dma_system class*/ 573 .master = &omap2xxx_l4_core_hwmod,
2047 &omap2430_dma_system_hwmod, 574 .slave = &omap2430_usbhsotg_hwmod,
2048 575 .clk = "usb_l4_ick",
2049 /* mcbsp class */ 576 .addr = omap2430_usbhsotg_addrs,
2050 &omap2430_mcbsp1_hwmod, 577 .user = OCP_USER_MPU,
2051 &omap2430_mcbsp2_hwmod, 578};
2052 &omap2430_mcbsp3_hwmod, 579
2053 &omap2430_mcbsp4_hwmod, 580/* L4 CORE -> MMC1 interface */
2054 &omap2430_mcbsp5_hwmod, 581static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
2055 582 .master = &omap2xxx_l4_core_hwmod,
2056 /* mailbox class */ 583 .slave = &omap2430_mmc1_hwmod,
2057 &omap2430_mailbox_hwmod, 584 .clk = "mmchs1_ick",
2058 585 .addr = omap2430_mmc1_addr_space,
2059 /* mcspi class */ 586 .user = OCP_USER_MPU | OCP_USER_SDMA,
2060 &omap2430_mcspi1_hwmod, 587};
2061 &omap2430_mcspi2_hwmod, 588
2062 &omap2430_mcspi3_hwmod, 589/* L4 CORE -> MMC2 interface */
2063 590static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
2064 /* usbotg class*/ 591 .master = &omap2xxx_l4_core_hwmod,
2065 &omap2430_usbhsotg_hwmod, 592 .slave = &omap2430_mmc2_hwmod,
593 .clk = "mmchs2_ick",
594 .addr = omap2430_mmc2_addr_space,
595 .user = OCP_USER_MPU | OCP_USER_SDMA,
596};
597
598/* l4 core -> mcspi3 interface */
599static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
600 .master = &omap2xxx_l4_core_hwmod,
601 .slave = &omap2430_mcspi3_hwmod,
602 .clk = "mcspi3_ick",
603 .addr = omap2430_mcspi3_addr_space,
604 .user = OCP_USER_MPU | OCP_USER_SDMA,
605};
606
607/* IVA2 <- L3 interface */
608static struct omap_hwmod_ocp_if omap2430_l3__iva = {
609 .master = &omap2xxx_l3_main_hwmod,
610 .slave = &omap2430_iva_hwmod,
611 .clk = "core_l3_ck",
612 .user = OCP_USER_MPU | OCP_USER_SDMA,
613};
614
615static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
616 {
617 .pa_start = 0x49018000,
618 .pa_end = 0x49018000 + SZ_1K - 1,
619 .flags = ADDR_TYPE_RT
620 },
621 { }
622};
623
624/* l4_wkup -> timer1 */
625static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
626 .master = &omap2xxx_l4_wkup_hwmod,
627 .slave = &omap2xxx_timer1_hwmod,
628 .clk = "gpt1_ick",
629 .addr = omap2430_timer1_addrs,
630 .user = OCP_USER_MPU | OCP_USER_SDMA,
631};
2066 632
633/* l4_wkup -> wd_timer2 */
634static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
635 {
636 .pa_start = 0x49016000,
637 .pa_end = 0x4901607f,
638 .flags = ADDR_TYPE_RT
639 },
640 { }
641};
642
643static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
644 .master = &omap2xxx_l4_wkup_hwmod,
645 .slave = &omap2xxx_wd_timer2_hwmod,
646 .clk = "mpu_wdt_ick",
647 .addr = omap2430_wd_timer2_addrs,
648 .user = OCP_USER_MPU | OCP_USER_SDMA,
649};
650
651/* l4_wkup -> gpio1 */
652static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
653 {
654 .pa_start = 0x4900C000,
655 .pa_end = 0x4900C1ff,
656 .flags = ADDR_TYPE_RT
657 },
658 { }
659};
660
661static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
662 .master = &omap2xxx_l4_wkup_hwmod,
663 .slave = &omap2xxx_gpio1_hwmod,
664 .clk = "gpios_ick",
665 .addr = omap2430_gpio1_addr_space,
666 .user = OCP_USER_MPU | OCP_USER_SDMA,
667};
668
669/* l4_wkup -> gpio2 */
670static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
671 {
672 .pa_start = 0x4900E000,
673 .pa_end = 0x4900E1ff,
674 .flags = ADDR_TYPE_RT
675 },
676 { }
677};
678
679static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
680 .master = &omap2xxx_l4_wkup_hwmod,
681 .slave = &omap2xxx_gpio2_hwmod,
682 .clk = "gpios_ick",
683 .addr = omap2430_gpio2_addr_space,
684 .user = OCP_USER_MPU | OCP_USER_SDMA,
685};
686
687/* l4_wkup -> gpio3 */
688static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
689 {
690 .pa_start = 0x49010000,
691 .pa_end = 0x490101ff,
692 .flags = ADDR_TYPE_RT
693 },
694 { }
695};
696
697static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
698 .master = &omap2xxx_l4_wkup_hwmod,
699 .slave = &omap2xxx_gpio3_hwmod,
700 .clk = "gpios_ick",
701 .addr = omap2430_gpio3_addr_space,
702 .user = OCP_USER_MPU | OCP_USER_SDMA,
703};
704
705/* l4_wkup -> gpio4 */
706static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
707 {
708 .pa_start = 0x49012000,
709 .pa_end = 0x490121ff,
710 .flags = ADDR_TYPE_RT
711 },
712 { }
713};
714
715static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
716 .master = &omap2xxx_l4_wkup_hwmod,
717 .slave = &omap2xxx_gpio4_hwmod,
718 .clk = "gpios_ick",
719 .addr = omap2430_gpio4_addr_space,
720 .user = OCP_USER_MPU | OCP_USER_SDMA,
721};
722
723/* l4_core -> gpio5 */
724static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
725 {
726 .pa_start = 0x480B6000,
727 .pa_end = 0x480B61ff,
728 .flags = ADDR_TYPE_RT
729 },
730 { }
731};
732
733static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
734 .master = &omap2xxx_l4_core_hwmod,
735 .slave = &omap2430_gpio5_hwmod,
736 .clk = "gpio5_ick",
737 .addr = omap2430_gpio5_addr_space,
738 .user = OCP_USER_MPU | OCP_USER_SDMA,
739};
740
741/* dma_system -> L3 */
742static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
743 .master = &omap2430_dma_system_hwmod,
744 .slave = &omap2xxx_l3_main_hwmod,
745 .clk = "core_l3_ck",
746 .user = OCP_USER_MPU | OCP_USER_SDMA,
747};
748
749/* l4_core -> dma_system */
750static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
751 .master = &omap2xxx_l4_core_hwmod,
752 .slave = &omap2430_dma_system_hwmod,
753 .clk = "sdma_ick",
754 .addr = omap2_dma_system_addrs,
755 .user = OCP_USER_MPU | OCP_USER_SDMA,
756};
757
758/* l4_core -> mailbox */
759static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
760 .master = &omap2xxx_l4_core_hwmod,
761 .slave = &omap2430_mailbox_hwmod,
762 .addr = omap2_mailbox_addrs,
763 .user = OCP_USER_MPU | OCP_USER_SDMA,
764};
765
766/* l4_core -> mcbsp1 */
767static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
768 .master = &omap2xxx_l4_core_hwmod,
769 .slave = &omap2430_mcbsp1_hwmod,
770 .clk = "mcbsp1_ick",
771 .addr = omap2_mcbsp1_addrs,
772 .user = OCP_USER_MPU | OCP_USER_SDMA,
773};
774
775/* l4_core -> mcbsp2 */
776static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
777 .master = &omap2xxx_l4_core_hwmod,
778 .slave = &omap2430_mcbsp2_hwmod,
779 .clk = "mcbsp2_ick",
780 .addr = omap2xxx_mcbsp2_addrs,
781 .user = OCP_USER_MPU | OCP_USER_SDMA,
782};
783
784static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
785 {
786 .name = "mpu",
787 .pa_start = 0x4808C000,
788 .pa_end = 0x4808C0ff,
789 .flags = ADDR_TYPE_RT
790 },
791 { }
792};
793
794/* l4_core -> mcbsp3 */
795static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
796 .master = &omap2xxx_l4_core_hwmod,
797 .slave = &omap2430_mcbsp3_hwmod,
798 .clk = "mcbsp3_ick",
799 .addr = omap2430_mcbsp3_addrs,
800 .user = OCP_USER_MPU | OCP_USER_SDMA,
801};
802
803static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
804 {
805 .name = "mpu",
806 .pa_start = 0x4808E000,
807 .pa_end = 0x4808E0ff,
808 .flags = ADDR_TYPE_RT
809 },
810 { }
811};
812
813/* l4_core -> mcbsp4 */
814static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
815 .master = &omap2xxx_l4_core_hwmod,
816 .slave = &omap2430_mcbsp4_hwmod,
817 .clk = "mcbsp4_ick",
818 .addr = omap2430_mcbsp4_addrs,
819 .user = OCP_USER_MPU | OCP_USER_SDMA,
820};
821
822static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
823 {
824 .name = "mpu",
825 .pa_start = 0x48096000,
826 .pa_end = 0x480960ff,
827 .flags = ADDR_TYPE_RT
828 },
829 { }
830};
831
832/* l4_core -> mcbsp5 */
833static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
834 .master = &omap2xxx_l4_core_hwmod,
835 .slave = &omap2430_mcbsp5_hwmod,
836 .clk = "mcbsp5_ick",
837 .addr = omap2430_mcbsp5_addrs,
838 .user = OCP_USER_MPU | OCP_USER_SDMA,
839};
840
841static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
842 &omap2xxx_l3_main__l4_core,
843 &omap2xxx_mpu__l3_main,
844 &omap2xxx_dss__l3,
845 &omap2430_usbhsotg__l3,
846 &omap2430_l4_core__i2c1,
847 &omap2430_l4_core__i2c2,
848 &omap2xxx_l4_core__l4_wkup,
849 &omap2_l4_core__uart1,
850 &omap2_l4_core__uart2,
851 &omap2_l4_core__uart3,
852 &omap2430_l4_core__usbhsotg,
853 &omap2430_l4_core__mmc1,
854 &omap2430_l4_core__mmc2,
855 &omap2xxx_l4_core__mcspi1,
856 &omap2xxx_l4_core__mcspi2,
857 &omap2430_l4_core__mcspi3,
858 &omap2430_l3__iva,
859 &omap2430_l4_wkup__timer1,
860 &omap2xxx_l4_core__timer2,
861 &omap2xxx_l4_core__timer3,
862 &omap2xxx_l4_core__timer4,
863 &omap2xxx_l4_core__timer5,
864 &omap2xxx_l4_core__timer6,
865 &omap2xxx_l4_core__timer7,
866 &omap2xxx_l4_core__timer8,
867 &omap2xxx_l4_core__timer9,
868 &omap2xxx_l4_core__timer10,
869 &omap2xxx_l4_core__timer11,
870 &omap2xxx_l4_core__timer12,
871 &omap2430_l4_wkup__wd_timer2,
872 &omap2xxx_l4_core__dss,
873 &omap2xxx_l4_core__dss_dispc,
874 &omap2xxx_l4_core__dss_rfbi,
875 &omap2xxx_l4_core__dss_venc,
876 &omap2430_l4_wkup__gpio1,
877 &omap2430_l4_wkup__gpio2,
878 &omap2430_l4_wkup__gpio3,
879 &omap2430_l4_wkup__gpio4,
880 &omap2430_l4_core__gpio5,
881 &omap2430_dma_system__l3,
882 &omap2430_l4_core__dma_system,
883 &omap2430_l4_core__mailbox,
884 &omap2430_l4_core__mcbsp1,
885 &omap2430_l4_core__mcbsp2,
886 &omap2430_l4_core__mcbsp3,
887 &omap2430_l4_core__mcbsp4,
888 &omap2430_l4_core__mcbsp5,
2067 NULL, 889 NULL,
2068}; 890};
2069 891
2070int __init omap2430_hwmod_init(void) 892int __init omap2430_hwmod_init(void)
2071{ 893{
2072 return omap_hwmod_register(omap2430_hwmods); 894 return omap_hwmod_register_links(omap2430_hwmod_ocp_ifs);
2073} 895}
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
index 4f3547c2a49e..5178e40e84f9 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
@@ -15,10 +15,12 @@
15 15
16#include <plat/omap_hwmod.h> 16#include <plat/omap_hwmod.h>
17#include <plat/serial.h> 17#include <plat/serial.h>
18#include <plat/l3_2xxx.h>
19#include <plat/l4_2xxx.h>
18 20
19#include "omap_hwmod_common_data.h" 21#include "omap_hwmod_common_data.h"
20 22
21struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = { 23static struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = {
22 { 24 {
23 .pa_start = OMAP2_UART1_BASE, 25 .pa_start = OMAP2_UART1_BASE,
24 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1, 26 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
@@ -27,7 +29,7 @@ struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = {
27 { } 29 { }
28}; 30};
29 31
30struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = { 32static struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = {
31 { 33 {
32 .pa_start = OMAP2_UART2_BASE, 34 .pa_start = OMAP2_UART2_BASE,
33 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1, 35 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
@@ -36,7 +38,7 @@ struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = {
36 { } 38 { }
37}; 39};
38 40
39struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = { 41static struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = {
40 { 42 {
41 .pa_start = OMAP2_UART3_BASE, 43 .pa_start = OMAP2_UART3_BASE,
42 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1, 44 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
@@ -45,7 +47,7 @@ struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = {
45 { } 47 { }
46}; 48};
47 49
48struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = { 50static struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = {
49 { 51 {
50 .pa_start = 0x4802a000, 52 .pa_start = 0x4802a000,
51 .pa_end = 0x4802a000 + SZ_1K - 1, 53 .pa_end = 0x4802a000 + SZ_1K - 1,
@@ -54,7 +56,7 @@ struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = {
54 { } 56 { }
55}; 57};
56 58
57struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = { 59static struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = {
58 { 60 {
59 .pa_start = 0x48078000, 61 .pa_start = 0x48078000,
60 .pa_end = 0x48078000 + SZ_1K - 1, 62 .pa_end = 0x48078000 + SZ_1K - 1,
@@ -63,7 +65,7 @@ struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = {
63 { } 65 { }
64}; 66};
65 67
66struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = { 68static struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = {
67 { 69 {
68 .pa_start = 0x4807a000, 70 .pa_start = 0x4807a000,
69 .pa_end = 0x4807a000 + SZ_1K - 1, 71 .pa_end = 0x4807a000 + SZ_1K - 1,
@@ -72,7 +74,7 @@ struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = {
72 { } 74 { }
73}; 75};
74 76
75struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = { 77static struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = {
76 { 78 {
77 .pa_start = 0x4807c000, 79 .pa_start = 0x4807c000,
78 .pa_end = 0x4807c000 + SZ_1K - 1, 80 .pa_end = 0x4807c000 + SZ_1K - 1,
@@ -81,7 +83,7 @@ struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = {
81 { } 83 { }
82}; 84};
83 85
84struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = { 86static struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = {
85 { 87 {
86 .pa_start = 0x4807e000, 88 .pa_start = 0x4807e000,
87 .pa_end = 0x4807e000 + SZ_1K - 1, 89 .pa_end = 0x4807e000 + SZ_1K - 1,
@@ -90,7 +92,7 @@ struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = {
90 { } 92 { }
91}; 93};
92 94
93struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = { 95static struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = {
94 { 96 {
95 .pa_start = 0x48080000, 97 .pa_start = 0x48080000,
96 .pa_end = 0x48080000 + SZ_1K - 1, 98 .pa_end = 0x48080000 + SZ_1K - 1,
@@ -99,7 +101,7 @@ struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = {
99 { } 101 { }
100}; 102};
101 103
102struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = { 104static struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = {
103 { 105 {
104 .pa_start = 0x48082000, 106 .pa_start = 0x48082000,
105 .pa_end = 0x48082000 + SZ_1K - 1, 107 .pa_end = 0x48082000 + SZ_1K - 1,
@@ -108,7 +110,7 @@ struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = {
108 { } 110 { }
109}; 111};
110 112
111struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = { 113static struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = {
112 { 114 {
113 .pa_start = 0x48084000, 115 .pa_start = 0x48084000,
114 .pa_end = 0x48084000 + SZ_1K - 1, 116 .pa_end = 0x48084000 + SZ_1K - 1,
@@ -127,4 +129,246 @@ struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[] = {
127 { } 129 { }
128}; 130};
129 131
132/*
133 * Common interconnect data
134 */
135
136/* L3 -> L4_CORE interface */
137struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core = {
138 .master = &omap2xxx_l3_main_hwmod,
139 .slave = &omap2xxx_l4_core_hwmod,
140 .user = OCP_USER_MPU | OCP_USER_SDMA,
141};
142
143/* MPU -> L3 interface */
144struct omap_hwmod_ocp_if omap2xxx_mpu__l3_main = {
145 .master = &omap2xxx_mpu_hwmod,
146 .slave = &omap2xxx_l3_main_hwmod,
147 .user = OCP_USER_MPU,
148};
149
150/* DSS -> l3 */
151struct omap_hwmod_ocp_if omap2xxx_dss__l3 = {
152 .master = &omap2xxx_dss_core_hwmod,
153 .slave = &omap2xxx_l3_main_hwmod,
154 .fw = {
155 .omap2 = {
156 .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
157 .flags = OMAP_FIREWALL_L3,
158 }
159 },
160 .user = OCP_USER_MPU | OCP_USER_SDMA,
161};
162
163/* L4_CORE -> L4_WKUP interface */
164struct omap_hwmod_ocp_if omap2xxx_l4_core__l4_wkup = {
165 .master = &omap2xxx_l4_core_hwmod,
166 .slave = &omap2xxx_l4_wkup_hwmod,
167 .user = OCP_USER_MPU | OCP_USER_SDMA,
168};
169
170/* L4 CORE -> UART1 interface */
171struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
172 .master = &omap2xxx_l4_core_hwmod,
173 .slave = &omap2xxx_uart1_hwmod,
174 .clk = "uart1_ick",
175 .addr = omap2xxx_uart1_addr_space,
176 .user = OCP_USER_MPU | OCP_USER_SDMA,
177};
178
179/* L4 CORE -> UART2 interface */
180struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
181 .master = &omap2xxx_l4_core_hwmod,
182 .slave = &omap2xxx_uart2_hwmod,
183 .clk = "uart2_ick",
184 .addr = omap2xxx_uart2_addr_space,
185 .user = OCP_USER_MPU | OCP_USER_SDMA,
186};
187
188/* L4 PER -> UART3 interface */
189struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
190 .master = &omap2xxx_l4_core_hwmod,
191 .slave = &omap2xxx_uart3_hwmod,
192 .clk = "uart3_ick",
193 .addr = omap2xxx_uart3_addr_space,
194 .user = OCP_USER_MPU | OCP_USER_SDMA,
195};
196
197/* l4 core -> mcspi1 interface */
198struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi1 = {
199 .master = &omap2xxx_l4_core_hwmod,
200 .slave = &omap2xxx_mcspi1_hwmod,
201 .clk = "mcspi1_ick",
202 .addr = omap2_mcspi1_addr_space,
203 .user = OCP_USER_MPU | OCP_USER_SDMA,
204};
205
206/* l4 core -> mcspi2 interface */
207struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi2 = {
208 .master = &omap2xxx_l4_core_hwmod,
209 .slave = &omap2xxx_mcspi2_hwmod,
210 .clk = "mcspi2_ick",
211 .addr = omap2_mcspi2_addr_space,
212 .user = OCP_USER_MPU | OCP_USER_SDMA,
213};
214
215/* l4_core -> timer2 */
216struct omap_hwmod_ocp_if omap2xxx_l4_core__timer2 = {
217 .master = &omap2xxx_l4_core_hwmod,
218 .slave = &omap2xxx_timer2_hwmod,
219 .clk = "gpt2_ick",
220 .addr = omap2xxx_timer2_addrs,
221 .user = OCP_USER_MPU | OCP_USER_SDMA,
222};
223
224/* l4_core -> timer3 */
225struct omap_hwmod_ocp_if omap2xxx_l4_core__timer3 = {
226 .master = &omap2xxx_l4_core_hwmod,
227 .slave = &omap2xxx_timer3_hwmod,
228 .clk = "gpt3_ick",
229 .addr = omap2xxx_timer3_addrs,
230 .user = OCP_USER_MPU | OCP_USER_SDMA,
231};
232
233/* l4_core -> timer4 */
234struct omap_hwmod_ocp_if omap2xxx_l4_core__timer4 = {
235 .master = &omap2xxx_l4_core_hwmod,
236 .slave = &omap2xxx_timer4_hwmod,
237 .clk = "gpt4_ick",
238 .addr = omap2xxx_timer4_addrs,
239 .user = OCP_USER_MPU | OCP_USER_SDMA,
240};
241
242/* l4_core -> timer5 */
243struct omap_hwmod_ocp_if omap2xxx_l4_core__timer5 = {
244 .master = &omap2xxx_l4_core_hwmod,
245 .slave = &omap2xxx_timer5_hwmod,
246 .clk = "gpt5_ick",
247 .addr = omap2xxx_timer5_addrs,
248 .user = OCP_USER_MPU | OCP_USER_SDMA,
249};
250
251/* l4_core -> timer6 */
252struct omap_hwmod_ocp_if omap2xxx_l4_core__timer6 = {
253 .master = &omap2xxx_l4_core_hwmod,
254 .slave = &omap2xxx_timer6_hwmod,
255 .clk = "gpt6_ick",
256 .addr = omap2xxx_timer6_addrs,
257 .user = OCP_USER_MPU | OCP_USER_SDMA,
258};
259
260/* l4_core -> timer7 */
261struct omap_hwmod_ocp_if omap2xxx_l4_core__timer7 = {
262 .master = &omap2xxx_l4_core_hwmod,
263 .slave = &omap2xxx_timer7_hwmod,
264 .clk = "gpt7_ick",
265 .addr = omap2xxx_timer7_addrs,
266 .user = OCP_USER_MPU | OCP_USER_SDMA,
267};
268
269/* l4_core -> timer8 */
270struct omap_hwmod_ocp_if omap2xxx_l4_core__timer8 = {
271 .master = &omap2xxx_l4_core_hwmod,
272 .slave = &omap2xxx_timer8_hwmod,
273 .clk = "gpt8_ick",
274 .addr = omap2xxx_timer8_addrs,
275 .user = OCP_USER_MPU | OCP_USER_SDMA,
276};
277
278/* l4_core -> timer9 */
279struct omap_hwmod_ocp_if omap2xxx_l4_core__timer9 = {
280 .master = &omap2xxx_l4_core_hwmod,
281 .slave = &omap2xxx_timer9_hwmod,
282 .clk = "gpt9_ick",
283 .addr = omap2xxx_timer9_addrs,
284 .user = OCP_USER_MPU | OCP_USER_SDMA,
285};
286
287/* l4_core -> timer10 */
288struct omap_hwmod_ocp_if omap2xxx_l4_core__timer10 = {
289 .master = &omap2xxx_l4_core_hwmod,
290 .slave = &omap2xxx_timer10_hwmod,
291 .clk = "gpt10_ick",
292 .addr = omap2_timer10_addrs,
293 .user = OCP_USER_MPU | OCP_USER_SDMA,
294};
295
296/* l4_core -> timer11 */
297struct omap_hwmod_ocp_if omap2xxx_l4_core__timer11 = {
298 .master = &omap2xxx_l4_core_hwmod,
299 .slave = &omap2xxx_timer11_hwmod,
300 .clk = "gpt11_ick",
301 .addr = omap2_timer11_addrs,
302 .user = OCP_USER_MPU | OCP_USER_SDMA,
303};
304
305/* l4_core -> timer12 */
306struct omap_hwmod_ocp_if omap2xxx_l4_core__timer12 = {
307 .master = &omap2xxx_l4_core_hwmod,
308 .slave = &omap2xxx_timer12_hwmod,
309 .clk = "gpt12_ick",
310 .addr = omap2xxx_timer12_addrs,
311 .user = OCP_USER_MPU | OCP_USER_SDMA,
312};
313
314/* l4_core -> dss */
315struct omap_hwmod_ocp_if omap2xxx_l4_core__dss = {
316 .master = &omap2xxx_l4_core_hwmod,
317 .slave = &omap2xxx_dss_core_hwmod,
318 .clk = "dss_ick",
319 .addr = omap2_dss_addrs,
320 .fw = {
321 .omap2 = {
322 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
323 .flags = OMAP_FIREWALL_L4,
324 }
325 },
326 .user = OCP_USER_MPU | OCP_USER_SDMA,
327};
328
329/* l4_core -> dss_dispc */
330struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_dispc = {
331 .master = &omap2xxx_l4_core_hwmod,
332 .slave = &omap2xxx_dss_dispc_hwmod,
333 .clk = "dss_ick",
334 .addr = omap2_dss_dispc_addrs,
335 .fw = {
336 .omap2 = {
337 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
338 .flags = OMAP_FIREWALL_L4,
339 }
340 },
341 .user = OCP_USER_MPU | OCP_USER_SDMA,
342};
343
344/* l4_core -> dss_rfbi */
345struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi = {
346 .master = &omap2xxx_l4_core_hwmod,
347 .slave = &omap2xxx_dss_rfbi_hwmod,
348 .clk = "dss_ick",
349 .addr = omap2_dss_rfbi_addrs,
350 .fw = {
351 .omap2 = {
352 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
353 .flags = OMAP_FIREWALL_L4,
354 }
355 },
356 .user = OCP_USER_MPU | OCP_USER_SDMA,
357};
358
359/* l4_core -> dss_venc */
360struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc = {
361 .master = &omap2xxx_l4_core_hwmod,
362 .slave = &omap2xxx_dss_venc_hwmod,
363 .clk = "dss_ick",
364 .addr = omap2_dss_venc_addrs,
365 .fw = {
366 .omap2 = {
367 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
368 .flags = OMAP_FIREWALL_L4,
369 }
370 },
371 .flags = OCPIF_SWSUP_IDLE,
372 .user = OCP_USER_MPU | OCP_USER_SDMA,
373};
130 374
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index 2a6729741b06..45aaa07e3025 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -10,6 +10,7 @@
10 */ 10 */
11#include <plat/omap_hwmod.h> 11#include <plat/omap_hwmod.h>
12#include <plat/serial.h> 12#include <plat/serial.h>
13#include <plat/gpio.h>
13#include <plat/dma.h> 14#include <plat/dma.h>
14#include <plat/dmtimer.h> 15#include <plat/dmtimer.h>
15#include <plat/mcspi.h> 16#include <plat/mcspi.h>
@@ -17,6 +18,8 @@
17#include <mach/irqs.h> 18#include <mach/irqs.h>
18 19
19#include "omap_hwmod_common_data.h" 20#include "omap_hwmod_common_data.h"
21#include "cm-regbits-24xx.h"
22#include "prm-regbits-24xx.h"
20#include "wd_timer.h" 23#include "wd_timer.h"
21 24
22struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = { 25struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {
@@ -170,3 +173,562 @@ struct omap_hwmod_class omap2xxx_mcspi_class = {
170 .sysc = &omap2xxx_mcspi_sysc, 173 .sysc = &omap2xxx_mcspi_sysc,
171 .rev = OMAP2_MCSPI_REV, 174 .rev = OMAP2_MCSPI_REV,
172}; 175};
176
177/*
178 * IP blocks
179 */
180
181/* L3 */
182struct omap_hwmod omap2xxx_l3_main_hwmod = {
183 .name = "l3_main",
184 .class = &l3_hwmod_class,
185 .flags = HWMOD_NO_IDLEST,
186};
187
188/* L4 CORE */
189struct omap_hwmod omap2xxx_l4_core_hwmod = {
190 .name = "l4_core",
191 .class = &l4_hwmod_class,
192 .flags = HWMOD_NO_IDLEST,
193};
194
195/* L4 WKUP */
196struct omap_hwmod omap2xxx_l4_wkup_hwmod = {
197 .name = "l4_wkup",
198 .class = &l4_hwmod_class,
199 .flags = HWMOD_NO_IDLEST,
200};
201
202/* MPU */
203struct omap_hwmod omap2xxx_mpu_hwmod = {
204 .name = "mpu",
205 .class = &mpu_hwmod_class,
206 .main_clk = "mpu_ck",
207};
208
209/* IVA2 */
210struct omap_hwmod omap2xxx_iva_hwmod = {
211 .name = "iva",
212 .class = &iva_hwmod_class,
213};
214
215/* always-on timers dev attribute */
216static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
217 .timer_capability = OMAP_TIMER_ALWON,
218};
219
220/* pwm timers dev attribute */
221static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
222 .timer_capability = OMAP_TIMER_HAS_PWM,
223};
224
225/* timer1 */
226
227struct omap_hwmod omap2xxx_timer1_hwmod = {
228 .name = "timer1",
229 .mpu_irqs = omap2_timer1_mpu_irqs,
230 .main_clk = "gpt1_fck",
231 .prcm = {
232 .omap2 = {
233 .prcm_reg_id = 1,
234 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
235 .module_offs = WKUP_MOD,
236 .idlest_reg_id = 1,
237 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
238 },
239 },
240 .dev_attr = &capability_alwon_dev_attr,
241 .class = &omap2xxx_timer_hwmod_class,
242};
243
244/* timer2 */
245
246struct omap_hwmod omap2xxx_timer2_hwmod = {
247 .name = "timer2",
248 .mpu_irqs = omap2_timer2_mpu_irqs,
249 .main_clk = "gpt2_fck",
250 .prcm = {
251 .omap2 = {
252 .prcm_reg_id = 1,
253 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
254 .module_offs = CORE_MOD,
255 .idlest_reg_id = 1,
256 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
257 },
258 },
259 .dev_attr = &capability_alwon_dev_attr,
260 .class = &omap2xxx_timer_hwmod_class,
261};
262
263/* timer3 */
264
265struct omap_hwmod omap2xxx_timer3_hwmod = {
266 .name = "timer3",
267 .mpu_irqs = omap2_timer3_mpu_irqs,
268 .main_clk = "gpt3_fck",
269 .prcm = {
270 .omap2 = {
271 .prcm_reg_id = 1,
272 .module_bit = OMAP24XX_EN_GPT3_SHIFT,
273 .module_offs = CORE_MOD,
274 .idlest_reg_id = 1,
275 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
276 },
277 },
278 .dev_attr = &capability_alwon_dev_attr,
279 .class = &omap2xxx_timer_hwmod_class,
280};
281
282/* timer4 */
283
284struct omap_hwmod omap2xxx_timer4_hwmod = {
285 .name = "timer4",
286 .mpu_irqs = omap2_timer4_mpu_irqs,
287 .main_clk = "gpt4_fck",
288 .prcm = {
289 .omap2 = {
290 .prcm_reg_id = 1,
291 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
292 .module_offs = CORE_MOD,
293 .idlest_reg_id = 1,
294 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
295 },
296 },
297 .dev_attr = &capability_alwon_dev_attr,
298 .class = &omap2xxx_timer_hwmod_class,
299};
300
301/* timer5 */
302
303struct omap_hwmod omap2xxx_timer5_hwmod = {
304 .name = "timer5",
305 .mpu_irqs = omap2_timer5_mpu_irqs,
306 .main_clk = "gpt5_fck",
307 .prcm = {
308 .omap2 = {
309 .prcm_reg_id = 1,
310 .module_bit = OMAP24XX_EN_GPT5_SHIFT,
311 .module_offs = CORE_MOD,
312 .idlest_reg_id = 1,
313 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
314 },
315 },
316 .dev_attr = &capability_alwon_dev_attr,
317 .class = &omap2xxx_timer_hwmod_class,
318};
319
320/* timer6 */
321
322struct omap_hwmod omap2xxx_timer6_hwmod = {
323 .name = "timer6",
324 .mpu_irqs = omap2_timer6_mpu_irqs,
325 .main_clk = "gpt6_fck",
326 .prcm = {
327 .omap2 = {
328 .prcm_reg_id = 1,
329 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
330 .module_offs = CORE_MOD,
331 .idlest_reg_id = 1,
332 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
333 },
334 },
335 .dev_attr = &capability_alwon_dev_attr,
336 .class = &omap2xxx_timer_hwmod_class,
337};
338
339/* timer7 */
340
341struct omap_hwmod omap2xxx_timer7_hwmod = {
342 .name = "timer7",
343 .mpu_irqs = omap2_timer7_mpu_irqs,
344 .main_clk = "gpt7_fck",
345 .prcm = {
346 .omap2 = {
347 .prcm_reg_id = 1,
348 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
349 .module_offs = CORE_MOD,
350 .idlest_reg_id = 1,
351 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
352 },
353 },
354 .dev_attr = &capability_alwon_dev_attr,
355 .class = &omap2xxx_timer_hwmod_class,
356};
357
358/* timer8 */
359
360struct omap_hwmod omap2xxx_timer8_hwmod = {
361 .name = "timer8",
362 .mpu_irqs = omap2_timer8_mpu_irqs,
363 .main_clk = "gpt8_fck",
364 .prcm = {
365 .omap2 = {
366 .prcm_reg_id = 1,
367 .module_bit = OMAP24XX_EN_GPT8_SHIFT,
368 .module_offs = CORE_MOD,
369 .idlest_reg_id = 1,
370 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
371 },
372 },
373 .dev_attr = &capability_alwon_dev_attr,
374 .class = &omap2xxx_timer_hwmod_class,
375};
376
377/* timer9 */
378
379struct omap_hwmod omap2xxx_timer9_hwmod = {
380 .name = "timer9",
381 .mpu_irqs = omap2_timer9_mpu_irqs,
382 .main_clk = "gpt9_fck",
383 .prcm = {
384 .omap2 = {
385 .prcm_reg_id = 1,
386 .module_bit = OMAP24XX_EN_GPT9_SHIFT,
387 .module_offs = CORE_MOD,
388 .idlest_reg_id = 1,
389 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
390 },
391 },
392 .dev_attr = &capability_pwm_dev_attr,
393 .class = &omap2xxx_timer_hwmod_class,
394};
395
396/* timer10 */
397
398struct omap_hwmod omap2xxx_timer10_hwmod = {
399 .name = "timer10",
400 .mpu_irqs = omap2_timer10_mpu_irqs,
401 .main_clk = "gpt10_fck",
402 .prcm = {
403 .omap2 = {
404 .prcm_reg_id = 1,
405 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
406 .module_offs = CORE_MOD,
407 .idlest_reg_id = 1,
408 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
409 },
410 },
411 .dev_attr = &capability_pwm_dev_attr,
412 .class = &omap2xxx_timer_hwmod_class,
413};
414
415/* timer11 */
416
417struct omap_hwmod omap2xxx_timer11_hwmod = {
418 .name = "timer11",
419 .mpu_irqs = omap2_timer11_mpu_irqs,
420 .main_clk = "gpt11_fck",
421 .prcm = {
422 .omap2 = {
423 .prcm_reg_id = 1,
424 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
425 .module_offs = CORE_MOD,
426 .idlest_reg_id = 1,
427 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
428 },
429 },
430 .dev_attr = &capability_pwm_dev_attr,
431 .class = &omap2xxx_timer_hwmod_class,
432};
433
434/* timer12 */
435
436struct omap_hwmod omap2xxx_timer12_hwmod = {
437 .name = "timer12",
438 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
439 .main_clk = "gpt12_fck",
440 .prcm = {
441 .omap2 = {
442 .prcm_reg_id = 1,
443 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
444 .module_offs = CORE_MOD,
445 .idlest_reg_id = 1,
446 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
447 },
448 },
449 .dev_attr = &capability_pwm_dev_attr,
450 .class = &omap2xxx_timer_hwmod_class,
451};
452
453/* wd_timer2 */
454struct omap_hwmod omap2xxx_wd_timer2_hwmod = {
455 .name = "wd_timer2",
456 .class = &omap2xxx_wd_timer_hwmod_class,
457 .main_clk = "mpu_wdt_fck",
458 .prcm = {
459 .omap2 = {
460 .prcm_reg_id = 1,
461 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
462 .module_offs = WKUP_MOD,
463 .idlest_reg_id = 1,
464 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
465 },
466 },
467};
468
469/* UART1 */
470
471struct omap_hwmod omap2xxx_uart1_hwmod = {
472 .name = "uart1",
473 .mpu_irqs = omap2_uart1_mpu_irqs,
474 .sdma_reqs = omap2_uart1_sdma_reqs,
475 .main_clk = "uart1_fck",
476 .prcm = {
477 .omap2 = {
478 .module_offs = CORE_MOD,
479 .prcm_reg_id = 1,
480 .module_bit = OMAP24XX_EN_UART1_SHIFT,
481 .idlest_reg_id = 1,
482 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
483 },
484 },
485 .class = &omap2_uart_class,
486};
487
488/* UART2 */
489
490struct omap_hwmod omap2xxx_uart2_hwmod = {
491 .name = "uart2",
492 .mpu_irqs = omap2_uart2_mpu_irqs,
493 .sdma_reqs = omap2_uart2_sdma_reqs,
494 .main_clk = "uart2_fck",
495 .prcm = {
496 .omap2 = {
497 .module_offs = CORE_MOD,
498 .prcm_reg_id = 1,
499 .module_bit = OMAP24XX_EN_UART2_SHIFT,
500 .idlest_reg_id = 1,
501 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
502 },
503 },
504 .class = &omap2_uart_class,
505};
506
507/* UART3 */
508
509struct omap_hwmod omap2xxx_uart3_hwmod = {
510 .name = "uart3",
511 .mpu_irqs = omap2_uart3_mpu_irqs,
512 .sdma_reqs = omap2_uart3_sdma_reqs,
513 .main_clk = "uart3_fck",
514 .prcm = {
515 .omap2 = {
516 .module_offs = CORE_MOD,
517 .prcm_reg_id = 2,
518 .module_bit = OMAP24XX_EN_UART3_SHIFT,
519 .idlest_reg_id = 2,
520 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
521 },
522 },
523 .class = &omap2_uart_class,
524};
525
526/* dss */
527
528static struct omap_hwmod_opt_clk dss_opt_clks[] = {
529 /*
530 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
531 * driver does not use these clocks.
532 */
533 { .role = "tv_clk", .clk = "dss_54m_fck" },
534 { .role = "sys_clk", .clk = "dss2_fck" },
535};
536
537struct omap_hwmod omap2xxx_dss_core_hwmod = {
538 .name = "dss_core",
539 .class = &omap2_dss_hwmod_class,
540 .main_clk = "dss1_fck", /* instead of dss_fck */
541 .sdma_reqs = omap2xxx_dss_sdma_chs,
542 .prcm = {
543 .omap2 = {
544 .prcm_reg_id = 1,
545 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
546 .module_offs = CORE_MOD,
547 .idlest_reg_id = 1,
548 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
549 },
550 },
551 .opt_clks = dss_opt_clks,
552 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
553 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
554};
555
556struct omap_hwmod omap2xxx_dss_dispc_hwmod = {
557 .name = "dss_dispc",
558 .class = &omap2_dispc_hwmod_class,
559 .mpu_irqs = omap2_dispc_irqs,
560 .main_clk = "dss1_fck",
561 .prcm = {
562 .omap2 = {
563 .prcm_reg_id = 1,
564 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
565 .module_offs = CORE_MOD,
566 .idlest_reg_id = 1,
567 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
568 },
569 },
570 .flags = HWMOD_NO_IDLEST,
571 .dev_attr = &omap2_3_dss_dispc_dev_attr
572};
573
574static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
575 { .role = "ick", .clk = "dss_ick" },
576};
577
578struct omap_hwmod omap2xxx_dss_rfbi_hwmod = {
579 .name = "dss_rfbi",
580 .class = &omap2_rfbi_hwmod_class,
581 .main_clk = "dss1_fck",
582 .prcm = {
583 .omap2 = {
584 .prcm_reg_id = 1,
585 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
586 .module_offs = CORE_MOD,
587 },
588 },
589 .opt_clks = dss_rfbi_opt_clks,
590 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
591 .flags = HWMOD_NO_IDLEST,
592};
593
594struct omap_hwmod omap2xxx_dss_venc_hwmod = {
595 .name = "dss_venc",
596 .class = &omap2_venc_hwmod_class,
597 .main_clk = "dss_54m_fck",
598 .prcm = {
599 .omap2 = {
600 .prcm_reg_id = 1,
601 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
602 .module_offs = CORE_MOD,
603 },
604 },
605 .flags = HWMOD_NO_IDLEST,
606};
607
608/* gpio dev_attr */
609struct omap_gpio_dev_attr omap2xxx_gpio_dev_attr = {
610 .bank_width = 32,
611 .dbck_flag = false,
612};
613
614/* gpio1 */
615struct omap_hwmod omap2xxx_gpio1_hwmod = {
616 .name = "gpio1",
617 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
618 .mpu_irqs = omap2_gpio1_irqs,
619 .main_clk = "gpios_fck",
620 .prcm = {
621 .omap2 = {
622 .prcm_reg_id = 1,
623 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
624 .module_offs = WKUP_MOD,
625 .idlest_reg_id = 1,
626 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
627 },
628 },
629 .class = &omap2xxx_gpio_hwmod_class,
630 .dev_attr = &omap2xxx_gpio_dev_attr,
631};
632
633/* gpio2 */
634struct omap_hwmod omap2xxx_gpio2_hwmod = {
635 .name = "gpio2",
636 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
637 .mpu_irqs = omap2_gpio2_irqs,
638 .main_clk = "gpios_fck",
639 .prcm = {
640 .omap2 = {
641 .prcm_reg_id = 1,
642 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
643 .module_offs = WKUP_MOD,
644 .idlest_reg_id = 1,
645 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
646 },
647 },
648 .class = &omap2xxx_gpio_hwmod_class,
649 .dev_attr = &omap2xxx_gpio_dev_attr,
650};
651
652/* gpio3 */
653struct omap_hwmod omap2xxx_gpio3_hwmod = {
654 .name = "gpio3",
655 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
656 .mpu_irqs = omap2_gpio3_irqs,
657 .main_clk = "gpios_fck",
658 .prcm = {
659 .omap2 = {
660 .prcm_reg_id = 1,
661 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
662 .module_offs = WKUP_MOD,
663 .idlest_reg_id = 1,
664 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
665 },
666 },
667 .class = &omap2xxx_gpio_hwmod_class,
668 .dev_attr = &omap2xxx_gpio_dev_attr,
669};
670
671/* gpio4 */
672struct omap_hwmod omap2xxx_gpio4_hwmod = {
673 .name = "gpio4",
674 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
675 .mpu_irqs = omap2_gpio4_irqs,
676 .main_clk = "gpios_fck",
677 .prcm = {
678 .omap2 = {
679 .prcm_reg_id = 1,
680 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
681 .module_offs = WKUP_MOD,
682 .idlest_reg_id = 1,
683 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
684 },
685 },
686 .class = &omap2xxx_gpio_hwmod_class,
687 .dev_attr = &omap2xxx_gpio_dev_attr,
688};
689
690/* mcspi1 */
691static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
692 .num_chipselect = 4,
693};
694
695struct omap_hwmod omap2xxx_mcspi1_hwmod = {
696 .name = "mcspi1",
697 .mpu_irqs = omap2_mcspi1_mpu_irqs,
698 .sdma_reqs = omap2_mcspi1_sdma_reqs,
699 .main_clk = "mcspi1_fck",
700 .prcm = {
701 .omap2 = {
702 .module_offs = CORE_MOD,
703 .prcm_reg_id = 1,
704 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
705 .idlest_reg_id = 1,
706 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
707 },
708 },
709 .class = &omap2xxx_mcspi_class,
710 .dev_attr = &omap_mcspi1_dev_attr,
711};
712
713/* mcspi2 */
714static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
715 .num_chipselect = 2,
716};
717
718struct omap_hwmod omap2xxx_mcspi2_hwmod = {
719 .name = "mcspi2",
720 .mpu_irqs = omap2_mcspi2_mpu_irqs,
721 .sdma_reqs = omap2_mcspi2_sdma_reqs,
722 .main_clk = "mcspi2_fck",
723 .prcm = {
724 .omap2 = {
725 .module_offs = CORE_MOD,
726 .prcm_reg_id = 1,
727 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
728 .idlest_reg_id = 1,
729 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
730 },
731 },
732 .class = &omap2xxx_mcspi_class,
733 .dev_attr = &omap_mcspi2_dev_attr,
734};
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 34b9766d1d23..0c65079c2b69 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -2,6 +2,7 @@
2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips 2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
3 * 3 *
4 * Copyright (C) 2009-2011 Nokia Corporation 4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley 6 * Paul Walmsley
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
@@ -38,491 +39,56 @@
38/* 39/*
39 * OMAP3xxx hardware module integration data 40 * OMAP3xxx hardware module integration data
40 * 41 *
41 * ALl of the data in this section should be autogeneratable from the 42 * All of the data in this section should be autogeneratable from the
42 * TI hardware database or other technical documentation. Data that 43 * TI hardware database or other technical documentation. Data that
43 * is driver-specific or driver-kernel integration-specific belongs 44 * is driver-specific or driver-kernel integration-specific belongs
44 * elsewhere. 45 * elsewhere.
45 */ 46 */
46 47
47static struct omap_hwmod omap3xxx_mpu_hwmod; 48/*
48static struct omap_hwmod omap3xxx_iva_hwmod; 49 * IP blocks
49static struct omap_hwmod omap3xxx_l3_main_hwmod; 50 */
50static struct omap_hwmod omap3xxx_l4_core_hwmod;
51static struct omap_hwmod omap3xxx_l4_per_hwmod;
52static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
53static struct omap_hwmod omap3430es1_dss_core_hwmod;
54static struct omap_hwmod omap3xxx_dss_core_hwmod;
55static struct omap_hwmod omap3xxx_dss_dispc_hwmod;
56static struct omap_hwmod omap3xxx_dss_dsi1_hwmod;
57static struct omap_hwmod omap3xxx_dss_rfbi_hwmod;
58static struct omap_hwmod omap3xxx_dss_venc_hwmod;
59static struct omap_hwmod omap3xxx_i2c1_hwmod;
60static struct omap_hwmod omap3xxx_i2c2_hwmod;
61static struct omap_hwmod omap3xxx_i2c3_hwmod;
62static struct omap_hwmod omap3xxx_gpio1_hwmod;
63static struct omap_hwmod omap3xxx_gpio2_hwmod;
64static struct omap_hwmod omap3xxx_gpio3_hwmod;
65static struct omap_hwmod omap3xxx_gpio4_hwmod;
66static struct omap_hwmod omap3xxx_gpio5_hwmod;
67static struct omap_hwmod omap3xxx_gpio6_hwmod;
68static struct omap_hwmod omap34xx_sr1_hwmod;
69static struct omap_hwmod omap34xx_sr2_hwmod;
70static struct omap_hwmod omap34xx_mcspi1;
71static struct omap_hwmod omap34xx_mcspi2;
72static struct omap_hwmod omap34xx_mcspi3;
73static struct omap_hwmod omap34xx_mcspi4;
74static struct omap_hwmod omap3xxx_mmc1_hwmod;
75static struct omap_hwmod omap3xxx_mmc2_hwmod;
76static struct omap_hwmod omap3xxx_mmc3_hwmod;
77static struct omap_hwmod am35xx_usbhsotg_hwmod;
78
79static struct omap_hwmod omap3xxx_dma_system_hwmod;
80
81static struct omap_hwmod omap3xxx_mcbsp1_hwmod;
82static struct omap_hwmod omap3xxx_mcbsp2_hwmod;
83static struct omap_hwmod omap3xxx_mcbsp3_hwmod;
84static struct omap_hwmod omap3xxx_mcbsp4_hwmod;
85static struct omap_hwmod omap3xxx_mcbsp5_hwmod;
86static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod;
87static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod;
88static struct omap_hwmod omap3xxx_usb_host_hs_hwmod;
89static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod;
90
91/* L3 -> L4_CORE interface */
92static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
93 .master = &omap3xxx_l3_main_hwmod,
94 .slave = &omap3xxx_l4_core_hwmod,
95 .user = OCP_USER_MPU | OCP_USER_SDMA,
96};
97
98/* L3 -> L4_PER interface */
99static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
100 .master = &omap3xxx_l3_main_hwmod,
101 .slave = &omap3xxx_l4_per_hwmod,
102 .user = OCP_USER_MPU | OCP_USER_SDMA,
103};
104 51
105/* L3 taret configuration and error log registers */ 52/* L3 */
106static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = { 53static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
107 { .irq = INT_34XX_L3_DBG_IRQ }, 54 { .irq = INT_34XX_L3_DBG_IRQ },
108 { .irq = INT_34XX_L3_APP_IRQ }, 55 { .irq = INT_34XX_L3_APP_IRQ },
109 { .irq = -1 } 56 { .irq = -1 }
110}; 57};
111 58
112static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
113 {
114 .pa_start = 0x68000000,
115 .pa_end = 0x6800ffff,
116 .flags = ADDR_TYPE_RT,
117 },
118 { }
119};
120
121/* MPU -> L3 interface */
122static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
123 .master = &omap3xxx_mpu_hwmod,
124 .slave = &omap3xxx_l3_main_hwmod,
125 .addr = omap3xxx_l3_main_addrs,
126 .user = OCP_USER_MPU,
127};
128
129/* Slave interfaces on the L3 interconnect */
130static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
131 &omap3xxx_mpu__l3_main,
132};
133
134/* DSS -> l3 */
135static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
136 .master = &omap3xxx_dss_core_hwmod,
137 .slave = &omap3xxx_l3_main_hwmod,
138 .fw = {
139 .omap2 = {
140 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
141 .flags = OMAP_FIREWALL_L3,
142 }
143 },
144 .user = OCP_USER_MPU | OCP_USER_SDMA,
145};
146
147/* Master interfaces on the L3 interconnect */
148static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
149 &omap3xxx_l3_main__l4_core,
150 &omap3xxx_l3_main__l4_per,
151};
152
153/* L3 */
154static struct omap_hwmod omap3xxx_l3_main_hwmod = { 59static struct omap_hwmod omap3xxx_l3_main_hwmod = {
155 .name = "l3_main", 60 .name = "l3_main",
156 .class = &l3_hwmod_class, 61 .class = &l3_hwmod_class,
157 .mpu_irqs = omap3xxx_l3_main_irqs, 62 .mpu_irqs = omap3xxx_l3_main_irqs,
158 .masters = omap3xxx_l3_main_masters,
159 .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
160 .slaves = omap3xxx_l3_main_slaves,
161 .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
162 .flags = HWMOD_NO_IDLEST, 63 .flags = HWMOD_NO_IDLEST,
163}; 64};
164 65
165static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
166static struct omap_hwmod omap3xxx_uart1_hwmod;
167static struct omap_hwmod omap3xxx_uart2_hwmod;
168static struct omap_hwmod omap3xxx_uart3_hwmod;
169static struct omap_hwmod omap3xxx_uart4_hwmod;
170static struct omap_hwmod am35xx_uart4_hwmod;
171static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
172
173/* l3_core -> usbhsotg interface */
174static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
175 .master = &omap3xxx_usbhsotg_hwmod,
176 .slave = &omap3xxx_l3_main_hwmod,
177 .clk = "core_l3_ick",
178 .user = OCP_USER_MPU,
179};
180
181/* l3_core -> am35xx_usbhsotg interface */
182static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
183 .master = &am35xx_usbhsotg_hwmod,
184 .slave = &omap3xxx_l3_main_hwmod,
185 .clk = "core_l3_ick",
186 .user = OCP_USER_MPU,
187};
188/* L4_CORE -> L4_WKUP interface */
189static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
190 .master = &omap3xxx_l4_core_hwmod,
191 .slave = &omap3xxx_l4_wkup_hwmod,
192 .user = OCP_USER_MPU | OCP_USER_SDMA,
193};
194
195/* L4 CORE -> MMC1 interface */
196static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = {
197 .master = &omap3xxx_l4_core_hwmod,
198 .slave = &omap3xxx_mmc1_hwmod,
199 .clk = "mmchs1_ick",
200 .addr = omap2430_mmc1_addr_space,
201 .user = OCP_USER_MPU | OCP_USER_SDMA,
202 .flags = OMAP_FIREWALL_L4
203};
204
205/* L4 CORE -> MMC2 interface */
206static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = {
207 .master = &omap3xxx_l4_core_hwmod,
208 .slave = &omap3xxx_mmc2_hwmod,
209 .clk = "mmchs2_ick",
210 .addr = omap2430_mmc2_addr_space,
211 .user = OCP_USER_MPU | OCP_USER_SDMA,
212 .flags = OMAP_FIREWALL_L4
213};
214
215/* L4 CORE -> MMC3 interface */
216static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
217 {
218 .pa_start = 0x480ad000,
219 .pa_end = 0x480ad1ff,
220 .flags = ADDR_TYPE_RT,
221 },
222 { }
223};
224
225static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
226 .master = &omap3xxx_l4_core_hwmod,
227 .slave = &omap3xxx_mmc3_hwmod,
228 .clk = "mmchs3_ick",
229 .addr = omap3xxx_mmc3_addr_space,
230 .user = OCP_USER_MPU | OCP_USER_SDMA,
231 .flags = OMAP_FIREWALL_L4
232};
233
234/* L4 CORE -> UART1 interface */
235static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
236 {
237 .pa_start = OMAP3_UART1_BASE,
238 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
239 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
240 },
241 { }
242};
243
244static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
245 .master = &omap3xxx_l4_core_hwmod,
246 .slave = &omap3xxx_uart1_hwmod,
247 .clk = "uart1_ick",
248 .addr = omap3xxx_uart1_addr_space,
249 .user = OCP_USER_MPU | OCP_USER_SDMA,
250};
251
252/* L4 CORE -> UART2 interface */
253static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
254 {
255 .pa_start = OMAP3_UART2_BASE,
256 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
257 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
258 },
259 { }
260};
261
262static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
263 .master = &omap3xxx_l4_core_hwmod,
264 .slave = &omap3xxx_uart2_hwmod,
265 .clk = "uart2_ick",
266 .addr = omap3xxx_uart2_addr_space,
267 .user = OCP_USER_MPU | OCP_USER_SDMA,
268};
269
270/* L4 PER -> UART3 interface */
271static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
272 {
273 .pa_start = OMAP3_UART3_BASE,
274 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
275 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
276 },
277 { }
278};
279
280static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
281 .master = &omap3xxx_l4_per_hwmod,
282 .slave = &omap3xxx_uart3_hwmod,
283 .clk = "uart3_ick",
284 .addr = omap3xxx_uart3_addr_space,
285 .user = OCP_USER_MPU | OCP_USER_SDMA,
286};
287
288/* L4 PER -> UART4 interface */
289static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
290 {
291 .pa_start = OMAP3_UART4_BASE,
292 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
293 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
294 },
295 { }
296};
297
298static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
299 .master = &omap3xxx_l4_per_hwmod,
300 .slave = &omap3xxx_uart4_hwmod,
301 .clk = "uart4_ick",
302 .addr = omap3xxx_uart4_addr_space,
303 .user = OCP_USER_MPU | OCP_USER_SDMA,
304};
305
306/* AM35xx: L4 CORE -> UART4 interface */
307static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
308 {
309 .pa_start = OMAP3_UART4_AM35XX_BASE,
310 .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
311 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
312 },
313};
314
315static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
316 .master = &omap3xxx_l4_core_hwmod,
317 .slave = &am35xx_uart4_hwmod,
318 .clk = "uart4_ick",
319 .addr = am35xx_uart4_addr_space,
320 .user = OCP_USER_MPU | OCP_USER_SDMA,
321};
322
323/* L4 CORE -> I2C1 interface */
324static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
325 .master = &omap3xxx_l4_core_hwmod,
326 .slave = &omap3xxx_i2c1_hwmod,
327 .clk = "i2c1_ick",
328 .addr = omap2_i2c1_addr_space,
329 .fw = {
330 .omap2 = {
331 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
332 .l4_prot_group = 7,
333 .flags = OMAP_FIREWALL_L4,
334 }
335 },
336 .user = OCP_USER_MPU | OCP_USER_SDMA,
337};
338
339/* L4 CORE -> I2C2 interface */
340static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
341 .master = &omap3xxx_l4_core_hwmod,
342 .slave = &omap3xxx_i2c2_hwmod,
343 .clk = "i2c2_ick",
344 .addr = omap2_i2c2_addr_space,
345 .fw = {
346 .omap2 = {
347 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
348 .l4_prot_group = 7,
349 .flags = OMAP_FIREWALL_L4,
350 }
351 },
352 .user = OCP_USER_MPU | OCP_USER_SDMA,
353};
354
355/* L4 CORE -> I2C3 interface */
356static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
357 {
358 .pa_start = 0x48060000,
359 .pa_end = 0x48060000 + SZ_128 - 1,
360 .flags = ADDR_TYPE_RT,
361 },
362 { }
363};
364
365static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
366 .master = &omap3xxx_l4_core_hwmod,
367 .slave = &omap3xxx_i2c3_hwmod,
368 .clk = "i2c3_ick",
369 .addr = omap3xxx_i2c3_addr_space,
370 .fw = {
371 .omap2 = {
372 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
373 .l4_prot_group = 7,
374 .flags = OMAP_FIREWALL_L4,
375 }
376 },
377 .user = OCP_USER_MPU | OCP_USER_SDMA,
378};
379
380static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
381 { .irq = 18},
382 { .irq = -1 }
383};
384
385static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
386 { .irq = 19},
387 { .irq = -1 }
388};
389
390/* L4 CORE -> SR1 interface */
391static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
392 {
393 .pa_start = OMAP34XX_SR1_BASE,
394 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
395 .flags = ADDR_TYPE_RT,
396 },
397 { }
398};
399
400static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
401 .master = &omap3xxx_l4_core_hwmod,
402 .slave = &omap34xx_sr1_hwmod,
403 .clk = "sr_l4_ick",
404 .addr = omap3_sr1_addr_space,
405 .user = OCP_USER_MPU,
406};
407
408/* L4 CORE -> SR1 interface */
409static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
410 {
411 .pa_start = OMAP34XX_SR2_BASE,
412 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
413 .flags = ADDR_TYPE_RT,
414 },
415 { }
416};
417
418static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
419 .master = &omap3xxx_l4_core_hwmod,
420 .slave = &omap34xx_sr2_hwmod,
421 .clk = "sr_l4_ick",
422 .addr = omap3_sr2_addr_space,
423 .user = OCP_USER_MPU,
424};
425
426/*
427* usbhsotg interface data
428*/
429
430static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
431 {
432 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
433 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
434 .flags = ADDR_TYPE_RT
435 },
436 { }
437};
438
439/* l4_core -> usbhsotg */
440static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
441 .master = &omap3xxx_l4_core_hwmod,
442 .slave = &omap3xxx_usbhsotg_hwmod,
443 .clk = "l4_ick",
444 .addr = omap3xxx_usbhsotg_addrs,
445 .user = OCP_USER_MPU,
446};
447
448static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = {
449 &omap3xxx_usbhsotg__l3,
450};
451
452static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = {
453 &omap3xxx_l4_core__usbhsotg,
454};
455
456static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
457 {
458 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
459 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
460 .flags = ADDR_TYPE_RT
461 },
462 { }
463};
464
465/* l4_core -> usbhsotg */
466static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
467 .master = &omap3xxx_l4_core_hwmod,
468 .slave = &am35xx_usbhsotg_hwmod,
469 .clk = "l4_ick",
470 .addr = am35xx_usbhsotg_addrs,
471 .user = OCP_USER_MPU,
472};
473
474static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = {
475 &am35xx_usbhsotg__l3,
476};
477
478static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = {
479 &am35xx_l4_core__usbhsotg,
480};
481/* Slave interfaces on the L4_CORE interconnect */
482static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
483 &omap3xxx_l3_main__l4_core,
484};
485
486/* L4 CORE */ 66/* L4 CORE */
487static struct omap_hwmod omap3xxx_l4_core_hwmod = { 67static struct omap_hwmod omap3xxx_l4_core_hwmod = {
488 .name = "l4_core", 68 .name = "l4_core",
489 .class = &l4_hwmod_class, 69 .class = &l4_hwmod_class,
490 .slaves = omap3xxx_l4_core_slaves,
491 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
492 .flags = HWMOD_NO_IDLEST, 70 .flags = HWMOD_NO_IDLEST,
493}; 71};
494 72
495/* Slave interfaces on the L4_PER interconnect */
496static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
497 &omap3xxx_l3_main__l4_per,
498};
499
500/* L4 PER */ 73/* L4 PER */
501static struct omap_hwmod omap3xxx_l4_per_hwmod = { 74static struct omap_hwmod omap3xxx_l4_per_hwmod = {
502 .name = "l4_per", 75 .name = "l4_per",
503 .class = &l4_hwmod_class, 76 .class = &l4_hwmod_class,
504 .slaves = omap3xxx_l4_per_slaves,
505 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
506 .flags = HWMOD_NO_IDLEST, 77 .flags = HWMOD_NO_IDLEST,
507}; 78};
508 79
509/* Slave interfaces on the L4_WKUP interconnect */
510static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
511 &omap3xxx_l4_core__l4_wkup,
512};
513
514/* L4 WKUP */ 80/* L4 WKUP */
515static struct omap_hwmod omap3xxx_l4_wkup_hwmod = { 81static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
516 .name = "l4_wkup", 82 .name = "l4_wkup",
517 .class = &l4_hwmod_class, 83 .class = &l4_hwmod_class,
518 .slaves = omap3xxx_l4_wkup_slaves,
519 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
520 .flags = HWMOD_NO_IDLEST, 84 .flags = HWMOD_NO_IDLEST,
521}; 85};
522 86
523/* Master interfaces on the MPU device */ 87/* L4 SEC */
524static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = { 88static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
525 &omap3xxx_mpu__l3_main, 89 .name = "l4_sec",
90 .class = &l4_hwmod_class,
91 .flags = HWMOD_NO_IDLEST,
526}; 92};
527 93
528/* MPU */ 94/* MPU */
@@ -530,35 +96,22 @@ static struct omap_hwmod omap3xxx_mpu_hwmod = {
530 .name = "mpu", 96 .name = "mpu",
531 .class = &mpu_hwmod_class, 97 .class = &mpu_hwmod_class,
532 .main_clk = "arm_fck", 98 .main_clk = "arm_fck",
533 .masters = omap3xxx_mpu_masters,
534 .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
535}; 99};
536 100
537/* 101/* IVA2 (IVA2) */
538 * IVA2_2 interface data 102static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
539 */ 103 { .name = "logic", .rst_shift = 0 },
540 104 { .name = "seq0", .rst_shift = 1 },
541/* IVA2 <- L3 interface */ 105 { .name = "seq1", .rst_shift = 2 },
542static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
543 .master = &omap3xxx_l3_main_hwmod,
544 .slave = &omap3xxx_iva_hwmod,
545 .clk = "iva2_ck",
546 .user = OCP_USER_MPU | OCP_USER_SDMA,
547}; 106};
548 107
549static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
550 &omap3xxx_l3__iva,
551};
552
553/*
554 * IVA2 (IVA2)
555 */
556
557static struct omap_hwmod omap3xxx_iva_hwmod = { 108static struct omap_hwmod omap3xxx_iva_hwmod = {
558 .name = "iva", 109 .name = "iva",
559 .class = &iva_hwmod_class, 110 .class = &iva_hwmod_class,
560 .masters = omap3xxx_iva_masters, 111 .clkdm_name = "iva2_clkdm",
561 .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters), 112 .rst_lines = omap3xxx_iva_resets,
113 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
114 .main_clk = "iva2_ck",
562}; 115};
563 116
564/* timer class */ 117/* timer class */
@@ -597,46 +150,20 @@ static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
597 150
598/* secure timers dev attribute */ 151/* secure timers dev attribute */
599static struct omap_timer_capability_dev_attr capability_secure_dev_attr = { 152static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
600 .timer_capability = OMAP_TIMER_SECURE, 153 .timer_capability = OMAP_TIMER_SECURE,
601}; 154};
602 155
603/* always-on timers dev attribute */ 156/* always-on timers dev attribute */
604static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { 157static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
605 .timer_capability = OMAP_TIMER_ALWON, 158 .timer_capability = OMAP_TIMER_ALWON,
606}; 159};
607 160
608/* pwm timers dev attribute */ 161/* pwm timers dev attribute */
609static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { 162static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
610 .timer_capability = OMAP_TIMER_HAS_PWM, 163 .timer_capability = OMAP_TIMER_HAS_PWM,
611}; 164};
612 165
613/* timer1 */ 166/* timer1 */
614static struct omap_hwmod omap3xxx_timer1_hwmod;
615
616static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
617 {
618 .pa_start = 0x48318000,
619 .pa_end = 0x48318000 + SZ_1K - 1,
620 .flags = ADDR_TYPE_RT
621 },
622 { }
623};
624
625/* l4_wkup -> timer1 */
626static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
627 .master = &omap3xxx_l4_wkup_hwmod,
628 .slave = &omap3xxx_timer1_hwmod,
629 .clk = "gpt1_ick",
630 .addr = omap3xxx_timer1_addrs,
631 .user = OCP_USER_MPU | OCP_USER_SDMA,
632};
633
634/* timer1 slave port */
635static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = {
636 &omap3xxx_l4_wkup__timer1,
637};
638
639/* timer1 hwmod */
640static struct omap_hwmod omap3xxx_timer1_hwmod = { 167static struct omap_hwmod omap3xxx_timer1_hwmod = {
641 .name = "timer1", 168 .name = "timer1",
642 .mpu_irqs = omap2_timer1_mpu_irqs, 169 .mpu_irqs = omap2_timer1_mpu_irqs,
@@ -651,38 +178,10 @@ static struct omap_hwmod omap3xxx_timer1_hwmod = {
651 }, 178 },
652 }, 179 },
653 .dev_attr = &capability_alwon_dev_attr, 180 .dev_attr = &capability_alwon_dev_attr,
654 .slaves = omap3xxx_timer1_slaves,
655 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer1_slaves),
656 .class = &omap3xxx_timer_1ms_hwmod_class, 181 .class = &omap3xxx_timer_1ms_hwmod_class,
657}; 182};
658 183
659/* timer2 */ 184/* timer2 */
660static struct omap_hwmod omap3xxx_timer2_hwmod;
661
662static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
663 {
664 .pa_start = 0x49032000,
665 .pa_end = 0x49032000 + SZ_1K - 1,
666 .flags = ADDR_TYPE_RT
667 },
668 { }
669};
670
671/* l4_per -> timer2 */
672static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
673 .master = &omap3xxx_l4_per_hwmod,
674 .slave = &omap3xxx_timer2_hwmod,
675 .clk = "gpt2_ick",
676 .addr = omap3xxx_timer2_addrs,
677 .user = OCP_USER_MPU | OCP_USER_SDMA,
678};
679
680/* timer2 slave port */
681static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = {
682 &omap3xxx_l4_per__timer2,
683};
684
685/* timer2 hwmod */
686static struct omap_hwmod omap3xxx_timer2_hwmod = { 185static struct omap_hwmod omap3xxx_timer2_hwmod = {
687 .name = "timer2", 186 .name = "timer2",
688 .mpu_irqs = omap2_timer2_mpu_irqs, 187 .mpu_irqs = omap2_timer2_mpu_irqs,
@@ -697,38 +196,10 @@ static struct omap_hwmod omap3xxx_timer2_hwmod = {
697 }, 196 },
698 }, 197 },
699 .dev_attr = &capability_alwon_dev_attr, 198 .dev_attr = &capability_alwon_dev_attr,
700 .slaves = omap3xxx_timer2_slaves,
701 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer2_slaves),
702 .class = &omap3xxx_timer_1ms_hwmod_class, 199 .class = &omap3xxx_timer_1ms_hwmod_class,
703}; 200};
704 201
705/* timer3 */ 202/* timer3 */
706static struct omap_hwmod omap3xxx_timer3_hwmod;
707
708static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
709 {
710 .pa_start = 0x49034000,
711 .pa_end = 0x49034000 + SZ_1K - 1,
712 .flags = ADDR_TYPE_RT
713 },
714 { }
715};
716
717/* l4_per -> timer3 */
718static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
719 .master = &omap3xxx_l4_per_hwmod,
720 .slave = &omap3xxx_timer3_hwmod,
721 .clk = "gpt3_ick",
722 .addr = omap3xxx_timer3_addrs,
723 .user = OCP_USER_MPU | OCP_USER_SDMA,
724};
725
726/* timer3 slave port */
727static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = {
728 &omap3xxx_l4_per__timer3,
729};
730
731/* timer3 hwmod */
732static struct omap_hwmod omap3xxx_timer3_hwmod = { 203static struct omap_hwmod omap3xxx_timer3_hwmod = {
733 .name = "timer3", 204 .name = "timer3",
734 .mpu_irqs = omap2_timer3_mpu_irqs, 205 .mpu_irqs = omap2_timer3_mpu_irqs,
@@ -743,38 +214,10 @@ static struct omap_hwmod omap3xxx_timer3_hwmod = {
743 }, 214 },
744 }, 215 },
745 .dev_attr = &capability_alwon_dev_attr, 216 .dev_attr = &capability_alwon_dev_attr,
746 .slaves = omap3xxx_timer3_slaves,
747 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer3_slaves),
748 .class = &omap3xxx_timer_hwmod_class, 217 .class = &omap3xxx_timer_hwmod_class,
749}; 218};
750 219
751/* timer4 */ 220/* timer4 */
752static struct omap_hwmod omap3xxx_timer4_hwmod;
753
754static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
755 {
756 .pa_start = 0x49036000,
757 .pa_end = 0x49036000 + SZ_1K - 1,
758 .flags = ADDR_TYPE_RT
759 },
760 { }
761};
762
763/* l4_per -> timer4 */
764static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
765 .master = &omap3xxx_l4_per_hwmod,
766 .slave = &omap3xxx_timer4_hwmod,
767 .clk = "gpt4_ick",
768 .addr = omap3xxx_timer4_addrs,
769 .user = OCP_USER_MPU | OCP_USER_SDMA,
770};
771
772/* timer4 slave port */
773static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = {
774 &omap3xxx_l4_per__timer4,
775};
776
777/* timer4 hwmod */
778static struct omap_hwmod omap3xxx_timer4_hwmod = { 221static struct omap_hwmod omap3xxx_timer4_hwmod = {
779 .name = "timer4", 222 .name = "timer4",
780 .mpu_irqs = omap2_timer4_mpu_irqs, 223 .mpu_irqs = omap2_timer4_mpu_irqs,
@@ -789,38 +232,10 @@ static struct omap_hwmod omap3xxx_timer4_hwmod = {
789 }, 232 },
790 }, 233 },
791 .dev_attr = &capability_alwon_dev_attr, 234 .dev_attr = &capability_alwon_dev_attr,
792 .slaves = omap3xxx_timer4_slaves,
793 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer4_slaves),
794 .class = &omap3xxx_timer_hwmod_class, 235 .class = &omap3xxx_timer_hwmod_class,
795}; 236};
796 237
797/* timer5 */ 238/* timer5 */
798static struct omap_hwmod omap3xxx_timer5_hwmod;
799
800static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
801 {
802 .pa_start = 0x49038000,
803 .pa_end = 0x49038000 + SZ_1K - 1,
804 .flags = ADDR_TYPE_RT
805 },
806 { }
807};
808
809/* l4_per -> timer5 */
810static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
811 .master = &omap3xxx_l4_per_hwmod,
812 .slave = &omap3xxx_timer5_hwmod,
813 .clk = "gpt5_ick",
814 .addr = omap3xxx_timer5_addrs,
815 .user = OCP_USER_MPU | OCP_USER_SDMA,
816};
817
818/* timer5 slave port */
819static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = {
820 &omap3xxx_l4_per__timer5,
821};
822
823/* timer5 hwmod */
824static struct omap_hwmod omap3xxx_timer5_hwmod = { 239static struct omap_hwmod omap3xxx_timer5_hwmod = {
825 .name = "timer5", 240 .name = "timer5",
826 .mpu_irqs = omap2_timer5_mpu_irqs, 241 .mpu_irqs = omap2_timer5_mpu_irqs,
@@ -835,38 +250,10 @@ static struct omap_hwmod omap3xxx_timer5_hwmod = {
835 }, 250 },
836 }, 251 },
837 .dev_attr = &capability_alwon_dev_attr, 252 .dev_attr = &capability_alwon_dev_attr,
838 .slaves = omap3xxx_timer5_slaves,
839 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer5_slaves),
840 .class = &omap3xxx_timer_hwmod_class, 253 .class = &omap3xxx_timer_hwmod_class,
841}; 254};
842 255
843/* timer6 */ 256/* timer6 */
844static struct omap_hwmod omap3xxx_timer6_hwmod;
845
846static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
847 {
848 .pa_start = 0x4903A000,
849 .pa_end = 0x4903A000 + SZ_1K - 1,
850 .flags = ADDR_TYPE_RT
851 },
852 { }
853};
854
855/* l4_per -> timer6 */
856static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
857 .master = &omap3xxx_l4_per_hwmod,
858 .slave = &omap3xxx_timer6_hwmod,
859 .clk = "gpt6_ick",
860 .addr = omap3xxx_timer6_addrs,
861 .user = OCP_USER_MPU | OCP_USER_SDMA,
862};
863
864/* timer6 slave port */
865static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = {
866 &omap3xxx_l4_per__timer6,
867};
868
869/* timer6 hwmod */
870static struct omap_hwmod omap3xxx_timer6_hwmod = { 257static struct omap_hwmod omap3xxx_timer6_hwmod = {
871 .name = "timer6", 258 .name = "timer6",
872 .mpu_irqs = omap2_timer6_mpu_irqs, 259 .mpu_irqs = omap2_timer6_mpu_irqs,
@@ -881,38 +268,10 @@ static struct omap_hwmod omap3xxx_timer6_hwmod = {
881 }, 268 },
882 }, 269 },
883 .dev_attr = &capability_alwon_dev_attr, 270 .dev_attr = &capability_alwon_dev_attr,
884 .slaves = omap3xxx_timer6_slaves,
885 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer6_slaves),
886 .class = &omap3xxx_timer_hwmod_class, 271 .class = &omap3xxx_timer_hwmod_class,
887}; 272};
888 273
889/* timer7 */ 274/* timer7 */
890static struct omap_hwmod omap3xxx_timer7_hwmod;
891
892static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
893 {
894 .pa_start = 0x4903C000,
895 .pa_end = 0x4903C000 + SZ_1K - 1,
896 .flags = ADDR_TYPE_RT
897 },
898 { }
899};
900
901/* l4_per -> timer7 */
902static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
903 .master = &omap3xxx_l4_per_hwmod,
904 .slave = &omap3xxx_timer7_hwmod,
905 .clk = "gpt7_ick",
906 .addr = omap3xxx_timer7_addrs,
907 .user = OCP_USER_MPU | OCP_USER_SDMA,
908};
909
910/* timer7 slave port */
911static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = {
912 &omap3xxx_l4_per__timer7,
913};
914
915/* timer7 hwmod */
916static struct omap_hwmod omap3xxx_timer7_hwmod = { 275static struct omap_hwmod omap3xxx_timer7_hwmod = {
917 .name = "timer7", 276 .name = "timer7",
918 .mpu_irqs = omap2_timer7_mpu_irqs, 277 .mpu_irqs = omap2_timer7_mpu_irqs,
@@ -927,38 +286,10 @@ static struct omap_hwmod omap3xxx_timer7_hwmod = {
927 }, 286 },
928 }, 287 },
929 .dev_attr = &capability_alwon_dev_attr, 288 .dev_attr = &capability_alwon_dev_attr,
930 .slaves = omap3xxx_timer7_slaves,
931 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer7_slaves),
932 .class = &omap3xxx_timer_hwmod_class, 289 .class = &omap3xxx_timer_hwmod_class,
933}; 290};
934 291
935/* timer8 */ 292/* timer8 */
936static struct omap_hwmod omap3xxx_timer8_hwmod;
937
938static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
939 {
940 .pa_start = 0x4903E000,
941 .pa_end = 0x4903E000 + SZ_1K - 1,
942 .flags = ADDR_TYPE_RT
943 },
944 { }
945};
946
947/* l4_per -> timer8 */
948static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
949 .master = &omap3xxx_l4_per_hwmod,
950 .slave = &omap3xxx_timer8_hwmod,
951 .clk = "gpt8_ick",
952 .addr = omap3xxx_timer8_addrs,
953 .user = OCP_USER_MPU | OCP_USER_SDMA,
954};
955
956/* timer8 slave port */
957static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = {
958 &omap3xxx_l4_per__timer8,
959};
960
961/* timer8 hwmod */
962static struct omap_hwmod omap3xxx_timer8_hwmod = { 293static struct omap_hwmod omap3xxx_timer8_hwmod = {
963 .name = "timer8", 294 .name = "timer8",
964 .mpu_irqs = omap2_timer8_mpu_irqs, 295 .mpu_irqs = omap2_timer8_mpu_irqs,
@@ -973,38 +304,10 @@ static struct omap_hwmod omap3xxx_timer8_hwmod = {
973 }, 304 },
974 }, 305 },
975 .dev_attr = &capability_pwm_dev_attr, 306 .dev_attr = &capability_pwm_dev_attr,
976 .slaves = omap3xxx_timer8_slaves,
977 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer8_slaves),
978 .class = &omap3xxx_timer_hwmod_class, 307 .class = &omap3xxx_timer_hwmod_class,
979}; 308};
980 309
981/* timer9 */ 310/* timer9 */
982static struct omap_hwmod omap3xxx_timer9_hwmod;
983
984static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
985 {
986 .pa_start = 0x49040000,
987 .pa_end = 0x49040000 + SZ_1K - 1,
988 .flags = ADDR_TYPE_RT
989 },
990 { }
991};
992
993/* l4_per -> timer9 */
994static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
995 .master = &omap3xxx_l4_per_hwmod,
996 .slave = &omap3xxx_timer9_hwmod,
997 .clk = "gpt9_ick",
998 .addr = omap3xxx_timer9_addrs,
999 .user = OCP_USER_MPU | OCP_USER_SDMA,
1000};
1001
1002/* timer9 slave port */
1003static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = {
1004 &omap3xxx_l4_per__timer9,
1005};
1006
1007/* timer9 hwmod */
1008static struct omap_hwmod omap3xxx_timer9_hwmod = { 311static struct omap_hwmod omap3xxx_timer9_hwmod = {
1009 .name = "timer9", 312 .name = "timer9",
1010 .mpu_irqs = omap2_timer9_mpu_irqs, 313 .mpu_irqs = omap2_timer9_mpu_irqs,
@@ -1019,29 +322,10 @@ static struct omap_hwmod omap3xxx_timer9_hwmod = {
1019 }, 322 },
1020 }, 323 },
1021 .dev_attr = &capability_pwm_dev_attr, 324 .dev_attr = &capability_pwm_dev_attr,
1022 .slaves = omap3xxx_timer9_slaves,
1023 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer9_slaves),
1024 .class = &omap3xxx_timer_hwmod_class, 325 .class = &omap3xxx_timer_hwmod_class,
1025}; 326};
1026 327
1027/* timer10 */ 328/* timer10 */
1028static struct omap_hwmod omap3xxx_timer10_hwmod;
1029
1030/* l4_core -> timer10 */
1031static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
1032 .master = &omap3xxx_l4_core_hwmod,
1033 .slave = &omap3xxx_timer10_hwmod,
1034 .clk = "gpt10_ick",
1035 .addr = omap2_timer10_addrs,
1036 .user = OCP_USER_MPU | OCP_USER_SDMA,
1037};
1038
1039/* timer10 slave port */
1040static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = {
1041 &omap3xxx_l4_core__timer10,
1042};
1043
1044/* timer10 hwmod */
1045static struct omap_hwmod omap3xxx_timer10_hwmod = { 329static struct omap_hwmod omap3xxx_timer10_hwmod = {
1046 .name = "timer10", 330 .name = "timer10",
1047 .mpu_irqs = omap2_timer10_mpu_irqs, 331 .mpu_irqs = omap2_timer10_mpu_irqs,
@@ -1056,29 +340,10 @@ static struct omap_hwmod omap3xxx_timer10_hwmod = {
1056 }, 340 },
1057 }, 341 },
1058 .dev_attr = &capability_pwm_dev_attr, 342 .dev_attr = &capability_pwm_dev_attr,
1059 .slaves = omap3xxx_timer10_slaves,
1060 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer10_slaves),
1061 .class = &omap3xxx_timer_1ms_hwmod_class, 343 .class = &omap3xxx_timer_1ms_hwmod_class,
1062}; 344};
1063 345
1064/* timer11 */ 346/* timer11 */
1065static struct omap_hwmod omap3xxx_timer11_hwmod;
1066
1067/* l4_core -> timer11 */
1068static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
1069 .master = &omap3xxx_l4_core_hwmod,
1070 .slave = &omap3xxx_timer11_hwmod,
1071 .clk = "gpt11_ick",
1072 .addr = omap2_timer11_addrs,
1073 .user = OCP_USER_MPU | OCP_USER_SDMA,
1074};
1075
1076/* timer11 slave port */
1077static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = {
1078 &omap3xxx_l4_core__timer11,
1079};
1080
1081/* timer11 hwmod */
1082static struct omap_hwmod omap3xxx_timer11_hwmod = { 347static struct omap_hwmod omap3xxx_timer11_hwmod = {
1083 .name = "timer11", 348 .name = "timer11",
1084 .mpu_irqs = omap2_timer11_mpu_irqs, 349 .mpu_irqs = omap2_timer11_mpu_irqs,
@@ -1093,42 +358,15 @@ static struct omap_hwmod omap3xxx_timer11_hwmod = {
1093 }, 358 },
1094 }, 359 },
1095 .dev_attr = &capability_pwm_dev_attr, 360 .dev_attr = &capability_pwm_dev_attr,
1096 .slaves = omap3xxx_timer11_slaves,
1097 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer11_slaves),
1098 .class = &omap3xxx_timer_hwmod_class, 361 .class = &omap3xxx_timer_hwmod_class,
1099}; 362};
1100 363
1101/* timer12*/ 364/* timer12 */
1102static struct omap_hwmod omap3xxx_timer12_hwmod;
1103static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { 365static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
1104 { .irq = 95, }, 366 { .irq = 95, },
1105 { .irq = -1 } 367 { .irq = -1 }
1106}; 368};
1107 369
1108static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
1109 {
1110 .pa_start = 0x48304000,
1111 .pa_end = 0x48304000 + SZ_1K - 1,
1112 .flags = ADDR_TYPE_RT
1113 },
1114 { }
1115};
1116
1117/* l4_core -> timer12 */
1118static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = {
1119 .master = &omap3xxx_l4_core_hwmod,
1120 .slave = &omap3xxx_timer12_hwmod,
1121 .clk = "gpt12_ick",
1122 .addr = omap3xxx_timer12_addrs,
1123 .user = OCP_USER_MPU | OCP_USER_SDMA,
1124};
1125
1126/* timer12 slave port */
1127static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = {
1128 &omap3xxx_l4_core__timer12,
1129};
1130
1131/* timer12 hwmod */
1132static struct omap_hwmod omap3xxx_timer12_hwmod = { 370static struct omap_hwmod omap3xxx_timer12_hwmod = {
1133 .name = "timer12", 371 .name = "timer12",
1134 .mpu_irqs = omap3xxx_timer12_mpu_irqs, 372 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
@@ -1143,29 +381,9 @@ static struct omap_hwmod omap3xxx_timer12_hwmod = {
1143 }, 381 },
1144 }, 382 },
1145 .dev_attr = &capability_secure_dev_attr, 383 .dev_attr = &capability_secure_dev_attr,
1146 .slaves = omap3xxx_timer12_slaves,
1147 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer12_slaves),
1148 .class = &omap3xxx_timer_hwmod_class, 384 .class = &omap3xxx_timer_hwmod_class,
1149}; 385};
1150 386
1151/* l4_wkup -> wd_timer2 */
1152static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
1153 {
1154 .pa_start = 0x48314000,
1155 .pa_end = 0x4831407f,
1156 .flags = ADDR_TYPE_RT
1157 },
1158 { }
1159};
1160
1161static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
1162 .master = &omap3xxx_l4_wkup_hwmod,
1163 .slave = &omap3xxx_wd_timer2_hwmod,
1164 .clk = "wdt2_ick",
1165 .addr = omap3xxx_wd_timer2_addrs,
1166 .user = OCP_USER_MPU | OCP_USER_SDMA,
1167};
1168
1169/* 387/*
1170 * 'wd_timer' class 388 * 'wd_timer' class
1171 * 32-bit watchdog upward counter that generates a pulse on the reset pin on 389 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
@@ -1203,11 +421,6 @@ static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
1203 .pre_shutdown = &omap2_wd_timer_disable 421 .pre_shutdown = &omap2_wd_timer_disable
1204}; 422};
1205 423
1206/* wd_timer2 */
1207static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
1208 &omap3xxx_l4_wkup__wd_timer2,
1209};
1210
1211static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { 424static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
1212 .name = "wd_timer2", 425 .name = "wd_timer2",
1213 .class = &omap3xxx_wd_timer_hwmod_class, 426 .class = &omap3xxx_wd_timer_hwmod_class,
@@ -1221,8 +434,6 @@ static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
1221 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT, 434 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
1222 }, 435 },
1223 }, 436 },
1224 .slaves = omap3xxx_wd_timer2_slaves,
1225 .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
1226 /* 437 /*
1227 * XXX: Use software supervised mode, HW supervised smartidle seems to 438 * XXX: Use software supervised mode, HW supervised smartidle seems to
1228 * block CORE power domain idle transitions. Maybe a HW bug in wdt2? 439 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
@@ -1231,11 +442,6 @@ static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
1231}; 442};
1232 443
1233/* UART1 */ 444/* UART1 */
1234
1235static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
1236 &omap3_l4_core__uart1,
1237};
1238
1239static struct omap_hwmod omap3xxx_uart1_hwmod = { 445static struct omap_hwmod omap3xxx_uart1_hwmod = {
1240 .name = "uart1", 446 .name = "uart1",
1241 .mpu_irqs = omap2_uart1_mpu_irqs, 447 .mpu_irqs = omap2_uart1_mpu_irqs,
@@ -1250,17 +456,10 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = {
1250 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT, 456 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
1251 }, 457 },
1252 }, 458 },
1253 .slaves = omap3xxx_uart1_slaves,
1254 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
1255 .class = &omap2_uart_class, 459 .class = &omap2_uart_class,
1256}; 460};
1257 461
1258/* UART2 */ 462/* UART2 */
1259
1260static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
1261 &omap3_l4_core__uart2,
1262};
1263
1264static struct omap_hwmod omap3xxx_uart2_hwmod = { 463static struct omap_hwmod omap3xxx_uart2_hwmod = {
1265 .name = "uart2", 464 .name = "uart2",
1266 .mpu_irqs = omap2_uart2_mpu_irqs, 465 .mpu_irqs = omap2_uart2_mpu_irqs,
@@ -1275,17 +474,10 @@ static struct omap_hwmod omap3xxx_uart2_hwmod = {
1275 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT, 474 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
1276 }, 475 },
1277 }, 476 },
1278 .slaves = omap3xxx_uart2_slaves,
1279 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
1280 .class = &omap2_uart_class, 477 .class = &omap2_uart_class,
1281}; 478};
1282 479
1283/* UART3 */ 480/* UART3 */
1284
1285static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
1286 &omap3_l4_per__uart3,
1287};
1288
1289static struct omap_hwmod omap3xxx_uart3_hwmod = { 481static struct omap_hwmod omap3xxx_uart3_hwmod = {
1290 .name = "uart3", 482 .name = "uart3",
1291 .mpu_irqs = omap2_uart3_mpu_irqs, 483 .mpu_irqs = omap2_uart3_mpu_irqs,
@@ -1300,13 +492,10 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
1300 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT, 492 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
1301 }, 493 },
1302 }, 494 },
1303 .slaves = omap3xxx_uart3_slaves,
1304 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
1305 .class = &omap2_uart_class, 495 .class = &omap2_uart_class,
1306}; 496};
1307 497
1308/* UART4 */ 498/* UART4 */
1309
1310static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { 499static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
1311 { .irq = INT_36XX_UART4_IRQ, }, 500 { .irq = INT_36XX_UART4_IRQ, },
1312 { .irq = -1 } 501 { .irq = -1 }
@@ -1318,11 +507,7 @@ static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
1318 { .dma_req = -1 } 507 { .dma_req = -1 }
1319}; 508};
1320 509
1321static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = { 510static struct omap_hwmod omap36xx_uart4_hwmod = {
1322 &omap3_l4_per__uart4,
1323};
1324
1325static struct omap_hwmod omap3xxx_uart4_hwmod = {
1326 .name = "uart4", 511 .name = "uart4",
1327 .mpu_irqs = uart4_mpu_irqs, 512 .mpu_irqs = uart4_mpu_irqs,
1328 .sdma_reqs = uart4_sdma_reqs, 513 .sdma_reqs = uart4_sdma_reqs,
@@ -1336,8 +521,6 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = {
1336 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT, 521 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
1337 }, 522 },
1338 }, 523 },
1339 .slaves = omap3xxx_uart4_slaves,
1340 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
1341 .class = &omap2_uart_class, 524 .class = &omap2_uart_class,
1342}; 525};
1343 526
@@ -1350,16 +533,12 @@ static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
1350 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, }, 533 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
1351}; 534};
1352 535
1353static struct omap_hwmod_ocp_if *am35xx_uart4_slaves[] = {
1354 &am35xx_l4_core__uart4,
1355};
1356
1357static struct omap_hwmod am35xx_uart4_hwmod = { 536static struct omap_hwmod am35xx_uart4_hwmod = {
1358 .name = "uart4", 537 .name = "uart4",
1359 .mpu_irqs = am35xx_uart4_mpu_irqs, 538 .mpu_irqs = am35xx_uart4_mpu_irqs,
1360 .sdma_reqs = am35xx_uart4_sdma_reqs, 539 .sdma_reqs = am35xx_uart4_sdma_reqs,
1361 .main_clk = "uart4_fck", 540 .main_clk = "uart4_fck",
1362 .prcm = { 541 .prcm = {
1363 .omap2 = { 542 .omap2 = {
1364 .module_offs = CORE_MOD, 543 .module_offs = CORE_MOD,
1365 .prcm_reg_id = 1, 544 .prcm_reg_id = 1,
@@ -1368,12 +547,9 @@ static struct omap_hwmod am35xx_uart4_hwmod = {
1368 .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT, 547 .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT,
1369 }, 548 },
1370 }, 549 },
1371 .slaves = am35xx_uart4_slaves, 550 .class = &omap2_uart_class,
1372 .slaves_cnt = ARRAY_SIZE(am35xx_uart4_slaves),
1373 .class = &omap2_uart_class,
1374}; 551};
1375 552
1376
1377static struct omap_hwmod_class i2c_class = { 553static struct omap_hwmod_class i2c_class = {
1378 .name = "i2c", 554 .name = "i2c",
1379 .sysc = &i2c_sysc, 555 .sysc = &i2c_sysc,
@@ -1388,51 +564,6 @@ static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
1388}; 564};
1389 565
1390/* dss */ 566/* dss */
1391/* dss master ports */
1392static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
1393 &omap3xxx_dss__l3,
1394};
1395
1396/* l4_core -> dss */
1397static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
1398 .master = &omap3xxx_l4_core_hwmod,
1399 .slave = &omap3430es1_dss_core_hwmod,
1400 .clk = "dss_ick",
1401 .addr = omap2_dss_addrs,
1402 .fw = {
1403 .omap2 = {
1404 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
1405 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1406 .flags = OMAP_FIREWALL_L4,
1407 }
1408 },
1409 .user = OCP_USER_MPU | OCP_USER_SDMA,
1410};
1411
1412static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
1413 .master = &omap3xxx_l4_core_hwmod,
1414 .slave = &omap3xxx_dss_core_hwmod,
1415 .clk = "dss_ick",
1416 .addr = omap2_dss_addrs,
1417 .fw = {
1418 .omap2 = {
1419 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
1420 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1421 .flags = OMAP_FIREWALL_L4,
1422 }
1423 },
1424 .user = OCP_USER_MPU | OCP_USER_SDMA,
1425};
1426
1427/* dss slave ports */
1428static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = {
1429 &omap3430es1_l4_core__dss,
1430};
1431
1432static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = {
1433 &omap3xxx_l4_core__dss,
1434};
1435
1436static struct omap_hwmod_opt_clk dss_opt_clks[] = { 567static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1437 /* 568 /*
1438 * The DSS HW needs all DSS clocks enabled during reset. The dss_core 569 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
@@ -1460,10 +591,6 @@ static struct omap_hwmod omap3430es1_dss_core_hwmod = {
1460 }, 591 },
1461 .opt_clks = dss_opt_clks, 592 .opt_clks = dss_opt_clks,
1462 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), 593 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1463 .slaves = omap3430es1_dss_slaves,
1464 .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves),
1465 .masters = omap3xxx_dss_masters,
1466 .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
1467 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET, 594 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1468}; 595};
1469 596
@@ -1485,10 +612,6 @@ static struct omap_hwmod omap3xxx_dss_core_hwmod = {
1485 }, 612 },
1486 .opt_clks = dss_opt_clks, 613 .opt_clks = dss_opt_clks,
1487 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), 614 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1488 .slaves = omap3xxx_dss_slaves,
1489 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves),
1490 .masters = omap3xxx_dss_masters,
1491 .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
1492}; 615};
1493 616
1494/* 617/*
@@ -1513,27 +636,6 @@ static struct omap_hwmod_class omap3_dispc_hwmod_class = {
1513 .sysc = &omap3_dispc_sysc, 636 .sysc = &omap3_dispc_sysc,
1514}; 637};
1515 638
1516/* l4_core -> dss_dispc */
1517static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
1518 .master = &omap3xxx_l4_core_hwmod,
1519 .slave = &omap3xxx_dss_dispc_hwmod,
1520 .clk = "dss_ick",
1521 .addr = omap2_dss_dispc_addrs,
1522 .fw = {
1523 .omap2 = {
1524 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
1525 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1526 .flags = OMAP_FIREWALL_L4,
1527 }
1528 },
1529 .user = OCP_USER_MPU | OCP_USER_SDMA,
1530};
1531
1532/* dss_dispc slave ports */
1533static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
1534 &omap3xxx_l4_core__dss_dispc,
1535};
1536
1537static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { 639static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
1538 .name = "dss_dispc", 640 .name = "dss_dispc",
1539 .class = &omap3_dispc_hwmod_class, 641 .class = &omap3_dispc_hwmod_class,
@@ -1546,8 +648,6 @@ static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
1546 .module_offs = OMAP3430_DSS_MOD, 648 .module_offs = OMAP3430_DSS_MOD,
1547 }, 649 },
1548 }, 650 },
1549 .slaves = omap3xxx_dss_dispc_slaves,
1550 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
1551 .flags = HWMOD_NO_IDLEST, 651 .flags = HWMOD_NO_IDLEST,
1552 .dev_attr = &omap2_3_dss_dispc_dev_attr 652 .dev_attr = &omap2_3_dss_dispc_dev_attr
1553}; 653};
@@ -1567,36 +667,6 @@ static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
1567}; 667};
1568 668
1569/* dss_dsi1 */ 669/* dss_dsi1 */
1570static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
1571 {
1572 .pa_start = 0x4804FC00,
1573 .pa_end = 0x4804FFFF,
1574 .flags = ADDR_TYPE_RT
1575 },
1576 { }
1577};
1578
1579/* l4_core -> dss_dsi1 */
1580static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
1581 .master = &omap3xxx_l4_core_hwmod,
1582 .slave = &omap3xxx_dss_dsi1_hwmod,
1583 .clk = "dss_ick",
1584 .addr = omap3xxx_dss_dsi1_addrs,
1585 .fw = {
1586 .omap2 = {
1587 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
1588 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1589 .flags = OMAP_FIREWALL_L4,
1590 }
1591 },
1592 .user = OCP_USER_MPU | OCP_USER_SDMA,
1593};
1594
1595/* dss_dsi1 slave ports */
1596static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = {
1597 &omap3xxx_l4_core__dss_dsi1,
1598};
1599
1600static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = { 670static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1601 { .role = "sys_clk", .clk = "dss2_alwon_fck" }, 671 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
1602}; 672};
@@ -1615,32 +685,9 @@ static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
1615 }, 685 },
1616 .opt_clks = dss_dsi1_opt_clks, 686 .opt_clks = dss_dsi1_opt_clks,
1617 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks), 687 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
1618 .slaves = omap3xxx_dss_dsi1_slaves,
1619 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves),
1620 .flags = HWMOD_NO_IDLEST, 688 .flags = HWMOD_NO_IDLEST,
1621}; 689};
1622 690
1623/* l4_core -> dss_rfbi */
1624static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
1625 .master = &omap3xxx_l4_core_hwmod,
1626 .slave = &omap3xxx_dss_rfbi_hwmod,
1627 .clk = "dss_ick",
1628 .addr = omap2_dss_rfbi_addrs,
1629 .fw = {
1630 .omap2 = {
1631 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
1632 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
1633 .flags = OMAP_FIREWALL_L4,
1634 }
1635 },
1636 .user = OCP_USER_MPU | OCP_USER_SDMA,
1637};
1638
1639/* dss_rfbi slave ports */
1640static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
1641 &omap3xxx_l4_core__dss_rfbi,
1642};
1643
1644static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { 691static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1645 { .role = "ick", .clk = "dss_ick" }, 692 { .role = "ick", .clk = "dss_ick" },
1646}; 693};
@@ -1658,33 +705,9 @@ static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
1658 }, 705 },
1659 .opt_clks = dss_rfbi_opt_clks, 706 .opt_clks = dss_rfbi_opt_clks,
1660 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), 707 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
1661 .slaves = omap3xxx_dss_rfbi_slaves,
1662 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves),
1663 .flags = HWMOD_NO_IDLEST, 708 .flags = HWMOD_NO_IDLEST,
1664}; 709};
1665 710
1666/* l4_core -> dss_venc */
1667static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
1668 .master = &omap3xxx_l4_core_hwmod,
1669 .slave = &omap3xxx_dss_venc_hwmod,
1670 .clk = "dss_ick",
1671 .addr = omap2_dss_venc_addrs,
1672 .fw = {
1673 .omap2 = {
1674 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
1675 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1676 .flags = OMAP_FIREWALL_L4,
1677 }
1678 },
1679 .flags = OCPIF_SWSUP_IDLE,
1680 .user = OCP_USER_MPU | OCP_USER_SDMA,
1681};
1682
1683/* dss_venc slave ports */
1684static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
1685 &omap3xxx_l4_core__dss_venc,
1686};
1687
1688static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = { 711static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
1689 /* required only on OMAP3430 */ 712 /* required only on OMAP3430 */
1690 { .role = "tv_dac_clk", .clk = "dss_96m_fck" }, 713 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
@@ -1703,13 +726,10 @@ static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
1703 }, 726 },
1704 .opt_clks = dss_venc_opt_clks, 727 .opt_clks = dss_venc_opt_clks,
1705 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks), 728 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
1706 .slaves = omap3xxx_dss_venc_slaves,
1707 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves),
1708 .flags = HWMOD_NO_IDLEST, 729 .flags = HWMOD_NO_IDLEST,
1709}; 730};
1710 731
1711/* I2C1 */ 732/* I2C1 */
1712
1713static struct omap_i2c_dev_attr i2c1_dev_attr = { 733static struct omap_i2c_dev_attr i2c1_dev_attr = {
1714 .fifo_depth = 8, /* bytes */ 734 .fifo_depth = 8, /* bytes */
1715 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | 735 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
@@ -1717,10 +737,6 @@ static struct omap_i2c_dev_attr i2c1_dev_attr = {
1717 OMAP_I2C_FLAG_BUS_SHIFT_2, 737 OMAP_I2C_FLAG_BUS_SHIFT_2,
1718}; 738};
1719 739
1720static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
1721 &omap3_l4_core__i2c1,
1722};
1723
1724static struct omap_hwmod omap3xxx_i2c1_hwmod = { 740static struct omap_hwmod omap3xxx_i2c1_hwmod = {
1725 .name = "i2c1", 741 .name = "i2c1",
1726 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 742 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
@@ -1736,14 +752,11 @@ static struct omap_hwmod omap3xxx_i2c1_hwmod = {
1736 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT, 752 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
1737 }, 753 },
1738 }, 754 },
1739 .slaves = omap3xxx_i2c1_slaves,
1740 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
1741 .class = &i2c_class, 755 .class = &i2c_class,
1742 .dev_attr = &i2c1_dev_attr, 756 .dev_attr = &i2c1_dev_attr,
1743}; 757};
1744 758
1745/* I2C2 */ 759/* I2C2 */
1746
1747static struct omap_i2c_dev_attr i2c2_dev_attr = { 760static struct omap_i2c_dev_attr i2c2_dev_attr = {
1748 .fifo_depth = 8, /* bytes */ 761 .fifo_depth = 8, /* bytes */
1749 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | 762 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
@@ -1751,10 +764,6 @@ static struct omap_i2c_dev_attr i2c2_dev_attr = {
1751 OMAP_I2C_FLAG_BUS_SHIFT_2, 764 OMAP_I2C_FLAG_BUS_SHIFT_2,
1752}; 765};
1753 766
1754static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
1755 &omap3_l4_core__i2c2,
1756};
1757
1758static struct omap_hwmod omap3xxx_i2c2_hwmod = { 767static struct omap_hwmod omap3xxx_i2c2_hwmod = {
1759 .name = "i2c2", 768 .name = "i2c2",
1760 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 769 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
@@ -1770,14 +779,11 @@ static struct omap_hwmod omap3xxx_i2c2_hwmod = {
1770 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT, 779 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
1771 }, 780 },
1772 }, 781 },
1773 .slaves = omap3xxx_i2c2_slaves,
1774 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
1775 .class = &i2c_class, 782 .class = &i2c_class,
1776 .dev_attr = &i2c2_dev_attr, 783 .dev_attr = &i2c2_dev_attr,
1777}; 784};
1778 785
1779/* I2C3 */ 786/* I2C3 */
1780
1781static struct omap_i2c_dev_attr i2c3_dev_attr = { 787static struct omap_i2c_dev_attr i2c3_dev_attr = {
1782 .fifo_depth = 64, /* bytes */ 788 .fifo_depth = 64, /* bytes */
1783 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | 789 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
@@ -1796,10 +802,6 @@ static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
1796 { .dma_req = -1 } 802 { .dma_req = -1 }
1797}; 803};
1798 804
1799static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
1800 &omap3_l4_core__i2c3,
1801};
1802
1803static struct omap_hwmod omap3xxx_i2c3_hwmod = { 805static struct omap_hwmod omap3xxx_i2c3_hwmod = {
1804 .name = "i2c3", 806 .name = "i2c3",
1805 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 807 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
@@ -1815,114 +817,10 @@ static struct omap_hwmod omap3xxx_i2c3_hwmod = {
1815 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT, 817 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
1816 }, 818 },
1817 }, 819 },
1818 .slaves = omap3xxx_i2c3_slaves,
1819 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
1820 .class = &i2c_class, 820 .class = &i2c_class,
1821 .dev_attr = &i2c3_dev_attr, 821 .dev_attr = &i2c3_dev_attr,
1822}; 822};
1823 823
1824/* l4_wkup -> gpio1 */
1825static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
1826 {
1827 .pa_start = 0x48310000,
1828 .pa_end = 0x483101ff,
1829 .flags = ADDR_TYPE_RT
1830 },
1831 { }
1832};
1833
1834static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
1835 .master = &omap3xxx_l4_wkup_hwmod,
1836 .slave = &omap3xxx_gpio1_hwmod,
1837 .addr = omap3xxx_gpio1_addrs,
1838 .user = OCP_USER_MPU | OCP_USER_SDMA,
1839};
1840
1841/* l4_per -> gpio2 */
1842static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
1843 {
1844 .pa_start = 0x49050000,
1845 .pa_end = 0x490501ff,
1846 .flags = ADDR_TYPE_RT
1847 },
1848 { }
1849};
1850
1851static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
1852 .master = &omap3xxx_l4_per_hwmod,
1853 .slave = &omap3xxx_gpio2_hwmod,
1854 .addr = omap3xxx_gpio2_addrs,
1855 .user = OCP_USER_MPU | OCP_USER_SDMA,
1856};
1857
1858/* l4_per -> gpio3 */
1859static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
1860 {
1861 .pa_start = 0x49052000,
1862 .pa_end = 0x490521ff,
1863 .flags = ADDR_TYPE_RT
1864 },
1865 { }
1866};
1867
1868static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
1869 .master = &omap3xxx_l4_per_hwmod,
1870 .slave = &omap3xxx_gpio3_hwmod,
1871 .addr = omap3xxx_gpio3_addrs,
1872 .user = OCP_USER_MPU | OCP_USER_SDMA,
1873};
1874
1875/* l4_per -> gpio4 */
1876static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
1877 {
1878 .pa_start = 0x49054000,
1879 .pa_end = 0x490541ff,
1880 .flags = ADDR_TYPE_RT
1881 },
1882 { }
1883};
1884
1885static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
1886 .master = &omap3xxx_l4_per_hwmod,
1887 .slave = &omap3xxx_gpio4_hwmod,
1888 .addr = omap3xxx_gpio4_addrs,
1889 .user = OCP_USER_MPU | OCP_USER_SDMA,
1890};
1891
1892/* l4_per -> gpio5 */
1893static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
1894 {
1895 .pa_start = 0x49056000,
1896 .pa_end = 0x490561ff,
1897 .flags = ADDR_TYPE_RT
1898 },
1899 { }
1900};
1901
1902static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
1903 .master = &omap3xxx_l4_per_hwmod,
1904 .slave = &omap3xxx_gpio5_hwmod,
1905 .addr = omap3xxx_gpio5_addrs,
1906 .user = OCP_USER_MPU | OCP_USER_SDMA,
1907};
1908
1909/* l4_per -> gpio6 */
1910static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
1911 {
1912 .pa_start = 0x49058000,
1913 .pa_end = 0x490581ff,
1914 .flags = ADDR_TYPE_RT
1915 },
1916 { }
1917};
1918
1919static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
1920 .master = &omap3xxx_l4_per_hwmod,
1921 .slave = &omap3xxx_gpio6_hwmod,
1922 .addr = omap3xxx_gpio6_addrs,
1923 .user = OCP_USER_MPU | OCP_USER_SDMA,
1924};
1925
1926/* 824/*
1927 * 'gpio' class 825 * 'gpio' class
1928 * general purpose io module 826 * general purpose io module
@@ -1945,7 +843,7 @@ static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
1945 .rev = 1, 843 .rev = 1,
1946}; 844};
1947 845
1948/* gpio_dev_attr*/ 846/* gpio_dev_attr */
1949static struct omap_gpio_dev_attr gpio_dev_attr = { 847static struct omap_gpio_dev_attr gpio_dev_attr = {
1950 .bank_width = 32, 848 .bank_width = 32,
1951 .dbck_flag = true, 849 .dbck_flag = true,
@@ -1956,10 +854,6 @@ static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
1956 { .role = "dbclk", .clk = "gpio1_dbck", }, 854 { .role = "dbclk", .clk = "gpio1_dbck", },
1957}; 855};
1958 856
1959static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
1960 &omap3xxx_l4_wkup__gpio1,
1961};
1962
1963static struct omap_hwmod omap3xxx_gpio1_hwmod = { 857static struct omap_hwmod omap3xxx_gpio1_hwmod = {
1964 .name = "gpio1", 858 .name = "gpio1",
1965 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 859 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -1976,8 +870,6 @@ static struct omap_hwmod omap3xxx_gpio1_hwmod = {
1976 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT, 870 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
1977 }, 871 },
1978 }, 872 },
1979 .slaves = omap3xxx_gpio1_slaves,
1980 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
1981 .class = &omap3xxx_gpio_hwmod_class, 873 .class = &omap3xxx_gpio_hwmod_class,
1982 .dev_attr = &gpio_dev_attr, 874 .dev_attr = &gpio_dev_attr,
1983}; 875};
@@ -1987,10 +879,6 @@ static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
1987 { .role = "dbclk", .clk = "gpio2_dbck", }, 879 { .role = "dbclk", .clk = "gpio2_dbck", },
1988}; 880};
1989 881
1990static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
1991 &omap3xxx_l4_per__gpio2,
1992};
1993
1994static struct omap_hwmod omap3xxx_gpio2_hwmod = { 882static struct omap_hwmod omap3xxx_gpio2_hwmod = {
1995 .name = "gpio2", 883 .name = "gpio2",
1996 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 884 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -2007,8 +895,6 @@ static struct omap_hwmod omap3xxx_gpio2_hwmod = {
2007 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT, 895 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
2008 }, 896 },
2009 }, 897 },
2010 .slaves = omap3xxx_gpio2_slaves,
2011 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
2012 .class = &omap3xxx_gpio_hwmod_class, 898 .class = &omap3xxx_gpio_hwmod_class,
2013 .dev_attr = &gpio_dev_attr, 899 .dev_attr = &gpio_dev_attr,
2014}; 900};
@@ -2018,10 +904,6 @@ static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
2018 { .role = "dbclk", .clk = "gpio3_dbck", }, 904 { .role = "dbclk", .clk = "gpio3_dbck", },
2019}; 905};
2020 906
2021static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
2022 &omap3xxx_l4_per__gpio3,
2023};
2024
2025static struct omap_hwmod omap3xxx_gpio3_hwmod = { 907static struct omap_hwmod omap3xxx_gpio3_hwmod = {
2026 .name = "gpio3", 908 .name = "gpio3",
2027 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 909 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -2038,8 +920,6 @@ static struct omap_hwmod omap3xxx_gpio3_hwmod = {
2038 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT, 920 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
2039 }, 921 },
2040 }, 922 },
2041 .slaves = omap3xxx_gpio3_slaves,
2042 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
2043 .class = &omap3xxx_gpio_hwmod_class, 923 .class = &omap3xxx_gpio_hwmod_class,
2044 .dev_attr = &gpio_dev_attr, 924 .dev_attr = &gpio_dev_attr,
2045}; 925};
@@ -2049,10 +929,6 @@ static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
2049 { .role = "dbclk", .clk = "gpio4_dbck", }, 929 { .role = "dbclk", .clk = "gpio4_dbck", },
2050}; 930};
2051 931
2052static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
2053 &omap3xxx_l4_per__gpio4,
2054};
2055
2056static struct omap_hwmod omap3xxx_gpio4_hwmod = { 932static struct omap_hwmod omap3xxx_gpio4_hwmod = {
2057 .name = "gpio4", 933 .name = "gpio4",
2058 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 934 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -2069,8 +945,6 @@ static struct omap_hwmod omap3xxx_gpio4_hwmod = {
2069 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT, 945 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
2070 }, 946 },
2071 }, 947 },
2072 .slaves = omap3xxx_gpio4_slaves,
2073 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
2074 .class = &omap3xxx_gpio_hwmod_class, 948 .class = &omap3xxx_gpio_hwmod_class,
2075 .dev_attr = &gpio_dev_attr, 949 .dev_attr = &gpio_dev_attr,
2076}; 950};
@@ -2085,10 +959,6 @@ static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
2085 { .role = "dbclk", .clk = "gpio5_dbck", }, 959 { .role = "dbclk", .clk = "gpio5_dbck", },
2086}; 960};
2087 961
2088static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
2089 &omap3xxx_l4_per__gpio5,
2090};
2091
2092static struct omap_hwmod omap3xxx_gpio5_hwmod = { 962static struct omap_hwmod omap3xxx_gpio5_hwmod = {
2093 .name = "gpio5", 963 .name = "gpio5",
2094 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 964 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -2105,8 +975,6 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod = {
2105 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT, 975 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
2106 }, 976 },
2107 }, 977 },
2108 .slaves = omap3xxx_gpio5_slaves,
2109 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
2110 .class = &omap3xxx_gpio_hwmod_class, 978 .class = &omap3xxx_gpio_hwmod_class,
2111 .dev_attr = &gpio_dev_attr, 979 .dev_attr = &gpio_dev_attr,
2112}; 980};
@@ -2121,10 +989,6 @@ static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
2121 { .role = "dbclk", .clk = "gpio6_dbck", }, 989 { .role = "dbclk", .clk = "gpio6_dbck", },
2122}; 990};
2123 991
2124static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
2125 &omap3xxx_l4_per__gpio6,
2126};
2127
2128static struct omap_hwmod omap3xxx_gpio6_hwmod = { 992static struct omap_hwmod omap3xxx_gpio6_hwmod = {
2129 .name = "gpio6", 993 .name = "gpio6",
2130 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 994 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -2141,20 +1005,10 @@ static struct omap_hwmod omap3xxx_gpio6_hwmod = {
2141 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT, 1005 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
2142 }, 1006 },
2143 }, 1007 },
2144 .slaves = omap3xxx_gpio6_slaves,
2145 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
2146 .class = &omap3xxx_gpio_hwmod_class, 1008 .class = &omap3xxx_gpio_hwmod_class,
2147 .dev_attr = &gpio_dev_attr, 1009 .dev_attr = &gpio_dev_attr,
2148}; 1010};
2149 1011
2150/* dma_system -> L3 */
2151static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2152 .master = &omap3xxx_dma_system_hwmod,
2153 .slave = &omap3xxx_l3_main_hwmod,
2154 .clk = "core_l3_ick",
2155 .user = OCP_USER_MPU | OCP_USER_SDMA,
2156};
2157
2158/* dma attributes */ 1012/* dma attributes */
2159static struct omap_dma_dev_attr dma_dev_attr = { 1013static struct omap_dma_dev_attr dma_dev_attr = {
2160 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | 1014 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
@@ -2181,34 +1035,6 @@ static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
2181}; 1035};
2182 1036
2183/* dma_system */ 1037/* dma_system */
2184static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2185 {
2186 .pa_start = 0x48056000,
2187 .pa_end = 0x48056fff,
2188 .flags = ADDR_TYPE_RT
2189 },
2190 { }
2191};
2192
2193/* dma_system master ports */
2194static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
2195 &omap3xxx_dma_system__l3,
2196};
2197
2198/* l4_cfg -> dma_system */
2199static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2200 .master = &omap3xxx_l4_core_hwmod,
2201 .slave = &omap3xxx_dma_system_hwmod,
2202 .clk = "core_l4_ick",
2203 .addr = omap3xxx_dma_system_addrs,
2204 .user = OCP_USER_MPU | OCP_USER_SDMA,
2205};
2206
2207/* dma_system slave ports */
2208static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
2209 &omap3xxx_l4_core__dma_system,
2210};
2211
2212static struct omap_hwmod omap3xxx_dma_system_hwmod = { 1038static struct omap_hwmod omap3xxx_dma_system_hwmod = {
2213 .name = "dma", 1039 .name = "dma",
2214 .class = &omap3xxx_dma_hwmod_class, 1040 .class = &omap3xxx_dma_hwmod_class,
@@ -2223,10 +1049,6 @@ static struct omap_hwmod omap3xxx_dma_system_hwmod = {
2223 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT, 1049 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
2224 }, 1050 },
2225 }, 1051 },
2226 .slaves = omap3xxx_dma_system_slaves,
2227 .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
2228 .masters = omap3xxx_dma_system_masters,
2229 .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
2230 .dev_attr = &dma_dev_attr, 1052 .dev_attr = &dma_dev_attr,
2231 .flags = HWMOD_NO_IDLEST, 1053 .flags = HWMOD_NO_IDLEST,
2232}; 1054};
@@ -2259,30 +1081,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
2259 { .irq = -1 } 1081 { .irq = -1 }
2260}; 1082};
2261 1083
2262static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
2263 {
2264 .name = "mpu",
2265 .pa_start = 0x48074000,
2266 .pa_end = 0x480740ff,
2267 .flags = ADDR_TYPE_RT
2268 },
2269 { }
2270};
2271
2272/* l4_core -> mcbsp1 */
2273static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2274 .master = &omap3xxx_l4_core_hwmod,
2275 .slave = &omap3xxx_mcbsp1_hwmod,
2276 .clk = "mcbsp1_ick",
2277 .addr = omap3xxx_mcbsp1_addrs,
2278 .user = OCP_USER_MPU | OCP_USER_SDMA,
2279};
2280
2281/* mcbsp1 slave ports */
2282static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = {
2283 &omap3xxx_l4_core__mcbsp1,
2284};
2285
2286static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { 1084static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
2287 .name = "mcbsp1", 1085 .name = "mcbsp1",
2288 .class = &omap3xxx_mcbsp_hwmod_class, 1086 .class = &omap3xxx_mcbsp_hwmod_class,
@@ -2298,8 +1096,6 @@ static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
2298 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT, 1096 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
2299 }, 1097 },
2300 }, 1098 },
2301 .slaves = omap3xxx_mcbsp1_slaves,
2302 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves),
2303}; 1099};
2304 1100
2305/* mcbsp2 */ 1101/* mcbsp2 */
@@ -2310,30 +1106,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
2310 { .irq = -1 } 1106 { .irq = -1 }
2311}; 1107};
2312 1108
2313static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2314 {
2315 .name = "mpu",
2316 .pa_start = 0x49022000,
2317 .pa_end = 0x490220ff,
2318 .flags = ADDR_TYPE_RT
2319 },
2320 { }
2321};
2322
2323/* l4_per -> mcbsp2 */
2324static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2325 .master = &omap3xxx_l4_per_hwmod,
2326 .slave = &omap3xxx_mcbsp2_hwmod,
2327 .clk = "mcbsp2_ick",
2328 .addr = omap3xxx_mcbsp2_addrs,
2329 .user = OCP_USER_MPU | OCP_USER_SDMA,
2330};
2331
2332/* mcbsp2 slave ports */
2333static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = {
2334 &omap3xxx_l4_per__mcbsp2,
2335};
2336
2337static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = { 1109static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
2338 .sidetone = "mcbsp2_sidetone", 1110 .sidetone = "mcbsp2_sidetone",
2339}; 1111};
@@ -2353,8 +1125,6 @@ static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
2353 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, 1125 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2354 }, 1126 },
2355 }, 1127 },
2356 .slaves = omap3xxx_mcbsp2_slaves,
2357 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves),
2358 .dev_attr = &omap34xx_mcbsp2_dev_attr, 1128 .dev_attr = &omap34xx_mcbsp2_dev_attr,
2359}; 1129};
2360 1130
@@ -2366,32 +1136,8 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
2366 { .irq = -1 } 1136 { .irq = -1 }
2367}; 1137};
2368 1138
2369static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2370 {
2371 .name = "mpu",
2372 .pa_start = 0x49024000,
2373 .pa_end = 0x490240ff,
2374 .flags = ADDR_TYPE_RT
2375 },
2376 { }
2377};
2378
2379/* l4_per -> mcbsp3 */
2380static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2381 .master = &omap3xxx_l4_per_hwmod,
2382 .slave = &omap3xxx_mcbsp3_hwmod,
2383 .clk = "mcbsp3_ick",
2384 .addr = omap3xxx_mcbsp3_addrs,
2385 .user = OCP_USER_MPU | OCP_USER_SDMA,
2386};
2387
2388/* mcbsp3 slave ports */
2389static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = {
2390 &omap3xxx_l4_per__mcbsp3,
2391};
2392
2393static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = { 1139static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
2394 .sidetone = "mcbsp3_sidetone", 1140 .sidetone = "mcbsp3_sidetone",
2395}; 1141};
2396 1142
2397static struct omap_hwmod omap3xxx_mcbsp3_hwmod = { 1143static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
@@ -2409,8 +1155,6 @@ static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
2409 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, 1155 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2410 }, 1156 },
2411 }, 1157 },
2412 .slaves = omap3xxx_mcbsp3_slaves,
2413 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves),
2414 .dev_attr = &omap34xx_mcbsp3_dev_attr, 1158 .dev_attr = &omap34xx_mcbsp3_dev_attr,
2415}; 1159};
2416 1160
@@ -2428,30 +1172,6 @@ static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
2428 { .dma_req = -1 } 1172 { .dma_req = -1 }
2429}; 1173};
2430 1174
2431static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2432 {
2433 .name = "mpu",
2434 .pa_start = 0x49026000,
2435 .pa_end = 0x490260ff,
2436 .flags = ADDR_TYPE_RT
2437 },
2438 { }
2439};
2440
2441/* l4_per -> mcbsp4 */
2442static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2443 .master = &omap3xxx_l4_per_hwmod,
2444 .slave = &omap3xxx_mcbsp4_hwmod,
2445 .clk = "mcbsp4_ick",
2446 .addr = omap3xxx_mcbsp4_addrs,
2447 .user = OCP_USER_MPU | OCP_USER_SDMA,
2448};
2449
2450/* mcbsp4 slave ports */
2451static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = {
2452 &omap3xxx_l4_per__mcbsp4,
2453};
2454
2455static struct omap_hwmod omap3xxx_mcbsp4_hwmod = { 1175static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
2456 .name = "mcbsp4", 1176 .name = "mcbsp4",
2457 .class = &omap3xxx_mcbsp_hwmod_class, 1177 .class = &omap3xxx_mcbsp_hwmod_class,
@@ -2467,8 +1187,6 @@ static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
2467 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT, 1187 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
2468 }, 1188 },
2469 }, 1189 },
2470 .slaves = omap3xxx_mcbsp4_slaves,
2471 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves),
2472}; 1190};
2473 1191
2474/* mcbsp5 */ 1192/* mcbsp5 */
@@ -2485,30 +1203,6 @@ static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
2485 { .dma_req = -1 } 1203 { .dma_req = -1 }
2486}; 1204};
2487 1205
2488static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2489 {
2490 .name = "mpu",
2491 .pa_start = 0x48096000,
2492 .pa_end = 0x480960ff,
2493 .flags = ADDR_TYPE_RT
2494 },
2495 { }
2496};
2497
2498/* l4_core -> mcbsp5 */
2499static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2500 .master = &omap3xxx_l4_core_hwmod,
2501 .slave = &omap3xxx_mcbsp5_hwmod,
2502 .clk = "mcbsp5_ick",
2503 .addr = omap3xxx_mcbsp5_addrs,
2504 .user = OCP_USER_MPU | OCP_USER_SDMA,
2505};
2506
2507/* mcbsp5 slave ports */
2508static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = {
2509 &omap3xxx_l4_core__mcbsp5,
2510};
2511
2512static struct omap_hwmod omap3xxx_mcbsp5_hwmod = { 1206static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
2513 .name = "mcbsp5", 1207 .name = "mcbsp5",
2514 .class = &omap3xxx_mcbsp_hwmod_class, 1208 .class = &omap3xxx_mcbsp_hwmod_class,
@@ -2524,11 +1218,9 @@ static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
2524 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT, 1218 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
2525 }, 1219 },
2526 }, 1220 },
2527 .slaves = omap3xxx_mcbsp5_slaves,
2528 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves),
2529}; 1221};
2530/* 'mcbsp sidetone' class */
2531 1222
1223/* 'mcbsp sidetone' class */
2532static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = { 1224static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
2533 .sysc_offs = 0x0010, 1225 .sysc_offs = 0x0010,
2534 .sysc_flags = SYSC_HAS_AUTOIDLE, 1226 .sysc_flags = SYSC_HAS_AUTOIDLE,
@@ -2546,30 +1238,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
2546 { .irq = -1 } 1238 { .irq = -1 }
2547}; 1239};
2548 1240
2549static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2550 {
2551 .name = "sidetone",
2552 .pa_start = 0x49028000,
2553 .pa_end = 0x490280ff,
2554 .flags = ADDR_TYPE_RT
2555 },
2556 { }
2557};
2558
2559/* l4_per -> mcbsp2_sidetone */
2560static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2561 .master = &omap3xxx_l4_per_hwmod,
2562 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2563 .clk = "mcbsp2_ick",
2564 .addr = omap3xxx_mcbsp2_sidetone_addrs,
2565 .user = OCP_USER_MPU,
2566};
2567
2568/* mcbsp2_sidetone slave ports */
2569static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = {
2570 &omap3xxx_l4_per__mcbsp2_sidetone,
2571};
2572
2573static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { 1241static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
2574 .name = "mcbsp2_sidetone", 1242 .name = "mcbsp2_sidetone",
2575 .class = &omap3xxx_mcbsp_sidetone_hwmod_class, 1243 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
@@ -2584,8 +1252,6 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
2584 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, 1252 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2585 }, 1253 },
2586 }, 1254 },
2587 .slaves = omap3xxx_mcbsp2_sidetone_slaves,
2588 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves),
2589}; 1255};
2590 1256
2591/* mcbsp3_sidetone */ 1257/* mcbsp3_sidetone */
@@ -2594,30 +1260,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
2594 { .irq = -1 } 1260 { .irq = -1 }
2595}; 1261};
2596 1262
2597static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
2598 {
2599 .name = "sidetone",
2600 .pa_start = 0x4902A000,
2601 .pa_end = 0x4902A0ff,
2602 .flags = ADDR_TYPE_RT
2603 },
2604 { }
2605};
2606
2607/* l4_per -> mcbsp3_sidetone */
2608static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2609 .master = &omap3xxx_l4_per_hwmod,
2610 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2611 .clk = "mcbsp3_ick",
2612 .addr = omap3xxx_mcbsp3_sidetone_addrs,
2613 .user = OCP_USER_MPU,
2614};
2615
2616/* mcbsp3_sidetone slave ports */
2617static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = {
2618 &omap3xxx_l4_per__mcbsp3_sidetone,
2619};
2620
2621static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { 1263static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
2622 .name = "mcbsp3_sidetone", 1264 .name = "mcbsp3_sidetone",
2623 .class = &omap3xxx_mcbsp_sidetone_hwmod_class, 1265 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
@@ -2632,11 +1274,8 @@ static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
2632 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, 1274 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2633 }, 1275 },
2634 }, 1276 },
2635 .slaves = omap3xxx_mcbsp3_sidetone_slaves,
2636 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves),
2637}; 1277};
2638 1278
2639
2640/* SR common */ 1279/* SR common */
2641static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = { 1280static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
2642 .clkact_shift = 20, 1281 .clkact_shift = 20,
@@ -2657,7 +1296,7 @@ static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
2657 1296
2658static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = { 1297static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
2659 .sidle_shift = 24, 1298 .sidle_shift = 24,
2660 .enwkup_shift = 26 1299 .enwkup_shift = 26,
2661}; 1300};
2662 1301
2663static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = { 1302static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
@@ -2679,12 +1318,13 @@ static struct omap_smartreflex_dev_attr sr1_dev_attr = {
2679 .sensor_voltdm_name = "mpu_iva", 1318 .sensor_voltdm_name = "mpu_iva",
2680}; 1319};
2681 1320
2682static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = { 1321static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
2683 &omap3_l4_core__sr1, 1322 { .irq = 18 },
1323 { .irq = -1 }
2684}; 1324};
2685 1325
2686static struct omap_hwmod omap34xx_sr1_hwmod = { 1326static struct omap_hwmod omap34xx_sr1_hwmod = {
2687 .name = "sr1_hwmod", 1327 .name = "sr1",
2688 .class = &omap34xx_smartreflex_hwmod_class, 1328 .class = &omap34xx_smartreflex_hwmod_class,
2689 .main_clk = "sr1_fck", 1329 .main_clk = "sr1_fck",
2690 .prcm = { 1330 .prcm = {
@@ -2696,15 +1336,13 @@ static struct omap_hwmod omap34xx_sr1_hwmod = {
2696 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, 1336 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2697 }, 1337 },
2698 }, 1338 },
2699 .slaves = omap3_sr1_slaves,
2700 .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
2701 .dev_attr = &sr1_dev_attr, 1339 .dev_attr = &sr1_dev_attr,
2702 .mpu_irqs = omap3_smartreflex_mpu_irqs, 1340 .mpu_irqs = omap3_smartreflex_mpu_irqs,
2703 .flags = HWMOD_SET_DEFAULT_CLOCKACT, 1341 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2704}; 1342};
2705 1343
2706static struct omap_hwmod omap36xx_sr1_hwmod = { 1344static struct omap_hwmod omap36xx_sr1_hwmod = {
2707 .name = "sr1_hwmod", 1345 .name = "sr1",
2708 .class = &omap36xx_smartreflex_hwmod_class, 1346 .class = &omap36xx_smartreflex_hwmod_class,
2709 .main_clk = "sr1_fck", 1347 .main_clk = "sr1_fck",
2710 .prcm = { 1348 .prcm = {
@@ -2716,8 +1354,6 @@ static struct omap_hwmod omap36xx_sr1_hwmod = {
2716 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, 1354 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2717 }, 1355 },
2718 }, 1356 },
2719 .slaves = omap3_sr1_slaves,
2720 .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
2721 .dev_attr = &sr1_dev_attr, 1357 .dev_attr = &sr1_dev_attr,
2722 .mpu_irqs = omap3_smartreflex_mpu_irqs, 1358 .mpu_irqs = omap3_smartreflex_mpu_irqs,
2723}; 1359};
@@ -2727,12 +1363,13 @@ static struct omap_smartreflex_dev_attr sr2_dev_attr = {
2727 .sensor_voltdm_name = "core", 1363 .sensor_voltdm_name = "core",
2728}; 1364};
2729 1365
2730static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = { 1366static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
2731 &omap3_l4_core__sr2, 1367 { .irq = 19 },
1368 { .irq = -1 }
2732}; 1369};
2733 1370
2734static struct omap_hwmod omap34xx_sr2_hwmod = { 1371static struct omap_hwmod omap34xx_sr2_hwmod = {
2735 .name = "sr2_hwmod", 1372 .name = "sr2",
2736 .class = &omap34xx_smartreflex_hwmod_class, 1373 .class = &omap34xx_smartreflex_hwmod_class,
2737 .main_clk = "sr2_fck", 1374 .main_clk = "sr2_fck",
2738 .prcm = { 1375 .prcm = {
@@ -2744,15 +1381,13 @@ static struct omap_hwmod omap34xx_sr2_hwmod = {
2744 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, 1381 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2745 }, 1382 },
2746 }, 1383 },
2747 .slaves = omap3_sr2_slaves,
2748 .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
2749 .dev_attr = &sr2_dev_attr, 1384 .dev_attr = &sr2_dev_attr,
2750 .mpu_irqs = omap3_smartreflex_core_irqs, 1385 .mpu_irqs = omap3_smartreflex_core_irqs,
2751 .flags = HWMOD_SET_DEFAULT_CLOCKACT, 1386 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2752}; 1387};
2753 1388
2754static struct omap_hwmod omap36xx_sr2_hwmod = { 1389static struct omap_hwmod omap36xx_sr2_hwmod = {
2755 .name = "sr2_hwmod", 1390 .name = "sr2",
2756 .class = &omap36xx_smartreflex_hwmod_class, 1391 .class = &omap36xx_smartreflex_hwmod_class,
2757 .main_clk = "sr2_fck", 1392 .main_clk = "sr2_fck",
2758 .prcm = { 1393 .prcm = {
@@ -2764,8 +1399,6 @@ static struct omap_hwmod omap36xx_sr2_hwmod = {
2764 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, 1399 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2765 }, 1400 },
2766 }, 1401 },
2767 .slaves = omap3_sr2_slaves,
2768 .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
2769 .dev_attr = &sr2_dev_attr, 1402 .dev_attr = &sr2_dev_attr,
2770 .mpu_irqs = omap3_smartreflex_core_irqs, 1403 .mpu_irqs = omap3_smartreflex_core_irqs,
2771}; 1404};
@@ -2791,34 +1424,11 @@ static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
2791 .sysc = &omap3xxx_mailbox_sysc, 1424 .sysc = &omap3xxx_mailbox_sysc,
2792}; 1425};
2793 1426
2794static struct omap_hwmod omap3xxx_mailbox_hwmod;
2795static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { 1427static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
2796 { .irq = 26 }, 1428 { .irq = 26 },
2797 { .irq = -1 } 1429 { .irq = -1 }
2798}; 1430};
2799 1431
2800static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
2801 {
2802 .pa_start = 0x48094000,
2803 .pa_end = 0x480941ff,
2804 .flags = ADDR_TYPE_RT,
2805 },
2806 { }
2807};
2808
2809/* l4_core -> mailbox */
2810static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2811 .master = &omap3xxx_l4_core_hwmod,
2812 .slave = &omap3xxx_mailbox_hwmod,
2813 .addr = omap3xxx_mailbox_addrs,
2814 .user = OCP_USER_MPU | OCP_USER_SDMA,
2815};
2816
2817/* mailbox slave ports */
2818static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = {
2819 &omap3xxx_l4_core__mailbox,
2820};
2821
2822static struct omap_hwmod omap3xxx_mailbox_hwmod = { 1432static struct omap_hwmod omap3xxx_mailbox_hwmod = {
2823 .name = "mailbox", 1433 .name = "mailbox",
2824 .class = &omap3xxx_mailbox_hwmod_class, 1434 .class = &omap3xxx_mailbox_hwmod_class,
@@ -2833,53 +1443,6 @@ static struct omap_hwmod omap3xxx_mailbox_hwmod = {
2833 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT, 1443 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
2834 }, 1444 },
2835 }, 1445 },
2836 .slaves = omap3xxx_mailbox_slaves,
2837 .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves),
2838};
2839
2840/* l4 core -> mcspi1 interface */
2841static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2842 .master = &omap3xxx_l4_core_hwmod,
2843 .slave = &omap34xx_mcspi1,
2844 .clk = "mcspi1_ick",
2845 .addr = omap2_mcspi1_addr_space,
2846 .user = OCP_USER_MPU | OCP_USER_SDMA,
2847};
2848
2849/* l4 core -> mcspi2 interface */
2850static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2851 .master = &omap3xxx_l4_core_hwmod,
2852 .slave = &omap34xx_mcspi2,
2853 .clk = "mcspi2_ick",
2854 .addr = omap2_mcspi2_addr_space,
2855 .user = OCP_USER_MPU | OCP_USER_SDMA,
2856};
2857
2858/* l4 core -> mcspi3 interface */
2859static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2860 .master = &omap3xxx_l4_core_hwmod,
2861 .slave = &omap34xx_mcspi3,
2862 .clk = "mcspi3_ick",
2863 .addr = omap2430_mcspi3_addr_space,
2864 .user = OCP_USER_MPU | OCP_USER_SDMA,
2865};
2866
2867/* l4 core -> mcspi4 interface */
2868static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
2869 {
2870 .pa_start = 0x480ba000,
2871 .pa_end = 0x480ba0ff,
2872 .flags = ADDR_TYPE_RT,
2873 },
2874 { }
2875};
2876
2877static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
2878 .master = &omap3xxx_l4_core_hwmod,
2879 .slave = &omap34xx_mcspi4,
2880 .clk = "mcspi4_ick",
2881 .addr = omap34xx_mcspi4_addr_space,
2882 .user = OCP_USER_MPU | OCP_USER_SDMA,
2883}; 1446};
2884 1447
2885/* 1448/*
@@ -2906,10 +1469,6 @@ static struct omap_hwmod_class omap34xx_mcspi_class = {
2906}; 1469};
2907 1470
2908/* mcspi1 */ 1471/* mcspi1 */
2909static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
2910 &omap34xx_l4_core__mcspi1,
2911};
2912
2913static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { 1472static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
2914 .num_chipselect = 4, 1473 .num_chipselect = 4,
2915}; 1474};
@@ -2928,17 +1487,11 @@ static struct omap_hwmod omap34xx_mcspi1 = {
2928 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT, 1487 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
2929 }, 1488 },
2930 }, 1489 },
2931 .slaves = omap34xx_mcspi1_slaves,
2932 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
2933 .class = &omap34xx_mcspi_class, 1490 .class = &omap34xx_mcspi_class,
2934 .dev_attr = &omap_mcspi1_dev_attr, 1491 .dev_attr = &omap_mcspi1_dev_attr,
2935}; 1492};
2936 1493
2937/* mcspi2 */ 1494/* mcspi2 */
2938static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
2939 &omap34xx_l4_core__mcspi2,
2940};
2941
2942static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { 1495static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
2943 .num_chipselect = 2, 1496 .num_chipselect = 2,
2944}; 1497};
@@ -2957,8 +1510,6 @@ static struct omap_hwmod omap34xx_mcspi2 = {
2957 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT, 1510 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
2958 }, 1511 },
2959 }, 1512 },
2960 .slaves = omap34xx_mcspi2_slaves,
2961 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
2962 .class = &omap34xx_mcspi_class, 1513 .class = &omap34xx_mcspi_class,
2963 .dev_attr = &omap_mcspi2_dev_attr, 1514 .dev_attr = &omap_mcspi2_dev_attr,
2964}; 1515};
@@ -2977,10 +1528,6 @@ static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
2977 { .dma_req = -1 } 1528 { .dma_req = -1 }
2978}; 1529};
2979 1530
2980static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
2981 &omap34xx_l4_core__mcspi3,
2982};
2983
2984static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { 1531static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
2985 .num_chipselect = 2, 1532 .num_chipselect = 2,
2986}; 1533};
@@ -2999,13 +1546,11 @@ static struct omap_hwmod omap34xx_mcspi3 = {
2999 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT, 1546 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
3000 }, 1547 },
3001 }, 1548 },
3002 .slaves = omap34xx_mcspi3_slaves,
3003 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
3004 .class = &omap34xx_mcspi_class, 1549 .class = &omap34xx_mcspi_class,
3005 .dev_attr = &omap_mcspi3_dev_attr, 1550 .dev_attr = &omap_mcspi3_dev_attr,
3006}; 1551};
3007 1552
3008/* SPI4 */ 1553/* mcspi4 */
3009static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { 1554static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
3010 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ 1555 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
3011 { .irq = -1 } 1556 { .irq = -1 }
@@ -3017,10 +1562,6 @@ static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
3017 { .dma_req = -1 } 1562 { .dma_req = -1 }
3018}; 1563};
3019 1564
3020static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
3021 &omap34xx_l4_core__mcspi4,
3022};
3023
3024static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = { 1565static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
3025 .num_chipselect = 1, 1566 .num_chipselect = 1,
3026}; 1567};
@@ -3039,15 +1580,11 @@ static struct omap_hwmod omap34xx_mcspi4 = {
3039 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT, 1580 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
3040 }, 1581 },
3041 }, 1582 },
3042 .slaves = omap34xx_mcspi4_slaves,
3043 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
3044 .class = &omap34xx_mcspi_class, 1583 .class = &omap34xx_mcspi_class,
3045 .dev_attr = &omap_mcspi4_dev_attr, 1584 .dev_attr = &omap_mcspi4_dev_attr,
3046}; 1585};
3047 1586
3048/* 1587/* usbhsotg */
3049 * usbhsotg
3050 */
3051static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = { 1588static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
3052 .rev_offs = 0x0400, 1589 .rev_offs = 0x0400,
3053 .sysc_offs = 0x0404, 1590 .sysc_offs = 0x0404,
@@ -3064,6 +1601,7 @@ static struct omap_hwmod_class usbotg_class = {
3064 .name = "usbotg", 1601 .name = "usbotg",
3065 .sysc = &omap3xxx_usbhsotg_sysc, 1602 .sysc = &omap3xxx_usbhsotg_sysc,
3066}; 1603};
1604
3067/* usb_otg_hs */ 1605/* usb_otg_hs */
3068static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = { 1606static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
3069 1607
@@ -3086,10 +1624,6 @@ static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
3086 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT 1624 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
3087 }, 1625 },
3088 }, 1626 },
3089 .masters = omap3xxx_usbhsotg_masters,
3090 .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
3091 .slaves = omap3xxx_usbhsotg_slaves,
3092 .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
3093 .class = &usbotg_class, 1627 .class = &usbotg_class,
3094 1628
3095 /* 1629 /*
@@ -3121,15 +1655,10 @@ static struct omap_hwmod am35xx_usbhsotg_hwmod = {
3121 .omap2 = { 1655 .omap2 = {
3122 }, 1656 },
3123 }, 1657 },
3124 .masters = am35xx_usbhsotg_masters,
3125 .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
3126 .slaves = am35xx_usbhsotg_slaves,
3127 .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
3128 .class = &am35xx_usbotg_class, 1658 .class = &am35xx_usbotg_class,
3129}; 1659};
3130 1660
3131/* MMC/SD/SDIO common */ 1661/* MMC/SD/SDIO common */
3132
3133static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = { 1662static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
3134 .rev_offs = 0x1fc, 1663 .rev_offs = 0x1fc,
3135 .sysc_offs = 0x10, 1664 .sysc_offs = 0x10,
@@ -3163,10 +1692,6 @@ static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
3163 { .role = "dbck", .clk = "omap_32k_fck", }, 1692 { .role = "dbck", .clk = "omap_32k_fck", },
3164}; 1693};
3165 1694
3166static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
3167 &omap3xxx_l4_core__mmc1,
3168};
3169
3170static struct omap_mmc_dev_attr mmc1_dev_attr = { 1695static struct omap_mmc_dev_attr mmc1_dev_attr = {
3171 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, 1696 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3172}; 1697};
@@ -3194,8 +1719,6 @@ static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
3194 }, 1719 },
3195 }, 1720 },
3196 .dev_attr = &mmc1_pre_es3_dev_attr, 1721 .dev_attr = &mmc1_pre_es3_dev_attr,
3197 .slaves = omap3xxx_mmc1_slaves,
3198 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
3199 .class = &omap34xx_mmc_class, 1722 .class = &omap34xx_mmc_class,
3200}; 1723};
3201 1724
@@ -3216,8 +1739,6 @@ static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
3216 }, 1739 },
3217 }, 1740 },
3218 .dev_attr = &mmc1_dev_attr, 1741 .dev_attr = &mmc1_dev_attr,
3219 .slaves = omap3xxx_mmc1_slaves,
3220 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
3221 .class = &omap34xx_mmc_class, 1742 .class = &omap34xx_mmc_class,
3222}; 1743};
3223 1744
@@ -3238,10 +1759,6 @@ static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
3238 { .role = "dbck", .clk = "omap_32k_fck", }, 1759 { .role = "dbck", .clk = "omap_32k_fck", },
3239}; 1760};
3240 1761
3241static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
3242 &omap3xxx_l4_core__mmc2,
3243};
3244
3245/* See 35xx errata 2.1.1.128 in SPRZ278F */ 1762/* See 35xx errata 2.1.1.128 in SPRZ278F */
3246static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = { 1763static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
3247 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ, 1764 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
@@ -3264,8 +1781,6 @@ static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
3264 }, 1781 },
3265 }, 1782 },
3266 .dev_attr = &mmc2_pre_es3_dev_attr, 1783 .dev_attr = &mmc2_pre_es3_dev_attr,
3267 .slaves = omap3xxx_mmc2_slaves,
3268 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
3269 .class = &omap34xx_mmc_class, 1784 .class = &omap34xx_mmc_class,
3270}; 1785};
3271 1786
@@ -3285,8 +1800,6 @@ static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
3285 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT, 1800 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
3286 }, 1801 },
3287 }, 1802 },
3288 .slaves = omap3xxx_mmc2_slaves,
3289 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
3290 .class = &omap34xx_mmc_class, 1803 .class = &omap34xx_mmc_class,
3291}; 1804};
3292 1805
@@ -3307,10 +1820,6 @@ static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
3307 { .role = "dbck", .clk = "omap_32k_fck", }, 1820 { .role = "dbck", .clk = "omap_32k_fck", },
3308}; 1821};
3309 1822
3310static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
3311 &omap3xxx_l4_core__mmc3,
3312};
3313
3314static struct omap_hwmod omap3xxx_mmc3_hwmod = { 1823static struct omap_hwmod omap3xxx_mmc3_hwmod = {
3315 .name = "mmc3", 1824 .name = "mmc3",
3316 .mpu_irqs = omap34xx_mmc3_mpu_irqs, 1825 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
@@ -3326,8 +1835,6 @@ static struct omap_hwmod omap3xxx_mmc3_hwmod = {
3326 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT, 1835 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
3327 }, 1836 },
3328 }, 1837 },
3329 .slaves = omap3xxx_mmc3_slaves,
3330 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves),
3331 .class = &omap34xx_mmc_class, 1838 .class = &omap34xx_mmc_class,
3332}; 1839};
3333 1840
@@ -3335,12 +1842,6 @@ static struct omap_hwmod omap3xxx_mmc3_hwmod = {
3335 * 'usb_host_hs' class 1842 * 'usb_host_hs' class
3336 * high-speed multi-port usb host controller 1843 * high-speed multi-port usb host controller
3337 */ 1844 */
3338static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
3339 .master = &omap3xxx_usb_host_hs_hwmod,
3340 .slave = &omap3xxx_l3_main_hwmod,
3341 .clk = "core_l3_ick",
3342 .user = OCP_USER_MPU,
3343};
3344 1845
3345static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = { 1846static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
3346 .rev_offs = 0x0000, 1847 .rev_offs = 0x0000,
@@ -3359,42 +1860,6 @@ static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
3359 .sysc = &omap3xxx_usb_host_hs_sysc, 1860 .sysc = &omap3xxx_usb_host_hs_sysc,
3360}; 1861};
3361 1862
3362static struct omap_hwmod_ocp_if *omap3xxx_usb_host_hs_masters[] = {
3363 &omap3xxx_usb_host_hs__l3_main_2,
3364};
3365
3366static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
3367 {
3368 .name = "uhh",
3369 .pa_start = 0x48064000,
3370 .pa_end = 0x480643ff,
3371 .flags = ADDR_TYPE_RT
3372 },
3373 {
3374 .name = "ohci",
3375 .pa_start = 0x48064400,
3376 .pa_end = 0x480647ff,
3377 },
3378 {
3379 .name = "ehci",
3380 .pa_start = 0x48064800,
3381 .pa_end = 0x48064cff,
3382 },
3383 {}
3384};
3385
3386static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
3387 .master = &omap3xxx_l4_core_hwmod,
3388 .slave = &omap3xxx_usb_host_hs_hwmod,
3389 .clk = "usbhost_ick",
3390 .addr = omap3xxx_usb_host_hs_addrs,
3391 .user = OCP_USER_MPU | OCP_USER_SDMA,
3392};
3393
3394static struct omap_hwmod_ocp_if *omap3xxx_usb_host_hs_slaves[] = {
3395 &omap3xxx_l4_core__usb_host_hs,
3396};
3397
3398static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = { 1863static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
3399 { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", }, 1864 { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
3400}; 1865};
@@ -3423,10 +1888,6 @@ static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
3423 }, 1888 },
3424 .opt_clks = omap3xxx_usb_host_hs_opt_clks, 1889 .opt_clks = omap3xxx_usb_host_hs_opt_clks,
3425 .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks), 1890 .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
3426 .slaves = omap3xxx_usb_host_hs_slaves,
3427 .slaves_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_slaves),
3428 .masters = omap3xxx_usb_host_hs_masters,
3429 .masters_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_masters),
3430 1891
3431 /* 1892 /*
3432 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock 1893 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
@@ -3502,6 +1963,1084 @@ static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
3502 { .irq = -1 } 1963 { .irq = -1 }
3503}; 1964};
3504 1965
1966static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
1967 .name = "usb_tll_hs",
1968 .class = &omap3xxx_usb_tll_hs_hwmod_class,
1969 .clkdm_name = "l3_init_clkdm",
1970 .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
1971 .main_clk = "usbtll_fck",
1972 .prcm = {
1973 .omap2 = {
1974 .module_offs = CORE_MOD,
1975 .prcm_reg_id = 3,
1976 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1977 .idlest_reg_id = 3,
1978 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
1979 },
1980 },
1981};
1982
1983/*
1984 * interfaces
1985 */
1986
1987/* L3 -> L4_CORE interface */
1988static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
1989 .master = &omap3xxx_l3_main_hwmod,
1990 .slave = &omap3xxx_l4_core_hwmod,
1991 .user = OCP_USER_MPU | OCP_USER_SDMA,
1992};
1993
1994/* L3 -> L4_PER interface */
1995static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
1996 .master = &omap3xxx_l3_main_hwmod,
1997 .slave = &omap3xxx_l4_per_hwmod,
1998 .user = OCP_USER_MPU | OCP_USER_SDMA,
1999};
2000
2001static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
2002 {
2003 .pa_start = 0x68000000,
2004 .pa_end = 0x6800ffff,
2005 .flags = ADDR_TYPE_RT,
2006 },
2007 { }
2008};
2009
2010/* MPU -> L3 interface */
2011static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
2012 .master = &omap3xxx_mpu_hwmod,
2013 .slave = &omap3xxx_l3_main_hwmod,
2014 .addr = omap3xxx_l3_main_addrs,
2015 .user = OCP_USER_MPU,
2016};
2017
2018/* DSS -> l3 */
2019static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
2020 .master = &omap3430es1_dss_core_hwmod,
2021 .slave = &omap3xxx_l3_main_hwmod,
2022 .user = OCP_USER_MPU | OCP_USER_SDMA,
2023};
2024
2025static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
2026 .master = &omap3xxx_dss_core_hwmod,
2027 .slave = &omap3xxx_l3_main_hwmod,
2028 .fw = {
2029 .omap2 = {
2030 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
2031 .flags = OMAP_FIREWALL_L3,
2032 }
2033 },
2034 .user = OCP_USER_MPU | OCP_USER_SDMA,
2035};
2036
2037/* l3_core -> usbhsotg interface */
2038static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
2039 .master = &omap3xxx_usbhsotg_hwmod,
2040 .slave = &omap3xxx_l3_main_hwmod,
2041 .clk = "core_l3_ick",
2042 .user = OCP_USER_MPU,
2043};
2044
2045/* l3_core -> am35xx_usbhsotg interface */
2046static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
2047 .master = &am35xx_usbhsotg_hwmod,
2048 .slave = &omap3xxx_l3_main_hwmod,
2049 .clk = "core_l3_ick",
2050 .user = OCP_USER_MPU,
2051};
2052/* L4_CORE -> L4_WKUP interface */
2053static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
2054 .master = &omap3xxx_l4_core_hwmod,
2055 .slave = &omap3xxx_l4_wkup_hwmod,
2056 .user = OCP_USER_MPU | OCP_USER_SDMA,
2057};
2058
2059/* L4 CORE -> MMC1 interface */
2060static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
2061 .master = &omap3xxx_l4_core_hwmod,
2062 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
2063 .clk = "mmchs1_ick",
2064 .addr = omap2430_mmc1_addr_space,
2065 .user = OCP_USER_MPU | OCP_USER_SDMA,
2066 .flags = OMAP_FIREWALL_L4
2067};
2068
2069static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
2070 .master = &omap3xxx_l4_core_hwmod,
2071 .slave = &omap3xxx_es3plus_mmc1_hwmod,
2072 .clk = "mmchs1_ick",
2073 .addr = omap2430_mmc1_addr_space,
2074 .user = OCP_USER_MPU | OCP_USER_SDMA,
2075 .flags = OMAP_FIREWALL_L4
2076};
2077
2078/* L4 CORE -> MMC2 interface */
2079static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
2080 .master = &omap3xxx_l4_core_hwmod,
2081 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
2082 .clk = "mmchs2_ick",
2083 .addr = omap2430_mmc2_addr_space,
2084 .user = OCP_USER_MPU | OCP_USER_SDMA,
2085 .flags = OMAP_FIREWALL_L4
2086};
2087
2088static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
2089 .master = &omap3xxx_l4_core_hwmod,
2090 .slave = &omap3xxx_es3plus_mmc2_hwmod,
2091 .clk = "mmchs2_ick",
2092 .addr = omap2430_mmc2_addr_space,
2093 .user = OCP_USER_MPU | OCP_USER_SDMA,
2094 .flags = OMAP_FIREWALL_L4
2095};
2096
2097/* L4 CORE -> MMC3 interface */
2098static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
2099 {
2100 .pa_start = 0x480ad000,
2101 .pa_end = 0x480ad1ff,
2102 .flags = ADDR_TYPE_RT,
2103 },
2104 { }
2105};
2106
2107static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
2108 .master = &omap3xxx_l4_core_hwmod,
2109 .slave = &omap3xxx_mmc3_hwmod,
2110 .clk = "mmchs3_ick",
2111 .addr = omap3xxx_mmc3_addr_space,
2112 .user = OCP_USER_MPU | OCP_USER_SDMA,
2113 .flags = OMAP_FIREWALL_L4
2114};
2115
2116/* L4 CORE -> UART1 interface */
2117static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
2118 {
2119 .pa_start = OMAP3_UART1_BASE,
2120 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
2121 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2122 },
2123 { }
2124};
2125
2126static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
2127 .master = &omap3xxx_l4_core_hwmod,
2128 .slave = &omap3xxx_uart1_hwmod,
2129 .clk = "uart1_ick",
2130 .addr = omap3xxx_uart1_addr_space,
2131 .user = OCP_USER_MPU | OCP_USER_SDMA,
2132};
2133
2134/* L4 CORE -> UART2 interface */
2135static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
2136 {
2137 .pa_start = OMAP3_UART2_BASE,
2138 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
2139 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2140 },
2141 { }
2142};
2143
2144static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
2145 .master = &omap3xxx_l4_core_hwmod,
2146 .slave = &omap3xxx_uart2_hwmod,
2147 .clk = "uart2_ick",
2148 .addr = omap3xxx_uart2_addr_space,
2149 .user = OCP_USER_MPU | OCP_USER_SDMA,
2150};
2151
2152/* L4 PER -> UART3 interface */
2153static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
2154 {
2155 .pa_start = OMAP3_UART3_BASE,
2156 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
2157 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2158 },
2159 { }
2160};
2161
2162static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
2163 .master = &omap3xxx_l4_per_hwmod,
2164 .slave = &omap3xxx_uart3_hwmod,
2165 .clk = "uart3_ick",
2166 .addr = omap3xxx_uart3_addr_space,
2167 .user = OCP_USER_MPU | OCP_USER_SDMA,
2168};
2169
2170/* L4 PER -> UART4 interface */
2171static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
2172 {
2173 .pa_start = OMAP3_UART4_BASE,
2174 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
2175 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2176 },
2177 { }
2178};
2179
2180static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
2181 .master = &omap3xxx_l4_per_hwmod,
2182 .slave = &omap36xx_uart4_hwmod,
2183 .clk = "uart4_ick",
2184 .addr = omap36xx_uart4_addr_space,
2185 .user = OCP_USER_MPU | OCP_USER_SDMA,
2186};
2187
2188/* AM35xx: L4 CORE -> UART4 interface */
2189static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
2190 {
2191 .pa_start = OMAP3_UART4_AM35XX_BASE,
2192 .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
2193 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2194 },
2195};
2196
2197static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
2198 .master = &omap3xxx_l4_core_hwmod,
2199 .slave = &am35xx_uart4_hwmod,
2200 .clk = "uart4_ick",
2201 .addr = am35xx_uart4_addr_space,
2202 .user = OCP_USER_MPU | OCP_USER_SDMA,
2203};
2204
2205/* L4 CORE -> I2C1 interface */
2206static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
2207 .master = &omap3xxx_l4_core_hwmod,
2208 .slave = &omap3xxx_i2c1_hwmod,
2209 .clk = "i2c1_ick",
2210 .addr = omap2_i2c1_addr_space,
2211 .fw = {
2212 .omap2 = {
2213 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
2214 .l4_prot_group = 7,
2215 .flags = OMAP_FIREWALL_L4,
2216 }
2217 },
2218 .user = OCP_USER_MPU | OCP_USER_SDMA,
2219};
2220
2221/* L4 CORE -> I2C2 interface */
2222static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
2223 .master = &omap3xxx_l4_core_hwmod,
2224 .slave = &omap3xxx_i2c2_hwmod,
2225 .clk = "i2c2_ick",
2226 .addr = omap2_i2c2_addr_space,
2227 .fw = {
2228 .omap2 = {
2229 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
2230 .l4_prot_group = 7,
2231 .flags = OMAP_FIREWALL_L4,
2232 }
2233 },
2234 .user = OCP_USER_MPU | OCP_USER_SDMA,
2235};
2236
2237/* L4 CORE -> I2C3 interface */
2238static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
2239 {
2240 .pa_start = 0x48060000,
2241 .pa_end = 0x48060000 + SZ_128 - 1,
2242 .flags = ADDR_TYPE_RT,
2243 },
2244 { }
2245};
2246
2247static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
2248 .master = &omap3xxx_l4_core_hwmod,
2249 .slave = &omap3xxx_i2c3_hwmod,
2250 .clk = "i2c3_ick",
2251 .addr = omap3xxx_i2c3_addr_space,
2252 .fw = {
2253 .omap2 = {
2254 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
2255 .l4_prot_group = 7,
2256 .flags = OMAP_FIREWALL_L4,
2257 }
2258 },
2259 .user = OCP_USER_MPU | OCP_USER_SDMA,
2260};
2261
2262/* L4 CORE -> SR1 interface */
2263static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
2264 {
2265 .pa_start = OMAP34XX_SR1_BASE,
2266 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
2267 .flags = ADDR_TYPE_RT,
2268 },
2269 { }
2270};
2271
2272static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
2273 .master = &omap3xxx_l4_core_hwmod,
2274 .slave = &omap34xx_sr1_hwmod,
2275 .clk = "sr_l4_ick",
2276 .addr = omap3_sr1_addr_space,
2277 .user = OCP_USER_MPU,
2278};
2279
2280static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
2281 .master = &omap3xxx_l4_core_hwmod,
2282 .slave = &omap36xx_sr1_hwmod,
2283 .clk = "sr_l4_ick",
2284 .addr = omap3_sr1_addr_space,
2285 .user = OCP_USER_MPU,
2286};
2287
2288/* L4 CORE -> SR1 interface */
2289static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
2290 {
2291 .pa_start = OMAP34XX_SR2_BASE,
2292 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
2293 .flags = ADDR_TYPE_RT,
2294 },
2295 { }
2296};
2297
2298static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
2299 .master = &omap3xxx_l4_core_hwmod,
2300 .slave = &omap34xx_sr2_hwmod,
2301 .clk = "sr_l4_ick",
2302 .addr = omap3_sr2_addr_space,
2303 .user = OCP_USER_MPU,
2304};
2305
2306static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
2307 .master = &omap3xxx_l4_core_hwmod,
2308 .slave = &omap36xx_sr2_hwmod,
2309 .clk = "sr_l4_ick",
2310 .addr = omap3_sr2_addr_space,
2311 .user = OCP_USER_MPU,
2312};
2313
2314static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
2315 {
2316 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
2317 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
2318 .flags = ADDR_TYPE_RT
2319 },
2320 { }
2321};
2322
2323/* l4_core -> usbhsotg */
2324static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
2325 .master = &omap3xxx_l4_core_hwmod,
2326 .slave = &omap3xxx_usbhsotg_hwmod,
2327 .clk = "l4_ick",
2328 .addr = omap3xxx_usbhsotg_addrs,
2329 .user = OCP_USER_MPU,
2330};
2331
2332static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
2333 {
2334 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
2335 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
2336 .flags = ADDR_TYPE_RT
2337 },
2338 { }
2339};
2340
2341/* l4_core -> usbhsotg */
2342static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2343 .master = &omap3xxx_l4_core_hwmod,
2344 .slave = &am35xx_usbhsotg_hwmod,
2345 .clk = "l4_ick",
2346 .addr = am35xx_usbhsotg_addrs,
2347 .user = OCP_USER_MPU,
2348};
2349
2350/* L4_WKUP -> L4_SEC interface */
2351static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2352 .master = &omap3xxx_l4_wkup_hwmod,
2353 .slave = &omap3xxx_l4_sec_hwmod,
2354 .user = OCP_USER_MPU | OCP_USER_SDMA,
2355};
2356
2357/* IVA2 <- L3 interface */
2358static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2359 .master = &omap3xxx_l3_main_hwmod,
2360 .slave = &omap3xxx_iva_hwmod,
2361 .clk = "core_l3_ick",
2362 .user = OCP_USER_MPU | OCP_USER_SDMA,
2363};
2364
2365static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
2366 {
2367 .pa_start = 0x48318000,
2368 .pa_end = 0x48318000 + SZ_1K - 1,
2369 .flags = ADDR_TYPE_RT
2370 },
2371 { }
2372};
2373
2374/* l4_wkup -> timer1 */
2375static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2376 .master = &omap3xxx_l4_wkup_hwmod,
2377 .slave = &omap3xxx_timer1_hwmod,
2378 .clk = "gpt1_ick",
2379 .addr = omap3xxx_timer1_addrs,
2380 .user = OCP_USER_MPU | OCP_USER_SDMA,
2381};
2382
2383static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
2384 {
2385 .pa_start = 0x49032000,
2386 .pa_end = 0x49032000 + SZ_1K - 1,
2387 .flags = ADDR_TYPE_RT
2388 },
2389 { }
2390};
2391
2392/* l4_per -> timer2 */
2393static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2394 .master = &omap3xxx_l4_per_hwmod,
2395 .slave = &omap3xxx_timer2_hwmod,
2396 .clk = "gpt2_ick",
2397 .addr = omap3xxx_timer2_addrs,
2398 .user = OCP_USER_MPU | OCP_USER_SDMA,
2399};
2400
2401static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
2402 {
2403 .pa_start = 0x49034000,
2404 .pa_end = 0x49034000 + SZ_1K - 1,
2405 .flags = ADDR_TYPE_RT
2406 },
2407 { }
2408};
2409
2410/* l4_per -> timer3 */
2411static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
2412 .master = &omap3xxx_l4_per_hwmod,
2413 .slave = &omap3xxx_timer3_hwmod,
2414 .clk = "gpt3_ick",
2415 .addr = omap3xxx_timer3_addrs,
2416 .user = OCP_USER_MPU | OCP_USER_SDMA,
2417};
2418
2419static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
2420 {
2421 .pa_start = 0x49036000,
2422 .pa_end = 0x49036000 + SZ_1K - 1,
2423 .flags = ADDR_TYPE_RT
2424 },
2425 { }
2426};
2427
2428/* l4_per -> timer4 */
2429static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2430 .master = &omap3xxx_l4_per_hwmod,
2431 .slave = &omap3xxx_timer4_hwmod,
2432 .clk = "gpt4_ick",
2433 .addr = omap3xxx_timer4_addrs,
2434 .user = OCP_USER_MPU | OCP_USER_SDMA,
2435};
2436
2437static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
2438 {
2439 .pa_start = 0x49038000,
2440 .pa_end = 0x49038000 + SZ_1K - 1,
2441 .flags = ADDR_TYPE_RT
2442 },
2443 { }
2444};
2445
2446/* l4_per -> timer5 */
2447static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2448 .master = &omap3xxx_l4_per_hwmod,
2449 .slave = &omap3xxx_timer5_hwmod,
2450 .clk = "gpt5_ick",
2451 .addr = omap3xxx_timer5_addrs,
2452 .user = OCP_USER_MPU | OCP_USER_SDMA,
2453};
2454
2455static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
2456 {
2457 .pa_start = 0x4903A000,
2458 .pa_end = 0x4903A000 + SZ_1K - 1,
2459 .flags = ADDR_TYPE_RT
2460 },
2461 { }
2462};
2463
2464/* l4_per -> timer6 */
2465static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2466 .master = &omap3xxx_l4_per_hwmod,
2467 .slave = &omap3xxx_timer6_hwmod,
2468 .clk = "gpt6_ick",
2469 .addr = omap3xxx_timer6_addrs,
2470 .user = OCP_USER_MPU | OCP_USER_SDMA,
2471};
2472
2473static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
2474 {
2475 .pa_start = 0x4903C000,
2476 .pa_end = 0x4903C000 + SZ_1K - 1,
2477 .flags = ADDR_TYPE_RT
2478 },
2479 { }
2480};
2481
2482/* l4_per -> timer7 */
2483static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2484 .master = &omap3xxx_l4_per_hwmod,
2485 .slave = &omap3xxx_timer7_hwmod,
2486 .clk = "gpt7_ick",
2487 .addr = omap3xxx_timer7_addrs,
2488 .user = OCP_USER_MPU | OCP_USER_SDMA,
2489};
2490
2491static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
2492 {
2493 .pa_start = 0x4903E000,
2494 .pa_end = 0x4903E000 + SZ_1K - 1,
2495 .flags = ADDR_TYPE_RT
2496 },
2497 { }
2498};
2499
2500/* l4_per -> timer8 */
2501static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2502 .master = &omap3xxx_l4_per_hwmod,
2503 .slave = &omap3xxx_timer8_hwmod,
2504 .clk = "gpt8_ick",
2505 .addr = omap3xxx_timer8_addrs,
2506 .user = OCP_USER_MPU | OCP_USER_SDMA,
2507};
2508
2509static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
2510 {
2511 .pa_start = 0x49040000,
2512 .pa_end = 0x49040000 + SZ_1K - 1,
2513 .flags = ADDR_TYPE_RT
2514 },
2515 { }
2516};
2517
2518/* l4_per -> timer9 */
2519static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2520 .master = &omap3xxx_l4_per_hwmod,
2521 .slave = &omap3xxx_timer9_hwmod,
2522 .clk = "gpt9_ick",
2523 .addr = omap3xxx_timer9_addrs,
2524 .user = OCP_USER_MPU | OCP_USER_SDMA,
2525};
2526
2527/* l4_core -> timer10 */
2528static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2529 .master = &omap3xxx_l4_core_hwmod,
2530 .slave = &omap3xxx_timer10_hwmod,
2531 .clk = "gpt10_ick",
2532 .addr = omap2_timer10_addrs,
2533 .user = OCP_USER_MPU | OCP_USER_SDMA,
2534};
2535
2536/* l4_core -> timer11 */
2537static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2538 .master = &omap3xxx_l4_core_hwmod,
2539 .slave = &omap3xxx_timer11_hwmod,
2540 .clk = "gpt11_ick",
2541 .addr = omap2_timer11_addrs,
2542 .user = OCP_USER_MPU | OCP_USER_SDMA,
2543};
2544
2545static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
2546 {
2547 .pa_start = 0x48304000,
2548 .pa_end = 0x48304000 + SZ_1K - 1,
2549 .flags = ADDR_TYPE_RT
2550 },
2551 { }
2552};
2553
2554/* l4_core -> timer12 */
2555static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2556 .master = &omap3xxx_l4_sec_hwmod,
2557 .slave = &omap3xxx_timer12_hwmod,
2558 .clk = "gpt12_ick",
2559 .addr = omap3xxx_timer12_addrs,
2560 .user = OCP_USER_MPU | OCP_USER_SDMA,
2561};
2562
2563/* l4_wkup -> wd_timer2 */
2564static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
2565 {
2566 .pa_start = 0x48314000,
2567 .pa_end = 0x4831407f,
2568 .flags = ADDR_TYPE_RT
2569 },
2570 { }
2571};
2572
2573static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2574 .master = &omap3xxx_l4_wkup_hwmod,
2575 .slave = &omap3xxx_wd_timer2_hwmod,
2576 .clk = "wdt2_ick",
2577 .addr = omap3xxx_wd_timer2_addrs,
2578 .user = OCP_USER_MPU | OCP_USER_SDMA,
2579};
2580
2581/* l4_core -> dss */
2582static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
2583 .master = &omap3xxx_l4_core_hwmod,
2584 .slave = &omap3430es1_dss_core_hwmod,
2585 .clk = "dss_ick",
2586 .addr = omap2_dss_addrs,
2587 .fw = {
2588 .omap2 = {
2589 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2590 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2591 .flags = OMAP_FIREWALL_L4,
2592 }
2593 },
2594 .user = OCP_USER_MPU | OCP_USER_SDMA,
2595};
2596
2597static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
2598 .master = &omap3xxx_l4_core_hwmod,
2599 .slave = &omap3xxx_dss_core_hwmod,
2600 .clk = "dss_ick",
2601 .addr = omap2_dss_addrs,
2602 .fw = {
2603 .omap2 = {
2604 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2605 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2606 .flags = OMAP_FIREWALL_L4,
2607 }
2608 },
2609 .user = OCP_USER_MPU | OCP_USER_SDMA,
2610};
2611
2612/* l4_core -> dss_dispc */
2613static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
2614 .master = &omap3xxx_l4_core_hwmod,
2615 .slave = &omap3xxx_dss_dispc_hwmod,
2616 .clk = "dss_ick",
2617 .addr = omap2_dss_dispc_addrs,
2618 .fw = {
2619 .omap2 = {
2620 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2621 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2622 .flags = OMAP_FIREWALL_L4,
2623 }
2624 },
2625 .user = OCP_USER_MPU | OCP_USER_SDMA,
2626};
2627
2628static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
2629 {
2630 .pa_start = 0x4804FC00,
2631 .pa_end = 0x4804FFFF,
2632 .flags = ADDR_TYPE_RT
2633 },
2634 { }
2635};
2636
2637/* l4_core -> dss_dsi1 */
2638static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
2639 .master = &omap3xxx_l4_core_hwmod,
2640 .slave = &omap3xxx_dss_dsi1_hwmod,
2641 .clk = "dss_ick",
2642 .addr = omap3xxx_dss_dsi1_addrs,
2643 .fw = {
2644 .omap2 = {
2645 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2646 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2647 .flags = OMAP_FIREWALL_L4,
2648 }
2649 },
2650 .user = OCP_USER_MPU | OCP_USER_SDMA,
2651};
2652
2653/* l4_core -> dss_rfbi */
2654static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2655 .master = &omap3xxx_l4_core_hwmod,
2656 .slave = &omap3xxx_dss_rfbi_hwmod,
2657 .clk = "dss_ick",
2658 .addr = omap2_dss_rfbi_addrs,
2659 .fw = {
2660 .omap2 = {
2661 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2662 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2663 .flags = OMAP_FIREWALL_L4,
2664 }
2665 },
2666 .user = OCP_USER_MPU | OCP_USER_SDMA,
2667};
2668
2669/* l4_core -> dss_venc */
2670static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2671 .master = &omap3xxx_l4_core_hwmod,
2672 .slave = &omap3xxx_dss_venc_hwmod,
2673 .clk = "dss_ick",
2674 .addr = omap2_dss_venc_addrs,
2675 .fw = {
2676 .omap2 = {
2677 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2678 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2679 .flags = OMAP_FIREWALL_L4,
2680 }
2681 },
2682 .flags = OCPIF_SWSUP_IDLE,
2683 .user = OCP_USER_MPU | OCP_USER_SDMA,
2684};
2685
2686/* l4_wkup -> gpio1 */
2687static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
2688 {
2689 .pa_start = 0x48310000,
2690 .pa_end = 0x483101ff,
2691 .flags = ADDR_TYPE_RT
2692 },
2693 { }
2694};
2695
2696static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2697 .master = &omap3xxx_l4_wkup_hwmod,
2698 .slave = &omap3xxx_gpio1_hwmod,
2699 .addr = omap3xxx_gpio1_addrs,
2700 .user = OCP_USER_MPU | OCP_USER_SDMA,
2701};
2702
2703/* l4_per -> gpio2 */
2704static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
2705 {
2706 .pa_start = 0x49050000,
2707 .pa_end = 0x490501ff,
2708 .flags = ADDR_TYPE_RT
2709 },
2710 { }
2711};
2712
2713static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2714 .master = &omap3xxx_l4_per_hwmod,
2715 .slave = &omap3xxx_gpio2_hwmod,
2716 .addr = omap3xxx_gpio2_addrs,
2717 .user = OCP_USER_MPU | OCP_USER_SDMA,
2718};
2719
2720/* l4_per -> gpio3 */
2721static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
2722 {
2723 .pa_start = 0x49052000,
2724 .pa_end = 0x490521ff,
2725 .flags = ADDR_TYPE_RT
2726 },
2727 { }
2728};
2729
2730static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2731 .master = &omap3xxx_l4_per_hwmod,
2732 .slave = &omap3xxx_gpio3_hwmod,
2733 .addr = omap3xxx_gpio3_addrs,
2734 .user = OCP_USER_MPU | OCP_USER_SDMA,
2735};
2736
2737/* l4_per -> gpio4 */
2738static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
2739 {
2740 .pa_start = 0x49054000,
2741 .pa_end = 0x490541ff,
2742 .flags = ADDR_TYPE_RT
2743 },
2744 { }
2745};
2746
2747static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
2748 .master = &omap3xxx_l4_per_hwmod,
2749 .slave = &omap3xxx_gpio4_hwmod,
2750 .addr = omap3xxx_gpio4_addrs,
2751 .user = OCP_USER_MPU | OCP_USER_SDMA,
2752};
2753
2754/* l4_per -> gpio5 */
2755static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
2756 {
2757 .pa_start = 0x49056000,
2758 .pa_end = 0x490561ff,
2759 .flags = ADDR_TYPE_RT
2760 },
2761 { }
2762};
2763
2764static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
2765 .master = &omap3xxx_l4_per_hwmod,
2766 .slave = &omap3xxx_gpio5_hwmod,
2767 .addr = omap3xxx_gpio5_addrs,
2768 .user = OCP_USER_MPU | OCP_USER_SDMA,
2769};
2770
2771/* l4_per -> gpio6 */
2772static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
2773 {
2774 .pa_start = 0x49058000,
2775 .pa_end = 0x490581ff,
2776 .flags = ADDR_TYPE_RT
2777 },
2778 { }
2779};
2780
2781static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2782 .master = &omap3xxx_l4_per_hwmod,
2783 .slave = &omap3xxx_gpio6_hwmod,
2784 .addr = omap3xxx_gpio6_addrs,
2785 .user = OCP_USER_MPU | OCP_USER_SDMA,
2786};
2787
2788/* dma_system -> L3 */
2789static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2790 .master = &omap3xxx_dma_system_hwmod,
2791 .slave = &omap3xxx_l3_main_hwmod,
2792 .clk = "core_l3_ick",
2793 .user = OCP_USER_MPU | OCP_USER_SDMA,
2794};
2795
2796static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2797 {
2798 .pa_start = 0x48056000,
2799 .pa_end = 0x48056fff,
2800 .flags = ADDR_TYPE_RT
2801 },
2802 { }
2803};
2804
2805/* l4_cfg -> dma_system */
2806static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2807 .master = &omap3xxx_l4_core_hwmod,
2808 .slave = &omap3xxx_dma_system_hwmod,
2809 .clk = "core_l4_ick",
2810 .addr = omap3xxx_dma_system_addrs,
2811 .user = OCP_USER_MPU | OCP_USER_SDMA,
2812};
2813
2814static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
2815 {
2816 .name = "mpu",
2817 .pa_start = 0x48074000,
2818 .pa_end = 0x480740ff,
2819 .flags = ADDR_TYPE_RT
2820 },
2821 { }
2822};
2823
2824/* l4_core -> mcbsp1 */
2825static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2826 .master = &omap3xxx_l4_core_hwmod,
2827 .slave = &omap3xxx_mcbsp1_hwmod,
2828 .clk = "mcbsp1_ick",
2829 .addr = omap3xxx_mcbsp1_addrs,
2830 .user = OCP_USER_MPU | OCP_USER_SDMA,
2831};
2832
2833static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2834 {
2835 .name = "mpu",
2836 .pa_start = 0x49022000,
2837 .pa_end = 0x490220ff,
2838 .flags = ADDR_TYPE_RT
2839 },
2840 { }
2841};
2842
2843/* l4_per -> mcbsp2 */
2844static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2845 .master = &omap3xxx_l4_per_hwmod,
2846 .slave = &omap3xxx_mcbsp2_hwmod,
2847 .clk = "mcbsp2_ick",
2848 .addr = omap3xxx_mcbsp2_addrs,
2849 .user = OCP_USER_MPU | OCP_USER_SDMA,
2850};
2851
2852static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2853 {
2854 .name = "mpu",
2855 .pa_start = 0x49024000,
2856 .pa_end = 0x490240ff,
2857 .flags = ADDR_TYPE_RT
2858 },
2859 { }
2860};
2861
2862/* l4_per -> mcbsp3 */
2863static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2864 .master = &omap3xxx_l4_per_hwmod,
2865 .slave = &omap3xxx_mcbsp3_hwmod,
2866 .clk = "mcbsp3_ick",
2867 .addr = omap3xxx_mcbsp3_addrs,
2868 .user = OCP_USER_MPU | OCP_USER_SDMA,
2869};
2870
2871static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2872 {
2873 .name = "mpu",
2874 .pa_start = 0x49026000,
2875 .pa_end = 0x490260ff,
2876 .flags = ADDR_TYPE_RT
2877 },
2878 { }
2879};
2880
2881/* l4_per -> mcbsp4 */
2882static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2883 .master = &omap3xxx_l4_per_hwmod,
2884 .slave = &omap3xxx_mcbsp4_hwmod,
2885 .clk = "mcbsp4_ick",
2886 .addr = omap3xxx_mcbsp4_addrs,
2887 .user = OCP_USER_MPU | OCP_USER_SDMA,
2888};
2889
2890static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2891 {
2892 .name = "mpu",
2893 .pa_start = 0x48096000,
2894 .pa_end = 0x480960ff,
2895 .flags = ADDR_TYPE_RT
2896 },
2897 { }
2898};
2899
2900/* l4_core -> mcbsp5 */
2901static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2902 .master = &omap3xxx_l4_core_hwmod,
2903 .slave = &omap3xxx_mcbsp5_hwmod,
2904 .clk = "mcbsp5_ick",
2905 .addr = omap3xxx_mcbsp5_addrs,
2906 .user = OCP_USER_MPU | OCP_USER_SDMA,
2907};
2908
2909static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2910 {
2911 .name = "sidetone",
2912 .pa_start = 0x49028000,
2913 .pa_end = 0x490280ff,
2914 .flags = ADDR_TYPE_RT
2915 },
2916 { }
2917};
2918
2919/* l4_per -> mcbsp2_sidetone */
2920static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2921 .master = &omap3xxx_l4_per_hwmod,
2922 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2923 .clk = "mcbsp2_ick",
2924 .addr = omap3xxx_mcbsp2_sidetone_addrs,
2925 .user = OCP_USER_MPU,
2926};
2927
2928static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
2929 {
2930 .name = "sidetone",
2931 .pa_start = 0x4902A000,
2932 .pa_end = 0x4902A0ff,
2933 .flags = ADDR_TYPE_RT
2934 },
2935 { }
2936};
2937
2938/* l4_per -> mcbsp3_sidetone */
2939static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2940 .master = &omap3xxx_l4_per_hwmod,
2941 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2942 .clk = "mcbsp3_ick",
2943 .addr = omap3xxx_mcbsp3_sidetone_addrs,
2944 .user = OCP_USER_MPU,
2945};
2946
2947static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
2948 {
2949 .pa_start = 0x48094000,
2950 .pa_end = 0x480941ff,
2951 .flags = ADDR_TYPE_RT,
2952 },
2953 { }
2954};
2955
2956/* l4_core -> mailbox */
2957static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2958 .master = &omap3xxx_l4_core_hwmod,
2959 .slave = &omap3xxx_mailbox_hwmod,
2960 .addr = omap3xxx_mailbox_addrs,
2961 .user = OCP_USER_MPU | OCP_USER_SDMA,
2962};
2963
2964/* l4 core -> mcspi1 interface */
2965static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2966 .master = &omap3xxx_l4_core_hwmod,
2967 .slave = &omap34xx_mcspi1,
2968 .clk = "mcspi1_ick",
2969 .addr = omap2_mcspi1_addr_space,
2970 .user = OCP_USER_MPU | OCP_USER_SDMA,
2971};
2972
2973/* l4 core -> mcspi2 interface */
2974static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2975 .master = &omap3xxx_l4_core_hwmod,
2976 .slave = &omap34xx_mcspi2,
2977 .clk = "mcspi2_ick",
2978 .addr = omap2_mcspi2_addr_space,
2979 .user = OCP_USER_MPU | OCP_USER_SDMA,
2980};
2981
2982/* l4 core -> mcspi3 interface */
2983static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2984 .master = &omap3xxx_l4_core_hwmod,
2985 .slave = &omap34xx_mcspi3,
2986 .clk = "mcspi3_ick",
2987 .addr = omap2430_mcspi3_addr_space,
2988 .user = OCP_USER_MPU | OCP_USER_SDMA,
2989};
2990
2991/* l4 core -> mcspi4 interface */
2992static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
2993 {
2994 .pa_start = 0x480ba000,
2995 .pa_end = 0x480ba0ff,
2996 .flags = ADDR_TYPE_RT,
2997 },
2998 { }
2999};
3000
3001static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
3002 .master = &omap3xxx_l4_core_hwmod,
3003 .slave = &omap34xx_mcspi4,
3004 .clk = "mcspi4_ick",
3005 .addr = omap34xx_mcspi4_addr_space,
3006 .user = OCP_USER_MPU | OCP_USER_SDMA,
3007};
3008
3009static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
3010 .master = &omap3xxx_usb_host_hs_hwmod,
3011 .slave = &omap3xxx_l3_main_hwmod,
3012 .clk = "core_l3_ick",
3013 .user = OCP_USER_MPU,
3014};
3015
3016static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
3017 {
3018 .name = "uhh",
3019 .pa_start = 0x48064000,
3020 .pa_end = 0x480643ff,
3021 .flags = ADDR_TYPE_RT
3022 },
3023 {
3024 .name = "ohci",
3025 .pa_start = 0x48064400,
3026 .pa_end = 0x480647ff,
3027 },
3028 {
3029 .name = "ehci",
3030 .pa_start = 0x48064800,
3031 .pa_end = 0x48064cff,
3032 },
3033 {}
3034};
3035
3036static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
3037 .master = &omap3xxx_l4_core_hwmod,
3038 .slave = &omap3xxx_usb_host_hs_hwmod,
3039 .clk = "usbhost_ick",
3040 .addr = omap3xxx_usb_host_hs_addrs,
3041 .user = OCP_USER_MPU | OCP_USER_SDMA,
3042};
3043
3505static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = { 3044static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
3506 { 3045 {
3507 .name = "tll", 3046 .name = "tll",
@@ -3520,183 +3059,156 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
3520 .user = OCP_USER_MPU | OCP_USER_SDMA, 3059 .user = OCP_USER_MPU | OCP_USER_SDMA,
3521}; 3060};
3522 3061
3523static struct omap_hwmod_ocp_if *omap3xxx_usb_tll_hs_slaves[] = { 3062static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3524 &omap3xxx_l4_core__usb_tll_hs, 3063 &omap3xxx_l3_main__l4_core,
3525}; 3064 &omap3xxx_l3_main__l4_per,
3526 3065 &omap3xxx_mpu__l3_main,
3527static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = { 3066 &omap3xxx_l4_core__l4_wkup,
3528 .name = "usb_tll_hs", 3067 &omap3xxx_l4_core__mmc3,
3529 .class = &omap3xxx_usb_tll_hs_hwmod_class, 3068 &omap3_l4_core__uart1,
3530 .clkdm_name = "l3_init_clkdm", 3069 &omap3_l4_core__uart2,
3531 .mpu_irqs = omap3xxx_usb_tll_hs_irqs, 3070 &omap3_l4_per__uart3,
3532 .main_clk = "usbtll_fck", 3071 &omap3_l4_core__i2c1,
3533 .prcm = { 3072 &omap3_l4_core__i2c2,
3534 .omap2 = { 3073 &omap3_l4_core__i2c3,
3535 .module_offs = CORE_MOD, 3074 &omap3xxx_l4_wkup__l4_sec,
3536 .prcm_reg_id = 3, 3075 &omap3xxx_l4_wkup__timer1,
3537 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT, 3076 &omap3xxx_l4_per__timer2,
3538 .idlest_reg_id = 3, 3077 &omap3xxx_l4_per__timer3,
3539 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT, 3078 &omap3xxx_l4_per__timer4,
3540 }, 3079 &omap3xxx_l4_per__timer5,
3541 }, 3080 &omap3xxx_l4_per__timer6,
3542 .slaves = omap3xxx_usb_tll_hs_slaves, 3081 &omap3xxx_l4_per__timer7,
3543 .slaves_cnt = ARRAY_SIZE(omap3xxx_usb_tll_hs_slaves), 3082 &omap3xxx_l4_per__timer8,
3544}; 3083 &omap3xxx_l4_per__timer9,
3545 3084 &omap3xxx_l4_core__timer10,
3546static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { 3085 &omap3xxx_l4_core__timer11,
3547 &omap3xxx_l3_main_hwmod, 3086 &omap3xxx_l4_wkup__wd_timer2,
3548 &omap3xxx_l4_core_hwmod, 3087 &omap3xxx_l4_wkup__gpio1,
3549 &omap3xxx_l4_per_hwmod, 3088 &omap3xxx_l4_per__gpio2,
3550 &omap3xxx_l4_wkup_hwmod, 3089 &omap3xxx_l4_per__gpio3,
3551 &omap3xxx_mmc3_hwmod, 3090 &omap3xxx_l4_per__gpio4,
3552 &omap3xxx_mpu_hwmod, 3091 &omap3xxx_l4_per__gpio5,
3553 3092 &omap3xxx_l4_per__gpio6,
3554 &omap3xxx_timer1_hwmod, 3093 &omap3xxx_dma_system__l3,
3555 &omap3xxx_timer2_hwmod, 3094 &omap3xxx_l4_core__dma_system,
3556 &omap3xxx_timer3_hwmod, 3095 &omap3xxx_l4_core__mcbsp1,
3557 &omap3xxx_timer4_hwmod, 3096 &omap3xxx_l4_per__mcbsp2,
3558 &omap3xxx_timer5_hwmod, 3097 &omap3xxx_l4_per__mcbsp3,
3559 &omap3xxx_timer6_hwmod, 3098 &omap3xxx_l4_per__mcbsp4,
3560 &omap3xxx_timer7_hwmod, 3099 &omap3xxx_l4_core__mcbsp5,
3561 &omap3xxx_timer8_hwmod, 3100 &omap3xxx_l4_per__mcbsp2_sidetone,
3562 &omap3xxx_timer9_hwmod, 3101 &omap3xxx_l4_per__mcbsp3_sidetone,
3563 &omap3xxx_timer10_hwmod, 3102 &omap34xx_l4_core__mcspi1,
3564 &omap3xxx_timer11_hwmod, 3103 &omap34xx_l4_core__mcspi2,
3565 3104 &omap34xx_l4_core__mcspi3,
3566 &omap3xxx_wd_timer2_hwmod, 3105 &omap34xx_l4_core__mcspi4,
3567 &omap3xxx_uart1_hwmod,
3568 &omap3xxx_uart2_hwmod,
3569 &omap3xxx_uart3_hwmod,
3570
3571 /* i2c class */
3572 &omap3xxx_i2c1_hwmod,
3573 &omap3xxx_i2c2_hwmod,
3574 &omap3xxx_i2c3_hwmod,
3575
3576 /* gpio class */
3577 &omap3xxx_gpio1_hwmod,
3578 &omap3xxx_gpio2_hwmod,
3579 &omap3xxx_gpio3_hwmod,
3580 &omap3xxx_gpio4_hwmod,
3581 &omap3xxx_gpio5_hwmod,
3582 &omap3xxx_gpio6_hwmod,
3583
3584 /* dma_system class*/
3585 &omap3xxx_dma_system_hwmod,
3586
3587 /* mcbsp class */
3588 &omap3xxx_mcbsp1_hwmod,
3589 &omap3xxx_mcbsp2_hwmod,
3590 &omap3xxx_mcbsp3_hwmod,
3591 &omap3xxx_mcbsp4_hwmod,
3592 &omap3xxx_mcbsp5_hwmod,
3593 &omap3xxx_mcbsp2_sidetone_hwmod,
3594 &omap3xxx_mcbsp3_sidetone_hwmod,
3595
3596
3597 /* mcspi class */
3598 &omap34xx_mcspi1,
3599 &omap34xx_mcspi2,
3600 &omap34xx_mcspi3,
3601 &omap34xx_mcspi4,
3602
3603 NULL, 3106 NULL,
3604}; 3107};
3605 3108
3606/* GP-only hwmods */ 3109/* GP-only hwmod links */
3607static __initdata struct omap_hwmod *omap3xxx_gp_hwmods[] = { 3110static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
3608 &omap3xxx_timer12_hwmod, 3111 &omap3xxx_l4_sec__timer12,
3609 NULL 3112 NULL
3610}; 3113};
3611 3114
3612/* 3430ES1-only hwmods */ 3115/* 3430ES1-only hwmod links */
3613static __initdata struct omap_hwmod *omap3430es1_hwmods[] = { 3116static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
3614 &omap3430es1_dss_core_hwmod, 3117 &omap3430es1_dss__l3,
3118 &omap3430es1_l4_core__dss,
3615 NULL 3119 NULL
3616}; 3120};
3617 3121
3618/* 3430ES2+-only hwmods */ 3122/* 3430ES2+-only hwmod links */
3619static __initdata struct omap_hwmod *omap3430es2plus_hwmods[] = { 3123static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
3620 &omap3xxx_dss_core_hwmod, 3124 &omap3xxx_dss__l3,
3621 &omap3xxx_usbhsotg_hwmod, 3125 &omap3xxx_l4_core__dss,
3622 &omap3xxx_usb_host_hs_hwmod, 3126 &omap3xxx_usbhsotg__l3,
3623 &omap3xxx_usb_tll_hs_hwmod, 3127 &omap3xxx_l4_core__usbhsotg,
3128 &omap3xxx_usb_host_hs__l3_main_2,
3129 &omap3xxx_l4_core__usb_host_hs,
3130 &omap3xxx_l4_core__usb_tll_hs,
3624 NULL 3131 NULL
3625}; 3132};
3626 3133
3627/* <= 3430ES3-only hwmods */ 3134/* <= 3430ES3-only hwmod links */
3628static struct omap_hwmod *omap3430_pre_es3_hwmods[] __initdata = { 3135static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
3629 &omap3xxx_pre_es3_mmc1_hwmod, 3136 &omap3xxx_l4_core__pre_es3_mmc1,
3630 &omap3xxx_pre_es3_mmc2_hwmod, 3137 &omap3xxx_l4_core__pre_es3_mmc2,
3631 NULL 3138 NULL
3632}; 3139};
3633 3140
3634/* 3430ES3+-only hwmods */ 3141/* 3430ES3+-only hwmod links */
3635static struct omap_hwmod *omap3430_es3plus_hwmods[] __initdata = { 3142static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
3636 &omap3xxx_es3plus_mmc1_hwmod, 3143 &omap3xxx_l4_core__es3plus_mmc1,
3637 &omap3xxx_es3plus_mmc2_hwmod, 3144 &omap3xxx_l4_core__es3plus_mmc2,
3638 NULL 3145 NULL
3639}; 3146};
3640 3147
3641/* 34xx-only hwmods (all ES revisions) */ 3148/* 34xx-only hwmod links (all ES revisions) */
3642static __initdata struct omap_hwmod *omap34xx_hwmods[] = { 3149static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3643 &omap3xxx_iva_hwmod, 3150 &omap3xxx_l3__iva,
3644 &omap34xx_sr1_hwmod, 3151 &omap34xx_l4_core__sr1,
3645 &omap34xx_sr2_hwmod, 3152 &omap34xx_l4_core__sr2,
3646 &omap3xxx_mailbox_hwmod, 3153 &omap3xxx_l4_core__mailbox,
3647 NULL 3154 NULL
3648}; 3155};
3649 3156
3650/* 36xx-only hwmods (all ES revisions) */ 3157/* 36xx-only hwmod links (all ES revisions) */
3651static __initdata struct omap_hwmod *omap36xx_hwmods[] = { 3158static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3652 &omap3xxx_iva_hwmod, 3159 &omap3xxx_l3__iva,
3653 &omap3xxx_uart4_hwmod, 3160 &omap36xx_l4_per__uart4,
3654 &omap3xxx_dss_core_hwmod, 3161 &omap3xxx_dss__l3,
3655 &omap36xx_sr1_hwmod, 3162 &omap3xxx_l4_core__dss,
3656 &omap36xx_sr2_hwmod, 3163 &omap36xx_l4_core__sr1,
3657 &omap3xxx_usbhsotg_hwmod, 3164 &omap36xx_l4_core__sr2,
3658 &omap3xxx_mailbox_hwmod, 3165 &omap3xxx_usbhsotg__l3,
3659 &omap3xxx_usb_host_hs_hwmod, 3166 &omap3xxx_l4_core__usbhsotg,
3660 &omap3xxx_usb_tll_hs_hwmod, 3167 &omap3xxx_l4_core__mailbox,
3661 &omap3xxx_es3plus_mmc1_hwmod, 3168 &omap3xxx_usb_host_hs__l3_main_2,
3662 &omap3xxx_es3plus_mmc2_hwmod, 3169 &omap3xxx_l4_core__usb_host_hs,
3170 &omap3xxx_l4_core__usb_tll_hs,
3171 &omap3xxx_l4_core__es3plus_mmc1,
3172 &omap3xxx_l4_core__es3plus_mmc2,
3663 NULL 3173 NULL
3664}; 3174};
3665 3175
3666static __initdata struct omap_hwmod *am35xx_hwmods[] = { 3176static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
3667 &omap3xxx_dss_core_hwmod, /* XXX ??? */ 3177 &omap3xxx_dss__l3,
3668 &am35xx_usbhsotg_hwmod, 3178 &omap3xxx_l4_core__dss,
3669 &am35xx_uart4_hwmod, 3179 &am35xx_usbhsotg__l3,
3670 &omap3xxx_usb_host_hs_hwmod, 3180 &am35xx_l4_core__usbhsotg,
3671 &omap3xxx_usb_tll_hs_hwmod, 3181 &am35xx_l4_core__uart4,
3672 &omap3xxx_es3plus_mmc1_hwmod, 3182 &omap3xxx_usb_host_hs__l3_main_2,
3673 &omap3xxx_es3plus_mmc2_hwmod, 3183 &omap3xxx_l4_core__usb_host_hs,
3184 &omap3xxx_l4_core__usb_tll_hs,
3185 &omap3xxx_l4_core__es3plus_mmc1,
3186 &omap3xxx_l4_core__es3plus_mmc2,
3674 NULL 3187 NULL
3675}; 3188};
3676 3189
3677static __initdata struct omap_hwmod *omap3xxx_dss_hwmods[] = { 3190static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
3678 /* dss class */ 3191 &omap3xxx_l4_core__dss_dispc,
3679 &omap3xxx_dss_dispc_hwmod, 3192 &omap3xxx_l4_core__dss_dsi1,
3680 &omap3xxx_dss_dsi1_hwmod, 3193 &omap3xxx_l4_core__dss_rfbi,
3681 &omap3xxx_dss_rfbi_hwmod, 3194 &omap3xxx_l4_core__dss_venc,
3682 &omap3xxx_dss_venc_hwmod,
3683 NULL 3195 NULL
3684}; 3196};
3685 3197
3686int __init omap3xxx_hwmod_init(void) 3198int __init omap3xxx_hwmod_init(void)
3687{ 3199{
3688 int r; 3200 int r;
3689 struct omap_hwmod **h = NULL; 3201 struct omap_hwmod_ocp_if **h = NULL;
3690 unsigned int rev; 3202 unsigned int rev;
3691 3203
3692 /* Register hwmods common to all OMAP3 */ 3204 /* Register hwmod links common to all OMAP3 */
3693 r = omap_hwmod_register(omap3xxx_hwmods); 3205 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
3694 if (r < 0) 3206 if (r < 0)
3695 return r; 3207 return r;
3696 3208
3697 /* Register GP-only hwmods. */ 3209 /* Register GP-only hwmod links. */
3698 if (omap_type() == OMAP2_DEVICE_TYPE_GP) { 3210 if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
3699 r = omap_hwmod_register(omap3xxx_gp_hwmods); 3211 r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs);
3700 if (r < 0) 3212 if (r < 0)
3701 return r; 3213 return r;
3702 } 3214 }
@@ -3704,43 +3216,43 @@ int __init omap3xxx_hwmod_init(void)
3704 rev = omap_rev(); 3216 rev = omap_rev();
3705 3217
3706 /* 3218 /*
3707 * Register hwmods common to individual OMAP3 families, all 3219 * Register hwmod links common to individual OMAP3 families, all
3708 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx) 3220 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3709 * All possible revisions should be included in this conditional. 3221 * All possible revisions should be included in this conditional.
3710 */ 3222 */
3711 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 || 3223 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3712 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 || 3224 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3713 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) { 3225 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
3714 h = omap34xx_hwmods; 3226 h = omap34xx_hwmod_ocp_ifs;
3715 } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) { 3227 } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) {
3716 h = am35xx_hwmods; 3228 h = am35xx_hwmod_ocp_ifs;
3717 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 || 3229 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3718 rev == OMAP3630_REV_ES1_2) { 3230 rev == OMAP3630_REV_ES1_2) {
3719 h = omap36xx_hwmods; 3231 h = omap36xx_hwmod_ocp_ifs;
3720 } else { 3232 } else {
3721 WARN(1, "OMAP3 hwmod family init: unknown chip type\n"); 3233 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3722 return -EINVAL; 3234 return -EINVAL;
3723 }; 3235 };
3724 3236
3725 r = omap_hwmod_register(h); 3237 r = omap_hwmod_register_links(h);
3726 if (r < 0) 3238 if (r < 0)
3727 return r; 3239 return r;
3728 3240
3729 /* 3241 /*
3730 * Register hwmods specific to certain ES levels of a 3242 * Register hwmod links specific to certain ES levels of a
3731 * particular family of silicon (e.g., 34xx ES1.0) 3243 * particular family of silicon (e.g., 34xx ES1.0)
3732 */ 3244 */
3733 h = NULL; 3245 h = NULL;
3734 if (rev == OMAP3430_REV_ES1_0) { 3246 if (rev == OMAP3430_REV_ES1_0) {
3735 h = omap3430es1_hwmods; 3247 h = omap3430es1_hwmod_ocp_ifs;
3736 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 || 3248 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3737 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || 3249 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3738 rev == OMAP3430_REV_ES3_1_2) { 3250 rev == OMAP3430_REV_ES3_1_2) {
3739 h = omap3430es2plus_hwmods; 3251 h = omap3430es2plus_hwmod_ocp_ifs;
3740 }; 3252 };
3741 3253
3742 if (h) { 3254 if (h) {
3743 r = omap_hwmod_register(h); 3255 r = omap_hwmod_register_links(h);
3744 if (r < 0) 3256 if (r < 0)
3745 return r; 3257 return r;
3746 } 3258 }
@@ -3748,29 +3260,29 @@ int __init omap3xxx_hwmod_init(void)
3748 h = NULL; 3260 h = NULL;
3749 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 || 3261 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3750 rev == OMAP3430_REV_ES2_1) { 3262 rev == OMAP3430_REV_ES2_1) {
3751 h = omap3430_pre_es3_hwmods; 3263 h = omap3430_pre_es3_hwmod_ocp_ifs;
3752 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || 3264 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3753 rev == OMAP3430_REV_ES3_1_2) { 3265 rev == OMAP3430_REV_ES3_1_2) {
3754 h = omap3430_es3plus_hwmods; 3266 h = omap3430_es3plus_hwmod_ocp_ifs;
3755 }; 3267 };
3756 3268
3757 if (h) 3269 if (h)
3758 r = omap_hwmod_register(h); 3270 r = omap_hwmod_register_links(h);
3759 if (r < 0) 3271 if (r < 0)
3760 return r; 3272 return r;
3761 3273
3762 /* 3274 /*
3763 * DSS code presumes that dss_core hwmod is handled first, 3275 * DSS code presumes that dss_core hwmod is handled first,
3764 * _before_ any other DSS related hwmods so register common 3276 * _before_ any other DSS related hwmods so register common
3765 * DSS hwmods last to ensure that dss_core is already registered. 3277 * DSS hwmod links last to ensure that dss_core is already
3766 * Otherwise some change things may happen, for ex. if dispc 3278 * registered. Otherwise some change things may happen, for
3767 * is handled before dss_core and DSS is enabled in bootloader 3279 * ex. if dispc is handled before dss_core and DSS is enabled
3768 * DIPSC will be reset with outputs enabled which sometimes leads 3280 * in bootloader DISPC will be reset with outputs enabled
3769 * to unrecoverable L3 error. 3281 * which sometimes leads to unrecoverable L3 error. XXX The
3770 * XXX The long-term fix to this is to ensure modules are set up 3282 * long-term fix to this is to ensure hwmods are set up in
3771 * in dependency order in the hwmod core code. 3283 * dependency order in the hwmod core code.
3772 */ 3284 */
3773 r = omap_hwmod_register(omap3xxx_dss_hwmods); 3285 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
3774 3286
3775 return r; 3287 return r;
3776} 3288}
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index cc9bd106a854..0d91dec5b4bc 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Hardware modules present on the OMAP44xx chips 2 * Hardware modules present on the OMAP44xx chips
3 * 3 *
4 * Copyright (C) 2009-2011 Texas Instruments, Inc. 4 * Copyright (C) 2009-2012 Texas Instruments, Inc.
5 * Copyright (C) 2009-2010 Nokia Corporation 5 * Copyright (C) 2009-2010 Nokia Corporation
6 * 6 *
7 * Paul Walmsley 7 * Paul Walmsley
@@ -44,38 +44,10 @@
44#define OMAP44XX_IRQ_GIC_START 32 44#define OMAP44XX_IRQ_GIC_START 32
45 45
46/* Base offset for all OMAP4 dma requests */ 46/* Base offset for all OMAP4 dma requests */
47#define OMAP44XX_DMA_REQ_START 1 47#define OMAP44XX_DMA_REQ_START 1
48
49/* Backward references (IPs with Bus Master capability) */
50static struct omap_hwmod omap44xx_aess_hwmod;
51static struct omap_hwmod omap44xx_dma_system_hwmod;
52static struct omap_hwmod omap44xx_dmm_hwmod;
53static struct omap_hwmod omap44xx_dsp_hwmod;
54static struct omap_hwmod omap44xx_dss_hwmod;
55static struct omap_hwmod omap44xx_emif_fw_hwmod;
56static struct omap_hwmod omap44xx_hsi_hwmod;
57static struct omap_hwmod omap44xx_ipu_hwmod;
58static struct omap_hwmod omap44xx_iss_hwmod;
59static struct omap_hwmod omap44xx_iva_hwmod;
60static struct omap_hwmod omap44xx_l3_instr_hwmod;
61static struct omap_hwmod omap44xx_l3_main_1_hwmod;
62static struct omap_hwmod omap44xx_l3_main_2_hwmod;
63static struct omap_hwmod omap44xx_l3_main_3_hwmod;
64static struct omap_hwmod omap44xx_l4_abe_hwmod;
65static struct omap_hwmod omap44xx_l4_cfg_hwmod;
66static struct omap_hwmod omap44xx_l4_per_hwmod;
67static struct omap_hwmod omap44xx_l4_wkup_hwmod;
68static struct omap_hwmod omap44xx_mmc1_hwmod;
69static struct omap_hwmod omap44xx_mmc2_hwmod;
70static struct omap_hwmod omap44xx_mpu_hwmod;
71static struct omap_hwmod omap44xx_mpu_private_hwmod;
72static struct omap_hwmod omap44xx_usb_otg_hs_hwmod;
73static struct omap_hwmod omap44xx_usb_host_hs_hwmod;
74static struct omap_hwmod omap44xx_usb_tll_hs_hwmod;
75 48
76/* 49/*
77 * Interconnects omap_hwmod structures 50 * IP blocks
78 * hwmods that compose the global OMAP interconnect
79 */ 51 */
80 52
81/* 53/*
@@ -92,51 +64,17 @@ static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
92 { .irq = -1 } 64 { .irq = -1 }
93}; 65};
94 66
95/* l3_main_1 -> dmm */
96static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
97 .master = &omap44xx_l3_main_1_hwmod,
98 .slave = &omap44xx_dmm_hwmod,
99 .clk = "l3_div_ck",
100 .user = OCP_USER_SDMA,
101};
102
103static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
104 {
105 .pa_start = 0x4e000000,
106 .pa_end = 0x4e0007ff,
107 .flags = ADDR_TYPE_RT
108 },
109 { }
110};
111
112/* mpu -> dmm */
113static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
114 .master = &omap44xx_mpu_hwmod,
115 .slave = &omap44xx_dmm_hwmod,
116 .clk = "l3_div_ck",
117 .addr = omap44xx_dmm_addrs,
118 .user = OCP_USER_MPU,
119};
120
121/* dmm slave ports */
122static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
123 &omap44xx_l3_main_1__dmm,
124 &omap44xx_mpu__dmm,
125};
126
127static struct omap_hwmod omap44xx_dmm_hwmod = { 67static struct omap_hwmod omap44xx_dmm_hwmod = {
128 .name = "dmm", 68 .name = "dmm",
129 .class = &omap44xx_dmm_hwmod_class, 69 .class = &omap44xx_dmm_hwmod_class,
130 .clkdm_name = "l3_emif_clkdm", 70 .clkdm_name = "l3_emif_clkdm",
71 .mpu_irqs = omap44xx_dmm_irqs,
131 .prcm = { 72 .prcm = {
132 .omap4 = { 73 .omap4 = {
133 .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET, 74 .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET,
134 .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET, 75 .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET,
135 }, 76 },
136 }, 77 },
137 .slaves = omap44xx_dmm_slaves,
138 .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves),
139 .mpu_irqs = omap44xx_dmm_irqs,
140}; 78};
141 79
142/* 80/*
@@ -148,38 +86,6 @@ static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
148}; 86};
149 87
150/* emif_fw */ 88/* emif_fw */
151/* dmm -> emif_fw */
152static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
153 .master = &omap44xx_dmm_hwmod,
154 .slave = &omap44xx_emif_fw_hwmod,
155 .clk = "l3_div_ck",
156 .user = OCP_USER_MPU | OCP_USER_SDMA,
157};
158
159static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
160 {
161 .pa_start = 0x4a20c000,
162 .pa_end = 0x4a20c0ff,
163 .flags = ADDR_TYPE_RT
164 },
165 { }
166};
167
168/* l4_cfg -> emif_fw */
169static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
170 .master = &omap44xx_l4_cfg_hwmod,
171 .slave = &omap44xx_emif_fw_hwmod,
172 .clk = "l4_div_ck",
173 .addr = omap44xx_emif_fw_addrs,
174 .user = OCP_USER_MPU,
175};
176
177/* emif_fw slave ports */
178static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = {
179 &omap44xx_dmm__emif_fw,
180 &omap44xx_l4_cfg__emif_fw,
181};
182
183static struct omap_hwmod omap44xx_emif_fw_hwmod = { 89static struct omap_hwmod omap44xx_emif_fw_hwmod = {
184 .name = "emif_fw", 90 .name = "emif_fw",
185 .class = &omap44xx_emif_fw_hwmod_class, 91 .class = &omap44xx_emif_fw_hwmod_class,
@@ -190,8 +96,6 @@ static struct omap_hwmod omap44xx_emif_fw_hwmod = {
190 .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET, 96 .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET,
191 }, 97 },
192 }, 98 },
193 .slaves = omap44xx_emif_fw_slaves,
194 .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves),
195}; 99};
196 100
197/* 101/*
@@ -203,28 +107,6 @@ static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
203}; 107};
204 108
205/* l3_instr */ 109/* l3_instr */
206/* iva -> l3_instr */
207static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
208 .master = &omap44xx_iva_hwmod,
209 .slave = &omap44xx_l3_instr_hwmod,
210 .clk = "l3_div_ck",
211 .user = OCP_USER_MPU | OCP_USER_SDMA,
212};
213
214/* l3_main_3 -> l3_instr */
215static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
216 .master = &omap44xx_l3_main_3_hwmod,
217 .slave = &omap44xx_l3_instr_hwmod,
218 .clk = "l3_div_ck",
219 .user = OCP_USER_MPU | OCP_USER_SDMA,
220};
221
222/* l3_instr slave ports */
223static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = {
224 &omap44xx_iva__l3_instr,
225 &omap44xx_l3_main_3__l3_instr,
226};
227
228static struct omap_hwmod omap44xx_l3_instr_hwmod = { 110static struct omap_hwmod omap44xx_l3_instr_hwmod = {
229 .name = "l3_instr", 111 .name = "l3_instr",
230 .class = &omap44xx_l3_hwmod_class, 112 .class = &omap44xx_l3_hwmod_class,
@@ -236,8 +118,6 @@ static struct omap_hwmod omap44xx_l3_instr_hwmod = {
236 .modulemode = MODULEMODE_HWCTRL, 118 .modulemode = MODULEMODE_HWCTRL,
237 }, 119 },
238 }, 120 },
239 .slaves = omap44xx_l3_instr_slaves,
240 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves),
241}; 121};
242 122
243/* l3_main_1 */ 123/* l3_main_1 */
@@ -247,83 +127,6 @@ static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = {
247 { .irq = -1 } 127 { .irq = -1 }
248}; 128};
249 129
250/* dsp -> l3_main_1 */
251static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
252 .master = &omap44xx_dsp_hwmod,
253 .slave = &omap44xx_l3_main_1_hwmod,
254 .clk = "l3_div_ck",
255 .user = OCP_USER_MPU | OCP_USER_SDMA,
256};
257
258/* dss -> l3_main_1 */
259static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = {
260 .master = &omap44xx_dss_hwmod,
261 .slave = &omap44xx_l3_main_1_hwmod,
262 .clk = "l3_div_ck",
263 .user = OCP_USER_MPU | OCP_USER_SDMA,
264};
265
266/* l3_main_2 -> l3_main_1 */
267static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
268 .master = &omap44xx_l3_main_2_hwmod,
269 .slave = &omap44xx_l3_main_1_hwmod,
270 .clk = "l3_div_ck",
271 .user = OCP_USER_MPU | OCP_USER_SDMA,
272};
273
274/* l4_cfg -> l3_main_1 */
275static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
276 .master = &omap44xx_l4_cfg_hwmod,
277 .slave = &omap44xx_l3_main_1_hwmod,
278 .clk = "l4_div_ck",
279 .user = OCP_USER_MPU | OCP_USER_SDMA,
280};
281
282/* mmc1 -> l3_main_1 */
283static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = {
284 .master = &omap44xx_mmc1_hwmod,
285 .slave = &omap44xx_l3_main_1_hwmod,
286 .clk = "l3_div_ck",
287 .user = OCP_USER_MPU | OCP_USER_SDMA,
288};
289
290/* mmc2 -> l3_main_1 */
291static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
292 .master = &omap44xx_mmc2_hwmod,
293 .slave = &omap44xx_l3_main_1_hwmod,
294 .clk = "l3_div_ck",
295 .user = OCP_USER_MPU | OCP_USER_SDMA,
296};
297
298static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
299 {
300 .pa_start = 0x44000000,
301 .pa_end = 0x44000fff,
302 .flags = ADDR_TYPE_RT
303 },
304 { }
305};
306
307/* mpu -> l3_main_1 */
308static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
309 .master = &omap44xx_mpu_hwmod,
310 .slave = &omap44xx_l3_main_1_hwmod,
311 .clk = "l3_div_ck",
312 .addr = omap44xx_l3_main_1_addrs,
313 .user = OCP_USER_MPU,
314};
315
316/* l3_main_1 slave ports */
317static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
318 &omap44xx_dsp__l3_main_1,
319 &omap44xx_dss__l3_main_1,
320 &omap44xx_l3_main_2__l3_main_1,
321 &omap44xx_l4_cfg__l3_main_1,
322 &omap44xx_mmc1__l3_main_1,
323 &omap44xx_mmc2__l3_main_1,
324 &omap44xx_mpu__l3_main_1,
325};
326
327static struct omap_hwmod omap44xx_l3_main_1_hwmod = { 130static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
328 .name = "l3_main_1", 131 .name = "l3_main_1",
329 .class = &omap44xx_l3_hwmod_class, 132 .class = &omap44xx_l3_hwmod_class,
@@ -335,97 +138,9 @@ static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
335 .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET, 138 .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET,
336 }, 139 },
337 }, 140 },
338 .slaves = omap44xx_l3_main_1_slaves,
339 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
340}; 141};
341 142
342/* l3_main_2 */ 143/* l3_main_2 */
343/* dma_system -> l3_main_2 */
344static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
345 .master = &omap44xx_dma_system_hwmod,
346 .slave = &omap44xx_l3_main_2_hwmod,
347 .clk = "l3_div_ck",
348 .user = OCP_USER_MPU | OCP_USER_SDMA,
349};
350
351/* hsi -> l3_main_2 */
352static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = {
353 .master = &omap44xx_hsi_hwmod,
354 .slave = &omap44xx_l3_main_2_hwmod,
355 .clk = "l3_div_ck",
356 .user = OCP_USER_MPU | OCP_USER_SDMA,
357};
358
359/* ipu -> l3_main_2 */
360static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = {
361 .master = &omap44xx_ipu_hwmod,
362 .slave = &omap44xx_l3_main_2_hwmod,
363 .clk = "l3_div_ck",
364 .user = OCP_USER_MPU | OCP_USER_SDMA,
365};
366
367/* iss -> l3_main_2 */
368static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = {
369 .master = &omap44xx_iss_hwmod,
370 .slave = &omap44xx_l3_main_2_hwmod,
371 .clk = "l3_div_ck",
372 .user = OCP_USER_MPU | OCP_USER_SDMA,
373};
374
375/* iva -> l3_main_2 */
376static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = {
377 .master = &omap44xx_iva_hwmod,
378 .slave = &omap44xx_l3_main_2_hwmod,
379 .clk = "l3_div_ck",
380 .user = OCP_USER_MPU | OCP_USER_SDMA,
381};
382
383static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
384 {
385 .pa_start = 0x44800000,
386 .pa_end = 0x44801fff,
387 .flags = ADDR_TYPE_RT
388 },
389 { }
390};
391
392/* l3_main_1 -> l3_main_2 */
393static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
394 .master = &omap44xx_l3_main_1_hwmod,
395 .slave = &omap44xx_l3_main_2_hwmod,
396 .clk = "l3_div_ck",
397 .addr = omap44xx_l3_main_2_addrs,
398 .user = OCP_USER_MPU,
399};
400
401/* l4_cfg -> l3_main_2 */
402static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
403 .master = &omap44xx_l4_cfg_hwmod,
404 .slave = &omap44xx_l3_main_2_hwmod,
405 .clk = "l4_div_ck",
406 .user = OCP_USER_MPU | OCP_USER_SDMA,
407};
408
409/* usb_otg_hs -> l3_main_2 */
410static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = {
411 .master = &omap44xx_usb_otg_hs_hwmod,
412 .slave = &omap44xx_l3_main_2_hwmod,
413 .clk = "l3_div_ck",
414 .user = OCP_USER_MPU | OCP_USER_SDMA,
415};
416
417/* l3_main_2 slave ports */
418static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
419 &omap44xx_dma_system__l3_main_2,
420 &omap44xx_hsi__l3_main_2,
421 &omap44xx_ipu__l3_main_2,
422 &omap44xx_iss__l3_main_2,
423 &omap44xx_iva__l3_main_2,
424 &omap44xx_l3_main_1__l3_main_2,
425 &omap44xx_l4_cfg__l3_main_2,
426 &omap44xx_usb_otg_hs__l3_main_2,
427};
428
429static struct omap_hwmod omap44xx_l3_main_2_hwmod = { 144static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
430 .name = "l3_main_2", 145 .name = "l3_main_2",
431 .class = &omap44xx_l3_hwmod_class, 146 .class = &omap44xx_l3_hwmod_class,
@@ -436,52 +151,9 @@ static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
436 .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET, 151 .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET,
437 }, 152 },
438 }, 153 },
439 .slaves = omap44xx_l3_main_2_slaves,
440 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves),
441}; 154};
442 155
443/* l3_main_3 */ 156/* l3_main_3 */
444static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
445 {
446 .pa_start = 0x45000000,
447 .pa_end = 0x45000fff,
448 .flags = ADDR_TYPE_RT
449 },
450 { }
451};
452
453/* l3_main_1 -> l3_main_3 */
454static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
455 .master = &omap44xx_l3_main_1_hwmod,
456 .slave = &omap44xx_l3_main_3_hwmod,
457 .clk = "l3_div_ck",
458 .addr = omap44xx_l3_main_3_addrs,
459 .user = OCP_USER_MPU,
460};
461
462/* l3_main_2 -> l3_main_3 */
463static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
464 .master = &omap44xx_l3_main_2_hwmod,
465 .slave = &omap44xx_l3_main_3_hwmod,
466 .clk = "l3_div_ck",
467 .user = OCP_USER_MPU | OCP_USER_SDMA,
468};
469
470/* l4_cfg -> l3_main_3 */
471static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
472 .master = &omap44xx_l4_cfg_hwmod,
473 .slave = &omap44xx_l3_main_3_hwmod,
474 .clk = "l4_div_ck",
475 .user = OCP_USER_MPU | OCP_USER_SDMA,
476};
477
478/* l3_main_3 slave ports */
479static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = {
480 &omap44xx_l3_main_1__l3_main_3,
481 &omap44xx_l3_main_2__l3_main_3,
482 &omap44xx_l4_cfg__l3_main_3,
483};
484
485static struct omap_hwmod omap44xx_l3_main_3_hwmod = { 157static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
486 .name = "l3_main_3", 158 .name = "l3_main_3",
487 .class = &omap44xx_l3_hwmod_class, 159 .class = &omap44xx_l3_hwmod_class,
@@ -493,8 +165,6 @@ static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
493 .modulemode = MODULEMODE_HWCTRL, 165 .modulemode = MODULEMODE_HWCTRL,
494 }, 166 },
495 }, 167 },
496 .slaves = omap44xx_l3_main_3_slaves,
497 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves),
498}; 168};
499 169
500/* 170/*
@@ -506,46 +176,6 @@ static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
506}; 176};
507 177
508/* l4_abe */ 178/* l4_abe */
509/* aess -> l4_abe */
510static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = {
511 .master = &omap44xx_aess_hwmod,
512 .slave = &omap44xx_l4_abe_hwmod,
513 .clk = "ocp_abe_iclk",
514 .user = OCP_USER_MPU | OCP_USER_SDMA,
515};
516
517/* dsp -> l4_abe */
518static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
519 .master = &omap44xx_dsp_hwmod,
520 .slave = &omap44xx_l4_abe_hwmod,
521 .clk = "ocp_abe_iclk",
522 .user = OCP_USER_MPU | OCP_USER_SDMA,
523};
524
525/* l3_main_1 -> l4_abe */
526static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
527 .master = &omap44xx_l3_main_1_hwmod,
528 .slave = &omap44xx_l4_abe_hwmod,
529 .clk = "l3_div_ck",
530 .user = OCP_USER_MPU | OCP_USER_SDMA,
531};
532
533/* mpu -> l4_abe */
534static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
535 .master = &omap44xx_mpu_hwmod,
536 .slave = &omap44xx_l4_abe_hwmod,
537 .clk = "ocp_abe_iclk",
538 .user = OCP_USER_MPU | OCP_USER_SDMA,
539};
540
541/* l4_abe slave ports */
542static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = {
543 &omap44xx_aess__l4_abe,
544 &omap44xx_dsp__l4_abe,
545 &omap44xx_l3_main_1__l4_abe,
546 &omap44xx_mpu__l4_abe,
547};
548
549static struct omap_hwmod omap44xx_l4_abe_hwmod = { 179static struct omap_hwmod omap44xx_l4_abe_hwmod = {
550 .name = "l4_abe", 180 .name = "l4_abe",
551 .class = &omap44xx_l4_hwmod_class, 181 .class = &omap44xx_l4_hwmod_class,
@@ -555,24 +185,9 @@ static struct omap_hwmod omap44xx_l4_abe_hwmod = {
555 .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET, 185 .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET,
556 }, 186 },
557 }, 187 },
558 .slaves = omap44xx_l4_abe_slaves,
559 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves),
560}; 188};
561 189
562/* l4_cfg */ 190/* l4_cfg */
563/* l3_main_1 -> l4_cfg */
564static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
565 .master = &omap44xx_l3_main_1_hwmod,
566 .slave = &omap44xx_l4_cfg_hwmod,
567 .clk = "l3_div_ck",
568 .user = OCP_USER_MPU | OCP_USER_SDMA,
569};
570
571/* l4_cfg slave ports */
572static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = {
573 &omap44xx_l3_main_1__l4_cfg,
574};
575
576static struct omap_hwmod omap44xx_l4_cfg_hwmod = { 191static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
577 .name = "l4_cfg", 192 .name = "l4_cfg",
578 .class = &omap44xx_l4_hwmod_class, 193 .class = &omap44xx_l4_hwmod_class,
@@ -583,24 +198,9 @@ static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
583 .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET, 198 .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
584 }, 199 },
585 }, 200 },
586 .slaves = omap44xx_l4_cfg_slaves,
587 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves),
588}; 201};
589 202
590/* l4_per */ 203/* l4_per */
591/* l3_main_2 -> l4_per */
592static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
593 .master = &omap44xx_l3_main_2_hwmod,
594 .slave = &omap44xx_l4_per_hwmod,
595 .clk = "l3_div_ck",
596 .user = OCP_USER_MPU | OCP_USER_SDMA,
597};
598
599/* l4_per slave ports */
600static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = {
601 &omap44xx_l3_main_2__l4_per,
602};
603
604static struct omap_hwmod omap44xx_l4_per_hwmod = { 204static struct omap_hwmod omap44xx_l4_per_hwmod = {
605 .name = "l4_per", 205 .name = "l4_per",
606 .class = &omap44xx_l4_hwmod_class, 206 .class = &omap44xx_l4_hwmod_class,
@@ -611,24 +211,9 @@ static struct omap_hwmod omap44xx_l4_per_hwmod = {
611 .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET, 211 .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET,
612 }, 212 },
613 }, 213 },
614 .slaves = omap44xx_l4_per_slaves,
615 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves),
616}; 214};
617 215
618/* l4_wkup */ 216/* l4_wkup */
619/* l4_cfg -> l4_wkup */
620static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
621 .master = &omap44xx_l4_cfg_hwmod,
622 .slave = &omap44xx_l4_wkup_hwmod,
623 .clk = "l4_div_ck",
624 .user = OCP_USER_MPU | OCP_USER_SDMA,
625};
626
627/* l4_wkup slave ports */
628static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = {
629 &omap44xx_l4_cfg__l4_wkup,
630};
631
632static struct omap_hwmod omap44xx_l4_wkup_hwmod = { 217static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
633 .name = "l4_wkup", 218 .name = "l4_wkup",
634 .class = &omap44xx_l4_hwmod_class, 219 .class = &omap44xx_l4_hwmod_class,
@@ -639,8 +224,6 @@ static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
639 .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET, 224 .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET,
640 }, 225 },
641 }, 226 },
642 .slaves = omap44xx_l4_wkup_slaves,
643 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves),
644}; 227};
645 228
646/* 229/*
@@ -652,25 +235,10 @@ static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
652}; 235};
653 236
654/* mpu_private */ 237/* mpu_private */
655/* mpu -> mpu_private */
656static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
657 .master = &omap44xx_mpu_hwmod,
658 .slave = &omap44xx_mpu_private_hwmod,
659 .clk = "l3_div_ck",
660 .user = OCP_USER_MPU | OCP_USER_SDMA,
661};
662
663/* mpu_private slave ports */
664static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = {
665 &omap44xx_mpu__mpu_private,
666};
667
668static struct omap_hwmod omap44xx_mpu_private_hwmod = { 238static struct omap_hwmod omap44xx_mpu_private_hwmod = {
669 .name = "mpu_private", 239 .name = "mpu_private",
670 .class = &omap44xx_mpu_bus_hwmod_class, 240 .class = &omap44xx_mpu_bus_hwmod_class,
671 .clkdm_name = "mpuss_clkdm", 241 .clkdm_name = "mpuss_clkdm",
672 .slaves = omap44xx_mpu_private_slaves,
673 .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves),
674}; 242};
675 243
676/* 244/*
@@ -756,53 +324,6 @@ static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
756 { .dma_req = -1 } 324 { .dma_req = -1 }
757}; 325};
758 326
759/* aess master ports */
760static struct omap_hwmod_ocp_if *omap44xx_aess_masters[] = {
761 &omap44xx_aess__l4_abe,
762};
763
764static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
765 {
766 .pa_start = 0x401f1000,
767 .pa_end = 0x401f13ff,
768 .flags = ADDR_TYPE_RT
769 },
770 { }
771};
772
773/* l4_abe -> aess */
774static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
775 .master = &omap44xx_l4_abe_hwmod,
776 .slave = &omap44xx_aess_hwmod,
777 .clk = "ocp_abe_iclk",
778 .addr = omap44xx_aess_addrs,
779 .user = OCP_USER_MPU,
780};
781
782static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
783 {
784 .pa_start = 0x490f1000,
785 .pa_end = 0x490f13ff,
786 .flags = ADDR_TYPE_RT
787 },
788 { }
789};
790
791/* l4_abe -> aess (dma) */
792static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
793 .master = &omap44xx_l4_abe_hwmod,
794 .slave = &omap44xx_aess_hwmod,
795 .clk = "ocp_abe_iclk",
796 .addr = omap44xx_aess_dma_addrs,
797 .user = OCP_USER_SDMA,
798};
799
800/* aess slave ports */
801static struct omap_hwmod_ocp_if *omap44xx_aess_slaves[] = {
802 &omap44xx_l4_abe__aess,
803 &omap44xx_l4_abe__aess_dma,
804};
805
806static struct omap_hwmod omap44xx_aess_hwmod = { 327static struct omap_hwmod omap44xx_aess_hwmod = {
807 .name = "aess", 328 .name = "aess",
808 .class = &omap44xx_aess_hwmod_class, 329 .class = &omap44xx_aess_hwmod_class,
@@ -817,37 +338,6 @@ static struct omap_hwmod omap44xx_aess_hwmod = {
817 .modulemode = MODULEMODE_SWCTRL, 338 .modulemode = MODULEMODE_SWCTRL,
818 }, 339 },
819 }, 340 },
820 .slaves = omap44xx_aess_slaves,
821 .slaves_cnt = ARRAY_SIZE(omap44xx_aess_slaves),
822 .masters = omap44xx_aess_masters,
823 .masters_cnt = ARRAY_SIZE(omap44xx_aess_masters),
824};
825
826/*
827 * 'bandgap' class
828 * bangap reference for ldo regulators
829 */
830
831static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = {
832 .name = "bandgap",
833};
834
835/* bandgap */
836static struct omap_hwmod_opt_clk bandgap_opt_clks[] = {
837 { .role = "fclk", .clk = "bandgap_fclk" },
838};
839
840static struct omap_hwmod omap44xx_bandgap_hwmod = {
841 .name = "bandgap",
842 .class = &omap44xx_bandgap_hwmod_class,
843 .clkdm_name = "l4_wkup_clkdm",
844 .prcm = {
845 .omap4 = {
846 .clkctrl_offs = OMAP4_CM_WKUP_BANDGAP_CLKCTRL_OFFSET,
847 },
848 },
849 .opt_clks = bandgap_opt_clks,
850 .opt_clks_cnt = ARRAY_SIZE(bandgap_opt_clks),
851}; 341};
852 342
853/* 343/*
@@ -870,30 +360,6 @@ static struct omap_hwmod_class omap44xx_counter_hwmod_class = {
870}; 360};
871 361
872/* counter_32k */ 362/* counter_32k */
873static struct omap_hwmod omap44xx_counter_32k_hwmod;
874static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
875 {
876 .pa_start = 0x4a304000,
877 .pa_end = 0x4a30401f,
878 .flags = ADDR_TYPE_RT
879 },
880 { }
881};
882
883/* l4_wkup -> counter_32k */
884static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
885 .master = &omap44xx_l4_wkup_hwmod,
886 .slave = &omap44xx_counter_32k_hwmod,
887 .clk = "l4_wkup_clk_mux_ck",
888 .addr = omap44xx_counter_32k_addrs,
889 .user = OCP_USER_MPU | OCP_USER_SDMA,
890};
891
892/* counter_32k slave ports */
893static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = {
894 &omap44xx_l4_wkup__counter_32k,
895};
896
897static struct omap_hwmod omap44xx_counter_32k_hwmod = { 363static struct omap_hwmod omap44xx_counter_32k_hwmod = {
898 .name = "counter_32k", 364 .name = "counter_32k",
899 .class = &omap44xx_counter_hwmod_class, 365 .class = &omap44xx_counter_hwmod_class,
@@ -906,8 +372,6 @@ static struct omap_hwmod omap44xx_counter_32k_hwmod = {
906 .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET, 372 .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET,
907 }, 373 },
908 }, 374 },
909 .slaves = omap44xx_counter_32k_slaves,
910 .slaves_cnt = ARRAY_SIZE(omap44xx_counter_32k_slaves),
911}; 375};
912 376
913/* 377/*
@@ -950,34 +414,6 @@ static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
950 { .irq = -1 } 414 { .irq = -1 }
951}; 415};
952 416
953/* dma_system master ports */
954static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = {
955 &omap44xx_dma_system__l3_main_2,
956};
957
958static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
959 {
960 .pa_start = 0x4a056000,
961 .pa_end = 0x4a056fff,
962 .flags = ADDR_TYPE_RT
963 },
964 { }
965};
966
967/* l4_cfg -> dma_system */
968static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
969 .master = &omap44xx_l4_cfg_hwmod,
970 .slave = &omap44xx_dma_system_hwmod,
971 .clk = "l4_div_ck",
972 .addr = omap44xx_dma_system_addrs,
973 .user = OCP_USER_MPU | OCP_USER_SDMA,
974};
975
976/* dma_system slave ports */
977static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = {
978 &omap44xx_l4_cfg__dma_system,
979};
980
981static struct omap_hwmod omap44xx_dma_system_hwmod = { 417static struct omap_hwmod omap44xx_dma_system_hwmod = {
982 .name = "dma_system", 418 .name = "dma_system",
983 .class = &omap44xx_dma_hwmod_class, 419 .class = &omap44xx_dma_hwmod_class,
@@ -991,10 +427,6 @@ static struct omap_hwmod omap44xx_dma_system_hwmod = {
991 }, 427 },
992 }, 428 },
993 .dev_attr = &dma_dev_attr, 429 .dev_attr = &dma_dev_attr,
994 .slaves = omap44xx_dma_system_slaves,
995 .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves),
996 .masters = omap44xx_dma_system_masters,
997 .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters),
998}; 430};
999 431
1000/* 432/*
@@ -1018,7 +450,6 @@ static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
1018}; 450};
1019 451
1020/* dmic */ 452/* dmic */
1021static struct omap_hwmod omap44xx_dmic_hwmod;
1022static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = { 453static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
1023 { .irq = 114 + OMAP44XX_IRQ_GIC_START }, 454 { .irq = 114 + OMAP44XX_IRQ_GIC_START },
1024 { .irq = -1 } 455 { .irq = -1 }
@@ -1029,50 +460,6 @@ static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
1029 { .dma_req = -1 } 460 { .dma_req = -1 }
1030}; 461};
1031 462
1032static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
1033 {
1034 .name = "mpu",
1035 .pa_start = 0x4012e000,
1036 .pa_end = 0x4012e07f,
1037 .flags = ADDR_TYPE_RT
1038 },
1039 { }
1040};
1041
1042/* l4_abe -> dmic */
1043static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
1044 .master = &omap44xx_l4_abe_hwmod,
1045 .slave = &omap44xx_dmic_hwmod,
1046 .clk = "ocp_abe_iclk",
1047 .addr = omap44xx_dmic_addrs,
1048 .user = OCP_USER_MPU,
1049};
1050
1051static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
1052 {
1053 .name = "dma",
1054 .pa_start = 0x4902e000,
1055 .pa_end = 0x4902e07f,
1056 .flags = ADDR_TYPE_RT
1057 },
1058 { }
1059};
1060
1061/* l4_abe -> dmic (dma) */
1062static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
1063 .master = &omap44xx_l4_abe_hwmod,
1064 .slave = &omap44xx_dmic_hwmod,
1065 .clk = "ocp_abe_iclk",
1066 .addr = omap44xx_dmic_dma_addrs,
1067 .user = OCP_USER_SDMA,
1068};
1069
1070/* dmic slave ports */
1071static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = {
1072 &omap44xx_l4_abe__dmic,
1073 &omap44xx_l4_abe__dmic_dma,
1074};
1075
1076static struct omap_hwmod omap44xx_dmic_hwmod = { 463static struct omap_hwmod omap44xx_dmic_hwmod = {
1077 .name = "dmic", 464 .name = "dmic",
1078 .class = &omap44xx_dmic_hwmod_class, 465 .class = &omap44xx_dmic_hwmod_class,
@@ -1087,8 +474,6 @@ static struct omap_hwmod omap44xx_dmic_hwmod = {
1087 .modulemode = MODULEMODE_SWCTRL, 474 .modulemode = MODULEMODE_SWCTRL,
1088 }, 475 },
1089 }, 476 },
1090 .slaves = omap44xx_dmic_slaves,
1091 .slaves_cnt = ARRAY_SIZE(omap44xx_dmic_slaves),
1092}; 477};
1093 478
1094/* 479/*
@@ -1107,53 +492,8 @@ static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
1107}; 492};
1108 493
1109static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = { 494static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
1110 { .name = "mmu_cache", .rst_shift = 1 },
1111};
1112
1113static struct omap_hwmod_rst_info omap44xx_dsp_c0_resets[] = {
1114 { .name = "dsp", .rst_shift = 0 }, 495 { .name = "dsp", .rst_shift = 0 },
1115}; 496 { .name = "mmu_cache", .rst_shift = 1 },
1116
1117/* dsp -> iva */
1118static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
1119 .master = &omap44xx_dsp_hwmod,
1120 .slave = &omap44xx_iva_hwmod,
1121 .clk = "dpll_iva_m5x2_ck",
1122};
1123
1124/* dsp master ports */
1125static struct omap_hwmod_ocp_if *omap44xx_dsp_masters[] = {
1126 &omap44xx_dsp__l3_main_1,
1127 &omap44xx_dsp__l4_abe,
1128 &omap44xx_dsp__iva,
1129};
1130
1131/* l4_cfg -> dsp */
1132static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
1133 .master = &omap44xx_l4_cfg_hwmod,
1134 .slave = &omap44xx_dsp_hwmod,
1135 .clk = "l4_div_ck",
1136 .user = OCP_USER_MPU | OCP_USER_SDMA,
1137};
1138
1139/* dsp slave ports */
1140static struct omap_hwmod_ocp_if *omap44xx_dsp_slaves[] = {
1141 &omap44xx_l4_cfg__dsp,
1142};
1143
1144/* Pseudo hwmod for reset control purpose only */
1145static struct omap_hwmod omap44xx_dsp_c0_hwmod = {
1146 .name = "dsp_c0",
1147 .class = &omap44xx_dsp_hwmod_class,
1148 .clkdm_name = "tesla_clkdm",
1149 .flags = HWMOD_INIT_NO_RESET,
1150 .rst_lines = omap44xx_dsp_c0_resets,
1151 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets),
1152 .prcm = {
1153 .omap4 = {
1154 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
1155 },
1156 },
1157}; 497};
1158 498
1159static struct omap_hwmod omap44xx_dsp_hwmod = { 499static struct omap_hwmod omap44xx_dsp_hwmod = {
@@ -1172,10 +512,6 @@ static struct omap_hwmod omap44xx_dsp_hwmod = {
1172 .modulemode = MODULEMODE_HWCTRL, 512 .modulemode = MODULEMODE_HWCTRL,
1173 }, 513 },
1174 }, 514 },
1175 .slaves = omap44xx_dsp_slaves,
1176 .slaves_cnt = ARRAY_SIZE(omap44xx_dsp_slaves),
1177 .masters = omap44xx_dsp_masters,
1178 .masters_cnt = ARRAY_SIZE(omap44xx_dsp_masters),
1179}; 515};
1180 516
1181/* 517/*
@@ -1196,53 +532,6 @@ static struct omap_hwmod_class omap44xx_dss_hwmod_class = {
1196}; 532};
1197 533
1198/* dss */ 534/* dss */
1199/* dss master ports */
1200static struct omap_hwmod_ocp_if *omap44xx_dss_masters[] = {
1201 &omap44xx_dss__l3_main_1,
1202};
1203
1204static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = {
1205 {
1206 .pa_start = 0x58000000,
1207 .pa_end = 0x5800007f,
1208 .flags = ADDR_TYPE_RT
1209 },
1210 { }
1211};
1212
1213/* l3_main_2 -> dss */
1214static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = {
1215 .master = &omap44xx_l3_main_2_hwmod,
1216 .slave = &omap44xx_dss_hwmod,
1217 .clk = "dss_fck",
1218 .addr = omap44xx_dss_dma_addrs,
1219 .user = OCP_USER_SDMA,
1220};
1221
1222static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = {
1223 {
1224 .pa_start = 0x48040000,
1225 .pa_end = 0x4804007f,
1226 .flags = ADDR_TYPE_RT
1227 },
1228 { }
1229};
1230
1231/* l4_per -> dss */
1232static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = {
1233 .master = &omap44xx_l4_per_hwmod,
1234 .slave = &omap44xx_dss_hwmod,
1235 .clk = "l4_div_ck",
1236 .addr = omap44xx_dss_addrs,
1237 .user = OCP_USER_MPU,
1238};
1239
1240/* dss slave ports */
1241static struct omap_hwmod_ocp_if *omap44xx_dss_slaves[] = {
1242 &omap44xx_l3_main_2__dss,
1243 &omap44xx_l4_per__dss,
1244};
1245
1246static struct omap_hwmod_opt_clk dss_opt_clks[] = { 535static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1247 { .role = "sys_clk", .clk = "dss_sys_clk" }, 536 { .role = "sys_clk", .clk = "dss_sys_clk" },
1248 { .role = "tv_clk", .clk = "dss_tv_clk" }, 537 { .role = "tv_clk", .clk = "dss_tv_clk" },
@@ -1263,10 +552,6 @@ static struct omap_hwmod omap44xx_dss_hwmod = {
1263 }, 552 },
1264 .opt_clks = dss_opt_clks, 553 .opt_clks = dss_opt_clks,
1265 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), 554 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1266 .slaves = omap44xx_dss_slaves,
1267 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_slaves),
1268 .masters = omap44xx_dss_masters,
1269 .masters_cnt = ARRAY_SIZE(omap44xx_dss_masters),
1270}; 555};
1271 556
1272/* 557/*
@@ -1293,7 +578,6 @@ static struct omap_hwmod_class omap44xx_dispc_hwmod_class = {
1293}; 578};
1294 579
1295/* dss_dispc */ 580/* dss_dispc */
1296static struct omap_hwmod omap44xx_dss_dispc_hwmod;
1297static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = { 581static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = {
1298 { .irq = 25 + OMAP44XX_IRQ_GIC_START }, 582 { .irq = 25 + OMAP44XX_IRQ_GIC_START },
1299 { .irq = -1 } 583 { .irq = -1 }
@@ -1304,53 +588,11 @@ static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = {
1304 { .dma_req = -1 } 588 { .dma_req = -1 }
1305}; 589};
1306 590
1307static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
1308 {
1309 .pa_start = 0x58001000,
1310 .pa_end = 0x58001fff,
1311 .flags = ADDR_TYPE_RT
1312 },
1313 { }
1314};
1315
1316/* l3_main_2 -> dss_dispc */
1317static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = {
1318 .master = &omap44xx_l3_main_2_hwmod,
1319 .slave = &omap44xx_dss_dispc_hwmod,
1320 .clk = "dss_fck",
1321 .addr = omap44xx_dss_dispc_dma_addrs,
1322 .user = OCP_USER_SDMA,
1323};
1324
1325static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = {
1326 {
1327 .pa_start = 0x48041000,
1328 .pa_end = 0x48041fff,
1329 .flags = ADDR_TYPE_RT
1330 },
1331 { }
1332};
1333
1334static struct omap_dss_dispc_dev_attr omap44xx_dss_dispc_dev_attr = { 591static struct omap_dss_dispc_dev_attr omap44xx_dss_dispc_dev_attr = {
1335 .manager_count = 3, 592 .manager_count = 3,
1336 .has_framedonetv_irq = 1 593 .has_framedonetv_irq = 1
1337}; 594};
1338 595
1339/* l4_per -> dss_dispc */
1340static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = {
1341 .master = &omap44xx_l4_per_hwmod,
1342 .slave = &omap44xx_dss_dispc_hwmod,
1343 .clk = "l4_div_ck",
1344 .addr = omap44xx_dss_dispc_addrs,
1345 .user = OCP_USER_MPU,
1346};
1347
1348/* dss_dispc slave ports */
1349static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = {
1350 &omap44xx_l3_main_2__dss_dispc,
1351 &omap44xx_l4_per__dss_dispc,
1352};
1353
1354static struct omap_hwmod omap44xx_dss_dispc_hwmod = { 596static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
1355 .name = "dss_dispc", 597 .name = "dss_dispc",
1356 .class = &omap44xx_dispc_hwmod_class, 598 .class = &omap44xx_dispc_hwmod_class,
@@ -1364,8 +606,6 @@ static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
1364 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET, 606 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
1365 }, 607 },
1366 }, 608 },
1367 .slaves = omap44xx_dss_dispc_slaves,
1368 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves),
1369 .dev_attr = &omap44xx_dss_dispc_dev_attr 609 .dev_attr = &omap44xx_dss_dispc_dev_attr
1370}; 610};
1371 611
@@ -1391,7 +631,6 @@ static struct omap_hwmod_class omap44xx_dsi_hwmod_class = {
1391}; 631};
1392 632
1393/* dss_dsi1 */ 633/* dss_dsi1 */
1394static struct omap_hwmod omap44xx_dss_dsi1_hwmod;
1395static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = { 634static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = {
1396 { .irq = 53 + OMAP44XX_IRQ_GIC_START }, 635 { .irq = 53 + OMAP44XX_IRQ_GIC_START },
1397 { .irq = -1 } 636 { .irq = -1 }
@@ -1402,48 +641,6 @@ static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = {
1402 { .dma_req = -1 } 641 { .dma_req = -1 }
1403}; 642};
1404 643
1405static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
1406 {
1407 .pa_start = 0x58004000,
1408 .pa_end = 0x580041ff,
1409 .flags = ADDR_TYPE_RT
1410 },
1411 { }
1412};
1413
1414/* l3_main_2 -> dss_dsi1 */
1415static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
1416 .master = &omap44xx_l3_main_2_hwmod,
1417 .slave = &omap44xx_dss_dsi1_hwmod,
1418 .clk = "dss_fck",
1419 .addr = omap44xx_dss_dsi1_dma_addrs,
1420 .user = OCP_USER_SDMA,
1421};
1422
1423static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
1424 {
1425 .pa_start = 0x48044000,
1426 .pa_end = 0x480441ff,
1427 .flags = ADDR_TYPE_RT
1428 },
1429 { }
1430};
1431
1432/* l4_per -> dss_dsi1 */
1433static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
1434 .master = &omap44xx_l4_per_hwmod,
1435 .slave = &omap44xx_dss_dsi1_hwmod,
1436 .clk = "l4_div_ck",
1437 .addr = omap44xx_dss_dsi1_addrs,
1438 .user = OCP_USER_MPU,
1439};
1440
1441/* dss_dsi1 slave ports */
1442static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = {
1443 &omap44xx_l3_main_2__dss_dsi1,
1444 &omap44xx_l4_per__dss_dsi1,
1445};
1446
1447static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = { 644static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1448 { .role = "sys_clk", .clk = "dss_sys_clk" }, 645 { .role = "sys_clk", .clk = "dss_sys_clk" },
1449}; 646};
@@ -1463,12 +660,9 @@ static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
1463 }, 660 },
1464 .opt_clks = dss_dsi1_opt_clks, 661 .opt_clks = dss_dsi1_opt_clks,
1465 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks), 662 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
1466 .slaves = omap44xx_dss_dsi1_slaves,
1467 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves),
1468}; 663};
1469 664
1470/* dss_dsi2 */ 665/* dss_dsi2 */
1471static struct omap_hwmod omap44xx_dss_dsi2_hwmod;
1472static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = { 666static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = {
1473 { .irq = 84 + OMAP44XX_IRQ_GIC_START }, 667 { .irq = 84 + OMAP44XX_IRQ_GIC_START },
1474 { .irq = -1 } 668 { .irq = -1 }
@@ -1479,48 +673,6 @@ static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = {
1479 { .dma_req = -1 } 673 { .dma_req = -1 }
1480}; 674};
1481 675
1482static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
1483 {
1484 .pa_start = 0x58005000,
1485 .pa_end = 0x580051ff,
1486 .flags = ADDR_TYPE_RT
1487 },
1488 { }
1489};
1490
1491/* l3_main_2 -> dss_dsi2 */
1492static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
1493 .master = &omap44xx_l3_main_2_hwmod,
1494 .slave = &omap44xx_dss_dsi2_hwmod,
1495 .clk = "dss_fck",
1496 .addr = omap44xx_dss_dsi2_dma_addrs,
1497 .user = OCP_USER_SDMA,
1498};
1499
1500static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
1501 {
1502 .pa_start = 0x48045000,
1503 .pa_end = 0x480451ff,
1504 .flags = ADDR_TYPE_RT
1505 },
1506 { }
1507};
1508
1509/* l4_per -> dss_dsi2 */
1510static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
1511 .master = &omap44xx_l4_per_hwmod,
1512 .slave = &omap44xx_dss_dsi2_hwmod,
1513 .clk = "l4_div_ck",
1514 .addr = omap44xx_dss_dsi2_addrs,
1515 .user = OCP_USER_MPU,
1516};
1517
1518/* dss_dsi2 slave ports */
1519static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = {
1520 &omap44xx_l3_main_2__dss_dsi2,
1521 &omap44xx_l4_per__dss_dsi2,
1522};
1523
1524static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = { 676static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = {
1525 { .role = "sys_clk", .clk = "dss_sys_clk" }, 677 { .role = "sys_clk", .clk = "dss_sys_clk" },
1526}; 678};
@@ -1540,8 +692,6 @@ static struct omap_hwmod omap44xx_dss_dsi2_hwmod = {
1540 }, 692 },
1541 .opt_clks = dss_dsi2_opt_clks, 693 .opt_clks = dss_dsi2_opt_clks,
1542 .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks), 694 .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks),
1543 .slaves = omap44xx_dss_dsi2_slaves,
1544 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves),
1545}; 695};
1546 696
1547/* 697/*
@@ -1565,7 +715,6 @@ static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = {
1565}; 715};
1566 716
1567/* dss_hdmi */ 717/* dss_hdmi */
1568static struct omap_hwmod omap44xx_dss_hdmi_hwmod;
1569static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = { 718static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = {
1570 { .irq = 101 + OMAP44XX_IRQ_GIC_START }, 719 { .irq = 101 + OMAP44XX_IRQ_GIC_START },
1571 { .irq = -1 } 720 { .irq = -1 }
@@ -1576,48 +725,6 @@ static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = {
1576 { .dma_req = -1 } 725 { .dma_req = -1 }
1577}; 726};
1578 727
1579static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
1580 {
1581 .pa_start = 0x58006000,
1582 .pa_end = 0x58006fff,
1583 .flags = ADDR_TYPE_RT
1584 },
1585 { }
1586};
1587
1588/* l3_main_2 -> dss_hdmi */
1589static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
1590 .master = &omap44xx_l3_main_2_hwmod,
1591 .slave = &omap44xx_dss_hdmi_hwmod,
1592 .clk = "dss_fck",
1593 .addr = omap44xx_dss_hdmi_dma_addrs,
1594 .user = OCP_USER_SDMA,
1595};
1596
1597static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
1598 {
1599 .pa_start = 0x48046000,
1600 .pa_end = 0x48046fff,
1601 .flags = ADDR_TYPE_RT
1602 },
1603 { }
1604};
1605
1606/* l4_per -> dss_hdmi */
1607static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
1608 .master = &omap44xx_l4_per_hwmod,
1609 .slave = &omap44xx_dss_hdmi_hwmod,
1610 .clk = "l4_div_ck",
1611 .addr = omap44xx_dss_hdmi_addrs,
1612 .user = OCP_USER_MPU,
1613};
1614
1615/* dss_hdmi slave ports */
1616static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = {
1617 &omap44xx_l3_main_2__dss_hdmi,
1618 &omap44xx_l4_per__dss_hdmi,
1619};
1620
1621static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = { 728static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
1622 { .role = "sys_clk", .clk = "dss_sys_clk" }, 729 { .role = "sys_clk", .clk = "dss_sys_clk" },
1623}; 730};
@@ -1637,8 +744,6 @@ static struct omap_hwmod omap44xx_dss_hdmi_hwmod = {
1637 }, 744 },
1638 .opt_clks = dss_hdmi_opt_clks, 745 .opt_clks = dss_hdmi_opt_clks,
1639 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks), 746 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
1640 .slaves = omap44xx_dss_hdmi_slaves,
1641 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves),
1642}; 747};
1643 748
1644/* 749/*
@@ -1662,54 +767,11 @@ static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = {
1662}; 767};
1663 768
1664/* dss_rfbi */ 769/* dss_rfbi */
1665static struct omap_hwmod omap44xx_dss_rfbi_hwmod;
1666static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = { 770static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = {
1667 { .dma_req = 13 + OMAP44XX_DMA_REQ_START }, 771 { .dma_req = 13 + OMAP44XX_DMA_REQ_START },
1668 { .dma_req = -1 } 772 { .dma_req = -1 }
1669}; 773};
1670 774
1671static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
1672 {
1673 .pa_start = 0x58002000,
1674 .pa_end = 0x580020ff,
1675 .flags = ADDR_TYPE_RT
1676 },
1677 { }
1678};
1679
1680/* l3_main_2 -> dss_rfbi */
1681static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
1682 .master = &omap44xx_l3_main_2_hwmod,
1683 .slave = &omap44xx_dss_rfbi_hwmod,
1684 .clk = "dss_fck",
1685 .addr = omap44xx_dss_rfbi_dma_addrs,
1686 .user = OCP_USER_SDMA,
1687};
1688
1689static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
1690 {
1691 .pa_start = 0x48042000,
1692 .pa_end = 0x480420ff,
1693 .flags = ADDR_TYPE_RT
1694 },
1695 { }
1696};
1697
1698/* l4_per -> dss_rfbi */
1699static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
1700 .master = &omap44xx_l4_per_hwmod,
1701 .slave = &omap44xx_dss_rfbi_hwmod,
1702 .clk = "l4_div_ck",
1703 .addr = omap44xx_dss_rfbi_addrs,
1704 .user = OCP_USER_MPU,
1705};
1706
1707/* dss_rfbi slave ports */
1708static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = {
1709 &omap44xx_l3_main_2__dss_rfbi,
1710 &omap44xx_l4_per__dss_rfbi,
1711};
1712
1713static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { 775static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1714 { .role = "ick", .clk = "dss_fck" }, 776 { .role = "ick", .clk = "dss_fck" },
1715}; 777};
@@ -1728,8 +790,6 @@ static struct omap_hwmod omap44xx_dss_rfbi_hwmod = {
1728 }, 790 },
1729 .opt_clks = dss_rfbi_opt_clks, 791 .opt_clks = dss_rfbi_opt_clks,
1730 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), 792 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
1731 .slaves = omap44xx_dss_rfbi_slaves,
1732 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves),
1733}; 793};
1734 794
1735/* 795/*
@@ -1742,49 +802,6 @@ static struct omap_hwmod_class omap44xx_venc_hwmod_class = {
1742}; 802};
1743 803
1744/* dss_venc */ 804/* dss_venc */
1745static struct omap_hwmod omap44xx_dss_venc_hwmod;
1746static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
1747 {
1748 .pa_start = 0x58003000,
1749 .pa_end = 0x580030ff,
1750 .flags = ADDR_TYPE_RT
1751 },
1752 { }
1753};
1754
1755/* l3_main_2 -> dss_venc */
1756static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
1757 .master = &omap44xx_l3_main_2_hwmod,
1758 .slave = &omap44xx_dss_venc_hwmod,
1759 .clk = "dss_fck",
1760 .addr = omap44xx_dss_venc_dma_addrs,
1761 .user = OCP_USER_SDMA,
1762};
1763
1764static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
1765 {
1766 .pa_start = 0x48043000,
1767 .pa_end = 0x480430ff,
1768 .flags = ADDR_TYPE_RT
1769 },
1770 { }
1771};
1772
1773/* l4_per -> dss_venc */
1774static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
1775 .master = &omap44xx_l4_per_hwmod,
1776 .slave = &omap44xx_dss_venc_hwmod,
1777 .clk = "l4_div_ck",
1778 .addr = omap44xx_dss_venc_addrs,
1779 .user = OCP_USER_MPU,
1780};
1781
1782/* dss_venc slave ports */
1783static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = {
1784 &omap44xx_l3_main_2__dss_venc,
1785 &omap44xx_l4_per__dss_venc,
1786};
1787
1788static struct omap_hwmod omap44xx_dss_venc_hwmod = { 805static struct omap_hwmod omap44xx_dss_venc_hwmod = {
1789 .name = "dss_venc", 806 .name = "dss_venc",
1790 .class = &omap44xx_venc_hwmod_class, 807 .class = &omap44xx_venc_hwmod_class,
@@ -1796,8 +813,6 @@ static struct omap_hwmod omap44xx_dss_venc_hwmod = {
1796 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET, 813 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
1797 }, 814 },
1798 }, 815 },
1799 .slaves = omap44xx_dss_venc_slaves,
1800 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_venc_slaves),
1801}; 816};
1802 817
1803/* 818/*
@@ -1830,35 +845,11 @@ static struct omap_gpio_dev_attr gpio_dev_attr = {
1830}; 845};
1831 846
1832/* gpio1 */ 847/* gpio1 */
1833static struct omap_hwmod omap44xx_gpio1_hwmod;
1834static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = { 848static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
1835 { .irq = 29 + OMAP44XX_IRQ_GIC_START }, 849 { .irq = 29 + OMAP44XX_IRQ_GIC_START },
1836 { .irq = -1 } 850 { .irq = -1 }
1837}; 851};
1838 852
1839static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
1840 {
1841 .pa_start = 0x4a310000,
1842 .pa_end = 0x4a3101ff,
1843 .flags = ADDR_TYPE_RT
1844 },
1845 { }
1846};
1847
1848/* l4_wkup -> gpio1 */
1849static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
1850 .master = &omap44xx_l4_wkup_hwmod,
1851 .slave = &omap44xx_gpio1_hwmod,
1852 .clk = "l4_wkup_clk_mux_ck",
1853 .addr = omap44xx_gpio1_addrs,
1854 .user = OCP_USER_MPU | OCP_USER_SDMA,
1855};
1856
1857/* gpio1 slave ports */
1858static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = {
1859 &omap44xx_l4_wkup__gpio1,
1860};
1861
1862static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { 853static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
1863 { .role = "dbclk", .clk = "gpio1_dbclk" }, 854 { .role = "dbclk", .clk = "gpio1_dbclk" },
1864}; 855};
@@ -1879,40 +870,14 @@ static struct omap_hwmod omap44xx_gpio1_hwmod = {
1879 .opt_clks = gpio1_opt_clks, 870 .opt_clks = gpio1_opt_clks,
1880 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), 871 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
1881 .dev_attr = &gpio_dev_attr, 872 .dev_attr = &gpio_dev_attr,
1882 .slaves = omap44xx_gpio1_slaves,
1883 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves),
1884}; 873};
1885 874
1886/* gpio2 */ 875/* gpio2 */
1887static struct omap_hwmod omap44xx_gpio2_hwmod;
1888static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = { 876static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
1889 { .irq = 30 + OMAP44XX_IRQ_GIC_START }, 877 { .irq = 30 + OMAP44XX_IRQ_GIC_START },
1890 { .irq = -1 } 878 { .irq = -1 }
1891}; 879};
1892 880
1893static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
1894 {
1895 .pa_start = 0x48055000,
1896 .pa_end = 0x480551ff,
1897 .flags = ADDR_TYPE_RT
1898 },
1899 { }
1900};
1901
1902/* l4_per -> gpio2 */
1903static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
1904 .master = &omap44xx_l4_per_hwmod,
1905 .slave = &omap44xx_gpio2_hwmod,
1906 .clk = "l4_div_ck",
1907 .addr = omap44xx_gpio2_addrs,
1908 .user = OCP_USER_MPU | OCP_USER_SDMA,
1909};
1910
1911/* gpio2 slave ports */
1912static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = {
1913 &omap44xx_l4_per__gpio2,
1914};
1915
1916static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { 881static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
1917 { .role = "dbclk", .clk = "gpio2_dbclk" }, 882 { .role = "dbclk", .clk = "gpio2_dbclk" },
1918}; 883};
@@ -1934,40 +899,14 @@ static struct omap_hwmod omap44xx_gpio2_hwmod = {
1934 .opt_clks = gpio2_opt_clks, 899 .opt_clks = gpio2_opt_clks,
1935 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), 900 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1936 .dev_attr = &gpio_dev_attr, 901 .dev_attr = &gpio_dev_attr,
1937 .slaves = omap44xx_gpio2_slaves,
1938 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves),
1939}; 902};
1940 903
1941/* gpio3 */ 904/* gpio3 */
1942static struct omap_hwmod omap44xx_gpio3_hwmod;
1943static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = { 905static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
1944 { .irq = 31 + OMAP44XX_IRQ_GIC_START }, 906 { .irq = 31 + OMAP44XX_IRQ_GIC_START },
1945 { .irq = -1 } 907 { .irq = -1 }
1946}; 908};
1947 909
1948static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
1949 {
1950 .pa_start = 0x48057000,
1951 .pa_end = 0x480571ff,
1952 .flags = ADDR_TYPE_RT
1953 },
1954 { }
1955};
1956
1957/* l4_per -> gpio3 */
1958static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
1959 .master = &omap44xx_l4_per_hwmod,
1960 .slave = &omap44xx_gpio3_hwmod,
1961 .clk = "l4_div_ck",
1962 .addr = omap44xx_gpio3_addrs,
1963 .user = OCP_USER_MPU | OCP_USER_SDMA,
1964};
1965
1966/* gpio3 slave ports */
1967static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = {
1968 &omap44xx_l4_per__gpio3,
1969};
1970
1971static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { 910static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
1972 { .role = "dbclk", .clk = "gpio3_dbclk" }, 911 { .role = "dbclk", .clk = "gpio3_dbclk" },
1973}; 912};
@@ -1989,40 +928,14 @@ static struct omap_hwmod omap44xx_gpio3_hwmod = {
1989 .opt_clks = gpio3_opt_clks, 928 .opt_clks = gpio3_opt_clks,
1990 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), 929 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
1991 .dev_attr = &gpio_dev_attr, 930 .dev_attr = &gpio_dev_attr,
1992 .slaves = omap44xx_gpio3_slaves,
1993 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves),
1994}; 931};
1995 932
1996/* gpio4 */ 933/* gpio4 */
1997static struct omap_hwmod omap44xx_gpio4_hwmod;
1998static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = { 934static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
1999 { .irq = 32 + OMAP44XX_IRQ_GIC_START }, 935 { .irq = 32 + OMAP44XX_IRQ_GIC_START },
2000 { .irq = -1 } 936 { .irq = -1 }
2001}; 937};
2002 938
2003static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
2004 {
2005 .pa_start = 0x48059000,
2006 .pa_end = 0x480591ff,
2007 .flags = ADDR_TYPE_RT
2008 },
2009 { }
2010};
2011
2012/* l4_per -> gpio4 */
2013static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
2014 .master = &omap44xx_l4_per_hwmod,
2015 .slave = &omap44xx_gpio4_hwmod,
2016 .clk = "l4_div_ck",
2017 .addr = omap44xx_gpio4_addrs,
2018 .user = OCP_USER_MPU | OCP_USER_SDMA,
2019};
2020
2021/* gpio4 slave ports */
2022static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = {
2023 &omap44xx_l4_per__gpio4,
2024};
2025
2026static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { 939static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
2027 { .role = "dbclk", .clk = "gpio4_dbclk" }, 940 { .role = "dbclk", .clk = "gpio4_dbclk" },
2028}; 941};
@@ -2044,40 +957,14 @@ static struct omap_hwmod omap44xx_gpio4_hwmod = {
2044 .opt_clks = gpio4_opt_clks, 957 .opt_clks = gpio4_opt_clks,
2045 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks), 958 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
2046 .dev_attr = &gpio_dev_attr, 959 .dev_attr = &gpio_dev_attr,
2047 .slaves = omap44xx_gpio4_slaves,
2048 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves),
2049}; 960};
2050 961
2051/* gpio5 */ 962/* gpio5 */
2052static struct omap_hwmod omap44xx_gpio5_hwmod;
2053static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = { 963static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
2054 { .irq = 33 + OMAP44XX_IRQ_GIC_START }, 964 { .irq = 33 + OMAP44XX_IRQ_GIC_START },
2055 { .irq = -1 } 965 { .irq = -1 }
2056}; 966};
2057 967
2058static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
2059 {
2060 .pa_start = 0x4805b000,
2061 .pa_end = 0x4805b1ff,
2062 .flags = ADDR_TYPE_RT
2063 },
2064 { }
2065};
2066
2067/* l4_per -> gpio5 */
2068static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
2069 .master = &omap44xx_l4_per_hwmod,
2070 .slave = &omap44xx_gpio5_hwmod,
2071 .clk = "l4_div_ck",
2072 .addr = omap44xx_gpio5_addrs,
2073 .user = OCP_USER_MPU | OCP_USER_SDMA,
2074};
2075
2076/* gpio5 slave ports */
2077static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = {
2078 &omap44xx_l4_per__gpio5,
2079};
2080
2081static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { 968static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
2082 { .role = "dbclk", .clk = "gpio5_dbclk" }, 969 { .role = "dbclk", .clk = "gpio5_dbclk" },
2083}; 970};
@@ -2099,40 +986,14 @@ static struct omap_hwmod omap44xx_gpio5_hwmod = {
2099 .opt_clks = gpio5_opt_clks, 986 .opt_clks = gpio5_opt_clks,
2100 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks), 987 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2101 .dev_attr = &gpio_dev_attr, 988 .dev_attr = &gpio_dev_attr,
2102 .slaves = omap44xx_gpio5_slaves,
2103 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves),
2104}; 989};
2105 990
2106/* gpio6 */ 991/* gpio6 */
2107static struct omap_hwmod omap44xx_gpio6_hwmod;
2108static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = { 992static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
2109 { .irq = 34 + OMAP44XX_IRQ_GIC_START }, 993 { .irq = 34 + OMAP44XX_IRQ_GIC_START },
2110 { .irq = -1 } 994 { .irq = -1 }
2111}; 995};
2112 996
2113static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
2114 {
2115 .pa_start = 0x4805d000,
2116 .pa_end = 0x4805d1ff,
2117 .flags = ADDR_TYPE_RT
2118 },
2119 { }
2120};
2121
2122/* l4_per -> gpio6 */
2123static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
2124 .master = &omap44xx_l4_per_hwmod,
2125 .slave = &omap44xx_gpio6_hwmod,
2126 .clk = "l4_div_ck",
2127 .addr = omap44xx_gpio6_addrs,
2128 .user = OCP_USER_MPU | OCP_USER_SDMA,
2129};
2130
2131/* gpio6 slave ports */
2132static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = {
2133 &omap44xx_l4_per__gpio6,
2134};
2135
2136static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { 997static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
2137 { .role = "dbclk", .clk = "gpio6_dbclk" }, 998 { .role = "dbclk", .clk = "gpio6_dbclk" },
2138}; 999};
@@ -2154,8 +1015,6 @@ static struct omap_hwmod omap44xx_gpio6_hwmod = {
2154 .opt_clks = gpio6_opt_clks, 1015 .opt_clks = gpio6_opt_clks,
2155 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks), 1016 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2156 .dev_attr = &gpio_dev_attr, 1017 .dev_attr = &gpio_dev_attr,
2157 .slaves = omap44xx_gpio6_slaves,
2158 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves),
2159}; 1018};
2160 1019
2161/* 1020/*
@@ -2190,34 +1049,6 @@ static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
2190 { .irq = -1 } 1049 { .irq = -1 }
2191}; 1050};
2192 1051
2193/* hsi master ports */
2194static struct omap_hwmod_ocp_if *omap44xx_hsi_masters[] = {
2195 &omap44xx_hsi__l3_main_2,
2196};
2197
2198static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
2199 {
2200 .pa_start = 0x4a058000,
2201 .pa_end = 0x4a05bfff,
2202 .flags = ADDR_TYPE_RT
2203 },
2204 { }
2205};
2206
2207/* l4_cfg -> hsi */
2208static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
2209 .master = &omap44xx_l4_cfg_hwmod,
2210 .slave = &omap44xx_hsi_hwmod,
2211 .clk = "l4_div_ck",
2212 .addr = omap44xx_hsi_addrs,
2213 .user = OCP_USER_MPU | OCP_USER_SDMA,
2214};
2215
2216/* hsi slave ports */
2217static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = {
2218 &omap44xx_l4_cfg__hsi,
2219};
2220
2221static struct omap_hwmod omap44xx_hsi_hwmod = { 1052static struct omap_hwmod omap44xx_hsi_hwmod = {
2222 .name = "hsi", 1053 .name = "hsi",
2223 .class = &omap44xx_hsi_hwmod_class, 1054 .class = &omap44xx_hsi_hwmod_class,
@@ -2231,10 +1062,6 @@ static struct omap_hwmod omap44xx_hsi_hwmod = {
2231 .modulemode = MODULEMODE_HWCTRL, 1062 .modulemode = MODULEMODE_HWCTRL,
2232 }, 1063 },
2233 }, 1064 },
2234 .slaves = omap44xx_hsi_slaves,
2235 .slaves_cnt = ARRAY_SIZE(omap44xx_hsi_slaves),
2236 .masters = omap44xx_hsi_masters,
2237 .masters_cnt = ARRAY_SIZE(omap44xx_hsi_masters),
2238}; 1065};
2239 1066
2240/* 1067/*
@@ -2266,7 +1093,6 @@ static struct omap_i2c_dev_attr i2c_dev_attr = {
2266}; 1093};
2267 1094
2268/* i2c1 */ 1095/* i2c1 */
2269static struct omap_hwmod omap44xx_i2c1_hwmod;
2270static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = { 1096static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
2271 { .irq = 56 + OMAP44XX_IRQ_GIC_START }, 1097 { .irq = 56 + OMAP44XX_IRQ_GIC_START },
2272 { .irq = -1 } 1098 { .irq = -1 }
@@ -2278,29 +1104,6 @@ static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
2278 { .dma_req = -1 } 1104 { .dma_req = -1 }
2279}; 1105};
2280 1106
2281static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
2282 {
2283 .pa_start = 0x48070000,
2284 .pa_end = 0x480700ff,
2285 .flags = ADDR_TYPE_RT
2286 },
2287 { }
2288};
2289
2290/* l4_per -> i2c1 */
2291static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
2292 .master = &omap44xx_l4_per_hwmod,
2293 .slave = &omap44xx_i2c1_hwmod,
2294 .clk = "l4_div_ck",
2295 .addr = omap44xx_i2c1_addrs,
2296 .user = OCP_USER_MPU | OCP_USER_SDMA,
2297};
2298
2299/* i2c1 slave ports */
2300static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = {
2301 &omap44xx_l4_per__i2c1,
2302};
2303
2304static struct omap_hwmod omap44xx_i2c1_hwmod = { 1107static struct omap_hwmod omap44xx_i2c1_hwmod = {
2305 .name = "i2c1", 1108 .name = "i2c1",
2306 .class = &omap44xx_i2c_hwmod_class, 1109 .class = &omap44xx_i2c_hwmod_class,
@@ -2316,13 +1119,10 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = {
2316 .modulemode = MODULEMODE_SWCTRL, 1119 .modulemode = MODULEMODE_SWCTRL,
2317 }, 1120 },
2318 }, 1121 },
2319 .slaves = omap44xx_i2c1_slaves,
2320 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves),
2321 .dev_attr = &i2c_dev_attr, 1122 .dev_attr = &i2c_dev_attr,
2322}; 1123};
2323 1124
2324/* i2c2 */ 1125/* i2c2 */
2325static struct omap_hwmod omap44xx_i2c2_hwmod;
2326static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = { 1126static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
2327 { .irq = 57 + OMAP44XX_IRQ_GIC_START }, 1127 { .irq = 57 + OMAP44XX_IRQ_GIC_START },
2328 { .irq = -1 } 1128 { .irq = -1 }
@@ -2334,29 +1134,6 @@ static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
2334 { .dma_req = -1 } 1134 { .dma_req = -1 }
2335}; 1135};
2336 1136
2337static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
2338 {
2339 .pa_start = 0x48072000,
2340 .pa_end = 0x480720ff,
2341 .flags = ADDR_TYPE_RT
2342 },
2343 { }
2344};
2345
2346/* l4_per -> i2c2 */
2347static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
2348 .master = &omap44xx_l4_per_hwmod,
2349 .slave = &omap44xx_i2c2_hwmod,
2350 .clk = "l4_div_ck",
2351 .addr = omap44xx_i2c2_addrs,
2352 .user = OCP_USER_MPU | OCP_USER_SDMA,
2353};
2354
2355/* i2c2 slave ports */
2356static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = {
2357 &omap44xx_l4_per__i2c2,
2358};
2359
2360static struct omap_hwmod omap44xx_i2c2_hwmod = { 1137static struct omap_hwmod omap44xx_i2c2_hwmod = {
2361 .name = "i2c2", 1138 .name = "i2c2",
2362 .class = &omap44xx_i2c_hwmod_class, 1139 .class = &omap44xx_i2c_hwmod_class,
@@ -2372,13 +1149,10 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = {
2372 .modulemode = MODULEMODE_SWCTRL, 1149 .modulemode = MODULEMODE_SWCTRL,
2373 }, 1150 },
2374 }, 1151 },
2375 .slaves = omap44xx_i2c2_slaves,
2376 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves),
2377 .dev_attr = &i2c_dev_attr, 1152 .dev_attr = &i2c_dev_attr,
2378}; 1153};
2379 1154
2380/* i2c3 */ 1155/* i2c3 */
2381static struct omap_hwmod omap44xx_i2c3_hwmod;
2382static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = { 1156static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
2383 { .irq = 61 + OMAP44XX_IRQ_GIC_START }, 1157 { .irq = 61 + OMAP44XX_IRQ_GIC_START },
2384 { .irq = -1 } 1158 { .irq = -1 }
@@ -2390,29 +1164,6 @@ static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
2390 { .dma_req = -1 } 1164 { .dma_req = -1 }
2391}; 1165};
2392 1166
2393static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
2394 {
2395 .pa_start = 0x48060000,
2396 .pa_end = 0x480600ff,
2397 .flags = ADDR_TYPE_RT
2398 },
2399 { }
2400};
2401
2402/* l4_per -> i2c3 */
2403static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
2404 .master = &omap44xx_l4_per_hwmod,
2405 .slave = &omap44xx_i2c3_hwmod,
2406 .clk = "l4_div_ck",
2407 .addr = omap44xx_i2c3_addrs,
2408 .user = OCP_USER_MPU | OCP_USER_SDMA,
2409};
2410
2411/* i2c3 slave ports */
2412static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = {
2413 &omap44xx_l4_per__i2c3,
2414};
2415
2416static struct omap_hwmod omap44xx_i2c3_hwmod = { 1167static struct omap_hwmod omap44xx_i2c3_hwmod = {
2417 .name = "i2c3", 1168 .name = "i2c3",
2418 .class = &omap44xx_i2c_hwmod_class, 1169 .class = &omap44xx_i2c_hwmod_class,
@@ -2428,13 +1179,10 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = {
2428 .modulemode = MODULEMODE_SWCTRL, 1179 .modulemode = MODULEMODE_SWCTRL,
2429 }, 1180 },
2430 }, 1181 },
2431 .slaves = omap44xx_i2c3_slaves,
2432 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves),
2433 .dev_attr = &i2c_dev_attr, 1182 .dev_attr = &i2c_dev_attr,
2434}; 1183};
2435 1184
2436/* i2c4 */ 1185/* i2c4 */
2437static struct omap_hwmod omap44xx_i2c4_hwmod;
2438static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = { 1186static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
2439 { .irq = 62 + OMAP44XX_IRQ_GIC_START }, 1187 { .irq = 62 + OMAP44XX_IRQ_GIC_START },
2440 { .irq = -1 } 1188 { .irq = -1 }
@@ -2446,29 +1194,6 @@ static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
2446 { .dma_req = -1 } 1194 { .dma_req = -1 }
2447}; 1195};
2448 1196
2449static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
2450 {
2451 .pa_start = 0x48350000,
2452 .pa_end = 0x483500ff,
2453 .flags = ADDR_TYPE_RT
2454 },
2455 { }
2456};
2457
2458/* l4_per -> i2c4 */
2459static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
2460 .master = &omap44xx_l4_per_hwmod,
2461 .slave = &omap44xx_i2c4_hwmod,
2462 .clk = "l4_div_ck",
2463 .addr = omap44xx_i2c4_addrs,
2464 .user = OCP_USER_MPU | OCP_USER_SDMA,
2465};
2466
2467/* i2c4 slave ports */
2468static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = {
2469 &omap44xx_l4_per__i2c4,
2470};
2471
2472static struct omap_hwmod omap44xx_i2c4_hwmod = { 1197static struct omap_hwmod omap44xx_i2c4_hwmod = {
2473 .name = "i2c4", 1198 .name = "i2c4",
2474 .class = &omap44xx_i2c_hwmod_class, 1199 .class = &omap44xx_i2c_hwmod_class,
@@ -2484,8 +1209,6 @@ static struct omap_hwmod omap44xx_i2c4_hwmod = {
2484 .modulemode = MODULEMODE_SWCTRL, 1209 .modulemode = MODULEMODE_SWCTRL,
2485 }, 1210 },
2486 }, 1211 },
2487 .slaves = omap44xx_i2c4_slaves,
2488 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves),
2489 .dev_attr = &i2c_dev_attr, 1212 .dev_attr = &i2c_dev_attr,
2490}; 1213};
2491 1214
@@ -2504,66 +1227,12 @@ static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
2504 { .irq = -1 } 1227 { .irq = -1 }
2505}; 1228};
2506 1229
2507static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = { 1230static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
2508 { .name = "cpu0", .rst_shift = 0 }, 1231 { .name = "cpu0", .rst_shift = 0 },
2509};
2510
2511static struct omap_hwmod_rst_info omap44xx_ipu_c1_resets[] = {
2512 { .name = "cpu1", .rst_shift = 1 }, 1232 { .name = "cpu1", .rst_shift = 1 },
2513};
2514
2515static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
2516 { .name = "mmu_cache", .rst_shift = 2 }, 1233 { .name = "mmu_cache", .rst_shift = 2 },
2517}; 1234};
2518 1235
2519/* ipu master ports */
2520static struct omap_hwmod_ocp_if *omap44xx_ipu_masters[] = {
2521 &omap44xx_ipu__l3_main_2,
2522};
2523
2524/* l3_main_2 -> ipu */
2525static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = {
2526 .master = &omap44xx_l3_main_2_hwmod,
2527 .slave = &omap44xx_ipu_hwmod,
2528 .clk = "l3_div_ck",
2529 .user = OCP_USER_MPU | OCP_USER_SDMA,
2530};
2531
2532/* ipu slave ports */
2533static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = {
2534 &omap44xx_l3_main_2__ipu,
2535};
2536
2537/* Pseudo hwmod for reset control purpose only */
2538static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
2539 .name = "ipu_c0",
2540 .class = &omap44xx_ipu_hwmod_class,
2541 .clkdm_name = "ducati_clkdm",
2542 .flags = HWMOD_INIT_NO_RESET,
2543 .rst_lines = omap44xx_ipu_c0_resets,
2544 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets),
2545 .prcm = {
2546 .omap4 = {
2547 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
2548 },
2549 },
2550};
2551
2552/* Pseudo hwmod for reset control purpose only */
2553static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
2554 .name = "ipu_c1",
2555 .class = &omap44xx_ipu_hwmod_class,
2556 .clkdm_name = "ducati_clkdm",
2557 .flags = HWMOD_INIT_NO_RESET,
2558 .rst_lines = omap44xx_ipu_c1_resets,
2559 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets),
2560 .prcm = {
2561 .omap4 = {
2562 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
2563 },
2564 },
2565};
2566
2567static struct omap_hwmod omap44xx_ipu_hwmod = { 1236static struct omap_hwmod omap44xx_ipu_hwmod = {
2568 .name = "ipu", 1237 .name = "ipu",
2569 .class = &omap44xx_ipu_hwmod_class, 1238 .class = &omap44xx_ipu_hwmod_class,
@@ -2580,10 +1249,6 @@ static struct omap_hwmod omap44xx_ipu_hwmod = {
2580 .modulemode = MODULEMODE_HWCTRL, 1249 .modulemode = MODULEMODE_HWCTRL,
2581 }, 1250 },
2582 }, 1251 },
2583 .slaves = omap44xx_ipu_slaves,
2584 .slaves_cnt = ARRAY_SIZE(omap44xx_ipu_slaves),
2585 .masters = omap44xx_ipu_masters,
2586 .masters_cnt = ARRAY_SIZE(omap44xx_ipu_masters),
2587}; 1252};
2588 1253
2589/* 1254/*
@@ -2594,6 +1259,15 @@ static struct omap_hwmod omap44xx_ipu_hwmod = {
2594static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = { 1259static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
2595 .rev_offs = 0x0000, 1260 .rev_offs = 0x0000,
2596 .sysc_offs = 0x0010, 1261 .sysc_offs = 0x0010,
1262 /*
1263 * ISS needs 100 OCP clk cycles delay after a softreset before
1264 * accessing sysconfig again.
1265 * The lowest frequency at the moment for L3 bus is 100 MHz, so
1266 * 1usec delay is needed. Add an x2 margin to be safe (2 usecs).
1267 *
1268 * TODO: Indicate errata when available.
1269 */
1270 .srst_udelay = 2,
2597 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS | 1271 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
2598 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), 1272 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2599 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 1273 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
@@ -2621,34 +1295,6 @@ static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
2621 { .dma_req = -1 } 1295 { .dma_req = -1 }
2622}; 1296};
2623 1297
2624/* iss master ports */
2625static struct omap_hwmod_ocp_if *omap44xx_iss_masters[] = {
2626 &omap44xx_iss__l3_main_2,
2627};
2628
2629static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
2630 {
2631 .pa_start = 0x52000000,
2632 .pa_end = 0x520000ff,
2633 .flags = ADDR_TYPE_RT
2634 },
2635 { }
2636};
2637
2638/* l3_main_2 -> iss */
2639static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
2640 .master = &omap44xx_l3_main_2_hwmod,
2641 .slave = &omap44xx_iss_hwmod,
2642 .clk = "l3_div_ck",
2643 .addr = omap44xx_iss_addrs,
2644 .user = OCP_USER_MPU | OCP_USER_SDMA,
2645};
2646
2647/* iss slave ports */
2648static struct omap_hwmod_ocp_if *omap44xx_iss_slaves[] = {
2649 &omap44xx_l3_main_2__iss,
2650};
2651
2652static struct omap_hwmod_opt_clk iss_opt_clks[] = { 1298static struct omap_hwmod_opt_clk iss_opt_clks[] = {
2653 { .role = "ctrlclk", .clk = "iss_ctrlclk" }, 1299 { .role = "ctrlclk", .clk = "iss_ctrlclk" },
2654}; 1300};
@@ -2669,10 +1315,6 @@ static struct omap_hwmod omap44xx_iss_hwmod = {
2669 }, 1315 },
2670 .opt_clks = iss_opt_clks, 1316 .opt_clks = iss_opt_clks,
2671 .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks), 1317 .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks),
2672 .slaves = omap44xx_iss_slaves,
2673 .slaves_cnt = ARRAY_SIZE(omap44xx_iss_slaves),
2674 .masters = omap44xx_iss_masters,
2675 .masters_cnt = ARRAY_SIZE(omap44xx_iss_masters),
2676}; 1318};
2677 1319
2678/* 1320/*
@@ -2693,75 +1335,9 @@ static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
2693}; 1335};
2694 1336
2695static struct omap_hwmod_rst_info omap44xx_iva_resets[] = { 1337static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
2696 { .name = "logic", .rst_shift = 2 },
2697};
2698
2699static struct omap_hwmod_rst_info omap44xx_iva_seq0_resets[] = {
2700 { .name = "seq0", .rst_shift = 0 }, 1338 { .name = "seq0", .rst_shift = 0 },
2701};
2702
2703static struct omap_hwmod_rst_info omap44xx_iva_seq1_resets[] = {
2704 { .name = "seq1", .rst_shift = 1 }, 1339 { .name = "seq1", .rst_shift = 1 },
2705}; 1340 { .name = "logic", .rst_shift = 2 },
2706
2707/* iva master ports */
2708static struct omap_hwmod_ocp_if *omap44xx_iva_masters[] = {
2709 &omap44xx_iva__l3_main_2,
2710 &omap44xx_iva__l3_instr,
2711};
2712
2713static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
2714 {
2715 .pa_start = 0x5a000000,
2716 .pa_end = 0x5a07ffff,
2717 .flags = ADDR_TYPE_RT
2718 },
2719 { }
2720};
2721
2722/* l3_main_2 -> iva */
2723static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
2724 .master = &omap44xx_l3_main_2_hwmod,
2725 .slave = &omap44xx_iva_hwmod,
2726 .clk = "l3_div_ck",
2727 .addr = omap44xx_iva_addrs,
2728 .user = OCP_USER_MPU,
2729};
2730
2731/* iva slave ports */
2732static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = {
2733 &omap44xx_dsp__iva,
2734 &omap44xx_l3_main_2__iva,
2735};
2736
2737/* Pseudo hwmod for reset control purpose only */
2738static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
2739 .name = "iva_seq0",
2740 .class = &omap44xx_iva_hwmod_class,
2741 .clkdm_name = "ivahd_clkdm",
2742 .flags = HWMOD_INIT_NO_RESET,
2743 .rst_lines = omap44xx_iva_seq0_resets,
2744 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets),
2745 .prcm = {
2746 .omap4 = {
2747 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
2748 },
2749 },
2750};
2751
2752/* Pseudo hwmod for reset control purpose only */
2753static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
2754 .name = "iva_seq1",
2755 .class = &omap44xx_iva_hwmod_class,
2756 .clkdm_name = "ivahd_clkdm",
2757 .flags = HWMOD_INIT_NO_RESET,
2758 .rst_lines = omap44xx_iva_seq1_resets,
2759 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets),
2760 .prcm = {
2761 .omap4 = {
2762 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
2763 },
2764 },
2765}; 1341};
2766 1342
2767static struct omap_hwmod omap44xx_iva_hwmod = { 1343static struct omap_hwmod omap44xx_iva_hwmod = {
@@ -2780,10 +1356,6 @@ static struct omap_hwmod omap44xx_iva_hwmod = {
2780 .modulemode = MODULEMODE_HWCTRL, 1356 .modulemode = MODULEMODE_HWCTRL,
2781 }, 1357 },
2782 }, 1358 },
2783 .slaves = omap44xx_iva_slaves,
2784 .slaves_cnt = ARRAY_SIZE(omap44xx_iva_slaves),
2785 .masters = omap44xx_iva_masters,
2786 .masters_cnt = ARRAY_SIZE(omap44xx_iva_masters),
2787}; 1359};
2788 1360
2789/* 1361/*
@@ -2809,35 +1381,11 @@ static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
2809}; 1381};
2810 1382
2811/* kbd */ 1383/* kbd */
2812static struct omap_hwmod omap44xx_kbd_hwmod;
2813static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = { 1384static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
2814 { .irq = 120 + OMAP44XX_IRQ_GIC_START }, 1385 { .irq = 120 + OMAP44XX_IRQ_GIC_START },
2815 { .irq = -1 } 1386 { .irq = -1 }
2816}; 1387};
2817 1388
2818static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
2819 {
2820 .pa_start = 0x4a31c000,
2821 .pa_end = 0x4a31c07f,
2822 .flags = ADDR_TYPE_RT
2823 },
2824 { }
2825};
2826
2827/* l4_wkup -> kbd */
2828static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
2829 .master = &omap44xx_l4_wkup_hwmod,
2830 .slave = &omap44xx_kbd_hwmod,
2831 .clk = "l4_wkup_clk_mux_ck",
2832 .addr = omap44xx_kbd_addrs,
2833 .user = OCP_USER_MPU | OCP_USER_SDMA,
2834};
2835
2836/* kbd slave ports */
2837static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = {
2838 &omap44xx_l4_wkup__kbd,
2839};
2840
2841static struct omap_hwmod omap44xx_kbd_hwmod = { 1389static struct omap_hwmod omap44xx_kbd_hwmod = {
2842 .name = "kbd", 1390 .name = "kbd",
2843 .class = &omap44xx_kbd_hwmod_class, 1391 .class = &omap44xx_kbd_hwmod_class,
@@ -2851,8 +1399,6 @@ static struct omap_hwmod omap44xx_kbd_hwmod = {
2851 .modulemode = MODULEMODE_SWCTRL, 1399 .modulemode = MODULEMODE_SWCTRL,
2852 }, 1400 },
2853 }, 1401 },
2854 .slaves = omap44xx_kbd_slaves,
2855 .slaves_cnt = ARRAY_SIZE(omap44xx_kbd_slaves),
2856}; 1402};
2857 1403
2858/* 1404/*
@@ -2876,35 +1422,11 @@ static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
2876}; 1422};
2877 1423
2878/* mailbox */ 1424/* mailbox */
2879static struct omap_hwmod omap44xx_mailbox_hwmod;
2880static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = { 1425static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
2881 { .irq = 26 + OMAP44XX_IRQ_GIC_START }, 1426 { .irq = 26 + OMAP44XX_IRQ_GIC_START },
2882 { .irq = -1 } 1427 { .irq = -1 }
2883}; 1428};
2884 1429
2885static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
2886 {
2887 .pa_start = 0x4a0f4000,
2888 .pa_end = 0x4a0f41ff,
2889 .flags = ADDR_TYPE_RT
2890 },
2891 { }
2892};
2893
2894/* l4_cfg -> mailbox */
2895static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
2896 .master = &omap44xx_l4_cfg_hwmod,
2897 .slave = &omap44xx_mailbox_hwmod,
2898 .clk = "l4_div_ck",
2899 .addr = omap44xx_mailbox_addrs,
2900 .user = OCP_USER_MPU | OCP_USER_SDMA,
2901};
2902
2903/* mailbox slave ports */
2904static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = {
2905 &omap44xx_l4_cfg__mailbox,
2906};
2907
2908static struct omap_hwmod omap44xx_mailbox_hwmod = { 1430static struct omap_hwmod omap44xx_mailbox_hwmod = {
2909 .name = "mailbox", 1431 .name = "mailbox",
2910 .class = &omap44xx_mailbox_hwmod_class, 1432 .class = &omap44xx_mailbox_hwmod_class,
@@ -2916,8 +1438,6 @@ static struct omap_hwmod omap44xx_mailbox_hwmod = {
2916 .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET, 1438 .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET,
2917 }, 1439 },
2918 }, 1440 },
2919 .slaves = omap44xx_mailbox_slaves,
2920 .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves),
2921}; 1441};
2922 1442
2923/* 1443/*
@@ -2940,7 +1460,6 @@ static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
2940}; 1460};
2941 1461
2942/* mcbsp1 */ 1462/* mcbsp1 */
2943static struct omap_hwmod omap44xx_mcbsp1_hwmod;
2944static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = { 1463static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
2945 { .irq = 17 + OMAP44XX_IRQ_GIC_START }, 1464 { .irq = 17 + OMAP44XX_IRQ_GIC_START },
2946 { .irq = -1 } 1465 { .irq = -1 }
@@ -2952,50 +1471,6 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
2952 { .dma_req = -1 } 1471 { .dma_req = -1 }
2953}; 1472};
2954 1473
2955static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
2956 {
2957 .name = "mpu",
2958 .pa_start = 0x40122000,
2959 .pa_end = 0x401220ff,
2960 .flags = ADDR_TYPE_RT
2961 },
2962 { }
2963};
2964
2965/* l4_abe -> mcbsp1 */
2966static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
2967 .master = &omap44xx_l4_abe_hwmod,
2968 .slave = &omap44xx_mcbsp1_hwmod,
2969 .clk = "ocp_abe_iclk",
2970 .addr = omap44xx_mcbsp1_addrs,
2971 .user = OCP_USER_MPU,
2972};
2973
2974static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
2975 {
2976 .name = "dma",
2977 .pa_start = 0x49022000,
2978 .pa_end = 0x490220ff,
2979 .flags = ADDR_TYPE_RT
2980 },
2981 { }
2982};
2983
2984/* l4_abe -> mcbsp1 (dma) */
2985static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
2986 .master = &omap44xx_l4_abe_hwmod,
2987 .slave = &omap44xx_mcbsp1_hwmod,
2988 .clk = "ocp_abe_iclk",
2989 .addr = omap44xx_mcbsp1_dma_addrs,
2990 .user = OCP_USER_SDMA,
2991};
2992
2993/* mcbsp1 slave ports */
2994static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
2995 &omap44xx_l4_abe__mcbsp1,
2996 &omap44xx_l4_abe__mcbsp1_dma,
2997};
2998
2999static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = { 1474static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = {
3000 { .role = "pad_fck", .clk = "pad_clks_ck" }, 1475 { .role = "pad_fck", .clk = "pad_clks_ck" },
3001 { .role = "prcm_clk", .clk = "mcbsp1_sync_mux_ck" }, 1476 { .role = "prcm_clk", .clk = "mcbsp1_sync_mux_ck" },
@@ -3015,14 +1490,11 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
3015 .modulemode = MODULEMODE_SWCTRL, 1490 .modulemode = MODULEMODE_SWCTRL,
3016 }, 1491 },
3017 }, 1492 },
3018 .slaves = omap44xx_mcbsp1_slaves,
3019 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
3020 .opt_clks = mcbsp1_opt_clks, 1493 .opt_clks = mcbsp1_opt_clks,
3021 .opt_clks_cnt = ARRAY_SIZE(mcbsp1_opt_clks), 1494 .opt_clks_cnt = ARRAY_SIZE(mcbsp1_opt_clks),
3022}; 1495};
3023 1496
3024/* mcbsp2 */ 1497/* mcbsp2 */
3025static struct omap_hwmod omap44xx_mcbsp2_hwmod;
3026static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = { 1498static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
3027 { .irq = 22 + OMAP44XX_IRQ_GIC_START }, 1499 { .irq = 22 + OMAP44XX_IRQ_GIC_START },
3028 { .irq = -1 } 1500 { .irq = -1 }
@@ -3034,50 +1506,6 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
3034 { .dma_req = -1 } 1506 { .dma_req = -1 }
3035}; 1507};
3036 1508
3037static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
3038 {
3039 .name = "mpu",
3040 .pa_start = 0x40124000,
3041 .pa_end = 0x401240ff,
3042 .flags = ADDR_TYPE_RT
3043 },
3044 { }
3045};
3046
3047/* l4_abe -> mcbsp2 */
3048static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
3049 .master = &omap44xx_l4_abe_hwmod,
3050 .slave = &omap44xx_mcbsp2_hwmod,
3051 .clk = "ocp_abe_iclk",
3052 .addr = omap44xx_mcbsp2_addrs,
3053 .user = OCP_USER_MPU,
3054};
3055
3056static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
3057 {
3058 .name = "dma",
3059 .pa_start = 0x49024000,
3060 .pa_end = 0x490240ff,
3061 .flags = ADDR_TYPE_RT
3062 },
3063 { }
3064};
3065
3066/* l4_abe -> mcbsp2 (dma) */
3067static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
3068 .master = &omap44xx_l4_abe_hwmod,
3069 .slave = &omap44xx_mcbsp2_hwmod,
3070 .clk = "ocp_abe_iclk",
3071 .addr = omap44xx_mcbsp2_dma_addrs,
3072 .user = OCP_USER_SDMA,
3073};
3074
3075/* mcbsp2 slave ports */
3076static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
3077 &omap44xx_l4_abe__mcbsp2,
3078 &omap44xx_l4_abe__mcbsp2_dma,
3079};
3080
3081static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = { 1509static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = {
3082 { .role = "pad_fck", .clk = "pad_clks_ck" }, 1510 { .role = "pad_fck", .clk = "pad_clks_ck" },
3083 { .role = "prcm_clk", .clk = "mcbsp2_sync_mux_ck" }, 1511 { .role = "prcm_clk", .clk = "mcbsp2_sync_mux_ck" },
@@ -3097,14 +1525,11 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
3097 .modulemode = MODULEMODE_SWCTRL, 1525 .modulemode = MODULEMODE_SWCTRL,
3098 }, 1526 },
3099 }, 1527 },
3100 .slaves = omap44xx_mcbsp2_slaves,
3101 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
3102 .opt_clks = mcbsp2_opt_clks, 1528 .opt_clks = mcbsp2_opt_clks,
3103 .opt_clks_cnt = ARRAY_SIZE(mcbsp2_opt_clks), 1529 .opt_clks_cnt = ARRAY_SIZE(mcbsp2_opt_clks),
3104}; 1530};
3105 1531
3106/* mcbsp3 */ 1532/* mcbsp3 */
3107static struct omap_hwmod omap44xx_mcbsp3_hwmod;
3108static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = { 1533static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
3109 { .irq = 23 + OMAP44XX_IRQ_GIC_START }, 1534 { .irq = 23 + OMAP44XX_IRQ_GIC_START },
3110 { .irq = -1 } 1535 { .irq = -1 }
@@ -3116,50 +1541,6 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
3116 { .dma_req = -1 } 1541 { .dma_req = -1 }
3117}; 1542};
3118 1543
3119static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
3120 {
3121 .name = "mpu",
3122 .pa_start = 0x40126000,
3123 .pa_end = 0x401260ff,
3124 .flags = ADDR_TYPE_RT
3125 },
3126 { }
3127};
3128
3129/* l4_abe -> mcbsp3 */
3130static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
3131 .master = &omap44xx_l4_abe_hwmod,
3132 .slave = &omap44xx_mcbsp3_hwmod,
3133 .clk = "ocp_abe_iclk",
3134 .addr = omap44xx_mcbsp3_addrs,
3135 .user = OCP_USER_MPU,
3136};
3137
3138static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
3139 {
3140 .name = "dma",
3141 .pa_start = 0x49026000,
3142 .pa_end = 0x490260ff,
3143 .flags = ADDR_TYPE_RT
3144 },
3145 { }
3146};
3147
3148/* l4_abe -> mcbsp3 (dma) */
3149static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
3150 .master = &omap44xx_l4_abe_hwmod,
3151 .slave = &omap44xx_mcbsp3_hwmod,
3152 .clk = "ocp_abe_iclk",
3153 .addr = omap44xx_mcbsp3_dma_addrs,
3154 .user = OCP_USER_SDMA,
3155};
3156
3157/* mcbsp3 slave ports */
3158static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
3159 &omap44xx_l4_abe__mcbsp3,
3160 &omap44xx_l4_abe__mcbsp3_dma,
3161};
3162
3163static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = { 1544static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = {
3164 { .role = "pad_fck", .clk = "pad_clks_ck" }, 1545 { .role = "pad_fck", .clk = "pad_clks_ck" },
3165 { .role = "prcm_clk", .clk = "mcbsp3_sync_mux_ck" }, 1546 { .role = "prcm_clk", .clk = "mcbsp3_sync_mux_ck" },
@@ -3179,14 +1560,11 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
3179 .modulemode = MODULEMODE_SWCTRL, 1560 .modulemode = MODULEMODE_SWCTRL,
3180 }, 1561 },
3181 }, 1562 },
3182 .slaves = omap44xx_mcbsp3_slaves,
3183 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
3184 .opt_clks = mcbsp3_opt_clks, 1563 .opt_clks = mcbsp3_opt_clks,
3185 .opt_clks_cnt = ARRAY_SIZE(mcbsp3_opt_clks), 1564 .opt_clks_cnt = ARRAY_SIZE(mcbsp3_opt_clks),
3186}; 1565};
3187 1566
3188/* mcbsp4 */ 1567/* mcbsp4 */
3189static struct omap_hwmod omap44xx_mcbsp4_hwmod;
3190static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = { 1568static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
3191 { .irq = 16 + OMAP44XX_IRQ_GIC_START }, 1569 { .irq = 16 + OMAP44XX_IRQ_GIC_START },
3192 { .irq = -1 } 1570 { .irq = -1 }
@@ -3198,29 +1576,6 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
3198 { .dma_req = -1 } 1576 { .dma_req = -1 }
3199}; 1577};
3200 1578
3201static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
3202 {
3203 .pa_start = 0x48096000,
3204 .pa_end = 0x480960ff,
3205 .flags = ADDR_TYPE_RT
3206 },
3207 { }
3208};
3209
3210/* l4_per -> mcbsp4 */
3211static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
3212 .master = &omap44xx_l4_per_hwmod,
3213 .slave = &omap44xx_mcbsp4_hwmod,
3214 .clk = "l4_div_ck",
3215 .addr = omap44xx_mcbsp4_addrs,
3216 .user = OCP_USER_MPU | OCP_USER_SDMA,
3217};
3218
3219/* mcbsp4 slave ports */
3220static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
3221 &omap44xx_l4_per__mcbsp4,
3222};
3223
3224static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = { 1579static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = {
3225 { .role = "pad_fck", .clk = "pad_clks_ck" }, 1580 { .role = "pad_fck", .clk = "pad_clks_ck" },
3226 { .role = "prcm_clk", .clk = "mcbsp4_sync_mux_ck" }, 1581 { .role = "prcm_clk", .clk = "mcbsp4_sync_mux_ck" },
@@ -3240,8 +1595,6 @@ static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
3240 .modulemode = MODULEMODE_SWCTRL, 1595 .modulemode = MODULEMODE_SWCTRL,
3241 }, 1596 },
3242 }, 1597 },
3243 .slaves = omap44xx_mcbsp4_slaves,
3244 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
3245 .opt_clks = mcbsp4_opt_clks, 1598 .opt_clks = mcbsp4_opt_clks,
3246 .opt_clks_cnt = ARRAY_SIZE(mcbsp4_opt_clks), 1599 .opt_clks_cnt = ARRAY_SIZE(mcbsp4_opt_clks),
3247}; 1600};
@@ -3268,7 +1621,6 @@ static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
3268}; 1621};
3269 1622
3270/* mcpdm */ 1623/* mcpdm */
3271static struct omap_hwmod omap44xx_mcpdm_hwmod;
3272static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = { 1624static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = {
3273 { .irq = 112 + OMAP44XX_IRQ_GIC_START }, 1625 { .irq = 112 + OMAP44XX_IRQ_GIC_START },
3274 { .irq = -1 } 1626 { .irq = -1 }
@@ -3280,48 +1632,6 @@ static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = {
3280 { .dma_req = -1 } 1632 { .dma_req = -1 }
3281}; 1633};
3282 1634
3283static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
3284 {
3285 .pa_start = 0x40132000,
3286 .pa_end = 0x4013207f,
3287 .flags = ADDR_TYPE_RT
3288 },
3289 { }
3290};
3291
3292/* l4_abe -> mcpdm */
3293static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
3294 .master = &omap44xx_l4_abe_hwmod,
3295 .slave = &omap44xx_mcpdm_hwmod,
3296 .clk = "ocp_abe_iclk",
3297 .addr = omap44xx_mcpdm_addrs,
3298 .user = OCP_USER_MPU,
3299};
3300
3301static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
3302 {
3303 .pa_start = 0x49032000,
3304 .pa_end = 0x4903207f,
3305 .flags = ADDR_TYPE_RT
3306 },
3307 { }
3308};
3309
3310/* l4_abe -> mcpdm (dma) */
3311static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
3312 .master = &omap44xx_l4_abe_hwmod,
3313 .slave = &omap44xx_mcpdm_hwmod,
3314 .clk = "ocp_abe_iclk",
3315 .addr = omap44xx_mcpdm_dma_addrs,
3316 .user = OCP_USER_SDMA,
3317};
3318
3319/* mcpdm slave ports */
3320static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = {
3321 &omap44xx_l4_abe__mcpdm,
3322 &omap44xx_l4_abe__mcpdm_dma,
3323};
3324
3325static struct omap_hwmod omap44xx_mcpdm_hwmod = { 1635static struct omap_hwmod omap44xx_mcpdm_hwmod = {
3326 .name = "mcpdm", 1636 .name = "mcpdm",
3327 .class = &omap44xx_mcpdm_hwmod_class, 1637 .class = &omap44xx_mcpdm_hwmod_class,
@@ -3336,8 +1646,6 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = {
3336 .modulemode = MODULEMODE_SWCTRL, 1646 .modulemode = MODULEMODE_SWCTRL,
3337 }, 1647 },
3338 }, 1648 },
3339 .slaves = omap44xx_mcpdm_slaves,
3340 .slaves_cnt = ARRAY_SIZE(omap44xx_mcpdm_slaves),
3341}; 1649};
3342 1650
3343/* 1651/*
@@ -3363,7 +1671,6 @@ static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
3363}; 1671};
3364 1672
3365/* mcspi1 */ 1673/* mcspi1 */
3366static struct omap_hwmod omap44xx_mcspi1_hwmod;
3367static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = { 1674static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = {
3368 { .irq = 65 + OMAP44XX_IRQ_GIC_START }, 1675 { .irq = 65 + OMAP44XX_IRQ_GIC_START },
3369 { .irq = -1 } 1676 { .irq = -1 }
@@ -3381,29 +1688,6 @@ static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
3381 { .dma_req = -1 } 1688 { .dma_req = -1 }
3382}; 1689};
3383 1690
3384static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
3385 {
3386 .pa_start = 0x48098000,
3387 .pa_end = 0x480981ff,
3388 .flags = ADDR_TYPE_RT
3389 },
3390 { }
3391};
3392
3393/* l4_per -> mcspi1 */
3394static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
3395 .master = &omap44xx_l4_per_hwmod,
3396 .slave = &omap44xx_mcspi1_hwmod,
3397 .clk = "l4_div_ck",
3398 .addr = omap44xx_mcspi1_addrs,
3399 .user = OCP_USER_MPU | OCP_USER_SDMA,
3400};
3401
3402/* mcspi1 slave ports */
3403static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = {
3404 &omap44xx_l4_per__mcspi1,
3405};
3406
3407/* mcspi1 dev_attr */ 1691/* mcspi1 dev_attr */
3408static struct omap2_mcspi_dev_attr mcspi1_dev_attr = { 1692static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
3409 .num_chipselect = 4, 1693 .num_chipselect = 4,
@@ -3424,12 +1708,9 @@ static struct omap_hwmod omap44xx_mcspi1_hwmod = {
3424 }, 1708 },
3425 }, 1709 },
3426 .dev_attr = &mcspi1_dev_attr, 1710 .dev_attr = &mcspi1_dev_attr,
3427 .slaves = omap44xx_mcspi1_slaves,
3428 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves),
3429}; 1711};
3430 1712
3431/* mcspi2 */ 1713/* mcspi2 */
3432static struct omap_hwmod omap44xx_mcspi2_hwmod;
3433static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = { 1714static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = {
3434 { .irq = 66 + OMAP44XX_IRQ_GIC_START }, 1715 { .irq = 66 + OMAP44XX_IRQ_GIC_START },
3435 { .irq = -1 } 1716 { .irq = -1 }
@@ -3443,29 +1724,6 @@ static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
3443 { .dma_req = -1 } 1724 { .dma_req = -1 }
3444}; 1725};
3445 1726
3446static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
3447 {
3448 .pa_start = 0x4809a000,
3449 .pa_end = 0x4809a1ff,
3450 .flags = ADDR_TYPE_RT
3451 },
3452 { }
3453};
3454
3455/* l4_per -> mcspi2 */
3456static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
3457 .master = &omap44xx_l4_per_hwmod,
3458 .slave = &omap44xx_mcspi2_hwmod,
3459 .clk = "l4_div_ck",
3460 .addr = omap44xx_mcspi2_addrs,
3461 .user = OCP_USER_MPU | OCP_USER_SDMA,
3462};
3463
3464/* mcspi2 slave ports */
3465static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = {
3466 &omap44xx_l4_per__mcspi2,
3467};
3468
3469/* mcspi2 dev_attr */ 1727/* mcspi2 dev_attr */
3470static struct omap2_mcspi_dev_attr mcspi2_dev_attr = { 1728static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
3471 .num_chipselect = 2, 1729 .num_chipselect = 2,
@@ -3486,12 +1744,9 @@ static struct omap_hwmod omap44xx_mcspi2_hwmod = {
3486 }, 1744 },
3487 }, 1745 },
3488 .dev_attr = &mcspi2_dev_attr, 1746 .dev_attr = &mcspi2_dev_attr,
3489 .slaves = omap44xx_mcspi2_slaves,
3490 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves),
3491}; 1747};
3492 1748
3493/* mcspi3 */ 1749/* mcspi3 */
3494static struct omap_hwmod omap44xx_mcspi3_hwmod;
3495static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = { 1750static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = {
3496 { .irq = 91 + OMAP44XX_IRQ_GIC_START }, 1751 { .irq = 91 + OMAP44XX_IRQ_GIC_START },
3497 { .irq = -1 } 1752 { .irq = -1 }
@@ -3505,29 +1760,6 @@ static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
3505 { .dma_req = -1 } 1760 { .dma_req = -1 }
3506}; 1761};
3507 1762
3508static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
3509 {
3510 .pa_start = 0x480b8000,
3511 .pa_end = 0x480b81ff,
3512 .flags = ADDR_TYPE_RT
3513 },
3514 { }
3515};
3516
3517/* l4_per -> mcspi3 */
3518static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
3519 .master = &omap44xx_l4_per_hwmod,
3520 .slave = &omap44xx_mcspi3_hwmod,
3521 .clk = "l4_div_ck",
3522 .addr = omap44xx_mcspi3_addrs,
3523 .user = OCP_USER_MPU | OCP_USER_SDMA,
3524};
3525
3526/* mcspi3 slave ports */
3527static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = {
3528 &omap44xx_l4_per__mcspi3,
3529};
3530
3531/* mcspi3 dev_attr */ 1763/* mcspi3 dev_attr */
3532static struct omap2_mcspi_dev_attr mcspi3_dev_attr = { 1764static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
3533 .num_chipselect = 2, 1765 .num_chipselect = 2,
@@ -3548,12 +1780,9 @@ static struct omap_hwmod omap44xx_mcspi3_hwmod = {
3548 }, 1780 },
3549 }, 1781 },
3550 .dev_attr = &mcspi3_dev_attr, 1782 .dev_attr = &mcspi3_dev_attr,
3551 .slaves = omap44xx_mcspi3_slaves,
3552 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves),
3553}; 1783};
3554 1784
3555/* mcspi4 */ 1785/* mcspi4 */
3556static struct omap_hwmod omap44xx_mcspi4_hwmod;
3557static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = { 1786static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = {
3558 { .irq = 48 + OMAP44XX_IRQ_GIC_START }, 1787 { .irq = 48 + OMAP44XX_IRQ_GIC_START },
3559 { .irq = -1 } 1788 { .irq = -1 }
@@ -3565,29 +1794,6 @@ static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = {
3565 { .dma_req = -1 } 1794 { .dma_req = -1 }
3566}; 1795};
3567 1796
3568static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
3569 {
3570 .pa_start = 0x480ba000,
3571 .pa_end = 0x480ba1ff,
3572 .flags = ADDR_TYPE_RT
3573 },
3574 { }
3575};
3576
3577/* l4_per -> mcspi4 */
3578static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
3579 .master = &omap44xx_l4_per_hwmod,
3580 .slave = &omap44xx_mcspi4_hwmod,
3581 .clk = "l4_div_ck",
3582 .addr = omap44xx_mcspi4_addrs,
3583 .user = OCP_USER_MPU | OCP_USER_SDMA,
3584};
3585
3586/* mcspi4 slave ports */
3587static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = {
3588 &omap44xx_l4_per__mcspi4,
3589};
3590
3591/* mcspi4 dev_attr */ 1797/* mcspi4 dev_attr */
3592static struct omap2_mcspi_dev_attr mcspi4_dev_attr = { 1798static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
3593 .num_chipselect = 1, 1799 .num_chipselect = 1,
@@ -3608,8 +1814,6 @@ static struct omap_hwmod omap44xx_mcspi4_hwmod = {
3608 }, 1814 },
3609 }, 1815 },
3610 .dev_attr = &mcspi4_dev_attr, 1816 .dev_attr = &mcspi4_dev_attr,
3611 .slaves = omap44xx_mcspi4_slaves,
3612 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves),
3613}; 1817};
3614 1818
3615/* 1819/*
@@ -3646,34 +1850,6 @@ static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = {
3646 { .dma_req = -1 } 1850 { .dma_req = -1 }
3647}; 1851};
3648 1852
3649/* mmc1 master ports */
3650static struct omap_hwmod_ocp_if *omap44xx_mmc1_masters[] = {
3651 &omap44xx_mmc1__l3_main_1,
3652};
3653
3654static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
3655 {
3656 .pa_start = 0x4809c000,
3657 .pa_end = 0x4809c3ff,
3658 .flags = ADDR_TYPE_RT
3659 },
3660 { }
3661};
3662
3663/* l4_per -> mmc1 */
3664static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
3665 .master = &omap44xx_l4_per_hwmod,
3666 .slave = &omap44xx_mmc1_hwmod,
3667 .clk = "l4_div_ck",
3668 .addr = omap44xx_mmc1_addrs,
3669 .user = OCP_USER_MPU | OCP_USER_SDMA,
3670};
3671
3672/* mmc1 slave ports */
3673static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = {
3674 &omap44xx_l4_per__mmc1,
3675};
3676
3677/* mmc1 dev_attr */ 1853/* mmc1 dev_attr */
3678static struct omap_mmc_dev_attr mmc1_dev_attr = { 1854static struct omap_mmc_dev_attr mmc1_dev_attr = {
3679 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, 1855 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
@@ -3694,10 +1870,6 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = {
3694 }, 1870 },
3695 }, 1871 },
3696 .dev_attr = &mmc1_dev_attr, 1872 .dev_attr = &mmc1_dev_attr,
3697 .slaves = omap44xx_mmc1_slaves,
3698 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves),
3699 .masters = omap44xx_mmc1_masters,
3700 .masters_cnt = ARRAY_SIZE(omap44xx_mmc1_masters),
3701}; 1873};
3702 1874
3703/* mmc2 */ 1875/* mmc2 */
@@ -3712,34 +1884,6 @@ static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = {
3712 { .dma_req = -1 } 1884 { .dma_req = -1 }
3713}; 1885};
3714 1886
3715/* mmc2 master ports */
3716static struct omap_hwmod_ocp_if *omap44xx_mmc2_masters[] = {
3717 &omap44xx_mmc2__l3_main_1,
3718};
3719
3720static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
3721 {
3722 .pa_start = 0x480b4000,
3723 .pa_end = 0x480b43ff,
3724 .flags = ADDR_TYPE_RT
3725 },
3726 { }
3727};
3728
3729/* l4_per -> mmc2 */
3730static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
3731 .master = &omap44xx_l4_per_hwmod,
3732 .slave = &omap44xx_mmc2_hwmod,
3733 .clk = "l4_div_ck",
3734 .addr = omap44xx_mmc2_addrs,
3735 .user = OCP_USER_MPU | OCP_USER_SDMA,
3736};
3737
3738/* mmc2 slave ports */
3739static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = {
3740 &omap44xx_l4_per__mmc2,
3741};
3742
3743static struct omap_hwmod omap44xx_mmc2_hwmod = { 1887static struct omap_hwmod omap44xx_mmc2_hwmod = {
3744 .name = "mmc2", 1888 .name = "mmc2",
3745 .class = &omap44xx_mmc_hwmod_class, 1889 .class = &omap44xx_mmc_hwmod_class,
@@ -3754,14 +1898,9 @@ static struct omap_hwmod omap44xx_mmc2_hwmod = {
3754 .modulemode = MODULEMODE_SWCTRL, 1898 .modulemode = MODULEMODE_SWCTRL,
3755 }, 1899 },
3756 }, 1900 },
3757 .slaves = omap44xx_mmc2_slaves,
3758 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc2_slaves),
3759 .masters = omap44xx_mmc2_masters,
3760 .masters_cnt = ARRAY_SIZE(omap44xx_mmc2_masters),
3761}; 1901};
3762 1902
3763/* mmc3 */ 1903/* mmc3 */
3764static struct omap_hwmod omap44xx_mmc3_hwmod;
3765static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = { 1904static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = {
3766 { .irq = 94 + OMAP44XX_IRQ_GIC_START }, 1905 { .irq = 94 + OMAP44XX_IRQ_GIC_START },
3767 { .irq = -1 } 1906 { .irq = -1 }
@@ -3773,29 +1912,6 @@ static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = {
3773 { .dma_req = -1 } 1912 { .dma_req = -1 }
3774}; 1913};
3775 1914
3776static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
3777 {
3778 .pa_start = 0x480ad000,
3779 .pa_end = 0x480ad3ff,
3780 .flags = ADDR_TYPE_RT
3781 },
3782 { }
3783};
3784
3785/* l4_per -> mmc3 */
3786static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
3787 .master = &omap44xx_l4_per_hwmod,
3788 .slave = &omap44xx_mmc3_hwmod,
3789 .clk = "l4_div_ck",
3790 .addr = omap44xx_mmc3_addrs,
3791 .user = OCP_USER_MPU | OCP_USER_SDMA,
3792};
3793
3794/* mmc3 slave ports */
3795static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = {
3796 &omap44xx_l4_per__mmc3,
3797};
3798
3799static struct omap_hwmod omap44xx_mmc3_hwmod = { 1915static struct omap_hwmod omap44xx_mmc3_hwmod = {
3800 .name = "mmc3", 1916 .name = "mmc3",
3801 .class = &omap44xx_mmc_hwmod_class, 1917 .class = &omap44xx_mmc_hwmod_class,
@@ -3810,12 +1926,9 @@ static struct omap_hwmod omap44xx_mmc3_hwmod = {
3810 .modulemode = MODULEMODE_SWCTRL, 1926 .modulemode = MODULEMODE_SWCTRL,
3811 }, 1927 },
3812 }, 1928 },
3813 .slaves = omap44xx_mmc3_slaves,
3814 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc3_slaves),
3815}; 1929};
3816 1930
3817/* mmc4 */ 1931/* mmc4 */
3818static struct omap_hwmod omap44xx_mmc4_hwmod;
3819static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = { 1932static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = {
3820 { .irq = 96 + OMAP44XX_IRQ_GIC_START }, 1933 { .irq = 96 + OMAP44XX_IRQ_GIC_START },
3821 { .irq = -1 } 1934 { .irq = -1 }
@@ -3827,35 +1940,11 @@ static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = {
3827 { .dma_req = -1 } 1940 { .dma_req = -1 }
3828}; 1941};
3829 1942
3830static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
3831 {
3832 .pa_start = 0x480d1000,
3833 .pa_end = 0x480d13ff,
3834 .flags = ADDR_TYPE_RT
3835 },
3836 { }
3837};
3838
3839/* l4_per -> mmc4 */
3840static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
3841 .master = &omap44xx_l4_per_hwmod,
3842 .slave = &omap44xx_mmc4_hwmod,
3843 .clk = "l4_div_ck",
3844 .addr = omap44xx_mmc4_addrs,
3845 .user = OCP_USER_MPU | OCP_USER_SDMA,
3846};
3847
3848/* mmc4 slave ports */
3849static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = {
3850 &omap44xx_l4_per__mmc4,
3851};
3852
3853static struct omap_hwmod omap44xx_mmc4_hwmod = { 1943static struct omap_hwmod omap44xx_mmc4_hwmod = {
3854 .name = "mmc4", 1944 .name = "mmc4",
3855 .class = &omap44xx_mmc_hwmod_class, 1945 .class = &omap44xx_mmc_hwmod_class,
3856 .clkdm_name = "l4_per_clkdm", 1946 .clkdm_name = "l4_per_clkdm",
3857 .mpu_irqs = omap44xx_mmc4_irqs, 1947 .mpu_irqs = omap44xx_mmc4_irqs,
3858
3859 .sdma_reqs = omap44xx_mmc4_sdma_reqs, 1948 .sdma_reqs = omap44xx_mmc4_sdma_reqs,
3860 .main_clk = "mmc4_fck", 1949 .main_clk = "mmc4_fck",
3861 .prcm = { 1950 .prcm = {
@@ -3865,12 +1954,9 @@ static struct omap_hwmod omap44xx_mmc4_hwmod = {
3865 .modulemode = MODULEMODE_SWCTRL, 1954 .modulemode = MODULEMODE_SWCTRL,
3866 }, 1955 },
3867 }, 1956 },
3868 .slaves = omap44xx_mmc4_slaves,
3869 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc4_slaves),
3870}; 1957};
3871 1958
3872/* mmc5 */ 1959/* mmc5 */
3873static struct omap_hwmod omap44xx_mmc5_hwmod;
3874static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = { 1960static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = {
3875 { .irq = 59 + OMAP44XX_IRQ_GIC_START }, 1961 { .irq = 59 + OMAP44XX_IRQ_GIC_START },
3876 { .irq = -1 } 1962 { .irq = -1 }
@@ -3882,29 +1968,6 @@ static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = {
3882 { .dma_req = -1 } 1968 { .dma_req = -1 }
3883}; 1969};
3884 1970
3885static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
3886 {
3887 .pa_start = 0x480d5000,
3888 .pa_end = 0x480d53ff,
3889 .flags = ADDR_TYPE_RT
3890 },
3891 { }
3892};
3893
3894/* l4_per -> mmc5 */
3895static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
3896 .master = &omap44xx_l4_per_hwmod,
3897 .slave = &omap44xx_mmc5_hwmod,
3898 .clk = "l4_div_ck",
3899 .addr = omap44xx_mmc5_addrs,
3900 .user = OCP_USER_MPU | OCP_USER_SDMA,
3901};
3902
3903/* mmc5 slave ports */
3904static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = {
3905 &omap44xx_l4_per__mmc5,
3906};
3907
3908static struct omap_hwmod omap44xx_mmc5_hwmod = { 1971static struct omap_hwmod omap44xx_mmc5_hwmod = {
3909 .name = "mmc5", 1972 .name = "mmc5",
3910 .class = &omap44xx_mmc_hwmod_class, 1973 .class = &omap44xx_mmc_hwmod_class,
@@ -3919,8 +1982,6 @@ static struct omap_hwmod omap44xx_mmc5_hwmod = {
3919 .modulemode = MODULEMODE_SWCTRL, 1982 .modulemode = MODULEMODE_SWCTRL,
3920 }, 1983 },
3921 }, 1984 },
3922 .slaves = omap44xx_mmc5_slaves,
3923 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc5_slaves),
3924}; 1985};
3925 1986
3926/* 1987/*
@@ -3940,13 +2001,6 @@ static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
3940 { .irq = -1 } 2001 { .irq = -1 }
3941}; 2002};
3942 2003
3943/* mpu master ports */
3944static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
3945 &omap44xx_mpu__l3_main_1,
3946 &omap44xx_mpu__l4_abe,
3947 &omap44xx_mpu__dmm,
3948};
3949
3950static struct omap_hwmod omap44xx_mpu_hwmod = { 2004static struct omap_hwmod omap44xx_mpu_hwmod = {
3951 .name = "mpu", 2005 .name = "mpu",
3952 .class = &omap44xx_mpu_hwmod_class, 2006 .class = &omap44xx_mpu_hwmod_class,
@@ -3960,8 +2014,6 @@ static struct omap_hwmod omap44xx_mpu_hwmod = {
3960 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET, 2014 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET,
3961 }, 2015 },
3962 }, 2016 },
3963 .masters = omap44xx_mpu_masters,
3964 .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters),
3965}; 2017};
3966 2018
3967/* 2019/*
@@ -3995,35 +2047,11 @@ static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
3995 .sensor_voltdm_name = "core", 2047 .sensor_voltdm_name = "core",
3996}; 2048};
3997 2049
3998static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
3999static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = { 2050static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
4000 { .irq = 19 + OMAP44XX_IRQ_GIC_START }, 2051 { .irq = 19 + OMAP44XX_IRQ_GIC_START },
4001 { .irq = -1 } 2052 { .irq = -1 }
4002}; 2053};
4003 2054
4004static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
4005 {
4006 .pa_start = 0x4a0dd000,
4007 .pa_end = 0x4a0dd03f,
4008 .flags = ADDR_TYPE_RT
4009 },
4010 { }
4011};
4012
4013/* l4_cfg -> smartreflex_core */
4014static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
4015 .master = &omap44xx_l4_cfg_hwmod,
4016 .slave = &omap44xx_smartreflex_core_hwmod,
4017 .clk = "l4_div_ck",
4018 .addr = omap44xx_smartreflex_core_addrs,
4019 .user = OCP_USER_MPU | OCP_USER_SDMA,
4020};
4021
4022/* smartreflex_core slave ports */
4023static struct omap_hwmod_ocp_if *omap44xx_smartreflex_core_slaves[] = {
4024 &omap44xx_l4_cfg__smartreflex_core,
4025};
4026
4027static struct omap_hwmod omap44xx_smartreflex_core_hwmod = { 2055static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
4028 .name = "smartreflex_core", 2056 .name = "smartreflex_core",
4029 .class = &omap44xx_smartreflex_hwmod_class, 2057 .class = &omap44xx_smartreflex_hwmod_class,
@@ -4038,8 +2066,6 @@ static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
4038 .modulemode = MODULEMODE_SWCTRL, 2066 .modulemode = MODULEMODE_SWCTRL,
4039 }, 2067 },
4040 }, 2068 },
4041 .slaves = omap44xx_smartreflex_core_slaves,
4042 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_slaves),
4043 .dev_attr = &smartreflex_core_dev_attr, 2069 .dev_attr = &smartreflex_core_dev_attr,
4044}; 2070};
4045 2071
@@ -4048,35 +2074,11 @@ static struct omap_smartreflex_dev_attr smartreflex_iva_dev_attr = {
4048 .sensor_voltdm_name = "iva", 2074 .sensor_voltdm_name = "iva",
4049}; 2075};
4050 2076
4051static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
4052static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = { 2077static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
4053 { .irq = 102 + OMAP44XX_IRQ_GIC_START }, 2078 { .irq = 102 + OMAP44XX_IRQ_GIC_START },
4054 { .irq = -1 } 2079 { .irq = -1 }
4055}; 2080};
4056 2081
4057static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
4058 {
4059 .pa_start = 0x4a0db000,
4060 .pa_end = 0x4a0db03f,
4061 .flags = ADDR_TYPE_RT
4062 },
4063 { }
4064};
4065
4066/* l4_cfg -> smartreflex_iva */
4067static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
4068 .master = &omap44xx_l4_cfg_hwmod,
4069 .slave = &omap44xx_smartreflex_iva_hwmod,
4070 .clk = "l4_div_ck",
4071 .addr = omap44xx_smartreflex_iva_addrs,
4072 .user = OCP_USER_MPU | OCP_USER_SDMA,
4073};
4074
4075/* smartreflex_iva slave ports */
4076static struct omap_hwmod_ocp_if *omap44xx_smartreflex_iva_slaves[] = {
4077 &omap44xx_l4_cfg__smartreflex_iva,
4078};
4079
4080static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = { 2082static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
4081 .name = "smartreflex_iva", 2083 .name = "smartreflex_iva",
4082 .class = &omap44xx_smartreflex_hwmod_class, 2084 .class = &omap44xx_smartreflex_hwmod_class,
@@ -4090,8 +2092,6 @@ static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
4090 .modulemode = MODULEMODE_SWCTRL, 2092 .modulemode = MODULEMODE_SWCTRL,
4091 }, 2093 },
4092 }, 2094 },
4093 .slaves = omap44xx_smartreflex_iva_slaves,
4094 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_slaves),
4095 .dev_attr = &smartreflex_iva_dev_attr, 2095 .dev_attr = &smartreflex_iva_dev_attr,
4096}; 2096};
4097 2097
@@ -4100,35 +2100,11 @@ static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
4100 .sensor_voltdm_name = "mpu", 2100 .sensor_voltdm_name = "mpu",
4101}; 2101};
4102 2102
4103static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod;
4104static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = { 2103static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
4105 { .irq = 18 + OMAP44XX_IRQ_GIC_START }, 2104 { .irq = 18 + OMAP44XX_IRQ_GIC_START },
4106 { .irq = -1 } 2105 { .irq = -1 }
4107}; 2106};
4108 2107
4109static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
4110 {
4111 .pa_start = 0x4a0d9000,
4112 .pa_end = 0x4a0d903f,
4113 .flags = ADDR_TYPE_RT
4114 },
4115 { }
4116};
4117
4118/* l4_cfg -> smartreflex_mpu */
4119static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
4120 .master = &omap44xx_l4_cfg_hwmod,
4121 .slave = &omap44xx_smartreflex_mpu_hwmod,
4122 .clk = "l4_div_ck",
4123 .addr = omap44xx_smartreflex_mpu_addrs,
4124 .user = OCP_USER_MPU | OCP_USER_SDMA,
4125};
4126
4127/* smartreflex_mpu slave ports */
4128static struct omap_hwmod_ocp_if *omap44xx_smartreflex_mpu_slaves[] = {
4129 &omap44xx_l4_cfg__smartreflex_mpu,
4130};
4131
4132static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = { 2108static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
4133 .name = "smartreflex_mpu", 2109 .name = "smartreflex_mpu",
4134 .class = &omap44xx_smartreflex_hwmod_class, 2110 .class = &omap44xx_smartreflex_hwmod_class,
@@ -4142,8 +2118,6 @@ static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
4142 .modulemode = MODULEMODE_SWCTRL, 2118 .modulemode = MODULEMODE_SWCTRL,
4143 }, 2119 },
4144 }, 2120 },
4145 .slaves = omap44xx_smartreflex_mpu_slaves,
4146 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_slaves),
4147 .dev_attr = &smartreflex_mpu_dev_attr, 2121 .dev_attr = &smartreflex_mpu_dev_attr,
4148}; 2122};
4149 2123
@@ -4171,30 +2145,6 @@ static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = {
4171}; 2145};
4172 2146
4173/* spinlock */ 2147/* spinlock */
4174static struct omap_hwmod omap44xx_spinlock_hwmod;
4175static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
4176 {
4177 .pa_start = 0x4a0f6000,
4178 .pa_end = 0x4a0f6fff,
4179 .flags = ADDR_TYPE_RT
4180 },
4181 { }
4182};
4183
4184/* l4_cfg -> spinlock */
4185static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
4186 .master = &omap44xx_l4_cfg_hwmod,
4187 .slave = &omap44xx_spinlock_hwmod,
4188 .clk = "l4_div_ck",
4189 .addr = omap44xx_spinlock_addrs,
4190 .user = OCP_USER_MPU | OCP_USER_SDMA,
4191};
4192
4193/* spinlock slave ports */
4194static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = {
4195 &omap44xx_l4_cfg__spinlock,
4196};
4197
4198static struct omap_hwmod omap44xx_spinlock_hwmod = { 2148static struct omap_hwmod omap44xx_spinlock_hwmod = {
4199 .name = "spinlock", 2149 .name = "spinlock",
4200 .class = &omap44xx_spinlock_hwmod_class, 2150 .class = &omap44xx_spinlock_hwmod_class,
@@ -4205,8 +2155,6 @@ static struct omap_hwmod omap44xx_spinlock_hwmod = {
4205 .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET, 2155 .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET,
4206 }, 2156 },
4207 }, 2157 },
4208 .slaves = omap44xx_spinlock_slaves,
4209 .slaves_cnt = ARRAY_SIZE(omap44xx_spinlock_slaves),
4210}; 2158};
4211 2159
4212/* 2160/*
@@ -4258,35 +2206,11 @@ static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
4258}; 2206};
4259 2207
4260/* timer1 */ 2208/* timer1 */
4261static struct omap_hwmod omap44xx_timer1_hwmod;
4262static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = { 2209static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
4263 { .irq = 37 + OMAP44XX_IRQ_GIC_START }, 2210 { .irq = 37 + OMAP44XX_IRQ_GIC_START },
4264 { .irq = -1 } 2211 { .irq = -1 }
4265}; 2212};
4266 2213
4267static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
4268 {
4269 .pa_start = 0x4a318000,
4270 .pa_end = 0x4a31807f,
4271 .flags = ADDR_TYPE_RT
4272 },
4273 { }
4274};
4275
4276/* l4_wkup -> timer1 */
4277static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
4278 .master = &omap44xx_l4_wkup_hwmod,
4279 .slave = &omap44xx_timer1_hwmod,
4280 .clk = "l4_wkup_clk_mux_ck",
4281 .addr = omap44xx_timer1_addrs,
4282 .user = OCP_USER_MPU | OCP_USER_SDMA,
4283};
4284
4285/* timer1 slave ports */
4286static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = {
4287 &omap44xx_l4_wkup__timer1,
4288};
4289
4290static struct omap_hwmod omap44xx_timer1_hwmod = { 2214static struct omap_hwmod omap44xx_timer1_hwmod = {
4291 .name = "timer1", 2215 .name = "timer1",
4292 .class = &omap44xx_timer_1ms_hwmod_class, 2216 .class = &omap44xx_timer_1ms_hwmod_class,
@@ -4301,40 +2225,14 @@ static struct omap_hwmod omap44xx_timer1_hwmod = {
4301 }, 2225 },
4302 }, 2226 },
4303 .dev_attr = &capability_alwon_dev_attr, 2227 .dev_attr = &capability_alwon_dev_attr,
4304 .slaves = omap44xx_timer1_slaves,
4305 .slaves_cnt = ARRAY_SIZE(omap44xx_timer1_slaves),
4306}; 2228};
4307 2229
4308/* timer2 */ 2230/* timer2 */
4309static struct omap_hwmod omap44xx_timer2_hwmod;
4310static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = { 2231static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = {
4311 { .irq = 38 + OMAP44XX_IRQ_GIC_START }, 2232 { .irq = 38 + OMAP44XX_IRQ_GIC_START },
4312 { .irq = -1 } 2233 { .irq = -1 }
4313}; 2234};
4314 2235
4315static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
4316 {
4317 .pa_start = 0x48032000,
4318 .pa_end = 0x4803207f,
4319 .flags = ADDR_TYPE_RT
4320 },
4321 { }
4322};
4323
4324/* l4_per -> timer2 */
4325static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
4326 .master = &omap44xx_l4_per_hwmod,
4327 .slave = &omap44xx_timer2_hwmod,
4328 .clk = "l4_div_ck",
4329 .addr = omap44xx_timer2_addrs,
4330 .user = OCP_USER_MPU | OCP_USER_SDMA,
4331};
4332
4333/* timer2 slave ports */
4334static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = {
4335 &omap44xx_l4_per__timer2,
4336};
4337
4338static struct omap_hwmod omap44xx_timer2_hwmod = { 2236static struct omap_hwmod omap44xx_timer2_hwmod = {
4339 .name = "timer2", 2237 .name = "timer2",
4340 .class = &omap44xx_timer_1ms_hwmod_class, 2238 .class = &omap44xx_timer_1ms_hwmod_class,
@@ -4349,40 +2247,14 @@ static struct omap_hwmod omap44xx_timer2_hwmod = {
4349 }, 2247 },
4350 }, 2248 },
4351 .dev_attr = &capability_alwon_dev_attr, 2249 .dev_attr = &capability_alwon_dev_attr,
4352 .slaves = omap44xx_timer2_slaves,
4353 .slaves_cnt = ARRAY_SIZE(omap44xx_timer2_slaves),
4354}; 2250};
4355 2251
4356/* timer3 */ 2252/* timer3 */
4357static struct omap_hwmod omap44xx_timer3_hwmod;
4358static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = { 2253static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = {
4359 { .irq = 39 + OMAP44XX_IRQ_GIC_START }, 2254 { .irq = 39 + OMAP44XX_IRQ_GIC_START },
4360 { .irq = -1 } 2255 { .irq = -1 }
4361}; 2256};
4362 2257
4363static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
4364 {
4365 .pa_start = 0x48034000,
4366 .pa_end = 0x4803407f,
4367 .flags = ADDR_TYPE_RT
4368 },
4369 { }
4370};
4371
4372/* l4_per -> timer3 */
4373static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
4374 .master = &omap44xx_l4_per_hwmod,
4375 .slave = &omap44xx_timer3_hwmod,
4376 .clk = "l4_div_ck",
4377 .addr = omap44xx_timer3_addrs,
4378 .user = OCP_USER_MPU | OCP_USER_SDMA,
4379};
4380
4381/* timer3 slave ports */
4382static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = {
4383 &omap44xx_l4_per__timer3,
4384};
4385
4386static struct omap_hwmod omap44xx_timer3_hwmod = { 2258static struct omap_hwmod omap44xx_timer3_hwmod = {
4387 .name = "timer3", 2259 .name = "timer3",
4388 .class = &omap44xx_timer_hwmod_class, 2260 .class = &omap44xx_timer_hwmod_class,
@@ -4397,40 +2269,14 @@ static struct omap_hwmod omap44xx_timer3_hwmod = {
4397 }, 2269 },
4398 }, 2270 },
4399 .dev_attr = &capability_alwon_dev_attr, 2271 .dev_attr = &capability_alwon_dev_attr,
4400 .slaves = omap44xx_timer3_slaves,
4401 .slaves_cnt = ARRAY_SIZE(omap44xx_timer3_slaves),
4402}; 2272};
4403 2273
4404/* timer4 */ 2274/* timer4 */
4405static struct omap_hwmod omap44xx_timer4_hwmod;
4406static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = { 2275static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = {
4407 { .irq = 40 + OMAP44XX_IRQ_GIC_START }, 2276 { .irq = 40 + OMAP44XX_IRQ_GIC_START },
4408 { .irq = -1 } 2277 { .irq = -1 }
4409}; 2278};
4410 2279
4411static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
4412 {
4413 .pa_start = 0x48036000,
4414 .pa_end = 0x4803607f,
4415 .flags = ADDR_TYPE_RT
4416 },
4417 { }
4418};
4419
4420/* l4_per -> timer4 */
4421static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
4422 .master = &omap44xx_l4_per_hwmod,
4423 .slave = &omap44xx_timer4_hwmod,
4424 .clk = "l4_div_ck",
4425 .addr = omap44xx_timer4_addrs,
4426 .user = OCP_USER_MPU | OCP_USER_SDMA,
4427};
4428
4429/* timer4 slave ports */
4430static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = {
4431 &omap44xx_l4_per__timer4,
4432};
4433
4434static struct omap_hwmod omap44xx_timer4_hwmod = { 2280static struct omap_hwmod omap44xx_timer4_hwmod = {
4435 .name = "timer4", 2281 .name = "timer4",
4436 .class = &omap44xx_timer_hwmod_class, 2282 .class = &omap44xx_timer_hwmod_class,
@@ -4445,59 +2291,14 @@ static struct omap_hwmod omap44xx_timer4_hwmod = {
4445 }, 2291 },
4446 }, 2292 },
4447 .dev_attr = &capability_alwon_dev_attr, 2293 .dev_attr = &capability_alwon_dev_attr,
4448 .slaves = omap44xx_timer4_slaves,
4449 .slaves_cnt = ARRAY_SIZE(omap44xx_timer4_slaves),
4450}; 2294};
4451 2295
4452/* timer5 */ 2296/* timer5 */
4453static struct omap_hwmod omap44xx_timer5_hwmod;
4454static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = { 2297static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = {
4455 { .irq = 41 + OMAP44XX_IRQ_GIC_START }, 2298 { .irq = 41 + OMAP44XX_IRQ_GIC_START },
4456 { .irq = -1 } 2299 { .irq = -1 }
4457}; 2300};
4458 2301
4459static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
4460 {
4461 .pa_start = 0x40138000,
4462 .pa_end = 0x4013807f,
4463 .flags = ADDR_TYPE_RT
4464 },
4465 { }
4466};
4467
4468/* l4_abe -> timer5 */
4469static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4470 .master = &omap44xx_l4_abe_hwmod,
4471 .slave = &omap44xx_timer5_hwmod,
4472 .clk = "ocp_abe_iclk",
4473 .addr = omap44xx_timer5_addrs,
4474 .user = OCP_USER_MPU,
4475};
4476
4477static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
4478 {
4479 .pa_start = 0x49038000,
4480 .pa_end = 0x4903807f,
4481 .flags = ADDR_TYPE_RT
4482 },
4483 { }
4484};
4485
4486/* l4_abe -> timer5 (dma) */
4487static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4488 .master = &omap44xx_l4_abe_hwmod,
4489 .slave = &omap44xx_timer5_hwmod,
4490 .clk = "ocp_abe_iclk",
4491 .addr = omap44xx_timer5_dma_addrs,
4492 .user = OCP_USER_SDMA,
4493};
4494
4495/* timer5 slave ports */
4496static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = {
4497 &omap44xx_l4_abe__timer5,
4498 &omap44xx_l4_abe__timer5_dma,
4499};
4500
4501static struct omap_hwmod omap44xx_timer5_hwmod = { 2302static struct omap_hwmod omap44xx_timer5_hwmod = {
4502 .name = "timer5", 2303 .name = "timer5",
4503 .class = &omap44xx_timer_hwmod_class, 2304 .class = &omap44xx_timer_hwmod_class,
@@ -4512,59 +2313,14 @@ static struct omap_hwmod omap44xx_timer5_hwmod = {
4512 }, 2313 },
4513 }, 2314 },
4514 .dev_attr = &capability_alwon_dev_attr, 2315 .dev_attr = &capability_alwon_dev_attr,
4515 .slaves = omap44xx_timer5_slaves,
4516 .slaves_cnt = ARRAY_SIZE(omap44xx_timer5_slaves),
4517}; 2316};
4518 2317
4519/* timer6 */ 2318/* timer6 */
4520static struct omap_hwmod omap44xx_timer6_hwmod;
4521static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = { 2319static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = {
4522 { .irq = 42 + OMAP44XX_IRQ_GIC_START }, 2320 { .irq = 42 + OMAP44XX_IRQ_GIC_START },
4523 { .irq = -1 } 2321 { .irq = -1 }
4524}; 2322};
4525 2323
4526static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
4527 {
4528 .pa_start = 0x4013a000,
4529 .pa_end = 0x4013a07f,
4530 .flags = ADDR_TYPE_RT
4531 },
4532 { }
4533};
4534
4535/* l4_abe -> timer6 */
4536static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4537 .master = &omap44xx_l4_abe_hwmod,
4538 .slave = &omap44xx_timer6_hwmod,
4539 .clk = "ocp_abe_iclk",
4540 .addr = omap44xx_timer6_addrs,
4541 .user = OCP_USER_MPU,
4542};
4543
4544static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
4545 {
4546 .pa_start = 0x4903a000,
4547 .pa_end = 0x4903a07f,
4548 .flags = ADDR_TYPE_RT
4549 },
4550 { }
4551};
4552
4553/* l4_abe -> timer6 (dma) */
4554static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4555 .master = &omap44xx_l4_abe_hwmod,
4556 .slave = &omap44xx_timer6_hwmod,
4557 .clk = "ocp_abe_iclk",
4558 .addr = omap44xx_timer6_dma_addrs,
4559 .user = OCP_USER_SDMA,
4560};
4561
4562/* timer6 slave ports */
4563static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = {
4564 &omap44xx_l4_abe__timer6,
4565 &omap44xx_l4_abe__timer6_dma,
4566};
4567
4568static struct omap_hwmod omap44xx_timer6_hwmod = { 2324static struct omap_hwmod omap44xx_timer6_hwmod = {
4569 .name = "timer6", 2325 .name = "timer6",
4570 .class = &omap44xx_timer_hwmod_class, 2326 .class = &omap44xx_timer_hwmod_class,
@@ -4580,59 +2336,14 @@ static struct omap_hwmod omap44xx_timer6_hwmod = {
4580 }, 2336 },
4581 }, 2337 },
4582 .dev_attr = &capability_alwon_dev_attr, 2338 .dev_attr = &capability_alwon_dev_attr,
4583 .slaves = omap44xx_timer6_slaves,
4584 .slaves_cnt = ARRAY_SIZE(omap44xx_timer6_slaves),
4585}; 2339};
4586 2340
4587/* timer7 */ 2341/* timer7 */
4588static struct omap_hwmod omap44xx_timer7_hwmod;
4589static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = { 2342static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = {
4590 { .irq = 43 + OMAP44XX_IRQ_GIC_START }, 2343 { .irq = 43 + OMAP44XX_IRQ_GIC_START },
4591 { .irq = -1 } 2344 { .irq = -1 }
4592}; 2345};
4593 2346
4594static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
4595 {
4596 .pa_start = 0x4013c000,
4597 .pa_end = 0x4013c07f,
4598 .flags = ADDR_TYPE_RT
4599 },
4600 { }
4601};
4602
4603/* l4_abe -> timer7 */
4604static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4605 .master = &omap44xx_l4_abe_hwmod,
4606 .slave = &omap44xx_timer7_hwmod,
4607 .clk = "ocp_abe_iclk",
4608 .addr = omap44xx_timer7_addrs,
4609 .user = OCP_USER_MPU,
4610};
4611
4612static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
4613 {
4614 .pa_start = 0x4903c000,
4615 .pa_end = 0x4903c07f,
4616 .flags = ADDR_TYPE_RT
4617 },
4618 { }
4619};
4620
4621/* l4_abe -> timer7 (dma) */
4622static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4623 .master = &omap44xx_l4_abe_hwmod,
4624 .slave = &omap44xx_timer7_hwmod,
4625 .clk = "ocp_abe_iclk",
4626 .addr = omap44xx_timer7_dma_addrs,
4627 .user = OCP_USER_SDMA,
4628};
4629
4630/* timer7 slave ports */
4631static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = {
4632 &omap44xx_l4_abe__timer7,
4633 &omap44xx_l4_abe__timer7_dma,
4634};
4635
4636static struct omap_hwmod omap44xx_timer7_hwmod = { 2347static struct omap_hwmod omap44xx_timer7_hwmod = {
4637 .name = "timer7", 2348 .name = "timer7",
4638 .class = &omap44xx_timer_hwmod_class, 2349 .class = &omap44xx_timer_hwmod_class,
@@ -4647,59 +2358,14 @@ static struct omap_hwmod omap44xx_timer7_hwmod = {
4647 }, 2358 },
4648 }, 2359 },
4649 .dev_attr = &capability_alwon_dev_attr, 2360 .dev_attr = &capability_alwon_dev_attr,
4650 .slaves = omap44xx_timer7_slaves,
4651 .slaves_cnt = ARRAY_SIZE(omap44xx_timer7_slaves),
4652}; 2361};
4653 2362
4654/* timer8 */ 2363/* timer8 */
4655static struct omap_hwmod omap44xx_timer8_hwmod;
4656static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = { 2364static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = {
4657 { .irq = 44 + OMAP44XX_IRQ_GIC_START }, 2365 { .irq = 44 + OMAP44XX_IRQ_GIC_START },
4658 { .irq = -1 } 2366 { .irq = -1 }
4659}; 2367};
4660 2368
4661static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
4662 {
4663 .pa_start = 0x4013e000,
4664 .pa_end = 0x4013e07f,
4665 .flags = ADDR_TYPE_RT
4666 },
4667 { }
4668};
4669
4670/* l4_abe -> timer8 */
4671static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4672 .master = &omap44xx_l4_abe_hwmod,
4673 .slave = &omap44xx_timer8_hwmod,
4674 .clk = "ocp_abe_iclk",
4675 .addr = omap44xx_timer8_addrs,
4676 .user = OCP_USER_MPU,
4677};
4678
4679static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
4680 {
4681 .pa_start = 0x4903e000,
4682 .pa_end = 0x4903e07f,
4683 .flags = ADDR_TYPE_RT
4684 },
4685 { }
4686};
4687
4688/* l4_abe -> timer8 (dma) */
4689static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4690 .master = &omap44xx_l4_abe_hwmod,
4691 .slave = &omap44xx_timer8_hwmod,
4692 .clk = "ocp_abe_iclk",
4693 .addr = omap44xx_timer8_dma_addrs,
4694 .user = OCP_USER_SDMA,
4695};
4696
4697/* timer8 slave ports */
4698static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = {
4699 &omap44xx_l4_abe__timer8,
4700 &omap44xx_l4_abe__timer8_dma,
4701};
4702
4703static struct omap_hwmod omap44xx_timer8_hwmod = { 2369static struct omap_hwmod omap44xx_timer8_hwmod = {
4704 .name = "timer8", 2370 .name = "timer8",
4705 .class = &omap44xx_timer_hwmod_class, 2371 .class = &omap44xx_timer_hwmod_class,
@@ -4714,40 +2380,14 @@ static struct omap_hwmod omap44xx_timer8_hwmod = {
4714 }, 2380 },
4715 }, 2381 },
4716 .dev_attr = &capability_pwm_dev_attr, 2382 .dev_attr = &capability_pwm_dev_attr,
4717 .slaves = omap44xx_timer8_slaves,
4718 .slaves_cnt = ARRAY_SIZE(omap44xx_timer8_slaves),
4719}; 2383};
4720 2384
4721/* timer9 */ 2385/* timer9 */
4722static struct omap_hwmod omap44xx_timer9_hwmod;
4723static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = { 2386static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = {
4724 { .irq = 45 + OMAP44XX_IRQ_GIC_START }, 2387 { .irq = 45 + OMAP44XX_IRQ_GIC_START },
4725 { .irq = -1 } 2388 { .irq = -1 }
4726}; 2389};
4727 2390
4728static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
4729 {
4730 .pa_start = 0x4803e000,
4731 .pa_end = 0x4803e07f,
4732 .flags = ADDR_TYPE_RT
4733 },
4734 { }
4735};
4736
4737/* l4_per -> timer9 */
4738static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
4739 .master = &omap44xx_l4_per_hwmod,
4740 .slave = &omap44xx_timer9_hwmod,
4741 .clk = "l4_div_ck",
4742 .addr = omap44xx_timer9_addrs,
4743 .user = OCP_USER_MPU | OCP_USER_SDMA,
4744};
4745
4746/* timer9 slave ports */
4747static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = {
4748 &omap44xx_l4_per__timer9,
4749};
4750
4751static struct omap_hwmod omap44xx_timer9_hwmod = { 2391static struct omap_hwmod omap44xx_timer9_hwmod = {
4752 .name = "timer9", 2392 .name = "timer9",
4753 .class = &omap44xx_timer_hwmod_class, 2393 .class = &omap44xx_timer_hwmod_class,
@@ -4762,40 +2402,14 @@ static struct omap_hwmod omap44xx_timer9_hwmod = {
4762 }, 2402 },
4763 }, 2403 },
4764 .dev_attr = &capability_pwm_dev_attr, 2404 .dev_attr = &capability_pwm_dev_attr,
4765 .slaves = omap44xx_timer9_slaves,
4766 .slaves_cnt = ARRAY_SIZE(omap44xx_timer9_slaves),
4767}; 2405};
4768 2406
4769/* timer10 */ 2407/* timer10 */
4770static struct omap_hwmod omap44xx_timer10_hwmod;
4771static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = { 2408static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = {
4772 { .irq = 46 + OMAP44XX_IRQ_GIC_START }, 2409 { .irq = 46 + OMAP44XX_IRQ_GIC_START },
4773 { .irq = -1 } 2410 { .irq = -1 }
4774}; 2411};
4775 2412
4776static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
4777 {
4778 .pa_start = 0x48086000,
4779 .pa_end = 0x4808607f,
4780 .flags = ADDR_TYPE_RT
4781 },
4782 { }
4783};
4784
4785/* l4_per -> timer10 */
4786static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
4787 .master = &omap44xx_l4_per_hwmod,
4788 .slave = &omap44xx_timer10_hwmod,
4789 .clk = "l4_div_ck",
4790 .addr = omap44xx_timer10_addrs,
4791 .user = OCP_USER_MPU | OCP_USER_SDMA,
4792};
4793
4794/* timer10 slave ports */
4795static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = {
4796 &omap44xx_l4_per__timer10,
4797};
4798
4799static struct omap_hwmod omap44xx_timer10_hwmod = { 2413static struct omap_hwmod omap44xx_timer10_hwmod = {
4800 .name = "timer10", 2414 .name = "timer10",
4801 .class = &omap44xx_timer_1ms_hwmod_class, 2415 .class = &omap44xx_timer_1ms_hwmod_class,
@@ -4810,40 +2424,14 @@ static struct omap_hwmod omap44xx_timer10_hwmod = {
4810 }, 2424 },
4811 }, 2425 },
4812 .dev_attr = &capability_pwm_dev_attr, 2426 .dev_attr = &capability_pwm_dev_attr,
4813 .slaves = omap44xx_timer10_slaves,
4814 .slaves_cnt = ARRAY_SIZE(omap44xx_timer10_slaves),
4815}; 2427};
4816 2428
4817/* timer11 */ 2429/* timer11 */
4818static struct omap_hwmod omap44xx_timer11_hwmod;
4819static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = { 2430static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = {
4820 { .irq = 47 + OMAP44XX_IRQ_GIC_START }, 2431 { .irq = 47 + OMAP44XX_IRQ_GIC_START },
4821 { .irq = -1 } 2432 { .irq = -1 }
4822}; 2433};
4823 2434
4824static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
4825 {
4826 .pa_start = 0x48088000,
4827 .pa_end = 0x4808807f,
4828 .flags = ADDR_TYPE_RT
4829 },
4830 { }
4831};
4832
4833/* l4_per -> timer11 */
4834static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
4835 .master = &omap44xx_l4_per_hwmod,
4836 .slave = &omap44xx_timer11_hwmod,
4837 .clk = "l4_div_ck",
4838 .addr = omap44xx_timer11_addrs,
4839 .user = OCP_USER_MPU | OCP_USER_SDMA,
4840};
4841
4842/* timer11 slave ports */
4843static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = {
4844 &omap44xx_l4_per__timer11,
4845};
4846
4847static struct omap_hwmod omap44xx_timer11_hwmod = { 2435static struct omap_hwmod omap44xx_timer11_hwmod = {
4848 .name = "timer11", 2436 .name = "timer11",
4849 .class = &omap44xx_timer_hwmod_class, 2437 .class = &omap44xx_timer_hwmod_class,
@@ -4858,8 +2446,6 @@ static struct omap_hwmod omap44xx_timer11_hwmod = {
4858 }, 2446 },
4859 }, 2447 },
4860 .dev_attr = &capability_pwm_dev_attr, 2448 .dev_attr = &capability_pwm_dev_attr,
4861 .slaves = omap44xx_timer11_slaves,
4862 .slaves_cnt = ARRAY_SIZE(omap44xx_timer11_slaves),
4863}; 2449};
4864 2450
4865/* 2451/*
@@ -4885,7 +2471,6 @@ static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
4885}; 2471};
4886 2472
4887/* uart1 */ 2473/* uart1 */
4888static struct omap_hwmod omap44xx_uart1_hwmod;
4889static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = { 2474static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
4890 { .irq = 72 + OMAP44XX_IRQ_GIC_START }, 2475 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
4891 { .irq = -1 } 2476 { .irq = -1 }
@@ -4897,29 +2482,6 @@ static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
4897 { .dma_req = -1 } 2482 { .dma_req = -1 }
4898}; 2483};
4899 2484
4900static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
4901 {
4902 .pa_start = 0x4806a000,
4903 .pa_end = 0x4806a0ff,
4904 .flags = ADDR_TYPE_RT
4905 },
4906 { }
4907};
4908
4909/* l4_per -> uart1 */
4910static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
4911 .master = &omap44xx_l4_per_hwmod,
4912 .slave = &omap44xx_uart1_hwmod,
4913 .clk = "l4_div_ck",
4914 .addr = omap44xx_uart1_addrs,
4915 .user = OCP_USER_MPU | OCP_USER_SDMA,
4916};
4917
4918/* uart1 slave ports */
4919static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
4920 &omap44xx_l4_per__uart1,
4921};
4922
4923static struct omap_hwmod omap44xx_uart1_hwmod = { 2485static struct omap_hwmod omap44xx_uart1_hwmod = {
4924 .name = "uart1", 2486 .name = "uart1",
4925 .class = &omap44xx_uart_hwmod_class, 2487 .class = &omap44xx_uart_hwmod_class,
@@ -4934,12 +2496,9 @@ static struct omap_hwmod omap44xx_uart1_hwmod = {
4934 .modulemode = MODULEMODE_SWCTRL, 2496 .modulemode = MODULEMODE_SWCTRL,
4935 }, 2497 },
4936 }, 2498 },
4937 .slaves = omap44xx_uart1_slaves,
4938 .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
4939}; 2499};
4940 2500
4941/* uart2 */ 2501/* uart2 */
4942static struct omap_hwmod omap44xx_uart2_hwmod;
4943static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = { 2502static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
4944 { .irq = 73 + OMAP44XX_IRQ_GIC_START }, 2503 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
4945 { .irq = -1 } 2504 { .irq = -1 }
@@ -4951,29 +2510,6 @@ static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
4951 { .dma_req = -1 } 2510 { .dma_req = -1 }
4952}; 2511};
4953 2512
4954static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
4955 {
4956 .pa_start = 0x4806c000,
4957 .pa_end = 0x4806c0ff,
4958 .flags = ADDR_TYPE_RT
4959 },
4960 { }
4961};
4962
4963/* l4_per -> uart2 */
4964static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
4965 .master = &omap44xx_l4_per_hwmod,
4966 .slave = &omap44xx_uart2_hwmod,
4967 .clk = "l4_div_ck",
4968 .addr = omap44xx_uart2_addrs,
4969 .user = OCP_USER_MPU | OCP_USER_SDMA,
4970};
4971
4972/* uart2 slave ports */
4973static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
4974 &omap44xx_l4_per__uart2,
4975};
4976
4977static struct omap_hwmod omap44xx_uart2_hwmod = { 2513static struct omap_hwmod omap44xx_uart2_hwmod = {
4978 .name = "uart2", 2514 .name = "uart2",
4979 .class = &omap44xx_uart_hwmod_class, 2515 .class = &omap44xx_uart_hwmod_class,
@@ -4988,12 +2524,9 @@ static struct omap_hwmod omap44xx_uart2_hwmod = {
4988 .modulemode = MODULEMODE_SWCTRL, 2524 .modulemode = MODULEMODE_SWCTRL,
4989 }, 2525 },
4990 }, 2526 },
4991 .slaves = omap44xx_uart2_slaves,
4992 .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
4993}; 2527};
4994 2528
4995/* uart3 */ 2529/* uart3 */
4996static struct omap_hwmod omap44xx_uart3_hwmod;
4997static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = { 2530static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
4998 { .irq = 74 + OMAP44XX_IRQ_GIC_START }, 2531 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
4999 { .irq = -1 } 2532 { .irq = -1 }
@@ -5005,29 +2538,6 @@ static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
5005 { .dma_req = -1 } 2538 { .dma_req = -1 }
5006}; 2539};
5007 2540
5008static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
5009 {
5010 .pa_start = 0x48020000,
5011 .pa_end = 0x480200ff,
5012 .flags = ADDR_TYPE_RT
5013 },
5014 { }
5015};
5016
5017/* l4_per -> uart3 */
5018static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
5019 .master = &omap44xx_l4_per_hwmod,
5020 .slave = &omap44xx_uart3_hwmod,
5021 .clk = "l4_div_ck",
5022 .addr = omap44xx_uart3_addrs,
5023 .user = OCP_USER_MPU | OCP_USER_SDMA,
5024};
5025
5026/* uart3 slave ports */
5027static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
5028 &omap44xx_l4_per__uart3,
5029};
5030
5031static struct omap_hwmod omap44xx_uart3_hwmod = { 2541static struct omap_hwmod omap44xx_uart3_hwmod = {
5032 .name = "uart3", 2542 .name = "uart3",
5033 .class = &omap44xx_uart_hwmod_class, 2543 .class = &omap44xx_uart_hwmod_class,
@@ -5043,12 +2553,9 @@ static struct omap_hwmod omap44xx_uart3_hwmod = {
5043 .modulemode = MODULEMODE_SWCTRL, 2553 .modulemode = MODULEMODE_SWCTRL,
5044 }, 2554 },
5045 }, 2555 },
5046 .slaves = omap44xx_uart3_slaves,
5047 .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
5048}; 2556};
5049 2557
5050/* uart4 */ 2558/* uart4 */
5051static struct omap_hwmod omap44xx_uart4_hwmod;
5052static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = { 2559static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
5053 { .irq = 70 + OMAP44XX_IRQ_GIC_START }, 2560 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
5054 { .irq = -1 } 2561 { .irq = -1 }
@@ -5060,29 +2567,6 @@ static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
5060 { .dma_req = -1 } 2567 { .dma_req = -1 }
5061}; 2568};
5062 2569
5063static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
5064 {
5065 .pa_start = 0x4806e000,
5066 .pa_end = 0x4806e0ff,
5067 .flags = ADDR_TYPE_RT
5068 },
5069 { }
5070};
5071
5072/* l4_per -> uart4 */
5073static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
5074 .master = &omap44xx_l4_per_hwmod,
5075 .slave = &omap44xx_uart4_hwmod,
5076 .clk = "l4_div_ck",
5077 .addr = omap44xx_uart4_addrs,
5078 .user = OCP_USER_MPU | OCP_USER_SDMA,
5079};
5080
5081/* uart4 slave ports */
5082static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
5083 &omap44xx_l4_per__uart4,
5084};
5085
5086static struct omap_hwmod omap44xx_uart4_hwmod = { 2570static struct omap_hwmod omap44xx_uart4_hwmod = {
5087 .name = "uart4", 2571 .name = "uart4",
5088 .class = &omap44xx_uart_hwmod_class, 2572 .class = &omap44xx_uart_hwmod_class,
@@ -5097,8 +2581,98 @@ static struct omap_hwmod omap44xx_uart4_hwmod = {
5097 .modulemode = MODULEMODE_SWCTRL, 2581 .modulemode = MODULEMODE_SWCTRL,
5098 }, 2582 },
5099 }, 2583 },
5100 .slaves = omap44xx_uart4_slaves, 2584};
5101 .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves), 2585
2586/*
2587 * 'usb_host_hs' class
2588 * high-speed multi-port usb host controller
2589 */
2590
2591static struct omap_hwmod_class_sysconfig omap44xx_usb_host_hs_sysc = {
2592 .rev_offs = 0x0000,
2593 .sysc_offs = 0x0010,
2594 .syss_offs = 0x0014,
2595 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
2596 SYSC_HAS_SOFTRESET),
2597 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2598 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
2599 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
2600 .sysc_fields = &omap_hwmod_sysc_type2,
2601};
2602
2603static struct omap_hwmod_class omap44xx_usb_host_hs_hwmod_class = {
2604 .name = "usb_host_hs",
2605 .sysc = &omap44xx_usb_host_hs_sysc,
2606};
2607
2608/* usb_host_hs */
2609static struct omap_hwmod_irq_info omap44xx_usb_host_hs_irqs[] = {
2610 { .name = "ohci-irq", .irq = 76 + OMAP44XX_IRQ_GIC_START },
2611 { .name = "ehci-irq", .irq = 77 + OMAP44XX_IRQ_GIC_START },
2612 { .irq = -1 }
2613};
2614
2615static struct omap_hwmod omap44xx_usb_host_hs_hwmod = {
2616 .name = "usb_host_hs",
2617 .class = &omap44xx_usb_host_hs_hwmod_class,
2618 .clkdm_name = "l3_init_clkdm",
2619 .main_clk = "usb_host_hs_fck",
2620 .prcm = {
2621 .omap4 = {
2622 .clkctrl_offs = OMAP4_CM_L3INIT_USB_HOST_CLKCTRL_OFFSET,
2623 .context_offs = OMAP4_RM_L3INIT_USB_HOST_CONTEXT_OFFSET,
2624 .modulemode = MODULEMODE_SWCTRL,
2625 },
2626 },
2627 .mpu_irqs = omap44xx_usb_host_hs_irqs,
2628
2629 /*
2630 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
2631 * id: i660
2632 *
2633 * Description:
2634 * In the following configuration :
2635 * - USBHOST module is set to smart-idle mode
2636 * - PRCM asserts idle_req to the USBHOST module ( This typically
2637 * happens when the system is going to a low power mode : all ports
2638 * have been suspended, the master part of the USBHOST module has
2639 * entered the standby state, and SW has cut the functional clocks)
2640 * - an USBHOST interrupt occurs before the module is able to answer
2641 * idle_ack, typically a remote wakeup IRQ.
2642 * Then the USB HOST module will enter a deadlock situation where it
2643 * is no more accessible nor functional.
2644 *
2645 * Workaround:
2646 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
2647 */
2648
2649 /*
2650 * Errata: USB host EHCI may stall when entering smart-standby mode
2651 * Id: i571
2652 *
2653 * Description:
2654 * When the USBHOST module is set to smart-standby mode, and when it is
2655 * ready to enter the standby state (i.e. all ports are suspended and
2656 * all attached devices are in suspend mode), then it can wrongly assert
2657 * the Mstandby signal too early while there are still some residual OCP
2658 * transactions ongoing. If this condition occurs, the internal state
2659 * machine may go to an undefined state and the USB link may be stuck
2660 * upon the next resume.
2661 *
2662 * Workaround:
2663 * Don't use smart standby; use only force standby,
2664 * hence HWMOD_SWSUP_MSTANDBY
2665 */
2666
2667 /*
2668 * During system boot; If the hwmod framework resets the module
2669 * the module will have smart idle settings; which can lead to deadlock
2670 * (above Errata Id:i660); so, dont reset the module during boot;
2671 * Use HWMOD_INIT_NO_RESET.
2672 */
2673
2674 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
2675 HWMOD_INIT_NO_RESET,
5102}; 2676};
5103 2677
5104/* 2678/*
@@ -5131,34 +2705,6 @@ static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
5131 { .irq = -1 } 2705 { .irq = -1 }
5132}; 2706};
5133 2707
5134/* usb_otg_hs master ports */
5135static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = {
5136 &omap44xx_usb_otg_hs__l3_main_2,
5137};
5138
5139static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
5140 {
5141 .pa_start = 0x4a0ab000,
5142 .pa_end = 0x4a0ab003,
5143 .flags = ADDR_TYPE_RT
5144 },
5145 { }
5146};
5147
5148/* l4_cfg -> usb_otg_hs */
5149static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
5150 .master = &omap44xx_l4_cfg_hwmod,
5151 .slave = &omap44xx_usb_otg_hs_hwmod,
5152 .clk = "l4_div_ck",
5153 .addr = omap44xx_usb_otg_hs_addrs,
5154 .user = OCP_USER_MPU | OCP_USER_SDMA,
5155};
5156
5157/* usb_otg_hs slave ports */
5158static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = {
5159 &omap44xx_l4_cfg__usb_otg_hs,
5160};
5161
5162static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = { 2708static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
5163 { .role = "xclk", .clk = "usb_otg_hs_xclk" }, 2709 { .role = "xclk", .clk = "usb_otg_hs_xclk" },
5164}; 2710};
@@ -5179,10 +2725,47 @@ static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
5179 }, 2725 },
5180 .opt_clks = usb_otg_hs_opt_clks, 2726 .opt_clks = usb_otg_hs_opt_clks,
5181 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks), 2727 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
5182 .slaves = omap44xx_usb_otg_hs_slaves, 2728};
5183 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves), 2729
5184 .masters = omap44xx_usb_otg_hs_masters, 2730/*
5185 .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters), 2731 * 'usb_tll_hs' class
2732 * usb_tll_hs module is the adapter on the usb_host_hs ports
2733 */
2734
2735static struct omap_hwmod_class_sysconfig omap44xx_usb_tll_hs_sysc = {
2736 .rev_offs = 0x0000,
2737 .sysc_offs = 0x0010,
2738 .syss_offs = 0x0014,
2739 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2740 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2741 SYSC_HAS_AUTOIDLE),
2742 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2743 .sysc_fields = &omap_hwmod_sysc_type1,
2744};
2745
2746static struct omap_hwmod_class omap44xx_usb_tll_hs_hwmod_class = {
2747 .name = "usb_tll_hs",
2748 .sysc = &omap44xx_usb_tll_hs_sysc,
2749};
2750
2751static struct omap_hwmod_irq_info omap44xx_usb_tll_hs_irqs[] = {
2752 { .name = "tll-irq", .irq = 78 + OMAP44XX_IRQ_GIC_START },
2753 { .irq = -1 }
2754};
2755
2756static struct omap_hwmod omap44xx_usb_tll_hs_hwmod = {
2757 .name = "usb_tll_hs",
2758 .class = &omap44xx_usb_tll_hs_hwmod_class,
2759 .clkdm_name = "l3_init_clkdm",
2760 .mpu_irqs = omap44xx_usb_tll_hs_irqs,
2761 .main_clk = "usb_tll_hs_ick",
2762 .prcm = {
2763 .omap4 = {
2764 .clkctrl_offs = OMAP4_CM_L3INIT_USB_TLL_CLKCTRL_OFFSET,
2765 .context_offs = OMAP4_RM_L3INIT_USB_TLL_CONTEXT_OFFSET,
2766 .modulemode = MODULEMODE_HWCTRL,
2767 },
2768 },
5186}; 2769};
5187 2770
5188/* 2771/*
@@ -5209,35 +2792,11 @@ static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
5209}; 2792};
5210 2793
5211/* wd_timer2 */ 2794/* wd_timer2 */
5212static struct omap_hwmod omap44xx_wd_timer2_hwmod;
5213static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = { 2795static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
5214 { .irq = 80 + OMAP44XX_IRQ_GIC_START }, 2796 { .irq = 80 + OMAP44XX_IRQ_GIC_START },
5215 { .irq = -1 } 2797 { .irq = -1 }
5216}; 2798};
5217 2799
5218static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
5219 {
5220 .pa_start = 0x4a314000,
5221 .pa_end = 0x4a31407f,
5222 .flags = ADDR_TYPE_RT
5223 },
5224 { }
5225};
5226
5227/* l4_wkup -> wd_timer2 */
5228static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
5229 .master = &omap44xx_l4_wkup_hwmod,
5230 .slave = &omap44xx_wd_timer2_hwmod,
5231 .clk = "l4_wkup_clk_mux_ck",
5232 .addr = omap44xx_wd_timer2_addrs,
5233 .user = OCP_USER_MPU | OCP_USER_SDMA,
5234};
5235
5236/* wd_timer2 slave ports */
5237static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
5238 &omap44xx_l4_wkup__wd_timer2,
5239};
5240
5241static struct omap_hwmod omap44xx_wd_timer2_hwmod = { 2800static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
5242 .name = "wd_timer2", 2801 .name = "wd_timer2",
5243 .class = &omap44xx_wd_timer_hwmod_class, 2802 .class = &omap44xx_wd_timer_hwmod_class,
@@ -5251,106 +2810,1746 @@ static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
5251 .modulemode = MODULEMODE_SWCTRL, 2810 .modulemode = MODULEMODE_SWCTRL,
5252 }, 2811 },
5253 }, 2812 },
5254 .slaves = omap44xx_wd_timer2_slaves,
5255 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves),
5256}; 2813};
5257 2814
5258/* wd_timer3 */ 2815/* wd_timer3 */
5259static struct omap_hwmod omap44xx_wd_timer3_hwmod;
5260static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = { 2816static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
5261 { .irq = 36 + OMAP44XX_IRQ_GIC_START }, 2817 { .irq = 36 + OMAP44XX_IRQ_GIC_START },
5262 { .irq = -1 } 2818 { .irq = -1 }
5263}; 2819};
5264 2820
5265static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = { 2821static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
2822 .name = "wd_timer3",
2823 .class = &omap44xx_wd_timer_hwmod_class,
2824 .clkdm_name = "abe_clkdm",
2825 .mpu_irqs = omap44xx_wd_timer3_irqs,
2826 .main_clk = "wd_timer3_fck",
2827 .prcm = {
2828 .omap4 = {
2829 .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET,
2830 .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET,
2831 .modulemode = MODULEMODE_SWCTRL,
2832 },
2833 },
2834};
2835
2836
2837/*
2838 * interfaces
2839 */
2840
2841/* l3_main_1 -> dmm */
2842static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
2843 .master = &omap44xx_l3_main_1_hwmod,
2844 .slave = &omap44xx_dmm_hwmod,
2845 .clk = "l3_div_ck",
2846 .user = OCP_USER_SDMA,
2847};
2848
2849static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
5266 { 2850 {
5267 .pa_start = 0x40130000, 2851 .pa_start = 0x4e000000,
5268 .pa_end = 0x4013007f, 2852 .pa_end = 0x4e0007ff,
5269 .flags = ADDR_TYPE_RT 2853 .flags = ADDR_TYPE_RT
5270 }, 2854 },
5271 { } 2855 { }
5272}; 2856};
5273 2857
5274/* l4_abe -> wd_timer3 */ 2858/* mpu -> dmm */
5275static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = { 2859static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
2860 .master = &omap44xx_mpu_hwmod,
2861 .slave = &omap44xx_dmm_hwmod,
2862 .clk = "l3_div_ck",
2863 .addr = omap44xx_dmm_addrs,
2864 .user = OCP_USER_MPU,
2865};
2866
2867/* dmm -> emif_fw */
2868static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
2869 .master = &omap44xx_dmm_hwmod,
2870 .slave = &omap44xx_emif_fw_hwmod,
2871 .clk = "l3_div_ck",
2872 .user = OCP_USER_MPU | OCP_USER_SDMA,
2873};
2874
2875static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
2876 {
2877 .pa_start = 0x4a20c000,
2878 .pa_end = 0x4a20c0ff,
2879 .flags = ADDR_TYPE_RT
2880 },
2881 { }
2882};
2883
2884/* l4_cfg -> emif_fw */
2885static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
2886 .master = &omap44xx_l4_cfg_hwmod,
2887 .slave = &omap44xx_emif_fw_hwmod,
2888 .clk = "l4_div_ck",
2889 .addr = omap44xx_emif_fw_addrs,
2890 .user = OCP_USER_MPU,
2891};
2892
2893/* iva -> l3_instr */
2894static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
2895 .master = &omap44xx_iva_hwmod,
2896 .slave = &omap44xx_l3_instr_hwmod,
2897 .clk = "l3_div_ck",
2898 .user = OCP_USER_MPU | OCP_USER_SDMA,
2899};
2900
2901/* l3_main_3 -> l3_instr */
2902static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
2903 .master = &omap44xx_l3_main_3_hwmod,
2904 .slave = &omap44xx_l3_instr_hwmod,
2905 .clk = "l3_div_ck",
2906 .user = OCP_USER_MPU | OCP_USER_SDMA,
2907};
2908
2909/* dsp -> l3_main_1 */
2910static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
2911 .master = &omap44xx_dsp_hwmod,
2912 .slave = &omap44xx_l3_main_1_hwmod,
2913 .clk = "l3_div_ck",
2914 .user = OCP_USER_MPU | OCP_USER_SDMA,
2915};
2916
2917/* dss -> l3_main_1 */
2918static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = {
2919 .master = &omap44xx_dss_hwmod,
2920 .slave = &omap44xx_l3_main_1_hwmod,
2921 .clk = "l3_div_ck",
2922 .user = OCP_USER_MPU | OCP_USER_SDMA,
2923};
2924
2925/* l3_main_2 -> l3_main_1 */
2926static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
2927 .master = &omap44xx_l3_main_2_hwmod,
2928 .slave = &omap44xx_l3_main_1_hwmod,
2929 .clk = "l3_div_ck",
2930 .user = OCP_USER_MPU | OCP_USER_SDMA,
2931};
2932
2933/* l4_cfg -> l3_main_1 */
2934static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
2935 .master = &omap44xx_l4_cfg_hwmod,
2936 .slave = &omap44xx_l3_main_1_hwmod,
2937 .clk = "l4_div_ck",
2938 .user = OCP_USER_MPU | OCP_USER_SDMA,
2939};
2940
2941/* mmc1 -> l3_main_1 */
2942static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = {
2943 .master = &omap44xx_mmc1_hwmod,
2944 .slave = &omap44xx_l3_main_1_hwmod,
2945 .clk = "l3_div_ck",
2946 .user = OCP_USER_MPU | OCP_USER_SDMA,
2947};
2948
2949/* mmc2 -> l3_main_1 */
2950static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
2951 .master = &omap44xx_mmc2_hwmod,
2952 .slave = &omap44xx_l3_main_1_hwmod,
2953 .clk = "l3_div_ck",
2954 .user = OCP_USER_MPU | OCP_USER_SDMA,
2955};
2956
2957static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
2958 {
2959 .pa_start = 0x44000000,
2960 .pa_end = 0x44000fff,
2961 .flags = ADDR_TYPE_RT
2962 },
2963 { }
2964};
2965
2966/* mpu -> l3_main_1 */
2967static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
2968 .master = &omap44xx_mpu_hwmod,
2969 .slave = &omap44xx_l3_main_1_hwmod,
2970 .clk = "l3_div_ck",
2971 .addr = omap44xx_l3_main_1_addrs,
2972 .user = OCP_USER_MPU,
2973};
2974
2975/* dma_system -> l3_main_2 */
2976static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
2977 .master = &omap44xx_dma_system_hwmod,
2978 .slave = &omap44xx_l3_main_2_hwmod,
2979 .clk = "l3_div_ck",
2980 .user = OCP_USER_MPU | OCP_USER_SDMA,
2981};
2982
2983/* hsi -> l3_main_2 */
2984static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = {
2985 .master = &omap44xx_hsi_hwmod,
2986 .slave = &omap44xx_l3_main_2_hwmod,
2987 .clk = "l3_div_ck",
2988 .user = OCP_USER_MPU | OCP_USER_SDMA,
2989};
2990
2991/* ipu -> l3_main_2 */
2992static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = {
2993 .master = &omap44xx_ipu_hwmod,
2994 .slave = &omap44xx_l3_main_2_hwmod,
2995 .clk = "l3_div_ck",
2996 .user = OCP_USER_MPU | OCP_USER_SDMA,
2997};
2998
2999/* iss -> l3_main_2 */
3000static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = {
3001 .master = &omap44xx_iss_hwmod,
3002 .slave = &omap44xx_l3_main_2_hwmod,
3003 .clk = "l3_div_ck",
3004 .user = OCP_USER_MPU | OCP_USER_SDMA,
3005};
3006
3007/* iva -> l3_main_2 */
3008static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = {
3009 .master = &omap44xx_iva_hwmod,
3010 .slave = &omap44xx_l3_main_2_hwmod,
3011 .clk = "l3_div_ck",
3012 .user = OCP_USER_MPU | OCP_USER_SDMA,
3013};
3014
3015static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
3016 {
3017 .pa_start = 0x44800000,
3018 .pa_end = 0x44801fff,
3019 .flags = ADDR_TYPE_RT
3020 },
3021 { }
3022};
3023
3024/* l3_main_1 -> l3_main_2 */
3025static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
3026 .master = &omap44xx_l3_main_1_hwmod,
3027 .slave = &omap44xx_l3_main_2_hwmod,
3028 .clk = "l3_div_ck",
3029 .addr = omap44xx_l3_main_2_addrs,
3030 .user = OCP_USER_MPU,
3031};
3032
3033/* l4_cfg -> l3_main_2 */
3034static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
3035 .master = &omap44xx_l4_cfg_hwmod,
3036 .slave = &omap44xx_l3_main_2_hwmod,
3037 .clk = "l4_div_ck",
3038 .user = OCP_USER_MPU | OCP_USER_SDMA,
3039};
3040
3041/* usb_host_hs -> l3_main_2 */
3042static struct omap_hwmod_ocp_if omap44xx_usb_host_hs__l3_main_2 = {
3043 .master = &omap44xx_usb_host_hs_hwmod,
3044 .slave = &omap44xx_l3_main_2_hwmod,
3045 .clk = "l3_div_ck",
3046 .user = OCP_USER_MPU | OCP_USER_SDMA,
3047};
3048
3049/* usb_otg_hs -> l3_main_2 */
3050static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = {
3051 .master = &omap44xx_usb_otg_hs_hwmod,
3052 .slave = &omap44xx_l3_main_2_hwmod,
3053 .clk = "l3_div_ck",
3054 .user = OCP_USER_MPU | OCP_USER_SDMA,
3055};
3056
3057static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
3058 {
3059 .pa_start = 0x45000000,
3060 .pa_end = 0x45000fff,
3061 .flags = ADDR_TYPE_RT
3062 },
3063 { }
3064};
3065
3066/* l3_main_1 -> l3_main_3 */
3067static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
3068 .master = &omap44xx_l3_main_1_hwmod,
3069 .slave = &omap44xx_l3_main_3_hwmod,
3070 .clk = "l3_div_ck",
3071 .addr = omap44xx_l3_main_3_addrs,
3072 .user = OCP_USER_MPU,
3073};
3074
3075/* l3_main_2 -> l3_main_3 */
3076static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
3077 .master = &omap44xx_l3_main_2_hwmod,
3078 .slave = &omap44xx_l3_main_3_hwmod,
3079 .clk = "l3_div_ck",
3080 .user = OCP_USER_MPU | OCP_USER_SDMA,
3081};
3082
3083/* l4_cfg -> l3_main_3 */
3084static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
3085 .master = &omap44xx_l4_cfg_hwmod,
3086 .slave = &omap44xx_l3_main_3_hwmod,
3087 .clk = "l4_div_ck",
3088 .user = OCP_USER_MPU | OCP_USER_SDMA,
3089};
3090
3091/* aess -> l4_abe */
3092static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = {
3093 .master = &omap44xx_aess_hwmod,
3094 .slave = &omap44xx_l4_abe_hwmod,
3095 .clk = "ocp_abe_iclk",
3096 .user = OCP_USER_MPU | OCP_USER_SDMA,
3097};
3098
3099/* dsp -> l4_abe */
3100static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
3101 .master = &omap44xx_dsp_hwmod,
3102 .slave = &omap44xx_l4_abe_hwmod,
3103 .clk = "ocp_abe_iclk",
3104 .user = OCP_USER_MPU | OCP_USER_SDMA,
3105};
3106
3107/* l3_main_1 -> l4_abe */
3108static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
3109 .master = &omap44xx_l3_main_1_hwmod,
3110 .slave = &omap44xx_l4_abe_hwmod,
3111 .clk = "l3_div_ck",
3112 .user = OCP_USER_MPU | OCP_USER_SDMA,
3113};
3114
3115/* mpu -> l4_abe */
3116static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
3117 .master = &omap44xx_mpu_hwmod,
3118 .slave = &omap44xx_l4_abe_hwmod,
3119 .clk = "ocp_abe_iclk",
3120 .user = OCP_USER_MPU | OCP_USER_SDMA,
3121};
3122
3123/* l3_main_1 -> l4_cfg */
3124static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
3125 .master = &omap44xx_l3_main_1_hwmod,
3126 .slave = &omap44xx_l4_cfg_hwmod,
3127 .clk = "l3_div_ck",
3128 .user = OCP_USER_MPU | OCP_USER_SDMA,
3129};
3130
3131/* l3_main_2 -> l4_per */
3132static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
3133 .master = &omap44xx_l3_main_2_hwmod,
3134 .slave = &omap44xx_l4_per_hwmod,
3135 .clk = "l3_div_ck",
3136 .user = OCP_USER_MPU | OCP_USER_SDMA,
3137};
3138
3139/* l4_cfg -> l4_wkup */
3140static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
3141 .master = &omap44xx_l4_cfg_hwmod,
3142 .slave = &omap44xx_l4_wkup_hwmod,
3143 .clk = "l4_div_ck",
3144 .user = OCP_USER_MPU | OCP_USER_SDMA,
3145};
3146
3147/* mpu -> mpu_private */
3148static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
3149 .master = &omap44xx_mpu_hwmod,
3150 .slave = &omap44xx_mpu_private_hwmod,
3151 .clk = "l3_div_ck",
3152 .user = OCP_USER_MPU | OCP_USER_SDMA,
3153};
3154
3155static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
3156 {
3157 .pa_start = 0x401f1000,
3158 .pa_end = 0x401f13ff,
3159 .flags = ADDR_TYPE_RT
3160 },
3161 { }
3162};
3163
3164/* l4_abe -> aess */
3165static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
5276 .master = &omap44xx_l4_abe_hwmod, 3166 .master = &omap44xx_l4_abe_hwmod,
5277 .slave = &omap44xx_wd_timer3_hwmod, 3167 .slave = &omap44xx_aess_hwmod,
5278 .clk = "ocp_abe_iclk", 3168 .clk = "ocp_abe_iclk",
5279 .addr = omap44xx_wd_timer3_addrs, 3169 .addr = omap44xx_aess_addrs,
5280 .user = OCP_USER_MPU, 3170 .user = OCP_USER_MPU,
5281}; 3171};
5282 3172
5283static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = { 3173static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
5284 { 3174 {
5285 .pa_start = 0x49030000, 3175 .pa_start = 0x490f1000,
5286 .pa_end = 0x4903007f, 3176 .pa_end = 0x490f13ff,
5287 .flags = ADDR_TYPE_RT 3177 .flags = ADDR_TYPE_RT
5288 }, 3178 },
5289 { } 3179 { }
5290}; 3180};
5291 3181
5292/* l4_abe -> wd_timer3 (dma) */ 3182/* l4_abe -> aess (dma) */
5293static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = { 3183static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
5294 .master = &omap44xx_l4_abe_hwmod, 3184 .master = &omap44xx_l4_abe_hwmod,
5295 .slave = &omap44xx_wd_timer3_hwmod, 3185 .slave = &omap44xx_aess_hwmod,
5296 .clk = "ocp_abe_iclk", 3186 .clk = "ocp_abe_iclk",
5297 .addr = omap44xx_wd_timer3_dma_addrs, 3187 .addr = omap44xx_aess_dma_addrs,
5298 .user = OCP_USER_SDMA, 3188 .user = OCP_USER_SDMA,
5299}; 3189};
5300 3190
5301/* wd_timer3 slave ports */ 3191static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
5302static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = { 3192 {
5303 &omap44xx_l4_abe__wd_timer3, 3193 .pa_start = 0x4a304000,
5304 &omap44xx_l4_abe__wd_timer3_dma, 3194 .pa_end = 0x4a30401f,
3195 .flags = ADDR_TYPE_RT
3196 },
3197 { }
5305}; 3198};
5306 3199
5307static struct omap_hwmod omap44xx_wd_timer3_hwmod = { 3200/* l4_wkup -> counter_32k */
5308 .name = "wd_timer3", 3201static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
5309 .class = &omap44xx_wd_timer_hwmod_class, 3202 .master = &omap44xx_l4_wkup_hwmod,
5310 .clkdm_name = "abe_clkdm", 3203 .slave = &omap44xx_counter_32k_hwmod,
5311 .mpu_irqs = omap44xx_wd_timer3_irqs, 3204 .clk = "l4_wkup_clk_mux_ck",
5312 .main_clk = "wd_timer3_fck", 3205 .addr = omap44xx_counter_32k_addrs,
5313 .prcm = { 3206 .user = OCP_USER_MPU | OCP_USER_SDMA,
5314 .omap4 = { 3207};
5315 .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET, 3208
5316 .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET, 3209static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
5317 .modulemode = MODULEMODE_SWCTRL, 3210 {
5318 }, 3211 .pa_start = 0x4a056000,
3212 .pa_end = 0x4a056fff,
3213 .flags = ADDR_TYPE_RT
5319 }, 3214 },
5320 .slaves = omap44xx_wd_timer3_slaves, 3215 { }
5321 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves),
5322}; 3216};
5323 3217
5324/* 3218/* l4_cfg -> dma_system */
5325 * 'usb_host_hs' class 3219static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
5326 * high-speed multi-port usb host controller 3220 .master = &omap44xx_l4_cfg_hwmod,
5327 */ 3221 .slave = &omap44xx_dma_system_hwmod,
5328static struct omap_hwmod_ocp_if omap44xx_usb_host_hs__l3_main_2 = { 3222 .clk = "l4_div_ck",
5329 .master = &omap44xx_usb_host_hs_hwmod, 3223 .addr = omap44xx_dma_system_addrs,
5330 .slave = &omap44xx_l3_main_2_hwmod, 3224 .user = OCP_USER_MPU | OCP_USER_SDMA,
3225};
3226
3227static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
3228 {
3229 .name = "mpu",
3230 .pa_start = 0x4012e000,
3231 .pa_end = 0x4012e07f,
3232 .flags = ADDR_TYPE_RT
3233 },
3234 { }
3235};
3236
3237/* l4_abe -> dmic */
3238static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
3239 .master = &omap44xx_l4_abe_hwmod,
3240 .slave = &omap44xx_dmic_hwmod,
3241 .clk = "ocp_abe_iclk",
3242 .addr = omap44xx_dmic_addrs,
3243 .user = OCP_USER_MPU,
3244};
3245
3246static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
3247 {
3248 .name = "dma",
3249 .pa_start = 0x4902e000,
3250 .pa_end = 0x4902e07f,
3251 .flags = ADDR_TYPE_RT
3252 },
3253 { }
3254};
3255
3256/* l4_abe -> dmic (dma) */
3257static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
3258 .master = &omap44xx_l4_abe_hwmod,
3259 .slave = &omap44xx_dmic_hwmod,
3260 .clk = "ocp_abe_iclk",
3261 .addr = omap44xx_dmic_dma_addrs,
3262 .user = OCP_USER_SDMA,
3263};
3264
3265/* dsp -> iva */
3266static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
3267 .master = &omap44xx_dsp_hwmod,
3268 .slave = &omap44xx_iva_hwmod,
3269 .clk = "dpll_iva_m5x2_ck",
3270 .user = OCP_USER_DSP,
3271};
3272
3273/* l4_cfg -> dsp */
3274static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
3275 .master = &omap44xx_l4_cfg_hwmod,
3276 .slave = &omap44xx_dsp_hwmod,
3277 .clk = "l4_div_ck",
3278 .user = OCP_USER_MPU | OCP_USER_SDMA,
3279};
3280
3281static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = {
3282 {
3283 .pa_start = 0x58000000,
3284 .pa_end = 0x5800007f,
3285 .flags = ADDR_TYPE_RT
3286 },
3287 { }
3288};
3289
3290/* l3_main_2 -> dss */
3291static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = {
3292 .master = &omap44xx_l3_main_2_hwmod,
3293 .slave = &omap44xx_dss_hwmod,
3294 .clk = "dss_fck",
3295 .addr = omap44xx_dss_dma_addrs,
3296 .user = OCP_USER_SDMA,
3297};
3298
3299static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = {
3300 {
3301 .pa_start = 0x48040000,
3302 .pa_end = 0x4804007f,
3303 .flags = ADDR_TYPE_RT
3304 },
3305 { }
3306};
3307
3308/* l4_per -> dss */
3309static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = {
3310 .master = &omap44xx_l4_per_hwmod,
3311 .slave = &omap44xx_dss_hwmod,
3312 .clk = "l4_div_ck",
3313 .addr = omap44xx_dss_addrs,
3314 .user = OCP_USER_MPU,
3315};
3316
3317static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
3318 {
3319 .pa_start = 0x58001000,
3320 .pa_end = 0x58001fff,
3321 .flags = ADDR_TYPE_RT
3322 },
3323 { }
3324};
3325
3326/* l3_main_2 -> dss_dispc */
3327static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = {
3328 .master = &omap44xx_l3_main_2_hwmod,
3329 .slave = &omap44xx_dss_dispc_hwmod,
3330 .clk = "dss_fck",
3331 .addr = omap44xx_dss_dispc_dma_addrs,
3332 .user = OCP_USER_SDMA,
3333};
3334
3335static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = {
3336 {
3337 .pa_start = 0x48041000,
3338 .pa_end = 0x48041fff,
3339 .flags = ADDR_TYPE_RT
3340 },
3341 { }
3342};
3343
3344/* l4_per -> dss_dispc */
3345static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = {
3346 .master = &omap44xx_l4_per_hwmod,
3347 .slave = &omap44xx_dss_dispc_hwmod,
3348 .clk = "l4_div_ck",
3349 .addr = omap44xx_dss_dispc_addrs,
3350 .user = OCP_USER_MPU,
3351};
3352
3353static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
3354 {
3355 .pa_start = 0x58004000,
3356 .pa_end = 0x580041ff,
3357 .flags = ADDR_TYPE_RT
3358 },
3359 { }
3360};
3361
3362/* l3_main_2 -> dss_dsi1 */
3363static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
3364 .master = &omap44xx_l3_main_2_hwmod,
3365 .slave = &omap44xx_dss_dsi1_hwmod,
3366 .clk = "dss_fck",
3367 .addr = omap44xx_dss_dsi1_dma_addrs,
3368 .user = OCP_USER_SDMA,
3369};
3370
3371static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
3372 {
3373 .pa_start = 0x48044000,
3374 .pa_end = 0x480441ff,
3375 .flags = ADDR_TYPE_RT
3376 },
3377 { }
3378};
3379
3380/* l4_per -> dss_dsi1 */
3381static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
3382 .master = &omap44xx_l4_per_hwmod,
3383 .slave = &omap44xx_dss_dsi1_hwmod,
3384 .clk = "l4_div_ck",
3385 .addr = omap44xx_dss_dsi1_addrs,
3386 .user = OCP_USER_MPU,
3387};
3388
3389static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
3390 {
3391 .pa_start = 0x58005000,
3392 .pa_end = 0x580051ff,
3393 .flags = ADDR_TYPE_RT
3394 },
3395 { }
3396};
3397
3398/* l3_main_2 -> dss_dsi2 */
3399static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
3400 .master = &omap44xx_l3_main_2_hwmod,
3401 .slave = &omap44xx_dss_dsi2_hwmod,
3402 .clk = "dss_fck",
3403 .addr = omap44xx_dss_dsi2_dma_addrs,
3404 .user = OCP_USER_SDMA,
3405};
3406
3407static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
3408 {
3409 .pa_start = 0x48045000,
3410 .pa_end = 0x480451ff,
3411 .flags = ADDR_TYPE_RT
3412 },
3413 { }
3414};
3415
3416/* l4_per -> dss_dsi2 */
3417static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
3418 .master = &omap44xx_l4_per_hwmod,
3419 .slave = &omap44xx_dss_dsi2_hwmod,
3420 .clk = "l4_div_ck",
3421 .addr = omap44xx_dss_dsi2_addrs,
3422 .user = OCP_USER_MPU,
3423};
3424
3425static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
3426 {
3427 .pa_start = 0x58006000,
3428 .pa_end = 0x58006fff,
3429 .flags = ADDR_TYPE_RT
3430 },
3431 { }
3432};
3433
3434/* l3_main_2 -> dss_hdmi */
3435static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
3436 .master = &omap44xx_l3_main_2_hwmod,
3437 .slave = &omap44xx_dss_hdmi_hwmod,
3438 .clk = "dss_fck",
3439 .addr = omap44xx_dss_hdmi_dma_addrs,
3440 .user = OCP_USER_SDMA,
3441};
3442
3443static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
3444 {
3445 .pa_start = 0x48046000,
3446 .pa_end = 0x48046fff,
3447 .flags = ADDR_TYPE_RT
3448 },
3449 { }
3450};
3451
3452/* l4_per -> dss_hdmi */
3453static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
3454 .master = &omap44xx_l4_per_hwmod,
3455 .slave = &omap44xx_dss_hdmi_hwmod,
3456 .clk = "l4_div_ck",
3457 .addr = omap44xx_dss_hdmi_addrs,
3458 .user = OCP_USER_MPU,
3459};
3460
3461static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
3462 {
3463 .pa_start = 0x58002000,
3464 .pa_end = 0x580020ff,
3465 .flags = ADDR_TYPE_RT
3466 },
3467 { }
3468};
3469
3470/* l3_main_2 -> dss_rfbi */
3471static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
3472 .master = &omap44xx_l3_main_2_hwmod,
3473 .slave = &omap44xx_dss_rfbi_hwmod,
3474 .clk = "dss_fck",
3475 .addr = omap44xx_dss_rfbi_dma_addrs,
3476 .user = OCP_USER_SDMA,
3477};
3478
3479static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
3480 {
3481 .pa_start = 0x48042000,
3482 .pa_end = 0x480420ff,
3483 .flags = ADDR_TYPE_RT
3484 },
3485 { }
3486};
3487
3488/* l4_per -> dss_rfbi */
3489static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
3490 .master = &omap44xx_l4_per_hwmod,
3491 .slave = &omap44xx_dss_rfbi_hwmod,
3492 .clk = "l4_div_ck",
3493 .addr = omap44xx_dss_rfbi_addrs,
3494 .user = OCP_USER_MPU,
3495};
3496
3497static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
3498 {
3499 .pa_start = 0x58003000,
3500 .pa_end = 0x580030ff,
3501 .flags = ADDR_TYPE_RT
3502 },
3503 { }
3504};
3505
3506/* l3_main_2 -> dss_venc */
3507static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
3508 .master = &omap44xx_l3_main_2_hwmod,
3509 .slave = &omap44xx_dss_venc_hwmod,
3510 .clk = "dss_fck",
3511 .addr = omap44xx_dss_venc_dma_addrs,
3512 .user = OCP_USER_SDMA,
3513};
3514
3515static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
3516 {
3517 .pa_start = 0x48043000,
3518 .pa_end = 0x480430ff,
3519 .flags = ADDR_TYPE_RT
3520 },
3521 { }
3522};
3523
3524/* l4_per -> dss_venc */
3525static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
3526 .master = &omap44xx_l4_per_hwmod,
3527 .slave = &omap44xx_dss_venc_hwmod,
3528 .clk = "l4_div_ck",
3529 .addr = omap44xx_dss_venc_addrs,
3530 .user = OCP_USER_MPU,
3531};
3532
3533static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
3534 {
3535 .pa_start = 0x4a310000,
3536 .pa_end = 0x4a3101ff,
3537 .flags = ADDR_TYPE_RT
3538 },
3539 { }
3540};
3541
3542/* l4_wkup -> gpio1 */
3543static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
3544 .master = &omap44xx_l4_wkup_hwmod,
3545 .slave = &omap44xx_gpio1_hwmod,
3546 .clk = "l4_wkup_clk_mux_ck",
3547 .addr = omap44xx_gpio1_addrs,
3548 .user = OCP_USER_MPU | OCP_USER_SDMA,
3549};
3550
3551static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
3552 {
3553 .pa_start = 0x48055000,
3554 .pa_end = 0x480551ff,
3555 .flags = ADDR_TYPE_RT
3556 },
3557 { }
3558};
3559
3560/* l4_per -> gpio2 */
3561static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
3562 .master = &omap44xx_l4_per_hwmod,
3563 .slave = &omap44xx_gpio2_hwmod,
3564 .clk = "l4_div_ck",
3565 .addr = omap44xx_gpio2_addrs,
3566 .user = OCP_USER_MPU | OCP_USER_SDMA,
3567};
3568
3569static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
3570 {
3571 .pa_start = 0x48057000,
3572 .pa_end = 0x480571ff,
3573 .flags = ADDR_TYPE_RT
3574 },
3575 { }
3576};
3577
3578/* l4_per -> gpio3 */
3579static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
3580 .master = &omap44xx_l4_per_hwmod,
3581 .slave = &omap44xx_gpio3_hwmod,
3582 .clk = "l4_div_ck",
3583 .addr = omap44xx_gpio3_addrs,
3584 .user = OCP_USER_MPU | OCP_USER_SDMA,
3585};
3586
3587static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
3588 {
3589 .pa_start = 0x48059000,
3590 .pa_end = 0x480591ff,
3591 .flags = ADDR_TYPE_RT
3592 },
3593 { }
3594};
3595
3596/* l4_per -> gpio4 */
3597static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
3598 .master = &omap44xx_l4_per_hwmod,
3599 .slave = &omap44xx_gpio4_hwmod,
3600 .clk = "l4_div_ck",
3601 .addr = omap44xx_gpio4_addrs,
3602 .user = OCP_USER_MPU | OCP_USER_SDMA,
3603};
3604
3605static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
3606 {
3607 .pa_start = 0x4805b000,
3608 .pa_end = 0x4805b1ff,
3609 .flags = ADDR_TYPE_RT
3610 },
3611 { }
3612};
3613
3614/* l4_per -> gpio5 */
3615static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
3616 .master = &omap44xx_l4_per_hwmod,
3617 .slave = &omap44xx_gpio5_hwmod,
3618 .clk = "l4_div_ck",
3619 .addr = omap44xx_gpio5_addrs,
3620 .user = OCP_USER_MPU | OCP_USER_SDMA,
3621};
3622
3623static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
3624 {
3625 .pa_start = 0x4805d000,
3626 .pa_end = 0x4805d1ff,
3627 .flags = ADDR_TYPE_RT
3628 },
3629 { }
3630};
3631
3632/* l4_per -> gpio6 */
3633static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
3634 .master = &omap44xx_l4_per_hwmod,
3635 .slave = &omap44xx_gpio6_hwmod,
3636 .clk = "l4_div_ck",
3637 .addr = omap44xx_gpio6_addrs,
3638 .user = OCP_USER_MPU | OCP_USER_SDMA,
3639};
3640
3641static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
3642 {
3643 .pa_start = 0x4a058000,
3644 .pa_end = 0x4a05bfff,
3645 .flags = ADDR_TYPE_RT
3646 },
3647 { }
3648};
3649
3650/* l4_cfg -> hsi */
3651static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
3652 .master = &omap44xx_l4_cfg_hwmod,
3653 .slave = &omap44xx_hsi_hwmod,
3654 .clk = "l4_div_ck",
3655 .addr = omap44xx_hsi_addrs,
3656 .user = OCP_USER_MPU | OCP_USER_SDMA,
3657};
3658
3659static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
3660 {
3661 .pa_start = 0x48070000,
3662 .pa_end = 0x480700ff,
3663 .flags = ADDR_TYPE_RT
3664 },
3665 { }
3666};
3667
3668/* l4_per -> i2c1 */
3669static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
3670 .master = &omap44xx_l4_per_hwmod,
3671 .slave = &omap44xx_i2c1_hwmod,
3672 .clk = "l4_div_ck",
3673 .addr = omap44xx_i2c1_addrs,
3674 .user = OCP_USER_MPU | OCP_USER_SDMA,
3675};
3676
3677static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
3678 {
3679 .pa_start = 0x48072000,
3680 .pa_end = 0x480720ff,
3681 .flags = ADDR_TYPE_RT
3682 },
3683 { }
3684};
3685
3686/* l4_per -> i2c2 */
3687static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
3688 .master = &omap44xx_l4_per_hwmod,
3689 .slave = &omap44xx_i2c2_hwmod,
3690 .clk = "l4_div_ck",
3691 .addr = omap44xx_i2c2_addrs,
3692 .user = OCP_USER_MPU | OCP_USER_SDMA,
3693};
3694
3695static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
3696 {
3697 .pa_start = 0x48060000,
3698 .pa_end = 0x480600ff,
3699 .flags = ADDR_TYPE_RT
3700 },
3701 { }
3702};
3703
3704/* l4_per -> i2c3 */
3705static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
3706 .master = &omap44xx_l4_per_hwmod,
3707 .slave = &omap44xx_i2c3_hwmod,
3708 .clk = "l4_div_ck",
3709 .addr = omap44xx_i2c3_addrs,
3710 .user = OCP_USER_MPU | OCP_USER_SDMA,
3711};
3712
3713static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
3714 {
3715 .pa_start = 0x48350000,
3716 .pa_end = 0x483500ff,
3717 .flags = ADDR_TYPE_RT
3718 },
3719 { }
3720};
3721
3722/* l4_per -> i2c4 */
3723static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
3724 .master = &omap44xx_l4_per_hwmod,
3725 .slave = &omap44xx_i2c4_hwmod,
3726 .clk = "l4_div_ck",
3727 .addr = omap44xx_i2c4_addrs,
3728 .user = OCP_USER_MPU | OCP_USER_SDMA,
3729};
3730
3731/* l3_main_2 -> ipu */
3732static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = {
3733 .master = &omap44xx_l3_main_2_hwmod,
3734 .slave = &omap44xx_ipu_hwmod,
5331 .clk = "l3_div_ck", 3735 .clk = "l3_div_ck",
5332 .user = OCP_USER_MPU | OCP_USER_SDMA, 3736 .user = OCP_USER_MPU | OCP_USER_SDMA,
5333}; 3737};
5334 3738
5335static struct omap_hwmod_class_sysconfig omap44xx_usb_host_hs_sysc = { 3739static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
5336 .rev_offs = 0x0000, 3740 {
5337 .sysc_offs = 0x0010, 3741 .pa_start = 0x52000000,
5338 .syss_offs = 0x0014, 3742 .pa_end = 0x520000ff,
5339 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | 3743 .flags = ADDR_TYPE_RT
5340 SYSC_HAS_SOFTRESET), 3744 },
5341 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 3745 { }
5342 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
5343 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
5344 .sysc_fields = &omap_hwmod_sysc_type2,
5345}; 3746};
5346 3747
5347static struct omap_hwmod_class omap44xx_usb_host_hs_hwmod_class = { 3748/* l3_main_2 -> iss */
5348 .name = "usb_host_hs", 3749static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
5349 .sysc = &omap44xx_usb_host_hs_sysc, 3750 .master = &omap44xx_l3_main_2_hwmod,
3751 .slave = &omap44xx_iss_hwmod,
3752 .clk = "l3_div_ck",
3753 .addr = omap44xx_iss_addrs,
3754 .user = OCP_USER_MPU | OCP_USER_SDMA,
5350}; 3755};
5351 3756
5352static struct omap_hwmod_ocp_if *omap44xx_usb_host_hs_masters[] = { 3757static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
5353 &omap44xx_usb_host_hs__l3_main_2, 3758 {
3759 .pa_start = 0x5a000000,
3760 .pa_end = 0x5a07ffff,
3761 .flags = ADDR_TYPE_RT
3762 },
3763 { }
3764};
3765
3766/* l3_main_2 -> iva */
3767static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
3768 .master = &omap44xx_l3_main_2_hwmod,
3769 .slave = &omap44xx_iva_hwmod,
3770 .clk = "l3_div_ck",
3771 .addr = omap44xx_iva_addrs,
3772 .user = OCP_USER_MPU,
3773};
3774
3775static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
3776 {
3777 .pa_start = 0x4a31c000,
3778 .pa_end = 0x4a31c07f,
3779 .flags = ADDR_TYPE_RT
3780 },
3781 { }
3782};
3783
3784/* l4_wkup -> kbd */
3785static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
3786 .master = &omap44xx_l4_wkup_hwmod,
3787 .slave = &omap44xx_kbd_hwmod,
3788 .clk = "l4_wkup_clk_mux_ck",
3789 .addr = omap44xx_kbd_addrs,
3790 .user = OCP_USER_MPU | OCP_USER_SDMA,
3791};
3792
3793static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
3794 {
3795 .pa_start = 0x4a0f4000,
3796 .pa_end = 0x4a0f41ff,
3797 .flags = ADDR_TYPE_RT
3798 },
3799 { }
3800};
3801
3802/* l4_cfg -> mailbox */
3803static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
3804 .master = &omap44xx_l4_cfg_hwmod,
3805 .slave = &omap44xx_mailbox_hwmod,
3806 .clk = "l4_div_ck",
3807 .addr = omap44xx_mailbox_addrs,
3808 .user = OCP_USER_MPU | OCP_USER_SDMA,
3809};
3810
3811static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
3812 {
3813 .name = "mpu",
3814 .pa_start = 0x40122000,
3815 .pa_end = 0x401220ff,
3816 .flags = ADDR_TYPE_RT
3817 },
3818 { }
3819};
3820
3821/* l4_abe -> mcbsp1 */
3822static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
3823 .master = &omap44xx_l4_abe_hwmod,
3824 .slave = &omap44xx_mcbsp1_hwmod,
3825 .clk = "ocp_abe_iclk",
3826 .addr = omap44xx_mcbsp1_addrs,
3827 .user = OCP_USER_MPU,
3828};
3829
3830static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
3831 {
3832 .name = "dma",
3833 .pa_start = 0x49022000,
3834 .pa_end = 0x490220ff,
3835 .flags = ADDR_TYPE_RT
3836 },
3837 { }
3838};
3839
3840/* l4_abe -> mcbsp1 (dma) */
3841static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
3842 .master = &omap44xx_l4_abe_hwmod,
3843 .slave = &omap44xx_mcbsp1_hwmod,
3844 .clk = "ocp_abe_iclk",
3845 .addr = omap44xx_mcbsp1_dma_addrs,
3846 .user = OCP_USER_SDMA,
3847};
3848
3849static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
3850 {
3851 .name = "mpu",
3852 .pa_start = 0x40124000,
3853 .pa_end = 0x401240ff,
3854 .flags = ADDR_TYPE_RT
3855 },
3856 { }
3857};
3858
3859/* l4_abe -> mcbsp2 */
3860static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
3861 .master = &omap44xx_l4_abe_hwmod,
3862 .slave = &omap44xx_mcbsp2_hwmod,
3863 .clk = "ocp_abe_iclk",
3864 .addr = omap44xx_mcbsp2_addrs,
3865 .user = OCP_USER_MPU,
3866};
3867
3868static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
3869 {
3870 .name = "dma",
3871 .pa_start = 0x49024000,
3872 .pa_end = 0x490240ff,
3873 .flags = ADDR_TYPE_RT
3874 },
3875 { }
3876};
3877
3878/* l4_abe -> mcbsp2 (dma) */
3879static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
3880 .master = &omap44xx_l4_abe_hwmod,
3881 .slave = &omap44xx_mcbsp2_hwmod,
3882 .clk = "ocp_abe_iclk",
3883 .addr = omap44xx_mcbsp2_dma_addrs,
3884 .user = OCP_USER_SDMA,
3885};
3886
3887static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
3888 {
3889 .name = "mpu",
3890 .pa_start = 0x40126000,
3891 .pa_end = 0x401260ff,
3892 .flags = ADDR_TYPE_RT
3893 },
3894 { }
3895};
3896
3897/* l4_abe -> mcbsp3 */
3898static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
3899 .master = &omap44xx_l4_abe_hwmod,
3900 .slave = &omap44xx_mcbsp3_hwmod,
3901 .clk = "ocp_abe_iclk",
3902 .addr = omap44xx_mcbsp3_addrs,
3903 .user = OCP_USER_MPU,
3904};
3905
3906static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
3907 {
3908 .name = "dma",
3909 .pa_start = 0x49026000,
3910 .pa_end = 0x490260ff,
3911 .flags = ADDR_TYPE_RT
3912 },
3913 { }
3914};
3915
3916/* l4_abe -> mcbsp3 (dma) */
3917static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
3918 .master = &omap44xx_l4_abe_hwmod,
3919 .slave = &omap44xx_mcbsp3_hwmod,
3920 .clk = "ocp_abe_iclk",
3921 .addr = omap44xx_mcbsp3_dma_addrs,
3922 .user = OCP_USER_SDMA,
3923};
3924
3925static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
3926 {
3927 .pa_start = 0x48096000,
3928 .pa_end = 0x480960ff,
3929 .flags = ADDR_TYPE_RT
3930 },
3931 { }
3932};
3933
3934/* l4_per -> mcbsp4 */
3935static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
3936 .master = &omap44xx_l4_per_hwmod,
3937 .slave = &omap44xx_mcbsp4_hwmod,
3938 .clk = "l4_div_ck",
3939 .addr = omap44xx_mcbsp4_addrs,
3940 .user = OCP_USER_MPU | OCP_USER_SDMA,
3941};
3942
3943static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
3944 {
3945 .pa_start = 0x40132000,
3946 .pa_end = 0x4013207f,
3947 .flags = ADDR_TYPE_RT
3948 },
3949 { }
3950};
3951
3952/* l4_abe -> mcpdm */
3953static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
3954 .master = &omap44xx_l4_abe_hwmod,
3955 .slave = &omap44xx_mcpdm_hwmod,
3956 .clk = "ocp_abe_iclk",
3957 .addr = omap44xx_mcpdm_addrs,
3958 .user = OCP_USER_MPU,
3959};
3960
3961static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
3962 {
3963 .pa_start = 0x49032000,
3964 .pa_end = 0x4903207f,
3965 .flags = ADDR_TYPE_RT
3966 },
3967 { }
3968};
3969
3970/* l4_abe -> mcpdm (dma) */
3971static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
3972 .master = &omap44xx_l4_abe_hwmod,
3973 .slave = &omap44xx_mcpdm_hwmod,
3974 .clk = "ocp_abe_iclk",
3975 .addr = omap44xx_mcpdm_dma_addrs,
3976 .user = OCP_USER_SDMA,
3977};
3978
3979static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
3980 {
3981 .pa_start = 0x48098000,
3982 .pa_end = 0x480981ff,
3983 .flags = ADDR_TYPE_RT
3984 },
3985 { }
3986};
3987
3988/* l4_per -> mcspi1 */
3989static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
3990 .master = &omap44xx_l4_per_hwmod,
3991 .slave = &omap44xx_mcspi1_hwmod,
3992 .clk = "l4_div_ck",
3993 .addr = omap44xx_mcspi1_addrs,
3994 .user = OCP_USER_MPU | OCP_USER_SDMA,
3995};
3996
3997static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
3998 {
3999 .pa_start = 0x4809a000,
4000 .pa_end = 0x4809a1ff,
4001 .flags = ADDR_TYPE_RT
4002 },
4003 { }
4004};
4005
4006/* l4_per -> mcspi2 */
4007static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
4008 .master = &omap44xx_l4_per_hwmod,
4009 .slave = &omap44xx_mcspi2_hwmod,
4010 .clk = "l4_div_ck",
4011 .addr = omap44xx_mcspi2_addrs,
4012 .user = OCP_USER_MPU | OCP_USER_SDMA,
4013};
4014
4015static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
4016 {
4017 .pa_start = 0x480b8000,
4018 .pa_end = 0x480b81ff,
4019 .flags = ADDR_TYPE_RT
4020 },
4021 { }
4022};
4023
4024/* l4_per -> mcspi3 */
4025static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
4026 .master = &omap44xx_l4_per_hwmod,
4027 .slave = &omap44xx_mcspi3_hwmod,
4028 .clk = "l4_div_ck",
4029 .addr = omap44xx_mcspi3_addrs,
4030 .user = OCP_USER_MPU | OCP_USER_SDMA,
4031};
4032
4033static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
4034 {
4035 .pa_start = 0x480ba000,
4036 .pa_end = 0x480ba1ff,
4037 .flags = ADDR_TYPE_RT
4038 },
4039 { }
4040};
4041
4042/* l4_per -> mcspi4 */
4043static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
4044 .master = &omap44xx_l4_per_hwmod,
4045 .slave = &omap44xx_mcspi4_hwmod,
4046 .clk = "l4_div_ck",
4047 .addr = omap44xx_mcspi4_addrs,
4048 .user = OCP_USER_MPU | OCP_USER_SDMA,
4049};
4050
4051static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
4052 {
4053 .pa_start = 0x4809c000,
4054 .pa_end = 0x4809c3ff,
4055 .flags = ADDR_TYPE_RT
4056 },
4057 { }
4058};
4059
4060/* l4_per -> mmc1 */
4061static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
4062 .master = &omap44xx_l4_per_hwmod,
4063 .slave = &omap44xx_mmc1_hwmod,
4064 .clk = "l4_div_ck",
4065 .addr = omap44xx_mmc1_addrs,
4066 .user = OCP_USER_MPU | OCP_USER_SDMA,
4067};
4068
4069static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
4070 {
4071 .pa_start = 0x480b4000,
4072 .pa_end = 0x480b43ff,
4073 .flags = ADDR_TYPE_RT
4074 },
4075 { }
4076};
4077
4078/* l4_per -> mmc2 */
4079static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
4080 .master = &omap44xx_l4_per_hwmod,
4081 .slave = &omap44xx_mmc2_hwmod,
4082 .clk = "l4_div_ck",
4083 .addr = omap44xx_mmc2_addrs,
4084 .user = OCP_USER_MPU | OCP_USER_SDMA,
4085};
4086
4087static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
4088 {
4089 .pa_start = 0x480ad000,
4090 .pa_end = 0x480ad3ff,
4091 .flags = ADDR_TYPE_RT
4092 },
4093 { }
4094};
4095
4096/* l4_per -> mmc3 */
4097static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
4098 .master = &omap44xx_l4_per_hwmod,
4099 .slave = &omap44xx_mmc3_hwmod,
4100 .clk = "l4_div_ck",
4101 .addr = omap44xx_mmc3_addrs,
4102 .user = OCP_USER_MPU | OCP_USER_SDMA,
4103};
4104
4105static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
4106 {
4107 .pa_start = 0x480d1000,
4108 .pa_end = 0x480d13ff,
4109 .flags = ADDR_TYPE_RT
4110 },
4111 { }
4112};
4113
4114/* l4_per -> mmc4 */
4115static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
4116 .master = &omap44xx_l4_per_hwmod,
4117 .slave = &omap44xx_mmc4_hwmod,
4118 .clk = "l4_div_ck",
4119 .addr = omap44xx_mmc4_addrs,
4120 .user = OCP_USER_MPU | OCP_USER_SDMA,
4121};
4122
4123static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
4124 {
4125 .pa_start = 0x480d5000,
4126 .pa_end = 0x480d53ff,
4127 .flags = ADDR_TYPE_RT
4128 },
4129 { }
4130};
4131
4132/* l4_per -> mmc5 */
4133static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
4134 .master = &omap44xx_l4_per_hwmod,
4135 .slave = &omap44xx_mmc5_hwmod,
4136 .clk = "l4_div_ck",
4137 .addr = omap44xx_mmc5_addrs,
4138 .user = OCP_USER_MPU | OCP_USER_SDMA,
4139};
4140
4141static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
4142 {
4143 .pa_start = 0x4a0dd000,
4144 .pa_end = 0x4a0dd03f,
4145 .flags = ADDR_TYPE_RT
4146 },
4147 { }
4148};
4149
4150/* l4_cfg -> smartreflex_core */
4151static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
4152 .master = &omap44xx_l4_cfg_hwmod,
4153 .slave = &omap44xx_smartreflex_core_hwmod,
4154 .clk = "l4_div_ck",
4155 .addr = omap44xx_smartreflex_core_addrs,
4156 .user = OCP_USER_MPU | OCP_USER_SDMA,
4157};
4158
4159static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
4160 {
4161 .pa_start = 0x4a0db000,
4162 .pa_end = 0x4a0db03f,
4163 .flags = ADDR_TYPE_RT
4164 },
4165 { }
4166};
4167
4168/* l4_cfg -> smartreflex_iva */
4169static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
4170 .master = &omap44xx_l4_cfg_hwmod,
4171 .slave = &omap44xx_smartreflex_iva_hwmod,
4172 .clk = "l4_div_ck",
4173 .addr = omap44xx_smartreflex_iva_addrs,
4174 .user = OCP_USER_MPU | OCP_USER_SDMA,
4175};
4176
4177static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
4178 {
4179 .pa_start = 0x4a0d9000,
4180 .pa_end = 0x4a0d903f,
4181 .flags = ADDR_TYPE_RT
4182 },
4183 { }
4184};
4185
4186/* l4_cfg -> smartreflex_mpu */
4187static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
4188 .master = &omap44xx_l4_cfg_hwmod,
4189 .slave = &omap44xx_smartreflex_mpu_hwmod,
4190 .clk = "l4_div_ck",
4191 .addr = omap44xx_smartreflex_mpu_addrs,
4192 .user = OCP_USER_MPU | OCP_USER_SDMA,
4193};
4194
4195static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
4196 {
4197 .pa_start = 0x4a0f6000,
4198 .pa_end = 0x4a0f6fff,
4199 .flags = ADDR_TYPE_RT
4200 },
4201 { }
4202};
4203
4204/* l4_cfg -> spinlock */
4205static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
4206 .master = &omap44xx_l4_cfg_hwmod,
4207 .slave = &omap44xx_spinlock_hwmod,
4208 .clk = "l4_div_ck",
4209 .addr = omap44xx_spinlock_addrs,
4210 .user = OCP_USER_MPU | OCP_USER_SDMA,
4211};
4212
4213static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
4214 {
4215 .pa_start = 0x4a318000,
4216 .pa_end = 0x4a31807f,
4217 .flags = ADDR_TYPE_RT
4218 },
4219 { }
4220};
4221
4222/* l4_wkup -> timer1 */
4223static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
4224 .master = &omap44xx_l4_wkup_hwmod,
4225 .slave = &omap44xx_timer1_hwmod,
4226 .clk = "l4_wkup_clk_mux_ck",
4227 .addr = omap44xx_timer1_addrs,
4228 .user = OCP_USER_MPU | OCP_USER_SDMA,
4229};
4230
4231static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
4232 {
4233 .pa_start = 0x48032000,
4234 .pa_end = 0x4803207f,
4235 .flags = ADDR_TYPE_RT
4236 },
4237 { }
4238};
4239
4240/* l4_per -> timer2 */
4241static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
4242 .master = &omap44xx_l4_per_hwmod,
4243 .slave = &omap44xx_timer2_hwmod,
4244 .clk = "l4_div_ck",
4245 .addr = omap44xx_timer2_addrs,
4246 .user = OCP_USER_MPU | OCP_USER_SDMA,
4247};
4248
4249static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
4250 {
4251 .pa_start = 0x48034000,
4252 .pa_end = 0x4803407f,
4253 .flags = ADDR_TYPE_RT
4254 },
4255 { }
4256};
4257
4258/* l4_per -> timer3 */
4259static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
4260 .master = &omap44xx_l4_per_hwmod,
4261 .slave = &omap44xx_timer3_hwmod,
4262 .clk = "l4_div_ck",
4263 .addr = omap44xx_timer3_addrs,
4264 .user = OCP_USER_MPU | OCP_USER_SDMA,
4265};
4266
4267static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
4268 {
4269 .pa_start = 0x48036000,
4270 .pa_end = 0x4803607f,
4271 .flags = ADDR_TYPE_RT
4272 },
4273 { }
4274};
4275
4276/* l4_per -> timer4 */
4277static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
4278 .master = &omap44xx_l4_per_hwmod,
4279 .slave = &omap44xx_timer4_hwmod,
4280 .clk = "l4_div_ck",
4281 .addr = omap44xx_timer4_addrs,
4282 .user = OCP_USER_MPU | OCP_USER_SDMA,
4283};
4284
4285static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
4286 {
4287 .pa_start = 0x40138000,
4288 .pa_end = 0x4013807f,
4289 .flags = ADDR_TYPE_RT
4290 },
4291 { }
4292};
4293
4294/* l4_abe -> timer5 */
4295static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4296 .master = &omap44xx_l4_abe_hwmod,
4297 .slave = &omap44xx_timer5_hwmod,
4298 .clk = "ocp_abe_iclk",
4299 .addr = omap44xx_timer5_addrs,
4300 .user = OCP_USER_MPU,
4301};
4302
4303static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
4304 {
4305 .pa_start = 0x49038000,
4306 .pa_end = 0x4903807f,
4307 .flags = ADDR_TYPE_RT
4308 },
4309 { }
4310};
4311
4312/* l4_abe -> timer5 (dma) */
4313static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4314 .master = &omap44xx_l4_abe_hwmod,
4315 .slave = &omap44xx_timer5_hwmod,
4316 .clk = "ocp_abe_iclk",
4317 .addr = omap44xx_timer5_dma_addrs,
4318 .user = OCP_USER_SDMA,
4319};
4320
4321static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
4322 {
4323 .pa_start = 0x4013a000,
4324 .pa_end = 0x4013a07f,
4325 .flags = ADDR_TYPE_RT
4326 },
4327 { }
4328};
4329
4330/* l4_abe -> timer6 */
4331static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4332 .master = &omap44xx_l4_abe_hwmod,
4333 .slave = &omap44xx_timer6_hwmod,
4334 .clk = "ocp_abe_iclk",
4335 .addr = omap44xx_timer6_addrs,
4336 .user = OCP_USER_MPU,
4337};
4338
4339static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
4340 {
4341 .pa_start = 0x4903a000,
4342 .pa_end = 0x4903a07f,
4343 .flags = ADDR_TYPE_RT
4344 },
4345 { }
4346};
4347
4348/* l4_abe -> timer6 (dma) */
4349static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4350 .master = &omap44xx_l4_abe_hwmod,
4351 .slave = &omap44xx_timer6_hwmod,
4352 .clk = "ocp_abe_iclk",
4353 .addr = omap44xx_timer6_dma_addrs,
4354 .user = OCP_USER_SDMA,
4355};
4356
4357static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
4358 {
4359 .pa_start = 0x4013c000,
4360 .pa_end = 0x4013c07f,
4361 .flags = ADDR_TYPE_RT
4362 },
4363 { }
4364};
4365
4366/* l4_abe -> timer7 */
4367static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4368 .master = &omap44xx_l4_abe_hwmod,
4369 .slave = &omap44xx_timer7_hwmod,
4370 .clk = "ocp_abe_iclk",
4371 .addr = omap44xx_timer7_addrs,
4372 .user = OCP_USER_MPU,
4373};
4374
4375static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
4376 {
4377 .pa_start = 0x4903c000,
4378 .pa_end = 0x4903c07f,
4379 .flags = ADDR_TYPE_RT
4380 },
4381 { }
4382};
4383
4384/* l4_abe -> timer7 (dma) */
4385static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4386 .master = &omap44xx_l4_abe_hwmod,
4387 .slave = &omap44xx_timer7_hwmod,
4388 .clk = "ocp_abe_iclk",
4389 .addr = omap44xx_timer7_dma_addrs,
4390 .user = OCP_USER_SDMA,
4391};
4392
4393static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
4394 {
4395 .pa_start = 0x4013e000,
4396 .pa_end = 0x4013e07f,
4397 .flags = ADDR_TYPE_RT
4398 },
4399 { }
4400};
4401
4402/* l4_abe -> timer8 */
4403static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4404 .master = &omap44xx_l4_abe_hwmod,
4405 .slave = &omap44xx_timer8_hwmod,
4406 .clk = "ocp_abe_iclk",
4407 .addr = omap44xx_timer8_addrs,
4408 .user = OCP_USER_MPU,
4409};
4410
4411static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
4412 {
4413 .pa_start = 0x4903e000,
4414 .pa_end = 0x4903e07f,
4415 .flags = ADDR_TYPE_RT
4416 },
4417 { }
4418};
4419
4420/* l4_abe -> timer8 (dma) */
4421static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4422 .master = &omap44xx_l4_abe_hwmod,
4423 .slave = &omap44xx_timer8_hwmod,
4424 .clk = "ocp_abe_iclk",
4425 .addr = omap44xx_timer8_dma_addrs,
4426 .user = OCP_USER_SDMA,
4427};
4428
4429static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
4430 {
4431 .pa_start = 0x4803e000,
4432 .pa_end = 0x4803e07f,
4433 .flags = ADDR_TYPE_RT
4434 },
4435 { }
4436};
4437
4438/* l4_per -> timer9 */
4439static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
4440 .master = &omap44xx_l4_per_hwmod,
4441 .slave = &omap44xx_timer9_hwmod,
4442 .clk = "l4_div_ck",
4443 .addr = omap44xx_timer9_addrs,
4444 .user = OCP_USER_MPU | OCP_USER_SDMA,
4445};
4446
4447static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
4448 {
4449 .pa_start = 0x48086000,
4450 .pa_end = 0x4808607f,
4451 .flags = ADDR_TYPE_RT
4452 },
4453 { }
4454};
4455
4456/* l4_per -> timer10 */
4457static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
4458 .master = &omap44xx_l4_per_hwmod,
4459 .slave = &omap44xx_timer10_hwmod,
4460 .clk = "l4_div_ck",
4461 .addr = omap44xx_timer10_addrs,
4462 .user = OCP_USER_MPU | OCP_USER_SDMA,
4463};
4464
4465static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
4466 {
4467 .pa_start = 0x48088000,
4468 .pa_end = 0x4808807f,
4469 .flags = ADDR_TYPE_RT
4470 },
4471 { }
4472};
4473
4474/* l4_per -> timer11 */
4475static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
4476 .master = &omap44xx_l4_per_hwmod,
4477 .slave = &omap44xx_timer11_hwmod,
4478 .clk = "l4_div_ck",
4479 .addr = omap44xx_timer11_addrs,
4480 .user = OCP_USER_MPU | OCP_USER_SDMA,
4481};
4482
4483static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
4484 {
4485 .pa_start = 0x4806a000,
4486 .pa_end = 0x4806a0ff,
4487 .flags = ADDR_TYPE_RT
4488 },
4489 { }
4490};
4491
4492/* l4_per -> uart1 */
4493static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
4494 .master = &omap44xx_l4_per_hwmod,
4495 .slave = &omap44xx_uart1_hwmod,
4496 .clk = "l4_div_ck",
4497 .addr = omap44xx_uart1_addrs,
4498 .user = OCP_USER_MPU | OCP_USER_SDMA,
4499};
4500
4501static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
4502 {
4503 .pa_start = 0x4806c000,
4504 .pa_end = 0x4806c0ff,
4505 .flags = ADDR_TYPE_RT
4506 },
4507 { }
4508};
4509
4510/* l4_per -> uart2 */
4511static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
4512 .master = &omap44xx_l4_per_hwmod,
4513 .slave = &omap44xx_uart2_hwmod,
4514 .clk = "l4_div_ck",
4515 .addr = omap44xx_uart2_addrs,
4516 .user = OCP_USER_MPU | OCP_USER_SDMA,
4517};
4518
4519static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
4520 {
4521 .pa_start = 0x48020000,
4522 .pa_end = 0x480200ff,
4523 .flags = ADDR_TYPE_RT
4524 },
4525 { }
4526};
4527
4528/* l4_per -> uart3 */
4529static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
4530 .master = &omap44xx_l4_per_hwmod,
4531 .slave = &omap44xx_uart3_hwmod,
4532 .clk = "l4_div_ck",
4533 .addr = omap44xx_uart3_addrs,
4534 .user = OCP_USER_MPU | OCP_USER_SDMA,
4535};
4536
4537static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
4538 {
4539 .pa_start = 0x4806e000,
4540 .pa_end = 0x4806e0ff,
4541 .flags = ADDR_TYPE_RT
4542 },
4543 { }
4544};
4545
4546/* l4_per -> uart4 */
4547static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
4548 .master = &omap44xx_l4_per_hwmod,
4549 .slave = &omap44xx_uart4_hwmod,
4550 .clk = "l4_div_ck",
4551 .addr = omap44xx_uart4_addrs,
4552 .user = OCP_USER_MPU | OCP_USER_SDMA,
5354}; 4553};
5355 4554
5356static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = { 4555static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = {
@@ -5373,12 +4572,7 @@ static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = {
5373 {} 4572 {}
5374}; 4573};
5375 4574
5376static struct omap_hwmod_irq_info omap44xx_usb_host_hs_irqs[] = { 4575/* l4_cfg -> usb_host_hs */
5377 { .name = "ohci-irq", .irq = 76 + OMAP44XX_IRQ_GIC_START },
5378 { .name = "ehci-irq", .irq = 77 + OMAP44XX_IRQ_GIC_START },
5379 { .irq = -1 }
5380};
5381
5382static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = { 4576static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = {
5383 .master = &omap44xx_l4_cfg_hwmod, 4577 .master = &omap44xx_l4_cfg_hwmod,
5384 .slave = &omap44xx_usb_host_hs_hwmod, 4578 .slave = &omap44xx_usb_host_hs_hwmod,
@@ -5387,100 +4581,22 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = {
5387 .user = OCP_USER_MPU | OCP_USER_SDMA, 4581 .user = OCP_USER_MPU | OCP_USER_SDMA,
5388}; 4582};
5389 4583
5390static struct omap_hwmod_ocp_if *omap44xx_usb_host_hs_slaves[] = { 4584static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
5391 &omap44xx_l4_cfg__usb_host_hs, 4585 {
5392}; 4586 .pa_start = 0x4a0ab000,
5393 4587 .pa_end = 0x4a0ab003,
5394static struct omap_hwmod omap44xx_usb_host_hs_hwmod = { 4588 .flags = ADDR_TYPE_RT
5395 .name = "usb_host_hs",
5396 .class = &omap44xx_usb_host_hs_hwmod_class,
5397 .clkdm_name = "l3_init_clkdm",
5398 .main_clk = "usb_host_hs_fck",
5399 .prcm = {
5400 .omap4 = {
5401 .clkctrl_offs = OMAP4_CM_L3INIT_USB_HOST_CLKCTRL_OFFSET,
5402 .context_offs = OMAP4_RM_L3INIT_USB_HOST_CONTEXT_OFFSET,
5403 .modulemode = MODULEMODE_SWCTRL,
5404 },
5405 }, 4589 },
5406 .mpu_irqs = omap44xx_usb_host_hs_irqs, 4590 { }
5407 .slaves = omap44xx_usb_host_hs_slaves,
5408 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_slaves),
5409 .masters = omap44xx_usb_host_hs_masters,
5410 .masters_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_masters),
5411
5412 /*
5413 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
5414 * id: i660
5415 *
5416 * Description:
5417 * In the following configuration :
5418 * - USBHOST module is set to smart-idle mode
5419 * - PRCM asserts idle_req to the USBHOST module ( This typically
5420 * happens when the system is going to a low power mode : all ports
5421 * have been suspended, the master part of the USBHOST module has
5422 * entered the standby state, and SW has cut the functional clocks)
5423 * - an USBHOST interrupt occurs before the module is able to answer
5424 * idle_ack, typically a remote wakeup IRQ.
5425 * Then the USB HOST module will enter a deadlock situation where it
5426 * is no more accessible nor functional.
5427 *
5428 * Workaround:
5429 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
5430 */
5431
5432 /*
5433 * Errata: USB host EHCI may stall when entering smart-standby mode
5434 * Id: i571
5435 *
5436 * Description:
5437 * When the USBHOST module is set to smart-standby mode, and when it is
5438 * ready to enter the standby state (i.e. all ports are suspended and
5439 * all attached devices are in suspend mode), then it can wrongly assert
5440 * the Mstandby signal too early while there are still some residual OCP
5441 * transactions ongoing. If this condition occurs, the internal state
5442 * machine may go to an undefined state and the USB link may be stuck
5443 * upon the next resume.
5444 *
5445 * Workaround:
5446 * Don't use smart standby; use only force standby,
5447 * hence HWMOD_SWSUP_MSTANDBY
5448 */
5449
5450 /*
5451 * During system boot; If the hwmod framework resets the module
5452 * the module will have smart idle settings; which can lead to deadlock
5453 * (above Errata Id:i660); so, dont reset the module during boot;
5454 * Use HWMOD_INIT_NO_RESET.
5455 */
5456
5457 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
5458 HWMOD_INIT_NO_RESET,
5459};
5460
5461/*
5462 * 'usb_tll_hs' class
5463 * usb_tll_hs module is the adapter on the usb_host_hs ports
5464 */
5465static struct omap_hwmod_class_sysconfig omap44xx_usb_tll_hs_sysc = {
5466 .rev_offs = 0x0000,
5467 .sysc_offs = 0x0010,
5468 .syss_offs = 0x0014,
5469 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
5470 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
5471 SYSC_HAS_AUTOIDLE),
5472 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
5473 .sysc_fields = &omap_hwmod_sysc_type1,
5474};
5475
5476static struct omap_hwmod_class omap44xx_usb_tll_hs_hwmod_class = {
5477 .name = "usb_tll_hs",
5478 .sysc = &omap44xx_usb_tll_hs_sysc,
5479}; 4591};
5480 4592
5481static struct omap_hwmod_irq_info omap44xx_usb_tll_hs_irqs[] = { 4593/* l4_cfg -> usb_otg_hs */
5482 { .name = "tll-irq", .irq = 78 + OMAP44XX_IRQ_GIC_START }, 4594static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
5483 { .irq = -1 } 4595 .master = &omap44xx_l4_cfg_hwmod,
4596 .slave = &omap44xx_usb_otg_hs_hwmod,
4597 .clk = "l4_div_ck",
4598 .addr = omap44xx_usb_otg_hs_addrs,
4599 .user = OCP_USER_MPU | OCP_USER_SDMA,
5484}; 4600};
5485 4601
5486static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = { 4602static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = {
@@ -5493,6 +4609,7 @@ static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = {
5493 {} 4609 {}
5494}; 4610};
5495 4611
4612/* l4_cfg -> usb_tll_hs */
5496static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = { 4613static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = {
5497 .master = &omap44xx_l4_cfg_hwmod, 4614 .master = &omap44xx_l4_cfg_hwmod,
5498 .slave = &omap44xx_usb_tll_hs_hwmod, 4615 .slave = &omap44xx_usb_tll_hs_hwmod,
@@ -5501,181 +4618,184 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = {
5501 .user = OCP_USER_MPU | OCP_USER_SDMA, 4618 .user = OCP_USER_MPU | OCP_USER_SDMA,
5502}; 4619};
5503 4620
5504static struct omap_hwmod_ocp_if *omap44xx_usb_tll_hs_slaves[] = { 4621static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
5505 &omap44xx_l4_cfg__usb_tll_hs, 4622 {
4623 .pa_start = 0x4a314000,
4624 .pa_end = 0x4a31407f,
4625 .flags = ADDR_TYPE_RT
4626 },
4627 { }
5506}; 4628};
5507 4629
5508static struct omap_hwmod omap44xx_usb_tll_hs_hwmod = { 4630/* l4_wkup -> wd_timer2 */
5509 .name = "usb_tll_hs", 4631static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
5510 .class = &omap44xx_usb_tll_hs_hwmod_class, 4632 .master = &omap44xx_l4_wkup_hwmod,
5511 .clkdm_name = "l3_init_clkdm", 4633 .slave = &omap44xx_wd_timer2_hwmod,
5512 .main_clk = "usb_tll_hs_ick", 4634 .clk = "l4_wkup_clk_mux_ck",
5513 .prcm = { 4635 .addr = omap44xx_wd_timer2_addrs,
5514 .omap4 = { 4636 .user = OCP_USER_MPU | OCP_USER_SDMA,
5515 .clkctrl_offs = OMAP4_CM_L3INIT_USB_TLL_CLKCTRL_OFFSET, 4637};
5516 .context_offs = OMAP4_RM_L3INIT_USB_TLL_CONTEXT_OFFSET, 4638
5517 .modulemode = MODULEMODE_HWCTRL, 4639static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
5518 }, 4640 {
4641 .pa_start = 0x40130000,
4642 .pa_end = 0x4013007f,
4643 .flags = ADDR_TYPE_RT
5519 }, 4644 },
5520 .mpu_irqs = omap44xx_usb_tll_hs_irqs, 4645 { }
5521 .slaves = omap44xx_usb_tll_hs_slaves, 4646};
5522 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_tll_hs_slaves), 4647
4648/* l4_abe -> wd_timer3 */
4649static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
4650 .master = &omap44xx_l4_abe_hwmod,
4651 .slave = &omap44xx_wd_timer3_hwmod,
4652 .clk = "ocp_abe_iclk",
4653 .addr = omap44xx_wd_timer3_addrs,
4654 .user = OCP_USER_MPU,
5523}; 4655};
5524 4656
5525static __initdata struct omap_hwmod *omap44xx_hwmods[] = { 4657static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
5526 4658 {
5527 /* dmm class */ 4659 .pa_start = 0x49030000,
5528 &omap44xx_dmm_hwmod, 4660 .pa_end = 0x4903007f,
5529 4661 .flags = ADDR_TYPE_RT
5530 /* emif_fw class */ 4662 },
5531 &omap44xx_emif_fw_hwmod, 4663 { }
5532 4664};
5533 /* l3 class */ 4665
5534 &omap44xx_l3_instr_hwmod, 4666/* l4_abe -> wd_timer3 (dma) */
5535 &omap44xx_l3_main_1_hwmod, 4667static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
5536 &omap44xx_l3_main_2_hwmod, 4668 .master = &omap44xx_l4_abe_hwmod,
5537 &omap44xx_l3_main_3_hwmod, 4669 .slave = &omap44xx_wd_timer3_hwmod,
5538 4670 .clk = "ocp_abe_iclk",
5539 /* l4 class */ 4671 .addr = omap44xx_wd_timer3_dma_addrs,
5540 &omap44xx_l4_abe_hwmod, 4672 .user = OCP_USER_SDMA,
5541 &omap44xx_l4_cfg_hwmod, 4673};
5542 &omap44xx_l4_per_hwmod, 4674
5543 &omap44xx_l4_wkup_hwmod, 4675static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
5544 4676 &omap44xx_l3_main_1__dmm,
5545 /* mpu_bus class */ 4677 &omap44xx_mpu__dmm,
5546 &omap44xx_mpu_private_hwmod, 4678 &omap44xx_dmm__emif_fw,
5547 4679 &omap44xx_l4_cfg__emif_fw,
5548 /* aess class */ 4680 &omap44xx_iva__l3_instr,
5549/* &omap44xx_aess_hwmod, */ 4681 &omap44xx_l3_main_3__l3_instr,
5550 4682 &omap44xx_dsp__l3_main_1,
5551 /* bandgap class */ 4683 &omap44xx_dss__l3_main_1,
5552 &omap44xx_bandgap_hwmod, 4684 &omap44xx_l3_main_2__l3_main_1,
5553 4685 &omap44xx_l4_cfg__l3_main_1,
5554 /* counter class */ 4686 &omap44xx_mmc1__l3_main_1,
5555/* &omap44xx_counter_32k_hwmod, */ 4687 &omap44xx_mmc2__l3_main_1,
5556 4688 &omap44xx_mpu__l3_main_1,
5557 /* dma class */ 4689 &omap44xx_dma_system__l3_main_2,
5558 &omap44xx_dma_system_hwmod, 4690 &omap44xx_hsi__l3_main_2,
5559 4691 &omap44xx_ipu__l3_main_2,
5560 /* dmic class */ 4692 &omap44xx_iss__l3_main_2,
5561 &omap44xx_dmic_hwmod, 4693 &omap44xx_iva__l3_main_2,
5562 4694 &omap44xx_l3_main_1__l3_main_2,
5563 /* dsp class */ 4695 &omap44xx_l4_cfg__l3_main_2,
5564 &omap44xx_dsp_hwmod, 4696 &omap44xx_usb_host_hs__l3_main_2,
5565 &omap44xx_dsp_c0_hwmod, 4697 &omap44xx_usb_otg_hs__l3_main_2,
5566 4698 &omap44xx_l3_main_1__l3_main_3,
5567 /* dss class */ 4699 &omap44xx_l3_main_2__l3_main_3,
5568 &omap44xx_dss_hwmod, 4700 &omap44xx_l4_cfg__l3_main_3,
5569 &omap44xx_dss_dispc_hwmod, 4701 &omap44xx_aess__l4_abe,
5570 &omap44xx_dss_dsi1_hwmod, 4702 &omap44xx_dsp__l4_abe,
5571 &omap44xx_dss_dsi2_hwmod, 4703 &omap44xx_l3_main_1__l4_abe,
5572 &omap44xx_dss_hdmi_hwmod, 4704 &omap44xx_mpu__l4_abe,
5573 &omap44xx_dss_rfbi_hwmod, 4705 &omap44xx_l3_main_1__l4_cfg,
5574 &omap44xx_dss_venc_hwmod, 4706 &omap44xx_l3_main_2__l4_per,
5575 4707 &omap44xx_l4_cfg__l4_wkup,
5576 /* gpio class */ 4708 &omap44xx_mpu__mpu_private,
5577 &omap44xx_gpio1_hwmod, 4709 &omap44xx_l4_abe__aess,
5578 &omap44xx_gpio2_hwmod, 4710 &omap44xx_l4_abe__aess_dma,
5579 &omap44xx_gpio3_hwmod, 4711 &omap44xx_l4_wkup__counter_32k,
5580 &omap44xx_gpio4_hwmod, 4712 &omap44xx_l4_cfg__dma_system,
5581 &omap44xx_gpio5_hwmod, 4713 &omap44xx_l4_abe__dmic,
5582 &omap44xx_gpio6_hwmod, 4714 &omap44xx_l4_abe__dmic_dma,
5583 4715 &omap44xx_dsp__iva,
5584 /* hsi class */ 4716 &omap44xx_l4_cfg__dsp,
5585/* &omap44xx_hsi_hwmod, */ 4717 &omap44xx_l3_main_2__dss,
5586 4718 &omap44xx_l4_per__dss,
5587 /* i2c class */ 4719 &omap44xx_l3_main_2__dss_dispc,
5588 &omap44xx_i2c1_hwmod, 4720 &omap44xx_l4_per__dss_dispc,
5589 &omap44xx_i2c2_hwmod, 4721 &omap44xx_l3_main_2__dss_dsi1,
5590 &omap44xx_i2c3_hwmod, 4722 &omap44xx_l4_per__dss_dsi1,
5591 &omap44xx_i2c4_hwmod, 4723 &omap44xx_l3_main_2__dss_dsi2,
5592 4724 &omap44xx_l4_per__dss_dsi2,
5593 /* ipu class */ 4725 &omap44xx_l3_main_2__dss_hdmi,
5594 &omap44xx_ipu_hwmod, 4726 &omap44xx_l4_per__dss_hdmi,
5595 &omap44xx_ipu_c0_hwmod, 4727 &omap44xx_l3_main_2__dss_rfbi,
5596 &omap44xx_ipu_c1_hwmod, 4728 &omap44xx_l4_per__dss_rfbi,
5597 4729 &omap44xx_l3_main_2__dss_venc,
5598 /* iss class */ 4730 &omap44xx_l4_per__dss_venc,
5599/* &omap44xx_iss_hwmod, */ 4731 &omap44xx_l4_wkup__gpio1,
5600 4732 &omap44xx_l4_per__gpio2,
5601 /* iva class */ 4733 &omap44xx_l4_per__gpio3,
5602 &omap44xx_iva_hwmod, 4734 &omap44xx_l4_per__gpio4,
5603 &omap44xx_iva_seq0_hwmod, 4735 &omap44xx_l4_per__gpio5,
5604 &omap44xx_iva_seq1_hwmod, 4736 &omap44xx_l4_per__gpio6,
5605 4737 &omap44xx_l4_cfg__hsi,
5606 /* kbd class */ 4738 &omap44xx_l4_per__i2c1,
5607 &omap44xx_kbd_hwmod, 4739 &omap44xx_l4_per__i2c2,
5608 4740 &omap44xx_l4_per__i2c3,
5609 /* mailbox class */ 4741 &omap44xx_l4_per__i2c4,
5610 &omap44xx_mailbox_hwmod, 4742 &omap44xx_l3_main_2__ipu,
5611 4743 &omap44xx_l3_main_2__iss,
5612 /* mcbsp class */ 4744 &omap44xx_l3_main_2__iva,
5613 &omap44xx_mcbsp1_hwmod, 4745 &omap44xx_l4_wkup__kbd,
5614 &omap44xx_mcbsp2_hwmod, 4746 &omap44xx_l4_cfg__mailbox,
5615 &omap44xx_mcbsp3_hwmod, 4747 &omap44xx_l4_abe__mcbsp1,
5616 &omap44xx_mcbsp4_hwmod, 4748 &omap44xx_l4_abe__mcbsp1_dma,
5617 4749 &omap44xx_l4_abe__mcbsp2,
5618 /* mcpdm class */ 4750 &omap44xx_l4_abe__mcbsp2_dma,
5619 &omap44xx_mcpdm_hwmod, 4751 &omap44xx_l4_abe__mcbsp3,
5620 4752 &omap44xx_l4_abe__mcbsp3_dma,
5621 /* mcspi class */ 4753 &omap44xx_l4_per__mcbsp4,
5622 &omap44xx_mcspi1_hwmod, 4754 &omap44xx_l4_abe__mcpdm,
5623 &omap44xx_mcspi2_hwmod, 4755 &omap44xx_l4_abe__mcpdm_dma,
5624 &omap44xx_mcspi3_hwmod, 4756 &omap44xx_l4_per__mcspi1,
5625 &omap44xx_mcspi4_hwmod, 4757 &omap44xx_l4_per__mcspi2,
5626 4758 &omap44xx_l4_per__mcspi3,
5627 /* mmc class */ 4759 &omap44xx_l4_per__mcspi4,
5628 &omap44xx_mmc1_hwmod, 4760 &omap44xx_l4_per__mmc1,
5629 &omap44xx_mmc2_hwmod, 4761 &omap44xx_l4_per__mmc2,
5630 &omap44xx_mmc3_hwmod, 4762 &omap44xx_l4_per__mmc3,
5631 &omap44xx_mmc4_hwmod, 4763 &omap44xx_l4_per__mmc4,
5632 &omap44xx_mmc5_hwmod, 4764 &omap44xx_l4_per__mmc5,
5633 4765 &omap44xx_l4_cfg__smartreflex_core,
5634 /* mpu class */ 4766 &omap44xx_l4_cfg__smartreflex_iva,
5635 &omap44xx_mpu_hwmod, 4767 &omap44xx_l4_cfg__smartreflex_mpu,
5636 4768 &omap44xx_l4_cfg__spinlock,
5637 /* smartreflex class */ 4769 &omap44xx_l4_wkup__timer1,
5638 &omap44xx_smartreflex_core_hwmod, 4770 &omap44xx_l4_per__timer2,
5639 &omap44xx_smartreflex_iva_hwmod, 4771 &omap44xx_l4_per__timer3,
5640 &omap44xx_smartreflex_mpu_hwmod, 4772 &omap44xx_l4_per__timer4,
5641 4773 &omap44xx_l4_abe__timer5,
5642 /* spinlock class */ 4774 &omap44xx_l4_abe__timer5_dma,
5643 &omap44xx_spinlock_hwmod, 4775 &omap44xx_l4_abe__timer6,
5644 4776 &omap44xx_l4_abe__timer6_dma,
5645 /* timer class */ 4777 &omap44xx_l4_abe__timer7,
5646 &omap44xx_timer1_hwmod, 4778 &omap44xx_l4_abe__timer7_dma,
5647 &omap44xx_timer2_hwmod, 4779 &omap44xx_l4_abe__timer8,
5648 &omap44xx_timer3_hwmod, 4780 &omap44xx_l4_abe__timer8_dma,
5649 &omap44xx_timer4_hwmod, 4781 &omap44xx_l4_per__timer9,
5650 &omap44xx_timer5_hwmod, 4782 &omap44xx_l4_per__timer10,
5651 &omap44xx_timer6_hwmod, 4783 &omap44xx_l4_per__timer11,
5652 &omap44xx_timer7_hwmod, 4784 &omap44xx_l4_per__uart1,
5653 &omap44xx_timer8_hwmod, 4785 &omap44xx_l4_per__uart2,
5654 &omap44xx_timer9_hwmod, 4786 &omap44xx_l4_per__uart3,
5655 &omap44xx_timer10_hwmod, 4787 &omap44xx_l4_per__uart4,
5656 &omap44xx_timer11_hwmod, 4788 &omap44xx_l4_cfg__usb_host_hs,
5657 4789 &omap44xx_l4_cfg__usb_otg_hs,
5658 /* uart class */ 4790 &omap44xx_l4_cfg__usb_tll_hs,
5659 &omap44xx_uart1_hwmod, 4791 &omap44xx_l4_wkup__wd_timer2,
5660 &omap44xx_uart2_hwmod, 4792 &omap44xx_l4_abe__wd_timer3,
5661 &omap44xx_uart3_hwmod, 4793 &omap44xx_l4_abe__wd_timer3_dma,
5662 &omap44xx_uart4_hwmod,
5663
5664 /* usb host class */
5665 &omap44xx_usb_host_hs_hwmod,
5666 &omap44xx_usb_tll_hs_hwmod,
5667
5668 /* usb_otg_hs class */
5669 &omap44xx_usb_otg_hs_hwmod,
5670
5671 /* wd_timer class */
5672 &omap44xx_wd_timer2_hwmod,
5673 &omap44xx_wd_timer3_hwmod,
5674 NULL, 4794 NULL,
5675}; 4795};
5676 4796
5677int __init omap44xx_hwmod_init(void) 4797int __init omap44xx_hwmod_init(void)
5678{ 4798{
5679 return omap_hwmod_register(omap44xx_hwmods); 4799 return omap_hwmod_register_links(omap44xx_hwmod_ocp_ifs);
5680} 4800}
5681 4801
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h
index ad5d8f04c0b8..7aa9156d50ab 100644
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.h
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h
@@ -19,18 +19,6 @@
19#include "display.h" 19#include "display.h"
20 20
21/* Common address space across OMAP2xxx */ 21/* Common address space across OMAP2xxx */
22extern struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[];
23extern struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[];
24extern struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[];
25extern struct omap_hwmod_addr_space omap2xxx_timer2_addrs[];
26extern struct omap_hwmod_addr_space omap2xxx_timer3_addrs[];
27extern struct omap_hwmod_addr_space omap2xxx_timer4_addrs[];
28extern struct omap_hwmod_addr_space omap2xxx_timer5_addrs[];
29extern struct omap_hwmod_addr_space omap2xxx_timer6_addrs[];
30extern struct omap_hwmod_addr_space omap2xxx_timer7_addrs[];
31extern struct omap_hwmod_addr_space omap2xxx_timer8_addrs[];
32extern struct omap_hwmod_addr_space omap2xxx_timer9_addrs[];
33extern struct omap_hwmod_addr_space omap2xxx_timer12_addrs[];
34extern struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[]; 22extern struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[];
35 23
36/* Common address space across OMAP2xxx/3xxx */ 24/* Common address space across OMAP2xxx/3xxx */
@@ -54,6 +42,64 @@ extern struct omap_hwmod_addr_space omap2_mcbsp1_addrs[];
54/* Common IP block data across OMAP2xxx */ 42/* Common IP block data across OMAP2xxx */
55extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[]; 43extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[];
56extern struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[]; 44extern struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[];
45extern struct omap_gpio_dev_attr omap2xxx_gpio_dev_attr;
46extern struct omap_hwmod omap2xxx_l3_main_hwmod;
47extern struct omap_hwmod omap2xxx_l4_core_hwmod;
48extern struct omap_hwmod omap2xxx_l4_wkup_hwmod;
49extern struct omap_hwmod omap2xxx_mpu_hwmod;
50extern struct omap_hwmod omap2xxx_iva_hwmod;
51extern struct omap_hwmod omap2xxx_timer1_hwmod;
52extern struct omap_hwmod omap2xxx_timer2_hwmod;
53extern struct omap_hwmod omap2xxx_timer3_hwmod;
54extern struct omap_hwmod omap2xxx_timer4_hwmod;
55extern struct omap_hwmod omap2xxx_timer5_hwmod;
56extern struct omap_hwmod omap2xxx_timer6_hwmod;
57extern struct omap_hwmod omap2xxx_timer7_hwmod;
58extern struct omap_hwmod omap2xxx_timer8_hwmod;
59extern struct omap_hwmod omap2xxx_timer9_hwmod;
60extern struct omap_hwmod omap2xxx_timer10_hwmod;
61extern struct omap_hwmod omap2xxx_timer11_hwmod;
62extern struct omap_hwmod omap2xxx_timer12_hwmod;
63extern struct omap_hwmod omap2xxx_wd_timer2_hwmod;
64extern struct omap_hwmod omap2xxx_uart1_hwmod;
65extern struct omap_hwmod omap2xxx_uart2_hwmod;
66extern struct omap_hwmod omap2xxx_uart3_hwmod;
67extern struct omap_hwmod omap2xxx_dss_core_hwmod;
68extern struct omap_hwmod omap2xxx_dss_dispc_hwmod;
69extern struct omap_hwmod omap2xxx_dss_rfbi_hwmod;
70extern struct omap_hwmod omap2xxx_dss_venc_hwmod;
71extern struct omap_hwmod omap2xxx_gpio1_hwmod;
72extern struct omap_hwmod omap2xxx_gpio2_hwmod;
73extern struct omap_hwmod omap2xxx_gpio3_hwmod;
74extern struct omap_hwmod omap2xxx_gpio4_hwmod;
75extern struct omap_hwmod omap2xxx_mcspi1_hwmod;
76extern struct omap_hwmod omap2xxx_mcspi2_hwmod;
77
78/* Common interface data across OMAP2xxx */
79extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core;
80extern struct omap_hwmod_ocp_if omap2xxx_mpu__l3_main;
81extern struct omap_hwmod_ocp_if omap2xxx_dss__l3;
82extern struct omap_hwmod_ocp_if omap2xxx_l4_core__l4_wkup;
83extern struct omap_hwmod_ocp_if omap2_l4_core__uart1;
84extern struct omap_hwmod_ocp_if omap2_l4_core__uart2;
85extern struct omap_hwmod_ocp_if omap2_l4_core__uart3;
86extern struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi1;
87extern struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi2;
88extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer2;
89extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer3;
90extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer4;
91extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer5;
92extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer6;
93extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer7;
94extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer8;
95extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer9;
96extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer10;
97extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer11;
98extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer12;
99extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss;
100extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_dispc;
101extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi;
102extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc;
57 103
58/* Common IP block data */ 104/* Common IP block data */
59extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[]; 105extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[];
@@ -94,6 +140,7 @@ extern struct omap_hwmod_irq_info omap2_gpio4_irqs[];
94extern struct omap_hwmod_irq_info omap2_dma_system_irqs[]; 140extern struct omap_hwmod_irq_info omap2_dma_system_irqs[];
95extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[]; 141extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[];
96extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[]; 142extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[];
143extern struct omap_hwmod_addr_space omap2xxx_timer12_addrs[];
97 144
98/* OMAP hwmod classes - forward declarations */ 145/* OMAP hwmod classes - forward declarations */
99extern struct omap_hwmod_class l3_hwmod_class; 146extern struct omap_hwmod_class l3_hwmod_class;
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index c512bac69ec5..ecec873e78cd 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -145,8 +145,10 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
145{ 145{
146 char name[10]; /* 10 = sizeof("gptXX_Xck0") */ 146 char name[10]; /* 10 = sizeof("gptXX_Xck0") */
147 struct omap_hwmod *oh; 147 struct omap_hwmod *oh;
148 struct resource irq_rsrc, mem_rsrc;
148 size_t size; 149 size_t size;
149 int res = 0; 150 int res = 0;
151 int r;
150 152
151 sprintf(name, "timer%d", gptimer_id); 153 sprintf(name, "timer%d", gptimer_id);
152 omap_hwmod_setup_one(name); 154 omap_hwmod_setup_one(name);
@@ -154,9 +156,16 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
154 if (!oh) 156 if (!oh)
155 return -ENODEV; 157 return -ENODEV;
156 158
157 timer->irq = oh->mpu_irqs[0].irq; 159 r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL, &irq_rsrc);
158 timer->phys_base = oh->slaves[0]->addr->pa_start; 160 if (r)
159 size = oh->slaves[0]->addr->pa_end - timer->phys_base; 161 return -ENXIO;
162 timer->irq = irq_rsrc.start;
163
164 r = omap_hwmod_get_resource_byname(oh, IORESOURCE_MEM, NULL, &mem_rsrc);
165 if (r)
166 return -ENXIO;
167 timer->phys_base = mem_rsrc.start;
168 size = mem_rsrc.end - mem_rsrc.start;
160 169
161 /* Static mapping, never released */ 170 /* Static mapping, never released */
162 timer->io_base = ioremap(timer->phys_base, size); 171 timer->io_base = ioremap(timer->phys_base, size);
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 8070145ccb98..14dde32cd406 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -213,11 +213,16 @@ struct omap_hwmod_addr_space {
213 */ 213 */
214#define OCP_USER_MPU (1 << 0) 214#define OCP_USER_MPU (1 << 0)
215#define OCP_USER_SDMA (1 << 1) 215#define OCP_USER_SDMA (1 << 1)
216#define OCP_USER_DSP (1 << 2)
216 217
217/* omap_hwmod_ocp_if.flags bits */ 218/* omap_hwmod_ocp_if.flags bits */
218#define OCPIF_SWSUP_IDLE (1 << 0) 219#define OCPIF_SWSUP_IDLE (1 << 0)
219#define OCPIF_CAN_BURST (1 << 1) 220#define OCPIF_CAN_BURST (1 << 1)
220 221
222/* omap_hwmod_ocp_if._int_flags possibilities */
223#define _OCPIF_INT_FLAGS_REGISTERED (1 << 0)
224
225
221/** 226/**
222 * struct omap_hwmod_ocp_if - OCP interface data 227 * struct omap_hwmod_ocp_if - OCP interface data
223 * @master: struct omap_hwmod that initiates OCP transactions on this link 228 * @master: struct omap_hwmod that initiates OCP transactions on this link
@@ -229,6 +234,7 @@ struct omap_hwmod_addr_space {
229 * @width: OCP data width 234 * @width: OCP data width
230 * @user: initiators using this interface (see OCP_USER_* macros above) 235 * @user: initiators using this interface (see OCP_USER_* macros above)
231 * @flags: OCP interface flags (see OCPIF_* macros above) 236 * @flags: OCP interface flags (see OCPIF_* macros above)
237 * @_int_flags: internal flags (see _OCPIF_INT_FLAGS* macros above)
232 * 238 *
233 * It may also be useful to add a tag_cnt field for OCP2.x devices. 239 * It may also be useful to add a tag_cnt field for OCP2.x devices.
234 * 240 *
@@ -247,6 +253,7 @@ struct omap_hwmod_ocp_if {
247 u8 width; 253 u8 width;
248 u8 user; 254 u8 user;
249 u8 flags; 255 u8 flags;
256 u8 _int_flags;
250}; 257};
251 258
252 259
@@ -305,6 +312,7 @@ struct omap_hwmod_sysc_fields {
305 * @rev_offs: IP block revision register offset (from module base addr) 312 * @rev_offs: IP block revision register offset (from module base addr)
306 * @sysc_offs: OCP_SYSCONFIG register offset (from module base addr) 313 * @sysc_offs: OCP_SYSCONFIG register offset (from module base addr)
307 * @syss_offs: OCP_SYSSTATUS register offset (from module base addr) 314 * @syss_offs: OCP_SYSSTATUS register offset (from module base addr)
315 * @srst_udelay: Delay needed after doing a softreset in usecs
308 * @idlemodes: One or more of {SIDLE,MSTANDBY}_{OFF,FORCE,SMART} 316 * @idlemodes: One or more of {SIDLE,MSTANDBY}_{OFF,FORCE,SMART}
309 * @sysc_flags: SYS{C,S}_HAS* flags indicating SYSCONFIG bits supported 317 * @sysc_flags: SYS{C,S}_HAS* flags indicating SYSCONFIG bits supported
310 * @clockact: the default value of the module CLOCKACTIVITY bits 318 * @clockact: the default value of the module CLOCKACTIVITY bits
@@ -326,13 +334,14 @@ struct omap_hwmod_sysc_fields {
326 * then this field has to be populated with the correct offset structure. 334 * then this field has to be populated with the correct offset structure.
327 */ 335 */
328struct omap_hwmod_class_sysconfig { 336struct omap_hwmod_class_sysconfig {
329 u16 rev_offs; 337 u32 rev_offs;
330 u16 sysc_offs; 338 u32 sysc_offs;
331 u16 syss_offs; 339 u32 syss_offs;
332 u16 sysc_flags; 340 u16 sysc_flags;
341 struct omap_hwmod_sysc_fields *sysc_fields;
342 u8 srst_udelay;
333 u8 idlemodes; 343 u8 idlemodes;
334 u8 clockact; 344 u8 clockact;
335 struct omap_hwmod_sysc_fields *sysc_fields;
336}; 345};
337 346
338/** 347/**
@@ -474,6 +483,16 @@ struct omap_hwmod_class {
474}; 483};
475 484
476/** 485/**
486 * struct omap_hwmod_link - internal structure linking hwmods with ocp_ifs
487 * @ocp_if: OCP interface structure record pointer
488 * @node: list_head pointing to next struct omap_hwmod_link in a list
489 */
490struct omap_hwmod_link {
491 struct omap_hwmod_ocp_if *ocp_if;
492 struct list_head node;
493};
494
495/**
477 * struct omap_hwmod - integration data for OMAP hardware "modules" (IP blocks) 496 * struct omap_hwmod - integration data for OMAP hardware "modules" (IP blocks)
478 * @name: name of the hwmod 497 * @name: name of the hwmod
479 * @class: struct omap_hwmod_class * to the class of this hwmod 498 * @class: struct omap_hwmod_class * to the class of this hwmod
@@ -485,12 +504,10 @@ struct omap_hwmod_class {
485 * @_clk: pointer to the main struct clk (filled in at runtime) 504 * @_clk: pointer to the main struct clk (filled in at runtime)
486 * @opt_clks: other device clocks that drivers can request (0..*) 505 * @opt_clks: other device clocks that drivers can request (0..*)
487 * @voltdm: pointer to voltage domain (filled in at runtime) 506 * @voltdm: pointer to voltage domain (filled in at runtime)
488 * @masters: ptr to array of OCP ifs that this hwmod can initiate on
489 * @slaves: ptr to array of OCP ifs that this hwmod can respond on
490 * @dev_attr: arbitrary device attributes that can be passed to the driver 507 * @dev_attr: arbitrary device attributes that can be passed to the driver
491 * @_sysc_cache: internal-use hwmod flags 508 * @_sysc_cache: internal-use hwmod flags
492 * @_mpu_rt_va: cached register target start address (internal use) 509 * @_mpu_rt_va: cached register target start address (internal use)
493 * @_mpu_port_index: cached MPU register target slave ID (internal use) 510 * @_mpu_port: cached MPU register target slave (internal use)
494 * @opt_clks_cnt: number of @opt_clks 511 * @opt_clks_cnt: number of @opt_clks
495 * @master_cnt: number of @master entries 512 * @master_cnt: number of @master entries
496 * @slaves_cnt: number of @slave entries 513 * @slaves_cnt: number of @slave entries
@@ -509,6 +526,8 @@ struct omap_hwmod_class {
509 * 526 *
510 * Parameter names beginning with an underscore are managed internally by 527 * Parameter names beginning with an underscore are managed internally by
511 * the omap_hwmod code and should not be set during initialization. 528 * the omap_hwmod code and should not be set during initialization.
529 *
530 * @masters and @slaves are now deprecated.
512 */ 531 */
513struct omap_hwmod { 532struct omap_hwmod {
514 const char *name; 533 const char *name;
@@ -527,15 +546,15 @@ struct omap_hwmod {
527 struct omap_hwmod_opt_clk *opt_clks; 546 struct omap_hwmod_opt_clk *opt_clks;
528 char *clkdm_name; 547 char *clkdm_name;
529 struct clockdomain *clkdm; 548 struct clockdomain *clkdm;
530 struct omap_hwmod_ocp_if **masters; /* connect to *_IA */ 549 struct list_head master_ports; /* connect to *_IA */
531 struct omap_hwmod_ocp_if **slaves; /* connect to *_TA */ 550 struct list_head slave_ports; /* connect to *_TA */
532 void *dev_attr; 551 void *dev_attr;
533 u32 _sysc_cache; 552 u32 _sysc_cache;
534 void __iomem *_mpu_rt_va; 553 void __iomem *_mpu_rt_va;
535 spinlock_t _lock; 554 spinlock_t _lock;
536 struct list_head node; 555 struct list_head node;
556 struct omap_hwmod_ocp_if *_mpu_port;
537 u16 flags; 557 u16 flags;
538 u8 _mpu_port_index;
539 u8 response_lat; 558 u8 response_lat;
540 u8 rst_lines_cnt; 559 u8 rst_lines_cnt;
541 u8 opt_clks_cnt; 560 u8 opt_clks_cnt;
@@ -547,7 +566,6 @@ struct omap_hwmod {
547 u8 _postsetup_state; 566 u8 _postsetup_state;
548}; 567};
549 568
550int omap_hwmod_register(struct omap_hwmod **ohs);
551struct omap_hwmod *omap_hwmod_lookup(const char *name); 569struct omap_hwmod *omap_hwmod_lookup(const char *name);
552int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), 570int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
553 void *data); 571 void *data);
@@ -579,6 +597,8 @@ int omap_hwmod_softreset(struct omap_hwmod *oh);
579 597
580int omap_hwmod_count_resources(struct omap_hwmod *oh); 598int omap_hwmod_count_resources(struct omap_hwmod *oh);
581int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res); 599int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
600int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
601 const char *name, struct resource *res);
582 602
583struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh); 603struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh);
584void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh); 604void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh);
@@ -617,4 +637,6 @@ extern int omap2430_hwmod_init(void);
617extern int omap3xxx_hwmod_init(void); 637extern int omap3xxx_hwmod_init(void);
618extern int omap44xx_hwmod_init(void); 638extern int omap44xx_hwmod_init(void);
619 639
640extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois);
641
620#endif 642#endif