020-ssb_update.patch 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. --- a/drivers/ssb/Kconfig
  2. +++ b/drivers/ssb/Kconfig
  3. @@ -136,6 +136,11 @@ config SSB_DRIVER_MIPS
  4. If unsure, say N
  5. +config SSB_SFLASH
  6. + bool "SSB serial flash support"
  7. + depends on SSB_DRIVER_MIPS && BROKEN
  8. + default y
  9. +
  10. # Assumption: We are on embedded, if we compile the MIPS core.
  11. config SSB_EMBEDDED
  12. bool
  13. --- a/drivers/ssb/Makefile
  14. +++ b/drivers/ssb/Makefile
  15. @@ -11,6 +11,7 @@ ssb-$(CONFIG_SSB_SDIOHOST) += sdio.o
  16. # built-in drivers
  17. ssb-y += driver_chipcommon.o
  18. ssb-y += driver_chipcommon_pmu.o
  19. +ssb-$(CONFIG_SSB_SFLASH) += driver_chipcommon_sflash.o
  20. ssb-$(CONFIG_SSB_DRIVER_MIPS) += driver_mipscore.o
  21. ssb-$(CONFIG_SSB_DRIVER_EXTIF) += driver_extif.o
  22. ssb-$(CONFIG_SSB_DRIVER_PCICORE) += driver_pcicore.o
  23. --- /dev/null
  24. +++ b/drivers/ssb/driver_chipcommon_sflash.c
  25. @@ -0,0 +1,140 @@
  26. +/*
  27. + * Sonics Silicon Backplane
  28. + * ChipCommon serial flash interface
  29. + *
  30. + * Licensed under the GNU/GPL. See COPYING for details.
  31. + */
  32. +
  33. +#include <linux/ssb/ssb.h>
  34. +
  35. +#include "ssb_private.h"
  36. +
  37. +struct ssb_sflash_tbl_e {
  38. + char *name;
  39. + u32 id;
  40. + u32 blocksize;
  41. + u16 numblocks;
  42. +};
  43. +
  44. +static struct ssb_sflash_tbl_e ssb_sflash_st_tbl[] = {
  45. + { "M25P20", 0x11, 0x10000, 4, },
  46. + { "M25P40", 0x12, 0x10000, 8, },
  47. +
  48. + { "M25P16", 0x14, 0x10000, 32, },
  49. + { "M25P32", 0x15, 0x10000, 64, },
  50. + { "M25P64", 0x16, 0x10000, 128, },
  51. + { "M25FL128", 0x17, 0x10000, 256, },
  52. + { 0 },
  53. +};
  54. +
  55. +static struct ssb_sflash_tbl_e ssb_sflash_sst_tbl[] = {
  56. + { "SST25WF512", 1, 0x1000, 16, },
  57. + { "SST25VF512", 0x48, 0x1000, 16, },
  58. + { "SST25WF010", 2, 0x1000, 32, },
  59. + { "SST25VF010", 0x49, 0x1000, 32, },
  60. + { "SST25WF020", 3, 0x1000, 64, },
  61. + { "SST25VF020", 0x43, 0x1000, 64, },
  62. + { "SST25WF040", 4, 0x1000, 128, },
  63. + { "SST25VF040", 0x44, 0x1000, 128, },
  64. + { "SST25VF040B", 0x8d, 0x1000, 128, },
  65. + { "SST25WF080", 5, 0x1000, 256, },
  66. + { "SST25VF080B", 0x8e, 0x1000, 256, },
  67. + { "SST25VF016", 0x41, 0x1000, 512, },
  68. + { "SST25VF032", 0x4a, 0x1000, 1024, },
  69. + { "SST25VF064", 0x4b, 0x1000, 2048, },
  70. + { 0 },
  71. +};
  72. +
  73. +static struct ssb_sflash_tbl_e ssb_sflash_at_tbl[] = {
  74. + { "AT45DB011", 0xc, 256, 512, },
  75. + { "AT45DB021", 0x14, 256, 1024, },
  76. + { "AT45DB041", 0x1c, 256, 2048, },
  77. + { "AT45DB081", 0x24, 256, 4096, },
  78. + { "AT45DB161", 0x2c, 512, 4096, },
  79. + { "AT45DB321", 0x34, 512, 8192, },
  80. + { "AT45DB642", 0x3c, 1024, 8192, },
  81. + { 0 },
  82. +};
  83. +
  84. +static void ssb_sflash_cmd(struct ssb_chipcommon *cc, u32 opcode)
  85. +{
  86. + int i;
  87. + chipco_write32(cc, SSB_CHIPCO_FLASHCTL,
  88. + SSB_CHIPCO_FLASHCTL_START | opcode);
  89. + for (i = 0; i < 1000; i++) {
  90. + if (!(chipco_read32(cc, SSB_CHIPCO_FLASHCTL) &
  91. + SSB_CHIPCO_FLASHCTL_BUSY))
  92. + return;
  93. + cpu_relax();
  94. + }
  95. + pr_err("SFLASH control command failed (timeout)!\n");
  96. +}
  97. +
  98. +/* Initialize serial flash access */
  99. +int ssb_sflash_init(struct ssb_chipcommon *cc)
  100. +{
  101. + struct ssb_sflash_tbl_e *e;
  102. + u32 id, id2;
  103. +
  104. + switch (cc->capabilities & SSB_CHIPCO_CAP_FLASHT) {
  105. + case SSB_CHIPCO_FLASHT_STSER:
  106. + ssb_sflash_cmd(cc, SSB_CHIPCO_FLASHCTL_ST_DP);
  107. +
  108. + chipco_write32(cc, SSB_CHIPCO_FLASHADDR, 0);
  109. + ssb_sflash_cmd(cc, SSB_CHIPCO_FLASHCTL_ST_RES);
  110. + id = chipco_read32(cc, SSB_CHIPCO_FLASHDATA);
  111. +
  112. + chipco_write32(cc, SSB_CHIPCO_FLASHADDR, 1);
  113. + ssb_sflash_cmd(cc, SSB_CHIPCO_FLASHCTL_ST_RES);
  114. + id2 = chipco_read32(cc, SSB_CHIPCO_FLASHDATA);
  115. +
  116. + switch (id) {
  117. + case 0xbf:
  118. + for (e = ssb_sflash_sst_tbl; e->name; e++) {
  119. + if (e->id == id2)
  120. + break;
  121. + }
  122. + break;
  123. + case 0x13:
  124. + return -ENOTSUPP;
  125. + default:
  126. + for (e = ssb_sflash_st_tbl; e->name; e++) {
  127. + if (e->id == id)
  128. + break;
  129. + }
  130. + break;
  131. + }
  132. + if (!e->name) {
  133. + pr_err("Unsupported ST serial flash (id: 0x%X, id2: 0x%X)\n",
  134. + id, id2);
  135. + return -ENOTSUPP;
  136. + }
  137. +
  138. + break;
  139. + case SSB_CHIPCO_FLASHT_ATSER:
  140. + ssb_sflash_cmd(cc, SSB_CHIPCO_FLASHCTL_AT_STATUS);
  141. + id = chipco_read32(cc, SSB_CHIPCO_FLASHDATA) & 0x3c;
  142. +
  143. + for (e = ssb_sflash_at_tbl; e->name; e++) {
  144. + if (e->id == id)
  145. + break;
  146. + }
  147. + if (!e->name) {
  148. + pr_err("Unsupported Atmel serial flash (id: 0x%X)\n",
  149. + id);
  150. + return -ENOTSUPP;
  151. + }
  152. +
  153. + break;
  154. + default:
  155. + pr_err("Unsupported flash type\n");
  156. + return -ENOTSUPP;
  157. + }
  158. +
  159. + pr_info("Found %s serial flash (blocksize: 0x%X, blocks: %d)\n",
  160. + e->name, e->blocksize, e->numblocks);
  161. +
  162. + pr_err("Serial flash support is not implemented yet!\n");
  163. +
  164. + return -ENOTSUPP;
  165. +}
  166. --- a/drivers/ssb/driver_gpio.c
  167. +++ b/drivers/ssb/driver_gpio.c
  168. @@ -74,6 +74,16 @@ static void ssb_gpio_chipco_free(struct
  169. ssb_chipco_gpio_pullup(&bus->chipco, 1 << gpio, 0);
  170. }
  171. +static int ssb_gpio_chipco_to_irq(struct gpio_chip *chip, unsigned gpio)
  172. +{
  173. + struct ssb_bus *bus = ssb_gpio_get_bus(chip);
  174. +
  175. + if (bus->bustype == SSB_BUSTYPE_SSB)
  176. + return ssb_mips_irq(bus->chipco.dev) + 2;
  177. + else
  178. + return -EINVAL;
  179. +}
  180. +
  181. static int ssb_gpio_chipco_init(struct ssb_bus *bus)
  182. {
  183. struct gpio_chip *chip = &bus->gpio;
  184. @@ -86,6 +96,7 @@ static int ssb_gpio_chipco_init(struct s
  185. chip->set = ssb_gpio_chipco_set_value;
  186. chip->direction_input = ssb_gpio_chipco_direction_input;
  187. chip->direction_output = ssb_gpio_chipco_direction_output;
  188. + chip->to_irq = ssb_gpio_chipco_to_irq;
  189. chip->ngpio = 16;
  190. /* There is just one SoC in one device and its GPIO addresses should be
  191. * deterministic to address them more easily. The other buses could get
  192. @@ -134,6 +145,16 @@ static int ssb_gpio_extif_direction_outp
  193. return 0;
  194. }
  195. +static int ssb_gpio_extif_to_irq(struct gpio_chip *chip, unsigned gpio)
  196. +{
  197. + struct ssb_bus *bus = ssb_gpio_get_bus(chip);
  198. +
  199. + if (bus->bustype == SSB_BUSTYPE_SSB)
  200. + return ssb_mips_irq(bus->extif.dev) + 2;
  201. + else
  202. + return -EINVAL;
  203. +}
  204. +
  205. static int ssb_gpio_extif_init(struct ssb_bus *bus)
  206. {
  207. struct gpio_chip *chip = &bus->gpio;
  208. @@ -144,6 +165,7 @@ static int ssb_gpio_extif_init(struct ss
  209. chip->set = ssb_gpio_extif_set_value;
  210. chip->direction_input = ssb_gpio_extif_direction_input;
  211. chip->direction_output = ssb_gpio_extif_direction_output;
  212. + chip->to_irq = ssb_gpio_extif_to_irq;
  213. chip->ngpio = 5;
  214. /* There is just one SoC in one device and its GPIO addresses should be
  215. * deterministic to address them more easily. The other buses could get
  216. --- a/drivers/ssb/driver_mipscore.c
  217. +++ b/drivers/ssb/driver_mipscore.c
  218. @@ -10,6 +10,7 @@
  219. #include <linux/ssb/ssb.h>
  220. +#include <linux/mtd/physmap.h>
  221. #include <linux/serial.h>
  222. #include <linux/serial_core.h>
  223. #include <linux/serial_reg.h>
  224. @@ -17,6 +18,25 @@
  225. #include "ssb_private.h"
  226. +static const char *part_probes[] = { "bcm47xxpart", NULL };
  227. +
  228. +static struct physmap_flash_data ssb_pflash_data = {
  229. + .part_probe_types = part_probes,
  230. +};
  231. +
  232. +static struct resource ssb_pflash_resource = {
  233. + .name = "ssb_pflash",
  234. + .flags = IORESOURCE_MEM,
  235. +};
  236. +
  237. +struct platform_device ssb_pflash_dev = {
  238. + .name = "physmap-flash",
  239. + .dev = {
  240. + .platform_data = &ssb_pflash_data,
  241. + },
  242. + .resource = &ssb_pflash_resource,
  243. + .num_resources = 1,
  244. +};
  245. static inline u32 mips_read32(struct ssb_mipscore *mcore,
  246. u16 offset)
  247. @@ -189,34 +209,43 @@ static void ssb_mips_serial_init(struct
  248. static void ssb_mips_flash_detect(struct ssb_mipscore *mcore)
  249. {
  250. struct ssb_bus *bus = mcore->dev->bus;
  251. + struct ssb_pflash *pflash = &mcore->pflash;
  252. /* When there is no chipcommon on the bus there is 4MB flash */
  253. if (!ssb_chipco_available(&bus->chipco)) {
  254. - mcore->pflash.present = true;
  255. - mcore->pflash.buswidth = 2;
  256. - mcore->pflash.window = SSB_FLASH1;
  257. - mcore->pflash.window_size = SSB_FLASH1_SZ;
  258. - return;
  259. + pflash->present = true;
  260. + pflash->buswidth = 2;
  261. + pflash->window = SSB_FLASH1;
  262. + pflash->window_size = SSB_FLASH1_SZ;
  263. + goto ssb_pflash;
  264. }
  265. /* There is ChipCommon, so use it to read info about flash */
  266. switch (bus->chipco.capabilities & SSB_CHIPCO_CAP_FLASHT) {
  267. case SSB_CHIPCO_FLASHT_STSER:
  268. case SSB_CHIPCO_FLASHT_ATSER:
  269. - pr_err("Serial flash not supported\n");
  270. + pr_debug("Found serial flash\n");
  271. + ssb_sflash_init(&bus->chipco);
  272. break;
  273. case SSB_CHIPCO_FLASHT_PARA:
  274. pr_debug("Found parallel flash\n");
  275. - mcore->pflash.present = true;
  276. - mcore->pflash.window = SSB_FLASH2;
  277. - mcore->pflash.window_size = SSB_FLASH2_SZ;
  278. + pflash->present = true;
  279. + pflash->window = SSB_FLASH2;
  280. + pflash->window_size = SSB_FLASH2_SZ;
  281. if ((ssb_read32(bus->chipco.dev, SSB_CHIPCO_FLASH_CFG)
  282. & SSB_CHIPCO_CFG_DS16) == 0)
  283. - mcore->pflash.buswidth = 1;
  284. + pflash->buswidth = 1;
  285. else
  286. - mcore->pflash.buswidth = 2;
  287. + pflash->buswidth = 2;
  288. break;
  289. }
  290. +
  291. +ssb_pflash:
  292. + if (pflash->present) {
  293. + ssb_pflash_data.width = pflash->buswidth;
  294. + ssb_pflash_resource.start = pflash->window;
  295. + ssb_pflash_resource.end = pflash->window + pflash->window_size;
  296. + }
  297. }
  298. u32 ssb_cpu_clock(struct ssb_mipscore *mcore)
  299. --- a/drivers/ssb/main.c
  300. +++ b/drivers/ssb/main.c
  301. @@ -549,6 +549,14 @@ static int ssb_devices_register(struct s
  302. dev_idx++;
  303. }
  304. +#ifdef CONFIG_SSB_DRIVER_MIPS
  305. + if (bus->mipscore.pflash.present) {
  306. + err = platform_device_register(&ssb_pflash_dev);
  307. + if (err)
  308. + pr_err("Error registering parallel flash\n");
  309. + }
  310. +#endif
  311. +
  312. return 0;
  313. error:
  314. /* Unwind the already registered devices. */
  315. --- a/drivers/ssb/ssb_private.h
  316. +++ b/drivers/ssb/ssb_private.h
  317. @@ -217,6 +217,21 @@ extern u32 ssb_chipco_watchdog_timer_set
  318. u32 ticks);
  319. extern u32 ssb_chipco_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms);
  320. +/* driver_chipcommon_sflash.c */
  321. +#ifdef CONFIG_SSB_SFLASH
  322. +int ssb_sflash_init(struct ssb_chipcommon *cc);
  323. +#else
  324. +static inline int ssb_sflash_init(struct ssb_chipcommon *cc)
  325. +{
  326. + pr_err("Serial flash not supported\n");
  327. + return 0;
  328. +}
  329. +#endif /* CONFIG_SSB_SFLASH */
  330. +
  331. +#ifdef CONFIG_SSB_DRIVER_MIPS
  332. +extern struct platform_device ssb_pflash_dev;
  333. +#endif
  334. +
  335. #ifdef CONFIG_SSB_DRIVER_EXTIF
  336. extern u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks);
  337. extern u32 ssb_extif_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms);
  338. --- a/include/linux/ssb/ssb_driver_mips.h
  339. +++ b/include/linux/ssb/ssb_driver_mips.h
  340. @@ -45,6 +45,11 @@ void ssb_mipscore_init(struct ssb_mipsco
  341. {
  342. }
  343. +static inline unsigned int ssb_mips_irq(struct ssb_device *dev)
  344. +{
  345. + return 0;
  346. +}
  347. +
  348. #endif /* CONFIG_SSB_DRIVER_MIPS */
  349. #endif /* LINUX_SSB_MIPSCORE_H_ */
  350. --- a/drivers/net/wireless/b43/phy_n.c
  351. +++ b/drivers/net/wireless/b43/phy_n.c
  352. @@ -5165,7 +5165,8 @@ static void b43_nphy_pmu_spur_avoid(stru
  353. #endif
  354. #ifdef CONFIG_B43_SSB
  355. case B43_BUS_SSB:
  356. - /* FIXME */
  357. + ssb_pmu_spuravoid_pllupdate(&dev->dev->sdev->bus->chipco,
  358. + avoid);
  359. break;
  360. #endif
  361. }
  362. --- a/drivers/ssb/driver_chipcommon_pmu.c
  363. +++ b/drivers/ssb/driver_chipcommon_pmu.c
  364. @@ -675,3 +675,32 @@ u32 ssb_pmu_get_controlclock(struct ssb_
  365. return 0;
  366. }
  367. }
  368. +
  369. +void ssb_pmu_spuravoid_pllupdate(struct ssb_chipcommon *cc, int spuravoid)
  370. +{
  371. + u32 pmu_ctl = 0;
  372. +
  373. + switch (cc->dev->bus->chip_id) {
  374. + case 0x4322:
  375. + ssb_chipco_pll_write(cc, SSB_PMU1_PLLCTL0, 0x11100070);
  376. + ssb_chipco_pll_write(cc, SSB_PMU1_PLLCTL1, 0x1014140a);
  377. + ssb_chipco_pll_write(cc, SSB_PMU1_PLLCTL5, 0x88888854);
  378. + if (spuravoid == 1)
  379. + ssb_chipco_pll_write(cc, SSB_PMU1_PLLCTL2, 0x05201828);
  380. + else
  381. + ssb_chipco_pll_write(cc, SSB_PMU1_PLLCTL2, 0x05001828);
  382. + pmu_ctl = SSB_CHIPCO_PMU_CTL_PLL_UPD;
  383. + break;
  384. + case 43222:
  385. + /* TODO: BCM43222 requires updating PLLs too */
  386. + return;
  387. + default:
  388. + ssb_printk(KERN_ERR PFX
  389. + "Unknown spuravoidance settings for chip 0x%04X, not changing PLL\n",
  390. + cc->dev->bus->chip_id);
  391. + return;
  392. + }
  393. +
  394. + chipco_set32(cc, SSB_CHIPCO_PMU_CTL, pmu_ctl);
  395. +}
  396. +EXPORT_SYMBOL_GPL(ssb_pmu_spuravoid_pllupdate);
  397. --- a/drivers/ssb/pci.c
  398. +++ b/drivers/ssb/pci.c
  399. @@ -339,6 +339,21 @@ static s8 r123_extract_antgain(u8 sprom_
  400. return (s8)gain;
  401. }
  402. +static void sprom_extract_r23(struct ssb_sprom *out, const u16 *in)
  403. +{
  404. + SPEX(boardflags_hi, SSB_SPROM2_BFLHI, 0xFFFF, 0);
  405. + SPEX(opo, SSB_SPROM2_OPO, SSB_SPROM2_OPO_VALUE, 0);
  406. + SPEX(pa1lob0, SSB_SPROM2_PA1LOB0, 0xFFFF, 0);
  407. + SPEX(pa1lob1, SSB_SPROM2_PA1LOB1, 0xFFFF, 0);
  408. + SPEX(pa1lob2, SSB_SPROM2_PA1LOB2, 0xFFFF, 0);
  409. + SPEX(pa1hib0, SSB_SPROM2_PA1HIB0, 0xFFFF, 0);
  410. + SPEX(pa1hib1, SSB_SPROM2_PA1HIB1, 0xFFFF, 0);
  411. + SPEX(pa1hib2, SSB_SPROM2_PA1HIB2, 0xFFFF, 0);
  412. + SPEX(maxpwr_ah, SSB_SPROM2_MAXP_A, SSB_SPROM2_MAXP_A_HI, 0);
  413. + SPEX(maxpwr_al, SSB_SPROM2_MAXP_A, SSB_SPROM2_MAXP_A_LO,
  414. + SSB_SPROM2_MAXP_A_LO_SHIFT);
  415. +}
  416. +
  417. static void sprom_extract_r123(struct ssb_sprom *out, const u16 *in)
  418. {
  419. int i;
  420. @@ -398,8 +413,7 @@ static void sprom_extract_r123(struct ss
  421. SSB_SPROM1_ITSSI_A_SHIFT);
  422. SPEX(itssi_bg, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_BG, 0);
  423. SPEX(boardflags_lo, SSB_SPROM1_BFLLO, 0xFFFF, 0);
  424. - if (out->revision >= 2)
  425. - SPEX(boardflags_hi, SSB_SPROM2_BFLHI, 0xFFFF, 0);
  426. +
  427. SPEX(alpha2[0], SSB_SPROM1_CCODE, 0xff00, 8);
  428. SPEX(alpha2[1], SSB_SPROM1_CCODE, 0x00ff, 0);
  429. @@ -410,6 +424,8 @@ static void sprom_extract_r123(struct ss
  430. out->antenna_gain.a1 = r123_extract_antgain(out->revision, in,
  431. SSB_SPROM1_AGAIN_A,
  432. SSB_SPROM1_AGAIN_A_SHIFT);
  433. + if (out->revision >= 2)
  434. + sprom_extract_r23(out, in);
  435. }
  436. /* Revs 4 5 and 8 have partially shared layout */
  437. --- a/include/linux/ssb/ssb_driver_chipcommon.h
  438. +++ b/include/linux/ssb/ssb_driver_chipcommon.h
  439. @@ -219,6 +219,7 @@
  440. #define SSB_CHIPCO_PMU_CTL 0x0600 /* PMU control */
  441. #define SSB_CHIPCO_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */
  442. #define SSB_CHIPCO_PMU_CTL_ILP_DIV_SHIFT 16
  443. +#define SSB_CHIPCO_PMU_CTL_PLL_UPD 0x00000400
  444. #define SSB_CHIPCO_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */
  445. #define SSB_CHIPCO_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */
  446. #define SSB_CHIPCO_PMU_CTL_ALPREQEN 0x00000080 /* ALP req enable */
  447. @@ -667,5 +668,6 @@ enum ssb_pmu_ldo_volt_id {
  448. void ssb_pmu_set_ldo_voltage(struct ssb_chipcommon *cc,
  449. enum ssb_pmu_ldo_volt_id id, u32 voltage);
  450. void ssb_pmu_set_ldo_paref(struct ssb_chipcommon *cc, bool on);
  451. +void ssb_pmu_spuravoid_pllupdate(struct ssb_chipcommon *cc, int spuravoid);
  452. #endif /* LINUX_SSB_CHIPCO_H_ */
  453. --- a/include/linux/ssb/ssb_regs.h
  454. +++ b/include/linux/ssb/ssb_regs.h
  455. @@ -289,11 +289,11 @@
  456. #define SSB_SPROM4_ETHPHY_ET1A_SHIFT 5
  457. #define SSB_SPROM4_ETHPHY_ET0M (1<<14) /* MDIO for enet0 */
  458. #define SSB_SPROM4_ETHPHY_ET1M (1<<15) /* MDIO for enet1 */
  459. -#define SSB_SPROM4_ANTAVAIL 0x005D /* Antenna available bitfields */
  460. -#define SSB_SPROM4_ANTAVAIL_A 0x00FF /* A-PHY bitfield */
  461. -#define SSB_SPROM4_ANTAVAIL_A_SHIFT 0
  462. -#define SSB_SPROM4_ANTAVAIL_BG 0xFF00 /* B-PHY and G-PHY bitfield */
  463. -#define SSB_SPROM4_ANTAVAIL_BG_SHIFT 8
  464. +#define SSB_SPROM4_ANTAVAIL 0x005C /* Antenna available bitfields */
  465. +#define SSB_SPROM4_ANTAVAIL_BG 0x00FF /* B-PHY and G-PHY bitfield */
  466. +#define SSB_SPROM4_ANTAVAIL_BG_SHIFT 0
  467. +#define SSB_SPROM4_ANTAVAIL_A 0xFF00 /* A-PHY bitfield */
  468. +#define SSB_SPROM4_ANTAVAIL_A_SHIFT 8
  469. #define SSB_SPROM4_AGAIN01 0x005E /* Antenna Gain (in dBm Q5.2) */
  470. #define SSB_SPROM4_AGAIN0 0x00FF /* Antenna 0 */
  471. #define SSB_SPROM4_AGAIN0_SHIFT 0