2 * I/O access functions for Hexagon
4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and
8 * only version 2 as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 /* These are all FIFO routines! */
26 * __raw_readsw - read words a short at a time
27 * @addr: source address
29 * @len: number of shorts to read
31 void __raw_readsw(const void __iomem
*addr
, void *data
, int len
)
33 const volatile short int *src
= (short int *) addr
;
34 short int *dst
= (short int *) data
;
37 panic("unaligned pointer to readsw");
45 * __raw_writesw - read words a short at a time
46 * @addr: source address
48 * @len: number of shorts to read
50 void __raw_writesw(void __iomem
*addr
, const void *data
, int len
)
52 const short int *src
= (short int *)data
;
53 volatile short int *dst
= (short int *)addr
;
56 panic("unaligned pointer to writesw");
64 /* Pretty sure len is pre-adjusted for the length of the access already */
65 void __raw_readsl(const void __iomem
*addr
, void *data
, int len
)
67 const volatile long *src
= (long *) addr
;
68 long *dst
= (long *) data
;
71 panic("unaligned pointer to readsl");
79 void __raw_writesl(void __iomem
*addr
, const void *data
, int len
)
81 const long *src
= (long *)data
;
82 volatile long *dst
= (long *)addr
;
85 panic("unaligned pointer to writesl");