From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH/RFC] powerpc: Add MPC5200 Interrupt Controller support. From: Benjamin Herrenschmidt To: Sylvain Munaut In-Reply-To: <454D2FEC.3050605@246tNt.com> References: <454902F9.20206@bplan-gmbh.de> <1162419138.25682.453.camel@localhost.localdomain> <454A1C37.5050208@bplan-gmbh.de> <454A5952.6090801@bplan-gmbh.de> <1162683341.28571.82.camel@localhost.localdomain> <454D2FEC.3050605@246tNt.com> Content-Type: text/plain Date: Sun, 05 Nov 2006 12:13:46 +1100 Message-Id: <1162689227.28571.123.camel@localhost.localdomain> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org, linuxppc-embedded@ozlabs.org, sl@bplan-gmbh.de List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sun, 2006-11-05 at 01:27 +0100, Sylvain Munaut wrote: > >> + picnode = find_mpc52xx_picnode(); > >> + sdmanode = find_mpc52xx_sdmanode(); > >> > > > > Any reason why you have those inline 1-line functions and just not put > > the actual of_find_* call in here ? > > > I think it might be worth creating a > arch/powerpc/sysdev/mpc52xx_common.c (we'll probably need it later on > anyway) > with a helper that would do > - The find_node I don't see why we need a helper for that at all in the first place :) > - get_address / translate / get_size That too > - ioremap > > Something like : > > intr = mpc52xx_find_and_map("mpc52xx-intr"); > sdma = mpc52xx_find_and_map("mpc52xx-sdma"); Hrm... I don't care that much but I also don't think we need that helper. It's not saving much. > would be more elegant. Especially since finding and mapping things like > intr/sdma/xlb/cdm ... will be done at several place. That would prevent > repeating all that code for nothing. It's not much code to repeat ;) but if you want, I have no big problem with that. > Also, in the Makefile, I would make the compilation conditionnal to > CONFIG_PPC_MPC52xx and not CONFIG_PPC_MPC52xx_PIC ... > If you're on a 52xx, you most likely want the interrupt controller ... > > But the CONFIG_PPC_MPC52xx option should be in arch/powerpc/Kconfig > and not in the platform/embedded6xx/Kconfig Ben.