/* * Fix clock configuration. * * Firmware is supposed to be responsible for this. If you are creating a * new board port, do *NOT* duplicate this code. Fix your boot firmware * to set it correctly in the first place
*/ staticvoid __init
lite5200_fix_clock_config(void)
{ struct device_node *np; struct mpc52xx_cdm __iomem *cdm; /* Map zones */
np = of_find_matching_node(NULL, mpc5200_cdm_ids);
cdm = of_iomap(np, 0);
of_node_put(np); if (!cdm) {
printk(KERN_ERR "%s() failed; expect abnormal behaviour\n",
__func__); return;
}
/* * Fix setting of port_config register. * * Firmware is supposed to be responsible for this. If you are creating a * new board port, do *NOT* duplicate this code. Fix your boot firmware * to set it correctly in the first place
*/ staticvoid __init
lite5200_fix_port_config(void)
{ struct device_node *np; struct mpc52xx_gpio __iomem *gpio;
u32 port_config;
/* * power down usb port * this needs to be called before of-ohci suspend code
*/
/* set ports to "power switched" and "powered at the same time"
* USB Rh descriptor A: NPS = 0, PSM = 0 */
out_be32(mbar + 0x1048, in_be32(mbar + 0x1048) & ~0x300); /* USB Rh status: LPS = 1 - turn off power */
out_be32(mbar + 0x1050, 0x00000001);
}
staticvoid lite5200_resume_finish(void __iomem *mbar)
{ /* USB Rh status: LPSC = 1 - turn on power */
out_be32(mbar + 0x1050, 0x00010000);
} #endif
staticvoid __init lite5200_setup_arch(void)
{ if (ppc_md.progress)
ppc_md.progress("lite5200_setup_arch()", 0);
/* Map important registers from the internal memory map */
mpc52xx_map_common_devices();
/* Some mpc5200 & mpc5200b related configuration */
mpc5200_setup_xlb_arbiter();
/* Fix things that firmware should have done. */
lite5200_fix_clock_config();
lite5200_fix_port_config();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.