/* SPDX-License-Identifier: GPL-2.0 */ /* * linux/drivers/char/hpilo.h * * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. * David Altobelli <[email protected]> */ #ifndef __HPILO_H #define __HPILO_H #define ILO_NAME … /* iLO ASIC PCI revision id */ #define PCI_REV_ID_NECHES … /* max number of open channel control blocks per device, hw limited to 32 */ #define MAX_CCB … /* min number of open channel control blocks per device, hw limited to 32 */ #define MIN_CCB … /* max number of supported devices */ #define MAX_ILO_DEV … /* max number of files */ #define MAX_OPEN … /* total wait time in usec */ #define MAX_WAIT_TIME … /* per spin wait time in usec */ #define WAIT_TIME … /* spin counter for open/close delay */ #define MAX_WAIT … /* * Per device, used to track global memory allocations. */ struct ilo_hwinfo { … }; /* offset from mmio_vaddr for enabling doorbell interrupts */ #define DB_IRQ … /* offset from mmio_vaddr for outbound communications */ #define DB_OUT … /* DB_OUT reset bit */ #define DB_RESET … /* * Channel control block. Used to manage hardware queues. * The format must match hw's version. The hw ccb is 128 bytes, * but the context area shouldn't be touched by the driver. */ #define ILOSW_CCB_SZ … #define ILOHW_CCB_SZ … struct ccb { … }; /* ccb queue parameters */ #define SENDQ … #define RECVQ … #define NR_QENTRY … #define L2_QENTRY_SZ … /* ccb ctrl bitfields */ #define CTRL_BITPOS_L2SZ … #define CTRL_BITPOS_FIFOINDEXMASK … #define CTRL_BITPOS_DESCLIMIT … #define CTRL_BITPOS_A … #define CTRL_BITPOS_G … /* ccb doorbell macros */ #define L2_DB_SIZE … #define ONE_DB_SIZE … /* * Per fd structure used to track the ccb allocated to that dev file. */ struct ccb_data { … }; /* * FIFO queue structure, shared with hw. */ #define ILO_START_ALIGN … #define ILO_CACHE_SZ … struct fifo { … }; /* convert between struct fifo, and the fifobar, which is saved in the ccb */ #define FIFOHANDLESIZE … #define FIFOBARTOHANDLE(_fifo) … /* the number of qwords to consume from the entry descriptor */ #define ENTRY_BITPOS_QWORDS … /* descriptor index number (within a specified queue) */ #define ENTRY_BITPOS_DESCRIPTOR … /* state bit, fifo entry consumed by consumer */ #define ENTRY_BITPOS_C … /* state bit, fifo entry is occupied */ #define ENTRY_BITPOS_O … #define ENTRY_BITS_QWORDS … #define ENTRY_BITS_DESCRIPTOR … #define ENTRY_BITS_C … #define ENTRY_BITS_O … #define ENTRY_BITS_TOTAL … /* extract various entry fields */ #define ENTRY_MASK … #define ENTRY_MASK_C … #define ENTRY_MASK_O … #define ENTRY_MASK_QWORDS … #define ENTRY_MASK_DESCRIPTOR … #define ENTRY_MASK_NOSTATE … #endif /* __HPILO_H */