diff options
author | Omar Ramirez Luna <omar.ramirez@ti.com> | 2011-02-24 15:51:32 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-02-24 15:51:32 -0500 |
commit | fca1ab55f9a9f7e862a03a68c2b5577c15c344df (patch) | |
tree | 8bf9d0ddd6e0ae7c745d67f16f9fab76993d7474 | |
parent | 4111772900ba908e8be6f671013545f7aa41bc76 (diff) |
OMAP2: hwmod data: add mailbox data
Mailbox hwmod data for omap2430 and 2420.
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2420_data.c | 73 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2430_data.c | 72 |
2 files changed, 145 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index f323c6bb22de..19ad9d053ded 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -1208,6 +1208,76 @@ static struct omap_hwmod omap2420_dma_system_hwmod = { | |||
1208 | }; | 1208 | }; |
1209 | 1209 | ||
1210 | /* | 1210 | /* |
1211 | * 'mailbox' class | ||
1212 | * mailbox module allowing communication between the on-chip processors | ||
1213 | * using a queued mailbox-interrupt mechanism. | ||
1214 | */ | ||
1215 | |||
1216 | static struct omap_hwmod_class_sysconfig omap2420_mailbox_sysc = { | ||
1217 | .rev_offs = 0x000, | ||
1218 | .sysc_offs = 0x010, | ||
1219 | .syss_offs = 0x014, | ||
1220 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
1221 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1222 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1223 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1224 | }; | ||
1225 | |||
1226 | static struct omap_hwmod_class omap2420_mailbox_hwmod_class = { | ||
1227 | .name = "mailbox", | ||
1228 | .sysc = &omap2420_mailbox_sysc, | ||
1229 | }; | ||
1230 | |||
1231 | /* mailbox */ | ||
1232 | static struct omap_hwmod omap2420_mailbox_hwmod; | ||
1233 | static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { | ||
1234 | { .name = "dsp", .irq = 26 }, | ||
1235 | { .name = "iva", .irq = 34 }, | ||
1236 | }; | ||
1237 | |||
1238 | static struct omap_hwmod_addr_space omap2420_mailbox_addrs[] = { | ||
1239 | { | ||
1240 | .pa_start = 0x48094000, | ||
1241 | .pa_end = 0x480941ff, | ||
1242 | .flags = ADDR_TYPE_RT, | ||
1243 | }, | ||
1244 | }; | ||
1245 | |||
1246 | /* l4_core -> mailbox */ | ||
1247 | static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = { | ||
1248 | .master = &omap2420_l4_core_hwmod, | ||
1249 | .slave = &omap2420_mailbox_hwmod, | ||
1250 | .addr = omap2420_mailbox_addrs, | ||
1251 | .addr_cnt = ARRAY_SIZE(omap2420_mailbox_addrs), | ||
1252 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1253 | }; | ||
1254 | |||
1255 | /* mailbox slave ports */ | ||
1256 | static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = { | ||
1257 | &omap2420_l4_core__mailbox, | ||
1258 | }; | ||
1259 | |||
1260 | static struct omap_hwmod omap2420_mailbox_hwmod = { | ||
1261 | .name = "mailbox", | ||
1262 | .class = &omap2420_mailbox_hwmod_class, | ||
1263 | .mpu_irqs = omap2420_mailbox_irqs, | ||
1264 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mailbox_irqs), | ||
1265 | .main_clk = "mailboxes_ick", | ||
1266 | .prcm = { | ||
1267 | .omap2 = { | ||
1268 | .prcm_reg_id = 1, | ||
1269 | .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT, | ||
1270 | .module_offs = CORE_MOD, | ||
1271 | .idlest_reg_id = 1, | ||
1272 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, | ||
1273 | }, | ||
1274 | }, | ||
1275 | .slaves = omap2420_mailbox_slaves, | ||
1276 | .slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves), | ||
1277 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
1278 | }; | ||
1279 | |||
1280 | /* | ||
1211 | * 'mcspi' class | 1281 | * 'mcspi' class |
1212 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | 1282 | * multichannel serial port interface (mcspi) / master/slave synchronous serial |
1213 | * bus | 1283 | * bus |
@@ -1348,6 +1418,9 @@ static __initdata struct omap_hwmod *omap2420_hwmods[] = { | |||
1348 | /* dma_system class*/ | 1418 | /* dma_system class*/ |
1349 | &omap2420_dma_system_hwmod, | 1419 | &omap2420_dma_system_hwmod, |
1350 | 1420 | ||
1421 | /* mailbox class */ | ||
1422 | &omap2420_mailbox_hwmod, | ||
1423 | |||
1351 | /* mcspi class */ | 1424 | /* mcspi class */ |
1352 | &omap2420_mcspi1_hwmod, | 1425 | &omap2420_mcspi1_hwmod, |
1353 | &omap2420_mcspi2_hwmod, | 1426 | &omap2420_mcspi2_hwmod, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index de0015d38433..91d2581c770a 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -1295,6 +1295,75 @@ static struct omap_hwmod omap2430_dma_system_hwmod = { | |||
1295 | }; | 1295 | }; |
1296 | 1296 | ||
1297 | /* | 1297 | /* |
1298 | * 'mailbox' class | ||
1299 | * mailbox module allowing communication between the on-chip processors | ||
1300 | * using a queued mailbox-interrupt mechanism. | ||
1301 | */ | ||
1302 | |||
1303 | static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = { | ||
1304 | .rev_offs = 0x000, | ||
1305 | .sysc_offs = 0x010, | ||
1306 | .syss_offs = 0x014, | ||
1307 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
1308 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1309 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1310 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1311 | }; | ||
1312 | |||
1313 | static struct omap_hwmod_class omap2430_mailbox_hwmod_class = { | ||
1314 | .name = "mailbox", | ||
1315 | .sysc = &omap2430_mailbox_sysc, | ||
1316 | }; | ||
1317 | |||
1318 | /* mailbox */ | ||
1319 | static struct omap_hwmod omap2430_mailbox_hwmod; | ||
1320 | static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { | ||
1321 | { .irq = 26 }, | ||
1322 | }; | ||
1323 | |||
1324 | static struct omap_hwmod_addr_space omap2430_mailbox_addrs[] = { | ||
1325 | { | ||
1326 | .pa_start = 0x48094000, | ||
1327 | .pa_end = 0x480941ff, | ||
1328 | .flags = ADDR_TYPE_RT, | ||
1329 | }, | ||
1330 | }; | ||
1331 | |||
1332 | /* l4_core -> mailbox */ | ||
1333 | static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = { | ||
1334 | .master = &omap2430_l4_core_hwmod, | ||
1335 | .slave = &omap2430_mailbox_hwmod, | ||
1336 | .addr = omap2430_mailbox_addrs, | ||
1337 | .addr_cnt = ARRAY_SIZE(omap2430_mailbox_addrs), | ||
1338 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1339 | }; | ||
1340 | |||
1341 | /* mailbox slave ports */ | ||
1342 | static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = { | ||
1343 | &omap2430_l4_core__mailbox, | ||
1344 | }; | ||
1345 | |||
1346 | static struct omap_hwmod omap2430_mailbox_hwmod = { | ||
1347 | .name = "mailbox", | ||
1348 | .class = &omap2430_mailbox_hwmod_class, | ||
1349 | .mpu_irqs = omap2430_mailbox_irqs, | ||
1350 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mailbox_irqs), | ||
1351 | .main_clk = "mailboxes_ick", | ||
1352 | .prcm = { | ||
1353 | .omap2 = { | ||
1354 | .prcm_reg_id = 1, | ||
1355 | .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT, | ||
1356 | .module_offs = CORE_MOD, | ||
1357 | .idlest_reg_id = 1, | ||
1358 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, | ||
1359 | }, | ||
1360 | }, | ||
1361 | .slaves = omap2430_mailbox_slaves, | ||
1362 | .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves), | ||
1363 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
1364 | }; | ||
1365 | |||
1366 | /* | ||
1298 | * 'mcspi' class | 1367 | * 'mcspi' class |
1299 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | 1368 | * multichannel serial port interface (mcspi) / master/slave synchronous serial |
1300 | * bus | 1369 | * bus |
@@ -1537,6 +1606,9 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = { | |||
1537 | /* dma_system class*/ | 1606 | /* dma_system class*/ |
1538 | &omap2430_dma_system_hwmod, | 1607 | &omap2430_dma_system_hwmod, |
1539 | 1608 | ||
1609 | /* mailbox class */ | ||
1610 | &omap2430_mailbox_hwmod, | ||
1611 | |||
1540 | /* mcspi class */ | 1612 | /* mcspi class */ |
1541 | &omap2430_mcspi1_hwmod, | 1613 | &omap2430_mcspi1_hwmod, |
1542 | &omap2430_mcspi2_hwmod, | 1614 | &omap2430_mcspi2_hwmod, |