Further OCP cleanups

David Gibson david at gibson.dropbear.id.au
Mon May 20 11:36:59 EST 2002


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 at 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/





More information about the Linuxppc-embedded mailing list