020-ssb-backport.patch 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. --- a/arch/mips/bcm47xx/Kconfig
  2. +++ b/arch/mips/bcm47xx/Kconfig
  3. @@ -4,6 +4,7 @@ config BCM47XX_SSB
  4. bool "SSB Support for Broadcom BCM47XX"
  5. select SYS_HAS_CPU_BMIPS32_3300
  6. select SSB
  7. + select SSB_HOST_SOC
  8. select SSB_DRIVER_MIPS
  9. select SSB_DRIVER_EXTIF
  10. select SSB_EMBEDDED
  11. --- a/drivers/ssb/Kconfig
  12. +++ b/drivers/ssb/Kconfig
  13. @@ -80,6 +80,15 @@ config SSB_SDIOHOST
  14. If unsure, say N
  15. +config SSB_HOST_SOC
  16. + bool "Support for SSB bus on SoC"
  17. + depends on SSB
  18. + help
  19. + Host interface for a SSB directly mapped into memory. This is
  20. + for some Broadcom SoCs from the BCM47xx and BCM53xx lines.
  21. +
  22. + If unsure, say N
  23. +
  24. config SSB_SILENT
  25. bool "No SSB kernel messages"
  26. depends on SSB && EXPERT
  27. --- a/drivers/ssb/Makefile
  28. +++ b/drivers/ssb/Makefile
  29. @@ -5,8 +5,9 @@ ssb-$(CONFIG_SSB_SPROM) += sprom.o
  30. # host support
  31. ssb-$(CONFIG_SSB_PCIHOST) += pci.o pcihost_wrapper.o
  32. -ssb-$(CONFIG_SSB_PCMCIAHOST) += pcmcia.o
  33. +ssb-$(CONFIG_SSB_PCMCIAHOST) += pcmcia.o bridge_pcmcia_80211.o
  34. ssb-$(CONFIG_SSB_SDIOHOST) += sdio.o
  35. +ssb-$(CONFIG_SSB_HOST_SOC) += host_soc.o
  36. # built-in drivers
  37. ssb-y += driver_chipcommon.o
  38. --- /dev/null
  39. +++ b/drivers/ssb/bridge_pcmcia_80211.c
  40. @@ -0,0 +1,128 @@
  41. +/*
  42. + * Broadcom 43xx PCMCIA-SSB bridge module
  43. + *
  44. + * Copyright (c) 2007 Michael Buesch <m@bues.ch>
  45. + *
  46. + * Licensed under the GNU/GPL. See COPYING for details.
  47. + */
  48. +
  49. +#include <linux/ssb/ssb.h>
  50. +#include <linux/slab.h>
  51. +#include <linux/module.h>
  52. +
  53. +#include <pcmcia/cistpl.h>
  54. +#include <pcmcia/ciscode.h>
  55. +#include <pcmcia/ds.h>
  56. +#include <pcmcia/cisreg.h>
  57. +
  58. +#include "ssb_private.h"
  59. +
  60. +static const struct pcmcia_device_id ssb_host_pcmcia_tbl[] = {
  61. + PCMCIA_DEVICE_MANF_CARD(0x2D0, 0x448),
  62. + PCMCIA_DEVICE_MANF_CARD(0x2D0, 0x476),
  63. + PCMCIA_DEVICE_NULL,
  64. +};
  65. +
  66. +MODULE_DEVICE_TABLE(pcmcia, ssb_host_pcmcia_tbl);
  67. +
  68. +static int ssb_host_pcmcia_probe(struct pcmcia_device *dev)
  69. +{
  70. + struct ssb_bus *ssb;
  71. + int err = -ENOMEM;
  72. + int res = 0;
  73. +
  74. + ssb = kzalloc(sizeof(*ssb), GFP_KERNEL);
  75. + if (!ssb)
  76. + goto out_error;
  77. +
  78. + err = -ENODEV;
  79. +
  80. + dev->config_flags |= CONF_ENABLE_IRQ;
  81. +
  82. + dev->resource[2]->flags |= WIN_ENABLE | WIN_DATA_WIDTH_16 |
  83. + WIN_USE_WAIT;
  84. + dev->resource[2]->start = 0;
  85. + dev->resource[2]->end = SSB_CORE_SIZE;
  86. + res = pcmcia_request_window(dev, dev->resource[2], 250);
  87. + if (res != 0)
  88. + goto err_kfree_ssb;
  89. +
  90. + res = pcmcia_map_mem_page(dev, dev->resource[2], 0);
  91. + if (res != 0)
  92. + goto err_disable;
  93. +
  94. + if (!dev->irq)
  95. + goto err_disable;
  96. +
  97. + res = pcmcia_enable_device(dev);
  98. + if (res != 0)
  99. + goto err_disable;
  100. +
  101. + err = ssb_bus_pcmciabus_register(ssb, dev, dev->resource[2]->start);
  102. + if (err)
  103. + goto err_disable;
  104. + dev->priv = ssb;
  105. +
  106. + return 0;
  107. +
  108. +err_disable:
  109. + pcmcia_disable_device(dev);
  110. +err_kfree_ssb:
  111. + kfree(ssb);
  112. +out_error:
  113. + ssb_err("Initialization failed (%d, %d)\n", res, err);
  114. + return err;
  115. +}
  116. +
  117. +static void ssb_host_pcmcia_remove(struct pcmcia_device *dev)
  118. +{
  119. + struct ssb_bus *ssb = dev->priv;
  120. +
  121. + ssb_bus_unregister(ssb);
  122. + pcmcia_disable_device(dev);
  123. + kfree(ssb);
  124. + dev->priv = NULL;
  125. +}
  126. +
  127. +#ifdef CONFIG_PM
  128. +static int ssb_host_pcmcia_suspend(struct pcmcia_device *dev)
  129. +{
  130. + struct ssb_bus *ssb = dev->priv;
  131. +
  132. + return ssb_bus_suspend(ssb);
  133. +}
  134. +
  135. +static int ssb_host_pcmcia_resume(struct pcmcia_device *dev)
  136. +{
  137. + struct ssb_bus *ssb = dev->priv;
  138. +
  139. + return ssb_bus_resume(ssb);
  140. +}
  141. +#else /* CONFIG_PM */
  142. +# define ssb_host_pcmcia_suspend NULL
  143. +# define ssb_host_pcmcia_resume NULL
  144. +#endif /* CONFIG_PM */
  145. +
  146. +static struct pcmcia_driver ssb_host_pcmcia_driver = {
  147. + .owner = THIS_MODULE,
  148. + .name = "ssb-pcmcia",
  149. + .id_table = ssb_host_pcmcia_tbl,
  150. + .probe = ssb_host_pcmcia_probe,
  151. + .remove = ssb_host_pcmcia_remove,
  152. + .suspend = ssb_host_pcmcia_suspend,
  153. + .resume = ssb_host_pcmcia_resume,
  154. +};
  155. +
  156. +/*
  157. + * These are not module init/exit functions!
  158. + * The module_pcmcia_driver() helper cannot be used here.
  159. + */
  160. +int ssb_host_pcmcia_init(void)
  161. +{
  162. + return pcmcia_register_driver(&ssb_host_pcmcia_driver);
  163. +}
  164. +
  165. +void ssb_host_pcmcia_exit(void)
  166. +{
  167. + pcmcia_unregister_driver(&ssb_host_pcmcia_driver);
  168. +}
  169. --- /dev/null
  170. +++ b/drivers/ssb/host_soc.c
  171. @@ -0,0 +1,173 @@
  172. +/*
  173. + * Sonics Silicon Backplane SoC host related functions.
  174. + * Subsystem core
  175. + *
  176. + * Copyright 2005, Broadcom Corporation
  177. + * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
  178. + *
  179. + * Licensed under the GNU/GPL. See COPYING for details.
  180. + */
  181. +
  182. +#include <linux/ssb/ssb.h>
  183. +
  184. +#include "ssb_private.h"
  185. +
  186. +static u8 ssb_host_soc_read8(struct ssb_device *dev, u16 offset)
  187. +{
  188. + struct ssb_bus *bus = dev->bus;
  189. +
  190. + offset += dev->core_index * SSB_CORE_SIZE;
  191. + return readb(bus->mmio + offset);
  192. +}
  193. +
  194. +static u16 ssb_host_soc_read16(struct ssb_device *dev, u16 offset)
  195. +{
  196. + struct ssb_bus *bus = dev->bus;
  197. +
  198. + offset += dev->core_index * SSB_CORE_SIZE;
  199. + return readw(bus->mmio + offset);
  200. +}
  201. +
  202. +static u32 ssb_host_soc_read32(struct ssb_device *dev, u16 offset)
  203. +{
  204. + struct ssb_bus *bus = dev->bus;
  205. +
  206. + offset += dev->core_index * SSB_CORE_SIZE;
  207. + return readl(bus->mmio + offset);
  208. +}
  209. +
  210. +#ifdef CONFIG_SSB_BLOCKIO
  211. +static void ssb_host_soc_block_read(struct ssb_device *dev, void *buffer,
  212. + size_t count, u16 offset, u8 reg_width)
  213. +{
  214. + struct ssb_bus *bus = dev->bus;
  215. + void __iomem *addr;
  216. +
  217. + offset += dev->core_index * SSB_CORE_SIZE;
  218. + addr = bus->mmio + offset;
  219. +
  220. + switch (reg_width) {
  221. + case sizeof(u8): {
  222. + u8 *buf = buffer;
  223. +
  224. + while (count) {
  225. + *buf = __raw_readb(addr);
  226. + buf++;
  227. + count--;
  228. + }
  229. + break;
  230. + }
  231. + case sizeof(u16): {
  232. + __le16 *buf = buffer;
  233. +
  234. + SSB_WARN_ON(count & 1);
  235. + while (count) {
  236. + *buf = (__force __le16)__raw_readw(addr);
  237. + buf++;
  238. + count -= 2;
  239. + }
  240. + break;
  241. + }
  242. + case sizeof(u32): {
  243. + __le32 *buf = buffer;
  244. +
  245. + SSB_WARN_ON(count & 3);
  246. + while (count) {
  247. + *buf = (__force __le32)__raw_readl(addr);
  248. + buf++;
  249. + count -= 4;
  250. + }
  251. + break;
  252. + }
  253. + default:
  254. + SSB_WARN_ON(1);
  255. + }
  256. +}
  257. +#endif /* CONFIG_SSB_BLOCKIO */
  258. +
  259. +static void ssb_host_soc_write8(struct ssb_device *dev, u16 offset, u8 value)
  260. +{
  261. + struct ssb_bus *bus = dev->bus;
  262. +
  263. + offset += dev->core_index * SSB_CORE_SIZE;
  264. + writeb(value, bus->mmio + offset);
  265. +}
  266. +
  267. +static void ssb_host_soc_write16(struct ssb_device *dev, u16 offset, u16 value)
  268. +{
  269. + struct ssb_bus *bus = dev->bus;
  270. +
  271. + offset += dev->core_index * SSB_CORE_SIZE;
  272. + writew(value, bus->mmio + offset);
  273. +}
  274. +
  275. +static void ssb_host_soc_write32(struct ssb_device *dev, u16 offset, u32 value)
  276. +{
  277. + struct ssb_bus *bus = dev->bus;
  278. +
  279. + offset += dev->core_index * SSB_CORE_SIZE;
  280. + writel(value, bus->mmio + offset);
  281. +}
  282. +
  283. +#ifdef CONFIG_SSB_BLOCKIO
  284. +static void ssb_host_soc_block_write(struct ssb_device *dev, const void *buffer,
  285. + size_t count, u16 offset, u8 reg_width)
  286. +{
  287. + struct ssb_bus *bus = dev->bus;
  288. + void __iomem *addr;
  289. +
  290. + offset += dev->core_index * SSB_CORE_SIZE;
  291. + addr = bus->mmio + offset;
  292. +
  293. + switch (reg_width) {
  294. + case sizeof(u8): {
  295. + const u8 *buf = buffer;
  296. +
  297. + while (count) {
  298. + __raw_writeb(*buf, addr);
  299. + buf++;
  300. + count--;
  301. + }
  302. + break;
  303. + }
  304. + case sizeof(u16): {
  305. + const __le16 *buf = buffer;
  306. +
  307. + SSB_WARN_ON(count & 1);
  308. + while (count) {
  309. + __raw_writew((__force u16)(*buf), addr);
  310. + buf++;
  311. + count -= 2;
  312. + }
  313. + break;
  314. + }
  315. + case sizeof(u32): {
  316. + const __le32 *buf = buffer;
  317. +
  318. + SSB_WARN_ON(count & 3);
  319. + while (count) {
  320. + __raw_writel((__force u32)(*buf), addr);
  321. + buf++;
  322. + count -= 4;
  323. + }
  324. + break;
  325. + }
  326. + default:
  327. + SSB_WARN_ON(1);
  328. + }
  329. +}
  330. +#endif /* CONFIG_SSB_BLOCKIO */
  331. +
  332. +/* Ops for the plain SSB bus without a host-device (no PCI or PCMCIA). */
  333. +const struct ssb_bus_ops ssb_host_soc_ops = {
  334. + .read8 = ssb_host_soc_read8,
  335. + .read16 = ssb_host_soc_read16,
  336. + .read32 = ssb_host_soc_read32,
  337. + .write8 = ssb_host_soc_write8,
  338. + .write16 = ssb_host_soc_write16,
  339. + .write32 = ssb_host_soc_write32,
  340. +#ifdef CONFIG_SSB_BLOCKIO
  341. + .block_read = ssb_host_soc_block_read,
  342. + .block_write = ssb_host_soc_block_write,
  343. +#endif
  344. +};
  345. --- a/drivers/ssb/main.c
  346. +++ b/drivers/ssb/main.c
  347. @@ -596,166 +596,6 @@ error:
  348. return err;
  349. }
  350. -static u8 ssb_ssb_read8(struct ssb_device *dev, u16 offset)
  351. -{
  352. - struct ssb_bus *bus = dev->bus;
  353. -
  354. - offset += dev->core_index * SSB_CORE_SIZE;
  355. - return readb(bus->mmio + offset);
  356. -}
  357. -
  358. -static u16 ssb_ssb_read16(struct ssb_device *dev, u16 offset)
  359. -{
  360. - struct ssb_bus *bus = dev->bus;
  361. -
  362. - offset += dev->core_index * SSB_CORE_SIZE;
  363. - return readw(bus->mmio + offset);
  364. -}
  365. -
  366. -static u32 ssb_ssb_read32(struct ssb_device *dev, u16 offset)
  367. -{
  368. - struct ssb_bus *bus = dev->bus;
  369. -
  370. - offset += dev->core_index * SSB_CORE_SIZE;
  371. - return readl(bus->mmio + offset);
  372. -}
  373. -
  374. -#ifdef CONFIG_SSB_BLOCKIO
  375. -static void ssb_ssb_block_read(struct ssb_device *dev, void *buffer,
  376. - size_t count, u16 offset, u8 reg_width)
  377. -{
  378. - struct ssb_bus *bus = dev->bus;
  379. - void __iomem *addr;
  380. -
  381. - offset += dev->core_index * SSB_CORE_SIZE;
  382. - addr = bus->mmio + offset;
  383. -
  384. - switch (reg_width) {
  385. - case sizeof(u8): {
  386. - u8 *buf = buffer;
  387. -
  388. - while (count) {
  389. - *buf = __raw_readb(addr);
  390. - buf++;
  391. - count--;
  392. - }
  393. - break;
  394. - }
  395. - case sizeof(u16): {
  396. - __le16 *buf = buffer;
  397. -
  398. - SSB_WARN_ON(count & 1);
  399. - while (count) {
  400. - *buf = (__force __le16)__raw_readw(addr);
  401. - buf++;
  402. - count -= 2;
  403. - }
  404. - break;
  405. - }
  406. - case sizeof(u32): {
  407. - __le32 *buf = buffer;
  408. -
  409. - SSB_WARN_ON(count & 3);
  410. - while (count) {
  411. - *buf = (__force __le32)__raw_readl(addr);
  412. - buf++;
  413. - count -= 4;
  414. - }
  415. - break;
  416. - }
  417. - default:
  418. - SSB_WARN_ON(1);
  419. - }
  420. -}
  421. -#endif /* CONFIG_SSB_BLOCKIO */
  422. -
  423. -static void ssb_ssb_write8(struct ssb_device *dev, u16 offset, u8 value)
  424. -{
  425. - struct ssb_bus *bus = dev->bus;
  426. -
  427. - offset += dev->core_index * SSB_CORE_SIZE;
  428. - writeb(value, bus->mmio + offset);
  429. -}
  430. -
  431. -static void ssb_ssb_write16(struct ssb_device *dev, u16 offset, u16 value)
  432. -{
  433. - struct ssb_bus *bus = dev->bus;
  434. -
  435. - offset += dev->core_index * SSB_CORE_SIZE;
  436. - writew(value, bus->mmio + offset);
  437. -}
  438. -
  439. -static void ssb_ssb_write32(struct ssb_device *dev, u16 offset, u32 value)
  440. -{
  441. - struct ssb_bus *bus = dev->bus;
  442. -
  443. - offset += dev->core_index * SSB_CORE_SIZE;
  444. - writel(value, bus->mmio + offset);
  445. -}
  446. -
  447. -#ifdef CONFIG_SSB_BLOCKIO
  448. -static void ssb_ssb_block_write(struct ssb_device *dev, const void *buffer,
  449. - size_t count, u16 offset, u8 reg_width)
  450. -{
  451. - struct ssb_bus *bus = dev->bus;
  452. - void __iomem *addr;
  453. -
  454. - offset += dev->core_index * SSB_CORE_SIZE;
  455. - addr = bus->mmio + offset;
  456. -
  457. - switch (reg_width) {
  458. - case sizeof(u8): {
  459. - const u8 *buf = buffer;
  460. -
  461. - while (count) {
  462. - __raw_writeb(*buf, addr);
  463. - buf++;
  464. - count--;
  465. - }
  466. - break;
  467. - }
  468. - case sizeof(u16): {
  469. - const __le16 *buf = buffer;
  470. -
  471. - SSB_WARN_ON(count & 1);
  472. - while (count) {
  473. - __raw_writew((__force u16)(*buf), addr);
  474. - buf++;
  475. - count -= 2;
  476. - }
  477. - break;
  478. - }
  479. - case sizeof(u32): {
  480. - const __le32 *buf = buffer;
  481. -
  482. - SSB_WARN_ON(count & 3);
  483. - while (count) {
  484. - __raw_writel((__force u32)(*buf), addr);
  485. - buf++;
  486. - count -= 4;
  487. - }
  488. - break;
  489. - }
  490. - default:
  491. - SSB_WARN_ON(1);
  492. - }
  493. -}
  494. -#endif /* CONFIG_SSB_BLOCKIO */
  495. -
  496. -/* Ops for the plain SSB bus without a host-device (no PCI or PCMCIA). */
  497. -static const struct ssb_bus_ops ssb_ssb_ops = {
  498. - .read8 = ssb_ssb_read8,
  499. - .read16 = ssb_ssb_read16,
  500. - .read32 = ssb_ssb_read32,
  501. - .write8 = ssb_ssb_write8,
  502. - .write16 = ssb_ssb_write16,
  503. - .write32 = ssb_ssb_write32,
  504. -#ifdef CONFIG_SSB_BLOCKIO
  505. - .block_read = ssb_ssb_block_read,
  506. - .block_write = ssb_ssb_block_write,
  507. -#endif
  508. -};
  509. -
  510. static int ssb_fetch_invariants(struct ssb_bus *bus,
  511. ssb_invariants_func_t get_invariants)
  512. {
  513. @@ -876,7 +716,6 @@ int ssb_bus_pcibus_register(struct ssb_b
  514. return err;
  515. }
  516. -EXPORT_SYMBOL(ssb_bus_pcibus_register);
  517. #endif /* CONFIG_SSB_PCIHOST */
  518. #ifdef CONFIG_SSB_PCMCIAHOST
  519. @@ -898,7 +737,6 @@ int ssb_bus_pcmciabus_register(struct ss
  520. return err;
  521. }
  522. -EXPORT_SYMBOL(ssb_bus_pcmciabus_register);
  523. #endif /* CONFIG_SSB_PCMCIAHOST */
  524. #ifdef CONFIG_SSB_SDIOHOST
  525. @@ -923,13 +761,14 @@ int ssb_bus_sdiobus_register(struct ssb_
  526. EXPORT_SYMBOL(ssb_bus_sdiobus_register);
  527. #endif /* CONFIG_SSB_PCMCIAHOST */
  528. +#ifdef CONFIG_SSB_HOST_SOC
  529. int ssb_bus_ssbbus_register(struct ssb_bus *bus, unsigned long baseaddr,
  530. ssb_invariants_func_t get_invariants)
  531. {
  532. int err;
  533. bus->bustype = SSB_BUSTYPE_SSB;
  534. - bus->ops = &ssb_ssb_ops;
  535. + bus->ops = &ssb_host_soc_ops;
  536. err = ssb_bus_register(bus, get_invariants, baseaddr);
  537. if (!err) {
  538. @@ -939,6 +778,7 @@ int ssb_bus_ssbbus_register(struct ssb_b
  539. return err;
  540. }
  541. +#endif
  542. int __ssb_driver_register(struct ssb_driver *drv, struct module *owner)
  543. {
  544. @@ -1465,6 +1305,12 @@ static int __init ssb_modinit(void)
  545. /* don't fail SSB init because of this */
  546. err = 0;
  547. }
  548. + err = ssb_host_pcmcia_init();
  549. + if (err) {
  550. + ssb_err("PCMCIA host initialization failed\n");
  551. + /* don't fail SSB init because of this */
  552. + err = 0;
  553. + }
  554. err = ssb_gige_init();
  555. if (err) {
  556. ssb_err("SSB Broadcom Gigabit Ethernet driver initialization failed\n");
  557. @@ -1482,6 +1328,7 @@ fs_initcall(ssb_modinit);
  558. static void __exit ssb_modexit(void)
  559. {
  560. ssb_gige_exit();
  561. + ssb_host_pcmcia_exit();
  562. b43_pci_ssb_bridge_exit();
  563. bus_unregister(&ssb_bustype);
  564. }
  565. --- a/drivers/ssb/pcmcia.c
  566. +++ b/drivers/ssb/pcmcia.c
  567. @@ -147,8 +147,7 @@ error:
  568. return err;
  569. }
  570. -int ssb_pcmcia_switch_core(struct ssb_bus *bus,
  571. - struct ssb_device *dev)
  572. +static int ssb_pcmcia_switch_core(struct ssb_bus *bus, struct ssb_device *dev)
  573. {
  574. int err;
  575. --- a/drivers/ssb/sdio.c
  576. +++ b/drivers/ssb/sdio.c
  577. @@ -200,7 +200,7 @@ out:
  578. }
  579. /* host must be already claimed */
  580. -int ssb_sdio_switch_core(struct ssb_bus *bus, struct ssb_device *dev)
  581. +static int ssb_sdio_switch_core(struct ssb_bus *bus, struct ssb_device *dev)
  582. {
  583. u8 coreidx = dev->core_index;
  584. u32 sbaddr;
  585. --- a/drivers/ssb/ssb_private.h
  586. +++ b/drivers/ssb/ssb_private.h
  587. @@ -85,8 +85,6 @@ static inline int ssb_pci_init(struct ss
  588. /* pcmcia.c */
  589. #ifdef CONFIG_SSB_PCMCIAHOST
  590. -extern int ssb_pcmcia_switch_core(struct ssb_bus *bus,
  591. - struct ssb_device *dev);
  592. extern int ssb_pcmcia_switch_coreidx(struct ssb_bus *bus,
  593. u8 coreidx);
  594. extern int ssb_pcmcia_switch_segment(struct ssb_bus *bus,
  595. @@ -96,13 +94,10 @@ extern int ssb_pcmcia_get_invariants(str
  596. extern int ssb_pcmcia_hardware_setup(struct ssb_bus *bus);
  597. extern void ssb_pcmcia_exit(struct ssb_bus *bus);
  598. extern int ssb_pcmcia_init(struct ssb_bus *bus);
  599. +extern int ssb_host_pcmcia_init(void);
  600. +extern void ssb_host_pcmcia_exit(void);
  601. extern const struct ssb_bus_ops ssb_pcmcia_ops;
  602. #else /* CONFIG_SSB_PCMCIAHOST */
  603. -static inline int ssb_pcmcia_switch_core(struct ssb_bus *bus,
  604. - struct ssb_device *dev)
  605. -{
  606. - return 0;
  607. -}
  608. static inline int ssb_pcmcia_switch_coreidx(struct ssb_bus *bus,
  609. u8 coreidx)
  610. {
  611. @@ -124,6 +119,13 @@ static inline int ssb_pcmcia_init(struct
  612. {
  613. return 0;
  614. }
  615. +static inline int ssb_host_pcmcia_init(void)
  616. +{
  617. + return 0;
  618. +}
  619. +static inline void ssb_host_pcmcia_exit(void)
  620. +{
  621. +}
  622. #endif /* CONFIG_SSB_PCMCIAHOST */
  623. /* sdio.c */
  624. @@ -132,9 +134,7 @@ extern int ssb_sdio_get_invariants(struc
  625. struct ssb_init_invariants *iv);
  626. extern u32 ssb_sdio_scan_read32(struct ssb_bus *bus, u16 offset);
  627. -extern int ssb_sdio_switch_core(struct ssb_bus *bus, struct ssb_device *dev);
  628. extern int ssb_sdio_scan_switch_coreidx(struct ssb_bus *bus, u8 coreidx);
  629. -extern int ssb_sdio_hardware_setup(struct ssb_bus *bus);
  630. extern void ssb_sdio_exit(struct ssb_bus *bus);
  631. extern int ssb_sdio_init(struct ssb_bus *bus);
  632. @@ -144,19 +144,10 @@ static inline u32 ssb_sdio_scan_read32(s
  633. {
  634. return 0;
  635. }
  636. -static inline int ssb_sdio_switch_core(struct ssb_bus *bus,
  637. - struct ssb_device *dev)
  638. -{
  639. - return 0;
  640. -}
  641. static inline int ssb_sdio_scan_switch_coreidx(struct ssb_bus *bus, u8 coreidx)
  642. {
  643. return 0;
  644. }
  645. -static inline int ssb_sdio_hardware_setup(struct ssb_bus *bus)
  646. -{
  647. - return 0;
  648. -}
  649. static inline void ssb_sdio_exit(struct ssb_bus *bus)
  650. {
  651. }
  652. @@ -166,6 +157,13 @@ static inline int ssb_sdio_init(struct s
  653. }
  654. #endif /* CONFIG_SSB_SDIOHOST */
  655. +/**************************************************
  656. + * host_soc.c
  657. + **************************************************/
  658. +
  659. +#ifdef CONFIG_SSB_HOST_SOC
  660. +extern const struct ssb_bus_ops ssb_host_soc_ops;
  661. +#endif
  662. /* scan.c */
  663. extern const char *ssb_core_name(u16 coreid);