27 Sep, 2013

1 commit

  • This patch removes the bcma_core_pci_power_save() call from
    the bcma_core_pci_{up,down}() functions as it tries to schedule
    thus requiring to call them from non-atomic context. The function
    bcma_core_pci_power_save() is now exported so the calling module
    can explicitly use it in non-atomic context. This fixes the
    'scheduling while atomic' issue reported by Tod Jackson and
    Joe Perches.

    [ 13.210710] BUG: scheduling while atomic: dhcpcd/1800/0x00000202
    [ 13.210718] Modules linked in: brcmsmac nouveau coretemp kvm_intel kvm cordic brcmutil bcma dell_wmi atl1c ttm mxm_wmi wmi
    [ 13.210756] CPU: 2 PID: 1800 Comm: dhcpcd Not tainted 3.11.0-wl #1
    [ 13.210762] Hardware name: Alienware M11x R2/M11x R2, BIOS A04 11/23/2010
    [ 13.210767] ffff880177c92c40 ffff880170fd1948 ffffffff8169af5b 0000000000000007
    [ 13.210777] ffff880170fd1ab0 ffff880170fd1958 ffffffff81697ee2 ffff880170fd19d8
    [ 13.210785] ffffffff816a19f5 00000000000f4240 000000000000d080 ffff880170fd1fd8
    [ 13.210794] Call Trace:
    [ 13.210813] [] dump_stack+0x4f/0x84
    [ 13.210826] [] __schedule_bug+0x43/0x51
    [ 13.210837] [] __schedule+0x6e5/0x810
    [ 13.210845] [] schedule+0x24/0x70
    [ 13.210855] [] schedule_hrtimeout_range_clock+0x10c/0x150
    [ 13.210867] [] ? update_rmtp+0x60/0x60
    [ 13.210877] [] ? hrtimer_start_range_ns+0xf/0x20
    [ 13.210887] [] schedule_hrtimeout_range+0xe/0x10
    [ 13.210897] [] usleep_range+0x3b/0x40
    [ 13.210910] [] bcma_pcie_mdio_set_phy.isra.3+0x4f/0x80 [bcma]
    [ 13.210921] [] bcma_pcie_mdio_write.isra.4+0xbf/0xd0 [bcma]
    [ 13.210932] [] bcma_pcie_mdio_writeread.isra.6.constprop.13+0x18/0x30 [bcma]
    [ 13.210942] [] bcma_core_pci_power_save+0x3e/0x80 [bcma]
    [ 13.210953] [] bcma_core_pci_up+0x2d/0x60 [bcma]
    [ 13.210975] [] brcms_c_up+0xfc/0x430 [brcmsmac]
    [ 13.210989] [] brcms_up+0x1d/0x20 [brcmsmac]
    [ 13.211003] [] brcms_ops_start+0x298/0x340 [brcmsmac]
    [ 13.211020] [] ? cfg80211_netdev_notifier_call+0xd2/0x5f0
    [ 13.211030] [] ? packet_notifier+0xad/0x1d0
    [ 13.211064] [] ieee80211_do_open+0x325/0xf80
    [ 13.211076] [] ? __raw_notifier_call_chain+0x9/0x10
    [ 13.211086] [] ieee80211_open+0x71/0x80
    [ 13.211101] [] __dev_open+0x87/0xe0
    [ 13.211109] [] __dev_change_flags+0x9c/0x180
    [ 13.211117] [] dev_change_flags+0x23/0x70
    [ 13.211127] [] devinet_ioctl+0x5b8/0x6a0
    [ 13.211136] [] inet_ioctl+0x75/0x90
    [ 13.211147] [] sock_do_ioctl+0x2b/0x70
    [ 13.211155] [] sock_ioctl+0x71/0x2a0
    [ 13.211169] [] do_vfs_ioctl+0x87/0x520
    [ 13.211180] [] ? ____fput+0x9/0x10
    [ 13.211198] [] ? task_work_run+0x9c/0xd0
    [ 13.211202] [] SyS_ioctl+0x91/0xb0
    [ 13.211208] [] system_call_fastpath+0x16/0x1b
    [ 13.211217] NOHZ: local_softirq_pending 202

    The issue was introduced in v3.11 kernel by following commit:

    commit aa51e598d04c6acf5477934cd6383f5a17ce9029
    Author: Hauke Mehrtens
    Date: Sat Aug 24 00:32:31 2013 +0200

    brcmsmac: use bcma PCIe up and down functions

    replace the calls to bcma_core_pci_extend_L1timer() by calls to the
    newly introduced bcma_core_pci_ip() and bcma_core_pci_down()

    Signed-off-by: Hauke Mehrtens
    Cc: Arend van Spriel
    Signed-off-by: John W. Linville

    This fix has been discussed with Hauke Mehrtens [1] selection
    option 3) and is intended for v3.12.

    Ref:
    [1] http://mid.gmane.org/5239B12D.3040206@hauke-m.de

    Cc: # 3.11.x
    Cc: Tod Jackson
    Cc: Joe Perches
    Cc: Rafal Milecki
    Cc: Hauke Mehrtens
    Reviewed-by: Hante Meuleman
    Signed-off-by: Arend van Spriel
    Signed-off-by: John W. Linville

    Arend van Spriel
     

27 Aug, 2013

3 commits


23 Jul, 2013

2 commits

  • These are the chipIDs of some ARM based SoCs from the BCM47xx line.

    Signed-off-by: Hauke Mehrtens
    Signed-off-by: John W. Linville

    Hauke Mehrtens
     
  • These cores were found on a BCM4708 (chipid 53010), this is a ARM SoC
    with two Cortex A9 cores.

    bcma: bus0: Found chip with id 0xCF12, rev 0x00 and package 0x02
    bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x2A, class 0x0)
    bcma: bus0: Core 1 found: DMA (manuf 0x4BF, id 0x502, rev 0x01, class 0x0)
    bcma: bus0: Core 2 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x04, class 0x0)
    bcma: bus0: Core 3 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x04, class 0x0)
    bcma: bus0: Core 4 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x04, class 0x0)
    bcma: bus0: Core 5 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x04, class 0x0)
    bcma: bus0: Core 6 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x01, class 0x0)
    bcma: bus0: Core 7 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x01, class 0x0)
    bcma: bus0: Core 8 found: ARM Cortex A9 core (ihost) (manuf 0x4BF, id 0x510, rev 0x01, class 0x0)
    bcma: bus0: Core 9 found: USB 2.0 (manuf 0x4BF, id 0x504, rev 0x01, class 0x0)
    bcma: bus0: Core 10 found: USB 3.0 (manuf 0x4BF, id 0x505, rev 0x01, class 0x0)
    bcma: bus0: Core 11 found: SDIO3 (manuf 0x4BF, id 0x503, rev 0x01, class 0x0)
    bcma: bus0: Core 12 found: ARM Cortex A9 JTAG (manuf 0x4BF, id 0x506, rev 0x01, class 0x0)
    bcma: bus0: Core 13 found: Denali DDR2/DDR3 memory controller (manuf 0x4BF, id 0x507, rev 0x01, class 0x0)
    bcma: bus0: Core 14 found: ROM (manuf 0x4BF, id 0x508, rev 0x01, class 0x0)
    bcma: bus0: Core 15 found: NAND flash controller (manuf 0x4BF, id 0x509, rev 0x01, class 0x0)
    bcma: bus0: Core 16 found: SPI flash controller (manuf 0x4BF, id 0x50A, rev 0x01, class 0x0)

    Signed-off-by: Hauke Mehrtens
    Signed-off-by: John W. Linville

    Hauke Mehrtens
     

28 Jun, 2013

1 commit


18 May, 2013

1 commit


13 Apr, 2013

2 commits

  • Set device in a manner that SDIO I/O card reset
    will lead to WLAN backplane and PMU state reset.

    Reviewed-by: Hante Meuleman
    Reviewed-by: Arend van Spriel
    Reviewed-by: Pieter-Paul Giesberts
    Reviewed-by: Franky (Zhenhui) Lin
    Signed-off-by: Piotr Haber
    Signed-off-by: Arend van Spriel
    Signed-off-by: John W. Linville

    Piotr Haber
     
  • Newer WiFi chip use ARM CR4 core to achieve higher performance. Add necessary
    code for host driver in order to support CR4 core.

    Reviewed-by: Arend van Spriel
    Reviewed-by: Pieter-Paul Giesberts
    Signed-off-by: Franky Lin
    Signed-off-by: Arend van Spriel
    Signed-off-by: John W. Linville

    Franky Lin
     

28 Mar, 2013

2 commits


26 Mar, 2013

1 commit


03 Mar, 2013

1 commit

  • Pull MTD update from David Woodhouse:
    "Fairly unexciting MTD merge for 3.9:

    - misc clean-ups in the MTD command-line partitioning parser
    (cmdlinepart)
    - add flash locking support for STmicro chips serial flash chips, as
    well as for CFI command set 2 chips.
    - new driver for the ELM error correction HW module found in various
    TI chips, enable the OMAP NAND driver to use the ELM HW error
    correction
    - added number of new serial flash IDs
    - various fixes and improvements in the gpmi NAND driver
    - bcm47xx NAND driver improvements
    - make the mtdpart module actually removable"

    * tag 'for-linus-20130301' of git://git.infradead.org/linux-mtd: (45 commits)
    mtd: map: BUG() in non handled cases
    mtd: bcm47xxnflash: use pr_fmt for module prefix in messages
    mtd: davinci_nand: Use managed resources
    mtd: mtd_torturetest can cause stack overflows
    mtd: physmap_of: Convert device allocation to managed devm_kzalloc()
    mtd: at91: atmel_nand: for PMECC, add code to check the ONFI parameter ECC requirement.
    mtd: atmel_nand: make pmecc-cap, pmecc-sector-size in dts is optional.
    mtd: atmel_nand: avoid to report an error when lookup table offset is 0.
    mtd: bcm47xxsflash: adjust names of bus-specific functions
    mtd: bcm47xxpart: improve probing of nvram partition
    mtd: bcm47xxpart: add support for other erase sizes
    mtd: bcm47xxnflash: register this as normal driver
    mtd: bcm47xxnflash: fix message
    mtd: bcm47xxsflash: register this as normal driver
    mtd: bcm47xxsflash: write number of written bytes
    mtd: gpmi: add sanity check for the ECC
    mtd: gpmi: set the Golois Field bit for mx6q's BCH
    mtd: devices: elm: Removes literals in elm DT node
    mtd: gpmi: fix a dereferencing freed memory error
    mtd: fix the wrong timeo for panic_nand_wait()
    ...

    Linus Torvalds
     

09 Feb, 2013

1 commit


04 Feb, 2013

1 commit


02 Feb, 2013

1 commit


31 Jan, 2013

1 commit

  • The old bcm47xx gpio code had support for gpio_to_irq, but the new
    code did not provide this function, but returned -ENXIO all the time.
    This patch adds the missing function.

    Signed-off-by: Hauke Mehrtens
    Signed-off-by: John W. Linville

    Hauke Mehrtens
     

29 Jan, 2013

1 commit


16 Jan, 2013

1 commit


15 Jan, 2013

1 commit


12 Jan, 2013

2 commits


10 Jan, 2013

1 commit

  • BCMA is a Broadcom specific bus with devices AKA cores. All recent BCMA
    based SoCs have gigabit ethernet provided by the GBit MAC core. This
    patch adds driver for such a cores registering itself as a netdev. It
    has been tested on a BCM4706 and BCM4718 chipsets.

    In the kernel tree there is already b44 driver which has some common
    things with bgmac, however there are many differences that has led to
    the decision or writing a new driver:
    1) GBit MAC cores appear on BCMA bus (not SSB as in case of b44)
    2) There is 64bit DMA engine which differs from 32bit one
    3) There is no CAM (Content Addressable Memory) in GBit MAC
    4) We have 4 TX queues on GBit MAC devices (instead of 1)
    5) Many registers have different addresses/values
    6) RX header flags are also different

    The driver in it's state is functional how, however there is of course
    place for improvements:
    1) Supporting more net_device_ops
    2) SUpporting more ethtool_ops
    3) Unaligned addressing in DMA
    4) Writing separated PHY driver

    Signed-off-by: Rafał Miłecki
    Signed-off-by: David S. Miller

    Rafał Miłecki
     

08 Jan, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, and __devexit
    from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: "Rafał Miłecki"
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

20 Dec, 2012

1 commit

  • Pull MTD updates from David Woodhouse:
    - Various cleanups especially in NAND tests
    - Add support for NAND flash on BCMA bus
    - DT support for sh_flctl and denali NAND drivers
    - Kill obsolete/superceded drivers (fortunet, nomadik_nand)
    - Fix JFFS2 locking bug in ENOMEM failure path
    - New SPI flash chips, as usual
    - Support writing in 'reliable mode' for DiskOnChip G4
    - Debugfs support in nandsim

    * tag 'for-linus-20121219' of git://git.infradead.org/linux-mtd: (96 commits)
    mtd: nand: typo in nand_id_has_period() comments
    mtd: nand/gpio: use io{read,write}*_rep accessors
    mtd: block2mtd: throttle writes by calling balance_dirty_pages_ratelimited.
    mtd: nand: gpmi: reset BCH earlier, too, to avoid NAND startup problems
    mtd: nand/docg4: fix and improve read of factory bbt
    mtd: nand/docg4: reserve bb marker area in ecclayout
    mtd: nand/docg4: add support for writing in reliable mode
    mtd: mxc_nand: reorder part_probes to let cmdline override other sources
    mtd: mxc_nand: fix unbalanced clk_disable() in error path
    mtd: nandsim: Introduce debugfs infrastructure
    mtd: physmap_of: error checking to prevent a NULL pointer dereference
    mtg: docg3: potential divide by zero in doc_write_oob()
    mtd: bcm47xxnflash: writing support
    mtd: tests/read: initialize buffer for whole next page
    mtd: at91: atmel_nand: return bit flips for the PMECC read_page()
    mtd: fix recovery after failed write-buffer operation in cfi_cmdset_0002.c
    mtd: nand: onfi need to be probed in 8 bits mode
    mtd: nand: add NAND_BUSWIDTH_AUTO to autodetect bus width
    mtd: nand: print flash size during detection
    mted: nand_wait_ready timeout fix
    ...

    Linus Torvalds
     

15 Dec, 2012

1 commit

  • Pull MIPS updates from Ralf Baechle:
    "The MIPS bits for 3.8. This also includes a bunch fixes that were
    sitting in the linux-mips.org git tree for a long time. This pull
    request contains updates to several OCTEON drivers and the board
    support code for BCM47XX, BCM63XX, XLP, XLR, XLS, lantiq, Loongson1B,
    updates to the SSB bus support, MIPS kexec code and adds support for
    kdump.

    When pulling this, there are two expected merge conflicts in
    include/linux/bcma/bcma_driver_chipcommon.h which are trivial to
    resolve, just remove the conflict markers and keep both alternatives."

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (90 commits)
    MIPS: PMC-Sierra Yosemite: Remove support.
    VIDEO: Newport Fix console crashes
    MIPS: wrppmc: Fix build of PCI code.
    MIPS: IP22/IP28: Fix build of EISA code.
    MIPS: RB532: Fix build of prom code.
    MIPS: PowerTV: Fix build.
    MIPS: IP27: Correct fucked grammar in ops-bridge.c
    MIPS: Highmem: Fix build error if CONFIG_DEBUG_HIGHMEM is disabled
    MIPS: Fix potencial corruption
    MIPS: Fix for warning from FPU emulation code
    MIPS: Handle COP3 Unusable exception as COP1X for FP emulation
    MIPS: Fix poweroff failure when HOTPLUG_CPU configured.
    MIPS: MT: Fix build with CONFIG_UIDGID_STRICT_TYPE_CHECKS=y
    MIPS: Remove unused smvp.h
    MIPS/EDAC: Improve OCTEON EDAC support.
    MIPS: OCTEON: Add definitions for OCTEON memory contoller registers.
    MIPS: OCTEON: Add OCTEON family definitions to octeon-model.h
    ata: pata_octeon_cf: Use correct byte order for DMA in when built little-endian.
    MIPS/OCTEON/ata: Convert pata_octeon_cf.c to use device tree.
    MIPS: Remove usage of CEVT_R4K_LIB config option.
    ...

    Linus Torvalds
     

07 Dec, 2012

2 commits

  • Register the watchdog driver to the system if this is a SoC. Using the
    watchdog on a non SoC device, like a PCIe card, will make the PCIe
    card die when the timeout expired, but starting it again is not
    supported by bcma.

    Signed-off-by: Hauke Mehrtens
    Signed-off-by: John W. Linville

    Hauke Mehrtens
     
  • The watchdog driver wants to set the watchdog timeout in ms and not in
    ticks, which is depending on the SoC type and the clock.
    Calculate the number of ticks per millisecond and provide two functions
    for the watchdog driver. Also return the ticks or millisecond the timer
    was set to in case the provided value was bigger than the max allowed
    value.

    Signed-off-by: Hauke Mehrtens
    Signed-off-by: John W. Linville

    Hauke Mehrtens
     

27 Nov, 2012

1 commit


22 Nov, 2012

4 commits

  • This is required by NAND flash driver for initializing wait counters.

    Signed-off-by: Rafał Miłecki
    Signed-off-by: Artem Bityutskiy

    Rafał Miłecki
     
  • Register a GPIO driver to access the GPIOs provided by the chip.
    The GPIOs of the SoC should always start at 0 and the other GPIOs could
    start at a random position. There is just one SoC in a system and when
    they start at 0 the number is predictable.

    Signed-off-by: Hauke Mehrtens
    Patchwork: http://patchwork.linux-mips.org/patch/4587
    Acked-by: Florian Fainelli

    Hauke Mehrtens
     
  • Add functions to access the GPIO registers for pullup and pulldown.
    These are needed for handling gpio registration.

    Signed-off-by: Hauke Mehrtens
    Patchwork: http://patchwork.linux-mips.org/patch/4586
    Acked-by: Florian Fainelli

    Hauke Mehrtens
     
  • The GPIOs are access through some registers in the chip common core.
    We need locking around these GPIO accesses, all GPIOs are accessed
    through the same registers and parallel writes will cause problems.

    Signed-off-by: Hauke Mehrtens
    Patchwork: http://patchwork.linux-mips.org/patch/4585
    Acked-by: Florian Fainelli

    Hauke Mehrtens
     

20 Oct, 2012

5 commits