diff options
-rw-r--r-- | drivers/pnp/interface.c | 2 | ||||
-rw-r--r-- | drivers/pnp/isapnp/core.c | 4 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 10 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/rsparser.c | 4 | ||||
-rw-r--r-- | include/linux/ioport.h | 4 | ||||
-rw-r--r-- | include/linux/pnp.h | 3 |
6 files changed, 14 insertions, 13 deletions
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c index 239923a300cd..c172b6de6b71 100644 --- a/drivers/pnp/interface.c +++ b/drivers/pnp/interface.c | |||
@@ -57,7 +57,7 @@ static void pnp_print_port(pnp_info_buffer_t * buffer, char *space, | |||
57 | "%sport 0x%x-0x%x, align 0x%x, size 0x%x, %i-bit address decoding\n", | 57 | "%sport 0x%x-0x%x, align 0x%x, size 0x%x, %i-bit address decoding\n", |
58 | space, port->min, port->max, | 58 | space, port->min, port->max, |
59 | port->align ? (port->align - 1) : 0, port->size, | 59 | port->align ? (port->align - 1) : 0, port->size, |
60 | port->flags & PNP_PORT_FLAG_16BITADDR ? 16 : 10); | 60 | port->flags & IORESOURCE_IO_16BIT_ADDR ? 16 : 10); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void pnp_print_irq(pnp_info_buffer_t * buffer, char *space, | 63 | static void pnp_print_irq(pnp_info_buffer_t * buffer, char *space, |
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index ca4457ec403b..c5b92526963b 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c | |||
@@ -486,7 +486,7 @@ static void __init isapnp_parse_port_resource(struct pnp_dev *dev, | |||
486 | port->max = (tmp[4] << 8) | tmp[3]; | 486 | port->max = (tmp[4] << 8) | tmp[3]; |
487 | port->align = tmp[5]; | 487 | port->align = tmp[5]; |
488 | port->size = tmp[6]; | 488 | port->size = tmp[6]; |
489 | port->flags = tmp[0] ? PNP_PORT_FLAG_16BITADDR : 0; | 489 | port->flags = tmp[0] ? IORESOURCE_IO_16BIT_ADDR : 0; |
490 | pnp_register_port_resource(dev, option, port); | 490 | pnp_register_port_resource(dev, option, port); |
491 | } | 491 | } |
492 | 492 | ||
@@ -507,7 +507,7 @@ static void __init isapnp_parse_fixed_port_resource(struct pnp_dev *dev, | |||
507 | port->min = port->max = (tmp[1] << 8) | tmp[0]; | 507 | port->min = port->max = (tmp[1] << 8) | tmp[0]; |
508 | port->size = tmp[2]; | 508 | port->size = tmp[2]; |
509 | port->align = 0; | 509 | port->align = 0; |
510 | port->flags = PNP_PORT_FLAG_FIXED; | 510 | port->flags = IORESOURCE_IO_FIXED; |
511 | pnp_register_port_resource(dev, option, port); | 511 | pnp_register_port_resource(dev, option, port); |
512 | } | 512 | } |
513 | 513 | ||
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 595252b65205..46069e64a6b2 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -180,7 +180,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_dev *dev, u64 start, | |||
180 | u64 end = start + len - 1; | 180 | u64 end = start + len - 1; |
181 | 181 | ||
182 | if (io_decode == ACPI_DECODE_16) | 182 | if (io_decode == ACPI_DECODE_16) |
183 | flags |= PNP_PORT_FLAG_16BITADDR; | 183 | flags |= IORESOURCE_IO_16BIT_ADDR; |
184 | if (len == 0 || end >= 0x10003) | 184 | if (len == 0 || end >= 0x10003) |
185 | flags |= IORESOURCE_DISABLED; | 185 | flags |= IORESOURCE_DISABLED; |
186 | 186 | ||
@@ -485,7 +485,7 @@ static __init void pnpacpi_parse_port_option(struct pnp_dev *dev, | |||
485 | port->align = io->alignment; | 485 | port->align = io->alignment; |
486 | port->size = io->address_length; | 486 | port->size = io->address_length; |
487 | port->flags = ACPI_DECODE_16 == io->io_decode ? | 487 | port->flags = ACPI_DECODE_16 == io->io_decode ? |
488 | PNP_PORT_FLAG_16BITADDR : 0; | 488 | IORESOURCE_IO_16BIT_ADDR : 0; |
489 | pnp_register_port_resource(dev, option, port); | 489 | pnp_register_port_resource(dev, option, port); |
490 | } | 490 | } |
491 | 491 | ||
@@ -503,7 +503,7 @@ static __init void pnpacpi_parse_fixed_port_option(struct pnp_dev *dev, | |||
503 | port->min = port->max = io->address; | 503 | port->min = port->max = io->address; |
504 | port->size = io->address_length; | 504 | port->size = io->address_length; |
505 | port->align = 0; | 505 | port->align = 0; |
506 | port->flags = PNP_PORT_FLAG_FIXED; | 506 | port->flags = IORESOURCE_IO_FIXED; |
507 | pnp_register_port_resource(dev, option, port); | 507 | pnp_register_port_resource(dev, option, port); |
508 | } | 508 | } |
509 | 509 | ||
@@ -609,7 +609,7 @@ static __init void pnpacpi_parse_address_option(struct pnp_dev *dev, | |||
609 | port->min = port->max = p->minimum; | 609 | port->min = port->max = p->minimum; |
610 | port->size = p->address_length; | 610 | port->size = p->address_length; |
611 | port->align = 0; | 611 | port->align = 0; |
612 | port->flags = PNP_PORT_FLAG_FIXED; | 612 | port->flags = IORESOURCE_IO_FIXED; |
613 | pnp_register_port_resource(dev, option, port); | 613 | pnp_register_port_resource(dev, option, port); |
614 | } | 614 | } |
615 | } | 615 | } |
@@ -946,7 +946,7 @@ static void pnpacpi_encode_io(struct pnp_dev *dev, | |||
946 | 946 | ||
947 | if (pnp_resource_enabled(p)) { | 947 | if (pnp_resource_enabled(p)) { |
948 | /* Note: pnp_assign_port copies pnp_port->flags into p->flags */ | 948 | /* Note: pnp_assign_port copies pnp_port->flags into p->flags */ |
949 | io->io_decode = (p->flags & PNP_PORT_FLAG_16BITADDR) ? | 949 | io->io_decode = (p->flags & IORESOURCE_IO_16BIT_ADDR) ? |
950 | ACPI_DECODE_16 : ACPI_DECODE_10; | 950 | ACPI_DECODE_16 : ACPI_DECODE_10; |
951 | io->minimum = p->start; | 951 | io->minimum = p->start; |
952 | io->maximum = p->end; | 952 | io->maximum = p->end; |
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c index 01f0c3dd1b08..489fec3b7974 100644 --- a/drivers/pnp/pnpbios/rsparser.c +++ b/drivers/pnp/pnpbios/rsparser.c | |||
@@ -310,7 +310,7 @@ static __init void pnpbios_parse_port_option(struct pnp_dev *dev, | |||
310 | port->max = (p[5] << 8) | p[4]; | 310 | port->max = (p[5] << 8) | p[4]; |
311 | port->align = p[6]; | 311 | port->align = p[6]; |
312 | port->size = p[7]; | 312 | port->size = p[7]; |
313 | port->flags = p[1] ? PNP_PORT_FLAG_16BITADDR : 0; | 313 | port->flags = p[1] ? IORESOURCE_IO_16BIT_ADDR : 0; |
314 | pnp_register_port_resource(dev, option, port); | 314 | pnp_register_port_resource(dev, option, port); |
315 | } | 315 | } |
316 | 316 | ||
@@ -326,7 +326,7 @@ static __init void pnpbios_parse_fixed_port_option(struct pnp_dev *dev, | |||
326 | port->min = port->max = (p[2] << 8) | p[1]; | 326 | port->min = port->max = (p[2] << 8) | p[1]; |
327 | port->size = p[3]; | 327 | port->size = p[3]; |
328 | port->align = 0; | 328 | port->align = 0; |
329 | port->flags = PNP_PORT_FLAG_FIXED; | 329 | port->flags = IORESOURCE_IO_FIXED; |
330 | pnp_register_port_resource(dev, option, port); | 330 | pnp_register_port_resource(dev, option, port); |
331 | } | 331 | } |
332 | 332 | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index c6801bffe76d..39db059ffb8b 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -88,6 +88,10 @@ struct resource_list { | |||
88 | #define IORESOURCE_MEM_SHADOWABLE (1<<5) /* dup: IORESOURCE_SHADOWABLE */ | 88 | #define IORESOURCE_MEM_SHADOWABLE (1<<5) /* dup: IORESOURCE_SHADOWABLE */ |
89 | #define IORESOURCE_MEM_EXPANSIONROM (1<<6) | 89 | #define IORESOURCE_MEM_EXPANSIONROM (1<<6) |
90 | 90 | ||
91 | /* PnP I/O specific bits (IORESOURCE_BITS) */ | ||
92 | #define IORESOURCE_IO_16BIT_ADDR (1<<0) | ||
93 | #define IORESOURCE_IO_FIXED (1<<1) | ||
94 | |||
91 | /* PCI ROM control bits (IORESOURCE_BITS) */ | 95 | /* PCI ROM control bits (IORESOURCE_BITS) */ |
92 | #define IORESOURCE_ROM_ENABLE (1<<0) /* ROM is enabled, same as PCI_ROM_ADDRESS_ENABLE */ | 96 | #define IORESOURCE_ROM_ENABLE (1<<0) /* ROM is enabled, same as PCI_ROM_ADDRESS_ENABLE */ |
93 | #define IORESOURCE_ROM_SHADOW (1<<1) /* ROM is copy at C000:0 */ | 97 | #define IORESOURCE_ROM_SHADOW (1<<1) /* ROM is copy at C000:0 */ |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index e033e1b14c27..e1454dabde10 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -182,9 +182,6 @@ static inline int pnp_dma_valid(struct pnp_dev *dev, unsigned int bar) | |||
182 | } | 182 | } |
183 | 183 | ||
184 | 184 | ||
185 | #define PNP_PORT_FLAG_16BITADDR (1<<0) | ||
186 | #define PNP_PORT_FLAG_FIXED (1<<1) | ||
187 | |||
188 | struct pnp_port { | 185 | struct pnp_port { |
189 | unsigned short min; /* min base number */ | 186 | unsigned short min; /* min base number */ |
190 | unsigned short max; /* max base number */ | 187 | unsigned short max; /* max base number */ |