diff options
author | Guillaume Knispel <gknispel@proformatique.com> | 2012-02-14 19:57:59 +0100 |
---|---|---|
committer | Guillaume Knispel <gknispel@proformatique.com> | 2012-02-14 19:57:59 +0100 |
commit | 601c956ad9c8d0c8489bd976c2100cb00718634b (patch) | |
tree | 165bf77c003508c0e53b758d25331a9e8db3ff4c /xhfc/xhfc_leb.h | |
parent | 31a6429bd5b4cc283b8d9336fb3e579b70705ac8 (diff) |
switch to leb cs1 based gpio for ntte and terms
Diffstat (limited to 'xhfc/xhfc_leb.h')
-rw-r--r-- | xhfc/xhfc_leb.h | 14 |
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) ({ \ |