pcie.c (f63e4f7d4179c9157c51bbe82af7c8f6b5fb39dd) | pcie.c (6d0507a777fbc533f7f1bf5664a81982dd50dece) |
---|---|
1/* Copyright (c) 2014 Broadcom Corporation 2 * 3 * Permission to use, copy, modify, and/or distribute this software for any 4 * purpose with or without fee is hereby granted, provided that the above 5 * copyright notice and this permission notice appear in all copies. 6 * 7 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --- 1636 unchanged lines hidden (view full) --- 1645static const struct brcmf_buscore_ops brcmf_pcie_buscore_ops = { 1646 .prepare = brcmf_pcie_buscoreprep, 1647 .reset = brcmf_pcie_buscore_reset, 1648 .activate = brcmf_pcie_buscore_activate, 1649 .read32 = brcmf_pcie_buscore_read32, 1650 .write32 = brcmf_pcie_buscore_write32, 1651}; 1652 | 1/* Copyright (c) 2014 Broadcom Corporation 2 * 3 * Permission to use, copy, modify, and/or distribute this software for any 4 * purpose with or without fee is hereby granted, provided that the above 5 * copyright notice and this permission notice appear in all copies. 6 * 7 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --- 1636 unchanged lines hidden (view full) --- 1645static const struct brcmf_buscore_ops brcmf_pcie_buscore_ops = { 1646 .prepare = brcmf_pcie_buscoreprep, 1647 .reset = brcmf_pcie_buscore_reset, 1648 .activate = brcmf_pcie_buscore_activate, 1649 .read32 = brcmf_pcie_buscore_read32, 1650 .write32 = brcmf_pcie_buscore_write32, 1651}; 1652 |
1653static void brcmf_pcie_setup(struct device *dev, const struct firmware *fw, | 1653static void brcmf_pcie_setup(struct device *dev, int ret, 1654 const struct firmware *fw, |
1654 void *nvram, u32 nvram_len) 1655{ | 1655 void *nvram, u32 nvram_len) 1656{ |
1656 struct brcmf_bus *bus = dev_get_drvdata(dev); 1657 struct brcmf_pciedev *pcie_bus_dev = bus->bus_priv.pcie; 1658 struct brcmf_pciedev_info *devinfo = pcie_bus_dev->devinfo; | 1657 struct brcmf_bus *bus; 1658 struct brcmf_pciedev *pcie_bus_dev; 1659 struct brcmf_pciedev_info *devinfo; |
1659 struct brcmf_commonring **flowrings; | 1660 struct brcmf_commonring **flowrings; |
1660 int ret; | |
1661 u32 i; 1662 | 1661 u32 i; 1662 |
1663 /* check firmware loading result */ 1664 if (ret) 1665 goto fail; 1666 1667 bus = dev_get_drvdata(dev); 1668 pcie_bus_dev = bus->bus_priv.pcie; 1669 devinfo = pcie_bus_dev->devinfo; |
|
1663 brcmf_pcie_attach(devinfo); 1664 1665 /* Some of the firmwares have the size of the memory of the device 1666 * defined inside the firmware. This is because part of the memory in 1667 * the device is shared and the devision is determined by FW. Parse 1668 * the firmware and adjust the chip memory size now. 1669 */ 1670 brcmf_pcie_adjust_ramsize(devinfo, (u8 *)fw->data, fw->size); --- 330 unchanged lines hidden --- | 1670 brcmf_pcie_attach(devinfo); 1671 1672 /* Some of the firmwares have the size of the memory of the device 1673 * defined inside the firmware. This is because part of the memory in 1674 * the device is shared and the devision is determined by FW. Parse 1675 * the firmware and adjust the chip memory size now. 1676 */ 1677 brcmf_pcie_adjust_ramsize(devinfo, (u8 *)fw->data, fw->size); --- 330 unchanged lines hidden --- |