summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2016-12-06 11:14:40 -0500
committerGeert Uytterhoeven <geert@linux-m68k.org>2017-02-12 04:36:52 -0500
commit4eee1e72ad06bdc942b8f8c221d49691ef232c56 (patch)
treef2cca884491d73734f3b54245b52a91bec7376d1
parent56bbd86257f899ced7ef9c58210dda4edbd40871 (diff)
m68k/sun3x: Modernize printing of kernel messages
- Convert from printk() to pr_*(), - Remove #undef DEBUG, - Drop useless Warning prefix, - Use TABs for indentation while at it. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
-rw-r--r--arch/m68k/include/asm/sun3xflop.h14
-rw-r--r--arch/m68k/sun3x/dvma.c35
-rw-r--r--arch/m68k/sun3x/prom.c4
3 files changed, 22 insertions, 31 deletions
diff --git a/arch/m68k/include/asm/sun3xflop.h b/arch/m68k/include/asm/sun3xflop.h
index a02ea3a7bb20..159269b7f2e8 100644
--- a/arch/m68k/include/asm/sun3xflop.h
+++ b/arch/m68k/include/asm/sun3xflop.h
@@ -48,7 +48,7 @@ static unsigned char sun3x_82072_fd_inb(int port)
48// udelay(5); 48// udelay(5);
49 switch(port & 7) { 49 switch(port & 7) {
50 default: 50 default:
51 printk("floppy: Asked to read unknown port %d\n", port); 51 pr_crit("floppy: Asked to read unknown port %d\n", port);
52 panic("floppy: Port bolixed."); 52 panic("floppy: Port bolixed.");
53 case 4: /* FD_STATUS */ 53 case 4: /* FD_STATUS */
54 return (*sun3x_fdc.status_r) & ~STATUS_DMA; 54 return (*sun3x_fdc.status_r) & ~STATUS_DMA;
@@ -70,7 +70,7 @@ static void sun3x_82072_fd_outb(unsigned char value, int port)
70// udelay(5); 70// udelay(5);
71 switch(port & 7) { 71 switch(port & 7) {
72 default: 72 default:
73 printk("floppy: Asked to write to unknown port %d\n", port); 73 pr_crit("floppy: Asked to write to unknown port %d\n", port);
74 panic("floppy: Port bolixed."); 74 panic("floppy: Port bolixed.");
75 case 2: /* FD_DOR */ 75 case 2: /* FD_DOR */
76 /* Oh geese, 82072 on the Sun has no DOR register, 76 /* Oh geese, 82072 on the Sun has no DOR register,
@@ -127,7 +127,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id)
127 return IRQ_HANDLED; 127 return IRQ_HANDLED;
128 } 128 }
129 129
130// printk("doing pdma\n");// st %x\n", sun_fdc->status_82072); 130// pr_info("doing pdma\n");// st %x\n", sun_fdc->status_82072);
131 131
132#ifdef TRACE_FLPY_INT 132#ifdef TRACE_FLPY_INT
133 if(!calls) 133 if(!calls)
@@ -171,7 +171,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id)
171#ifdef TRACE_FLPY_INT 171#ifdef TRACE_FLPY_INT
172 calls++; 172 calls++;
173#endif 173#endif
174// printk("st=%02x\n", st); 174// pr_info("st=%02x\n", st);
175 if(st == 0x20) 175 if(st == 0x20)
176 return IRQ_HANDLED; 176 return IRQ_HANDLED;
177 if(!(st & 0x20)) { 177 if(!(st & 0x20)) {
@@ -180,9 +180,9 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id)
180 doing_pdma = 0; 180 doing_pdma = 0;
181 181
182#ifdef TRACE_FLPY_INT 182#ifdef TRACE_FLPY_INT
183 printk("count=%x, residue=%x calls=%d bytes=%x dma_wait=%d\n", 183 pr_info("count=%x, residue=%x calls=%d bytes=%x dma_wait=%d\n",
184 virtual_dma_count, virtual_dma_residue, calls, bytes, 184 virtual_dma_count, virtual_dma_residue, calls, bytes,
185 dma_wait); 185 dma_wait);
186 calls = 0; 186 calls = 0;
187 dma_wait=0; 187 dma_wait=0;
188#endif 188#endif
diff --git a/arch/m68k/sun3x/dvma.c b/arch/m68k/sun3x/dvma.c
index d5ddcdaa2347..9413c8724b0d 100644
--- a/arch/m68k/sun3x/dvma.c
+++ b/arch/m68k/sun3x/dvma.c
@@ -58,21 +58,17 @@ static volatile unsigned long *iommu_pte = (unsigned long *)SUN3X_IOMMU;
58 ((addr & 0x03c00000) >> \ 58 ((addr & 0x03c00000) >> \
59 (DVMA_PAGE_SHIFT+4))) 59 (DVMA_PAGE_SHIFT+4)))
60 60
61#undef DEBUG
62
63#ifdef DEBUG 61#ifdef DEBUG
64/* code to print out a dvma mapping for debugging purposes */ 62/* code to print out a dvma mapping for debugging purposes */
65void dvma_print (unsigned long dvma_addr) 63void dvma_print (unsigned long dvma_addr)
66{ 64{
67 65
68 unsigned long index; 66 unsigned long index;
69
70 index = dvma_addr >> DVMA_PAGE_SHIFT;
71
72 printk("idx %lx dvma_addr %08lx paddr %08lx\n", index, dvma_addr,
73 dvma_entry_paddr(index));
74 67
68 index = dvma_addr >> DVMA_PAGE_SHIFT;
75 69
70 pr_info("idx %lx dvma_addr %08lx paddr %08lx\n", index, dvma_addr,
71 dvma_entry_paddr(index));
76} 72}
77#endif 73#endif
78 74
@@ -91,10 +87,7 @@ inline int dvma_map_cpu(unsigned long kaddr,
91 87
92 end = PAGE_ALIGN(vaddr + len); 88 end = PAGE_ALIGN(vaddr + len);
93 89
94#ifdef DEBUG 90 pr_debug("dvma: mapping kern %08lx to virt %08lx\n", kaddr, vaddr);
95 printk("dvma: mapping kern %08lx to virt %08lx\n",
96 kaddr, vaddr);
97#endif
98 pgd = pgd_offset_k(vaddr); 91 pgd = pgd_offset_k(vaddr);
99 92
100 do { 93 do {
@@ -126,10 +119,8 @@ inline int dvma_map_cpu(unsigned long kaddr,
126 end3 = end2; 119 end3 = end2;
127 120
128 do { 121 do {
129#ifdef DEBUG 122 pr_debug("mapping %08lx phys to %08lx\n",
130 printk("mapping %08lx phys to %08lx\n", 123 __pa(kaddr), vaddr);
131 __pa(kaddr), vaddr);
132#endif
133 set_pte(pte, pfn_pte(virt_to_pfn(kaddr), 124 set_pte(pte, pfn_pte(virt_to_pfn(kaddr),
134 PAGE_KERNEL)); 125 PAGE_KERNEL));
135 pte++; 126 pte++;
@@ -162,7 +153,8 @@ inline int dvma_map_iommu(unsigned long kaddr, unsigned long baddr,
162 for(; index < end ; index++) { 153 for(; index < end ; index++) {
163// if(dvma_entry_use(index)) 154// if(dvma_entry_use(index))
164// BUG(); 155// BUG();
165// printk("mapping pa %lx to ba %lx\n", __pa(kaddr), index << DVMA_PAGE_SHIFT); 156// pr_info("mapping pa %lx to ba %lx\n", __pa(kaddr),
157// index << DVMA_PAGE_SHIFT);
166 158
167 dvma_entry_set(index, __pa(kaddr)); 159 dvma_entry_set(index, __pa(kaddr));
168 160
@@ -190,13 +182,12 @@ void dvma_unmap_iommu(unsigned long baddr, int len)
190 end = (DVMA_PAGE_ALIGN(baddr+len) >> DVMA_PAGE_SHIFT); 182 end = (DVMA_PAGE_ALIGN(baddr+len) >> DVMA_PAGE_SHIFT);
191 183
192 for(; index < end ; index++) { 184 for(; index < end ; index++) {
193#ifdef DEBUG 185 pr_debug("freeing bus mapping %08x\n",
194 printk("freeing bus mapping %08x\n", index << DVMA_PAGE_SHIFT); 186 index << DVMA_PAGE_SHIFT);
195#endif
196#if 0 187#if 0
197 if(!dvma_entry_use(index)) 188 if(!dvma_entry_use(index))
198 printk("dvma_unmap freeing unused entry %04x\n", 189 pr_info("dvma_unmap freeing unused entry %04x\n",
199 index); 190 index);
200 else 191 else
201 dvma_entry_dec(index); 192 dvma_entry_dec(index);
202#endif 193#endif
diff --git a/arch/m68k/sun3x/prom.c b/arch/m68k/sun3x/prom.c
index 0898c3f81508..5d60e65c1ee5 100644
--- a/arch/m68k/sun3x/prom.c
+++ b/arch/m68k/sun3x/prom.c
@@ -106,9 +106,9 @@ void __init sun3x_prom_init(void)
106 idprom_init(); 106 idprom_init();
107 107
108 if (!((idprom->id_machtype & SM_ARCH_MASK) == SM_SUN3X)) { 108 if (!((idprom->id_machtype & SM_ARCH_MASK) == SM_SUN3X)) {
109 printk("Warning: machine reports strange type %02x\n", 109 pr_warn("Machine reports strange type %02x\n",
110 idprom->id_machtype); 110 idprom->id_machtype);
111 printk("Pretending it's a 3/80, but very afraid...\n"); 111 pr_warn("Pretending it's a 3/80, but very afraid...\n");
112 idprom->id_machtype = SM_SUN3X | SM_3_80; 112 idprom->id_machtype = SM_SUN3X | SM_3_80;
113 } 113 }
114 114