Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions arch/arm/configs/mt7623n_evb_fwu_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,9 @@ CONFIG_MTK_COMBO_WIFI=y
CONFIG_NL80211_TESTMODE=y

#internal Bluetooth (also not working yet)
#CONFIG_MTK_BTIF=y
#CONFIG_MTK_COMBO_BT=y
CONFIG_BT=y
CONFIG_MTK_COMBO_BT=m
CONFIG_MTK_COMBO_BT_HCI=m

#if you use a mt76x2 or mt76x3 pcie-card
CONFIG_MT76=m
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/mediatek/connectivity/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ config MTK_COMBO_COMM_APO

config MTK_COMBO_BT
tristate "MediaTek Combo Chip BT driver"
depends on MTK_COMBO
depends on BT && MTK_COMBO
select MTK_BTIF
help
MTK BT /dev/stpbt driver for Bluedroid
Expand Down
20 changes: 18 additions & 2 deletions drivers/pci/host/pcie-mediatek.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,23 @@ static struct mtk_pcie_port *mtk_pcie_find_port(struct pci_bus *bus,
{
struct mtk_pcie *pcie = bus->sysdata;
struct mtk_pcie_port *port;
struct pci_dev *dev;
struct pci_bus *pbus;

list_for_each_entry(port, &pcie->ports, list)
if (port->slot == PCI_SLOT(devfn))
list_for_each_entry(port, &pcie->ports, list) {
if (bus->number == 0 && port->slot == PCI_SLOT(devfn)) {
return port;
} else if (bus->number != 0) {
pbus = bus;
do {
dev = pbus->self;
if (port->slot == PCI_SLOT(dev->devfn))
return port;

pbus = dev->bus;
} while (dev->bus->number != 0);
}
}

return NULL;
}
Expand Down Expand Up @@ -663,6 +676,9 @@ static void __iomem *mtk_pcie_map_bus(struct pci_bus *bus,
{
struct mtk_pcie *pcie = bus->sysdata;

if (!mtk_pcie_find_port(bus, devfn))
return 0;

writel(PCIE_CONF_ADDR(where, PCI_FUNC(devfn), PCI_SLOT(devfn),
bus->number), pcie->base + PCIE_CFG_ADDR);

Expand Down
3 changes: 3 additions & 0 deletions drivers/pwm/pwm-mediatek.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ static int mtk_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
return -EINVAL;
}

printk(KERN_NOTICE "[mtk_pwm_config] period_ns: %d, duty_ns: %d",period_ns,duty_ns);
printk(KERN_NOTICE "[mtk_pwm_config] resolution: %d, clkdiv: %d",resolution,clkdiv);

mtk_pwm_writel(pc, pwm->hwpwm, PWMCON, BIT(15) | clkdiv);
if (pwm->hwpwm > 2) { //for PWM4 and PWM5
mtk_pwm_writel(pc, pwm->hwpwm, PWM45DWIDTH, period_ns / resolution);
Expand Down
3 changes: 1 addition & 2 deletions net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,7 @@ static void hci_cc_read_local_ext_features(struct hci_dev *hdev,

if (rp->status)
return;

if (hdev->max_page < rp->max_page)
if (hdev->max_page < rp->max_page)
hdev->max_page = rp->max_page;

if (rp->page < HCI_MAX_PAGES)
Expand Down