summaryrefslogtreecommitdiff
path: root/xhfc/xhfc_leb.h
diff options
context:
space:
mode:
Diffstat (limited to 'xhfc/xhfc_leb.h')
-rw-r--r--xhfc/xhfc_leb.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/xhfc/xhfc_leb.h b/xhfc/xhfc_leb.h
index acce53e..0f95a13 100644
--- a/xhfc/xhfc_leb.h
+++ b/xhfc/xhfc_leb.h
@@ -38,20 +38,30 @@
void leb_init(struct xhfc_pi *leb);
-static inline u8 read_xhfc(struct xhfc * xhfc, u8 reg_addr)
+static inline u8 read_xhfc(struct xhfc *xhfc, u8 reg_addr)
{
u8 __iomem *cs_n0 = xhfc->pi->cs_n0;
return readb(&cs_n0[reg_addr]);
}
-static inline void write_xhfc(struct xhfc * xhfc, u8 reg_addr, u8 value)
+static inline void write_xhfc(struct xhfc *xhfc, u8 reg_addr, u8 value)
{
u8 __iomem *cs_n0 = xhfc->pi->cs_n0;
writeb(value, &cs_n0[reg_addr]);
}
+static inline void write_xhfc_soft_conf(struct xhfc *xhfc, u8 soft_conf)
+{
+ u8 __iomem *cs_n1 = xhfc->pi->cs_n1;
+
+ writeb(soft_conf, &cs_n1[0]);
+
+ /* ensure the write has been completed: */
+ (void)readb(&cs_n1[0]);
+}
+
#if 0
#ifdef DEBUG
#define read_xhfc(x, reg) ({ \