oce_hw.c revision 4d0e50075058332ce0cd62bc2669a8a4dea45da0
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * CDDL HEADER START
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * The contents of this file are subject to the terms of the
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * Common Development and Distribution License (the "License").
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * You may not use this file except in compliance with the License.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * or http://www.opensolaris.org/os/licensing.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * See the License for the specific language governing permissions
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * and limitations under the License.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * When distributing Covered Code, include this CDDL HEADER in each
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * If applicable, add the following below this CDDL HEADER, with the
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * fields enclosed by brackets "[]" replaced with your own identifying
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * information: Portions Copyright [yyyy] [name of copyright owner]
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * CDDL HEADER END
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * Copyright 2009 Emulex. All rights reserved.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * Use is subject to license terms.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * Source file containing the implementation of the Hardware specific
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathanstatic ddi_device_acc_attr_t reg_accattr = {
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathanextern int oce_destroy_q(struct oce_dev *dev, struct oce_mbx *mbx,
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * function to map the device memory
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * dev - handle to device private data structure
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* get number of supported bars */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = ddi_dev_nregs(dev->dip, &dev->num_bars);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "%d: could not retrieve num_bars", MOD_CONFIG);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* verify each bar and map it accordingly */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = ddi_dev_regsize(dev->dip, OCE_DEV_CFG_BAR, &bar_size);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "Could not get sizeof BAR %d",
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = ddi_regs_map_setup(dev->dip, OCE_DEV_CFG_BAR, &dev->dev_cfg_addr,
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan 0, bar_size, ®_accattr, &dev->dev_cfg_handle);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "Could not map bar %d",
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = ddi_dev_regsize(dev->dip, OCE_PCI_CSR_BAR, &bar_size);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "Could not get sizeof BAR %d",
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = ddi_regs_map_setup(dev->dip, OCE_PCI_CSR_BAR, &dev->csr_addr,
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan 0, bar_size, ®_accattr, &dev->csr_handle);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "Could not map bar %d",
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ddi_regs_map_free(&dev->dev_cfg_handle);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* Doorbells */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = ddi_dev_regsize(dev->dip, OCE_PCI_DB_BAR, &bar_size);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "%d Could not get sizeof BAR %d",
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ddi_regs_map_free(&dev->dev_cfg_handle);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = ddi_regs_map_setup(dev->dip, OCE_PCI_DB_BAR, &dev->db_addr,
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "Could not map bar %d", OCE_PCI_DB_BAR);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ddi_regs_map_free(&dev->dev_cfg_handle);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = oce_fm_check_acc_handle(dev, dev->dev_cfg_handle);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan} /* oce_pci_init */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * function to free device memory mapping mapped using
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * oce_pci_init
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * dev - handle to device private data
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ddi_regs_map_free(&dev->dev_cfg_handle);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan} /* oce_pci_fini */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * function to initailise the hardware. This includes creation of queues,
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * interfaces and associated buffers for data movement
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * dev - software handle to the device
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* create an interface for the device with out mac */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = oce_if_create(dev, OCE_DEFAULT_IF_CAP, OCE_DEFAULT_IF_CAP_EN,
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan 0, &dev->mac_addr[0], (uint32_t *)&dev->if_id);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "Interface creation failed: 0x%x", ret);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan dev->if_cap_flags = OCE_DEFAULT_IF_CAP_EN;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* Enable VLAN Promisc on HW */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = oce_config_vlan(dev, (uint8_t)dev->if_id, NULL, 0,
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* set default flow control */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = oce_set_flow_control(dev, dev->flow_control);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* set to promiscuous mode */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = oce_set_promiscuous(dev, dev->promisc);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* this could happen if the driver is resuming after suspend */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ret = oce_set_multicast_table(dev, dev->multi_cast,
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* we are done. Now return */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan} /* oce_hw_init */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * function to return resources allocated in oce_hw_init
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * dev - software handle to the device
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* release OS resources */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan for (i = 0; i < dev->num_vectors; i++) {
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "eq[%d] del failed", i);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan} /* oce_hw_fini */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * create Event Queues. One event queue per available vector. In
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * case of INTX, only one vector is available and will handle
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * event notification for Write Queue (WQ), Receive Queue (RQ) and
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * Mbox Queue (MQ).
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * The EQ is not directly used by the WQ, RQ and MQ. The WQ, RQ and
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * MQ is composed of a Completion Queue (CQ) that is created per
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * queue and is dependent on the queue type. The EQ passed is
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * associated with the CQ at the time of creation.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * In the case of MSIX, there will be one EQ for the RQ and one EQ
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * shared between the WQ and MQ.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan for (i = 0; i < dev->num_vectors; i++) {
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan eq = oce_eq_create(dev, EQ_LEN_1024, EQE_SIZE_4, 0);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "EQ creation(%d) failed ", i);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* Save the eq pointer */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * create the Write Queue (WQ). The WQ is the low level sructure for
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * queueing send packets. It maintains a ring buffer to queue packets
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * to be sent out on the wire and return the context to the host
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * when there is a send complete event.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * The WQ uses a Completion Queue (CQ) with an associated EQ for
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * handling send completion events.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan dev->tx_ring_size, NIC_WQ_TYPE_STANDARD);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "WQ creation failed ");
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* store the WQ pointer */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * create the Receive Queue (RQ). The RQ is the low level structure
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * for receiving data from the wire, It implements a ring buffer
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * that allows the adpater to DMA data onto host buffers.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * The RQ uses a Completion Queue (CQ) with an associated EQ for
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * handling recieve events when packets are received by the adapter
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan ((dev->num_vectors > 1) ? dev->eq[1] : dev->eq[0]),
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "RQ creation failed ");
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * create the Mailbox Queue (MQ). Only one per adapter instance can
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * be created. The MQ is used for receiving asynchronous adapter
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * events, like link status updates.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * The MQ uses an Asynchronous CQ (ACQ) with an associated EQ for
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * handling asynchronous event notification to the host.
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan mq = oce_mq_create(dev, dev->eq[0], 64);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "MQ creation failed ");
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan} /* oce_chip_hw_init */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* send a command to delete the MQ */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan mq_cmd = (struct mbx_destroy_common_mq *)&mbx.payload;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan sizeof (struct mbx_destroy_common_cq), QTYPE_MQ);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* send a command to delete the MQ_CQ */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan cq_cmd = (struct mbx_destroy_common_cq *)&mbx.payload;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan sizeof (struct mbx_destroy_common_cq), QTYPE_CQ);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* send a command to delete the RQ */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan rq_cmd = (struct mbx_delete_nic_rq *)&mbx.payload;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan sizeof (struct mbx_delete_nic_rq), QTYPE_RQ);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* send a command to delete the RQ_CQ */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan cq_cmd = (struct mbx_destroy_common_cq *)&mbx.payload;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan sizeof (struct mbx_destroy_common_cq), QTYPE_CQ);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan rq->cq->ring->pidx = rq->cq->ring->cidx = 0;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* send a command to delete the WQ */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* now fill the command */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan wq_cmd = (struct mbx_delete_nic_wq *)&mbx.payload;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan sizeof (struct mbx_delete_nic_wq), QTYPE_WQ);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* send a command to delete the WQ_CQ */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan cq_cmd = (struct mbx_destroy_common_cq *)&mbx.payload;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan sizeof (struct mbx_destroy_common_cq), QTYPE_CQ);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan wq->cq->ring->pidx = wq->cq->ring->cidx = 0;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan for (i = 0; i < dev->num_vectors; i++) {
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* send a command to delete the EQ */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan eq_cmd = (struct mbx_destroy_common_eq *)&mbx.payload;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan sizeof (struct mbx_destroy_common_eq), QTYPE_EQ);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * function to check if a reset is required
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * dev - software handle to the device
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan post_status.dw0 = OCE_CSR_READ32(dev, MPU_EP_SEMAPHORE);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan if (post_status.bits.stage == POST_STAGE_ARMFW_READY) {
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan } else if ((post_status.bits.stage <= POST_STAGE_AWAITING_HOST_RDY) ||
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan post_status.bits.stage == POST_STAGE_ARMFW_UE) {
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan} /* oce_is_reset_pci */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * function to do a soft reset on the device
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * dev - software handle to the device
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* struct mpu_ep_control ep_control; */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* struct pcicfg_online1 online1; */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* issue soft reset */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan soft_rst.dw0 = OCE_CFG_READ32(dev, PCICFG_SOFT_RESET);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan OCE_CFG_WRITE32(dev, PCICFG_SOFT_RESET, soft_rst.dw0);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* wait till soft reset bit deasserts */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan tmo = drv_usectohz(60000000); /* 1.0min */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan if ((ddi_get_lbolt() - earlier) > tmo) {
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan soft_rst.dw0 = OCE_CFG_READ32(dev, PCICFG_SOFT_RESET);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "0x%x soft_reset"
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "bit asserted[1]. Reset failed",
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan} /* oce_pci_soft_reset */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * function to trigger a POST on the device
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * dev - software handle to the device
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* read semaphore CSR */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan post_status.dw0 = OCE_CSR_READ32(dev, MPU_EP_SEMAPHORE);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* if host is ready then wait for fw ready else send POST */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan if (post_status.bits.stage <= POST_STAGE_AWAITING_HOST_RDY) {
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan post_status.bits.stage = POST_STAGE_CHIP_RESET;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan OCE_CSR_WRITE32(dev, MPU_EP_SEMAPHORE, post_status.dw0);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan /* wait for FW ready */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan tmo = drv_usectohz(60000000); /* 1.0min */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan if ((ddi_get_lbolt() - earlier) > tmo) {
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan post_status.dw0 = OCE_CSR_READ32(dev, MPU_EP_SEMAPHORE);
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan if (post_status.bits.stage == POST_STAGE_ARMFW_READY)
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan } else if (post_status.bits.stage == POST_STAGE_ARMFW_READY) {
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan "0x%x POST SUCCESSFUL",
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan} /* oce_POST */
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * function to modify register access attributes corresponding to the
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * FM capabilities configured by the user
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan * fm_caps - fm capability configured by the user and accepted by the driver
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan reg_accattr.devacc_attr_access = DDI_FLAGERR_ACC;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan reg_accattr.devacc_attr_access = DDI_DEFAULT_ACC;
4d0e50075058332ce0cd62bc2669a8a4dea45da0Sukumar Swaminathan} /* oce_set_fma_flags */