diff options
author | raj <raj@FreeBSD.org> | 2010-07-11 21:08:29 +0000 |
---|---|---|
committer | raj <raj@FreeBSD.org> | 2010-07-11 21:08:29 +0000 |
commit | 6496d826ccfca6b78860dfa86efcb3f96cb6053f (patch) | |
tree | 827f9dce3768613a609f3a9e594b123936ec2e0e /sys/dev/tsec/if_tsec.c | |
parent | 710dc13ac9dfbfa4fead6e52f9efb9e7b6af119e (diff) | |
download | FreeBSD-src-6496d826ccfca6b78860dfa86efcb3f96cb6053f.zip FreeBSD-src-6496d826ccfca6b78860dfa86efcb3f96cb6053f.tar.gz |
Convert Freescale PowerPC platforms to FDT convention.
The following systems are affected:
- MPC8555CDS
- MPC8572DS
This overhaul covers the following major changes:
- All integrated peripherals drivers for Freescale MPC85XX SoC, which are
currently in the FreeBSD source tree are reworked and adjusted so they
derive config data out of the device tree blob (instead of hard coded /
tabelarized values).
- This includes: LBC, PCI / PCI-Express, I2C, DS1553, OpenPIC, TSEC, SEC,
QUICC, UART, CFI.
- Thanks to the common FDT infrastrucutre (fdtbus, simplebus) we retire
ocpbus(4) driver, which was based on hard-coded config data.
Note that world for these platforms has to be built WITH_FDT.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/dev/tsec/if_tsec.c')
-rw-r--r-- | sys/dev/tsec/if_tsec.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/tsec/if_tsec.c b/sys/dev/tsec/if_tsec.c index 204fce9..7ba7dc6 100644 --- a/sys/dev/tsec/if_tsec.c +++ b/sys/dev/tsec/if_tsec.c @@ -1,6 +1,6 @@ /*- - * Copyright (C) 2007-2008 Semihalf, Rafal Jaworowski <raj@semihalf.com> - * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski <ppk@semihalf.com> + * Copyright (C) 2007-2008 Semihalf, Rafal Jaworowski + * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1563,7 +1563,7 @@ tsec_miibus_readreg(device_t dev, int phy, int reg) sc = device_get_softc(dev); - if (device_get_unit(dev) != phy) + if (sc->phyaddr != phy) return (0); sc = tsec0_sc; @@ -1591,9 +1591,8 @@ tsec_miibus_writereg(device_t dev, int phy, int reg, int value) sc = device_get_softc(dev); - if (device_get_unit(dev) != phy) - device_printf(dev, "Trying to write to an alien PHY(%d)\n", - phy); + if (sc->phyaddr != phy) + return (0); sc = tsec0_sc; |