bcm53xx: fix hangs in PCIe2 host driver
[openwrt.git] / target / linux / bcm53xx / patches-3.14 / 901-bcma-register-SoC-later-as-a-module.patch
1 From fee1501c494954f6e889563ca44aadfe4a83a643 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Tue, 14 Oct 2014 00:05:42 +0200
4 Subject: [PATCH] bcma: register SoC later (as a module)
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 This is temporary workaround required for easier debugging.
10
11 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
12 ---
13  drivers/bcma/host_soc.c | 12 ++++++++++--
14  1 file changed, 10 insertions(+), 2 deletions(-)
15
16 diff --git a/drivers/bcma/host_soc.c b/drivers/bcma/host_soc.c
17 index 335cbcf..c7e12f2 100644
18 --- a/drivers/bcma/host_soc.c
19 +++ b/drivers/bcma/host_soc.c
20 @@ -265,14 +265,22 @@ static struct platform_driver bcma_host_soc_driver = {
21         .probe          = bcma_host_soc_probe,
22         .remove         = bcma_host_soc_remove,
23  };
24 +/* FIXME: Using module_platform_driver is a temp hack to get bcma SoC
25 + * initialzed *after* serial console. This way we get some logs in case of hang
26 + * inside bcma or related driver. We need that for debugging problems and it's
27 + * also useful for development. Otherwise any hang (in flash driver, PCIe
28 + * driver, USB driver, etc.) would result in not getting logs at all.
29 + */
30 +module_platform_driver(bcma_host_soc_driver);
31  
32  int __init bcma_host_soc_register_driver(void)
33  {
34 -       return platform_driver_register(&bcma_host_soc_driver);
35 +       /* return platform_driver_register(&bcma_host_soc_driver); */
36 +       return 0;
37  }
38  
39  void __exit bcma_host_soc_unregister_driver(void)
40  {
41 -       platform_driver_unregister(&bcma_host_soc_driver);
42 +       /* platform_driver_unregister(&bcma_host_soc_driver); */
43  }
44  #endif /* CONFIG_OF */
45 -- 
46 1.8.4.5
47