From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 20 May 2002 11:36:59 +1000 From: David Gibson To: Armin Kuster Cc: linuxppc-embedded@lists.linuxppc.org, Paul Mackerras Subject: Re: Further OCP cleanups Message-ID: <20020520013659.GR4745@zax> References: <20020517052718.GH4745@zax> <3CE579E1.1090504@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <3CE579E1.1090504@mvista.com> Sender: owner-linuxppc-embedded@lists.linuxppc.org List-Id: On Fri, May 17, 2002 at 02:45:05PM -0700, Armin Kuster wrote: > David Gibson wrote: > >The patch below follows up on paulus' cleanups of the OCP EMAC driver > >with further cleanups in the OCP layer and its drivers. It does > >several things: > > - Renames the ocpdev field of struct ocp_driver to private, > >which is more descriptive of its actual function. > > - removes a redundant INIT_LIST_HEAD from ocp_register > > - moves the registration of the miscdev for the GPIO driver > >into the driver itself, from ocp.c > > - removes the irq_resource field of the ocp_enet_private > >structure, since it was essentially unused. > > - with the help of those last two remove the ugly switch > >statements from ocp_register() and ocp_unregister() > > - removed the procdir field from ocp_driver structure, since > >it always had the same value > > - remove the fops field from the ocp_driver structure, since > >it was only used by the GPIO driver and then always held the same > >value > > - cleanup of the MAL DCR handling code. No more mal.sh, > >autogenerated ibm_ocp_mal.c or MBASE[]. Instead we use a magic macro > >to generate a switch across the MAL base address. More to come which > >will cause this to be completely optimised away on machines with only > >one MAL (the majority) > > - Move the IIC_DEV macro into the .c files which use it, since > >it clearly belongs to the I2C code itself, rather than to the OCP > >layer. More to come which will eliminate this macro entirely, as > >EMAC_DEV was removed by paulus' patch > > - Update ibm_ocp_debug.c to work with paulus' changes, also > >cleanup some ugliness > > - Remove the 'priv_index', 'devfs_handle' and 'active' fields > >from struct ocp_driver, since they appear to be unused. > > > >If you have no objections I will commit this to linuxppc_2_4_devel. > > David, > > The IIC_DEV change is ok and the _debug.c changes are fine but I > would like to hold off on the rest. I am not satisfied with the tx/rx > channel mal case/switch stuff in the *_enet.c and the ibmnp405h.c was > missed Um... I don't see what connection that has with my patch. It has only a tenous relationship to the MAL changes and is unrelated to everything else. -- David Gibson | For every complex problem there is a david@gibson.dropbear.id.au | solution which is simple, neat and | wrong. -- H.L. Mencken http://www.ozlabs.org/people/dgibson ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/