03 Dec, 2018
1 commit
-
The OCC is a device embedded on a POWER processor that collects and
aggregates sensor data from the processor and system. The OCC can
provide the raw sensor data as well as perform thermal and power
management on the system.This driver provides an atomic communications channel between a service
processor (e.g. a BMC) and the OCC. The driver is dependent on the FSI
SBEFIFO driver to get hardware access through the SBE to the OCC SRAM.
Commands are issued to the SBE to send or fetch data to the SRAM.Signed-off-by: Eddie James
Signed-off-by: Andrew Jeffery
Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Joel Stanley
Signed-off-by: Guenter Roeck
26 Nov, 2018
2 commits
-
Remove linux/cdev.h which is included more than once
Signed-off-by: Brajeswar Ghosh
Signed-off-by: Benjamin Herrenschmidt -
In randconfig builds without CONFIG_GENERIC_ALLOCATOR, this driver
fails to link:ERROR: "gen_pool_alloc_algo" [drivers/fsi/fsi-master-ast-cf.ko] undefined!
ERROR: "gen_pool_fixed_alloc" [drivers/fsi/fsi-master-ast-cf.ko] undefined!
ERROR: "of_gen_pool_get" [drivers/fsi/fsi-master-ast-cf.ko] undefined!
ERROR: "gen_pool_free" [drivers/fsi/fsi-master-ast-cf.ko] undefined!Select the dependency as all other users do.
Fixes: 6a794a27daca ("fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire")
Signed-off-by: Arnd Bergmann
Signed-off-by: Benjamin Herrenschmidt
24 Oct, 2018
1 commit
-
In the iov_iter struct, separate the iterator type from the iterator
direction and use accessor functions to access them in most places.Convert a bunch of places to use switch-statements to access them rather
then chains of bitwise-AND statements. This makes it easier to add further
iterator types. Also, this can be more efficient as to implement a switch
of small contiguous integers, the compiler can use ~50% fewer compare
instructions than it has to use bitwise-and instructions.Further, cease passing the iterator type into the iterator setup function.
The iterator function can set that itself. Only the direction is required.Signed-off-by: David Howells
08 Aug, 2018
1 commit
-
Otherwise cronus putmem fails istep and BML fails to upload skiboot
To do that, we still use our one-page command buffer for small commands
for speed, and for anything bigger, with a limit of 1MB plus a page,
we vmalloc a temporary buffer.The limit was chosen because Cronus will break up any data transfer
into 1M chunks (the extra page is for the command header).Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Andrew Jeffery
06 Aug, 2018
1 commit
-
The chardev conversion forgot to copy the fsi_dev,
silly mistake, compounded by a testing mistake on
my side, this specific driver wasn't being tested
properly.Fixes: d8f4587655f9 "fsi: scom: Convert to use the new chardev"
Signed-off-by: Benjamin Herrenschmidt
27 Jul, 2018
5 commits
-
The bus scanning process isn't terribly good at parallel attempts
at rescanning the same bus. Let's have a per-master mutex protecting
the scanning process.Signed-off-by: Benjamin Herrenschmidt
-
This aims to deprecate the "raw" sysfs file used for directly
accessing the CFAM and instead use a char device like the
other sub drivers.Since it reworks the slave creation code and adds a cfam device
type, we also use the opportunity to convert the attributes
to attribute groups and add a couple more.Signed-off-by: Benjamin Herrenschmidt
-
This converts FSI scom to use the new fsi-core controlled
chardev allocator and use a real cdev instead of a miscdev.Signed-off-by: Benjamin Herrenschmidt
-
This converts FSI sbefifo to use the new fsi-core controlled
chardev allocator and use a real cdev instead of a miscdev.One side effect is to fix the object lifetime by removing
the use of devm_kzalloc() for something that contains kobjects,
and using proper reference counting.Signed-off-by: Benjamin Herrenschmidt
-
The various FSI devices (sbefifo, occ, scom, more to come)
currently use misc devices.This is problematic as the minor device space for misc is
limited and there can be a lot of them. Also it limits our
ability to move them to a dedicated /dev/fsi directory or
to be smart about device naming and numbering.It also means we have IDAs on every single of these drivers
This creates a common fsi "device_type" for the optional
/dev/fsi grouping and a dev_t allocator for all FSI devices."Legacy" devices get to use a backward compatible numbering
scheme (as long as chip id
26 Jul, 2018
2 commits
-
s390 defines a global dump_trace() symbol. Rename ours to
dump_ucode_trace() to avoid a collision in build tests.Signed-off-by: Benjamin Herrenschmidt
-
In case memory resources for *fw* were allocated, release them
before return.Addresses-Coverity-ID: 1472044 ("Resource leak")
Fixes: 6a794a27daca ("fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire")
Signed-off-by: Gustavo A. R. Silva
Signed-off-by: Benjamin Herrenschmidt
25 Jul, 2018
1 commit
-
Then reading the RTAG/RCRC "registers" from the coprocessor after
a command is complete, mask out the top bits, only keep the relevant
bits. Microcode v5 will leave garbage in those top bits as a
result of a performance optimization.Signed-off-by: Benjamin Herrenschmidt
---
24 Jul, 2018
1 commit
-
A couple of places forgot the 'z' qualifier for dev_dbg
when printing a size_tSigned-off-by: Benjamin Herrenschmidt
23 Jul, 2018
3 commits
-
They get retrieved from the device-tree and exposed
as an attribute in sysfsSigned-off-by: Benjamin Herrenschmidt
-
Some of the exit path missed the unlock. Move the mutex to
an outer function to avoid the problem completelySigned-off-by: Benjamin Herrenschmidt
-
The Aspeed AST2x00 can contain a ColdFire v1 coprocessor which
is currently unused on OpenPower systems.This adds an alternative to the fsi-master-gpio driver that
uses that coprocessor instead of bit banging from the ARM
core itself. The end result is about 4 times faster.The firmware for the coprocessor and its source code can be
found at https://github.com/ozbenh/cf-fsi and is system specific.Signed-off-by: Benjamin Herrenschmidt
12 Jul, 2018
13 commits
-
This moves the definitions for various protocol details
(message & response codes, delays etc...) out of
fsi-master-gpio.c to fsi-master.h in order to share them
with other master implementations.Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Joel Stanley -
The embedded struct device needs a release function to be
able to successfully remove the driver.We remove the devm_gpiod_put() as they are unnecessary
(the resources will be released automatically) and because
fsi_master_unregister() will cause the master structure to
be freed.Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Joel Stanley -
In the error path of fsi_master_register(), we currently
use device_unregister(). This will cause the last reference
to the structure to be dropped, thus freeing the enclosing
structure, which isn't what the callers want.Use device_del() instead so that we return to the caller
with a refcount of 1. The caller can then assume that it
must use put_device() after a call to fsi_master_register()
regardless of whether the latter suceeded or failed.Signed-off-by: Benjamin Herrenschmidt
-
Some definitions are generic to the FSI protocol or any
give master implementation. Rename them to remove the
"GPIO" prefix in preparation for moving them to a common
header.Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Joel Stanley# Conflicts:
# drivers/fsi/fsi-master-gpio.c -
Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Joel Stanley -
This adds a few more tracepoints that have proven useful when
debugging issues with the FSI bus.This also makes echo_delay() use clock_zeros() instead of
open-code it in order to share the tracepoint.Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Joel Stanley -
To configure the send and echo delays
Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Joel Stanley -
What the driver called "FSI_GPIO_PRIME_SLAVE_CLOCKS" is what
the FSI spec calls tSendDelay and should be 16 clocks by
default.Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Joel Stanley -
Those values control the amount of "dummy" clocks between commands and
between a command and its response.This adds a way to configure them from sysfs (to be later extended to
defaults in the device-tree). The default remains 16 (the HW default).This is only supported if the backend supports the new link_config()
callback to configure the generation of those delays.Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Joel Stanley
--- -
Move fsi_slave_set_smode() and its helpers to before it's
first user and remove the corresponding forward declaration.Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Joel Stanley -
"dev" is dereferences before it's checked.
Reported-by: Dan Carpenter
Signed-off-by: Benjamin Herrenschmidt -
The driver calls of_platform_device_create() which is only available
if OF_ADDRESS is enabled. When building sparc64 images, this results
inERROR: "of_platform_device_create" [drivers/fsi/fsi-sbefifo.ko] undefined!
Fixes: 9f4a8a2d7f9d ("fsi/sbefifo: Add driver for the SBE FIFO")
Cc: Benjamin Herrenschmidt
Signed-off-by: Guenter Roeck
Signed-off-by: Benjamin Herrenschmidt -
There was no unlock of the FFDC mutex.
Fixes: 9f4a8a2d7f9d ("fsi/sbefifo: Add driver for the SBE FIFO")
Signed-off-by: Eddie James
Signed-off-by: Benjamin Herrenschmidt
18 Jun, 2018
8 commits
-
This was too hard to split ... this adds a number of features
to the SCOM user interface:- Support for indirect SCOMs
- read()/write() interface now handle errors and retries
- New ioctl() "raw" interface for use by debuggers
Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Eddie James
Reviewed-by: Alistair Popple -
Add a few more register and bit definitions, also define and use
SCOM_READ_CMD (which is 0 but it makes the code clearer)Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Eddie James -
Use the proper annotated type __be32 and fixup the
accessor used for get_scom()Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Eddie James -
No functional changes
Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Eddie James -
Otherwise, multiple clients can open the driver and attempt
to access the PIB at the same time, thus clobbering each other
in the process.Signed-off-by: Benjamin Herrenschmidt
Reviewed-by: Eddie James -
fsi-core.c:210:9: warning: cast to restricted __be32
fsi-core.c:210:9: warning: cast to restricted __be32
fsi-core.c:210:9: warning: cast to restricted __be32
fsi-core.c:210:9: warning: cast to restricted __be32
fsi-core.c:210:9: warning: cast to restricted __be32
fsi-core.c:210:9: warning: cast to restricted __be32
fsi-core.c:210:9: warning: cast to restricted __be32
fsi-core.c:210:9: warning: cast to restricted __be32
fsi-core.c:210:9: warning: cast to restricted __be32
fsi-core.c:210:9: warning: cast to restricted __be32
fsi-core.c:210:9: warning: cast to restricted __be32
fsi-core.c:210:9: warning: cast to restricted __be32
fsi-core.c:606:15: warning: incorrect type in assignment (different base types)
fsi-core.c:606:15: expected unsigned int [unsigned] [assigned] [usertype] smode
fsi-core.c:606:15: got restricted __be32 [usertype]
fsi-core.c:492:28: warning: expression using sizeof(void)
fsi-core.c:520:29: warning: expression using sizeof(void)
fsi-core.c:682:19: warning: cast to restricted __be32
fsi-core.c:682:19: warning: cast to restricted __be32
fsi-core.c:682:19: warning: cast to restricted __be32
fsi-core.c:682:19: warning: cast to restricted __be32
fsi-core.c:682:19: warning: cast to restricted __be32
fsi-core.c:682:19: warning: cast to restricted __be32
fsi-core.c:706:24: warning: incorrect type in assignment (different base types)
fsi-core.c:706:24: expected unsigned int [unsigned] [usertype] llmode
fsi-core.c:706:24: got restricted __be32 [usertype]Signed-off-by: Joel Stanley
Signed-off-by: Benjamin Herrenschmidt -
fsi-master-hub.c:128:13: warning: incorrect type in assignment (different base types)
fsi-master-hub.c:128:13: expected unsigned int [unsigned] [usertype] cmd
fsi-master-hub.c:128:13: got restricted __be32 [usertype]
fsi-master-hub.c:208:13: warning: incorrect type in assignment (different base types)
fsi-master-hub.c:208:13: expected restricted __be32 [addressable] [assigned] [usertype] reg
fsi-master-hub.c:208:13: got intSigned-off-by: Joel Stanley
Signed-off-by: Benjamin Herrenschmidt -
fsi-sbefifo.c:547:58: warning: incorrect type in argument 2 (different base types)
fsi-sbefifo.c:547:58: expected restricted __be32 [usertype] *word
fsi-sbefifo.c:547:58: got unsigned int *
fsi-sbefifo.c:635:16: warning: incorrect type in assignment (different base types)
fsi-sbefifo.c:635:16: expected unsigned int [unsigned]
fsi-sbefifo.c:635:16: got restricted __be32 [usertype]
fsi-sbefifo.c:636:16: warning: incorrect type in assignment (different base types)
fsi-sbefifo.c:636:16: expected unsigned int [unsigned]
fsi-sbefifo.c:636:16: got restricted __be32 [usertype]Signed-off-by: Joel Stanley
Signed-off-by: Benjamin Herrenschmidt
14 Jun, 2018
1 commit
-
Spotted by kbuild-test-bot
Signed-off-by: Benjamin Herrenschmidt