Re: [PATCH] Watchdog device node name unification

2005-08-29 Thread Henrik Brix Andersen
On Sat, 2005-08-13 at 15:21 -0700, Linus Torvalds wrote:
> Doesn't seem to be serious enough to be worth it at this late stage in the 
> 2.6.13 game. Can you re-send after I do a release?

Resending as requested:

Here's a patch for unifying the watchdog device node name
to /dev/watchdog as expected by most user-space applications.

Please CC: me on replies as I am not subscribed to LKML.


Signed-off-by: Henrik Brix Andersen <[EMAIL PROTECTED]>


diff -Nurp linux-2.6.13/drivers/char/watchdog/ixp2000_wdt.c 
linux-2.6.13-watchdog/drivers/char/watchdog/ixp2000_wdt.c
--- linux-2.6.13/drivers/char/watchdog/ixp2000_wdt.c2005-08-29 
01:41:01.0 +0200
+++ linux-2.6.13-watchdog/drivers/char/watchdog/ixp2000_wdt.c   2005-08-29 
12:28:31.0 +0200
@@ -182,7 +182,7 @@ static struct file_operations ixp2000_wd
 static struct miscdevice ixp2000_wdt_miscdev =
 {
.minor  = WATCHDOG_MINOR,
-   .name   = "IXP2000 Watchdog",
+   .name   = "watchdog",
.fops   = &ixp2000_wdt_fops,
 };
 
diff -Nurp linux-2.6.13/drivers/char/watchdog/ixp4xx_wdt.c 
linux-2.6.13-watchdog/drivers/char/watchdog/ixp4xx_wdt.c
--- linux-2.6.13/drivers/char/watchdog/ixp4xx_wdt.c 2005-08-29 
01:41:01.0 +0200
+++ linux-2.6.13-watchdog/drivers/char/watchdog/ixp4xx_wdt.c2005-08-29 
12:28:31.0 +0200
@@ -176,7 +176,7 @@ static struct file_operations ixp4xx_wdt
 static struct miscdevice ixp4xx_wdt_miscdev =
 {
.minor  = WATCHDOG_MINOR,
-   .name   = "IXP4xx Watchdog",
+   .name   = "watchdog",
.fops   = &ixp4xx_wdt_fops,
 };
 
diff -Nurp linux-2.6.13/drivers/char/watchdog/scx200_wdt.c 
linux-2.6.13-watchdog/drivers/char/watchdog/scx200_wdt.c
--- linux-2.6.13/drivers/char/watchdog/scx200_wdt.c 2005-08-29 
01:41:01.0 +0200
+++ linux-2.6.13-watchdog/drivers/char/watchdog/scx200_wdt.c2005-08-29 
12:28:31.0 +0200
@@ -206,7 +206,7 @@ static struct file_operations scx200_wdt
 
 static struct miscdevice scx200_wdt_miscdev = {
.minor = WATCHDOG_MINOR,
-   .name  = NAME,
+   .name  = "watchdog",
.fops  = &scx200_wdt_fops,
 };
 


-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gentoo Metadistribution | Mobile computing herd


signature.asc
Description: This is a digitally signed message part


Re: [PATCH] Watchdog device node name unification

2005-08-13 Thread Henrik Brix Andersen
On Sun, 2005-08-14 at 01:43 +0200, Olaf Hering wrote:
>  On Sun, Aug 14, Christoph Hellwig wrote:
> > Please don't.  misdevice.name is a description of the device, and doesn't
> > have any relation with the name of the device node.
> 
> It is used for /class/misc/$name/dev

... and for udev-enabled systems, it's the name of the device node to be
created.

./Brix
-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gentoo Metadistribution | Mobile computing herd


signature.asc
Description: This is a digitally signed message part


Re: [PATCH] Watchdog device node name unification

2005-08-13 Thread Henrik Brix Andersen
On Sat, 2005-08-13 at 15:21 -0700, Linus Torvalds wrote:
> On Sat, 13 Aug 2005, Henrik Brix Andersen wrote:
> > 
> > The last patch was accidentally against 2.6.12 - this one is against
> > 2.6.13-rc6.
> 
> Doesn't seem to be serious enough to be worth it at this late stage in the 
> 2.6.13 game. Can you re-send after I do a release?

Certainly. I will resend after 2.6.13 has been released.

Regards,
Brix
-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gentoo Metadistribution | Mobile computing herd


signature.asc
Description: This is a digitally signed message part


Re: [PATCH] Watchdog device node name unification

2005-08-13 Thread Henrik Brix Andersen
On Sat, 2005-08-13 at 23:36 +0200, Henrik Brix Andersen wrote:
> Here's a patch for unifying the watchdog device node name
> to /dev/watchdog as expected by most user-space applications.
> 
> Please CC: me on replies as I am not subscribed to LKML.
> 
> 
> Signed-off-by: Henrik Brix Andersen <[EMAIL PROTECTED]>

The last patch was accidentally against 2.6.12 - this one is against
2.6.13-rc6.


diff -urp linux-2.6.13-rc6/drivers/char/watchdog/ixp2000_wdt.c 
linux-2.6.13-rc6-watchdog/drivers/char/watchdog/ixp2000_wdt.c
--- linux-2.6.13-rc6/drivers/char/watchdog/ixp2000_wdt.c2005-08-13 
23:48:02.0 +0200
+++ linux-2.6.13-rc6-watchdog/drivers/char/watchdog/ixp2000_wdt.c   
2005-08-13 23:50:17.0 +0200
@@ -182,7 +182,7 @@ static struct file_operations ixp2000_wd
 static struct miscdevice ixp2000_wdt_miscdev =
 {
.minor  = WATCHDOG_MINOR,
-   .name   = "IXP2000 Watchdog",
+   .name   = "watchdog",
.fops   = &ixp2000_wdt_fops,
 };
 
diff -urp linux-2.6.13-rc6/drivers/char/watchdog/ixp4xx_wdt.c 
linux-2.6.13-rc6-watchdog/drivers/char/watchdog/ixp4xx_wdt.c
--- linux-2.6.13-rc6/drivers/char/watchdog/ixp4xx_wdt.c 2005-08-13 
23:48:02.0 +0200
+++ linux-2.6.13-rc6-watchdog/drivers/char/watchdog/ixp4xx_wdt.c
2005-08-13 23:50:17.0 +0200
@@ -176,7 +176,7 @@ static struct file_operations ixp4xx_wdt
 static struct miscdevice ixp4xx_wdt_miscdev =
 {
.minor  = WATCHDOG_MINOR,
-   .name   = "IXP4xx Watchdog",
+   .name   = "watchdog",
.fops   = &ixp4xx_wdt_fops,
 };
 
diff -urp linux-2.6.13-rc6/drivers/char/watchdog/scx200_wdt.c 
linux-2.6.13-rc6-watchdog/drivers/char/watchdog/scx200_wdt.c
--- linux-2.6.13-rc6/drivers/char/watchdog/scx200_wdt.c 2005-08-13 
23:48:02.0 +0200
+++ linux-2.6.13-rc6-watchdog/drivers/char/watchdog/scx200_wdt.c
2005-08-13 23:50:21.0 +0200
@@ -206,7 +206,7 @@ static struct file_operations scx200_wdt
 
 static struct miscdevice scx200_wdt_miscdev = {
.minor = WATCHDOG_MINOR,
-   .name  = NAME,
+   .name  = "watchdog",
.fops  = &scx200_wdt_fops,
 };
 


-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gentoo Metadistribution | Mobile computing herd

-
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/


[PATCH] Watchdog device node name unification

2005-08-13 Thread Henrik Brix Andersen
Here's a patch for unifying the watchdog device node name
to /dev/watchdog as expected by most user-space applications.

Please CC: me on replies as I am not subscribed to LKML.


Signed-off-by: Henrik Brix Andersen <[EMAIL PROTECTED]>


diff -urp linux-2.6.13-rc6/drivers/char/watchdog/ixp2000_wdt.c 
linux-2.6.13-rc6-watchdog/drivers/char/watchdog/ixp2000_wdt.c
--- linux-2.6.13-rc6/drivers/char/watchdog/ixp2000_wdt.c2005-06-17 
21:48:29.0 +0200
+++ linux-2.6.13-rc6-watchdog/drivers/char/watchdog/ixp2000_wdt.c   
2005-08-13 23:10:22.0 +0200
@@ -186,7 +186,7 @@ static struct file_operations ixp2000_wd
 static struct miscdevice ixp2000_wdt_miscdev =
 {
.minor  = WATCHDOG_MINOR,
-   .name   = "IXP2000 Watchdog",
+   .name   = "watchdog",
.fops   = &ixp2000_wdt_fops,
 };
 
diff -urp linux-2.6.13-rc6/drivers/char/watchdog/ixp4xx_wdt.c 
linux-2.6.13-rc6-watchdog/drivers/char/watchdog/ixp4xx_wdt.c
--- linux-2.6.13-rc6/drivers/char/watchdog/ixp4xx_wdt.c 2005-06-17 
21:48:29.0 +0200
+++ linux-2.6.13-rc6-watchdog/drivers/char/watchdog/ixp4xx_wdt.c
2005-08-13 23:10:33.0 +0200
@@ -180,7 +180,7 @@ static struct file_operations ixp4xx_wdt
 static struct miscdevice ixp4xx_wdt_miscdev =
 {
.minor  = WATCHDOG_MINOR,
-   .name   = "IXP4xx Watchdog",
+   .name   = "watchdog",
.fops   = &ixp4xx_wdt_fops,
 };
 
diff -urp linux-2.6.13-rc6/drivers/char/watchdog/sa1100_wdt.c 
linux-2.6.13-rc6-watchdog/drivers/char/watchdog/sa1100_wdt.c
--- linux-2.6.13-rc6/drivers/char/watchdog/sa1100_wdt.c 2005-06-17 
21:48:29.0 +0200
+++ linux-2.6.13-rc6-watchdog/drivers/char/watchdog/sa1100_wdt.c
2005-08-13 23:14:05.0 +0200
@@ -176,7 +176,7 @@ static struct file_operations sa1100dog_
 static struct miscdevice sa1100dog_miscdev =
 {
.minor  = WATCHDOG_MINOR,
-   .name   = "SA1100/PXA2xx watchdog",
+   .name   = "watchdog",
.fops   = &sa1100dog_fops,
 };
 
diff -urp linux-2.6.13-rc6/drivers/char/watchdog/scx200_wdt.c 
linux-2.6.13-rc6-watchdog/drivers/char/watchdog/scx200_wdt.c
--- linux-2.6.13-rc6/drivers/char/watchdog/scx200_wdt.c 2005-06-17 
21:48:29.0 +0200
+++ linux-2.6.13-rc6-watchdog/drivers/char/watchdog/scx200_wdt.c
2005-08-13 23:14:33.0 +0200
@@ -210,7 +210,7 @@ static struct file_operations scx200_wdt
 
 static struct miscdevice scx200_wdt_miscdev = {
.minor = WATCHDOG_MINOR,
-   .name  = NAME,
+   .name  = "watchdog",
.fops  = &scx200_wdt_fops,
 };
 

-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gentoo Metadistribution | Mobile computing herd

-
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/


Re: [PATCH] Resend: Determine SCx200 CB address at run-time

2005-03-02 Thread Henrik Brix Andersen
On Wed, 2005-03-02 at 19:12 +0100, Henrik Brix Andersen wrote:
> The current SCx200 drivers use a fixed base address of 0x9000 for the
> Configuration Block, but some systems (at least the Soekris net4801)
> uses a base address of 0x6000. This patch first tries the fixed address
> then - if no configuration block could be found - tries the address
> written to the Configuration Block Address Scratchpad register by the
> BIOS.
> 
> This was first sent at Wed, 23 Feb 2005 13:53:33 +0100.
> 
> Signed-off-by: Henrik Brix Andersen <[EMAIL PROTECTED]>

Seems like my GPG signature messed up the in-line patch - it's available
from http://dev.gentoo.org/~brix/files/net4801/linux-2.6.11-scx200.patch

Sincerely,
Brix
-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gentoo Linux


signature.asc
Description: This is a digitally signed message part


[PATCH] Resend: Determine SCx200 CB address at run-time

2005-03-02 Thread Henrik Brix Andersen
The current SCx200 drivers use a fixed base address of 0x9000 for the
Configuration Block, but some systems (at least the Soekris net4801)
uses a base address of 0x6000. This patch first tries the fixed address
then - if no configuration block could be found - tries the address
written to the Configuration Block Address Scratchpad register by the
BIOS.

This was first sent at Wed, 23 Feb 2005 13:53:33 +0100.

Signed-off-by: Henrik Brix Andersen <[EMAIL PROTECTED]>
---

diff -urp linux-2.6.11/arch/i386/kernel/scx200.c 
linux-2.6.11-scx200/arch/i386/kernel/scx200.c
--- linux-2.6.11/arch/i386/kernel/scx200.c  2005-03-02 08:38:25.0 
+0100
+++ linux-2.6.11-scx200/arch/i386/kernel/scx200.c   2005-03-02 
18:01:56.0 +0100
@@ -13,6 +13,9 @@
 
 #include 
 
+/* Verify that the configuration block really is there */
+#define scx200_cb_probe(base) (inw((base) + SCx200_CBA) == (base))
+
 #define NAME "scx200"
 
 MODULE_AUTHOR("Christer Weinigel <[EMAIL PROTECTED]>");
@@ -22,9 +25,13 @@ MODULE_LICENSE("GPL");
 unsigned scx200_gpio_base = 0;
 long scx200_gpio_shadow[2];
 
+unsigned scx200_cb_base = 0;
+
 static struct pci_device_id scx200_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_BRIDGE) },
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE) },
+   { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_XBUS)   },
+   { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_XBUS)   },
{ },
 };
 MODULE_DEVICE_TABLE(pci,scx200_tbl);
@@ -45,22 +52,39 @@ static int __devinit scx200_probe(struct
int bank;
unsigned base;
 
-   base = pci_resource_start(pdev, 0);
-   printk(KERN_INFO NAME ": GPIO base 0x%x\n", base);
-
-   if (request_region(base, SCx200_GPIO_SIZE, "NatSemi SCx200 GPIO") == 0) 
{
-   printk(KERN_ERR NAME ": can't allocate I/O for GPIOs\n");
-   return -EBUSY;
+   if (pdev->device == PCI_DEVICE_ID_NS_SCx200_BRIDGE ||
+   pdev->device == PCI_DEVICE_ID_NS_SC1100_BRIDGE) {
+   base = pci_resource_start(pdev, 0);
+   printk(KERN_INFO NAME ": GPIO base 0x%x\n", base);
+
+   if (request_region(base, SCx200_GPIO_SIZE, "NatSemi SCx200 
GPIO") == 0) {
+   printk(KERN_ERR NAME ": can't allocate I/O for 
GPIOs\n");
+   return -EBUSY;
+   }
+
+   scx200_gpio_base = base;
+
+   /* read the current values driven on the GPIO signals */
+   for (bank = 0; bank < 2; ++bank)
+   scx200_gpio_shadow[bank] = inl(scx200_gpio_base + 0x10 
* bank);
+
+   } else {
+   /* find the base of the Configuration Block */
+   if (scx200_cb_probe(SCx200_CB_BASE_FIXED)) {
+   scx200_cb_base = SCx200_CB_BASE_FIXED;
+   } else {
+   pci_read_config_dword(pdev, SCx200_CBA_SCRATCH, &base);
+   if (scx200_cb_probe(base)) {
+   scx200_cb_base = base;
+   } else {
+   printk(KERN_WARNING NAME ": Configuration Block 
not found\n");
+   return -ENODEV;
+   }
+   }
+   printk(KERN_INFO NAME ": Configuration Block base 0x%x\n", 
scx200_cb_base);
}
 
-   scx200_gpio_base = base;
-
-   /* read the current values driven on the GPIO signals */
-   for (bank = 0; bank < 2; ++bank)
-   scx200_gpio_shadow[bank] = inl(scx200_gpio_base + 0x10 * bank);
-
return 0;
-
 }
 
 u32 scx200_gpio_configure(int index, u32 mask, u32 bits)
@@ -134,6 +158,7 @@ EXPORT_SYMBOL(scx200_gpio_shadow);
 EXPORT_SYMBOL(scx200_gpio_lock);
 EXPORT_SYMBOL(scx200_gpio_configure);
 EXPORT_SYMBOL(scx200_gpio_dump);
+EXPORT_SYMBOL(scx200_cb_base);
 
 /*
 Local variables:
diff -urp linux-2.6.11/drivers/char/watchdog/Kconfig 
linux-2.6.11-scx200/drivers/char/watchdog/Kconfig
--- linux-2.6.11/drivers/char/watchdog/Kconfig  2005-03-02 08:38:13.0 
+0100
+++ linux-2.6.11-scx200/drivers/char/watchdog/Kconfig   2005-03-02 
18:01:56.0 +0100
@@ -268,12 +268,12 @@ config SC1200_WDT
 
 config SCx200_WDT
tristate "National Semiconductor SCx200 Watchdog"
-   depends on WATCHDOG && X86 && PCI
+   depends on WATCHDOG && SCx200 && PCI
help
  Enable the built-in watchdog timer support on the National
  Semiconductor SCx200 processors.
 
- If compiled as a module, it will be called scx200_watchdog.
+ If compiled as a module, it will be called scx200_wdt.
 
 config 60XX_WDT
tristate "SBC-60XX Watchdog Timer"
diff -urp linux-2.6.11/drivers/char/watchdog/scx200_

Re: [WATCHDOG] correct sysfs name for watchdog devices

2005-02-28 Thread Henrik Brix Andersen
On Sun, 2005-02-27 at 21:39 +0100, Wim Van Sebroeck wrote:
>  drivers/char/watchdog/scx200_wdt.c  |2 +-

This particular change is also included in my scx200 patch:
http://dev.gentoo.org/~brix/files/net4801/linux-2.6.11-rc5-scx200.patch
   
>Signed-off-by: Olaf Hering <[EMAIL PROTECTED]>
>Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]>

Signed-off-by: Henrik Brix Andersen <[EMAIL PROTECTED]>

./Brix
-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gentoo Linux


signature.asc
Description: This is a digitally signed message part


Re: Support for GEODE CPU's in Kernel 2.6.10.

2005-02-28 Thread Henrik Brix Andersen
On Sun, 2005-02-27 at 23:11 +0100, Kianusch Sayah Karadji wrote:
> This is a small patch for GEODE CPU support in Kernel 2.6.10.

I would very much welcome the addition of MGEODE. The in-kernel SCx200
drivers could also benefit from this (they should depend on MGEODE).

Signed-off-by: Henrik Brix Andersen <[EMAIL PROTECTED]>

./Brix
-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gentoo Linux


signature.asc
Description: This is a digitally signed message part


Re: [2.6 patch] i386 scx200.c: misc cleanups

2005-02-25 Thread Henrik Brix Andersen
On Fri, 2005-02-25 at 00:37 +0100, Adrian Bunk wrote:
> The patch below contains the following cleanups:
> - make some needlessly global code static
> - #if 0 the following unused global functions:
>   - scx200_gpio_dump
> - remove the following unneeded EXPORT_SYMBOL's:
>   - scx200_gpio_lock
>   - scx200_gpio_dump
> 
> Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

I second those changes.

Signed-off-by: Henrik Brix Andersen <[EMAIL PROTECTED]>

./Brix
-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gentoo Linux


signature.asc
Description: This is a digitally signed message part


Re: [PATCH] Determine SCx200 CB address at run-time

2005-02-25 Thread Henrik Brix Andersen
On Thu, 2005-02-24 at 13:36 +0100, Henrik Brix Andersen wrote:
> I see that this didn't make it into linux-2.6.11-rc5. Please re-consider
> for -rc6 as the SCx200 drivers are useless on Soekris Engineering
> hardware without this patch.

An updated patch for 2.6.11-rc5 can be found at
http://dev.gentoo.org/~brix/files/net4801/linux-2.6.11-rc5-scx200.patch

Sincerely,
Brix
-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gentoo Linux

-
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/


Re: [PATCH] Determine SCx200 CB address at run-time

2005-02-24 Thread Henrik Brix Andersen
On Wed, 2005-02-23 at 13:53 +0100, Henrik Brix Andersen wrote:
> The current SCx200 drivers use a fixed base address of 0x9000 for the
> Configuration Block, but some systems (at least the Soekris net4801)
> uses a base address of 0x6000. This patch first tries the fixed address
> then - if no configuration block could be found - tries the address
> written to the Configuration Block Address Scratchpad register by the
> BIOS.
> 
> Signed-off-by: Henrik Brix Andersen <[EMAIL PROTECTED]>

I see that this didn't make it into linux-2.6.11-rc5. Please re-consider
for -rc6 as the SCx200 drivers are useless on Soekris Engineering
hardware without this patch.

Sincerely,
Brix
-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gentoo Linux


signature.asc
Description: This is a digitally signed message part


[PATCH] Determine SCx200 CB address at run-time

2005-02-23 Thread Henrik Brix Andersen
The current SCx200 drivers use a fixed base address of 0x9000 for the
Configuration Block, but some systems (at least the Soekris net4801)
uses a base address of 0x6000. This patch first tries the fixed address
then - if no configuration block could be found - tries the address
written to the Configuration Block Address Scratchpad register by the
BIOS.

Signed-off-by: Henrik Brix Andersen <[EMAIL PROTECTED]>
---

--- linux-2.6.11-rc4/arch/i386/kernel/scx200.c.orig 2005-02-22 
12:44:24.0 +0100
+++ linux-2.6.11-rc4/arch/i386/kernel/scx200.c  2005-02-23 11:48:39.0 
+0100
@@ -13,6 +13,9 @@
 
 #include 
 
+/* Verify that the configuration block really is there */
+#define scx200_cb_probe(base) (inw((base) + SCx200_CBA) == (base))
+
 #define NAME "scx200"
 
 MODULE_AUTHOR("Christer Weinigel <[EMAIL PROTECTED]>");
@@ -22,9 +25,13 @@ MODULE_LICENSE("GPL");
 unsigned scx200_gpio_base = 0;
 long scx200_gpio_shadow[2];
 
+unsigned scx200_cb_base = 0;
+
 static struct pci_device_id scx200_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_BRIDGE) },
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE) },
+   { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_XBUS)   },
+   { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_XBUS)   },
{ },
 };
 MODULE_DEVICE_TABLE(pci,scx200_tbl);
@@ -45,22 +52,39 @@ static int __devinit scx200_probe(struct
int bank;
unsigned base;
 
-   base = pci_resource_start(pdev, 0);
-   printk(KERN_INFO NAME ": GPIO base 0x%x\n", base);
-
-   if (request_region(base, SCx200_GPIO_SIZE, "NatSemi SCx200 GPIO") == 0) 
{
-   printk(KERN_ERR NAME ": can't allocate I/O for GPIOs\n");
-   return -EBUSY;
+   if (pdev->device == PCI_DEVICE_ID_NS_SCx200_BRIDGE ||
+   pdev->device == PCI_DEVICE_ID_NS_SC1100_BRIDGE) {
+   base = pci_resource_start(pdev, 0);
+   printk(KERN_INFO NAME ": GPIO base 0x%x\n", base);
+
+   if (request_region(base, SCx200_GPIO_SIZE, "NatSemi SCx200 
GPIO") == 0) {
+   printk(KERN_ERR NAME ": can't allocate I/O for 
GPIOs\n");
+   return -EBUSY;
+   }
+
+   scx200_gpio_base = base;
+
+   /* read the current values driven on the GPIO signals */
+   for (bank = 0; bank < 2; ++bank)
+   scx200_gpio_shadow[bank] = inl(scx200_gpio_base + 0x10 
* bank);
+
+   } else {
+   /* find the base of the Configuration Block */
+   if (scx200_cb_probe(SCx200_CB_BASE_FIXED)) {
+   scx200_cb_base = SCx200_CB_BASE_FIXED;
+   } else {
+   pci_read_config_dword(pdev, SCx200_CBA_SCRATCH, &base);
+   if (scx200_cb_probe(base)) {
+   scx200_cb_base = base;
+   } else {
+   printk(KERN_WARNING NAME ": Configuration Block 
not found\n");
+   return -ENODEV;
+   }
+   }
+   printk(KERN_INFO NAME ": Configuration Block base 0x%x\n", 
scx200_cb_base);
}
 
-   scx200_gpio_base = base;
-
-   /* read the current values driven on the GPIO signals */
-   for (bank = 0; bank < 2; ++bank)
-   scx200_gpio_shadow[bank] = inl(scx200_gpio_base + 0x10 * bank);
-
return 0;
-
 }
 
 u32 scx200_gpio_configure(int index, u32 mask, u32 bits)
@@ -134,6 +158,7 @@ EXPORT_SYMBOL(scx200_gpio_shadow);
 EXPORT_SYMBOL(scx200_gpio_lock);
 EXPORT_SYMBOL(scx200_gpio_configure);
 EXPORT_SYMBOL(scx200_gpio_dump);
+EXPORT_SYMBOL(scx200_cb_base);
 
 /*
 Local variables:
--- linux-2.6.11-rc4/drivers/mtd/maps/scx200_docflash.c.orig2005-02-22 
14:27:59.0 +0100
+++ linux-2.6.11-rc4/drivers/mtd/maps/scx200_docflash.c 2005-02-22 
16:12:00.0 +0100
@@ -92,17 +92,16 @@ static int __init init_scx200_docflash(v
  PCI_DEVICE_ID_NS_SCx200_BRIDGE,
  NULL)) == NULL)
return -ENODEV;
-   
-   if (!scx200_cb_probe(SCx200_CB_BASE)) {
-   printk(KERN_WARNING NAME ": no configuration block found\n");
+
+   /* check that we have found the configuration block */
+   if (!scx200_cb_present())
return -ENODEV;
-   }
 
if (probe) {
/* Try to use the present flash mapping if any */
pci_read_config_dword(bridge, SCx200_DOCCS_BASE, &base);
pci_read_config_dword(bridge, SCx200_DOCCS_CTRL, &ctrl);
-   pmr = inl(SCx200_CB_BASE + SCx200_PMR);
+   pmr = inl(scx200_cb_base 

Re: [ACPI] Call for help: list of machines with working S3

2005-02-15 Thread Henrik Brix Andersen
Hi,

On Mon, 2005-02-14 at 22:11 +0100, Pavel Machek wrote:
> Stefan provided me initial list of machines where S3 works (including
> video). If you have machine that is not on the list, please send me a
> diff. If you have eMachines... I'd like you to try playing with
> vbetool (it worked for me), and if it works for you supplying right
> model numbers.

I have S3 working with 2.6.11-rc4 here:

Model   hack (or "how to do it")
--
IBM TP X31 / Type 2672-XXH  LCD backlight must be turned off 
manually using radeontool [1]

Sincerely,
Brix

[1]: http://fdd.com/software/radeon/
-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gentoo Linux


signature.asc
Description: This is a digitally signed message part