032-bcma-from-4.6.patch 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. --- a/drivers/bcma/driver_chipcommon.c
  2. +++ b/drivers/bcma/driver_chipcommon.c
  3. @@ -15,6 +15,8 @@
  4. #include <linux/platform_device.h>
  5. #include <linux/bcma/bcma.h>
  6. +static void bcma_chipco_serial_init(struct bcma_drv_cc *cc);
  7. +
  8. static inline u32 bcma_cc_write32_masked(struct bcma_drv_cc *cc, u16 offset,
  9. u32 mask, u32 value)
  10. {
  11. @@ -115,6 +117,8 @@ int bcma_chipco_watchdog_register(struct
  12. void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc)
  13. {
  14. + struct bcma_bus *bus = cc->core->bus;
  15. +
  16. if (cc->early_setup_done)
  17. return;
  18. @@ -129,6 +133,9 @@ void bcma_core_chipcommon_early_init(str
  19. if (cc->capabilities & BCMA_CC_CAP_PMU)
  20. bcma_pmu_early_init(cc);
  21. + if (IS_BUILTIN(CONFIG_BCM47XX) && bus->hosttype == BCMA_HOSTTYPE_SOC)
  22. + bcma_chipco_serial_init(cc);
  23. +
  24. cc->early_setup_done = true;
  25. }
  26. @@ -185,11 +192,12 @@ u32 bcma_chipco_watchdog_timer_set(struc
  27. ticks = 2;
  28. else if (ticks > maxt)
  29. ticks = maxt;
  30. - bcma_cc_write32(cc, BCMA_CC_PMU_WATCHDOG, ticks);
  31. + bcma_pmu_write32(cc, BCMA_CC_PMU_WATCHDOG, ticks);
  32. } else {
  33. struct bcma_bus *bus = cc->core->bus;
  34. if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4707 &&
  35. + bus->chipinfo.id != BCMA_CHIP_ID_BCM47094 &&
  36. bus->chipinfo.id != BCMA_CHIP_ID_BCM53018)
  37. bcma_core_set_clockmode(cc->core,
  38. ticks ? BCMA_CLKMODE_FAST : BCMA_CLKMODE_DYNAMIC);
  39. @@ -314,9 +322,9 @@ u32 bcma_chipco_gpio_pulldown(struct bcm
  40. return res;
  41. }
  42. -#ifdef CONFIG_BCMA_DRIVER_MIPS
  43. -void bcma_chipco_serial_init(struct bcma_drv_cc *cc)
  44. +static void bcma_chipco_serial_init(struct bcma_drv_cc *cc)
  45. {
  46. +#if IS_BUILTIN(CONFIG_BCM47XX)
  47. unsigned int irq;
  48. u32 baud_base;
  49. u32 i;
  50. @@ -358,5 +366,5 @@ void bcma_chipco_serial_init(struct bcma
  51. ports[i].baud_base = baud_base;
  52. ports[i].reg_shift = 0;
  53. }
  54. +#endif /* CONFIG_BCM47XX */
  55. }
  56. -#endif /* CONFIG_BCMA_DRIVER_MIPS */
  57. --- a/drivers/bcma/driver_chipcommon_pmu.c
  58. +++ b/drivers/bcma/driver_chipcommon_pmu.c
  59. @@ -15,44 +15,44 @@
  60. u32 bcma_chipco_pll_read(struct bcma_drv_cc *cc, u32 offset)
  61. {
  62. - bcma_cc_write32(cc, BCMA_CC_PLLCTL_ADDR, offset);
  63. - bcma_cc_read32(cc, BCMA_CC_PLLCTL_ADDR);
  64. - return bcma_cc_read32(cc, BCMA_CC_PLLCTL_DATA);
  65. + bcma_pmu_write32(cc, BCMA_CC_PMU_PLLCTL_ADDR, offset);
  66. + bcma_pmu_read32(cc, BCMA_CC_PMU_PLLCTL_ADDR);
  67. + return bcma_pmu_read32(cc, BCMA_CC_PMU_PLLCTL_DATA);
  68. }
  69. EXPORT_SYMBOL_GPL(bcma_chipco_pll_read);
  70. void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset, u32 value)
  71. {
  72. - bcma_cc_write32(cc, BCMA_CC_PLLCTL_ADDR, offset);
  73. - bcma_cc_read32(cc, BCMA_CC_PLLCTL_ADDR);
  74. - bcma_cc_write32(cc, BCMA_CC_PLLCTL_DATA, value);
  75. + bcma_pmu_write32(cc, BCMA_CC_PMU_PLLCTL_ADDR, offset);
  76. + bcma_pmu_read32(cc, BCMA_CC_PMU_PLLCTL_ADDR);
  77. + bcma_pmu_write32(cc, BCMA_CC_PMU_PLLCTL_DATA, value);
  78. }
  79. EXPORT_SYMBOL_GPL(bcma_chipco_pll_write);
  80. void bcma_chipco_pll_maskset(struct bcma_drv_cc *cc, u32 offset, u32 mask,
  81. u32 set)
  82. {
  83. - bcma_cc_write32(cc, BCMA_CC_PLLCTL_ADDR, offset);
  84. - bcma_cc_read32(cc, BCMA_CC_PLLCTL_ADDR);
  85. - bcma_cc_maskset32(cc, BCMA_CC_PLLCTL_DATA, mask, set);
  86. + bcma_pmu_write32(cc, BCMA_CC_PMU_PLLCTL_ADDR, offset);
  87. + bcma_pmu_read32(cc, BCMA_CC_PMU_PLLCTL_ADDR);
  88. + bcma_pmu_maskset32(cc, BCMA_CC_PMU_PLLCTL_DATA, mask, set);
  89. }
  90. EXPORT_SYMBOL_GPL(bcma_chipco_pll_maskset);
  91. void bcma_chipco_chipctl_maskset(struct bcma_drv_cc *cc,
  92. u32 offset, u32 mask, u32 set)
  93. {
  94. - bcma_cc_write32(cc, BCMA_CC_CHIPCTL_ADDR, offset);
  95. - bcma_cc_read32(cc, BCMA_CC_CHIPCTL_ADDR);
  96. - bcma_cc_maskset32(cc, BCMA_CC_CHIPCTL_DATA, mask, set);
  97. + bcma_pmu_write32(cc, BCMA_CC_PMU_CHIPCTL_ADDR, offset);
  98. + bcma_pmu_read32(cc, BCMA_CC_PMU_CHIPCTL_ADDR);
  99. + bcma_pmu_maskset32(cc, BCMA_CC_PMU_CHIPCTL_DATA, mask, set);
  100. }
  101. EXPORT_SYMBOL_GPL(bcma_chipco_chipctl_maskset);
  102. void bcma_chipco_regctl_maskset(struct bcma_drv_cc *cc, u32 offset, u32 mask,
  103. u32 set)
  104. {
  105. - bcma_cc_write32(cc, BCMA_CC_REGCTL_ADDR, offset);
  106. - bcma_cc_read32(cc, BCMA_CC_REGCTL_ADDR);
  107. - bcma_cc_maskset32(cc, BCMA_CC_REGCTL_DATA, mask, set);
  108. + bcma_pmu_write32(cc, BCMA_CC_PMU_REGCTL_ADDR, offset);
  109. + bcma_pmu_read32(cc, BCMA_CC_PMU_REGCTL_ADDR);
  110. + bcma_pmu_maskset32(cc, BCMA_CC_PMU_REGCTL_DATA, mask, set);
  111. }
  112. EXPORT_SYMBOL_GPL(bcma_chipco_regctl_maskset);
  113. @@ -60,18 +60,18 @@ static u32 bcma_pmu_xtalfreq(struct bcma
  114. {
  115. u32 ilp_ctl, alp_hz;
  116. - if (!(bcma_cc_read32(cc, BCMA_CC_PMU_STAT) &
  117. + if (!(bcma_pmu_read32(cc, BCMA_CC_PMU_STAT) &
  118. BCMA_CC_PMU_STAT_EXT_LPO_AVAIL))
  119. return 0;
  120. - bcma_cc_write32(cc, BCMA_CC_PMU_XTAL_FREQ,
  121. - BIT(BCMA_CC_PMU_XTAL_FREQ_MEASURE_SHIFT));
  122. + bcma_pmu_write32(cc, BCMA_CC_PMU_XTAL_FREQ,
  123. + BIT(BCMA_CC_PMU_XTAL_FREQ_MEASURE_SHIFT));
  124. usleep_range(1000, 2000);
  125. - ilp_ctl = bcma_cc_read32(cc, BCMA_CC_PMU_XTAL_FREQ);
  126. + ilp_ctl = bcma_pmu_read32(cc, BCMA_CC_PMU_XTAL_FREQ);
  127. ilp_ctl &= BCMA_CC_PMU_XTAL_FREQ_ILPCTL_MASK;
  128. - bcma_cc_write32(cc, BCMA_CC_PMU_XTAL_FREQ, 0);
  129. + bcma_pmu_write32(cc, BCMA_CC_PMU_XTAL_FREQ, 0);
  130. alp_hz = ilp_ctl * 32768 / 4;
  131. return (alp_hz + 50000) / 100000 * 100;
  132. @@ -127,8 +127,8 @@ static void bcma_pmu2_pll_init0(struct b
  133. mask = (u32)~(BCMA_RES_4314_HT_AVAIL |
  134. BCMA_RES_4314_MACPHY_CLK_AVAIL);
  135. - bcma_cc_mask32(cc, BCMA_CC_PMU_MINRES_MSK, mask);
  136. - bcma_cc_mask32(cc, BCMA_CC_PMU_MAXRES_MSK, mask);
  137. + bcma_pmu_mask32(cc, BCMA_CC_PMU_MINRES_MSK, mask);
  138. + bcma_pmu_mask32(cc, BCMA_CC_PMU_MAXRES_MSK, mask);
  139. bcma_wait_value(cc->core, BCMA_CLKCTLST,
  140. BCMA_CLKCTLST_HAVEHT, 0, 20000);
  141. break;
  142. @@ -140,7 +140,7 @@ static void bcma_pmu2_pll_init0(struct b
  143. /* Flush */
  144. if (cc->pmu.rev >= 2)
  145. - bcma_cc_set32(cc, BCMA_CC_PMU_CTL, BCMA_CC_PMU_CTL_PLL_UPD);
  146. + bcma_pmu_set32(cc, BCMA_CC_PMU_CTL, BCMA_CC_PMU_CTL_PLL_UPD);
  147. /* TODO: Do we need to update OTP? */
  148. }
  149. @@ -195,9 +195,9 @@ static void bcma_pmu_resources_init(stru
  150. /* Set the resource masks. */
  151. if (min_msk)
  152. - bcma_cc_write32(cc, BCMA_CC_PMU_MINRES_MSK, min_msk);
  153. + bcma_pmu_write32(cc, BCMA_CC_PMU_MINRES_MSK, min_msk);
  154. if (max_msk)
  155. - bcma_cc_write32(cc, BCMA_CC_PMU_MAXRES_MSK, max_msk);
  156. + bcma_pmu_write32(cc, BCMA_CC_PMU_MAXRES_MSK, max_msk);
  157. /*
  158. * Add some delay; allow resources to come up and settle.
  159. @@ -269,23 +269,33 @@ static void bcma_pmu_workarounds(struct
  160. void bcma_pmu_early_init(struct bcma_drv_cc *cc)
  161. {
  162. + struct bcma_bus *bus = cc->core->bus;
  163. u32 pmucap;
  164. - pmucap = bcma_cc_read32(cc, BCMA_CC_PMU_CAP);
  165. + if (cc->core->id.rev >= 35 &&
  166. + cc->capabilities_ext & BCMA_CC_CAP_EXT_AOB_PRESENT) {
  167. + cc->pmu.core = bcma_find_core(bus, BCMA_CORE_PMU);
  168. + if (!cc->pmu.core)
  169. + bcma_warn(bus, "Couldn't find expected PMU core");
  170. + }
  171. + if (!cc->pmu.core)
  172. + cc->pmu.core = cc->core;
  173. +
  174. + pmucap = bcma_pmu_read32(cc, BCMA_CC_PMU_CAP);
  175. cc->pmu.rev = (pmucap & BCMA_CC_PMU_CAP_REVISION);
  176. - bcma_debug(cc->core->bus, "Found rev %u PMU (capabilities 0x%08X)\n",
  177. - cc->pmu.rev, pmucap);
  178. + bcma_debug(bus, "Found rev %u PMU (capabilities 0x%08X)\n", cc->pmu.rev,
  179. + pmucap);
  180. }
  181. void bcma_pmu_init(struct bcma_drv_cc *cc)
  182. {
  183. if (cc->pmu.rev == 1)
  184. - bcma_cc_mask32(cc, BCMA_CC_PMU_CTL,
  185. - ~BCMA_CC_PMU_CTL_NOILPONW);
  186. + bcma_pmu_mask32(cc, BCMA_CC_PMU_CTL,
  187. + ~BCMA_CC_PMU_CTL_NOILPONW);
  188. else
  189. - bcma_cc_set32(cc, BCMA_CC_PMU_CTL,
  190. - BCMA_CC_PMU_CTL_NOILPONW);
  191. + bcma_pmu_set32(cc, BCMA_CC_PMU_CTL,
  192. + BCMA_CC_PMU_CTL_NOILPONW);
  193. bcma_pmu_pll_init(cc);
  194. bcma_pmu_resources_init(cc);
  195. @@ -472,8 +482,8 @@ u32 bcma_pmu_get_cpu_clock(struct bcma_d
  196. static void bcma_pmu_spuravoid_pll_write(struct bcma_drv_cc *cc, u32 offset,
  197. u32 value)
  198. {
  199. - bcma_cc_write32(cc, BCMA_CC_PLLCTL_ADDR, offset);
  200. - bcma_cc_write32(cc, BCMA_CC_PLLCTL_DATA, value);
  201. + bcma_pmu_write32(cc, BCMA_CC_PMU_PLLCTL_ADDR, offset);
  202. + bcma_pmu_write32(cc, BCMA_CC_PMU_PLLCTL_DATA, value);
  203. }
  204. void bcma_pmu_spuravoid_pllupdate(struct bcma_drv_cc *cc, int spuravoid)
  205. @@ -497,20 +507,20 @@ void bcma_pmu_spuravoid_pllupdate(struct
  206. bus->chipinfo.id == BCMA_CHIP_ID_BCM53572) ? 6 : 0;
  207. /* RMW only the P1 divider */
  208. - bcma_cc_write32(cc, BCMA_CC_PLLCTL_ADDR,
  209. + bcma_pmu_write32(cc, BCMA_CC_PMU_PLLCTL_ADDR,
  210. BCMA_CC_PMU_PLL_CTL0 + phypll_offset);
  211. - tmp = bcma_cc_read32(cc, BCMA_CC_PLLCTL_DATA);
  212. + tmp = bcma_pmu_read32(cc, BCMA_CC_PMU_PLLCTL_DATA);
  213. tmp &= (~(BCMA_CC_PMU1_PLL0_PC0_P1DIV_MASK));
  214. tmp |= (bcm5357_bcm43236_p1div[spuravoid] << BCMA_CC_PMU1_PLL0_PC0_P1DIV_SHIFT);
  215. - bcma_cc_write32(cc, BCMA_CC_PLLCTL_DATA, tmp);
  216. + bcma_pmu_write32(cc, BCMA_CC_PMU_PLLCTL_DATA, tmp);
  217. /* RMW only the int feedback divider */
  218. - bcma_cc_write32(cc, BCMA_CC_PLLCTL_ADDR,
  219. + bcma_pmu_write32(cc, BCMA_CC_PMU_PLLCTL_ADDR,
  220. BCMA_CC_PMU_PLL_CTL2 + phypll_offset);
  221. - tmp = bcma_cc_read32(cc, BCMA_CC_PLLCTL_DATA);
  222. + tmp = bcma_pmu_read32(cc, BCMA_CC_PMU_PLLCTL_DATA);
  223. tmp &= ~(BCMA_CC_PMU1_PLL0_PC2_NDIV_INT_MASK);
  224. tmp |= (bcm5357_bcm43236_ndiv[spuravoid]) << BCMA_CC_PMU1_PLL0_PC2_NDIV_INT_SHIFT;
  225. - bcma_cc_write32(cc, BCMA_CC_PLLCTL_DATA, tmp);
  226. + bcma_pmu_write32(cc, BCMA_CC_PMU_PLLCTL_DATA, tmp);
  227. tmp = BCMA_CC_PMU_CTL_PLL_UPD;
  228. break;
  229. @@ -646,7 +656,7 @@ void bcma_pmu_spuravoid_pllupdate(struct
  230. break;
  231. }
  232. - tmp |= bcma_cc_read32(cc, BCMA_CC_PMU_CTL);
  233. - bcma_cc_write32(cc, BCMA_CC_PMU_CTL, tmp);
  234. + tmp |= bcma_pmu_read32(cc, BCMA_CC_PMU_CTL);
  235. + bcma_pmu_write32(cc, BCMA_CC_PMU_CTL, tmp);
  236. }
  237. EXPORT_SYMBOL_GPL(bcma_pmu_spuravoid_pllupdate);
  238. --- a/drivers/bcma/driver_chipcommon_sflash.c
  239. +++ b/drivers/bcma/driver_chipcommon_sflash.c
  240. @@ -38,6 +38,7 @@ static const struct bcma_sflash_tbl_e bc
  241. { "M25P32", 0x15, 0x10000, 64, },
  242. { "M25P64", 0x16, 0x10000, 128, },
  243. { "M25FL128", 0x17, 0x10000, 256, },
  244. + { "MX25L25635F", 0x18, 0x10000, 512, },
  245. { NULL },
  246. };
  247. --- a/drivers/bcma/scan.c
  248. +++ b/drivers/bcma/scan.c
  249. @@ -98,6 +98,9 @@ static const struct bcma_device_id_name
  250. { BCMA_CORE_SHIM, "SHIM" },
  251. { BCMA_CORE_PCIE2, "PCIe Gen2" },
  252. { BCMA_CORE_ARM_CR4, "ARM CR4" },
  253. + { BCMA_CORE_GCI, "GCI" },
  254. + { BCMA_CORE_CMEM, "CNDS DDR2/3 memory controller" },
  255. + { BCMA_CORE_ARM_CA7, "ARM CA7" },
  256. { BCMA_CORE_DEFAULT, "Default" },
  257. };
  258. @@ -315,6 +318,8 @@ static int bcma_get_next_core(struct bcm
  259. switch (core->id.id) {
  260. case BCMA_CORE_4706_MAC_GBIT_COMMON:
  261. case BCMA_CORE_NS_CHIPCOMMON_B:
  262. + case BCMA_CORE_PMU:
  263. + case BCMA_CORE_GCI:
  264. /* Not used yet: case BCMA_CORE_OOB_ROUTER: */
  265. break;
  266. default:
  267. --- a/drivers/net/wireless/b43/main.c
  268. +++ b/drivers/net/wireless/b43/main.c
  269. @@ -1215,10 +1215,10 @@ void b43_wireless_core_phy_pll_reset(str
  270. case B43_BUS_BCMA:
  271. bcma_cc = &dev->dev->bdev->bus->drv_cc;
  272. - bcma_cc_write32(bcma_cc, BCMA_CC_CHIPCTL_ADDR, 0);
  273. - bcma_cc_mask32(bcma_cc, BCMA_CC_CHIPCTL_DATA, ~0x4);
  274. - bcma_cc_set32(bcma_cc, BCMA_CC_CHIPCTL_DATA, 0x4);
  275. - bcma_cc_mask32(bcma_cc, BCMA_CC_CHIPCTL_DATA, ~0x4);
  276. + bcma_cc_write32(bcma_cc, BCMA_CC_PMU_CHIPCTL_ADDR, 0);
  277. + bcma_cc_mask32(bcma_cc, BCMA_CC_PMU_CHIPCTL_DATA, ~0x4);
  278. + bcma_cc_set32(bcma_cc, BCMA_CC_PMU_CHIPCTL_DATA, 0x4);
  279. + bcma_cc_mask32(bcma_cc, BCMA_CC_PMU_CHIPCTL_DATA, ~0x4);
  280. break;
  281. #endif
  282. #ifdef CONFIG_B43_SSB
  283. --- a/include/linux/bcma/bcma.h
  284. +++ b/include/linux/bcma/bcma.h
  285. @@ -151,6 +151,8 @@ struct bcma_host_ops {
  286. #define BCMA_CORE_PCIE2 0x83C /* PCI Express Gen2 */
  287. #define BCMA_CORE_USB30_DEV 0x83D
  288. #define BCMA_CORE_ARM_CR4 0x83E
  289. +#define BCMA_CORE_GCI 0x840
  290. +#define BCMA_CORE_CMEM 0x846 /* CNDS DDR2/3 memory controller */
  291. #define BCMA_CORE_ARM_CA7 0x847
  292. #define BCMA_CORE_SYS_MEM 0x849
  293. #define BCMA_CORE_DEFAULT 0xFFF
  294. @@ -200,6 +202,7 @@ struct bcma_host_ops {
  295. #define BCMA_PKG_ID_BCM4707 1
  296. #define BCMA_PKG_ID_BCM4708 2
  297. #define BCMA_PKG_ID_BCM4709 0
  298. +#define BCMA_CHIP_ID_BCM47094 53030
  299. #define BCMA_CHIP_ID_BCM53018 53018
  300. /* Board types (on PCI usually equals to the subsystem dev id) */
  301. --- a/include/linux/bcma/bcma_driver_chipcommon.h
  302. +++ b/include/linux/bcma/bcma_driver_chipcommon.h
  303. @@ -217,6 +217,11 @@
  304. #define BCMA_CC_CLKDIV_JTAG_SHIFT 8
  305. #define BCMA_CC_CLKDIV_UART 0x000000FF
  306. #define BCMA_CC_CAP_EXT 0x00AC /* Capabilities */
  307. +#define BCMA_CC_CAP_EXT_SECI_PRESENT 0x00000001
  308. +#define BCMA_CC_CAP_EXT_GSIO_PRESENT 0x00000002
  309. +#define BCMA_CC_CAP_EXT_GCI_PRESENT 0x00000004
  310. +#define BCMA_CC_CAP_EXT_SECI_PUART_PRESENT 0x00000008 /* UART present */
  311. +#define BCMA_CC_CAP_EXT_AOB_PRESENT 0x00000040
  312. #define BCMA_CC_PLLONDELAY 0x00B0 /* Rev >= 4 only */
  313. #define BCMA_CC_FREFSELDELAY 0x00B4 /* Rev >= 4 only */
  314. #define BCMA_CC_SLOWCLKCTL 0x00B8 /* 6 <= Rev <= 9 only */
  315. @@ -351,12 +356,12 @@
  316. #define BCMA_CC_PMU_RES_REQTS 0x0640 /* PMU res req timer sel */
  317. #define BCMA_CC_PMU_RES_REQT 0x0644 /* PMU res req timer */
  318. #define BCMA_CC_PMU_RES_REQM 0x0648 /* PMU res req mask */
  319. -#define BCMA_CC_CHIPCTL_ADDR 0x0650
  320. -#define BCMA_CC_CHIPCTL_DATA 0x0654
  321. -#define BCMA_CC_REGCTL_ADDR 0x0658
  322. -#define BCMA_CC_REGCTL_DATA 0x065C
  323. -#define BCMA_CC_PLLCTL_ADDR 0x0660
  324. -#define BCMA_CC_PLLCTL_DATA 0x0664
  325. +#define BCMA_CC_PMU_CHIPCTL_ADDR 0x0650
  326. +#define BCMA_CC_PMU_CHIPCTL_DATA 0x0654
  327. +#define BCMA_CC_PMU_REGCTL_ADDR 0x0658
  328. +#define BCMA_CC_PMU_REGCTL_DATA 0x065C
  329. +#define BCMA_CC_PMU_PLLCTL_ADDR 0x0660
  330. +#define BCMA_CC_PMU_PLLCTL_DATA 0x0664
  331. #define BCMA_CC_PMU_STRAPOPT 0x0668 /* (corerev >= 28) */
  332. #define BCMA_CC_PMU_XTAL_FREQ 0x066C /* (pmurev >= 10) */
  333. #define BCMA_CC_PMU_XTAL_FREQ_ILPCTL_MASK 0x00001FFF
  334. @@ -566,6 +571,7 @@
  335. * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU)
  336. */
  337. struct bcma_chipcommon_pmu {
  338. + struct bcma_device *core; /* Can be separated core or just ChipCommon one */
  339. u8 rev; /* PMU revision */
  340. u32 crystalfreq; /* The active crystal frequency (in kHz) */
  341. };
  342. @@ -663,6 +669,19 @@ struct bcma_drv_cc_b {
  343. #define bcma_cc_maskset32(cc, offset, mask, set) \
  344. bcma_cc_write32(cc, offset, (bcma_cc_read32(cc, offset) & (mask)) | (set))
  345. +/* PMU registers access */
  346. +#define bcma_pmu_read32(cc, offset) \
  347. + bcma_read32((cc)->pmu.core, offset)
  348. +#define bcma_pmu_write32(cc, offset, val) \
  349. + bcma_write32((cc)->pmu.core, offset, val)
  350. +
  351. +#define bcma_pmu_mask32(cc, offset, mask) \
  352. + bcma_pmu_write32(cc, offset, bcma_pmu_read32(cc, offset) & (mask))
  353. +#define bcma_pmu_set32(cc, offset, set) \
  354. + bcma_pmu_write32(cc, offset, bcma_pmu_read32(cc, offset) | (set))
  355. +#define bcma_pmu_maskset32(cc, offset, mask, set) \
  356. + bcma_pmu_write32(cc, offset, (bcma_pmu_read32(cc, offset) & (mask)) | (set))
  357. +
  358. extern u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks);
  359. extern u32 bcma_chipco_get_alp_clock(struct bcma_drv_cc *cc);
  360. --- a/drivers/bcma/bcma_private.h
  361. +++ b/drivers/bcma/bcma_private.h
  362. @@ -45,7 +45,6 @@ void bcma_core_chipcommon_early_init(str
  363. void bcma_core_chipcommon_init(struct bcma_drv_cc *cc);
  364. void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);
  365. #ifdef CONFIG_BCMA_DRIVER_MIPS
  366. -void bcma_chipco_serial_init(struct bcma_drv_cc *cc);
  367. extern struct platform_device bcma_pflash_dev;
  368. #endif /* CONFIG_BCMA_DRIVER_MIPS */
  369. --- a/drivers/bcma/driver_gpio.c
  370. +++ b/drivers/bcma/driver_gpio.c
  371. @@ -229,6 +229,7 @@ int bcma_gpio_init(struct bcma_drv_cc *c
  372. case BCMA_CHIP_ID_BCM4707:
  373. case BCMA_CHIP_ID_BCM5357:
  374. case BCMA_CHIP_ID_BCM53572:
  375. + case BCMA_CHIP_ID_BCM47094:
  376. chip->ngpio = 32;
  377. break;
  378. default:
  379. --- a/drivers/bcma/driver_mips.c
  380. +++ b/drivers/bcma/driver_mips.c
  381. @@ -328,12 +328,9 @@ static void bcma_core_mips_flash_detect(
  382. void bcma_core_mips_early_init(struct bcma_drv_mips *mcore)
  383. {
  384. - struct bcma_bus *bus = mcore->core->bus;
  385. -
  386. if (mcore->early_setup_done)
  387. return;
  388. - bcma_chipco_serial_init(&bus->drv_cc);
  389. bcma_core_mips_flash_detect(mcore);
  390. mcore->early_setup_done = true;
  391. --- a/drivers/bcma/host_pci.c
  392. +++ b/drivers/bcma/host_pci.c
  393. @@ -294,7 +294,7 @@ static const struct pci_device_id bcma_p
  394. { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4358) },
  395. { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4359) },
  396. { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4360) },
  397. - { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4365) },
  398. + { PCI_DEVICE_SUB(PCI_VENDOR_ID_BROADCOM, 0x4365, PCI_VENDOR_ID_DELL, 0x0016) },
  399. { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43a0) },
  400. { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43a9) },
  401. { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43aa) },