OSDN Git Service

Add 'TIMER8' prefix
authorYoshinori Sato <ysato@users.sourceforge.jp>
Fri, 9 Jan 2015 07:38:08 +0000 (16:38 +0900)
committerYoshinori Sato <ysato@users.sourceforge.jp>
Fri, 9 Jan 2015 07:38:08 +0000 (16:38 +0900)
arch/h8300/include/asm/timer.h
arch/h8300/kernel/cpu/h83069/setup.c
arch/h8300/kernel/cpu/h8s2678/setup.c
arch/h8300/kernel/timer/timer8.c

index b552d90..3ee3aa9 100644 (file)
@@ -3,14 +3,14 @@
 
 unsigned long get_cpu_clock(void);
 
-#define TIMER_FREQ get_cpu_clock() /* Timer input freq. */
+#define H8300_TIMER_FREQ get_cpu_clock() /* Timer input freq. */
 
-#define MODE_CS 0
-#define MODE_CED 1
+#define H8300_TMR8_CLKSRC    0
+#define H8300_TMR8_CLKEVTDEV 1
 
-#define DIV_8 0
-#define DIV_64 1
-#define DIC_8192 2
+#define H8300_TMR8_DIV_8 0
+#define H8300_TMR8_DIV_64 1
+#define H8300_TMR8_DIC_8192 2
 
 struct h8300_timer8_config {
        int mode;
@@ -20,7 +20,7 @@ struct h8300_timer8_config {
 
 struct h8300_timer16_config {
        int rating;
-       __u8 enable;
+       __u8 enb;
        __u8 imfa;
        __u8 imiea;
 };
index 19d06c0..ca08a40 100644 (file)
@@ -64,8 +64,8 @@ static struct platform_device sci1_device = {
 };
 
 static struct h8300_timer8_config timer8_platform_data = {
-       .mode   = MODE_CS,
-       .div    = DIV_64,
+       .mode   = H8300_TMR8_CLKSRC,
+       .div    = H8300_TMR8_DIV_64,
        .rating = 200,
 };
 
index 34c6b47..ee3b5b2 100644 (file)
@@ -64,8 +64,8 @@ static struct platform_device sci2_device = {
 };
 
 static struct h8300_timer8_config timer8_platform_data = {
-       .mode   = MODE_CED,
-       .div    = DIV_8,
+       .mode   = H8300_TMR8_CLKEVTDEV,
+       .div    = H8300_TMR8_DIV_8,
        .rating = 200,
 };
 
index bd2467d..f94b63e 100644 (file)
@@ -85,12 +85,12 @@ static irqreturn_t timer8_interrupt(int irq, void *dev_id)
        struct timer8_priv *p = dev_id;
 
        switch(p->mode) {
-       case MODE_CS:
+       case H8300_TMR8_CLKSRC:
                ctrl_outb(ctrl_inb(p->mapbase + _8TCSR) & ~0x20,
                          p->mapbase + _8TCSR);
                p->total_cycles += 0x10000;
                break;
-       case MODE_CED:
+       case H8300_TMR8_CLKEVTDEV:
                ctrl_outb(ctrl_inb(p->mapbase + _8TCSR) & ~0x40,
                          p->mapbase + _8TCSR);
                p->flags |= FLAG_IRQCONTEXT;
@@ -297,7 +297,7 @@ static int __init timer8_setup(struct timer8_priv *p, struct platform_device *pd
        p->mode = cfg->mode;
        p->div = cfg->div;
        switch(p->mode) {
-       case MODE_CS:
+       case H8300_TMR8_CLKSRC:
                p->clk.cs.name = pdev->name;
                p->clk.cs.rating = cfg->rating;
                p->clk.cs.read = timer8_clocksource_read;
@@ -314,7 +314,7 @@ static int __init timer8_setup(struct timer8_priv *p, struct platform_device *pd
                clocksource_register_hz(&p->clk.cs, 
                                        get_cpu_clock() / div_rate[p->div]);
                break;
-       case MODE_CED:
+       case H8300_TMR8_CLKEVTDEV:
                p->clk.ced.name = pdev->name;
                p->clk.ced.features = CLOCK_EVT_FEAT_PERIODIC | 
                                        CLOCK_EVT_FEAT_ONESHOT;