lpc_sch: Add Intel Centerton Multifunction Device support
PATCH 3/3 lpc_sch: Add Intel Centerton Multifunction Device support
This patch adds the Intel Centerton processor DeviceID for the Integrated Legacy Block. The ILB provides GPIO, SMBus, and Watchdog functionality. The ILB DeviceID is defined in include/linux/pci_ids.h.
--- drivers/mfd/lpc_sch.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-)
drivers/mfd/lpc_sch.c +10 -3
@@ -36,6 +36,7 @@#define GPIOBASE 0x44#define GPIO_IO_SIZE 64 +#define GPIO_IO_SIZE_CENTERTON 128#define WDTBASE 0x84#define WDT_IO_SIZE 64
@@ -68,7 +69,7 @@ static struct resource wdt_sch_resource = {static struct mfd_cell tunnelcreek_cells[] = { { - .name ="tunnelcreek_wdt" , + .name ="ie6xx_wdt" , .num_resources =1 , .resources = &wdt_sch_resource, },
@@ -77,6 +78,7 @@ static struct mfd_cell tunnelcreek_cells[] = {static DEFINE_PCI_DEVICE_TABLE (lpc_sch_ids) = { {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_SCH_LPC ) }, {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ITC_LPC ) }, + {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_CENTERTON_ILB ) }, {0 , } };MODULE_DEVICE_TABLE (pci, lpc_sch_ids);
@@ -115,7 +117,11 @@ static int __devinit lpc_sch_probe(struct pci_dev *dev, } gpio_sch_resource.start = base_addr; - gpio_sch_resource.end = base_addr +GPIO_IO_SIZE -1 ; + +if (id->device ==PCI_DEVICE_ID_INTEL_CENTERTON_ILB ) + gpio_sch_resource.end = base_addr +GPIO_IO_SIZE_CENTERTON -1 ; +else + gpio_sch_resource.end = base_addr +GPIO_IO_SIZE -1 ;for (i=0 ; i <ARRAY_SIZE (lpc_sch_cells); i++) lpc_sch_cells[i].id = id->device;
@@ -125,7 +131,8 @@ static int __devinit lpc_sch_probe(struct pci_dev *dev,if (ret) goto out_dev; -if (id->device ==PCI_DEVICE_ID_INTEL_ITC_LPC ) { +if (id->device ==PCI_DEVICE_ID_INTEL_ITC_LPC + || id->device ==PCI_DEVICE_ID_INTEL_CENTERTON_ILB ) {pci_read_config_dword (dev,WDTBASE , &base_addr_cfg);if (!(base_addr_cfg & (1 <<31 ))) {dev_err (&dev->dev,"Decode of the WDT I/O range disabled\n" );
Signature · 1 line
1.7.4.4
Hi Seth,
Quoted 2 lines · Seth Heasley
This patch adds the Intel Centerton processor DeviceID for the Integrated Legacy Block. The ILB provides GPIO, SMBus, and Watchdog functionality. The ILB DeviceID is defined in
include/linux/pci_ids.h.
Is the pci_ids.h change already in ? If not, I should take it at the same time so that we don't break compilation.
drivers/mfd/lpc_sch.c static struct resource wdt_sch_resource = { · line 75
Quoted 9 lines
drivers/mfd/lpc_sch.c +1
-1@@ -68,7 +69,7 @@ static struct resource wdt_sch_resource = {static struct mfd_cell tunnelcreek_cells[] = { { - .name ="tunnelcreek_wdt" , + .name ="ie6xx_wdt" , .num_resources =1 , .resources = &wdt_sch_resource, },
This one should be part of your upcoming watchdog driver patch (as a separate patch that I'd take).
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Hi Samuel,
Quoted 2 lines
Is the
pci_ids.hchange already in ? If not, I should take it at the same time so that we don't break compilation.
It was submitted just prior to my sending this patch.
Quoted 11 lines
drivers/mfd/lpc_sch.c static struct resource wdt_sch_resource = { · line 75
Quoted 9 lines
drivers/mfd/lpc_sch.c +1
-1@@ -68,7 +69,7 @@ static struct resource wdt_sch_resource = {static struct mfd_cell tunnelcreek_cells[] = { { - .name ="tunnelcreek_wdt" , + .name ="ie6xx_wdt" , .num_resources =1 , .resources = &wdt_sch_resource, },This one should be part of your upcoming watchdog driver patch (as a separate patch that I'd take).
I'm actually not submitting a watchdog patch. The maintainer already has code for this driver and is converting it to the new watchdog API. In discussions with him, we agreed to the renaming of the driver, which was submitted for a previous platform. He'll be committing the new code in the next couple of weeks, so I made this change in anticipation of the driver making it upstream. I can certainly submit this separately, but my thinking was that it's all connected to Centerton enabling since it uses the same driver. Let me know what you'd like me to do.
Regards,
-Seth
Hi Seth,
Quoted 6 lines · Seth
Hi Samuel,
Quoted 2 lines
Is the
pci_ids.hchange already in ? If not, I should take it at the same time so that we don't break compilation.It was submitted just prior to my sending this patch.
Please send it to me as your MFD patch build depends on it and it should be committed first.
Quoted 12 lines
Quoted 11 lines
drivers/mfd/lpc_sch.c static struct resource wdt_sch_resource = { · line 75
Quoted 9 lines
drivers/mfd/lpc_sch.c +1
-1@@ -68,7 +69,7 @@ static struct resource wdt_sch_resource = {static struct mfd_cell tunnelcreek_cells[] = { { - .name ="tunnelcreek_wdt" , + .name ="ie6xx_wdt" , .num_resources =1 , .resources = &wdt_sch_resource, },This one should be part of your upcoming watchdog driver patch (as a separate patch that I'd take).
Quoted 2 lines
I'm actually not submitting a watchdog patch. The maintainer already has code for this driver and is converting it to the new watchdog API. In discussions with him, we agreed to the renaming of the driver, which was submitted for a previous platform. He'll be committing the new code in the next couple of weeks, so I made this change in anticipation of the driver making it upstream.
That's reasonable, but I'd prefer this naming change to happen when the watchdog patch is submitted as well, as a separate MFD one liner patch.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Hi Samuel,
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Is the
pci_ids.hchange already in ? If not, I should take it at the same time so that we don't break compilation.It was submitted just prior to my sending this patch.
Please send it to me as your MFD patch build depends on it and it should be committed first.
Done.
Quoted 9 lines
Quoted 1 line
I'm actually not submitting a watchdog patch. The maintainer already
has code for this driver and is converting it to the new watchdog API. In discussions with him, we agreed to the renaming of the driver, which was submitted for a previous platform. He'll be committing the new code in the next couple of weeks, so I made this change in anticipation of the driver making it upstream.
Quoted 1 line
That's reasonable, but I'd prefer this naming change to happen when the watchdog patch is submitted as well, as a separate MFD one liner patch.
Okay, that's no problem. Do you need this patch resubmitted, or will you just nix the one line?
Regards,
Seth
Hi Seth,
Quoted 2 lines · Seth Heasley
This patch adds the Intel Centerton processor DeviceID for the Integrated Legacy Block. The ILB provides GPIO, SMBus, and Watchdog functionality. The ILB DeviceID is defined in
include/linux/pci_ids.h.
Patch applied to my for-next branch, after removing this chunk (That should be part of your watchdog driver submission):
@@ -68,7 +69,7 @@ static struct resource wdt_sch_resource = {
static struct mfd_cell tunnelcreek_cells[] = {
{
- .name = "tunnelcreek_wdt",
+ .name = "ie6xx_wdt",
.num_resources = 1,
.resources = &wdt_sch_resource,
},
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Quoted 7 lines · Samuel Ortiz
Hi Seth,
Quoted 2 lines · Seth Heasley
This patch adds the Intel Centerton processor DeviceID for the Integrated Legacy Block. The ILB provides GPIO, SMBus, and Watchdog functionality. The ILB DeviceID is defined in
include/linux/pci_ids.h.Patch applied to my for-next branch, after removing this chunk (That should be part of your watchdog driver submission):
Hi Samuel,
Have you applied the gpio patch also [patch 2/3]? It also depends on the pci device id, so it best go via your tree with the other two.
I'm dropping it from my tree.
g.
Hi Grant,
Quoted 6 lines · Grant Likely
Quoted 5 lines · Samuel Ortiz
Hi Seth,
Quoted 2 lines · Seth Heasley
This patch adds the Intel Centerton processor DeviceID for the Integrated Legacy Block. The ILB provides GPIO, SMBus, and Watchdog functionality. The ILB DeviceID is defined in
include/linux/pci_ids.h.
Quoted 7 lines
Quoted 2 lines
Patch applied to my for-next branch, after removing this chunk (That should be part of your watchdog driver submission):
Hi Samuel,
Have you applied the gpio patch also [patch 2/3]? It also depends on the pci device id, so it best go via your tree with the other two.
Yes, it's on my for-next branch.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/