Bluetooth:Change EA for HST and HSP before getting LA
-Change EA for HSP before getting LA based on the soc type queried from BT power driver. -By default, HSP's Slimbus EA is added in DTSI file. Update HST's Slimbus slave EA address based on HST chip ver. Change-Id: I49e06e2e43025797e6110bf55304c7b3f0616c8e Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
This commit is contained in:
parent
fb2b744184
commit
e0a18a1f26
2 changed files with 64 additions and 0 deletions
|
@ -371,6 +371,9 @@ static int btfm_slim_alloc_port(struct btfmslim *btfmslim)
|
|||
int btfm_slim_hw_init(struct btfmslim *btfmslim)
|
||||
{
|
||||
int ret;
|
||||
int chipset_ver;
|
||||
struct slim_device *slim = btfmslim->slim_pgd;
|
||||
struct slim_device *slim_ifd = &btfmslim->slim_ifd;
|
||||
|
||||
BTFMSLIM_DBG("");
|
||||
if (!btfmslim)
|
||||
|
@ -381,6 +384,61 @@ int btfm_slim_hw_init(struct btfmslim *btfmslim)
|
|||
return 0;
|
||||
}
|
||||
mutex_lock(&btfmslim->io_lock);
|
||||
BTFMSLIM_INFO(
|
||||
"PGD Enum Addr: %.02x:%.02x:%.02x:%.02x:%.02x: %.02x",
|
||||
slim->e_addr[0], slim->e_addr[1], slim->e_addr[2],
|
||||
slim->e_addr[3], slim->e_addr[4], slim->e_addr[5]);
|
||||
BTFMSLIM_INFO(
|
||||
"IFD Enum Addr: %.02x:%.02x:%.02x:%.02x:%.02x: %.02x",
|
||||
slim_ifd->e_addr[0], slim_ifd->e_addr[1],
|
||||
slim_ifd->e_addr[2], slim_ifd->e_addr[3],
|
||||
slim_ifd->e_addr[4], slim_ifd->e_addr[5]);
|
||||
|
||||
chipset_ver = get_chipset_version();
|
||||
BTFMSLIM_INFO("chipset soc version:%x", chipset_ver);
|
||||
|
||||
if (chipset_ver == QCA_HSP_SOC_ID_0100 ||
|
||||
chipset_ver == QCA_HSP_SOC_ID_0110 ||
|
||||
chipset_ver == QCA_HSP_SOC_ID_0200) {
|
||||
BTFMSLIM_INFO("chipset is hastings prime, overwriting EA");
|
||||
slim->e_addr[0] = 0x00;
|
||||
slim->e_addr[1] = 0x01;
|
||||
slim->e_addr[2] = 0x21;
|
||||
slim->e_addr[3] = 0x02;
|
||||
slim->e_addr[4] = 0x17;
|
||||
slim->e_addr[5] = 0x02;
|
||||
|
||||
slim_ifd->e_addr[0] = 0x00;
|
||||
slim_ifd->e_addr[1] = 0x00;
|
||||
slim_ifd->e_addr[2] = 0x21;
|
||||
slim_ifd->e_addr[3] = 0x02;
|
||||
slim_ifd->e_addr[4] = 0x17;
|
||||
slim_ifd->e_addr[5] = 0x02;
|
||||
} else if (chipset_ver == QCA_HASTINGS_SOC_ID_0200) {
|
||||
BTFMSLIM_INFO("chipset is hastings 2.0, overwriting EA");
|
||||
slim->e_addr[0] = 0x00;
|
||||
slim->e_addr[1] = 0x01;
|
||||
slim->e_addr[2] = 0x20;
|
||||
slim->e_addr[3] = 0x02;
|
||||
slim->e_addr[4] = 0x17;
|
||||
slim->e_addr[5] = 0x02;
|
||||
|
||||
slim_ifd->e_addr[0] = 0x00;
|
||||
slim_ifd->e_addr[1] = 0x00;
|
||||
slim_ifd->e_addr[2] = 0x20;
|
||||
slim_ifd->e_addr[3] = 0x02;
|
||||
slim_ifd->e_addr[4] = 0x17;
|
||||
slim_ifd->e_addr[5] = 0x02;
|
||||
}
|
||||
BTFMSLIM_INFO(
|
||||
"PGD Enum Addr: %.02x:%.02x:%.02x:%.02x:%.02x: %.02x",
|
||||
slim->e_addr[0], slim->e_addr[1], slim->e_addr[2],
|
||||
slim->e_addr[3], slim->e_addr[4], slim->e_addr[5]);
|
||||
BTFMSLIM_INFO(
|
||||
"IFD Enum Addr: %.02x:%.02x:%.02x:%.02x:%.02x: %.02x",
|
||||
slim_ifd->e_addr[0], slim_ifd->e_addr[1],
|
||||
slim_ifd->e_addr[2], slim_ifd->e_addr[3],
|
||||
slim_ifd->e_addr[4], slim_ifd->e_addr[5]);
|
||||
|
||||
/* Assign Logical Address for PGD (Ported Generic Device)
|
||||
* enumeration address
|
||||
|
|
|
@ -103,6 +103,12 @@ enum {
|
|||
QCA_HASTINGS_SOC_ID_0200 = 0x400A0200,
|
||||
};
|
||||
|
||||
enum {
|
||||
QCA_HSP_SOC_ID_0100 = 0x400C0100,
|
||||
QCA_HSP_SOC_ID_0110 = 0x400C0110,
|
||||
QCA_HSP_SOC_ID_0200 = 0x400C0200,
|
||||
};
|
||||
|
||||
/* Function Prototype */
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue