Skip to contentSkip to conversation

sp5100_tco: Add AMD Mullins platform support

PATCH Superseded Denis Turischev 4 participants 10 messages Nov 19, 2015 – Dec 27, 2015 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sp5100_tco: Add AMD Mullins platform support

AMD Mullins watchdog is fully compatible to the previous Hudson chipset, reuse the existent sp5100_tco driver.

drivers/watchdog/sp5100_tco.c +2 -0
diff -Nru linux-4.3.orig/drivers/watchdog/sp5100_tco.c linux-4.3/drivers/watchdog/sp5100_tco.c
@@ -306,6 +306,8 @@
 static const struct pci_device_id sp5100_tco_pci_tbl[] = {
 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, PCI_ANY_ID,
 	  PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID,
+	  PCI_ANY_ID, },
 	{ 0, },			/* End of list */
 };
 MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);	
maintainer
#1 lore raw
Quoted 9 lines · Denis Turischev

AMD Mullins watchdog is fully compatible to the previous Hudson chipset, reuse the existent sp5100_tco driver.

diff -Nru linux-4.3.orig/drivers/watchdog/sp5100_tco.c linux-4.3/drivers/watchdog/sp5100_tco.c

drivers/watchdog/sp5100_tco.c

Quoted 9 lines
drivers/watchdog/sp5100_tco.c +2 -1
@@ -306,6 +306,8 @@
  static const struct pci_device_id sp5100_tco_pci_tbl[] = {
  	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, PCI_ANY_ID,
  	  PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID,
+	  PCI_ANY_ID, },
  	{ 0, },			/* End of list */
  };
  MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);	
--

Your patch does not apply to the latest kernel. Can you rebase to v4.4-rc1 and resubmit ?

Thanks,
Guenter

#2 lore raw
In reply to Denis Turischev

Hi Denis,

Quoted 3 lines · Denis Turischev

AMD Mullins watchdog is fully compatible to the previous Hudson chipset, reuse the existent sp5100_tco driver.

Thank you to add this support!
Actually, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS is only the SMBus device id on AMD mullins but also on many other AMD platforms. Could you please share some test method to me, that I am glad to do some quick tests. :)

Thanks,
Rui

Quoted 19 lines

diff -Nru linux-4.3.orig/drivers/watchdog/sp5100_tco.c linux-4.3/drivers/watchdog/sp5100_tco.c

drivers/watchdog/sp5100_tco.c +2 -1
@@ -306,6 +306,8 @@
 static const struct pci_device_id sp5100_tco_pci_tbl[] = {
 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, PCI_ANY_ID,
 	  PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID,
+	  PCI_ANY_ID, },
 	{ 0, },			/* End of list */
 };
 MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);	
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw

Hi Rui,

Quoted 11 lines · Huang Rui

Hi Denis,

Quoted 3 lines · Denis Turischev

AMD Mullins watchdog is fully compatible to the previous Hudson chipset, reuse the existent sp5100_tco driver.

Thank you to add this support!
Actually, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS is only the SMBus device id on AMD mullins but also on many other AMD platforms. Could you please share some test method to me, that I am glad to do some quick tests. :)

My device is Compulabs's fitlet. It's a fanless mini PC, also known as mintbox mini.
http://fit-pc.com/wiki/index.php/Fit-PC_Product_Line:_fitlet
Processor's datasheet:
http://support.amd.com/TechDocs/52740_16h_Models_30h-3Fh_BKDG.pdf

The dmesg output:
sp5100_tco: SP5100/SB800 TCO WatchDog Timer Driver v0.05
sp5100_tco: PCI Revision ID: 0x42
sp5100_tco: Using 0xfeb00000 for watchdog MMIO address
sp5100_tco: Last reboot was not triggered by watchdog.
sp5100_tco: initialized (0xffffc90000702000). heartbeat=60 sec (nowayout=0)

Please let me know if you need any other info or tests to be performed.

Denis

Quoted 23 lines

Thanks,
Rui

Quoted 19 lines

diff -Nru linux-4.3.orig/drivers/watchdog/sp5100_tco.c linux-4.3/drivers/watchdog/sp5100_tco.c

drivers/watchdog/sp5100_tco.c +2 -1
@@ -306,6 +306,8 @@
 static const struct pci_device_id sp5100_tco_pci_tbl[] = {
 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, PCI_ANY_ID,
 	  PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID,
+	  PCI_ANY_ID, },
 	{ 0, },			/* End of list */
 };
 MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);	
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Tested-by
#4 lore raw
Quoted 20 lines · Denis Turischev

Hi Rui,

Quoted 11 lines · Huang Rui

Hi Denis,

Quoted 3 lines · Denis Turischev

AMD Mullins watchdog is fully compatible to the previous Hudson chipset, reuse the existent sp5100_tco driver.

Thank you to add this support!
Actually, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS is only the SMBus device id on AMD mullins but also on many other AMD platforms. Could you please share some test method to me, that I am glad to do some quick tests. :)

My device is Compulabs's fitlet. It's a fanless mini PC, also known as mintbox mini.
http://fit-pc.com/wiki/index.php/Fit-PC_Product_Line:_fitlet
Processor's datasheet:
http://support.amd.com/TechDocs/52740_16h_Models_30h-3Fh_BKDG.pdf

Quoted 7 lines

The dmesg output:
sp5100_tco: SP5100/SB800 TCO WatchDog Timer Driver v0.05
sp5100_tco: PCI Revision ID: 0x42
sp5100_tco: Using 0xfeb00000 for watchdog MMIO address
sp5100_tco: Last reboot was not triggered by watchdog.
sp5100_tco: initialized (0xffffc90000702000). heartbeat=60 sec (nowayout=0)

I verified it in my side. Thank you. :)
And found AMD new Carrizo platform also supported sp5100_tco watchdog. I will send a patch to add support to KernCZ(Carrizo) chipset later.

#5 lore raw

PATCH v2 1/1 sp5100_tco: Add AMD Mullins platform support

In reply to Denis Turischev

AMD Mullins watchdog is fully compatible to the previous Hudson chipset, reuse the existent sp5100_tco driver.

v2: rebased to v4.4-rc2

drivers/watchdog/sp5100_tco.c +2 -0
diff -Nru linux-4.4-rc2.orig/drivers/watchdog/sp5100_tco.c linux-4.4-rc2/drivers/watchdog/sp5100_tco.c
@@ -306,6 +306,8 @@
 static const struct pci_device_id sp5100_tco_pci_tbl[] = {
 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, PCI_ANY_ID,
 	  PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID,
+	  PCI_ANY_ID, }, 
 	{ 0, },			/* End of list */
 };
 MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);
maintainer
#6 lore raw
Quoted 11 lines · Denis Turischev

AMD Mullins watchdog is fully compatible to the previous Hudson chipset, reuse the existent sp5100_tco driver.

v2: rebased to v4.4-rc2

diff -Nru linux-4.4-rc2.orig/drivers/watchdog/sp5100_tco.c linux-4.4-rc2/drivers/watchdog/sp5100_tco.c

drivers/watchdog/sp5100_tco.c line 313

Quoted 8 lines
drivers/watchdog/sp5100_tco.c +2 -0
@@ -306,6 +306,8 @@
  static const struct pci_device_id sp5100_tco_pci_tbl[] = {
  	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, PCI_ANY_ID,
  	  PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID,
+	  PCI_ANY_ID, },
  	{ 0, },			/* End of list */
  };
  MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);
$ scripts/checkpatch.pl index.html
ERROR: trailing whitespace
#32: FILE: drivers/watchdog/sp5100_tco.c:310:
+^I  PCI_ANY_ID, }, $

total: 1 errors, 0 warnings, 8 lines checked

Please fix.

Guenter

#7 lore raw

PATCH v3 1/1 sp5100_tco: Add AMD Mullins platform support

AMD Mullins watchdog is fully compatible to the previous Hudson chipset, reuse the existent sp5100_tco driver.

v2: rebased to v4.4-rc2
v3: fixed trailing whitespace

drivers/watchdog/sp5100_tco.c +2 -0
diff -Nru linux-4.4-rc2.orig/drivers/watchdog/sp5100_tco.c linux-4.4-rc2/drivers/watchdog/sp5100_tco.c
@@ -306,6 +306,8 @@
 static const struct pci_device_id sp5100_tco_pci_tbl[] = {
 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, PCI_ANY_ID,
 	  PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID,
+	  PCI_ANY_ID, },
 	{ 0, },			/* End of list */
 };
 MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);
maintainer Reviewed-by on v3 1/1
#8 lore raw
Quoted 7 lines · Denis Turischev

AMD Mullins watchdog is fully compatible to the previous Hudson chipset, reuse the existent sp5100_tco driver.

v2: rebased to v4.4-rc2
v3: fixed trailing whitespace

Quoted 14 lines

diff -Nru linux-4.4-rc2.orig/drivers/watchdog/sp5100_tco.c linux-4.4-rc2/drivers/watchdog/sp5100_tco.c

drivers/watchdog/sp5100_tco.c +2 -0
@@ -306,6 +306,8 @@
  static const struct pci_device_id sp5100_tco_pci_tbl[] = {
  	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, PCI_ANY_ID,
  	  PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID,
+	  PCI_ANY_ID, },
  	{ 0, },			/* End of list */
  };
  MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);
#9 lore raw
In reply to Denis Turischev

Hi Denis,

Quoted 12 lines

AMD Mullins watchdog is fully compatible to the previous Hudson chipset, reuse the existent sp5100_tco driver.

v2: rebased to v4.4-rc2
v3: fixed trailing whitespace

diff -Nru linux-4.4-rc2.orig/drivers/watchdog/sp5100_tco.c linux-4.4-rc2/drivers/watchdog/sp5100_tco.c

drivers/watchdog/sp5100_tco.c line 313

Quoted 8 lines
drivers/watchdog/sp5100_tco.c +2 -0
@@ -306,6 +306,8 @@
 static const struct pci_device_id sp5100_tco_pci_tbl[] = {
 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, PCI_ANY_ID,
 	  PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID,
+	  PCI_ANY_ID, },
 	{ 0, },			/* End of list */
 };
 MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.