Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
9 changes: 9 additions & 0 deletions drivers/iommu/apple-dart.c
Original file line number Diff line number Diff line change
Expand Up @@ -8426,6 +8426,15 @@ int apple_dart_set_host_resumes(struct device *dev)
}
EXPORT_SYMBOL_GPL(apple_dart_set_host_resumes);

void apple_dart_clear_host_resumes(struct device *dev)
{
struct apple_dart *dart = dev_get_drvdata(dev);

if (dart)
dart->host_resumes = false;
}
EXPORT_SYMBOL_GPL(apple_dart_clear_host_resumes);

/* The host's port is up again: ungate the DART and restore what it saved. */
int apple_dart_host_resume(struct device *dev)
{
Expand Down
14 changes: 3 additions & 11 deletions drivers/pci/controller/pcie-apple-radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,22 +399,14 @@ static int apple_radio_seal(struct apple_radio_sleep *s, u64 generation)

static int apple_radio_port_restore(struct apple_radio_sleep *s)
{
static const struct {
u32 offset, value;
} defaults[] = {
{ 0x88, 0x110 }, { 0x100, ~0U }, { 0x148, ~0U }, { 0x210, ~0U },
{ 0x80, 0 }, { 0x84, 0 }, { 0x104, ~0U }, { 0x124, 0x100 },
{ 0x16c, 0 }, { 0x13c, 0x10 }, { 0x800, 0x100100 }, { 0x808, 0x1000ff },
{ 0x82c, 0 }, { 0x130, 0x3000000 }, { 0x140, 0x10 }, { 0x144, 0x253770 },
{ 0x21c, 0 }, { 0x834, 0 }, { 0x83c, 0 },
};
struct apple_pcie_port *port = s->port;
void __iomem *dbi = s->pcie->cfg->win;
u32 value;
int ret, speed = of_pci_get_max_link_speed(port->np);

for (unsigned int i = 0; i < ARRAY_SIZE(defaults); i++)
apple_pcie_port_writel(port, defaults[i].value, defaults[i].offset);
for (unsigned int i = 0; i < ARRAY_SIZE(apple_pcie_t8132_port_regs); i++)
apple_pcie_port_writel(port, apple_pcie_t8132_port_regs[i].value,
apple_pcie_t8132_port_regs[i].offset);
apple_tunable_apply(port->base, s->tables[0]);
apple_pcie_port_rmw_set(port, PORT_APPCLK_EN, PORT_APPCLK);
writel(readl(port->phy) & ~(PHY_LANE_CFG_REFCLK0REQ | PHY_LANE_CFG_REFCLK1REQ), port->phy);
Expand Down
Loading