Commit ea5130dc authored by Haiying Wang's avatar Haiying Wang Committed by Kumar Gala

powerpc/85xx: clean up for mpc8568_mds name

Keep an unique machine def for the MPC8568 MDS board to handle some
subtle differences between the future MDS board. Also set the bcsrs in
setup_arch() only for mpc8568_mds because other mds has different bcsr
settings.
Signed-off-by: default avatarHaiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 1e76dff2
...@@ -206,23 +206,24 @@ static void __init mpc85xx_mds_setup_arch(void) ...@@ -206,23 +206,24 @@ static void __init mpc85xx_mds_setup_arch(void)
} }
if (bcsr_regs) { if (bcsr_regs) {
if (machine_is(mpc8568_mds)) {
#define BCSR_UCC1_GETH_EN (0x1 << 7) #define BCSR_UCC1_GETH_EN (0x1 << 7)
#define BCSR_UCC2_GETH_EN (0x1 << 7) #define BCSR_UCC2_GETH_EN (0x1 << 7)
#define BCSR_UCC1_MODE_MSK (0x3 << 4) #define BCSR_UCC1_MODE_MSK (0x3 << 4)
#define BCSR_UCC2_MODE_MSK (0x3 << 0) #define BCSR_UCC2_MODE_MSK (0x3 << 0)
/* Turn off UCC1 & UCC2 */ /* Turn off UCC1 & UCC2 */
clrbits8(&bcsr_regs[8], BCSR_UCC1_GETH_EN); clrbits8(&bcsr_regs[8], BCSR_UCC1_GETH_EN);
clrbits8(&bcsr_regs[9], BCSR_UCC2_GETH_EN); clrbits8(&bcsr_regs[9], BCSR_UCC2_GETH_EN);
/* Mode is RGMII, all bits clear */ /* Mode is RGMII, all bits clear */
clrbits8(&bcsr_regs[11], BCSR_UCC1_MODE_MSK | clrbits8(&bcsr_regs[11], BCSR_UCC1_MODE_MSK |
BCSR_UCC2_MODE_MSK); BCSR_UCC2_MODE_MSK);
/* Turn UCC1 & UCC2 on */
setbits8(&bcsr_regs[8], BCSR_UCC1_GETH_EN);
setbits8(&bcsr_regs[9], BCSR_UCC2_GETH_EN);
/* Turn UCC1 & UCC2 on */
setbits8(&bcsr_regs[8], BCSR_UCC1_GETH_EN);
setbits8(&bcsr_regs[9], BCSR_UCC2_GETH_EN);
}
iounmap(bcsr_regs); iounmap(bcsr_regs);
} }
#endif /* CONFIG_QUICC_ENGINE */ #endif /* CONFIG_QUICC_ENGINE */
...@@ -257,7 +258,7 @@ static int __init board_fixups(void) ...@@ -257,7 +258,7 @@ static int __init board_fixups(void)
return 0; return 0;
} }
machine_arch_initcall(mpc85xx_mds, board_fixups); machine_arch_initcall(mpc8568_mds, board_fixups);
static struct of_device_id mpc85xx_ids[] = { static struct of_device_id mpc85xx_ids[] = {
{ .type = "soc", }, { .type = "soc", },
...@@ -276,7 +277,7 @@ static int __init mpc85xx_publish_devices(void) ...@@ -276,7 +277,7 @@ static int __init mpc85xx_publish_devices(void)
return 0; return 0;
} }
machine_device_initcall(mpc85xx_mds, mpc85xx_publish_devices); machine_device_initcall(mpc8568_mds, mpc85xx_publish_devices);
static void __init mpc85xx_mds_pic_init(void) static void __init mpc85xx_mds_pic_init(void)
{ {
...@@ -321,8 +322,8 @@ static int __init mpc85xx_mds_probe(void) ...@@ -321,8 +322,8 @@ static int __init mpc85xx_mds_probe(void)
return of_flat_dt_is_compatible(root, "MPC85xxMDS"); return of_flat_dt_is_compatible(root, "MPC85xxMDS");
} }
define_machine(mpc85xx_mds) { define_machine(mpc8568_mds) {
.name = "MPC85xx MDS", .name = "MPC8568 MDS",
.probe = mpc85xx_mds_probe, .probe = mpc85xx_mds_probe,
.setup_arch = mpc85xx_mds_setup_arch, .setup_arch = mpc85xx_mds_setup_arch,
.init_IRQ = mpc85xx_mds_pic_init, .init_IRQ = mpc85xx_mds_pic_init,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment