Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc/bt-host: Add facility for interrupt-driven BT messages #18

Closed
wants to merge 20 commits into from

Commits on Nov 11, 2015

  1. arm: Add Aspeed BMC machine

    Builds on Benh's initial bringup.
    
     - Fix reboot. aspeed_restart was declarted __init, so machine_restart
       was jumping into random memory. We can now reboot using the watchdog.
     - Add some device definitions
     - Use defines for aspeed machine
     - Add hpll to dts so drivers can query it
     - Build sram driver. We have a 32K chunk of SRAM on the AHB bus. Use
       the existing driver to provide access to the memory via genalloc.
     - Enable UART clock divisor. Our .dts assumes that the UART clock is
       divided by 13, but different u-boots may leave this bit in different
       states. Initialise it in aspeed_early_init explicitly.
     - Register APB clock with clk subsystem. This uses the fixed clock that
       Ben added to the device tree. It allows us to use the clock framework
       to query speeds from drivers.
     - irqchip/aspeed: Update to newer IRQ API
    
    Signed-off-by: Joel Stanley <[email protected]>
    Signed-off-by: Jeremy Kerr <[email protected]>
    ozbenh authored and shenki committed Nov 11, 2015
    Configuration menu
    Copy the full SHA
    4f576f8 View commit details
    Browse the repository at this point in the history
  2. arm: ast2400.h was not being included due to this

    TODO: Fix it properly
    
    Signed-off-by: Joel Stanley <[email protected]>
    shenki committed Nov 11, 2015
    Configuration menu
    Copy the full SHA
    58596fb View commit details
    Browse the repository at this point in the history
  3. pinctl: Add Aspeed driver

    Doesn't do anything yet.
    
    Signed-off-by: Joel Stanley <[email protected]>
    shenki committed Nov 11, 2015
    Configuration menu
    Copy the full SHA
    a96ae88 View commit details
    Browse the repository at this point in the history
  4. watchdog: Add Aspeed ast2400 watchdog driver

    We now use a notifier to perform reset, so the reboot callback can be
    removed from the platform code.
    
    Fixes from jk:
    
     - Unify register names with the doc
     - Move watchdog reset to a separate function. We do the same reset
       procedure in apeed_wdt_enable and our reboot notifier, so move these
       to a separate function. Also, use a couple of definitions for the
       watchdog control value rather than a hardcoded '3'.
     - Set system reset mode to 'full chip'. Currently, the watchdog timer
       does nothing on expiry - the 'SoC system' reset type doesn't seem to
       have any effect. This change uses the 'full chip' reset type instead.
    
    Signed-off-by: Jeremy Kerr <[email protected]>
    Signed-off-by: Joel Stanley <[email protected]>
    shenki committed Nov 11, 2015
    Configuration menu
    Copy the full SHA
    2d87770 View commit details
    Browse the repository at this point in the history
  5. rtc: Add Aspeed AST2400 rtc driver

    Read and writes the time to the non-battery backed RTC in the Aspeed
    AST2400 system on chip.
    
    TODO: support timer functionality.
    
    Signed-off-by: Joel Stanley <[email protected]>
    shenki committed Nov 11, 2015
    Configuration menu
    Copy the full SHA
    a71e32e View commit details
    Browse the repository at this point in the history
  6. gpio: Add Aspeed AST2400 driver

    Fixes from Al:
     - Move aspeed Kconfig entry to correct menu. The Aspeed GPIO menu entry
       was added under "PCI GPIO expanders" which depends on PCI which may
       not be enabled for Aspeed. Move the entry to the "Memory mapped GPIO
       drivers" which describes the Aspeed GPIO driver more correctly.
    
    Fixes from jk:
     - Pass struct resource directly to devm_ioremap_resource
     - Expose entire bank as one gpio chip
     - Implement interrupts for GPIO banks. We have a set of interrupt
       registers in each bank; this change adds a gpio irqchip to hook them
       up to the GPIO code.
     - Don't set names for aspeed GPIOs. We need the numbers for exporting anyway.
     - Constify the aspeed_gpio_banks structure
    
    Signed-off-by: Joel Stanley <[email protected]>
    Signed-off-by: Alistair Popple <[email protected]>
    Signed-off-by: Jeremy Kerr <[email protected]>
    shenki committed Nov 11, 2015
    Configuration menu
    Copy the full SHA
    993d8dc View commit details
    Browse the repository at this point in the history
  7. i2c: add crappy astsdk driver

    shenki committed Nov 11, 2015
    Configuration menu
    Copy the full SHA
    d009c32 View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2015

  1. i2c/aspeed: Rewrite driver

    Fixes from jk:
    
     - Set of_node of i2c bus devices, so the core code will enumerate for
       devices.
     - Rip out slave mode code
     - Simplify debugging printouts
     - Don't mask-out valid interrupt bits
     - Rework init procedure to match docs. We should enable the mode after
       the initial setup.
     - Use per-adapter device
     - It's "done", not "down".
     - Don't futz with the interrupt control register
     - Clean up interrupt definitions. Use common defs for the enable &
       status, and make the names a little more clear (TIMEOUT instead of
       TO, and ALERT instead of ALT, and make the address detection
       interrupts consistent).
     - Get rid fo xfer_mode, it could only be BYTE_XFER anyway.
     - Remove master_xfer callbacks, do_master_xfer could only have one value.
     - Remove master_xfer_len. It could only ever be 1. This allows us to
       remove xfer_len in master_xfer_done.
     - Simplify message state info
     - Rework driver state machine
    
    Signed-off-by: Joel Stanley <[email protected]>
    Signed-off-by: Jeremy Kerr <[email protected]>
    shenki committed Nov 13, 2015
    Configuration menu
    Copy the full SHA
    256b79d View commit details
    Browse the repository at this point in the history
  2. bt/ipmi: Add Aspeed BT IPMI host driver

    This patch adds a simple device driver to expose the iBT interface on
    Aspeed chips as a character device (/dev/bt).
    
    Plus various fixes from jk:
    
     - Fix compile warnings. We have a bunch of unused functions.
     - Remove unused members of struct bt_host
     - Fix whitespace issues
     - Use explicit u8 type for bt registers to avoid any issues with
       signed vs unsigned types.
     - Remove chrdev_region, use module_platform_driver
     - Unify device name to bt-host
     - Use a more explicit compatible string. The interface we're using here
       is specific to the aspeed hardware implementation.
     - Use a dynamic miscdev; no need to use a global miscdev here.
     - Avoid global bt_host. Rather than having a global bt_host, use
       references from the file & miscdev. This removes the restriction on
       the number of bt-host devices.
     - Add ioctl to assert SMS_ATN
     - Remove bt_host->ctrl, nothing uses it.
     - Read bt ctrl state after poll_wait
     - Fix unit address for ibt
    
    Signed-off-by: Alistair Popple <[email protected]>
    Signed-off-by: Jeremy Kerr <[email protected]>
    Signed-off-by: Joel Stanley <[email protected]>
    apopple authored and shenki committed Nov 13, 2015
    Configuration menu
    Copy the full SHA
    ff2c8b1 View commit details
    Browse the repository at this point in the history
  3. net/ncsi: Resource management

    According to NCSI spec (DSP0222), the NCSI enabled interface can
    connected to multiple packages simultaneously, up to 8 packages.
    Each package includes multiple channels, up to 32 channels. At
    one moment, one channel is enabled to provide service to the NCSI
    enabled interface. Besides, each channel comprises capabilities,
    modes, filters, version and statistics etc. All of them are
    resources to NCSI protocol stack.
    
    At the meanwhile, the NCSI device seen from NIC driver is
    represented by "struct ncsi_dev", which is expected to populated
    and started by NIC driver before the NIC can work. All possible
    NCSI packages and NCSI channels connected to the NCSI interface
    are tracked from the NCSI device. Also, the NCSI device recognizes
    active channel that is currently providing service to NCSI enabled
    interface. Also, the NCSI requests (pairs of command and response)
    are embedded in NCSI device.
    
    This introduces the data structs to represents the NCSI resources
    mentioned as above. Also, functions used by NCSI stack internally
    are implemented. Besides, this introduces kernel config option
    CONFIG_NET_NCSI to enable NCSI stack.
    
    Signed-off-by: Gavin Shan <[email protected]>
    Gavin Shan authored and shenki committed Nov 13, 2015
    Configuration menu
    Copy the full SHA
    4bc432b View commit details
    Browse the repository at this point in the history
  4. net/ncsi: Packet handler

    NCSI packet encapsulated in ethernet frame is recognized by the
    ethernet protocol field (0x88F8). According to NCSI spec, the
    destination MAC field should be 0xFF's, but the source MAC field
    could be arbitrary one since channel field in NCSI header indicates
    the source of the packet.
    
    There are 3 types of packets depending on the type field in the NCSI
    packet header: command, response, Asynchronous Event Notification
    (AEN). The command packets are sent from NCSI enabled interace to
    the NCSI package or channel for purpose of information retrival or
    configuration. The response packets, as responses to the received
    command packets, originate from NCSI package or channel and terminate
    at NCSI enabled interface. AEN packets are sent from NCSI channel
    for asynchronous events that might indicate failure detected on
    the active channel.
    
    This implements the functions to handle NCSI packets.
    
    Signed-off-by: Gavin Shan <[email protected]>
    Gavin Shan authored and shenki committed Nov 13, 2015
    Configuration menu
    Copy the full SHA
    6365442 View commit details
    Browse the repository at this point in the history
  5. net/ncsi: Manage NCSI device

    There are multiple packages and channels connecting to NCSI enabled
    interface. The available packages and channels are probed with NCSI
    packets when NCSI device is started. Among the available packages
    and channels, only one channel should be selected to be active to
    provide service. When the active channel enters to failure state,
    we need choose another channel as active one to do failover.
    
    This implements the state machine to support above tasks. Also, the
    public interfaces are exposed for NIC driver to manage NCSI device.
    
    Signed-off-by: Gavin Shan <[email protected]>
    Gavin Shan authored and shenki committed Nov 13, 2015
    Configuration menu
    Copy the full SHA
    682e9cd View commit details
    Browse the repository at this point in the history
  6. net/ncsi: Netlink support

    This adds netlink support so that userland can retrieve the NCSI
    topology on the specified interface. Also, more netlink commands
    are introduced to retrieve information from the active channel
    or configure the active channel with provided options.
    
    Signed-off-by: Gavin Shan <[email protected]>
    Gavin Shan authored and shenki committed Nov 13, 2015
    Configuration menu
    Copy the full SHA
    052b94b View commit details
    Browse the repository at this point in the history
  7. net/faraday: Enable NCSI interface

    The NIC has the possibility to connect to NCSI package and channel.
    This supports NCSI enabled interface. When the network device is
    registered, the accompanying NCSI device is registered. When the
    interface is to be brought up, the NCSI device is started to probe
    NCSI topology and choose one active channel automatically. On the
    other handle, when the interface is to be brought down, the interface
    will be shuted down when the NCSI device is teared down.
    
    Signed-off-by: Gavin Shan <[email protected]>
    Signed-off-by: Joel Stanley <[email protected]>
    Gavin Shan authored and shenki committed Nov 13, 2015
    Configuration menu
    Copy the full SHA
    c34dbb2 View commit details
    Browse the repository at this point in the history
  8. net/faraday: Enable offload checksum according to device-tree

    This enables IP/UDP/TCP offload checksum according to information
    passed on from bootloader through device-tree. The offload doesn't
    working properly when the interface works in NCSI mode.
    
    Signed-off-by: Gavin Shan <[email protected]>
    Gavin Shan authored and shenki committed Nov 13, 2015
    Configuration menu
    Copy the full SHA
    6094dc9 View commit details
    Browse the repository at this point in the history
  9. arm/configs: Add aspeed defconfig suitable for OpenBMC

    Signed-off-by: Joel Stanley <[email protected]>
    Signed-off-by: Jeremy Kerr <[email protected]>
    shenki committed Nov 13, 2015
    Configuration menu
    Copy the full SHA
    8e352cd View commit details
    Browse the repository at this point in the history
  10. arch/arm/boot/dts: Use a common dtsi file for aspeed devices

    the dts files for palmetto and barreleye are mostly the same; use a dtsi
    file for the common chip parts, with the board-specific things in the
    per-platform files.
    
     - Add #address- & #size-cells properties to i2c.
     - Added i2c busses and devices
     - Update device tree for ncsi support
    
    Signed-off-by: Jeremy Kerr <[email protected]>
    Signed-off-by: Joel Stanley <[email protected]>
    jk-ozlabs authored and shenki committed Nov 13, 2015
    Configuration menu
    Copy the full SHA
    c4777f9 View commit details
    Browse the repository at this point in the history
  11. i2c: Don't print in i2c_device_uevent

    CONFIG_I2C_DEBUG_CORE + systemd-journald = infinite loop
    
    Signed-off-by: Jeremy Kerr <[email protected]>
    jk-ozlabs authored and shenki committed Nov 13, 2015
    Configuration menu
    Copy the full SHA
    a7534b2 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2015

  1. misc/bt-host: Add facility for interrupt-driven BT messages

    This change adds a facility for the bt-host driver to use interrupts
    rather than polling via a timer.
    
    If we find an interrupts property in the device tree, we'll enable
    interrupts on the bt device.
    
    Signed-off-by: Jeremy Kerr <[email protected]>
    jk-ozlabs committed Nov 18, 2015
    Configuration menu
    Copy the full SHA
    4e082c8 View commit details
    Browse the repository at this point in the history
  2. misc/bt-host: Use devm_ioremap_resource()

    No need to unpack struct resource, and we don't need ioremap_uncached
    here.
    
    Signed-off-by: Jeremy Kerr <[email protected]>
    jk-ozlabs committed Nov 18, 2015
    Configuration menu
    Copy the full SHA
    d8d15b9 View commit details
    Browse the repository at this point in the history