superio/*/superio.c: Don't hide pointer types behind typedefs
Hiding pointer types behind 'typedef's is usually not a great idea at the best of times. Worse the typedef becomes an integer at different stages in Coreboot. Let us refrain from doing this at all. Change-Id: Ia2ca8c98bb489daaa58f379433875864f6efabc8 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/7136 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
85836c2215
commit
f21bdc3020
|
@ -26,7 +26,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "f71805f.h"
|
#include "f71805f.h"
|
||||||
|
|
||||||
static void f71805f_init(device_t dev)
|
static void f71805f_init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -54,7 +54,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, F71805F_PME, },
|
{ &ops, F71805F_PME, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "f71859.h"
|
#include "f71859.h"
|
||||||
|
|
||||||
static void f71859_init(device_t dev)
|
static void f71859_init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -49,7 +49,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, F71859_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
|
{ &ops, F71859_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include "f71863fg.h"
|
#include "f71863fg.h"
|
||||||
|
|
||||||
static void f71863fg_init(device_t dev)
|
static void f71863fg_init(struct device *dev)
|
||||||
{
|
{
|
||||||
struct resource *res0;
|
struct resource *res0;
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, F71863FG_PME, },
|
{ &ops, F71863FG_PME, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "f71869ad.h"
|
#include "f71869ad.h"
|
||||||
|
|
||||||
static void f71869ad_init(device_t dev)
|
static void f71869ad_init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -122,7 +122,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, F71869AD_PME, },
|
{ &ops, F71869AD_PME, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include "f71872.h"
|
#include "f71872.h"
|
||||||
|
|
||||||
static void f71872_init(device_t dev)
|
static void f71872_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -63,7 +63,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, F71872_PM, },
|
{ &ops, F71872_PM, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include "f71889.h"
|
#include "f71889.h"
|
||||||
|
|
||||||
static void f71889_init(device_t dev)
|
static void f71889_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -65,7 +65,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, F71889_VREF, },
|
{ &ops, F71889_VREF, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include "f81865f.h"
|
#include "f81865f.h"
|
||||||
|
|
||||||
static void f81865f_init(device_t dev)
|
static void f81865f_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -62,7 +62,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, F81865F_PME, },
|
{ &ops, F81865F_PME, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,19 +24,19 @@
|
||||||
#include "i3100.h"
|
#include "i3100.h"
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
|
||||||
static void pnp_enter_ext_func_mode(device_t dev)
|
static void pnp_enter_ext_func_mode(struct device *dev)
|
||||||
{
|
{
|
||||||
outb(0x80, dev->path.pnp.port);
|
outb(0x80, dev->path.pnp.port);
|
||||||
outb(0x86, dev->path.pnp.port);
|
outb(0x86, dev->path.pnp.port);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pnp_exit_ext_func_mode(device_t dev)
|
static void pnp_exit_ext_func_mode(struct device *dev)
|
||||||
{
|
{
|
||||||
outb(0x68, dev->path.pnp.port);
|
outb(0x68, dev->path.pnp.port);
|
||||||
outb(0x08, dev->path.pnp.port);
|
outb(0x08, dev->path.pnp.port);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void i3100_init(device_t dev)
|
static void i3100_init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
/* TODO: Add pnp_enter_ext_func_mode() etc. and wrap functions. */
|
/* TODO: Add pnp_enter_ext_func_mode() etc. and wrap functions. */
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "it8671f.h"
|
#include "it8671f.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "it8712f.h"
|
#include "it8712f.h"
|
||||||
|
|
||||||
static void pnp_enter_ext_func_mode(device_t dev)
|
static void pnp_enter_ext_func_mode(struct device *dev)
|
||||||
{
|
{
|
||||||
u16 port = dev->path.pnp.port;
|
u16 port = dev->path.pnp.port;
|
||||||
|
|
||||||
|
@ -36,12 +36,12 @@ static void pnp_enter_ext_func_mode(device_t dev)
|
||||||
outb((port == 0x4e) ? 0xaa : 0x55, port);
|
outb((port == 0x4e) ? 0xaa : 0x55, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pnp_exit_ext_func_mode(device_t dev)
|
static void pnp_exit_ext_func_mode(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_write_config(dev, 0x02, 0x02);
|
pnp_write_config(dev, 0x02, 0x02);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void it8712f_init(device_t dev)
|
static void it8712f_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "it8716f.h"
|
#include "it8716f.h"
|
||||||
|
|
||||||
static void pnp_enter_ext_func_mode(device_t dev)
|
static void pnp_enter_ext_func_mode(struct device *dev)
|
||||||
{
|
{
|
||||||
u16 port = dev->path.pnp.port;
|
u16 port = dev->path.pnp.port;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ static void pnp_enter_ext_func_mode(device_t dev)
|
||||||
outb((port == 0x4e) ? 0xaa : 0x55, port);
|
outb((port == 0x4e) ? 0xaa : 0x55, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pnp_exit_ext_func_mode(device_t dev)
|
static void pnp_exit_ext_func_mode(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_write_config(dev, 0x02, 0x02);
|
pnp_write_config(dev, 0x02, 0x02);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ static void init_ec(u16 base)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void it8716f_init(device_t dev)
|
static void it8716f_init(struct device *dev)
|
||||||
{
|
{
|
||||||
struct resource *res0;
|
struct resource *res0;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "it8718f.h"
|
#include "it8718f.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "it8721f.h"
|
#include "it8721f.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "it8728f.h"
|
#include "it8728f.h"
|
||||||
#include "it8728f_internal.h"
|
#include "it8728f_internal.h"
|
||||||
|
|
||||||
static void it8728f_init(device_t dev)
|
static void it8728f_init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -68,7 +68,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, IT8728F_IR, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
|
{ &ops, IT8728F_IR, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "chip.h" /* FIXME */
|
#include "chip.h" /* FIXME */
|
||||||
#include "it8772f.h"
|
#include "it8772f.h"
|
||||||
|
|
||||||
static void pnp_enter_ext_func_mode(device_t dev)
|
static void pnp_enter_ext_func_mode(struct device *dev)
|
||||||
{
|
{
|
||||||
u16 port = dev->path.pnp.port;
|
u16 port = dev->path.pnp.port;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ static void pnp_enter_ext_func_mode(device_t dev)
|
||||||
outb((port == 0x4e) ? 0xaa : 0x55, port);
|
outb((port == 0x4e) ? 0xaa : 0x55, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pnp_exit_ext_func_mode(device_t dev)
|
static void pnp_exit_ext_func_mode(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_write_config(dev, 0x02, 0x02);
|
pnp_write_config(dev, 0x02, 0x02);
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ static void it8772f_enable_fan(struct resource *res, int fan)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void it8772f_init(device_t dev)
|
static void it8772f_init(struct device *dev)
|
||||||
{
|
{
|
||||||
struct superio_ite_it8772f_config *conf = dev->chip_info;
|
struct superio_ite_it8772f_config *conf = dev->chip_info;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "pc8374.h"
|
#include "pc8374.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "pc87309.h"
|
#include "pc87309.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "pc87351.h"
|
#include "pc87351.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "pc87360.h"
|
#include "pc87360.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "pc87366.h"
|
#include "pc87366.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "pc87382.h"
|
#include "pc87382.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "pc87392.h"
|
#include "pc87392.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "pc87417.h"
|
#include "pc87417.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include "pc87427.h"
|
#include "pc87427.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include "pc97307.h"
|
#include "pc97307.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
u8 reg8;
|
u8 reg8;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include "pc97317.h"
|
#include "pc97317.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "nct5104d.h"
|
#include "nct5104d.h"
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
|
||||||
static void nct5104d_init(device_t dev)
|
static void nct5104d_init(struct device *dev)
|
||||||
{
|
{
|
||||||
struct superio_nuvoton_nct5104d_config *conf = dev->chip_info;
|
struct superio_nuvoton_nct5104d_config *conf = dev->chip_info;
|
||||||
u8 reg10, reg11, reg26;
|
u8 reg10, reg11, reg26;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "wpcm450.h"
|
#include "wpcm450.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
void m3885_configure_multikey(void);
|
void m3885_configure_multikey(void);
|
||||||
|
|
||||||
static void m3885x_init(device_t dev)
|
static void m3885x_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -41,12 +41,12 @@ static void m3885x_init(device_t dev)
|
||||||
m3885_configure_multikey();
|
m3885_configure_multikey();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void m3885x_read_resources(device_t dev)
|
static void m3885x_read_resources(struct device *dev)
|
||||||
{
|
{
|
||||||
/* Nothing, but this function avoids an error on serial console. */
|
/* Nothing, but this function avoids an error on serial console. */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void m3885x_enable_resources(device_t dev)
|
static void m3885x_enable_resources(struct device *dev)
|
||||||
{
|
{
|
||||||
/* Nothing, but this function avoids an error on serial console. */
|
/* Nothing, but this function avoids an error on serial console. */
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, 0, 0, { 0, 0 }, }
|
{ &ops, 0, 0, { 0, 0 }, }
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "fdc37m60x.h"
|
#include "fdc37m60x.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
#include "kbc1100.h"
|
#include "kbc1100.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
static void enable_dev(device_t dev);
|
static void enable_dev(struct device *dev);
|
||||||
static void kbc1100_init(device_t dev);
|
static void kbc1100_init(struct device *dev);
|
||||||
|
|
||||||
struct chip_operations superio_smsc_kbc1100_ops = {
|
struct chip_operations superio_smsc_kbc1100_ops = {
|
||||||
CHIP_NAME("SMSC KBC1100 Super I/O")
|
CHIP_NAME("SMSC KBC1100 Super I/O")
|
||||||
|
@ -52,12 +52,12 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, KBC1100_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, { 0x7ff, 0 }, { 0x7ff, 0x4}, },
|
{ &ops, KBC1100_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, { 0x7ff, 0 }, { 0x7ff, 0x4}, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void kbc1100_init(device_t dev)
|
static void kbc1100_init(struct device *dev)
|
||||||
{
|
{
|
||||||
struct resource *res0, *res1;
|
struct resource *res0, *res1;
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,9 @@
|
||||||
#include "lpc47b272.h"
|
#include "lpc47b272.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
static void enable_dev(device_t dev);
|
static void enable_dev(struct device *dev);
|
||||||
static void lpc47b272_init(device_t dev);
|
static void lpc47b272_init(struct device *dev);
|
||||||
// static void dump_pnp_device(device_t dev);
|
// static void dump_pnp_device(struct device *dev);
|
||||||
|
|
||||||
struct chip_operations superio_smsc_lpc47b272_ops = {
|
struct chip_operations superio_smsc_lpc47b272_ops = {
|
||||||
CHIP_NAME("SMSC LPC47B272 Super I/O")
|
CHIP_NAME("SMSC LPC47B272 Super I/O")
|
||||||
|
@ -68,7 +68,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
|
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
|
||||||
pnp_dev_info);
|
pnp_dev_info);
|
||||||
|
@ -82,7 +82,7 @@ static void enable_dev(device_t dev)
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
static void lpc47b272_init(device_t dev)
|
static void lpc47b272_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -103,7 +103,7 @@ static void lpc47b272_init(device_t dev)
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
static void dump_pnp_device(device_t dev)
|
static void dump_pnp_device(struct device *dev)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
print_debug("\n");
|
print_debug("\n");
|
||||||
|
|
|
@ -43,7 +43,7 @@ static u8 pnp_read_index(u16 port, u8 reg)
|
||||||
return inb(port + 1);
|
return inb(port + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void enable_hwm_smbus(device_t dev)
|
static void enable_hwm_smbus(struct device *dev)
|
||||||
{
|
{
|
||||||
/* Enable SensorBus register access. */
|
/* Enable SensorBus register access. */
|
||||||
u8 reg8;
|
u8 reg8;
|
||||||
|
@ -53,7 +53,7 @@ static void enable_hwm_smbus(device_t dev)
|
||||||
pnp_write_config(dev, 0xf0, reg8);
|
pnp_write_config(dev, 0xf0, reg8);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpc47b397_init(device_t dev)
|
static void lpc47b397_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -66,7 +66,7 @@ static void lpc47b397_init(device_t dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpc47b397_pnp_enable_resources(device_t dev)
|
static void lpc47b397_pnp_enable_resources(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ static struct device_operations ops = {
|
||||||
#define SB_DATA2 0x0e
|
#define SB_DATA2 0x0e
|
||||||
#define SB_DATA3 0x0f
|
#define SB_DATA3 0x0f
|
||||||
|
|
||||||
static int lsmbus_read_byte(device_t dev, u8 address)
|
static int lsmbus_read_byte(struct device *dev, u8 address)
|
||||||
{
|
{
|
||||||
unsigned int device;
|
unsigned int device;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
@ -117,7 +117,7 @@ static int lsmbus_read_byte(device_t dev, u8 address)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lsmbus_write_byte(device_t dev, u8 address, u8 val)
|
static int lsmbus_write_byte(struct device *dev, u8 address, u8 val)
|
||||||
{
|
{
|
||||||
unsigned int device;
|
unsigned int device;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
|
|
@ -34,9 +34,9 @@
|
||||||
#include "lpc47m10x.h"
|
#include "lpc47m10x.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
static void enable_dev(device_t dev);
|
static void enable_dev(struct device *dev);
|
||||||
static void lpc47m10x_init(device_t dev);
|
static void lpc47m10x_init(struct device *dev);
|
||||||
// static void dump_pnp_device(device_t dev);
|
// static void dump_pnp_device(struct device *dev);
|
||||||
|
|
||||||
struct chip_operations superio_smsc_lpc47m10x_ops = {
|
struct chip_operations superio_smsc_lpc47m10x_ops = {
|
||||||
CHIP_NAME("SMSC LPC47M10x Super I/O")
|
CHIP_NAME("SMSC LPC47M10x Super I/O")
|
||||||
|
@ -67,7 +67,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
|
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
|
||||||
pnp_dev_info);
|
pnp_dev_info);
|
||||||
|
@ -81,7 +81,7 @@ static void enable_dev(device_t dev)
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
static void lpc47m10x_init(device_t dev)
|
static void lpc47m10x_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -102,7 +102,7 @@ static void lpc47m10x_init(device_t dev)
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
static void dump_pnp_device(device_t dev)
|
static void dump_pnp_device(struct device *dev)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
print_debug("\n");
|
print_debug("\n");
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
#include "lpc47m15x.h"
|
#include "lpc47m15x.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
static void enable_dev(device_t dev);
|
static void enable_dev(struct device *dev);
|
||||||
static void lpc47m15x_init(device_t dev);
|
static void lpc47m15x_init(struct device *dev);
|
||||||
|
|
||||||
struct chip_operations superio_smsc_lpc47m15x_ops = {
|
struct chip_operations superio_smsc_lpc47m15x_ops = {
|
||||||
CHIP_NAME("SMSC LPC47M15x/192/997 Super I/O")
|
CHIP_NAME("SMSC LPC47M15x/192/997 Super I/O")
|
||||||
|
@ -56,13 +56,13 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, LPC47M15X_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, {0x07ff, 0}, {0x07ff, 4}, },
|
{ &ops, LPC47M15X_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, {0x07ff, 0}, {0x07ff, 4}, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &pnp_ops,
|
pnp_enable_devices(dev, &pnp_ops,
|
||||||
ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpc47m15x_init(device_t dev)
|
static void lpc47m15x_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -34,18 +34,18 @@
|
||||||
#include "lpc47n217.h"
|
#include "lpc47n217.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
static void enable_dev(device_t dev);
|
static void enable_dev(struct device *dev);
|
||||||
static void lpc47n217_pnp_set_resources(device_t dev);
|
static void lpc47n217_pnp_set_resources(struct device *dev);
|
||||||
static void lpc47n217_pnp_enable_resources(device_t dev);
|
static void lpc47n217_pnp_enable_resources(struct device *dev);
|
||||||
static void lpc47n217_pnp_enable(device_t dev);
|
static void lpc47n217_pnp_enable(struct device *dev);
|
||||||
static void lpc47n217_init(device_t dev);
|
static void lpc47n217_init(struct device *dev);
|
||||||
static void lpc47n217_pnp_set_resource(device_t dev, struct resource *resource);
|
static void lpc47n217_pnp_set_resource(struct device *dev, struct resource *resource);
|
||||||
static void lpc47n217_pnp_set_iobase(device_t dev, u16 iobase);
|
static void lpc47n217_pnp_set_iobase(struct device *dev, u16 iobase);
|
||||||
static void lpc47n217_pnp_set_drq(device_t dev, u8 drq);
|
static void lpc47n217_pnp_set_drq(struct device *dev, u8 drq);
|
||||||
static void lpc47n217_pnp_set_irq(device_t dev, u8 irq);
|
static void lpc47n217_pnp_set_irq(struct device *dev, u8 irq);
|
||||||
static void lpc47n217_pnp_set_enable(device_t dev, int enable);
|
static void lpc47n217_pnp_set_enable(struct device *dev, int enable);
|
||||||
static void pnp_enter_conf_state(device_t dev);
|
static void pnp_enter_conf_state(struct device *dev);
|
||||||
static void pnp_exit_conf_state(device_t dev);
|
static void pnp_exit_conf_state(struct device *dev);
|
||||||
|
|
||||||
struct chip_operations superio_smsc_lpc47n217_ops = {
|
struct chip_operations superio_smsc_lpc47n217_ops = {
|
||||||
CHIP_NAME("SMSC LPC47N217 Super I/O")
|
CHIP_NAME("SMSC LPC47N217 Super I/O")
|
||||||
|
@ -72,7 +72,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
|
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
|
||||||
pnp_dev_info);
|
pnp_dev_info);
|
||||||
|
@ -87,7 +87,7 @@ static void enable_dev(device_t dev)
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
static void lpc47n217_pnp_set_resources(device_t dev)
|
static void lpc47n217_pnp_set_resources(struct device *dev)
|
||||||
{
|
{
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ static void lpc47n217_pnp_set_resources(device_t dev)
|
||||||
* NOTE: Cannot use pnp_enable_resources() here because it assumes chip
|
* NOTE: Cannot use pnp_enable_resources() here because it assumes chip
|
||||||
* support for logical devices, which the LPC47N217 doesn't have.
|
* support for logical devices, which the LPC47N217 doesn't have.
|
||||||
*/
|
*/
|
||||||
static void lpc47n217_pnp_enable_resources(device_t dev)
|
static void lpc47n217_pnp_enable_resources(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
lpc47n217_pnp_set_enable(dev, 1);
|
lpc47n217_pnp_set_enable(dev, 1);
|
||||||
|
@ -113,7 +113,7 @@ static void lpc47n217_pnp_enable_resources(device_t dev)
|
||||||
* NOTE: Cannot use pnp_set_enable() here because it assumes chip
|
* NOTE: Cannot use pnp_set_enable() here because it assumes chip
|
||||||
* support for logical devices, which the LPC47N217 doesn't have.
|
* support for logical devices, which the LPC47N217 doesn't have.
|
||||||
*/
|
*/
|
||||||
static void lpc47n217_pnp_enable(device_t dev)
|
static void lpc47n217_pnp_enable(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
lpc47n217_pnp_set_enable(dev, !!dev->enabled);
|
lpc47n217_pnp_set_enable(dev, !!dev->enabled);
|
||||||
|
@ -128,13 +128,13 @@ static void lpc47n217_pnp_enable(device_t dev)
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
static void lpc47n217_init(device_t dev)
|
static void lpc47n217_init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpc47n217_pnp_set_resource(device_t dev, struct resource *resource)
|
static void lpc47n217_pnp_set_resource(struct device *dev, struct resource *resource)
|
||||||
{
|
{
|
||||||
if (!(resource->flags & IORESOURCE_ASSIGNED)) {
|
if (!(resource->flags & IORESOURCE_ASSIGNED)) {
|
||||||
printk(BIOS_ERR, "ERROR: %s %02lx not allocated\n",
|
printk(BIOS_ERR, "ERROR: %s %02lx not allocated\n",
|
||||||
|
@ -164,7 +164,7 @@ static void lpc47n217_pnp_set_resource(device_t dev, struct resource *resource)
|
||||||
report_resource_stored(dev, resource, "");
|
report_resource_stored(dev, resource, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpc47n217_pnp_set_iobase(device_t dev, u16 iobase)
|
static void lpc47n217_pnp_set_iobase(struct device *dev, u16 iobase)
|
||||||
{
|
{
|
||||||
ASSERT(!(iobase & 0x3));
|
ASSERT(!(iobase & 0x3));
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ static void lpc47n217_pnp_set_iobase(device_t dev, u16 iobase)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpc47n217_pnp_set_drq(device_t dev, u8 drq)
|
static void lpc47n217_pnp_set_drq(struct device *dev, u8 drq)
|
||||||
{
|
{
|
||||||
const u8 PP_DMA_MASK = 0x0F;
|
const u8 PP_DMA_MASK = 0x0F;
|
||||||
const u8 PP_DMA_SELECTION_REGISTER = 0x26;
|
const u8 PP_DMA_SELECTION_REGISTER = 0x26;
|
||||||
|
@ -201,7 +201,7 @@ static void lpc47n217_pnp_set_drq(device_t dev, u8 drq)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpc47n217_pnp_set_irq(device_t dev, u8 irq)
|
static void lpc47n217_pnp_set_irq(struct device *dev, u8 irq)
|
||||||
{
|
{
|
||||||
u8 irq_config_register = 0, irq_config_mask = 0;
|
u8 irq_config_register = 0, irq_config_mask = 0;
|
||||||
u8 current_config, new_config;
|
u8 current_config, new_config;
|
||||||
|
@ -232,7 +232,7 @@ static void lpc47n217_pnp_set_irq(device_t dev, u8 irq)
|
||||||
pnp_write_config(dev, irq_config_register, new_config);
|
pnp_write_config(dev, irq_config_register, new_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpc47n217_pnp_set_enable(device_t dev, int enable)
|
static void lpc47n217_pnp_set_enable(struct device *dev, int enable)
|
||||||
{
|
{
|
||||||
u8 power_register = 0, power_mask = 0, current_power, new_power;
|
u8 power_register = 0, power_mask = 0, current_power, new_power;
|
||||||
|
|
||||||
|
@ -267,12 +267,12 @@ static void lpc47n217_pnp_set_enable(device_t dev, int enable)
|
||||||
pnp_write_config(dev, power_register, new_power);
|
pnp_write_config(dev, power_register, new_power);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pnp_enter_conf_state(device_t dev)
|
static void pnp_enter_conf_state(struct device *dev)
|
||||||
{
|
{
|
||||||
outb(0x55, dev->path.pnp.port);
|
outb(0x55, dev->path.pnp.port);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pnp_exit_conf_state(device_t dev)
|
static void pnp_exit_conf_state(struct device *dev)
|
||||||
{
|
{
|
||||||
outb(0xaa, dev->path.pnp.port);
|
outb(0xaa, dev->path.pnp.port);
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,7 @@ static void pnp_exit_conf_state(device_t dev)
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
static void dump_pnp_device(device_t dev)
|
static void dump_pnp_device(struct device *dev)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
print_debug("\n");
|
print_debug("\n");
|
||||||
|
|
|
@ -32,18 +32,18 @@
|
||||||
#include "lpc47n227.h"
|
#include "lpc47n227.h"
|
||||||
|
|
||||||
/* Forward declarations. */
|
/* Forward declarations. */
|
||||||
static void enable_dev(device_t dev);
|
static void enable_dev(struct device *dev);
|
||||||
void lpc47n227_pnp_set_resources(device_t dev);
|
void lpc47n227_pnp_set_resources(struct device *dev);
|
||||||
void lpc47n227_pnp_enable_resources(device_t dev);
|
void lpc47n227_pnp_enable_resources(struct device *dev);
|
||||||
void lpc47n227_pnp_enable(device_t dev);
|
void lpc47n227_pnp_enable(struct device *dev);
|
||||||
static void lpc47n227_init(device_t dev);
|
static void lpc47n227_init(struct device *dev);
|
||||||
static void lpc47n227_pnp_set_resource(device_t dev, struct resource *resource);
|
static void lpc47n227_pnp_set_resource(struct device *dev, struct resource *resource);
|
||||||
void lpc47n227_pnp_set_iobase(device_t dev, u16 iobase);
|
void lpc47n227_pnp_set_iobase(struct device *dev, u16 iobase);
|
||||||
void lpc47n227_pnp_set_drq(device_t dev, u8 drq);
|
void lpc47n227_pnp_set_drq(struct device *dev, u8 drq);
|
||||||
void lpc47n227_pnp_set_irq(device_t dev, u8 irq);
|
void lpc47n227_pnp_set_irq(struct device *dev, u8 irq);
|
||||||
void lpc47n227_pnp_set_enable(device_t dev, int enable);
|
void lpc47n227_pnp_set_enable(struct device *dev, int enable);
|
||||||
static void pnp_enter_conf_state(device_t dev);
|
static void pnp_enter_conf_state(struct device *dev);
|
||||||
static void pnp_exit_conf_state(device_t dev);
|
static void pnp_exit_conf_state(struct device *dev);
|
||||||
|
|
||||||
struct chip_operations superio_smsc_lpc47n227_ops = {
|
struct chip_operations superio_smsc_lpc47n227_ops = {
|
||||||
CHIP_NAME("SMSC LPC47N227 Super I/O")
|
CHIP_NAME("SMSC LPC47N227 Super I/O")
|
||||||
|
@ -71,7 +71,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &pnp_ops,
|
pnp_enable_devices(dev, &pnp_ops,
|
||||||
ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
|
@ -86,7 +86,7 @@ static void enable_dev(device_t dev)
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
void lpc47n227_pnp_set_resources(device_t dev)
|
void lpc47n227_pnp_set_resources(struct device *dev)
|
||||||
{
|
{
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ void lpc47n227_pnp_set_resources(device_t dev)
|
||||||
* NOTE: Cannot use pnp_enable_resources() here because it assumes chip
|
* NOTE: Cannot use pnp_enable_resources() here because it assumes chip
|
||||||
* support for logical devices, which the LPC47N227 doesn't have.
|
* support for logical devices, which the LPC47N227 doesn't have.
|
||||||
*/
|
*/
|
||||||
void lpc47n227_pnp_enable_resources(device_t dev)
|
void lpc47n227_pnp_enable_resources(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
lpc47n227_pnp_set_enable(dev, 1);
|
lpc47n227_pnp_set_enable(dev, 1);
|
||||||
|
@ -111,7 +111,7 @@ void lpc47n227_pnp_enable_resources(device_t dev)
|
||||||
* NOTE: Cannot use pnp_set_enable() here because it assumes chip
|
* NOTE: Cannot use pnp_set_enable() here because it assumes chip
|
||||||
* support for logical devices, which the LPC47N227 doesn't have.
|
* support for logical devices, which the LPC47N227 doesn't have.
|
||||||
*/
|
*/
|
||||||
void lpc47n227_pnp_enable(device_t dev)
|
void lpc47n227_pnp_enable(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
lpc47n227_pnp_set_enable(dev, !!dev->enabled);
|
lpc47n227_pnp_set_enable(dev, !!dev->enabled);
|
||||||
|
@ -126,7 +126,7 @@ void lpc47n227_pnp_enable(device_t dev)
|
||||||
*
|
*
|
||||||
* @param dev Pointer to structure describing a Super I/O device.
|
* @param dev Pointer to structure describing a Super I/O device.
|
||||||
*/
|
*/
|
||||||
static void lpc47n227_init(device_t dev)
|
static void lpc47n227_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -140,7 +140,7 @@ static void lpc47n227_init(device_t dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpc47n227_pnp_set_resource(device_t dev, struct resource *resource)
|
static void lpc47n227_pnp_set_resource(struct device *dev, struct resource *resource)
|
||||||
{
|
{
|
||||||
if (!(resource->flags & IORESOURCE_ASSIGNED)) {
|
if (!(resource->flags & IORESOURCE_ASSIGNED)) {
|
||||||
printk(BIOS_ERR, "ERROR: %s %02lx not allocated\n",
|
printk(BIOS_ERR, "ERROR: %s %02lx not allocated\n",
|
||||||
|
@ -169,7 +169,7 @@ static void lpc47n227_pnp_set_resource(device_t dev, struct resource *resource)
|
||||||
report_resource_stored(dev, resource, "");
|
report_resource_stored(dev, resource, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47n227_pnp_set_iobase(device_t dev, u16 iobase)
|
void lpc47n227_pnp_set_iobase(struct device *dev, u16 iobase)
|
||||||
{
|
{
|
||||||
ASSERT(!(iobase & 0x3));
|
ASSERT(!(iobase & 0x3));
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ void lpc47n227_pnp_set_iobase(device_t dev, u16 iobase)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47n227_pnp_set_drq(device_t dev, u8 drq)
|
void lpc47n227_pnp_set_drq(struct device *dev, u8 drq)
|
||||||
{
|
{
|
||||||
const u8 PP_DMA_MASK = 0x0F;
|
const u8 PP_DMA_MASK = 0x0F;
|
||||||
const u8 PP_DMA_SELECTION_REGISTER = 0x26;
|
const u8 PP_DMA_SELECTION_REGISTER = 0x26;
|
||||||
|
@ -208,7 +208,7 @@ void lpc47n227_pnp_set_drq(device_t dev, u8 drq)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47n227_pnp_set_irq(device_t dev, u8 irq)
|
void lpc47n227_pnp_set_irq(struct device *dev, u8 irq)
|
||||||
{
|
{
|
||||||
u8 irq_config_register = 0, irq_config_mask = 0;
|
u8 irq_config_register = 0, irq_config_mask = 0;
|
||||||
u8 current_config, new_config;
|
u8 current_config, new_config;
|
||||||
|
@ -239,7 +239,7 @@ void lpc47n227_pnp_set_irq(device_t dev, u8 irq)
|
||||||
pnp_write_config(dev, irq_config_register, new_config);
|
pnp_write_config(dev, irq_config_register, new_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47n227_pnp_set_enable(device_t dev, int enable)
|
void lpc47n227_pnp_set_enable(struct device *dev, int enable)
|
||||||
{
|
{
|
||||||
u8 power_register = 0, power_mask = 0, current_power, new_power;
|
u8 power_register = 0, power_mask = 0, current_power, new_power;
|
||||||
|
|
||||||
|
@ -276,12 +276,12 @@ void lpc47n227_pnp_set_enable(device_t dev, int enable)
|
||||||
pnp_write_config(dev, power_register, new_power);
|
pnp_write_config(dev, power_register, new_power);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pnp_enter_conf_state(device_t dev)
|
static void pnp_enter_conf_state(struct device *dev)
|
||||||
{
|
{
|
||||||
outb(0x55, dev->path.pnp.port);
|
outb(0x55, dev->path.pnp.port);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pnp_exit_conf_state(device_t dev)
|
static void pnp_exit_conf_state(struct device *dev)
|
||||||
{
|
{
|
||||||
outb(0xaa, dev->path.pnp.port);
|
outb(0xaa, dev->path.pnp.port);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "mec1308.h"
|
#include "mec1308.h"
|
||||||
|
|
||||||
static void mec1308_init(device_t dev)
|
static void mec1308_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -62,7 +62,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, MEC1308_MBX, PNP_IO0, { 0x7ff, 0 } },
|
{ &ops, MEC1308_MBX, PNP_IO0, { 0x7ff, 0 } },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &pnp_ops,
|
pnp_enable_devices(dev, &pnp_ops,
|
||||||
ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include "sch4037.h"
|
#include "sch4037.h"
|
||||||
|
|
||||||
static void sch4037_init(device_t dev)
|
static void sch4037_init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled) {
|
if (!dev->enabled) {
|
||||||
return;
|
return;
|
||||||
|
@ -55,7 +55,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, SCH4037_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, { 0x7ff, 0 }, { 0x7ff, 0x4}, },
|
{ &ops, SCH4037_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, { 0x7ff, 0 }, { 0x7ff, 0x4}, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "sio1036.h"
|
#include "sio1036.h"
|
||||||
|
|
||||||
static void sio1036_init(device_t dev)
|
static void sio1036_init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled) {
|
if (!dev->enabled) {
|
||||||
return;
|
return;
|
||||||
|
@ -48,7 +48,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, SIO1036_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
|
{ &ops, SIO1036_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ static const struct logical_devices {
|
||||||
*
|
*
|
||||||
* @param dev The device to use.
|
* @param dev The device to use.
|
||||||
*/
|
*/
|
||||||
static void smsc_init(device_t dev)
|
static void smsc_init(struct device *dev)
|
||||||
{
|
{
|
||||||
int i, ld;
|
int i, ld;
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
*
|
*
|
||||||
* @param dev The device to use.
|
* @param dev The device to use.
|
||||||
*/
|
*/
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
int i, j, fn;
|
int i, j, fn;
|
||||||
int tmp[MAX_LOGICAL_DEVICES];
|
int tmp[MAX_LOGICAL_DEVICES];
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "w83627dhg.h"
|
#include "w83627dhg.h"
|
||||||
|
|
||||||
static void w83627dhg_enable_UR2(device_t dev)
|
static void w83627dhg_enable_UR2(struct device *dev)
|
||||||
{
|
{
|
||||||
u8 reg8;
|
u8 reg8;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ static void w83627dhg_enable_UR2(device_t dev)
|
||||||
pnp_exit_conf_mode(dev);
|
pnp_exit_conf_mode(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void w83627dhg_init(device_t dev)
|
static void w83627dhg_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
|
|
@ -44,7 +44,7 @@ static u8 pnp_read_index(u16 port, u8 reg)
|
||||||
return inb(port + 1);
|
return inb(port + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void enable_hwm_smbus(device_t dev)
|
static void enable_hwm_smbus(struct device *dev)
|
||||||
{
|
{
|
||||||
u8 reg8;
|
u8 reg8;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ static void enable_hwm_smbus(device_t dev)
|
||||||
pnp_write_config(dev, 0x2a, reg8);
|
pnp_write_config(dev, 0x2a, reg8);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init_acpi(device_t dev)
|
static void init_acpi(struct device *dev)
|
||||||
{
|
{
|
||||||
u8 value = 0x20; /* TODO: 0x20 value here never used? */
|
u8 value = 0x20; /* TODO: 0x20 value here never used? */
|
||||||
int power_on = 1;
|
int power_on = 1;
|
||||||
|
@ -92,7 +92,7 @@ static void init_hwm(u16 base)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void w83627ehg_init(device_t dev)
|
static void w83627ehg_init(struct device *dev)
|
||||||
{
|
{
|
||||||
struct resource *res0;
|
struct resource *res0;
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ static void w83627ehg_init(device_t dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void w83627ehg_pnp_enable_resources(device_t dev)
|
static void w83627ehg_pnp_enable_resources(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ static u8 pnp_read_index(u16 port, u8 reg)
|
||||||
return inb(port + 1);
|
return inb(port + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void enable_hwm_smbus(device_t dev)
|
static void enable_hwm_smbus(struct device *dev)
|
||||||
{
|
{
|
||||||
u8 reg8;
|
u8 reg8;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ static void enable_hwm_smbus(device_t dev)
|
||||||
pnp_write_config(dev, 0x2b, reg8);
|
pnp_write_config(dev, 0x2b, reg8);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init_acpi(device_t dev)
|
static void init_acpi(struct device *dev)
|
||||||
{
|
{
|
||||||
u8 value = 0x20; /* FIXME: The 0x20 value here is never used? */
|
u8 value = 0x20; /* FIXME: The 0x20 value here is never used? */
|
||||||
int power_on = 1;
|
int power_on = 1;
|
||||||
|
@ -99,7 +99,7 @@ static void init_hwm(u16 base)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void w83627hf_init(device_t dev)
|
static void w83627hf_init(struct device *dev)
|
||||||
{
|
{
|
||||||
struct resource *res0;
|
struct resource *res0;
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ static void w83627hf_init(device_t dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void w83627hf_pnp_enable_resources(device_t dev)
|
static void w83627hf_pnp_enable_resources(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include "w83627thg.h"
|
#include "w83627thg.h"
|
||||||
|
|
||||||
static void w83627thg_init(device_t dev)
|
static void w83627thg_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -64,7 +64,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, W83627THG_HWM, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
|
{ &ops, W83627THG_HWM, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
* Warning: The kernel will need to be adjusted since it assumes
|
* Warning: The kernel will need to be adjusted since it assumes
|
||||||
* a 1.8462 MHz clock.
|
* a 1.8462 MHz clock.
|
||||||
*/
|
*/
|
||||||
static void set_uart_clock_source(device_t dev, u8 uart_clock)
|
static void set_uart_clock_source(struct device *dev, u8 uart_clock)
|
||||||
{
|
{
|
||||||
u8 value;
|
u8 value;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ static void set_uart_clock_source(device_t dev, u8 uart_clock)
|
||||||
pnp_exit_conf_mode(dev);
|
pnp_exit_conf_mode(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void w83627uhg_init(device_t dev)
|
static void w83627uhg_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -115,7 +115,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, W83627UHG_SP6, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
|
{ &ops, W83627UHG_SP6, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ static void hwmon_set_fan_divisor(unsigned int base, int num, unsigned int divis
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void w83697hf_init(device_t dev)
|
static void w83697hf_init(struct device *dev)
|
||||||
{
|
{
|
||||||
struct resource *res0;
|
struct resource *res0;
|
||||||
struct superio_winbond_w83697hf_config *cfg;
|
struct superio_winbond_w83697hf_config *cfg;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "w83977f.h"
|
#include "w83977f.h"
|
||||||
|
|
||||||
static void w83977f_init(device_t dev)
|
static void w83977f_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -62,7 +62,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, W83977F_GPIO2, PNP_IO0, {0x07f8, 0}, },
|
{ &ops, W83977F_GPIO2, PNP_IO0, {0x07f8, 0}, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "w83977tf.h"
|
#include "w83977tf.h"
|
||||||
|
|
||||||
static void w83977tf_init(device_t dev)
|
static void w83977tf_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
|
@ -63,7 +63,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, W83977TF_ACPI, PNP_IRQ0, },
|
{ &ops, W83977TF_ACPI, PNP_IRQ0, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue