Further OCP cleanups
Quoted 31 lines · David Gibson
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 structocp_driverto private,
which is more descriptive of its actual function.
- removes a redundantINIT_LIST_HEADfromocp_register
- moves the registration of the miscdev for the GPIO driver
into the driver itself, fromocp.c
- removes theirq_resourcefield of theocp_enet_private
structure, since it was essentially unused.
- with the help of those last two remove the ugly switch
statements fromocp_register()andocp_unregister()
- removed the procdir field fromocp_driverstructure, since
it always had the same value
- remove the fops field from theocp_driverstructure, since
it was only used by the GPIO driver and then always held the same value
- cleanup of the MAL DCR handling code. No moremal.sh,
autogeneratedibm_ocp_mal.cor 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 theIIC_DEVmacro 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, asEMAC_DEVwas removed by paulus' patch
- Updateibm_ocp_debug.cto work with paulus' changes, also
cleanup some ugliness
- Remove the 'priv_index', 'devfs_handle' and 'active' fields
from structocp_driver, since they appear to be unused.
Quoted 2 lines
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
armin
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 32 lines · Armin Kuster
Quoted 31 lines · David Gibson
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 structocp_driverto private,
which is more descriptive of its actual function.
- removes a redundantINIT_LIST_HEADfromocp_register
- moves the registration of the miscdev for the GPIO driver
into the driver itself, fromocp.c
- removes theirq_resourcefield of theocp_enet_private
structure, since it was essentially unused.
- with the help of those last two remove the ugly switch
statements fromocp_register()andocp_unregister()
- removed the procdir field fromocp_driverstructure, since
it always had the same value
- remove the fops field from theocp_driverstructure, since
it was only used by the GPIO driver and then always held the same value
- cleanup of the MAL DCR handling code. No moremal.sh,
autogeneratedibm_ocp_mal.cor 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 theIIC_DEVmacro 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, asEMAC_DEVwas removed by paulus' patch
- Updateibm_ocp_debug.cto work with paulus' changes, also
cleanup some ugliness
- Remove the 'priv_index', 'devfs_handle' and 'active' fields
from structocp_driver, since they appear to be unused.
Quoted 8 lines
Quoted 1 line
If you have no objections I will commit this to
linuxppc_2_4_devel.David,
The
IIC_DEVchange is ok and the_debug.cchanges 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 theibmnp405h.cwas 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
[email protected] | 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/