/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (C) 2010 Nathan Whitehorn4* All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR16* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES17* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.18* IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,19* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,20* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;21* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,22* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR23* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF24* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.25*/2627#ifndef _POWERPC_PS3_PS3BUS_H28#define _POWERPC_PS3_PS3BUS_H2930enum {31PS3BUS_IVAR_BUS,32PS3BUS_IVAR_DEVICE,33PS3BUS_IVAR_BUSTYPE,34PS3BUS_IVAR_DEVTYPE,35PS3BUS_IVAR_BUSIDX,36PS3BUS_IVAR_DEVIDX,37};3839#define PS3BUS_ACCESSOR(A, B, T) \40__BUS_ACCESSOR(ps3bus, A, PS3BUS, B, T)4142PS3BUS_ACCESSOR(bus, BUS, int)43PS3BUS_ACCESSOR(device, DEVICE, int)44PS3BUS_ACCESSOR(bustype, BUSTYPE, uint64_t)45PS3BUS_ACCESSOR(devtype, DEVTYPE, uint64_t)46PS3BUS_ACCESSOR(busidx, BUSIDX, int)47PS3BUS_ACCESSOR(devidx, DEVIDX, int)4849/* Bus types */50enum {51PS3_BUSTYPE_SYSBUS = 4,52PS3_BUSTYPE_STORAGE = 5,53};5455/* Device types */56enum {57/* System bus devices */58PS3_DEVTYPE_GELIC = 3,59PS3_DEVTYPE_USB = 4,60PS3_DEVTYPE_GPIO = 6,6162/* Storage bus devices */63PS3_DEVTYPE_DISK = 0,64PS3_DEVTYPE_CDROM = 5,65PS3_DEVTYPE_FLASH = 14,66};6768#endif /* _POWERPC_PS3_PS3BUS_H */697071