Re: [PATCH 01/11] OMAP4: PRCM: add OMAP4-specific accessor/mutatorfunctions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/15/2010 7:48 AM, Paul Walmsley wrote:
Hi Rajendra

On Wed, 8 Dec 2010, Rajendra Nayak wrote:

Would it help if we can avoid one more level of function
indirection (given that these are low level apis) and store
the Partition offsets in the tables above (instead of func
pointers) and do some thing like this.

       return __raw_readl(OMAP2_L4_IO_ADDRESS(cm_read_offset[part],
module, idx));

with the table entries of cm_read_offset looking something like
+   [OMAP4430_PRM_PARTITION]                = OMAP4430_PRM_BASE,
+   [OMAP4430_CM1_PARTITION]                = OMAP4430_CM1_BASE,
+   [OMAP4430_CM2_PARTITION]                = OMAP4430_CM2_BASE,

I did a version of this patch without the extra level of indirection.
I'm not sure if it's better or worse.  The original seems conceptually
cleaner to me, but this revised version is probably slightly more
efficient.  Do you (or anyone else) have a strong preference?

I do not have a strong but a slight preference for that. It is a little bit more readable that function pointers for my point of view.

On the other hand, the function pointers might allow to handle tricky differences that this solution will not.

Regards,
Benoit
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux