Skip to content

Commit 5c35018

Browse files
committed
alpha: stop using asm-generic/iomap.h
Alpha has custom definitions for ioread64()/iowrite64(), which now don't exist in the lib/iomap.c variant. This is an endless source of build failures, since alpha tries to share a couple of function declarations. Change alpha to have its own prototypes that match the definitions in arch/alpha/kerne/io.c instead. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 9e81c96 commit 5c35018

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

  • arch/alpha/include/asm

arch/alpha/include/asm/io.h

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
#include <asm/machvec.h>
1111
#include <asm/hwrpb.h>
1212

13-
/* The generic header contains only prototypes. Including it ensures that
14-
the implementation we have here matches that interface. */
15-
#include <asm-generic/iomap.h>
16-
1713
/*
1814
* Virtual -> physical identity mapping starts at this offset
1915
*/
@@ -276,13 +272,24 @@ extern void __raw_writeq(u64 b, volatile void __iomem *addr);
276272
#define __raw_writel __raw_writel
277273
#define __raw_writeq __raw_writeq
278274

279-
/*
280-
* Mapping from port numbers to __iomem space is pretty easy.
281-
*/
275+
extern unsigned int ioread8(const void __iomem *);
276+
extern unsigned int ioread16(const void __iomem *);
277+
extern unsigned int ioread32(const void __iomem *);
278+
extern u64 ioread64(const void __iomem *);
279+
280+
extern void iowrite8(u8, void __iomem *);
281+
extern void iowrite16(u16, void __iomem *);
282+
extern void iowrite32(u32, void __iomem *);
283+
extern void iowrite64(u64, void __iomem *);
284+
285+
extern void ioread8_rep(const void __iomem *port, void *buf, unsigned long count);
286+
extern void ioread16_rep(const void __iomem *port, void *buf, unsigned long count);
287+
extern void ioread32_rep(const void __iomem *port, void *buf, unsigned long count);
288+
289+
extern void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count);
290+
extern void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count);
291+
extern void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count);
282292

283-
/* These two have to be extern inline because of the extern prototype from
284-
<asm-generic/iomap.h>. It is not legal to mix "extern" and "static" for
285-
the same declaration. */
286293
extern inline void __iomem *ioport_map(unsigned long port, unsigned int size)
287294
{
288295
return IO_CONCAT(__IO_PREFIX,ioportmap) (port);
@@ -629,10 +636,6 @@ extern void outsl (unsigned long port, const void *src, unsigned long count);
629636
#define RTC_PORT(x) (0x70 + (x))
630637
#define RTC_ALWAYS_BCD 0
631638

632-
/*
633-
* These get provided from <asm-generic/iomap.h> since alpha does not
634-
* select GENERIC_IOMAP.
635-
*/
636639
#define ioread64 ioread64
637640
#define iowrite64 iowrite64
638641
#define ioread8_rep ioread8_rep

0 commit comments

Comments
 (0)