android_kernel_xiaomi_sm8350/include/asm-arm/arch-shark/io.h
Alexander Schulz b7523418f6 [PATCH] ARM: 2815/1: Shark: new defconfig, fixes with __io and serial ports
Patch from Alexander Schulz

This patch brings a new default config file for the shark and
fixes a compilation issue with io addressing and a runtime
problem with the serial ports, where I corrected a wrong
regshift value.
These are all shark specific files so I hope it is ok to
put them in one patch.

Signed-off-by: Alexander Schulz <alex@shark-linux.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-07-16 17:17:18 +01:00

55 lines
1.2 KiB
C

/*
* linux/include/asm-arm/arch-shark/io.h
*
* by Alexander Schulz
*
* derived from:
* linux/include/asm-arm/arch-ebsa110/io.h
* Copyright (C) 1997,1998 Russell King
*/
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
#define IO_SPACE_LIMIT 0xffffffff
/*
* We use two different types of addressing - PC style addresses, and ARM
* addresses. PC style accesses the PC hardware with the normal PC IO
* addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+
* and are translated to the start of IO.
*/
#define __PORT_PCIO(x) (!((x) & 0x80000000))
#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
static inline unsigned int __ioaddr (unsigned int port) \
{ \
if (__PORT_PCIO(port)) \
return (unsigned int)(PCIO_BASE + (port)); \
else \
return (unsigned int)(IO_BASE + (port)); \
}
#define __mem_pci(addr) (addr)
/*
* Translated address IO functions
*
* IO address has already been translated to a virtual address
*/
#define outb_t(v,p) \
(*(volatile unsigned char *)(p) = (v))
#define inb_t(p) \
(*(volatile unsigned char *)(p))
#define outl_t(v,p) \
(*(volatile unsigned long *)(p) = (v))
#define inl_t(p) \
(*(volatile unsigned long *)(p))
#endif