Skip to content

Commit

Permalink
x86/platform/intel-mid: Extend PWRMU to support Penwell
Browse files Browse the repository at this point in the history
Intel Penwell is one of the first SoCs in Intel MID series. It has slightly
older version of PWRMU IP, though it is compatible with one found on Intel
Tangier. Since we are not using (yet) any advanced stuff in the driver we may
safely re-use what it's done for Intel Tangier for now.

Extend PWRMU driver to support Intel Penwell by adding PCI ID and re-using
existing ->set_initial_state() function.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1467749348-100518-2-git-send-email-andriy.shevchenko@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Andy Shevchenko authored and Ingo Molnar committed Jul 8, 2016
1 parent e99a074 commit ca22312
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions arch/x86/platform/intel-mid/pwr.c
Original file line number Diff line number Diff line change
@@ -75,6 +75,7 @@
#define LSS_PWS_BITS 2 /* power state width */

/* Supported device IDs */
#define PCI_DEVICE_ID_PENWELL 0x0828
#define PCI_DEVICE_ID_TANGIER 0x11a1

struct mid_pwr_dev {
@@ -354,7 +355,7 @@ static int mid_pwr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return 0;
}

static int tng_set_initial_state(struct mid_pwr *pwr)
static int mid_set_initial_state(struct mid_pwr *pwr)
{
unsigned int i, j;
int ret;
@@ -397,12 +398,13 @@ static int tng_set_initial_state(struct mid_pwr *pwr)
return 0;
}

static const struct mid_pwr_device_info tng_info = {
.set_initial_state = tng_set_initial_state,
static const struct mid_pwr_device_info mid_info = {
.set_initial_state = mid_set_initial_state,
};

static const struct pci_device_id mid_pwr_pci_ids[] = {
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_TANGIER), (kernel_ulong_t)&tng_info },
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_PENWELL), (kernel_ulong_t)&mid_info },
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_TANGIER), (kernel_ulong_t)&mid_info },
{}
};
MODULE_DEVICE_TABLE(pci, mid_pwr_pci_ids);

0 comments on commit ca22312

Please sign in to comment.