diff options
Diffstat (limited to 'arch/powerpc/platforms/52xx/mpc52xx_common.c')
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_common.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c index 3eeb6c62e0..3bc201e07e 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_common.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c | |||
@@ -75,44 +75,33 @@ mpc52xx_find_ipb_freq(struct device_node *node) | |||
75 | EXPORT_SYMBOL(mpc52xx_find_ipb_freq); | 75 | EXPORT_SYMBOL(mpc52xx_find_ipb_freq); |
76 | 76 | ||
77 | 77 | ||
78 | /* | ||
79 | * Configure the XLB arbiter settings to match what Linux expects. | ||
80 | */ | ||
78 | void __init | 81 | void __init |
79 | mpc52xx_setup_cpu(void) | 82 | mpc5200_setup_xlb_arbiter(void) |
80 | { | 83 | { |
81 | struct mpc52xx_cdm __iomem *cdm; | ||
82 | struct mpc52xx_xlb __iomem *xlb; | 84 | struct mpc52xx_xlb __iomem *xlb; |
83 | 85 | ||
84 | /* Map zones */ | ||
85 | cdm = mpc52xx_find_and_map("mpc5200-cdm"); | ||
86 | xlb = mpc52xx_find_and_map("mpc5200-xlb"); | 86 | xlb = mpc52xx_find_and_map("mpc5200-xlb"); |
87 | 87 | if (!xlb) { | |
88 | if (!cdm || !xlb) { | ||
89 | printk(KERN_ERR __FILE__ ": " | 88 | printk(KERN_ERR __FILE__ ": " |
90 | "Error while mapping CDM/XLB during mpc52xx_setup_cpu. " | 89 | "Error mapping XLB in mpc52xx_setup_cpu(). " |
91 | "Expect some abnormal behavior\n"); | 90 | "Expect some abnormal behavior\n"); |
92 | goto unmap_regs; | 91 | return; |
93 | } | 92 | } |
94 | 93 | ||
95 | /* Use internal 48 Mhz */ | ||
96 | out_8(&cdm->ext_48mhz_en, 0x00); | ||
97 | out_8(&cdm->fd_enable, 0x01); | ||
98 | if (in_be32(&cdm->rstcfg) & 0x40) /* Assumes 33Mhz clock */ | ||
99 | out_be16(&cdm->fd_counters, 0x0001); | ||
100 | else | ||
101 | out_be16(&cdm->fd_counters, 0x5555); | ||
102 | |||
103 | /* Configure the XLB Arbiter priorities */ | 94 | /* Configure the XLB Arbiter priorities */ |
104 | out_be32(&xlb->master_pri_enable, 0xff); | 95 | out_be32(&xlb->master_pri_enable, 0xff); |
105 | out_be32(&xlb->master_priority, 0x11111111); | 96 | out_be32(&xlb->master_priority, 0x11111111); |
106 | 97 | ||
107 | /* Disable XLB pipelining */ | 98 | /* Disable XLB pipelining |
108 | /* (cfr errate 292. We could do this only just before ATA PIO | 99 | * (cfr errate 292. We could do this only just before ATA PIO |
109 | transaction and re-enable it afterwards ...) */ | 100 | * transaction and re-enable it afterwards ...) |
101 | */ | ||
110 | out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_PLDIS); | 102 | out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_PLDIS); |
111 | 103 | ||
112 | /* Unmap zones */ | 104 | iounmap(xlb); |
113 | unmap_regs: | ||
114 | if (cdm) iounmap(cdm); | ||
115 | if (xlb) iounmap(xlb); | ||
116 | } | 105 | } |
117 | 106 | ||
118 | void __init | 107 | void __init |