diff options
Diffstat (limited to 'drivers/ssb/main.c')
-rw-r--r-- | drivers/ssb/main.c | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index f8a13f863217..29c7d4f9d1ae 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Subsystem core | 3 | * Subsystem core |
4 | * | 4 | * |
5 | * Copyright 2005, Broadcom Corporation | 5 | * Copyright 2005, Broadcom Corporation |
6 | * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de> | 6 | * Copyright 2006, 2007, Michael Buesch <m@bues.ch> |
7 | * | 7 | * |
8 | * Licensed under the GNU/GPL. See COPYING for details. | 8 | * Licensed under the GNU/GPL. See COPYING for details. |
9 | */ | 9 | */ |
@@ -557,7 +557,7 @@ error: | |||
557 | } | 557 | } |
558 | 558 | ||
559 | /* Needs ssb_buses_lock() */ | 559 | /* Needs ssb_buses_lock() */ |
560 | static int ssb_attach_queued_buses(void) | 560 | static int __devinit ssb_attach_queued_buses(void) |
561 | { | 561 | { |
562 | struct ssb_bus *bus, *n; | 562 | struct ssb_bus *bus, *n; |
563 | int err = 0; | 563 | int err = 0; |
@@ -768,9 +768,9 @@ out: | |||
768 | return err; | 768 | return err; |
769 | } | 769 | } |
770 | 770 | ||
771 | static int ssb_bus_register(struct ssb_bus *bus, | 771 | static int __devinit ssb_bus_register(struct ssb_bus *bus, |
772 | ssb_invariants_func_t get_invariants, | 772 | ssb_invariants_func_t get_invariants, |
773 | unsigned long baseaddr) | 773 | unsigned long baseaddr) |
774 | { | 774 | { |
775 | int err; | 775 | int err; |
776 | 776 | ||
@@ -851,8 +851,8 @@ err_disable_xtal: | |||
851 | } | 851 | } |
852 | 852 | ||
853 | #ifdef CONFIG_SSB_PCIHOST | 853 | #ifdef CONFIG_SSB_PCIHOST |
854 | int ssb_bus_pcibus_register(struct ssb_bus *bus, | 854 | int __devinit ssb_bus_pcibus_register(struct ssb_bus *bus, |
855 | struct pci_dev *host_pci) | 855 | struct pci_dev *host_pci) |
856 | { | 856 | { |
857 | int err; | 857 | int err; |
858 | 858 | ||
@@ -875,9 +875,9 @@ EXPORT_SYMBOL(ssb_bus_pcibus_register); | |||
875 | #endif /* CONFIG_SSB_PCIHOST */ | 875 | #endif /* CONFIG_SSB_PCIHOST */ |
876 | 876 | ||
877 | #ifdef CONFIG_SSB_PCMCIAHOST | 877 | #ifdef CONFIG_SSB_PCMCIAHOST |
878 | int ssb_bus_pcmciabus_register(struct ssb_bus *bus, | 878 | int __devinit ssb_bus_pcmciabus_register(struct ssb_bus *bus, |
879 | struct pcmcia_device *pcmcia_dev, | 879 | struct pcmcia_device *pcmcia_dev, |
880 | unsigned long baseaddr) | 880 | unsigned long baseaddr) |
881 | { | 881 | { |
882 | int err; | 882 | int err; |
883 | 883 | ||
@@ -897,8 +897,9 @@ EXPORT_SYMBOL(ssb_bus_pcmciabus_register); | |||
897 | #endif /* CONFIG_SSB_PCMCIAHOST */ | 897 | #endif /* CONFIG_SSB_PCMCIAHOST */ |
898 | 898 | ||
899 | #ifdef CONFIG_SSB_SDIOHOST | 899 | #ifdef CONFIG_SSB_SDIOHOST |
900 | int ssb_bus_sdiobus_register(struct ssb_bus *bus, struct sdio_func *func, | 900 | int __devinit ssb_bus_sdiobus_register(struct ssb_bus *bus, |
901 | unsigned int quirks) | 901 | struct sdio_func *func, |
902 | unsigned int quirks) | ||
902 | { | 903 | { |
903 | int err; | 904 | int err; |
904 | 905 | ||
@@ -918,9 +919,9 @@ int ssb_bus_sdiobus_register(struct ssb_bus *bus, struct sdio_func *func, | |||
918 | EXPORT_SYMBOL(ssb_bus_sdiobus_register); | 919 | EXPORT_SYMBOL(ssb_bus_sdiobus_register); |
919 | #endif /* CONFIG_SSB_PCMCIAHOST */ | 920 | #endif /* CONFIG_SSB_PCMCIAHOST */ |
920 | 921 | ||
921 | int ssb_bus_ssbbus_register(struct ssb_bus *bus, | 922 | int __devinit ssb_bus_ssbbus_register(struct ssb_bus *bus, |
922 | unsigned long baseaddr, | 923 | unsigned long baseaddr, |
923 | ssb_invariants_func_t get_invariants) | 924 | ssb_invariants_func_t get_invariants) |
924 | { | 925 | { |
925 | int err; | 926 | int err; |
926 | 927 | ||
@@ -1001,8 +1002,8 @@ u32 ssb_calc_clock_rate(u32 plltype, u32 n, u32 m) | |||
1001 | switch (plltype) { | 1002 | switch (plltype) { |
1002 | case SSB_PLLTYPE_6: /* 100/200 or 120/240 only */ | 1003 | case SSB_PLLTYPE_6: /* 100/200 or 120/240 only */ |
1003 | if (m & SSB_CHIPCO_CLK_T6_MMASK) | 1004 | if (m & SSB_CHIPCO_CLK_T6_MMASK) |
1004 | return SSB_CHIPCO_CLK_T6_M0; | 1005 | return SSB_CHIPCO_CLK_T6_M1; |
1005 | return SSB_CHIPCO_CLK_T6_M1; | 1006 | return SSB_CHIPCO_CLK_T6_M0; |
1006 | case SSB_PLLTYPE_1: /* 48Mhz base, 3 dividers */ | 1007 | case SSB_PLLTYPE_1: /* 48Mhz base, 3 dividers */ |
1007 | case SSB_PLLTYPE_3: /* 25Mhz, 2 dividers */ | 1008 | case SSB_PLLTYPE_3: /* 25Mhz, 2 dividers */ |
1008 | case SSB_PLLTYPE_4: /* 48Mhz, 4 dividers */ | 1009 | case SSB_PLLTYPE_4: /* 48Mhz, 4 dividers */ |
@@ -1265,7 +1266,10 @@ u32 ssb_dma_translation(struct ssb_device *dev) | |||
1265 | case SSB_BUSTYPE_SSB: | 1266 | case SSB_BUSTYPE_SSB: |
1266 | return 0; | 1267 | return 0; |
1267 | case SSB_BUSTYPE_PCI: | 1268 | case SSB_BUSTYPE_PCI: |
1268 | return SSB_PCI_DMA; | 1269 | if (ssb_read32(dev, SSB_TMSHIGH) & SSB_TMSHIGH_DMA64) |
1270 | return SSB_PCIE_DMA_H32; | ||
1271 | else | ||
1272 | return SSB_PCI_DMA; | ||
1269 | default: | 1273 | default: |
1270 | __ssb_dma_not_implemented(dev); | 1274 | __ssb_dma_not_implemented(dev); |
1271 | } | 1275 | } |