Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: OMAP2+: add user and fifo info to mailbox platform data

The different generations of OMAP2+ SoCs have almost the same
mailbox IP, but the IP has configurable parameters for number
of users (interrupts it can generate out towards processors)
and number of fifos (the base unidirectional h/w communication
channel). This data cannot be read from any registers, and so
has been added to the platform data.

This data together with the interrupt-type configuration can be
used in properly figuring out the number of registers to save
and restore in the OMAP mailbox driver code.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Suman Anna <s-anna@ti.com>

+11
+2
arch/arm/mach-omap2/omap_hwmod_2420_data.c
··· 173 173 }; 174 174 175 175 static struct omap_mbox_pdata omap2420_mailbox_attrs = { 176 + .num_users = 4, 177 + .num_fifos = 6, 176 178 .info_cnt = ARRAY_SIZE(omap2420_mailbox_info), 177 179 .info = omap2420_mailbox_info, 178 180 };
+2
arch/arm/mach-omap2/omap_hwmod_2430_data.c
··· 176 176 }; 177 177 178 178 static struct omap_mbox_pdata omap2430_mailbox_attrs = { 179 + .num_users = 4, 180 + .num_fifos = 6, 179 181 .info_cnt = ARRAY_SIZE(omap2430_mailbox_info), 180 182 .info = omap2430_mailbox_info, 181 183 };
+2
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
··· 1511 1511 }; 1512 1512 1513 1513 static struct omap_mbox_pdata omap3xxx_mailbox_attrs = { 1514 + .num_users = 2, 1515 + .num_fifos = 2, 1514 1516 .info_cnt = ARRAY_SIZE(omap3xxx_mailbox_info), 1515 1517 .info = omap3xxx_mailbox_info, 1516 1518 };
+5
include/linux/platform_data/mailbox-omap.h
··· 41 41 * struct omap_mbox_pdata - OMAP mailbox platform data 42 42 * @intr_type: type of interrupt configuration registers used 43 43 while programming mailbox queue interrupts 44 + * @num_users: number of users (processor devices) that the mailbox 45 + * h/w block can interrupt 46 + * @num_fifos: number of h/w fifos within the mailbox h/w block 44 47 * @info_cnt: number of mailbox devices for the platform 45 48 * @info: array of mailbox device attributes 46 49 */ 47 50 struct omap_mbox_pdata { 48 51 u32 intr_type; 52 + u32 num_users; 53 + u32 num_fifos; 49 54 u32 info_cnt; 50 55 struct omap_mbox_dev_info *info; 51 56 };