aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sh/pfc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sh/pfc.c')
-rw-r--r--drivers/sh/pfc.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/sh/pfc.c b/drivers/sh/pfc.c
index 448ba232c408..841ed5030c8f 100644
--- a/drivers/sh/pfc.c
+++ b/drivers/sh/pfc.c
@@ -7,7 +7,6 @@
7 * License. See the file "COPYING" in the main directory of this archive 7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details. 8 * for more details.
9 */ 9 */
10
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/list.h> 12#include <linux/list.h>
@@ -72,11 +71,9 @@ static void gpio_write_bit(struct pinmux_data_reg *dr,
72 71
73 pos = dr->reg_width - (in_pos + 1); 72 pos = dr->reg_width - (in_pos + 1);
74 73
75#ifdef DEBUG 74 pr_debug("write_bit addr = %lx, value = %ld, pos = %ld, "
76 pr_info("write_bit addr = %lx, value = %ld, pos = %ld, " 75 "r_width = %ld\n",
77 "r_width = %ld\n", 76 dr->reg, !!value, pos, dr->reg_width);
78 dr->reg, !!value, pos, dr->reg_width);
79#endif
80 77
81 if (value) 78 if (value)
82 set_bit(pos, &dr->reg_shadow); 79 set_bit(pos, &dr->reg_shadow);
@@ -95,11 +92,9 @@ static int gpio_read_reg(unsigned long reg, unsigned long reg_width,
95 mask = (1 << field_width) - 1; 92 mask = (1 << field_width) - 1;
96 pos = reg_width - ((in_pos + 1) * field_width); 93 pos = reg_width - ((in_pos + 1) * field_width);
97 94
98#ifdef DEBUG 95 pr_debug("read_reg: addr = %lx, pos = %ld, "
99 pr_info("read_reg: addr = %lx, pos = %ld, " 96 "r_width = %ld, f_width = %ld\n",
100 "r_width = %ld, f_width = %ld\n", 97 reg, pos, reg_width, field_width);
101 reg, pos, reg_width, field_width);
102#endif
103 98
104 data = gpio_read_raw_reg(reg, reg_width); 99 data = gpio_read_raw_reg(reg, reg_width);
105 return (data >> pos) & mask; 100 return (data >> pos) & mask;
@@ -114,11 +109,9 @@ static void gpio_write_reg(unsigned long reg, unsigned long reg_width,
114 mask = (1 << field_width) - 1; 109 mask = (1 << field_width) - 1;
115 pos = reg_width - ((in_pos + 1) * field_width); 110 pos = reg_width - ((in_pos + 1) * field_width);
116 111
117#ifdef DEBUG 112 pr_debug("write_reg addr = %lx, value = %ld, pos = %ld, "
118 pr_info("write_reg addr = %lx, value = %ld, pos = %ld, " 113 "r_width = %ld, f_width = %ld\n",
119 "r_width = %ld, f_width = %ld\n", 114 reg, value, pos, reg_width, field_width);
120 reg, value, pos, reg_width, field_width);
121#endif
122 115
123 mask = ~(mask << pos); 116 mask = ~(mask << pos);
124 value = value << pos; 117 value = value << pos;