blackfin: fix copy_from_user()
[linux-2.6-block.git] / arch / blackfin / include / asm / io.h
CommitLineData
96f1050d 1/*
cfbf1677 2 * Copyright 2004-2010 Analog Devices Inc.
96f1050d
RG
3 *
4 * Licensed under the GPL-2 or later.
5 */
6
1394f032
BW
7#ifndef _BFIN_IO_H
8#define _BFIN_IO_H
9
1394f032 10#include <linux/compiler.h>
cfbf1677
MF
11#include <linux/types.h>
12#include <asm/byteorder.h>
5eea9003 13#include <asm/def_LPBlackfin.h>
cfbf1677 14
1a3372bc
SM
15#define __raw_readb bfin_read8
16#define __raw_readw bfin_read16
17#define __raw_readl bfin_read32
18#define __raw_writeb(val, addr) bfin_write8(addr, val)
19#define __raw_writew(val, addr) bfin_write16(addr, val)
20#define __raw_writel(val, addr) bfin_write32(addr, val)
1394f032 21
b7b2d344
BW
22extern void outsb(unsigned long port, const void *addr, unsigned long count);
23extern void outsw(unsigned long port, const void *addr, unsigned long count);
59069676 24extern void outsw_8(unsigned long port, const void *addr, unsigned long count);
b7b2d344 25extern void outsl(unsigned long port, const void *addr, unsigned long count);
cfbf1677
MF
26#define outsb outsb
27#define outsw outsw
28#define outsl outsl
1394f032 29
b7b2d344
BW
30extern void insb(unsigned long port, void *addr, unsigned long count);
31extern void insw(unsigned long port, void *addr, unsigned long count);
59069676 32extern void insw_8(unsigned long port, void *addr, unsigned long count);
b7b2d344 33extern void insl(unsigned long port, void *addr, unsigned long count);
5c91fb90 34extern void insl_16(unsigned long port, void *addr, unsigned long count);
cfbf1677
MF
35#define insb insb
36#define insw insw
37#define insl insl
23ee968d 38
cfbf1677
MF
39/**
40 * I/O write barrier
41 *
42 * Ensure ordering of I/O space writes. This will make sure that writes
43 * following the barrier will arrive after all previous writes.
1394f032 44 */
cfbf1677 45#define mmiowb() do { SSYNC(); wmb(); } while (0)
1394f032 46
cfbf1677 47#include <asm-generic/io.h>
1394f032
BW
48
49#endif