Commit graph

512 commits

Author SHA1 Message Date
Tomasz Bursztyka 854d77aa37 spi: Fix init level data id
Change-Id: I51612bbea34fa7b32b09bd15a97ab0c6e0a8c9fd
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:24:22 -05:00
Dirk Brandewie 4365f02391 init: rename pure_late_init to pre_kernel_late_init
Change-Id: I9561315a892933370d60fcf36c10d38078d66233
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie 58a534b929 init: add pure_core_init level
There are devices that need are part of the architecture core the need
to be initialized prior to devices that are integrated around a core
to make up a complete SOC. Namely the interrupt controller in the SOC
must be configured in order to allow the integrated IP blocks drivers
to initialize correctly.

Change-Id: I0a91e08f98516a7b7dd402ffc6494a071f1326b2
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie c48418f2bd init: remove pure_init macro
This macro is legacy from an early implementation of the init system
before the pure level was split into early and late phases remove it
now to avoid confusion going forward.

Change-Id: I6720874c840c9e14888fd6f411a8182e7420ca29
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:19 -05:00
Dirk Brandewie f4ded7a0c1 x86: spi: Move system binding code to intel_spi.c
The code fragment to bind the instances of the SPI driveri is not
platform specific but is driver specific.

All the information required to bind a driver instance comes from
CONFIG_ variables.  Having the binding code with the driver code
avoids duplicating the code fragments in each platform where the
driver may be used.

Change-Id: Iff40227e3e25d431ae870d585445971f35d934dd
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:17 -05:00
Tomasz Bursztyka ad35e5dacf spi: Mask tx interrupt once over with any transmission
Or then the controller will spin around requesting to get its fifo
filled-in though it's unnecessary.

Change-Id: I81e7c483345236dee7691c3e780b1b06d6b2d0f8
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:15:41 -05:00
Tomasz Bursztyka 9d0af1c270 spi: Intel spi driver fixes
- Handle the new error callback type, a ROR interrupt is irrecoverable.
- Removing the fifo pre-fill: this should never be done that way. It's
  up to the controller to request via an interrupt to get its fifo
  filled-in. (TFS bit on SSSR register is the one requesting such
  filling)
- Disabling the controller once completed (following transfer will
  re-enable it)
- Removing useless debugging info

Change-Id: I466a8efb65a41f3315a6a36e10ea519d0c4b01e9
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:15:36 -05:00
Tomasz Bursztyka e4479cd0cf spi: Handle the support for PCI_ENUMERATION
Without it, it won't go through a pci scan, and will just trust the
pre-set information for the bus/dev/function to enable the memory
mapped registers.

Change-Id: Ica9156be541619dce9684dd45f70e05b69782a7c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:15:32 -05:00
Tomasz Bursztyka ff3f81b44c pci: Make use of pci_show without #ifdef
This will make code that use it not too crowded with #ifdef #endif

Change-Id: Iec0fa662445b1cefdc7c64d9483e1ae483106a90
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:15:32 -05:00
Tomasz Bursztyka 3e32b29f57 spi: Fix the case when PCI is not in use on intel driver
Change-Id: Id1c5f259e6788d8cba024139e710db9c9d78d943
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:15:32 -05:00
Tomasz Bursztyka d96943b04c spi: Add support for Intel's SPI controller
Such controllers are found in Quark's X1000 series, and thus are found
on Galileo boards v1 and v2.

Change-Id: Ib71486c9f27de1b6c48ce3cb3dd138d69833c2ea
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:28 -05:00
Tomasz Bursztyka d5d525562e drivers: Add the common directory and files for SPI
Add the necessary Kconfig, Makefile etc...

Change-Id: I3682ab353ef71f3827520ab3fc4b16a122180d99
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:28 -05:00