Re: [patch 03/15] PNP: define PNP-specific IORESOURCE_IO_* flags alongside IRQ, DMA, MEM

Previous thread: [patch 04/15] PNP: make resource option structures private to PNP subsystem by Bjorn Helgaas on Friday, May 30, 2008 - 3:48 pm. (2 messages)

Next thread: [patch 05/15] PNP: introduce pnp_irq_mask_t typedef by Bjorn Helgaas on Friday, May 30, 2008 - 3:48 pm. (2 messages)
From: Bjorn Helgaas
Date: Friday, May 30, 2008 - 3:48 pm

PNP previously defined PNP_PORT_FLAG_16BITADDR and PNP_PORT_FLAG_FIXED
in a private header file, but put those flags in struct resource.flags
fields.  Better to make them IORESOURCE_IO_* flags like the existing
IRQ, DMA, and MEM flags.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

---
 include/linux/ioport.h         |   10 +++++++---
 include/linux/pnp.h            |    3 ---
 drivers/pnp/interface.c        |    2 +-
 drivers/pnp/isapnp/core.c      |    4 ++--
 drivers/pnp/pnpacpi/rsparser.c |   10 +++++-----
 drivers/pnp/pnpbios/rsparser.c |    4 ++--
 6 files changed, 17 insertions(+), 16 deletions(-)

Index: work10/include/linux/ioport.h
===================================================================
--- work10.orig/include/linux/ioport.h	2008-05-27 15:36:38.000000000 -0600
+++ work10/include/linux/ioport.h	2008-05-30 13:20:16.000000000 -0600
@@ -76,7 +76,7 @@ struct resource_list {
 #define IORESOURCE_DMA_TYPEB		(2<<6)
 #define IORESOURCE_DMA_TYPEF		(3<<6)
 
-/* ISA PnP memory I/O specific bits (IORESOURCE_BITS) */
+/* ISA PnP memory specific bits (IORESOURCE_BITS) */
 #define IORESOURCE_MEM_WRITEABLE	(1<<0)	/* dup: IORESOURCE_READONLY */
 #define IORESOURCE_MEM_CACHEABLE	(1<<1)	/* dup: IORESOURCE_CACHEABLE */
 #define IORESOURCE_MEM_RANGELENGTH	(1<<2)	/* dup: IORESOURCE_RANGELENGTH */
@@ -88,6 +88,10 @@ struct resource_list {
 #define IORESOURCE_MEM_SHADOWABLE	(1<<5)	/* dup: IORESOURCE_SHADOWABLE */
 #define IORESOURCE_MEM_EXPANSIONROM	(1<<6)
 
+/* ISA PnP I/O specific bits (IORESOURCE_BITS) */
+#define IORESOURCE_IO_16BIT_ADDR	(1<<0)
+#define IORESOURCE_IO_FIXED		(1<<1)
+
 /* PCI ROM control bits (IORESOURCE_BITS) */
 #define IORESOURCE_ROM_ENABLE		(1<<0)	/* ROM is enabled, same as PCI_ROM_ADDRESS_ENABLE */
 #define IORESOURCE_ROM_SHADOW		(1<<1)	/* ROM is copy at C000:0 */
Index: work10/include/linux/pnp.h
===================================================================
--- work10.orig/include/linux/pnp.h	2008-05-27 15:36:38.000000000 -0600
+++ ...
From: Rene Herman
Date: Sunday, June 1, 2008 - 2:03 pm

Acked-by: Rene Herman <rene.herman@gmail.com>

Wondered a bit since only PnPACPI seems to directly encode those flags 
to a res->flags (as opposed to a port->flags) but pnp_assign_port() 
copies them over verbatim indeed...

Rene.
--

Previous thread: [patch 04/15] PNP: make resource option structures private to PNP subsystem by Bjorn Helgaas on Friday, May 30, 2008 - 3:48 pm. (2 messages)

Next thread: [patch 05/15] PNP: introduce pnp_irq_mask_t typedef by Bjorn Helgaas on Friday, May 30, 2008 - 3:48 pm. (2 messages)