diff options
Diffstat (limited to 'arch/powerpc/sysdev/cpm_common.c')
-rw-r--r-- | arch/powerpc/sysdev/cpm_common.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/powerpc/sysdev/cpm_common.c b/arch/powerpc/sysdev/cpm_common.c index cb7df2dce44..e4b7296acb2 100644 --- a/arch/powerpc/sysdev/cpm_common.c +++ b/arch/powerpc/sysdev/cpm_common.c | |||
@@ -37,7 +37,7 @@ static void udbg_putc_cpm(char c) | |||
37 | u8 __iomem *txbuf = (u8 __iomem __force *)in_be32(&cpm_udbg_txdesc[1]); | 37 | u8 __iomem *txbuf = (u8 __iomem __force *)in_be32(&cpm_udbg_txdesc[1]); |
38 | 38 | ||
39 | if (c == '\n') | 39 | if (c == '\n') |
40 | udbg_putc('\r'); | 40 | udbg_putc_cpm('\r'); |
41 | 41 | ||
42 | while (in_be32(&cpm_udbg_txdesc[0]) & 0x80000000) | 42 | while (in_be32(&cpm_udbg_txdesc[0]) & 0x80000000) |
43 | ; | 43 | ; |
@@ -53,7 +53,6 @@ void __init udbg_init_cpm(void) | |||
53 | setbat(1, 0xf0000000, 0xf0000000, 1024*1024, _PAGE_IO); | 53 | setbat(1, 0xf0000000, 0xf0000000, 1024*1024, _PAGE_IO); |
54 | #endif | 54 | #endif |
55 | udbg_putc = udbg_putc_cpm; | 55 | udbg_putc = udbg_putc_cpm; |
56 | udbg_putc('X'); | ||
57 | } | 56 | } |
58 | } | 57 | } |
59 | #endif | 58 | #endif |
@@ -85,9 +84,13 @@ int __init cpm_muram_init(void) | |||
85 | 84 | ||
86 | np = of_find_compatible_node(NULL, NULL, "fsl,cpm-muram-data"); | 85 | np = of_find_compatible_node(NULL, NULL, "fsl,cpm-muram-data"); |
87 | if (!np) { | 86 | if (!np) { |
88 | printk(KERN_ERR "Cannot find CPM muram data node"); | 87 | /* try legacy bindings */ |
89 | ret = -ENODEV; | 88 | np = of_find_node_by_name(NULL, "data-only"); |
90 | goto out; | 89 | if (!np) { |
90 | printk(KERN_ERR "Cannot find CPM muram data node"); | ||
91 | ret = -ENODEV; | ||
92 | goto out; | ||
93 | } | ||
91 | } | 94 | } |
92 | 95 | ||
93 | muram_pbase = of_translate_address(np, zero); | 96 | muram_pbase = of_translate_address(np, zero); |
@@ -189,6 +192,12 @@ void __iomem *cpm_muram_addr(unsigned long offset) | |||
189 | } | 192 | } |
190 | EXPORT_SYMBOL(cpm_muram_addr); | 193 | EXPORT_SYMBOL(cpm_muram_addr); |
191 | 194 | ||
195 | unsigned long cpm_muram_offset(void __iomem *addr) | ||
196 | { | ||
197 | return addr - (void __iomem *)muram_vbase; | ||
198 | } | ||
199 | EXPORT_SYMBOL(cpm_muram_offset); | ||
200 | |||
192 | /** | 201 | /** |
193 | * cpm_muram_dma - turn a muram virtual address into a DMA address | 202 | * cpm_muram_dma - turn a muram virtual address into a DMA address |
194 | * @offset: virtual address from cpm_muram_addr() to convert | 203 | * @offset: virtual address from cpm_muram_addr() to convert |