powerpc/83xx: refactor mpc8360e quirk for kmeter1
Move the code for this quirk to a dedicated function. Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com> Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
parent
89491d83b2
commit
14f40f31e8
1 changed files with 77 additions and 72 deletions
|
@ -43,39 +43,9 @@
|
||||||
#include "mpc83xx.h"
|
#include "mpc83xx.h"
|
||||||
|
|
||||||
#define SVR_REV(svr) (((svr) >> 0) & 0xFFFF) /* Revision field */
|
#define SVR_REV(svr) (((svr) >> 0) & 0xFFFF) /* Revision field */
|
||||||
/* ************************************************************************
|
|
||||||
*
|
static void quirk_mpc8360e_qe_enet10(void)
|
||||||
* Setup the architecture
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
static void __init mpc83xx_km_setup_arch(void)
|
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_QUICC_ENGINE
|
|
||||||
struct device_node *np;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ppc_md.progress)
|
|
||||||
ppc_md.progress("kmpbec83xx_setup_arch()", 0);
|
|
||||||
|
|
||||||
mpc83xx_setup_pci();
|
|
||||||
|
|
||||||
#ifdef CONFIG_QUICC_ENGINE
|
|
||||||
qe_reset();
|
|
||||||
|
|
||||||
np = of_find_node_by_name(NULL, "par_io");
|
|
||||||
if (np != NULL) {
|
|
||||||
par_io_init(np);
|
|
||||||
of_node_put(np);
|
|
||||||
|
|
||||||
for_each_node_by_name(np, "spi")
|
|
||||||
par_io_of_config(np);
|
|
||||||
|
|
||||||
for_each_node_by_name(np, "ucc")
|
|
||||||
par_io_of_config(np);
|
|
||||||
}
|
|
||||||
|
|
||||||
np = of_find_compatible_node(NULL, "network", "ucc_geth");
|
|
||||||
if (np != NULL) {
|
|
||||||
/*
|
/*
|
||||||
* handle mpc8360E Erratum QE_ENET10:
|
* handle mpc8360E Erratum QE_ENET10:
|
||||||
* RGMII AC values do not meet the specification
|
* RGMII AC values do not meet the specification
|
||||||
|
@ -147,6 +117,41 @@ static void __init mpc83xx_km_setup_arch(void)
|
||||||
}
|
}
|
||||||
iounmap(base);
|
iounmap(base);
|
||||||
of_node_put(np_par);
|
of_node_put(np_par);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ************************************************************************
|
||||||
|
*
|
||||||
|
* Setup the architecture
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static void __init mpc83xx_km_setup_arch(void)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_QUICC_ENGINE
|
||||||
|
struct device_node *np;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (ppc_md.progress)
|
||||||
|
ppc_md.progress("kmpbec83xx_setup_arch()", 0);
|
||||||
|
|
||||||
|
mpc83xx_setup_pci();
|
||||||
|
|
||||||
|
#ifdef CONFIG_QUICC_ENGINE
|
||||||
|
qe_reset();
|
||||||
|
|
||||||
|
np = of_find_node_by_name(NULL, "par_io");
|
||||||
|
if (np != NULL) {
|
||||||
|
par_io_init(np);
|
||||||
|
of_node_put(np);
|
||||||
|
|
||||||
|
for_each_node_by_name(np, "spi")
|
||||||
|
par_io_of_config(np);
|
||||||
|
|
||||||
|
for_each_node_by_name(np, "ucc")
|
||||||
|
par_io_of_config(np);
|
||||||
|
}
|
||||||
|
np = of_find_compatible_node(NULL, "network", "ucc_geth");
|
||||||
|
if (np != NULL) {
|
||||||
|
quirk_mpc8360e_qe_enet10();
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_QUICC_ENGINE */
|
#endif /* CONFIG_QUICC_ENGINE */
|
||||||
|
|
Loading…
Add table
Reference in a new issue