IOSF: Add interface for the cases requiring fid
PATCH 2/14 IOSF: Add interface for the cases requiring fid
From: Fei Yang <[email protected]>
Some implementations may require an additional step for setting the FID bits to ensure correct transactions over the IOSF side band interface. Add the FID support accordingly for such implementations
--- arch/x86/include/asm/iosf_mbi.h | 27 ++++++++++++++ arch/x86/platform/intel/iosf_mbi.c | 73 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+)
arch/x86/include/asm/iosf_mbi.h +27 -0
@@ -8,6 +8,7 @@#define MBI_MCR_OFFSET 0xD0#define MBI_MDR_OFFSET 0xD4#define MBI_MCRX_OFFSET 0xD8 +#define MBI_MCRP_OFFSET 0xDC#define MBI_RD_MASK 0xFEFFFFFF#define MBI_WR_MASK 0X01000000
@@ -113,6 +114,32 @@ int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);*/ int iosf_mbi_modify (u8 port,u8 opcode,u32 offset,u32 mdr,u32 mask); +/** +* iosf_mbi_read_with_fid() - MailBox Interface read command requiring fid +* @fid: fid bits +* @port: port indicating subunit being accessed +* @opcode: port specific read or write opcode +* @offset: register address offset +* @mdr: register data to be read +* +* Locking is handled by spinlock - cannot sleep. +* Return: Nonzero on error +*/ +int iosf_mbi_read_with_fid (u32 fid,u8 port,u8 opcode,u32 offset,u32 *mdr); + +/** +* iosf_mbi_write_with_fid() - MailBox unmasked write command requiring fid +* @fid: fid bits +* @port: port indicating subunit being accessed +* @opcode: port specific read or write opcode +* @offset: register address offset +* @mdr: register data to be written +* +* Locking is handled by spinlock - cannot sleep. +* Return: Nonzero on error +*/ +int iosf_mbi_write_with_fid (u32 fid,u8 port,u8 opcode,u32 offset,u32 mdr); +#else /* CONFIG_IOSF_MBI is not enabled */ static inline bool iosf_mbi_available (void )
arch/x86/platform/intel/iosf_mbi.c +73 -0
85 lines not on this page · raw message
Signature · 1 line
1.9.1
Sorry, this one has wrong commit message, please comment on the other patch with [PATCH 02/14] removed
Quoted 18 lines
From: Fei Yang <[email protected]>
Some implementations may require an additional step for setting the FID bits to ensure correct transactions over the IOSF side band interface. Add the FID support accordingly for such implementations
Change-Id Ic0227f9e74133a3203aa08e8471939f905d19622Signed-off-by Fei Yang <[email protected]>--- arch/x86/include/asm/iosf_mbi.h | 27 ++++++++++++++ arch/x86/platform/intel/iosf_mbi.c | 73 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+)arch/x86/include/asm/iosf_mbi.h +0
-0@@ -8,6 +8,7 @@#define MBI_MCR_OFFSET 0xD0#define MBI_MDR_OFFSET 0xD4
Quoted 1 line · Fei
Sorry, this one has wrong commit message, please comment on the other patch with [PATCH 02/14] removed
Hm, I didn't see anything except this patch.
Perhaps you first go to our internal mailing list for preliminary review?
Signature · 2 lines
With Best Regards, Andy Shevchenko