Skip to contentSkip to conversation

H8/300 io.h bussizing problem fix

PATCH New Yoshinori Sato 1 participant 1 message Feb 21, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 H8/300 io.h bussizing problem fix

- fix warning
- byte swap miss fix
- 16bit bus access problem fix

arch/h8300/platform/h8300h/aki3068net/timer.c +3 -3
diff -X .exclude-diff -Nru linux-2.6.3/arch/h8300/platform/h8300h/aki3068net/timer.c linux-2.6.3-h8300/arch/h8300/platform/h8300h/aki3068net/timer.c
@@ -27,10 +27,10 @@
 
 void __init platform_timer_setup(irqreturn_t (*timer_int)(int, void *, struct pt_regs *))
 {
-	outb(H8300_TIMER_COUNT_DATA,TCORA2);
-	outb(0x00,_8TCSR2);
+	ctrl_outb(H8300_TIMER_COUNT_DATA,TCORA2);
+	ctrl_outb(0x00,_8TCSR2);
 	request_irq(40,timer_int,0,"timer",0);
-	outb(0x40|0x08|0x03,_8TCR2);
+	ctrl_outb(0x40|0x08|0x03,_8TCR2);
 }
 
 void platform_timer_eoi(void)
arch/h8300/platform/h8300h/generic/timer.c +12 -11
diff -X .exclude-diff -Nru linux-2.6.3/arch/h8300/platform/h8300h/generic/timer.c linux-2.6.3-h8300/arch/h8300/platform/h8300h/generic/timer.c
@@ -29,13 +29,14 @@
 
 #if defined(CONFIG_H83007) || defined(CONFIG_H83068)
 #include <asm/regs306x.h>
+#define CMFA 6
 
 int platform_timer_setup(void (*timer_int)(int, void *, struct pt_regs *))
 {
-	outb(H8300_TIMER_COUNT_DATA,TMR8CMA2);
-	outb(0x00,TMR8TCSR2);
-	request_irq_boot(40,timer_int,0,"timer",0);
-	outb(0x40|0x08|0x03,TMR8TCNT2);
+	ctrl_outb(H8300_TIMER_COUNT_DATA,TCORA2);
+	ctrl_outb(0x00,_8TCSR2);
+	request_irq(40,timer_int,0,"timer",0);
+	ctrl_outb(0x40|0x08|0x03,_8TCR2);
 	return 0;
 }
 
@@ -65,19 +66,19 @@
 {
 	*(unsigned short *)GRA= H8300_TIMER_COUNT_DATA;
 	*(unsigned short *)TCNT=0;
-	outb(0x23,TCR);
-	outb(0x00,TIOR);
+	ctrl_outb(0x23,TCR);
+	ctrl_outb(0x00,TIOR);
 	request_timer_irq(26,timer_int,0,"timer",0);
-	outb(inb(TIER) | 0x01,TIER);
-	outb(inb(TSNC) & ~0x01,TSNC);
-	outb(inb(TMDR) & ~0x01,TMDR);
-	outb(inb(TSTR) | 0x01,TSTR);
+	ctrl_outb(inb(TIER) | 0x01,TIER);
+	ctrl_outb(inb(TSNC) & ~0x01,TSNC);
+	ctrl_outb(inb(TMDR) & ~0x01,TMDR);
+	ctrl_outb(inb(TSTR) | 0x01,TSTR);
 	return 0;
 }
 
 void platform_timer_eoi(void)
 {
-	outb(inb(TSR) & ~0x01,TSR);
+	ctrl_outb(inb(TSR) & ~0x01,TSR);
 }
 #endif
 
arch/h8300/platform/h8300h/h8max/timer.c +3 -3
diff -X .exclude-diff -Nru linux-2.6.3/arch/h8300/platform/h8300h/h8max/timer.c linux-2.6.3-h8300/arch/h8300/platform/h8300h/h8max/timer.c
@@ -27,10 +27,10 @@
 
 void __init platform_timer_setup(irqreturn_t (*timer_int)(int, void *, struct pt_regs *))
 {
-	outb(H8300_TIMER_COUNT_DATA,TCORA2);
-	outb(0x00,_8TCSR2);
+	ctrl_outb(H8300_TIMER_COUNT_DATA,TCORA2);
+	ctrl_outb(0x00,_8TCSR2);
 	request_irq(40,timer_int,0,"timer",0);
-	outb(0x40|0x08|0x03,_8TCR2);
+	ctrl_outb(0x40|0x08|0x03,_8TCR2);
 }
 
 void platform_timer_eoi(void)
arch/h8300/platform/h8s/edosk2674/timer.c +5 -5
diff -X .exclude-diff -Nru linux-2.6.3/arch/h8300/platform/h8s/edosk2674/timer.c linux-2.6.3-h8300/arch/h8300/platform/h8s/edosk2674/timer.c
@@ -29,13 +29,13 @@
 int __init platform_timer_setup(irqreturn_t (*timer_int)(int, void *, struct pt_regs *))
 {
 	unsigned char mstpcrl;
-	mstpcrl = inb(MSTPCRL);                  /* Enable timer */
+	mstpcrl = ctrl_inb(MSTPCRL);                  /* Enable timer */
 	mstpcrl &= ~0x01;
-	outb(mstpcrl,MSTPCRL);
-	outb(H8300_TIMER_COUNT_DATA,_8TCORA1);
-	outb(0x00,_8TCSR1);
+	ctrl_outb(mstpcrl,MSTPCRL);
+	ctrl_outb(H8300_TIMER_COUNT_DATA,_8TCORA1);
+	ctrl_outb(0x00,_8TCSR1);
 	request_irq(76,timer_int,0,"timer",0);
-	outb(0x40|0x08|0x03,_8TCR1);
+	ctrl_outb(0x40|0x08|0x03,_8TCR1);
 	return 0;
 }
 
arch/h8300/platform/h8s/generic/timer.c +3 -3
diff -X .exclude-diff -Nru linux-2.6.3/arch/h8300/platform/h8s/generic/timer.c linux-2.6.3-h8300/arch/h8300/platform/h8s/generic/timer.c
@@ -25,10 +25,10 @@
 
 int platform_timer_setup(irqreturn_t (*timer_int)(int, void *, struct pt_regs *))
 {
-	outb(H8300_TIMER_COUNT_DATA,_8TCORA1);
-	outb(0x00,_8TCSR1);
+	ctrl_outb(H8300_TIMER_COUNT_DATA,_8TCORA1);
+	ctrl_outb(0x00,_8TCSR1);
 	request_irq(76,timer_int,0,"timer",0);
-	outb(0x40|0x08|0x03,_8TCR1);
+	ctrl_outb(0x40|0x08|0x03,_8TCR1);
 	return 0;
 }
 
include/asm-h8300/io.h +51 -25

160 lines not on this page · raw message

Signature · 2 lines
Yoshinori Sato
<[email protected]>