1 // SPDX-License-Identifier: GPL-2.0-only
3 * I/O access functions for Hexagon
5 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
10 /* These are all FIFO routines! */
13 * __raw_readsw - read words a short at a time
14 * @addr: source address
16 * @len: number of shorts to read
18 void __raw_readsw(const void __iomem
*addr
, void *data
, int len
)
20 const volatile short int *src
= (short int *) addr
;
21 short int *dst
= (short int *) data
;
24 panic("unaligned pointer to readsw");
32 * __raw_writesw - read words a short at a time
33 * @addr: source address
35 * @len: number of shorts to read
37 void __raw_writesw(void __iomem
*addr
, const void *data
, int len
)
39 const short int *src
= (short int *)data
;
40 volatile short int *dst
= (short int *)addr
;
43 panic("unaligned pointer to writesw");
51 /* Pretty sure len is pre-adjusted for the length of the access already */
52 void __raw_readsl(const void __iomem
*addr
, void *data
, int len
)
54 const volatile long *src
= (long *) addr
;
55 long *dst
= (long *) data
;
58 panic("unaligned pointer to readsl");
66 void __raw_writesl(void __iomem
*addr
, const void *data
, int len
)
68 const long *src
= (long *)data
;
69 volatile long *dst
= (long *)addr
;
72 panic("unaligned pointer to writesl");