1238376Simp/*- 2238376Simp * Copyright (c) 2012 Warner Losh. All rights reserved. 3238376Simp * 4238376Simp * Redistribution and use in source and binary forms, with or without 5238376Simp * modification, are permitted provided that the following conditions 6238376Simp * are met: 7238376Simp * 1. Redistributions of source code must retain the above copyright 8238376Simp * notice, this list of conditions and the following disclaimer. 9238376Simp * 2. Redistributions in binary form must reproduce the above copyright 10238376Simp * notice, this list of conditions and the following disclaimer in the 11238376Simp * documentation and/or other materials provided with the distribution. 12238376Simp * 13238376Simp * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14238376Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15238376Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16238376Simp * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 17238376Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18238376Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19238376Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20238376Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21238376Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22238376Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23238376Simp * SUCH DAMAGE. 24238376Simp */ 25238376Simp 26238376Simp/* $FreeBSD: releng/10.2/sys/arm/at91/at91soc.h 238376 2012-07-11 20:17:14Z imp $ */ 27238376Simp 28238376Simp#ifndef _ARM_AT91_AT91SOC_H_ 29238376Simp#define _ARM_AT91_AT91SOC_H_ 30238376Simp 31238376Simp#include <sys/linker_set.h> 32238376Simp 33238376Simpstruct at91_soc { 34238376Simp enum at91_soc_type soc_type; /* Family of mail type of SoC */ 35238376Simp enum at91_soc_subtype soc_subtype; /* More specific soc, if any */ 36238376Simp struct at91_soc_data *soc_data; 37238376Simp}; 38238376Simp 39238376Simp// Make varadic 40238376Simp#define AT91_SOC(type, data) \ 41238376Simp static struct at91_soc this_soc = { \ 42238376Simp .soc_type = type, \ 43238376Simp .soc_subtype = AT91_ST_ANY, \ 44238376Simp .soc_data = data, \ 45238376Simp }; \ 46238376Simp DATA_SET(at91_socs, this_soc); 47238376Simp 48238376Simp#define AT91_SOC_SUB(type, subtype, data) \ 49238376Simp static struct at91_soc this_soc = { \ 50238376Simp .soc_type = type, \ 51238376Simp .soc_subtype = subtype, \ 52238376Simp .soc_data = data, \ 53238376Simp }; \ 54238376Simp DATA_SET(at91_socs, this_soc); 55238376Simp 56238376Simpstruct at91_soc_data *at91_match_soc(enum at91_soc_type, enum at91_soc_subtype); 57238376Simp 58238376Simp#endif /* _ARM_AT91_AT91SOC_H_ */ 59