aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2018-01-13 17:37:13 -0500
committerGeert Uytterhoeven <geert@linux-m68k.org>2018-01-16 10:47:29 -0500
commit1ff2775a32ef105d9bdbb5f00f20293244a2accc (patch)
treed67e5a3ad48f033e7237f4e881d309d383146ed8
parent2f828fb21df42058084b16d5e07cecdc30dbc3a5 (diff)
nubus: Fix up header split
Due to the '#ifdef __KERNEL__' being located in the wrong place, some definitions from the kernel API were placed in the UAPI header during the scripted header split. Fix this. Also, remove the duplicate comment which is only relevant to the UAPI header. Fixes: 607ca46e97a1 ("UAPI: (Scripted) Disintegrate include/linux") Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
-rw-r--r--include/linux/nubus.h27
-rw-r--r--include/uapi/linux/nubus.h23
2 files changed, 23 insertions, 27 deletions
diff --git a/include/linux/nubus.h b/include/linux/nubus.h
index d8d63370a28c..55b9a4569a69 100644
--- a/include/linux/nubus.h
+++ b/include/linux/nubus.h
@@ -5,16 +5,28 @@
5 Originally written by Alan Cox. 5 Originally written by Alan Cox.
6 6
7 Hacked to death by C. Scott Ananian and David Huggins-Daines. 7 Hacked to death by C. Scott Ananian and David Huggins-Daines.
8 8*/
9 Some of the constants in here are from the corresponding 9
10 NetBSD/OpenBSD header file, by Allen Briggs. We figured out the
11 rest of them on our own. */
12#ifndef LINUX_NUBUS_H 10#ifndef LINUX_NUBUS_H
13#define LINUX_NUBUS_H 11#define LINUX_NUBUS_H
14 12
15#include <asm/nubus.h> 13#include <asm/nubus.h>
16#include <uapi/linux/nubus.h> 14#include <uapi/linux/nubus.h>
17 15
16struct nubus_dir {
17 unsigned char *base;
18 unsigned char *ptr;
19 int done;
20 int mask;
21};
22
23struct nubus_dirent {
24 unsigned char *base;
25 unsigned char type;
26 __u32 data; /* Actually 24 bits used */
27 int mask;
28};
29
18struct nubus_board { 30struct nubus_board {
19 struct nubus_board* next; 31 struct nubus_board* next;
20 struct nubus_dev* first_dev; 32 struct nubus_dev* first_dev;
@@ -130,4 +142,11 @@ void nubus_get_rsrc_mem(void *dest, const struct nubus_dirent *dirent,
130 unsigned int len); 142 unsigned int len);
131void nubus_get_rsrc_str(char *dest, const struct nubus_dirent *dirent, 143void nubus_get_rsrc_str(char *dest, const struct nubus_dirent *dirent,
132 unsigned int maxlen); 144 unsigned int maxlen);
145
146/* Returns a pointer to the "standard" slot space. */
147static inline void *nubus_slot_addr(int slot)
148{
149 return (void *)(0xF0000000 | (slot << 24));
150}
151
133#endif /* LINUX_NUBUS_H */ 152#endif /* LINUX_NUBUS_H */
diff --git a/include/uapi/linux/nubus.h b/include/uapi/linux/nubus.h
index f3776cc80f4d..48031e7858f1 100644
--- a/include/uapi/linux/nubus.h
+++ b/include/uapi/linux/nubus.h
@@ -221,27 +221,4 @@ enum nubus_display_res_id {
221 NUBUS_RESID_SIXTHMODE = 0x0085 221 NUBUS_RESID_SIXTHMODE = 0x0085
222}; 222};
223 223
224struct nubus_dir
225{
226 unsigned char *base;
227 unsigned char *ptr;
228 int done;
229 int mask;
230};
231
232struct nubus_dirent
233{
234 unsigned char *base;
235 unsigned char type;
236 __u32 data; /* Actually 24bits used */
237 int mask;
238};
239
240
241/* We'd like to get rid of this eventually. Only daynaport.c uses it now. */
242static inline void *nubus_slot_addr(int slot)
243{
244 return (void *)(0xF0000000|(slot<<24));
245}
246
247#endif /* _UAPILINUX_NUBUS_H */ 224#endif /* _UAPILINUX_NUBUS_H */