x86/platform changes for v4.12
Linus,
Please pull the latest x86-platform-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-platform-for-linus
# HEAD: d4d969909bef4c1e103eec0fc2c820773811fb72 x86/platform/intel-mid: Enable Bluetooth support on Intel Edison
Most of the commits are continued SGI UV4 hardware-enablement changes, plus there's also new Bluetooth support for the Intel Edison platform.
Thanks,
Ingo
------------------>
Andrew Banman (6):
x86/platform/uv/BAU: Add uv_bau_version enumerated constants x86/platform/uv/BAU: Add payload descriptor qualifier x86/platform/uv/BAU: Cleanup bau_operations declaration and instances x86/platform/uv/BAU: Add status mmr location fields to bau_control x86/platform/uv/BAU: Add wait_completion to bau_operations x86/platform/uv/BAU: Implement uv4_wait_completion with read_status
Andy Shevchenko (1):
x86/platform/intel-mid: Enable Bluetooth support on Intel Edison
arch/x86/include/asm/uv/uv_bau.h | 82 ++++++--- arch/x86/platform/intel-mid/device_libs/Makefile | 3 +- .../platform/intel-mid/device_libs/platform_bt.c | 108 ++++++++++++ arch/x86/platform/uv/tlb_uv.c | 195 ++++++++++++++------- 4 files changed, 299 insertions(+), 89 deletions(-) create mode 100644 arch/x86/platform/intel-mid/device_libs/platform_bt.c
arch/x86/include/asm/uv/uv_bau.h +57 -25
@@ -185,6 +185,15 @@#define MSG_REGULAR 1#define MSG_RETRY 2 +#define BAU_DESC_QUALIFIER 0x534749 + +enum uv_bau_version { +UV_BAU_V1 =1 , +UV_BAU_V2 , +UV_BAU_V3 , +UV_BAU_V4 , +}; +/* * Distribution: 32 bytes (256 bits) (bytes 0-0x1f of descriptor) * If the 'multilevel' flag in the header portion of the descriptor
@@ -222,20 +231,32 @@ struct bau_local_cpumask {* the s/w ack bit vector ] */ -/* -* The payload is software-defined for INTD transactions +/** +* struct uv1_2_3_bau_msg_payload - defines payload for INTD transactions +* @address: Signifies a page or all TLB's of the cpu +* @sending_cpu: CPU from which the message originates +* @acknowledge_count: CPUs on the destination Hub that received the interrupt */ -struct bau_msg_payload { -unsigned long address;/* signifies a page or all -TLB's of the cpu */ -/* 64 bits */ -unsigned short sending_cpu;/* filled in by sender */ -/* 16 bits */ -unsigned short acknowledge_count;/* filled in by destination */ -/* 16 bits */ -unsigned int reserved1:32 ;/* not usable */ +struct uv1_2_3_bau_msg_payload { +u64 address; +u16 sending_cpu; +u16 acknowledge_count; }; +/** +* struct uv4_bau_msg_payload - defines payload for INTD transactions +* @address: Signifies a page or all TLB's of the cpu +* @sending_cpu: CPU from which the message originates +* @acknowledge_count: CPUs on the destination Hub that received the interrupt +* @qualifier: Set by source to verify origin of INTD broadcast +*/ +struct uv4_bau_msg_payload { +u64 address; +u16 sending_cpu; +u16 acknowledge_count; +u32 reserved:8 ; +u32 qualifier:24 ; +};/* * UV1 Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor)
@@ -385,17 +406,6 @@ struct uv2_3_bau_msg_header {/* bits 127:120 */ }; -/* Abstracted BAU functions */ -struct bau_operations { -unsigned long (*read_l_sw_ack)(void ); -unsigned long (*read_g_sw_ack)(int pnode); -unsigned long (*bau_gpa_to_offset)(unsigned long vaddr); -void (*write_l_sw_ack)(unsigned long mmr); -void (*write_g_sw_ack)(int pnode,unsigned long mmr); -void (*write_payload_first)(int pnode,unsigned long mmr); -void (*write_payload_last)(int pnode,unsigned long mmr); -}; -/* * The activation descriptor: * The format of the message to send, plus all accompanying control
@@ -411,7 +421,10 @@ struct bau_desc {struct uv2_3_bau_msg_header uv2_3_hdr; } header; -struct bau_msg_payload payload; +union bau_payload_header { +struct uv1_2_3_bau_msg_payload uv1_2_3; +struct uv4_bau_msg_payload uv4; + } payload; };/* UV1: * -payload-- ---------header------
@@ -588,8 +601,12 @@ struct uvhub_desc {struct socket_desc socket[2 ]; }; -/* -* one per-cpu; to locate the software tables +/** +* struct bau_control +* @status_mmr: location of status mmr, determined by uvhub_cpu +* @status_index: index of ERR|BUSY bits in status mmr, determined by uvhub_cpu +* +* Per-cpu control struct containing CPU topology information and BAU tuneables. */ struct bau_control {struct bau_desc *descriptor_base;
@@ -607,6 +624,8 @@ struct bau_control {int timeout_tries;int ipi_attempts;int conseccompletes; +u64 status_mmr; +int status_index;bool nobau;short baudisabled;short cpu;
@@ -644,6 +663,19 @@ struct bau_control {struct hub_and_pnode *thp; }; +/* Abstracted BAU functions */ +struct bau_operations { +unsigned long (*read_l_sw_ack)(void ); +unsigned long (*read_g_sw_ack)(int pnode); +unsigned long (*bau_gpa_to_offset)(unsigned long vaddr); +void (*write_l_sw_ack)(unsigned long mmr); +void (*write_g_sw_ack)(int pnode,unsigned long mmr); +void (*write_payload_first)(int pnode,unsigned long mmr); +void (*write_payload_last)(int pnode,unsigned long mmr); +int (*wait_completion)(struct bau_desc *, +struct bau_control *,long try); +}; +static inline void write_mmr_data_broadcast (int pnode,unsigned long mmr_image) {write_gmmr (pnode,UVH_BAU_DATA_BROADCAST , mmr_image);
arch/x86/platform/intel-mid/device_libs/Makefile +2 -1
@@ -2,8 +2,9 @@ obj-$(subst m,y,$(CONFIG_PINCTRL_MERRIFIELD)) += platform_mrfld_pinctrl.o # SDHCI Devices obj-$(subst m,y,$(CONFIG_MMC_SDHCI_PCI)) += platform_mrfld_sd.o -# WiFi +# WiFi + BT obj-$(subst m,y,$(CONFIG_BRCMFMAC_SDIO)) += platform_bcm43xx.o +obj-$(subst m,y,$(CONFIG_BT_HCIUART_BCM)) += platform_bt.o # IPC Devices obj-$(subst m,y,$(CONFIG_MFD_INTEL_MSIC)) += platform_msic.o obj-$(subst m,y,$(CONFIG_SND_MFLD_MACHINE)) += platform_msic_audio.o
arch/x86/platform/intel-mid/device_libs/platform_bt.c new file +108 -0
108 lines not on this page · raw message
arch/x86/platform/uv/tlb_uv.c +132 -63
307 lines not on this page · raw message