Lines Matching +full:bus +full:- +full:err

3  * PCMCIA-Hostbus related functions
6 * Copyright 2007-2008 Michael Buesch <m@bues.ch>
71 static int ssb_pcmcia_cfg_write(struct ssb_bus *bus, u8 offset, u8 value) in ssb_pcmcia_cfg_write() argument
75 res = pcmcia_write_config_byte(bus->host_pcmcia, offset, value); in ssb_pcmcia_cfg_write()
77 return -EBUSY; in ssb_pcmcia_cfg_write()
83 static int ssb_pcmcia_cfg_read(struct ssb_bus *bus, u8 offset, u8 *value) in ssb_pcmcia_cfg_read() argument
87 res = pcmcia_read_config_byte(bus->host_pcmcia, offset, value); in ssb_pcmcia_cfg_read()
89 return -EBUSY; in ssb_pcmcia_cfg_read()
94 int ssb_pcmcia_switch_coreidx(struct ssb_bus *bus, in ssb_pcmcia_switch_coreidx() argument
97 int err; in ssb_pcmcia_switch_coreidx() local
106 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_ADDRESS0, in ssb_pcmcia_switch_coreidx()
108 if (err) in ssb_pcmcia_switch_coreidx()
110 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_ADDRESS1, in ssb_pcmcia_switch_coreidx()
112 if (err) in ssb_pcmcia_switch_coreidx()
114 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_ADDRESS2, in ssb_pcmcia_switch_coreidx()
116 if (err) in ssb_pcmcia_switch_coreidx()
121 err = ssb_pcmcia_cfg_read(bus, SSB_PCMCIA_ADDRESS0, &val); in ssb_pcmcia_switch_coreidx()
122 if (err) in ssb_pcmcia_switch_coreidx()
125 err = ssb_pcmcia_cfg_read(bus, SSB_PCMCIA_ADDRESS1, &val); in ssb_pcmcia_switch_coreidx()
126 if (err) in ssb_pcmcia_switch_coreidx()
129 err = ssb_pcmcia_cfg_read(bus, SSB_PCMCIA_ADDRESS2, &val); in ssb_pcmcia_switch_coreidx()
130 if (err) in ssb_pcmcia_switch_coreidx()
134 cur_core = (read_addr - SSB_ENUM_BASE) / SSB_CORE_SIZE; in ssb_pcmcia_switch_coreidx()
138 err = -ETIMEDOUT; in ssb_pcmcia_switch_coreidx()
147 return err; in ssb_pcmcia_switch_coreidx()
150 static int ssb_pcmcia_switch_core(struct ssb_bus *bus, struct ssb_device *dev) in ssb_pcmcia_switch_core() argument
152 int err; in ssb_pcmcia_switch_core() local
156 ssb_core_name(dev->id.coreid), dev->core_index); in ssb_pcmcia_switch_core()
159 err = ssb_pcmcia_switch_coreidx(bus, dev->core_index); in ssb_pcmcia_switch_core()
160 if (!err) in ssb_pcmcia_switch_core()
161 bus->mapped_device = dev; in ssb_pcmcia_switch_core()
163 return err; in ssb_pcmcia_switch_core()
166 int ssb_pcmcia_switch_segment(struct ssb_bus *bus, u8 seg) in ssb_pcmcia_switch_segment() argument
169 int err; in ssb_pcmcia_switch_segment() local
174 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_MEMSEG, seg); in ssb_pcmcia_switch_segment()
175 if (err) in ssb_pcmcia_switch_segment()
177 err = ssb_pcmcia_cfg_read(bus, SSB_PCMCIA_MEMSEG, &val); in ssb_pcmcia_switch_segment()
178 if (err) in ssb_pcmcia_switch_segment()
183 err = -ETIMEDOUT; in ssb_pcmcia_switch_segment()
188 bus->mapped_pcmcia_seg = seg; in ssb_pcmcia_switch_segment()
193 return err; in ssb_pcmcia_switch_segment()
199 struct ssb_bus *bus = dev->bus; in select_core_and_segment() local
200 int err; in select_core_and_segment() local
204 *offset -= 0x800; in select_core_and_segment()
209 if (unlikely(dev != bus->mapped_device)) { in select_core_and_segment()
210 err = ssb_pcmcia_switch_core(bus, dev); in select_core_and_segment()
211 if (unlikely(err)) in select_core_and_segment()
212 return err; in select_core_and_segment()
214 if (unlikely(need_segment != bus->mapped_pcmcia_seg)) { in select_core_and_segment()
215 err = ssb_pcmcia_switch_segment(bus, need_segment); in select_core_and_segment()
216 if (unlikely(err)) in select_core_and_segment()
217 return err; in select_core_and_segment()
225 struct ssb_bus *bus = dev->bus; in ssb_pcmcia_read8() local
227 int err; in ssb_pcmcia_read8() local
230 spin_lock_irqsave(&bus->bar_lock, flags); in ssb_pcmcia_read8()
231 err = select_core_and_segment(dev, &offset); in ssb_pcmcia_read8()
232 if (likely(!err)) in ssb_pcmcia_read8()
233 value = readb(bus->mmio + offset); in ssb_pcmcia_read8()
234 spin_unlock_irqrestore(&bus->bar_lock, flags); in ssb_pcmcia_read8()
241 struct ssb_bus *bus = dev->bus; in ssb_pcmcia_read16() local
243 int err; in ssb_pcmcia_read16() local
246 spin_lock_irqsave(&bus->bar_lock, flags); in ssb_pcmcia_read16()
247 err = select_core_and_segment(dev, &offset); in ssb_pcmcia_read16()
248 if (likely(!err)) in ssb_pcmcia_read16()
249 value = readw(bus->mmio + offset); in ssb_pcmcia_read16()
250 spin_unlock_irqrestore(&bus->bar_lock, flags); in ssb_pcmcia_read16()
257 struct ssb_bus *bus = dev->bus; in ssb_pcmcia_read32() local
259 int err; in ssb_pcmcia_read32() local
262 spin_lock_irqsave(&bus->bar_lock, flags); in ssb_pcmcia_read32()
263 err = select_core_and_segment(dev, &offset); in ssb_pcmcia_read32()
264 if (likely(!err)) { in ssb_pcmcia_read32()
265 lo = readw(bus->mmio + offset); in ssb_pcmcia_read32()
266 hi = readw(bus->mmio + offset + 2); in ssb_pcmcia_read32()
268 spin_unlock_irqrestore(&bus->bar_lock, flags); in ssb_pcmcia_read32()
277 struct ssb_bus *bus = dev->bus; in ssb_pcmcia_block_read() local
279 void __iomem *addr = bus->mmio + offset; in ssb_pcmcia_block_read()
280 int err; in ssb_pcmcia_block_read() local
282 spin_lock_irqsave(&bus->bar_lock, flags); in ssb_pcmcia_block_read()
283 err = select_core_and_segment(dev, &offset); in ssb_pcmcia_block_read()
284 if (unlikely(err)) { in ssb_pcmcia_block_read()
295 count--; in ssb_pcmcia_block_read()
306 count -= 2; in ssb_pcmcia_block_read()
319 count -= 4; in ssb_pcmcia_block_read()
327 spin_unlock_irqrestore(&bus->bar_lock, flags); in ssb_pcmcia_block_read()
333 struct ssb_bus *bus = dev->bus; in ssb_pcmcia_write8() local
335 int err; in ssb_pcmcia_write8() local
337 spin_lock_irqsave(&bus->bar_lock, flags); in ssb_pcmcia_write8()
338 err = select_core_and_segment(dev, &offset); in ssb_pcmcia_write8()
339 if (likely(!err)) in ssb_pcmcia_write8()
340 writeb(value, bus->mmio + offset); in ssb_pcmcia_write8()
341 spin_unlock_irqrestore(&bus->bar_lock, flags); in ssb_pcmcia_write8()
346 struct ssb_bus *bus = dev->bus; in ssb_pcmcia_write16() local
348 int err; in ssb_pcmcia_write16() local
350 spin_lock_irqsave(&bus->bar_lock, flags); in ssb_pcmcia_write16()
351 err = select_core_and_segment(dev, &offset); in ssb_pcmcia_write16()
352 if (likely(!err)) in ssb_pcmcia_write16()
353 writew(value, bus->mmio + offset); in ssb_pcmcia_write16()
354 spin_unlock_irqrestore(&bus->bar_lock, flags); in ssb_pcmcia_write16()
359 struct ssb_bus *bus = dev->bus; in ssb_pcmcia_write32() local
361 int err; in ssb_pcmcia_write32() local
363 spin_lock_irqsave(&bus->bar_lock, flags); in ssb_pcmcia_write32()
364 err = select_core_and_segment(dev, &offset); in ssb_pcmcia_write32()
365 if (likely(!err)) { in ssb_pcmcia_write32()
366 writew((value & 0x0000FFFF), bus->mmio + offset); in ssb_pcmcia_write32()
367 writew(((value & 0xFFFF0000) >> 16), bus->mmio + offset + 2); in ssb_pcmcia_write32()
369 spin_unlock_irqrestore(&bus->bar_lock, flags); in ssb_pcmcia_write32()
376 struct ssb_bus *bus = dev->bus; in ssb_pcmcia_block_write() local
378 void __iomem *addr = bus->mmio + offset; in ssb_pcmcia_block_write()
379 int err; in ssb_pcmcia_block_write() local
381 spin_lock_irqsave(&bus->bar_lock, flags); in ssb_pcmcia_block_write()
382 err = select_core_and_segment(dev, &offset); in ssb_pcmcia_block_write()
383 if (unlikely(err)) in ssb_pcmcia_block_write()
392 count--; in ssb_pcmcia_block_write()
403 count -= 2; in ssb_pcmcia_block_write()
416 count -= 4; in ssb_pcmcia_block_write()
424 spin_unlock_irqrestore(&bus->bar_lock, flags); in ssb_pcmcia_block_write()
442 static int ssb_pcmcia_sprom_command(struct ssb_bus *bus, u8 command) in ssb_pcmcia_sprom_command() argument
445 int err; in ssb_pcmcia_sprom_command() local
448 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_SPROMCTL, command); in ssb_pcmcia_sprom_command()
449 if (err) in ssb_pcmcia_sprom_command()
450 return err; in ssb_pcmcia_sprom_command()
452 err = ssb_pcmcia_cfg_read(bus, SSB_PCMCIA_SPROMCTL, &value); in ssb_pcmcia_sprom_command()
453 if (err) in ssb_pcmcia_sprom_command()
454 return err; in ssb_pcmcia_sprom_command()
460 return -ETIMEDOUT; in ssb_pcmcia_sprom_command()
464 static int ssb_pcmcia_sprom_read(struct ssb_bus *bus, u16 offset, u16 *value) in ssb_pcmcia_sprom_read() argument
466 int err; in ssb_pcmcia_sprom_read() local
471 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_SPROM_ADDRLO, in ssb_pcmcia_sprom_read()
473 if (err) in ssb_pcmcia_sprom_read()
474 return err; in ssb_pcmcia_sprom_read()
475 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_SPROM_ADDRHI, in ssb_pcmcia_sprom_read()
477 if (err) in ssb_pcmcia_sprom_read()
478 return err; in ssb_pcmcia_sprom_read()
479 err = ssb_pcmcia_sprom_command(bus, SSB_PCMCIA_SPROMCTL_READ); in ssb_pcmcia_sprom_read()
480 if (err) in ssb_pcmcia_sprom_read()
481 return err; in ssb_pcmcia_sprom_read()
482 err = ssb_pcmcia_cfg_read(bus, SSB_PCMCIA_SPROM_DATALO, &lo); in ssb_pcmcia_sprom_read()
483 if (err) in ssb_pcmcia_sprom_read()
484 return err; in ssb_pcmcia_sprom_read()
485 err = ssb_pcmcia_cfg_read(bus, SSB_PCMCIA_SPROM_DATAHI, &hi); in ssb_pcmcia_sprom_read()
486 if (err) in ssb_pcmcia_sprom_read()
487 return err; in ssb_pcmcia_sprom_read()
494 static int ssb_pcmcia_sprom_write(struct ssb_bus *bus, u16 offset, u16 value) in ssb_pcmcia_sprom_write() argument
496 int err; in ssb_pcmcia_sprom_write() local
500 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_SPROM_ADDRLO, in ssb_pcmcia_sprom_write()
502 if (err) in ssb_pcmcia_sprom_write()
503 return err; in ssb_pcmcia_sprom_write()
504 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_SPROM_ADDRHI, in ssb_pcmcia_sprom_write()
506 if (err) in ssb_pcmcia_sprom_write()
507 return err; in ssb_pcmcia_sprom_write()
508 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_SPROM_DATALO, in ssb_pcmcia_sprom_write()
510 if (err) in ssb_pcmcia_sprom_write()
511 return err; in ssb_pcmcia_sprom_write()
512 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_SPROM_DATAHI, in ssb_pcmcia_sprom_write()
514 if (err) in ssb_pcmcia_sprom_write()
515 return err; in ssb_pcmcia_sprom_write()
516 err = ssb_pcmcia_sprom_command(bus, SSB_PCMCIA_SPROMCTL_WRITE); in ssb_pcmcia_sprom_write()
517 if (err) in ssb_pcmcia_sprom_write()
518 return err; in ssb_pcmcia_sprom_write()
525 static int ssb_pcmcia_sprom_read_all(struct ssb_bus *bus, u16 *sprom) in ssb_pcmcia_sprom_read_all() argument
527 int err, i; in ssb_pcmcia_sprom_read_all() local
530 err = ssb_pcmcia_sprom_read(bus, i, &sprom[i]); in ssb_pcmcia_sprom_read_all()
531 if (err) in ssb_pcmcia_sprom_read_all()
532 return err; in ssb_pcmcia_sprom_read_all()
539 static int ssb_pcmcia_sprom_write_all(struct ssb_bus *bus, const u16 *sprom) in ssb_pcmcia_sprom_write_all() argument
541 int i, err; in ssb_pcmcia_sprom_write_all() local
546 err = ssb_pcmcia_sprom_command(bus, SSB_PCMCIA_SPROMCTL_WRITEEN); in ssb_pcmcia_sprom_write_all()
547 if (err) { in ssb_pcmcia_sprom_write_all()
549 return -EBUSY; in ssb_pcmcia_sprom_write_all()
562 err = ssb_pcmcia_sprom_write(bus, i, sprom[i]); in ssb_pcmcia_sprom_write_all()
563 if (err) { in ssb_pcmcia_sprom_write_all()
569 err = ssb_pcmcia_sprom_command(bus, SSB_PCMCIA_SPROMCTL_WRITEDIS); in ssb_pcmcia_sprom_write_all()
570 if (err) { in ssb_pcmcia_sprom_write_all()
580 return failed ? -EBUSY : 0; in ssb_pcmcia_sprom_write_all()
602 if (tuple->TupleData[0] != CISTPL_FUNCE_LAN_NODE_ID) in ssb_pcmcia_get_mac()
603 return -EINVAL; in ssb_pcmcia_get_mac()
604 if (tuple->TupleDataLen != ETH_ALEN + 2) in ssb_pcmcia_get_mac()
605 return -EINVAL; in ssb_pcmcia_get_mac()
606 if (tuple->TupleData[1] != ETH_ALEN) in ssb_pcmcia_get_mac()
607 return -EINVAL; in ssb_pcmcia_get_mac()
608 memcpy(sprom->il0mac, &tuple->TupleData[2], ETH_ALEN); in ssb_pcmcia_get_mac()
617 struct ssb_sprom *sprom = &iv->sprom; in ssb_pcmcia_do_get_invariants()
618 struct ssb_boardinfo *bi = &iv->boardinfo; in ssb_pcmcia_do_get_invariants()
621 GOTO_ERROR_ON(tuple->TupleDataLen < 1, "VEN tpl < 1"); in ssb_pcmcia_do_get_invariants()
622 switch (tuple->TupleData[0]) { in ssb_pcmcia_do_get_invariants()
624 GOTO_ERROR_ON((tuple->TupleDataLen != 5) && in ssb_pcmcia_do_get_invariants()
625 (tuple->TupleDataLen != 7), in ssb_pcmcia_do_get_invariants()
627 bi->vendor = tuple->TupleData[1] | in ssb_pcmcia_do_get_invariants()
628 ((u16)tuple->TupleData[2] << 8); in ssb_pcmcia_do_get_invariants()
631 GOTO_ERROR_ON(tuple->TupleDataLen != 2, in ssb_pcmcia_do_get_invariants()
633 sprom->board_rev = tuple->TupleData[1]; in ssb_pcmcia_do_get_invariants()
636 GOTO_ERROR_ON((tuple->TupleDataLen != 9) && in ssb_pcmcia_do_get_invariants()
637 (tuple->TupleDataLen != 10), in ssb_pcmcia_do_get_invariants()
639 sprom->pa0b0 = tuple->TupleData[1] | in ssb_pcmcia_do_get_invariants()
640 ((u16)tuple->TupleData[2] << 8); in ssb_pcmcia_do_get_invariants()
641 sprom->pa0b1 = tuple->TupleData[3] | in ssb_pcmcia_do_get_invariants()
642 ((u16)tuple->TupleData[4] << 8); in ssb_pcmcia_do_get_invariants()
643 sprom->pa0b2 = tuple->TupleData[5] | in ssb_pcmcia_do_get_invariants()
644 ((u16)tuple->TupleData[6] << 8); in ssb_pcmcia_do_get_invariants()
645 sprom->itssi_a = tuple->TupleData[7]; in ssb_pcmcia_do_get_invariants()
646 sprom->itssi_bg = tuple->TupleData[7]; in ssb_pcmcia_do_get_invariants()
647 sprom->maxpwr_a = tuple->TupleData[8]; in ssb_pcmcia_do_get_invariants()
648 sprom->maxpwr_bg = tuple->TupleData[8]; in ssb_pcmcia_do_get_invariants()
654 GOTO_ERROR_ON(tuple->TupleDataLen != 2, in ssb_pcmcia_do_get_invariants()
656 sprom->country_code = tuple->TupleData[1]; in ssb_pcmcia_do_get_invariants()
659 GOTO_ERROR_ON(tuple->TupleDataLen != 2, in ssb_pcmcia_do_get_invariants()
661 sprom->ant_available_a = tuple->TupleData[1]; in ssb_pcmcia_do_get_invariants()
662 sprom->ant_available_bg = tuple->TupleData[1]; in ssb_pcmcia_do_get_invariants()
665 GOTO_ERROR_ON(tuple->TupleDataLen != 2, in ssb_pcmcia_do_get_invariants()
667 sprom->antenna_gain.a0 = tuple->TupleData[1]; in ssb_pcmcia_do_get_invariants()
668 sprom->antenna_gain.a1 = tuple->TupleData[1]; in ssb_pcmcia_do_get_invariants()
669 sprom->antenna_gain.a2 = tuple->TupleData[1]; in ssb_pcmcia_do_get_invariants()
670 sprom->antenna_gain.a3 = tuple->TupleData[1]; in ssb_pcmcia_do_get_invariants()
673 GOTO_ERROR_ON((tuple->TupleDataLen != 3) && in ssb_pcmcia_do_get_invariants()
674 (tuple->TupleDataLen != 5), in ssb_pcmcia_do_get_invariants()
676 sprom->boardflags_lo = tuple->TupleData[1] | in ssb_pcmcia_do_get_invariants()
677 ((u16)tuple->TupleData[2] << 8); in ssb_pcmcia_do_get_invariants()
680 GOTO_ERROR_ON(tuple->TupleDataLen != 5, in ssb_pcmcia_do_get_invariants()
682 sprom->gpio0 = tuple->TupleData[1]; in ssb_pcmcia_do_get_invariants()
683 sprom->gpio1 = tuple->TupleData[2]; in ssb_pcmcia_do_get_invariants()
684 sprom->gpio2 = tuple->TupleData[3]; in ssb_pcmcia_do_get_invariants()
685 sprom->gpio3 = tuple->TupleData[4]; in ssb_pcmcia_do_get_invariants()
688 return -ENOSPC; /* continue with next entry */ in ssb_pcmcia_do_get_invariants()
693 return -ENODEV; in ssb_pcmcia_do_get_invariants()
697 int ssb_pcmcia_get_invariants(struct ssb_bus *bus, in ssb_pcmcia_get_invariants() argument
700 struct ssb_sprom *sprom = &iv->sprom; in ssb_pcmcia_get_invariants()
704 sprom->revision = 1; in ssb_pcmcia_get_invariants()
705 sprom->boardflags_lo = 0; in ssb_pcmcia_get_invariants()
706 sprom->boardflags_hi = 0; in ssb_pcmcia_get_invariants()
709 res = pcmcia_loop_tuple(bus->host_pcmcia, CISTPL_FUNCE, in ssb_pcmcia_get_invariants()
713 return -ENODEV; in ssb_pcmcia_get_invariants()
717 res = pcmcia_loop_tuple(bus->host_pcmcia, SSB_PCMCIA_CIS, in ssb_pcmcia_get_invariants()
719 if ((res == 0) || (res == -ENOSPC)) in ssb_pcmcia_get_invariants()
723 return -ENODEV; in ssb_pcmcia_get_invariants()
732 struct ssb_bus *bus; in ssb_sprom_show() local
734 bus = ssb_pcmcia_dev_to_bus(pdev); in ssb_sprom_show()
735 if (!bus) in ssb_sprom_show()
736 return -ENODEV; in ssb_sprom_show()
738 return ssb_attr_sprom_show(bus, buf, in ssb_sprom_show()
748 struct ssb_bus *bus; in ssb_sprom_store() local
750 bus = ssb_pcmcia_dev_to_bus(pdev); in ssb_sprom_store()
751 if (!bus) in ssb_sprom_store()
752 return -ENODEV; in ssb_sprom_store()
754 return ssb_attr_sprom_store(bus, buf, count, in ssb_sprom_store()
761 static int ssb_pcmcia_cor_setup(struct ssb_bus *bus, u8 cor) in ssb_pcmcia_cor_setup() argument
764 int err; in ssb_pcmcia_cor_setup() local
766 err = ssb_pcmcia_cfg_read(bus, cor, &val); in ssb_pcmcia_cor_setup()
767 if (err) in ssb_pcmcia_cor_setup()
768 return err; in ssb_pcmcia_cor_setup()
771 err = ssb_pcmcia_cfg_write(bus, cor, val); in ssb_pcmcia_cor_setup()
772 if (err) in ssb_pcmcia_cor_setup()
773 return err; in ssb_pcmcia_cor_setup()
780 int ssb_pcmcia_hardware_setup(struct ssb_bus *bus) in ssb_pcmcia_hardware_setup() argument
782 int err; in ssb_pcmcia_hardware_setup() local
784 if (bus->bustype != SSB_BUSTYPE_PCMCIA) in ssb_pcmcia_hardware_setup()
788 * bus->mapped_pcmcia_seg with hardware state. */ in ssb_pcmcia_hardware_setup()
789 ssb_pcmcia_switch_segment(bus, 0); in ssb_pcmcia_hardware_setup()
791 err = ssb_pcmcia_cor_setup(bus, CISREG_COR); in ssb_pcmcia_hardware_setup()
792 if (err) in ssb_pcmcia_hardware_setup()
793 return err; in ssb_pcmcia_hardware_setup()
795 err = ssb_pcmcia_cor_setup(bus, CISREG_COR + 0x80); in ssb_pcmcia_hardware_setup()
796 if (err) in ssb_pcmcia_hardware_setup()
797 return err; in ssb_pcmcia_hardware_setup()
802 void ssb_pcmcia_exit(struct ssb_bus *bus) in ssb_pcmcia_exit() argument
804 if (bus->bustype != SSB_BUSTYPE_PCMCIA) in ssb_pcmcia_exit()
807 device_remove_file(&bus->host_pcmcia->dev, &dev_attr_ssb_sprom); in ssb_pcmcia_exit()
810 int ssb_pcmcia_init(struct ssb_bus *bus) in ssb_pcmcia_init() argument
812 int err; in ssb_pcmcia_init() local
814 if (bus->bustype != SSB_BUSTYPE_PCMCIA) in ssb_pcmcia_init()
817 err = ssb_pcmcia_hardware_setup(bus); in ssb_pcmcia_init()
818 if (err) in ssb_pcmcia_init()
821 bus->sprom_size = SSB_PCMCIA_SPROM_SIZE; in ssb_pcmcia_init()
822 mutex_init(&bus->sprom_mutex); in ssb_pcmcia_init()
823 err = device_create_file(&bus->host_pcmcia->dev, &dev_attr_ssb_sprom); in ssb_pcmcia_init()
824 if (err) in ssb_pcmcia_init()
830 return err; in ssb_pcmcia_init()