sdio.c (f63e4f7d4179c9157c51bbe82af7c8f6b5fb39dd) | sdio.c (6d0507a777fbc533f7f1bf5664a81982dd50dece) |
---|---|
1/* 2 * Copyright (c) 2010 Broadcom Corporation 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 3968 unchanged lines hidden (view full) --- 3977 .txctl = brcmf_sdio_bus_txctl, 3978 .rxctl = brcmf_sdio_bus_rxctl, 3979 .gettxq = brcmf_sdio_bus_gettxq, 3980 .wowl_config = brcmf_sdio_wowl_config, 3981 .get_ramsize = brcmf_sdio_bus_get_ramsize, 3982 .get_memdump = brcmf_sdio_bus_get_memdump, 3983}; 3984 | 1/* 2 * Copyright (c) 2010 Broadcom Corporation 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 3968 unchanged lines hidden (view full) --- 3977 .txctl = brcmf_sdio_bus_txctl, 3978 .rxctl = brcmf_sdio_bus_rxctl, 3979 .gettxq = brcmf_sdio_bus_gettxq, 3980 .wowl_config = brcmf_sdio_wowl_config, 3981 .get_ramsize = brcmf_sdio_bus_get_ramsize, 3982 .get_memdump = brcmf_sdio_bus_get_memdump, 3983}; 3984 |
3985static void brcmf_sdio_firmware_callback(struct device *dev, | 3985static void brcmf_sdio_firmware_callback(struct device *dev, int err, |
3986 const struct firmware *code, 3987 void *nvram, u32 nvram_len) 3988{ | 3986 const struct firmware *code, 3987 void *nvram, u32 nvram_len) 3988{ |
3989 struct brcmf_bus *bus_if = dev_get_drvdata(dev); 3990 struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio; 3991 struct brcmf_sdio *bus = sdiodev->bus; 3992 int err = 0; | 3989 struct brcmf_bus *bus_if; 3990 struct brcmf_sdio_dev *sdiodev; 3991 struct brcmf_sdio *bus; |
3993 u8 saveclk; 3994 | 3992 u8 saveclk; 3993 |
3995 brcmf_dbg(TRACE, "Enter: dev=%s\n", dev_name(dev)); | 3994 brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err); 3995 if (err) 3996 goto fail; |
3996 | 3997 |
3998 bus_if = dev_get_drvdata(dev); |
|
3997 if (!bus_if->drvr) 3998 return; 3999 | 3999 if (!bus_if->drvr) 4000 return; 4001 |
4002 sdiodev = bus_if->bus_priv.sdio; 4003 bus = sdiodev->bus; 4004 |
|
4000 /* try to download image and nvram to the dongle */ 4001 bus->alp_only = true; 4002 err = brcmf_sdio_download_firmware(bus, code, nvram, nvram_len); 4003 if (err) 4004 goto fail; 4005 bus->alp_only = false; 4006 4007 /* Start the watchdog timer */ --- 305 unchanged lines hidden --- | 4005 /* try to download image and nvram to the dongle */ 4006 bus->alp_only = true; 4007 err = brcmf_sdio_download_firmware(bus, code, nvram, nvram_len); 4008 if (err) 4009 goto fail; 4010 bus->alp_only = false; 4011 4012 /* Start the watchdog timer */ --- 305 unchanged lines hidden --- |