kernel: update 3.14 to 3.14.5
[openwrt.git] / target / linux / generic / patches-3.14 / 020-ssb_update.patch
1 commit 4f4aa2ec24dc45881849833a439558d3a378028c
2 Author: Rafał Miłecki <zajec5@gmail.com>
3 Date:   Sun May 18 00:22:38 2014 +0200
4
5     ssb: sprom: add dev_id field for value overriding standard ID
6     
7     Some devices may have different features despite sharing the same ID
8     (e.g. PCI ID). For example 14e4:4331 is usually a dual band, but this
9     can be "limited". Device with "pci/x/y/devid=0x4332" supports 2.4 GHz
10     only. Similarly 0x4333 will mean support for 5 GHz only.
11     Add entry in SPROM so info described above can be extracted and stored.
12     
13     Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
14     Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
15     Signed-off-by: John W. Linville <linville@tuxdriver.com>
16
17 --- a/arch/mips/bcm47xx/sprom.c
18 +++ b/arch/mips/bcm47xx/sprom.c
19 @@ -168,6 +168,7 @@ static void nvram_read_alpha2(const char
20  static void bcm47xx_fill_sprom_r1234589(struct ssb_sprom *sprom,
21                                         const char *prefix, bool fallback)
22  {
23 +       nvram_read_u16(prefix, NULL, "devid", &sprom->dev_id, 0, fallback);
24         nvram_read_u8(prefix, NULL, "ledbh0", &sprom->gpio0, 0xff, fallback);
25         nvram_read_u8(prefix, NULL, "ledbh1", &sprom->gpio1, 0xff, fallback);
26         nvram_read_u8(prefix, NULL, "ledbh2", &sprom->gpio2, 0xff, fallback);
27 --- a/include/linux/ssb/ssb.h
28 +++ b/include/linux/ssb/ssb.h
29 @@ -33,6 +33,7 @@ struct ssb_sprom {
30         u8 et1phyaddr;          /* MII address for enet1 */
31         u8 et0mdcport;          /* MDIO for enet0 */
32         u8 et1mdcport;          /* MDIO for enet1 */
33 +       u16 dev_id;             /* Device ID overriding e.g. PCI ID */
34         u16 board_rev;          /* Board revision number from SPROM. */
35         u16 board_num;          /* Board number from SPROM. */
36         u16 board_type;         /* Board type from SPROM. */