Commit 5c74f27b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'fsi-updates-2018-06-12' of...

Merge tag 'fsi-updates-2018-06-12' of https://git.kernel.org/pub/scm/linux/kernel/git/benh/linux-fsi into char-misc-next

Ben writes:

FSI updates and sbefifo driver
parents a59f95c7 9f4a8a2d
...@@ -52,6 +52,7 @@ fsi: gpio-fsi { ...@@ -52,6 +52,7 @@ fsi: gpio-fsi {
compatible = "fsi-master-gpio", "fsi-master"; compatible = "fsi-master-gpio", "fsi-master";
#address-cells = <2>; #address-cells = <2>;
#size-cells = <0>; #size-cells = <0>;
no-gpio-delays;
clock-gpios = <&gpio ASPEED_GPIO(AA, 0) GPIO_ACTIVE_HIGH>; clock-gpios = <&gpio ASPEED_GPIO(AA, 0) GPIO_ACTIVE_HIGH>;
data-gpios = <&gpio ASPEED_GPIO(AA, 2) GPIO_ACTIVE_HIGH>; data-gpios = <&gpio ASPEED_GPIO(AA, 2) GPIO_ACTIVE_HIGH>;
......
...@@ -153,6 +153,7 @@ fsi: gpio-fsi { ...@@ -153,6 +153,7 @@ fsi: gpio-fsi {
compatible = "fsi-master-gpio", "fsi-master"; compatible = "fsi-master-gpio", "fsi-master";
#address-cells = <2>; #address-cells = <2>;
#size-cells = <0>; #size-cells = <0>;
no-gpio-delays;
clock-gpios = <&gpio ASPEED_GPIO(AA, 0) GPIO_ACTIVE_HIGH>; clock-gpios = <&gpio ASPEED_GPIO(AA, 0) GPIO_ACTIVE_HIGH>;
data-gpios = <&gpio ASPEED_GPIO(E, 0) GPIO_ACTIVE_HIGH>; data-gpios = <&gpio ASPEED_GPIO(E, 0) GPIO_ACTIVE_HIGH>;
......
...@@ -91,6 +91,7 @@ fsi: gpio-fsi { ...@@ -91,6 +91,7 @@ fsi: gpio-fsi {
compatible = "fsi-master-gpio", "fsi-master"; compatible = "fsi-master-gpio", "fsi-master";
#address-cells = <2>; #address-cells = <2>;
#size-cells = <0>; #size-cells = <0>;
no-gpio-delays;
trans-gpios = <&gpio ASPEED_GPIO(O, 6) GPIO_ACTIVE_HIGH>; trans-gpios = <&gpio ASPEED_GPIO(O, 6) GPIO_ACTIVE_HIGH>;
enable-gpios = <&gpio ASPEED_GPIO(D, 0) GPIO_ACTIVE_HIGH>; enable-gpios = <&gpio ASPEED_GPIO(D, 0) GPIO_ACTIVE_HIGH>;
......
...@@ -32,4 +32,11 @@ config FSI_SCOM ...@@ -32,4 +32,11 @@ config FSI_SCOM
---help--- ---help---
This option enables an FSI based SCOM device driver. This option enables an FSI based SCOM device driver.
config FSI_SBEFIFO
tristate "SBEFIFO FSI client device driver"
---help---
This option enables an FSI based SBEFIFO device driver. The SBEFIFO is
a pipe-like FSI device for communicating with the self boot engine
(SBE) on POWER processors.
endif endif
...@@ -3,3 +3,4 @@ obj-$(CONFIG_FSI) += fsi-core.o ...@@ -3,3 +3,4 @@ obj-$(CONFIG_FSI) += fsi-core.o
obj-$(CONFIG_FSI_MASTER_HUB) += fsi-master-hub.o obj-$(CONFIG_FSI_MASTER_HUB) += fsi-master-hub.o
obj-$(CONFIG_FSI_MASTER_GPIO) += fsi-master-gpio.o obj-$(CONFIG_FSI_MASTER_GPIO) += fsi-master-gpio.o
obj-$(CONFIG_FSI_SCOM) += fsi-scom.o obj-$(CONFIG_FSI_SCOM) += fsi-scom.o
obj-$(CONFIG_FSI_SBEFIFO) += fsi-sbefifo.o
This diff is collapsed.
This diff is collapsed.
...@@ -26,15 +26,11 @@ ...@@ -26,15 +26,11 @@
#define FSI_ENGID_SCOM 0x5 #define FSI_ENGID_SCOM 0x5
#define SCOM_FSI2PIB_DELAY 50
/* SCOM engine register set */ /* SCOM engine register set */
#define SCOM_DATA0_REG 0x00 #define SCOM_DATA0_REG 0x00
#define SCOM_DATA1_REG 0x04 #define SCOM_DATA1_REG 0x04
#define SCOM_CMD_REG 0x08 #define SCOM_CMD_REG 0x08
#define SCOM_RESET_REG 0x1C
#define SCOM_RESET_CMD 0x80000000
#define SCOM_WRITE_CMD 0x80000000 #define SCOM_WRITE_CMD 0x80000000
struct scom_device { struct scom_device {
...@@ -180,7 +176,6 @@ static const struct file_operations scom_fops = { ...@@ -180,7 +176,6 @@ static const struct file_operations scom_fops = {
static int scom_probe(struct device *dev) static int scom_probe(struct device *dev)
{ {
uint32_t data;
struct fsi_device *fsi_dev = to_fsi_dev(dev); struct fsi_device *fsi_dev = to_fsi_dev(dev);
struct scom_device *scom; struct scom_device *scom;
...@@ -197,9 +192,6 @@ static int scom_probe(struct device *dev) ...@@ -197,9 +192,6 @@ static int scom_probe(struct device *dev)
scom->mdev.parent = dev; scom->mdev.parent = dev;
list_add(&scom->link, &scom_devices); list_add(&scom->link, &scom_devices);
data = cpu_to_be32(SCOM_RESET_CMD);
fsi_device_write(fsi_dev, SCOM_RESET_REG, &data, sizeof(uint32_t));
return misc_register(&scom->mdev); return misc_register(&scom->mdev);
} }
......
/*
* SBEFIFO FSI Client device driver
*
* Copyright (C) IBM Corporation 2017
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERGCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef LINUX_FSI_SBEFIFO_H
#define LINUX_FSI_SBEFIFO_H
#define SBEFIFO_CMD_PUT_OCC_SRAM 0xa404
#define SBEFIFO_CMD_GET_OCC_SRAM 0xa403
#define SBEFIFO_CMD_GET_SBE_FFDC 0xa801
#define SBEFIFO_MAX_FFDC_SIZE 0x2000
struct device;
int sbefifo_submit(struct device *dev, const __be32 *command, size_t cmd_len,
__be32 *response, size_t *resp_len);
int sbefifo_parse_status(struct device *dev, u16 cmd, __be32 *response,
size_t resp_len, size_t *data_len);
#endif /* LINUX_FSI_SBEFIFO_H */
...@@ -64,6 +64,49 @@ TRACE_EVENT(fsi_master_gpio_break, ...@@ -64,6 +64,49 @@ TRACE_EVENT(fsi_master_gpio_break,
) )
); );
TRACE_EVENT(fsi_master_gpio_crc_cmd_error,
TP_PROTO(const struct fsi_master_gpio *master),
TP_ARGS(master),
TP_STRUCT__entry(
__field(int, master_idx)
),
TP_fast_assign(
__entry->master_idx = master->master.idx;
),
TP_printk("fsi-gpio%d ----CRC command retry---",
__entry->master_idx
)
);
TRACE_EVENT(fsi_master_gpio_crc_rsp_error,
TP_PROTO(const struct fsi_master_gpio *master),
TP_ARGS(master),
TP_STRUCT__entry(
__field(int, master_idx)
),
TP_fast_assign(
__entry->master_idx = master->master.idx;
),
TP_printk("fsi-gpio%d ----CRC response---",
__entry->master_idx
)
);
TRACE_EVENT(fsi_master_gpio_poll_response_busy,
TP_PROTO(const struct fsi_master_gpio *master, int busy),
TP_ARGS(master, busy),
TP_STRUCT__entry(
__field(int, master_idx)
__field(int, busy)
),
TP_fast_assign(
__entry->master_idx = master->master.idx;
__entry->busy = busy;
),
TP_printk("fsi-gpio%d: device reported busy %d times",
__entry->master_idx, __entry->busy)
);
#endif /* _TRACE_FSI_MASTER_GPIO_H */ #endif /* _TRACE_FSI_MASTER_GPIO_H */
#include <trace/define_trace.h> #include <trace/define_trace.h>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment