diff options
author | Alex Waterman <alexw@nvidia.com> | 2018-03-12 18:44:12 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-04-05 14:24:05 -0400 |
commit | 182760476dbd1415ef9a6c0c33dba0adc4dde1ef (patch) | |
tree | a8f2ef172d16b182f04f8719be34d7c40bdb7d85 /drivers/gpu/nvgpu/common | |
parent | d8e23112915d185deb534aa777c3f81ad6df5507 (diff) |
gpu: nvgpu: De-linuxify pmgr code
The pmgr code is in theory common code. However there were uses
of Linux stuff within this code.
This patch cleans that up by deleting the unnecessary os_linux.h
includes, usage of kfree() and adds several platform fields to
the gk20a struct. The platform data is copied to the gk20a struct
in the platform initialization code so that this common code can
access said data without requiring any knowledge of the OS platform
data.
JIRA NVGPU-525
Change-Id: Ic4bb6021f60b0a0778779ab5f3e15b7e5ca98306
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1673825
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/pci.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c index fe4c0f09..97c4c6bb 100644 --- a/drivers/gpu/nvgpu/common/linux/pci.c +++ b/drivers/gpu/nvgpu/common/linux/pci.c | |||
@@ -581,6 +581,11 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, | |||
581 | g->pci_class = (pdev->class >> 8) & 0xFFFFU; // we only want base/sub | 581 | g->pci_class = (pdev->class >> 8) & 0xFFFFU; // we only want base/sub |
582 | g->pci_revision = pdev->revision; | 582 | g->pci_revision = pdev->revision; |
583 | 583 | ||
584 | g->ina3221_dcb_index = platform->ina3221_dcb_index; | ||
585 | g->ina3221_i2c_address = platform->ina3221_i2c_address; | ||
586 | g->ina3221_i2c_port = platform->ina3221_i2c_port; | ||
587 | g->hardcode_sw_threshold = platform->hardcode_sw_threshold; | ||
588 | |||
584 | #if defined(CONFIG_PCI_MSI) | 589 | #if defined(CONFIG_PCI_MSI) |
585 | err = pci_enable_msi(pdev); | 590 | err = pci_enable_msi(pdev); |
586 | if (err) { | 591 | if (err) { |