lkml.org 
[lkml]   [2014]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] mailbox/omap: add support for parsing dt devices
Hi Pavel,

On 06/28/2014 12:07 PM, Pavel Machek wrote:
> Hi!
>
>> The non-DT support has to be maintained for now to not break
>> OMAP3 legacy boot, and the legacy-style code will be cleaned
>> up once OMAP3 is also converted to DT-boot only.
>
>> @@ -587,24 +606,157 @@ static int omap_mbox_unregister(struct omap_mbox_device *mdev)
>> return 0;
>> }
>>
>> +static const struct omap_mbox_device_data omap2_data = {
>> + .num_users = 4,
>> + .num_fifos = 6,
>> + .intr_type = MBOX_INTR_CFG_TYPE1,
>> +};
>> +
>> +static const struct omap_mbox_device_data omap3_data = {
>> + .num_users = 2,
>> + .num_fifos = 2,
>> + .intr_type = MBOX_INTR_CFG_TYPE1,
>> +};
>> +
>> +static const struct omap_mbox_device_data am335x_data = {
>> + .num_users = 4,
>> + .num_fifos = 8,
>> + .intr_type = MBOX_INTR_CFG_TYPE2,
>> +};
>
> So you use compatible strings to look up 3 integers. Would it be better to have
> num_users/num_fifos/intr_type directly in the device tree? That should be cleaner
> and more flexible...
>
> If you do that, would it be possible to have share compatible string?

Yeah, I have actually encoded the .num_users and .num_fifos in DT in the
previous version [1] with shared compatible strings, but dropped those
properties in favour of adding minimal custom properties to DT based on
some offline IRC comments. I have no objections either way, but there is
really nothing to be gained from minimizing compatible strings.

Tony,
Any comments on this?

regards
Suman

[1] https://patchwork.kernel.org/patch/2839662/



\
 
 \ /
  Last update: 2014-07-01 06:01    [W:0.202 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site