u32 host_ssp_offset[CATPT_SSP_COUNT];
u32 dram_mask;
u32 iram_mask;
+ u32 d3srampgd_bit;
+ u32 d3pgd_bit;
void (*pll_shutdown)(struct catpt_dev *cdev, bool enable);
int (*power_up)(struct catpt_dev *cdev);
int (*power_down)(struct catpt_dev *cdev);
void wpt_dsp_pll_shutdown(struct catpt_dev *cdev, bool enable);
int lpt_dsp_power_up(struct catpt_dev *cdev);
int lpt_dsp_power_down(struct catpt_dev *cdev);
-int wpt_dsp_power_up(struct catpt_dev *cdev);
-int wpt_dsp_power_down(struct catpt_dev *cdev);
+int catpt_dsp_power_up(struct catpt_dev *cdev);
+int catpt_dsp_power_down(struct catpt_dev *cdev);
int catpt_dsp_stall(struct catpt_dev *cdev, bool stall);
void catpt_dsp_update_srampge(struct catpt_dev *cdev, struct resource *sram,
unsigned long mask);
dma_release_channel(chan);
if (ret)
return ret;
- return cdev->spec->power_down(cdev);
+ return catpt_dsp_power_down(cdev);
}
static int __maybe_unused catpt_resume(struct device *dev)
struct catpt_dev *cdev = dev_get_drvdata(dev);
int ret, i;
- ret = cdev->spec->power_up(cdev);
+ ret = catpt_dsp_power_up(cdev);
if (ret)
return ret;
{
int ret;
- ret = cdev->spec->power_up(cdev);
+ ret = catpt_dsp_power_up(cdev);
if (ret)
return ret;
err_boot_fw:
catpt_dmac_remove(cdev);
err_dmac_probe:
- cdev->spec->power_down(cdev);
+ catpt_dsp_power_down(cdev);
return ret;
}
snd_soc_unregister_component(cdev->dev);
catpt_dmac_remove(cdev);
- cdev->spec->power_down(cdev);
+ catpt_dsp_power_down(cdev);
catpt_sram_free(&cdev->iram);
catpt_sram_free(&cdev->dram);
.host_ssp_offset = { 0x0E8000, 0x0E9000 },
.dram_mask = LPT_VDRTCTL0_DSRAMPGE_MASK,
.iram_mask = LPT_VDRTCTL0_ISRAMPGE_MASK,
+ .d3srampgd_bit = LPT_VDRTCTL0_D3SRAMPGD,
+ .d3pgd_bit = LPT_VDRTCTL0_D3PGD,
.pll_shutdown = lpt_dsp_pll_shutdown,
- .power_up = lpt_dsp_power_up,
- .power_down = lpt_dsp_power_down,
};
static struct catpt_spec wpt_desc = {
.host_ssp_offset = { 0x0FC000, 0x0FD000 },
.dram_mask = WPT_VDRTCTL0_DSRAMPGE_MASK,
.iram_mask = WPT_VDRTCTL0_ISRAMPGE_MASK,
+ .d3srampgd_bit = WPT_VDRTCTL0_D3SRAMPGD,
+ .d3pgd_bit = WPT_VDRTCTL0_D3PGD,
.pll_shutdown = wpt_dsp_pll_shutdown,
- .power_up = wpt_dsp_power_up,
- .power_down = wpt_dsp_power_down,
};
static const struct acpi_device_id catpt_ids[] = {
return 0;
}
-int wpt_dsp_power_down(struct catpt_dev *cdev)
+int catpt_dsp_power_down(struct catpt_dev *cdev)
{
u32 mask, val;
cdev->spec->dram_mask);
catpt_dsp_set_srampge(cdev, &cdev->iram, cdev->spec->iram_mask,
cdev->spec->iram_mask);
- mask = WPT_VDRTCTL0_D3SRAMPGD | WPT_VDRTCTL0_D3PGD;
- catpt_updatel_pci(cdev, VDRTCTL0, mask, WPT_VDRTCTL0_D3PGD);
+ mask = cdev->spec->d3srampgd_bit | cdev->spec->d3pgd_bit;
+ catpt_updatel_pci(cdev, VDRTCTL0, mask, cdev->spec->d3pgd_bit);
catpt_updatel_pci(cdev, PMCS, PCI_PM_CTRL_STATE_MASK, PCI_D3hot);
/* give hw time to drop off */
return 0;
}
-int wpt_dsp_power_up(struct catpt_dev *cdev)
+int catpt_dsp_power_up(struct catpt_dev *cdev)
{
u32 mask, val;
catpt_updatel_pci(cdev, PMCS, PCI_PM_CTRL_STATE_MASK, PCI_D0);
/* SRAM power gating none */
- mask = WPT_VDRTCTL0_D3SRAMPGD | WPT_VDRTCTL0_D3PGD;
+ mask = cdev->spec->d3srampgd_bit | cdev->spec->d3pgd_bit;
catpt_updatel_pci(cdev, VDRTCTL0, mask, mask);
catpt_dsp_set_srampge(cdev, &cdev->dram, cdev->spec->dram_mask, 0);
catpt_dsp_set_srampge(cdev, &cdev->iram, cdev->spec->iram_mask, 0);