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");
30 EXPORT_SYMBOL(__raw_readsw);
33 * __raw_writesw - read words a short at a time
34 * @addr: source address
36 * @len: number of shorts to read
38 void __raw_writesw(void __iomem *addr, const void *data, int len)
40 const short int *src = (short int *)data;
41 volatile short int *dst = (short int *)addr;
44 panic("unaligned pointer to writesw");
51 EXPORT_SYMBOL(__raw_writesw);
53 /* Pretty sure len is pre-adjusted for the length of the access already */
54 void __raw_readsl(const void __iomem *addr, void *data, int len)
56 const volatile long *src = (long *) addr;
57 long *dst = (long *) data;
60 panic("unaligned pointer to readsl");
67 EXPORT_SYMBOL(__raw_readsl);
69 void __raw_writesl(void __iomem *addr, const void *data, int len)
71 const long *src = (long *)data;
72 volatile long *dst = (long *)addr;
75 panic("unaligned pointer to writesl");
82 EXPORT_SYMBOL(__raw_writesl);