1. 23 9月, 2016 5 次提交
  2. 07 9月, 2016 1 次提交
  3. 14 7月, 2016 1 次提交
  4. 04 7月, 2016 2 次提交
    • C
      ast2400: add SPI flash slaves · 924ed163
      Cédric Le Goater 提交于
      Each controller on the ast2400 has a memory range on which it maps its
      flash module slaves. Each slave is assigned a memory segment for its
      mapping that can be changed at bootime with the Segment Address
      Register. This is not supported in the current implementation so we
      are using the defaults provided by the specs.
      
      Each SPI flash slave can then be accessed in two modes: Command and
      User. When in User mode, accesses to the memory segment of the slaves
      are translated in SPI transfers. When in Command mode, the HW
      generates the SPI commands automatically and the memory segment is
      accessed as if doing a MMIO. Other SPI controllers call that mode
      linear addressing mode.
      
      For this purpose, we are adding below each crontoller an array of
      structs gathering for each SPI flash module, a segment rank, a
      MemoryRegion to handle the memory accesses and the associated SPI
      slave device, which should be a m25p80.
      
      Only the User mode is supported for now but we are preparing ground
      for the Command mode. The framework is sufficient to support Linux.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-id: 1467138270-32481-8-git-send-email-clg@kaod.org
      [PMM: Use g_new0() rather than g_malloc0()]
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      924ed163
    • C
      ast2400: add SMC controllers (FMC and SPI) · 7c1c69bc
      Cédric Le Goater 提交于
      The Aspeed AST2400 soc includes a static memory controller for the BMC
      which supports NOR, NAND and SPI flash memory modules. This controller
      has two modes : the SMC for the legacy interface which supports only
      one module and the FMC for the new interface which supports up to five
      modules. The AST2400 also includes a SPI only controller used for the
      host firmware, commonly called BIOS on Intel. It can be used in three
      mode : a SPI master, SPI slave and SPI pass-through
      
      Below is the initial framework for the SMC controller (FMC mode only)
      and the SPI controller: the sysbus object, MMIO for registers
      configuration and controls. Each controller has a SPI bus and a
      configurable number of CS lines for SPI flash slaves.
      
      The differences between the controllers are small, so they are
      abstracted using indirections on the register numbers.
      
      Only SPI flash modules are supported.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-id: 1467138270-32481-7-git-send-email-clg@kaod.org
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      [PMM: added one missing error_propagate]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7c1c69bc
  5. 27 6月, 2016 1 次提交
  6. 06 6月, 2016 1 次提交
    • C
      i2c: add aspeed i2c controller · 16020011
      Cédric Le Goater 提交于
      The Aspeed AST2400 integrates a set of 14 I2C/SMBus bus controllers
      directly connected to the APB bus. They can be programmed as master or
      slave but the propopsed model only supports the master mode.
      
      On the TODO list, we also have :
      
       - improve and harden the state machine.
       - bus recovery support (used by the Linux driver).
       - transfer mode state machine bits. this is not strictly necessary as
         it is mostly used for debug. The bus busy bit is deducted from the
         I2C core engine of qemu.
       - support of the pool buffer: 2048 bytes of internal SRAM (not used
         by the Linux driver).
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Reviewed-by: NAndrew Jeffery <andrew@aj.id.au>
      Message-id: 1464704307-25178-1-git-send-email-clg@kaod.org
      [PMM: removed unused functions aspeed_i2c_bus_get_state() and
       aspeed_i2c_bus_set_state()]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      16020011
  7. 19 5月, 2016 1 次提交
  8. 23 3月, 2016 2 次提交
    • P
      hw: explicitly include qemu-common.h and cpu.h · 4771d756
      Paolo Bonzini 提交于
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      4771d756
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  9. 17 3月, 2016 1 次提交