From: Don Zickus <dzickus@xxxxxxxxxx> This header is needed by other drivers and should be in a global namespace. In addition, functionally it is part of visorbus, so roll the contents into that header file. Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx> Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx> --- drivers/staging/unisys/visorbus/visorbus.h | 50 +++++++++++++- drivers/staging/unisys/visorbus/visorbus_private.h | 2 +- drivers/staging/unisys/visorbus/visorchannel.h | 76 ---------------------- .../staging/unisys/visorbus/visorchannel_funcs.c | 2 +- drivers/staging/unisys/visorchipset/file.c | 2 +- .../unisys/visorchipset/visorchipset_main.c | 2 +- 6 files changed, 53 insertions(+), 81 deletions(-) delete mode 100644 drivers/staging/unisys/visorbus/visorchannel.h diff --git a/drivers/staging/unisys/visorbus/visorbus.h b/drivers/staging/unisys/visorbus/visorbus.h index 856fa3f..3956a3d 100644 --- a/drivers/staging/unisys/visorbus/visorbus.h +++ b/drivers/staging/unisys/visorbus/visorbus.h @@ -35,8 +35,12 @@ #include <linux/uuid.h> #include "periodic_work.h" -#include "visorchannel.h" #include "channel.h" +#include "memregion.h" + +#ifndef HOSTADDRESS +#define HOSTADDRESS u64 +#endif struct visor_driver; struct visor_device; @@ -163,4 +167,48 @@ void visorbus_enable_channel_interrupts(struct visor_device *dev); void visorbus_disable_channel_interrupts(struct visor_device *dev); #endif +/* Note that for visorchannel_create() and visorchannel_create_overlapped(), + * <channel_bytes> and <guid> arguments may be 0 if we are a channel CLIENT. + * In this case, the values can simply be read from the channel header. + */ +struct visorchannel *visorchannel_create(HOSTADDRESS physaddr, + ulong channel_bytes, uuid_le guid); +struct visorchannel *visorchannel_create_overlapped(ulong channel_bytes, + struct visorchannel *parent, + ulong off, uuid_le guid); +struct visorchannel *visorchannel_create_with_lock(HOSTADDRESS physaddr, + ulong channel_bytes, + uuid_le guid); +struct visorchannel *visorchannel_create_overlapped_with_lock( + ulong channel_bytes, + struct visorchannel *parent, + ulong off, uuid_le guid); +void visorchannel_destroy(struct visorchannel *channel); +int visorchannel_read(struct visorchannel *channel, ulong offset, + void *local, ulong nbytes); +int visorchannel_write(struct visorchannel *channel, ulong offset, + void *local, ulong nbytes); +int visorchannel_clear(struct visorchannel *channel, ulong offset, + u8 ch, ulong nbytes); +BOOL visorchannel_signalremove(struct visorchannel *channel, u32 queue, + void *msg); +BOOL visorchannel_signalinsert(struct visorchannel *channel, u32 queue, + void *msg); +int visorchannel_signalqueue_slots_avail(struct visorchannel *channel, + u32 queue); +int visorchannel_signalqueue_max_slots(struct visorchannel *channel, u32 queue); +HOSTADDRESS visorchannel_get_physaddr(struct visorchannel *channel); +ulong visorchannel_get_nbytes(struct visorchannel *channel); +char *visorchannel_id(struct visorchannel *channel, char *s); +char *visorchannel_zoneid(struct visorchannel *channel, char *s); +u64 visorchannel_get_clientpartition(struct visorchannel *channel); +uuid_le visorchannel_get_uuid(struct visorchannel *channel); +struct memregion *visorchannel_get_memregion(struct visorchannel *channel); +char *visorchannel_uuid_id(uuid_le *guid, char *s); +void visorchannel_debug(struct visorchannel *channel, int num_queues, + struct seq_file *seq, u32 off); +void visorchannel_dump_section(struct visorchannel *chan, char *s, + int off, int len, struct seq_file *seq); +void __iomem *visorchannel_get_header(struct visorchannel *channel); + #endif diff --git a/drivers/staging/unisys/visorbus/visorbus_private.h b/drivers/staging/unisys/visorbus/visorbus_private.h index 2b61312..47ab488 100644 --- a/drivers/staging/unisys/visorbus/visorbus_private.h +++ b/drivers/staging/unisys/visorbus/visorbus_private.h @@ -21,7 +21,7 @@ #include "timskmod.h" #include "visorbus.h" #include "visorchipset.h" -#include "visorchannel.h" +#include "visorbus.h" #include "version.h" #include "vbuschannel.h" diff --git a/drivers/staging/unisys/visorbus/visorchannel.h b/drivers/staging/unisys/visorbus/visorchannel.h deleted file mode 100644 index 63f1b97..0000000 --- a/drivers/staging/unisys/visorbus/visorchannel.h +++ /dev/null @@ -1,76 +0,0 @@ -/* visorchannel.h - * - * Copyright (C) 2010 - 2013 UNISYS CORPORATION - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or - * NON INFRINGEMENT. See the GNU General Public License for more - * details. - */ - -#ifndef __VISORCHANNEL_H__ -#define __VISORCHANNEL_H__ - -#include <linux/uuid.h> - -#include "memregion.h" -#include "channel.h" -#ifndef HOSTADDRESS -#define HOSTADDRESS u64 -#endif -#ifndef BOOL -#define BOOL int -#endif - -/* Note that for visorchannel_create() and visorchannel_create_overlapped(), - * <channel_bytes> and <guid> arguments may be 0 if we are a channel CLIENT. - * In this case, the values can simply be read from the channel header. - */ -struct visorchannel *visorchannel_create(HOSTADDRESS physaddr, - ulong channel_bytes, uuid_le guid); -struct visorchannel *visorchannel_create_overlapped(ulong channel_bytes, - struct visorchannel *parent, - ulong off, uuid_le guid); -struct visorchannel *visorchannel_create_with_lock(HOSTADDRESS physaddr, - ulong channel_bytes, - uuid_le guid); -struct visorchannel *visorchannel_create_overlapped_with_lock( - ulong channel_bytes, - struct visorchannel *parent, - ulong off, uuid_le guid); -void visorchannel_destroy(struct visorchannel *channel); -int visorchannel_read(struct visorchannel *channel, ulong offset, - void *local, ulong nbytes); -int visorchannel_write(struct visorchannel *channel, ulong offset, - void *local, ulong nbytes); -int visorchannel_clear(struct visorchannel *channel, ulong offset, - u8 ch, ulong nbytes); -BOOL visorchannel_signalremove(struct visorchannel *channel, u32 queue, - void *msg); -BOOL visorchannel_signalinsert(struct visorchannel *channel, u32 queue, - void *msg); -int visorchannel_signalqueue_slots_avail(struct visorchannel *channel, - u32 queue); -int visorchannel_signalqueue_max_slots(struct visorchannel *channel, u32 queue); -HOSTADDRESS visorchannel_get_physaddr(struct visorchannel *channel); -ulong visorchannel_get_nbytes(struct visorchannel *channel); -char *visorchannel_id(struct visorchannel *channel, char *s); -char *visorchannel_zoneid(struct visorchannel *channel, char *s); -u64 visorchannel_get_clientpartition(struct visorchannel *channel); -uuid_le visorchannel_get_uuid(struct visorchannel *channel); -struct memregion *visorchannel_get_memregion(struct visorchannel *channel); -char *visorchannel_uuid_id(uuid_le *guid, char *s); -void visorchannel_debug(struct visorchannel *channel, int num_queues, - struct seq_file *seq, u32 off); -void visorchannel_dump_section(struct visorchannel *chan, char *s, - int off, int len, struct seq_file *seq); -void __iomem *visorchannel_get_header(struct visorchannel *channel); - -#endif diff --git a/drivers/staging/unisys/visorbus/visorchannel_funcs.c b/drivers/staging/unisys/visorbus/visorchannel_funcs.c index 9ae5f75..b61f954 100644 --- a/drivers/staging/unisys/visorbus/visorchannel_funcs.c +++ b/drivers/staging/unisys/visorbus/visorchannel_funcs.c @@ -23,7 +23,7 @@ */ #include "globals.h" -#include "visorchannel.h" +#include "visorbus.h" #include <linux/uuid.h> #define MYDRVNAME "visorchannel" diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c index a17027c..9822e9d 100644 --- a/drivers/staging/unisys/visorchipset/file.c +++ b/drivers/staging/unisys/visorchipset/file.c @@ -24,7 +24,7 @@ #include "version.h" #include "visorchipset.h" #include "visorchipset_umode.h" -#include "visorchannel.h" +#include "visorbus.h" #include "uisutils.h" #include "file.h" diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 5ea6f9e..a8448c2 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -18,7 +18,7 @@ #include "version.h" #include "visorchipset.h" #include "procobjecttree.h" -#include "visorchannel.h" +#include "visorbus.h" #include "periodic_work.h" #include "file.h" #include "parser.h" -- 2.1.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel