18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Miscellaneous SoC-specific hooks.
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Copyright (C) 2011 Texas Instruments Incorporated
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Author: Mark Salter <msalter@redhat.com>
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * This file is licensed under the terms of the GNU General Public License
98c2ecf20Sopenharmony_ci * version 2. This program is licensed "as is" without any warranty of any
108c2ecf20Sopenharmony_ci * kind, whether express or implied.
118c2ecf20Sopenharmony_ci */
128c2ecf20Sopenharmony_ci#ifndef _ASM_C6X_SOC_H
138c2ecf20Sopenharmony_ci#define _ASM_C6X_SOC_H
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_cistruct soc_ops {
168c2ecf20Sopenharmony_ci	/* Return active exception event or -1 if none */
178c2ecf20Sopenharmony_ci	int		(*get_exception)(void);
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci	/* Assert an event */
208c2ecf20Sopenharmony_ci	void		(*assert_event)(unsigned int evt);
218c2ecf20Sopenharmony_ci};
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciextern struct soc_ops soc_ops;
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ciextern int soc_get_exception(void);
268c2ecf20Sopenharmony_ciextern void soc_assert_event(unsigned int event);
278c2ecf20Sopenharmony_ciextern int soc_mac_addr(unsigned int index, u8 *addr);
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci/*
308c2ecf20Sopenharmony_ci * for mmio on SoC devices. regs are always same byte order as cpu.
318c2ecf20Sopenharmony_ci */
328c2ecf20Sopenharmony_ci#define soc_readl(addr)    __raw_readl(addr)
338c2ecf20Sopenharmony_ci#define soc_writel(b, addr) __raw_writel((b), (addr))
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#endif /* _ASM_C6X_SOC_H */
36