ti_scm.h revision 283276
1179335Syongari/* 2179335Syongari * Copyright (c) 2010 3179335Syongari * Ben Gray <ben.r.gray@gmail.com>. 4179335Syongari * All rights reserved. 5179335Syongari * 6179335Syongari * Redistribution and use in source and binary forms, with or without 7179335Syongari * modification, are permitted provided that the following conditions 8179335Syongari * are met: 9179335Syongari * 1. Redistributions of source code must retain the above copyright 10179335Syongari * notice, this list of conditions and the following disclaimer. 11179335Syongari * 2. Redistributions in binary form must reproduce the above copyright 12179335Syongari * notice, this list of conditions and the following disclaimer in the 13179335Syongari * documentation and/or other materials provided with the distribution. 14179335Syongari * 3. All advertising materials mentioning features or use of this software 15179335Syongari * must display the following acknowledgement: 16179335Syongari * This product includes software developed by Ben Gray. 17179335Syongari * 4. The name of the company nor the name of the author may be used to 18179335Syongari * endorse or promote products derived from this software without specific 19179335Syongari * prior written permission. 20179335Syongari * 21179335Syongari * THIS SOFTWARE IS PROVIDED BY BEN GRAY ``AS IS'' AND ANY EXPRESS OR 22179335Syongari * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23179335Syongari * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24179335Syongari * IN NO EVENT SHALL BEN GRAY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25179335Syongari * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26179335Syongari * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 27179335Syongari * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28179335Syongari * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 29179335Syongari * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 30179335Syongari * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31179335Syongari * 32179335Syongari * $FreeBSD: head/sys/arm/ti/ti_scm.h 283276 2015-05-22 03:16:18Z gonzo $ 33179335Syongari */ 34179335Syongari 35179335Syongari 36179335Syongari/** 37179335Syongari * Functions to configure the PIN multiplexing on the chip. 38179335Syongari * 39179335Syongari * This is different from the GPIO module in that it is used to configure the 40179335Syongari * pins between modules not just GPIO input output. 41179335Syongari * 42179335Syongari */ 43179335Syongari#ifndef _TI_SCM_H_ 44179335Syongari#define _TI_SCM_H_ 45179335Syongari 46179335Syongaristruct ti_scm_softc { 47179335Syongari device_t sc_dev; 48179335Syongari struct resource * sc_res[4]; 49179335Syongari bus_space_tag_t sc_bst; 50179335Syongari bus_space_handle_t sc_bsh; 51179335Syongari}; 52179335Syongari 53179335Syongariint ti_scm_reg_read_4(uint32_t reg, uint32_t *val); 54179335Syongariint ti_scm_reg_write_4(uint32_t reg, uint32_t val); 55179335Syongari 56179335Syongari#endif /* _TI_SCM_H_ */ 57179335Syongari