diff options
Diffstat (limited to 'arch/powerpc/sysdev/cpm2.c')
-rw-r--r-- | arch/powerpc/sysdev/cpm2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/cpm2.c b/arch/powerpc/sysdev/cpm2.c index f1c3395633b9..fd969f0e3121 100644 --- a/arch/powerpc/sysdev/cpm2.c +++ b/arch/powerpc/sysdev/cpm2.c | |||
@@ -52,6 +52,7 @@ cpm_cpm2_t __iomem *cpmp; /* Pointer to comm processor space */ | |||
52 | * the communication processor devices. | 52 | * the communication processor devices. |
53 | */ | 53 | */ |
54 | cpm2_map_t __iomem *cpm2_immr; | 54 | cpm2_map_t __iomem *cpm2_immr; |
55 | EXPORT_SYMBOL(cpm2_immr); | ||
55 | 56 | ||
56 | #define CPM_MAP_SIZE (0x40000) /* 256k - the PQ3 reserve this amount | 57 | #define CPM_MAP_SIZE (0x40000) /* 256k - the PQ3 reserve this amount |
57 | of space for CPM as it is larger | 58 | of space for CPM as it is larger |
@@ -129,7 +130,8 @@ void __cpm2_setbrg(uint brg, uint rate, uint clk, int div16, int src) | |||
129 | brg -= 4; | 130 | brg -= 4; |
130 | } | 131 | } |
131 | bp += brg; | 132 | bp += brg; |
132 | val = (((clk / rate) - 1) << 1) | CPM_BRG_EN | src; | 133 | /* Round the clock divider to the nearest integer. */ |
134 | val = (((clk * 2 / rate) - 1) & ~1) | CPM_BRG_EN | src; | ||
133 | if (div16) | 135 | if (div16) |
134 | val |= CPM_BRG_DIV16; | 136 | val |= CPM_BRG_DIV16; |
135 | 137 | ||