1e83ce340SAdrian Chadd /*- 2e83ce340SAdrian Chadd * Copyright (c) 2015-2016 Landon Fuller <landon@landonf.org> 3e83ce340SAdrian Chadd * All rights reserved. 4e83ce340SAdrian Chadd * 5e83ce340SAdrian Chadd * Redistribution and use in source and binary forms, with or without 6e83ce340SAdrian Chadd * modification, are permitted provided that the following conditions 7e83ce340SAdrian Chadd * are met: 8e83ce340SAdrian Chadd * 1. Redistributions of source code must retain the above copyright 9e83ce340SAdrian Chadd * notice, this list of conditions and the following disclaimer, 10e83ce340SAdrian Chadd * without modification. 11e83ce340SAdrian Chadd * 2. Redistributions in binary form must reproduce at minimum a disclaimer 12e83ce340SAdrian Chadd * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 13e83ce340SAdrian Chadd * redistribution must be conditioned upon including a substantially 14e83ce340SAdrian Chadd * similar Disclaimer requirement for further binary redistribution. 15e83ce340SAdrian Chadd * 16e83ce340SAdrian Chadd * NO WARRANTY 17e83ce340SAdrian Chadd * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18e83ce340SAdrian Chadd * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19e83ce340SAdrian Chadd * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 20e83ce340SAdrian Chadd * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 21e83ce340SAdrian Chadd * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 22e83ce340SAdrian Chadd * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23e83ce340SAdrian Chadd * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24e83ce340SAdrian Chadd * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25e83ce340SAdrian Chadd * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26e83ce340SAdrian Chadd * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27e83ce340SAdrian Chadd * THE POSSIBILITY OF SUCH DAMAGES. 28e83ce340SAdrian Chadd * 29e83ce340SAdrian Chadd */ 30e83ce340SAdrian Chadd 31f4a3eb02SAdrian Chadd #ifndef _BHND_NVRAM_BHND_SPROMVAR_H_ 32f4a3eb02SAdrian Chadd #define _BHND_NVRAM_BHND_SPROMVAR_H_ 33e83ce340SAdrian Chadd 34f4a3eb02SAdrian Chadd #include <dev/bhnd/bhnd.h> 35f4a3eb02SAdrian Chadd 36*77cb4d3eSLandon J. Fuller #include "bhnd_nvram_store.h" 371728aef2SLandon J. Fuller 38f4a3eb02SAdrian Chadd DECLARE_CLASS(bhnd_sprom_driver); 39f4a3eb02SAdrian Chadd 40f4a3eb02SAdrian Chadd int bhnd_sprom_probe(device_t dev); 4156a4cdd1SLandon J. Fuller int bhnd_sprom_attach(device_t dev, bus_size_t offset); 42f4a3eb02SAdrian Chadd int bhnd_sprom_resume(device_t dev); 43f4a3eb02SAdrian Chadd int bhnd_sprom_suspend(device_t dev); 44f4a3eb02SAdrian Chadd int bhnd_sprom_detach(device_t dev); 45f4a3eb02SAdrian Chadd 46f4a3eb02SAdrian Chadd /** 47f4a3eb02SAdrian Chadd * bhnd_sprom driver instance state. Must be first member of all subclass 48f4a3eb02SAdrian Chadd * softc structures. 49f4a3eb02SAdrian Chadd */ 50f4a3eb02SAdrian Chadd struct bhnd_sprom_softc { 51f4a3eb02SAdrian Chadd device_t dev; 52*77cb4d3eSLandon J. Fuller struct bhnd_nvram_store *store; /**< nvram store */ 53f4a3eb02SAdrian Chadd }; 54e83ce340SAdrian Chadd 55f4a3eb02SAdrian Chadd #endif /* _BHND_NVRAM_BHND_SPROMVAR_H_ */ 56