~ubuntu-branches/ubuntu/precise/linux-lowlatency/precise

« back to all changes in this revision

Viewing changes to arch/unicore32/include/asm/io.h

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-tz023xykf0i6eosh
Tags: upstream-3.2.0
ImportĀ upstreamĀ versionĀ 3.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * linux/arch/unicore32/include/asm/io.h
 
3
 *
 
4
 * Code specific to PKUnity SoC and UniCore ISA
 
5
 *
 
6
 * Copyright (C) 2001-2010 GUAN Xue-tao
 
7
 *
 
8
 * This program is free software; you can redistribute it and/or modify
 
9
 * it under the terms of the GNU General Public License version 2 as
 
10
 * published by the Free Software Foundation.
 
11
 */
 
12
#ifndef __UNICORE_IO_H__
 
13
#define __UNICORE_IO_H__
 
14
 
 
15
#ifdef __KERNEL__
 
16
 
 
17
#include <asm/byteorder.h>
 
18
#include <asm/memory.h>
 
19
#include <asm/system.h>
 
20
 
 
21
#define PCI_IOBASE      PKUNITY_PCILIO_BASE
 
22
#include <asm-generic/io.h>
 
23
 
 
24
/*
 
25
 * __uc32_ioremap and __uc32_ioremap_cached takes CPU physical address.
 
26
 */
 
27
extern void __iomem *__uc32_ioremap(unsigned long, size_t);
 
28
extern void __iomem *__uc32_ioremap_cached(unsigned long, size_t);
 
29
extern void __uc32_iounmap(volatile void __iomem *addr);
 
30
 
 
31
/*
 
32
 * ioremap and friends.
 
33
 *
 
34
 * ioremap takes a PCI memory address, as specified in
 
35
 * Documentation/io-mapping.txt.
 
36
 *
 
37
 */
 
38
#define ioremap(cookie, size)           __uc32_ioremap(cookie, size)
 
39
#define ioremap_cached(cookie, size)    __uc32_ioremap_cached(cookie, size)
 
40
#define iounmap(cookie)                 __uc32_iounmap(cookie)
 
41
 
 
42
/*
 
43
 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
 
44
 * access
 
45
 */
 
46
#undef xlate_dev_mem_ptr
 
47
#define xlate_dev_mem_ptr(p)    __va(p)
 
48
 
 
49
#define HAVE_ARCH_PIO_SIZE
 
50
#define PIO_OFFSET              (unsigned int)(PCI_IOBASE)
 
51
#define PIO_MASK                (unsigned int)(IO_SPACE_LIMIT)
 
52
#define PIO_RESERVED            (PIO_OFFSET + PIO_MASK + 1)
 
53
 
 
54
#endif  /* __KERNEL__ */
 
55
#endif  /* __UNICORE_IO_H__ */