On Fri, May 11, 2012 at 12:07:59, R, Sricharan wrote: > Vaibhav, > > > > >> > This patch adds new config flag SOC_HAS_OMAP2_SDRC to handle > > sdrc, > > > >> > so that we can reuse same function across omap2/3/4... > > > >> > > > >> But what happens when a single kernel is built that has support > > for an > > > >> SoC with an SDRC (OMAP4) and one that doesn't (AM33xx)? > > > >> > > > > > > > > As such Nothing...I looking into this direction while implementing. > > > > > > > > In that case, sdrc.c file will be compiled in and execution will > > jump to > > > > omap2_set_globals_sdrc(). But inside this function, we are already > > checking > > > > whether the omap2_globals->sdrc and omap2_globals->sms for NULL and > > then use > > > > it. > > > > > > > > And function omap2_sdrc_init() is also depends on machine, so in > > case of > > > > Am33xx, it won't get into sdrc execution at all. And in case of > > omap4, it > > > > will. > > > > > > Then why bother with the #ifdef at all? > > > > > > If it already safe to call on all SoCs, just get rid of the #ifdef > > all > > > together. > > > > > > > Kevin, > > > > sdrc.o target gets built only as "omap-2-3-common", this will not get > > built > > for omap4, am33xx, ti81xx, etc... > > So in order to avoid build break, you have to have some mechanism, and > > that's where we need to create config option dependent on platform. > > > > Another better way of handling this is adding __weak function. > > > > What's your opinion on this? > > > Then how about just allowing to compile for all omap2/3/4 ? > I wouldn't recommend that. Also, now we have almost all the devices coming in with EMIF (no sdrc). Thanks, Vaibhav -- 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