linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] RAVE SP MFD driver fixes/improvements
@ 2018-07-07  2:41 Andrey Smirnov
  2018-07-07  2:41 ` [PATCH 1/6] mfd: rave-sp: Remove unused defines Andrey Smirnov
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Andrey Smirnov @ 2018-07-07  2:41 UTC (permalink / raw)
  To: Lee Jones
  Cc: Andrey Smirnov, linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

Lee:

This series is a number of small fixes the resulted from using RAVE SP
driver on wider selection of ZII devices that initial driver was
tested on. In addition to RDU1 and RDU2, the driver is now known to
work reasonably well on SCU2 Mezz (being upstreamed currently) as well
as SPU3 (not supported by upstream yet).

Hopefully all of the changes are straightforward.

Let me know if anything needs changing.

Thanks,
Andrey Smirnov

Andrey Smirnov (6):
  mfd: rave-sp: Remove unused defines
  mfd: rave-sp: Fix incorrectly specified checksum type
  mfd: rave-sp: Initialize flow control and parity of the port
  mfd: rave-sp: Add legacy EEPROM access command translation
  mfd: rave-sp: Add legacy watchdog ping command translation
  mfd: rave-sp: Emulate CMD_GET_STATUS on device that don't support it

 drivers/mfd/rave-sp.c       | 119 +++++++++++++++++++++++-------------
 include/linux/mfd/rave-sp.h |   1 +
 2 files changed, 76 insertions(+), 44 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/6] mfd: rave-sp: Remove unused defines
  2018-07-07  2:41 [PATCH 0/6] RAVE SP MFD driver fixes/improvements Andrey Smirnov
@ 2018-07-07  2:41 ` Andrey Smirnov
  2018-07-13  7:30   ` Lee Jones
  2018-07-07  2:41 ` [PATCH 2/6] mfd: rave-sp: Fix incorrectly specified checksum type Andrey Smirnov
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Andrey Smirnov @ 2018-07-07  2:41 UTC (permalink / raw)
  To: Lee Jones
  Cc: Andrey Smirnov, linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

Remove unusded defines that are a leftover from earlier iterations of
the driver.

Cc: linux-kernel@vger.kernel.org
Cc: cphealy@gmail.com
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/mfd/rave-sp.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c
index 36dcd98977d6..dfa4f5f1c376 100644
--- a/drivers/mfd/rave-sp.c
+++ b/drivers/mfd/rave-sp.c
@@ -63,16 +63,6 @@
 #define RAVE_SP_TX_BUFFER_SIZE				\
 	(RAVE_SP_STX_ETX_SIZE + 2 * RAVE_SP_RX_BUFFER_SIZE)
 
-#define RAVE_SP_BOOT_SOURCE_GET		0
-#define RAVE_SP_BOOT_SOURCE_SET		1
-
-#define RAVE_SP_RDU2_BOARD_TYPE_RMB	0
-#define RAVE_SP_RDU2_BOARD_TYPE_DEB	1
-
-#define RAVE_SP_BOOT_SOURCE_SD		0
-#define RAVE_SP_BOOT_SOURCE_EMMC	1
-#define RAVE_SP_BOOT_SOURCE_NOR		2
-
 /**
  * enum rave_sp_deframer_state - Possible state for de-framer
  *
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/6] mfd: rave-sp: Fix incorrectly specified checksum type
  2018-07-07  2:41 [PATCH 0/6] RAVE SP MFD driver fixes/improvements Andrey Smirnov
  2018-07-07  2:41 ` [PATCH 1/6] mfd: rave-sp: Remove unused defines Andrey Smirnov
@ 2018-07-07  2:41 ` Andrey Smirnov
  2018-07-13  7:30   ` Lee Jones
  2018-07-07  2:41 ` [PATCH 3/6] mfd: rave-sp: Initialize flow control and parity of the port Andrey Smirnov
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Andrey Smirnov @ 2018-07-07  2:41 UTC (permalink / raw)
  To: Lee Jones
  Cc: Andrey Smirnov, linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

RAVE SP firmware covered by "legacy" variant uses 16-bit CCITT
checksum algorithm. Change the code to correctly reflect that.

Cc: linux-kernel@vger.kernel.org
Cc: cphealy@gmail.com
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/mfd/rave-sp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c
index dfa4f5f1c376..a90ec4986b22 100644
--- a/drivers/mfd/rave-sp.c
+++ b/drivers/mfd/rave-sp.c
@@ -697,7 +697,7 @@ static const struct rave_sp_checksum rave_sp_checksum_ccitt = {
 };
 
 static const struct rave_sp_variant rave_sp_legacy = {
-	.checksum = &rave_sp_checksum_8b2c,
+	.checksum = &rave_sp_checksum_ccitt,
 	.cmd = {
 		.translate = rave_sp_default_cmd_translate,
 	},
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/6] mfd: rave-sp: Initialize flow control and parity of the port
  2018-07-07  2:41 [PATCH 0/6] RAVE SP MFD driver fixes/improvements Andrey Smirnov
  2018-07-07  2:41 ` [PATCH 1/6] mfd: rave-sp: Remove unused defines Andrey Smirnov
  2018-07-07  2:41 ` [PATCH 2/6] mfd: rave-sp: Fix incorrectly specified checksum type Andrey Smirnov
@ 2018-07-07  2:41 ` Andrey Smirnov
  2018-07-13  7:31   ` Lee Jones
  2018-07-07  2:41 ` [PATCH 4/6] mfd: rave-sp: Add legacy EEPROM access command translation Andrey Smirnov
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Andrey Smirnov @ 2018-07-07  2:41 UTC (permalink / raw)
  To: Lee Jones
  Cc: Andrey Smirnov, linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

Relying on serial port defaults for flow control and parity can result
in complete breakdown of communication with RAVE SP on some platforms
where defaults are not what we need them to be. One such case is
VF610-base ZII SPU3 board (not supported upstream). To avoid this
problem in the future, add code to explicitly configure both.

Cc: linux-kernel@vger.kernel.org
Cc: cphealy@gmail.com
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/mfd/rave-sp.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c
index a90ec4986b22..aa75d5841ca0 100644
--- a/drivers/mfd/rave-sp.c
+++ b/drivers/mfd/rave-sp.c
@@ -766,6 +766,13 @@ static int rave_sp_probe(struct serdev_device *serdev)
 		return ret;
 
 	serdev_device_set_baudrate(serdev, baud);
+	serdev_device_set_flow_control(serdev, false);
+
+	ret = serdev_device_set_parity(serdev, SERDEV_PARITY_NONE);
+	if (ret) {
+		dev_err(dev, "Failed to set parity\n");
+		return ret;
+	}
 
 	ret = rave_sp_get_status(sp);
 	if (ret) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/6] mfd: rave-sp: Add legacy EEPROM access command translation
  2018-07-07  2:41 [PATCH 0/6] RAVE SP MFD driver fixes/improvements Andrey Smirnov
                   ` (2 preceding siblings ...)
  2018-07-07  2:41 ` [PATCH 3/6] mfd: rave-sp: Initialize flow control and parity of the port Andrey Smirnov
@ 2018-07-07  2:41 ` Andrey Smirnov
  2018-07-13  7:31   ` Lee Jones
  2018-07-07  2:41 ` [PATCH 5/6] mfd: rave-sp: Add legacy watchdog ping " Andrey Smirnov
  2018-07-07  2:41 ` [PATCH 6/6] mfd: rave-sp: Emulate CMD_GET_STATUS on device that don't support it Andrey Smirnov
  5 siblings, 1 reply; 13+ messages in thread
From: Andrey Smirnov @ 2018-07-07  2:41 UTC (permalink / raw)
  To: Lee Jones
  Cc: Andrey Smirnov, linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

This is needed to make rave-sp-eeprom driver work on "legacy"
firmware.

Cc: linux-kernel@vger.kernel.org
Cc: cphealy@gmail.com
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/mfd/rave-sp.c       | 2 ++
 include/linux/mfd/rave-sp.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c
index aa75d5841ca0..a999fa721b03 100644
--- a/drivers/mfd/rave-sp.c
+++ b/drivers/mfd/rave-sp.c
@@ -635,6 +635,8 @@ static int rave_sp_default_cmd_translate(enum rave_sp_command command)
 		return 0x1E;
 	case RAVE_SP_CMD_RESET_REASON:
 		return 0x1F;
+	case RAVE_SP_CMD_RMB_EEPROM:
+		return 0x20;
 	default:
 		return -EINVAL;
 	}
diff --git a/include/linux/mfd/rave-sp.h b/include/linux/mfd/rave-sp.h
index fe0ce7bc59cf..11eef77ef976 100644
--- a/include/linux/mfd/rave-sp.h
+++ b/include/linux/mfd/rave-sp.h
@@ -21,6 +21,7 @@ enum rave_sp_command {
 	RAVE_SP_CMD_STATUS			= 0xA0,
 	RAVE_SP_CMD_SW_WDT			= 0xA1,
 	RAVE_SP_CMD_PET_WDT			= 0xA2,
+	RAVE_SP_CMD_RMB_EEPROM			= 0xA4,
 	RAVE_SP_CMD_SET_BACKLIGHT		= 0xA6,
 	RAVE_SP_CMD_RESET			= 0xA7,
 	RAVE_SP_CMD_RESET_REASON		= 0xA8,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/6] mfd: rave-sp: Add legacy watchdog ping command translation
  2018-07-07  2:41 [PATCH 0/6] RAVE SP MFD driver fixes/improvements Andrey Smirnov
                   ` (3 preceding siblings ...)
  2018-07-07  2:41 ` [PATCH 4/6] mfd: rave-sp: Add legacy EEPROM access command translation Andrey Smirnov
@ 2018-07-07  2:41 ` Andrey Smirnov
  2018-07-13  7:31   ` Lee Jones
  2018-07-07  2:41 ` [PATCH 6/6] mfd: rave-sp: Emulate CMD_GET_STATUS on device that don't support it Andrey Smirnov
  5 siblings, 1 reply; 13+ messages in thread
From: Andrey Smirnov @ 2018-07-07  2:41 UTC (permalink / raw)
  To: Lee Jones
  Cc: Andrey Smirnov, linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

This is needed to make rave-sp-wdt driver to properly ping the
watchdog on "legacy" firmware.

Cc: linux-kernel@vger.kernel.org
Cc: cphealy@gmail.com
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/mfd/rave-sp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c
index a999fa721b03..eee62ba6874d 100644
--- a/drivers/mfd/rave-sp.c
+++ b/drivers/mfd/rave-sp.c
@@ -631,6 +631,8 @@ static int rave_sp_default_cmd_translate(enum rave_sp_command command)
 		return 0x14;
 	case RAVE_SP_CMD_SW_WDT:
 		return 0x1C;
+	case RAVE_SP_CMD_PET_WDT:
+		return 0x1D;
 	case RAVE_SP_CMD_RESET:
 		return 0x1E;
 	case RAVE_SP_CMD_RESET_REASON:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 6/6] mfd: rave-sp: Emulate CMD_GET_STATUS on device that don't support it
  2018-07-07  2:41 [PATCH 0/6] RAVE SP MFD driver fixes/improvements Andrey Smirnov
                   ` (4 preceding siblings ...)
  2018-07-07  2:41 ` [PATCH 5/6] mfd: rave-sp: Add legacy watchdog ping " Andrey Smirnov
@ 2018-07-07  2:41 ` Andrey Smirnov
  2018-07-13  7:31   ` Lee Jones
  5 siblings, 1 reply; 13+ messages in thread
From: Andrey Smirnov @ 2018-07-07  2:41 UTC (permalink / raw)
  To: Lee Jones
  Cc: Andrey Smirnov, linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

CMD_GET_STATUS is not supported by some devices implementing
RDU2-compatible ICD as well as "legacy" devices. To account for that
fact, add code that obtains the same information (app/bootloader FW
version) using several different commands.

Cc: linux-kernel@vger.kernel.org
Cc: cphealy@gmail.com
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/mfd/rave-sp.c | 96 ++++++++++++++++++++++++++++---------------
 1 file changed, 63 insertions(+), 33 deletions(-)

diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c
index eee62ba6874d..2a8369657e38 100644
--- a/drivers/mfd/rave-sp.c
+++ b/drivers/mfd/rave-sp.c
@@ -117,14 +117,44 @@ struct rave_sp_checksum {
 	void (*subroutine)(const u8 *, size_t, u8 *);
 };
 
+struct rave_sp_version {
+	u8     hardware;
+	__le16 major;
+	u8     minor;
+	u8     letter[2];
+} __packed;
+
+struct rave_sp_status {
+	struct rave_sp_version bootloader_version;
+	struct rave_sp_version firmware_version;
+	u16 rdu_eeprom_flag;
+	u16 dds_eeprom_flag;
+	u8  pic_flag;
+	u8  orientation;
+	u32 etc;
+	s16 temp[2];
+	u8  backlight_current[3];
+	u8  dip_switch;
+	u8  host_interrupt;
+	u16 voltage_28;
+	u8  i2c_device_status;
+	u8  power_status;
+	u8  general_status;
+	u8  deprecated1;
+	u8  power_led_status;
+	u8  deprecated2;
+	u8  periph_power_shutoff;
+} __packed;
+
 /**
  * struct rave_sp_variant_cmds - Variant specific command routines
  *
  * @translate:	Generic to variant specific command mapping routine
- *
+ * @get_status: Variant specific implementation of CMD_GET_STATUS
  */
 struct rave_sp_variant_cmds {
 	int (*translate)(enum rave_sp_command);
+	int (*get_status)(struct rave_sp *sp, struct rave_sp_status *);
 };
 
 /**
@@ -170,35 +200,6 @@ struct rave_sp {
 	const char *part_number_bootloader;
 };
 
-struct rave_sp_version {
-	u8     hardware;
-	__le16 major;
-	u8     minor;
-	u8     letter[2];
-} __packed;
-
-struct rave_sp_status {
-	struct rave_sp_version bootloader_version;
-	struct rave_sp_version firmware_version;
-	u16 rdu_eeprom_flag;
-	u16 dds_eeprom_flag;
-	u8  pic_flag;
-	u8  orientation;
-	u32 etc;
-	s16 temp[2];
-	u8  backlight_current[3];
-	u8  dip_switch;
-	u8  host_interrupt;
-	u16 voltage_28;
-	u8  i2c_device_status;
-	u8  power_status;
-	u8  general_status;
-	u8  deprecated1;
-	u8  power_led_status;
-	u8  deprecated2;
-	u8  periph_power_shutoff;
-} __packed;
-
 static bool rave_sp_id_is_event(u8 code)
 {
 	return (code & 0xF0) == RAVE_SP_EVNT_BASE;
@@ -660,18 +661,44 @@ static const char *devm_rave_sp_version(struct device *dev,
 			      version->letter[1]);
 }
 
-static int rave_sp_get_status(struct rave_sp *sp)
+static int rave_sp_rdu1_get_status(struct rave_sp *sp,
+				   struct rave_sp_status *status)
 {
-	struct device *dev = &sp->serdev->dev;
 	u8 cmd[] = {
 		[0] = RAVE_SP_CMD_STATUS,
 		[1] = 0
 	};
+
+	return rave_sp_exec(sp, cmd, sizeof(cmd), status, sizeof(*status));
+}
+
+static int rave_sp_emulated_get_status(struct rave_sp *sp,
+				       struct rave_sp_status *status)
+{
+	u8 cmd[] = {
+		[0] = RAVE_SP_CMD_GET_FIRMWARE_VERSION,
+		[1] = 0,
+	};
+	int ret;
+
+	ret = rave_sp_exec(sp, cmd, sizeof(cmd), &status->firmware_version,
+			   sizeof(status->firmware_version));
+	if (ret)
+		return ret;
+
+	cmd[0] = RAVE_SP_CMD_GET_BOOTLOADER_VERSION;
+	return rave_sp_exec(sp, cmd, sizeof(cmd), &status->bootloader_version,
+			    sizeof(status->bootloader_version));
+}
+
+static int rave_sp_get_status(struct rave_sp *sp)
+{
+	struct device *dev = &sp->serdev->dev;
 	struct rave_sp_status status;
 	const char *version;
 	int ret;
 
-	ret = rave_sp_exec(sp, cmd, sizeof(cmd), &status, sizeof(status));
+	ret = sp->variant->cmd.get_status(sp, &status);
 	if (ret)
 		return ret;
 
@@ -704,6 +731,7 @@ static const struct rave_sp_variant rave_sp_legacy = {
 	.checksum = &rave_sp_checksum_ccitt,
 	.cmd = {
 		.translate = rave_sp_default_cmd_translate,
+		.get_status = rave_sp_emulated_get_status,
 	},
 };
 
@@ -711,6 +739,7 @@ static const struct rave_sp_variant rave_sp_rdu1 = {
 	.checksum = &rave_sp_checksum_8b2c,
 	.cmd = {
 		.translate = rave_sp_rdu1_cmd_translate,
+		.get_status = rave_sp_rdu1_get_status,
 	},
 };
 
@@ -718,6 +747,7 @@ static const struct rave_sp_variant rave_sp_rdu2 = {
 	.checksum = &rave_sp_checksum_ccitt,
 	.cmd = {
 		.translate = rave_sp_rdu2_cmd_translate,
+		.get_status = rave_sp_emulated_get_status,
 	},
 };
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/6] mfd: rave-sp: Remove unused defines
  2018-07-07  2:41 ` [PATCH 1/6] mfd: rave-sp: Remove unused defines Andrey Smirnov
@ 2018-07-13  7:30   ` Lee Jones
  0 siblings, 0 replies; 13+ messages in thread
From: Lee Jones @ 2018-07-13  7:30 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

On Fri, 06 Jul 2018, Andrey Smirnov wrote:

> Remove unusded defines that are a leftover from earlier iterations of
> the driver.
> 
> Cc: linux-kernel@vger.kernel.org
> Cc: cphealy@gmail.com
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  drivers/mfd/rave-sp.c | 10 ----------
>  1 file changed, 10 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/6] mfd: rave-sp: Fix incorrectly specified checksum type
  2018-07-07  2:41 ` [PATCH 2/6] mfd: rave-sp: Fix incorrectly specified checksum type Andrey Smirnov
@ 2018-07-13  7:30   ` Lee Jones
  0 siblings, 0 replies; 13+ messages in thread
From: Lee Jones @ 2018-07-13  7:30 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

On Fri, 06 Jul 2018, Andrey Smirnov wrote:

> RAVE SP firmware covered by "legacy" variant uses 16-bit CCITT
> checksum algorithm. Change the code to correctly reflect that.
> 
> Cc: linux-kernel@vger.kernel.org
> Cc: cphealy@gmail.com
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  drivers/mfd/rave-sp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/6] mfd: rave-sp: Initialize flow control and parity of the port
  2018-07-07  2:41 ` [PATCH 3/6] mfd: rave-sp: Initialize flow control and parity of the port Andrey Smirnov
@ 2018-07-13  7:31   ` Lee Jones
  0 siblings, 0 replies; 13+ messages in thread
From: Lee Jones @ 2018-07-13  7:31 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

On Fri, 06 Jul 2018, Andrey Smirnov wrote:

> Relying on serial port defaults for flow control and parity can result
> in complete breakdown of communication with RAVE SP on some platforms
> where defaults are not what we need them to be. One such case is
> VF610-base ZII SPU3 board (not supported upstream). To avoid this
> problem in the future, add code to explicitly configure both.
> 
> Cc: linux-kernel@vger.kernel.org
> Cc: cphealy@gmail.com
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  drivers/mfd/rave-sp.c | 7 +++++++
>  1 file changed, 7 insertions(+)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 4/6] mfd: rave-sp: Add legacy EEPROM access command translation
  2018-07-07  2:41 ` [PATCH 4/6] mfd: rave-sp: Add legacy EEPROM access command translation Andrey Smirnov
@ 2018-07-13  7:31   ` Lee Jones
  0 siblings, 0 replies; 13+ messages in thread
From: Lee Jones @ 2018-07-13  7:31 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

On Fri, 06 Jul 2018, Andrey Smirnov wrote:

> This is needed to make rave-sp-eeprom driver work on "legacy"
> firmware.
> 
> Cc: linux-kernel@vger.kernel.org
> Cc: cphealy@gmail.com
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  drivers/mfd/rave-sp.c       | 2 ++
>  include/linux/mfd/rave-sp.h | 1 +
>  2 files changed, 3 insertions(+)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/6] mfd: rave-sp: Add legacy watchdog ping command translation
  2018-07-07  2:41 ` [PATCH 5/6] mfd: rave-sp: Add legacy watchdog ping " Andrey Smirnov
@ 2018-07-13  7:31   ` Lee Jones
  0 siblings, 0 replies; 13+ messages in thread
From: Lee Jones @ 2018-07-13  7:31 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

On Fri, 06 Jul 2018, Andrey Smirnov wrote:

> This is needed to make rave-sp-wdt driver to properly ping the
> watchdog on "legacy" firmware.
> 
> Cc: linux-kernel@vger.kernel.org
> Cc: cphealy@gmail.com
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  drivers/mfd/rave-sp.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 6/6] mfd: rave-sp: Emulate CMD_GET_STATUS on device that don't support it
  2018-07-07  2:41 ` [PATCH 6/6] mfd: rave-sp: Emulate CMD_GET_STATUS on device that don't support it Andrey Smirnov
@ 2018-07-13  7:31   ` Lee Jones
  0 siblings, 0 replies; 13+ messages in thread
From: Lee Jones @ 2018-07-13  7:31 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: linux-kernel, cphealy, Lucas Stach, Nikita Yushchenko

On Fri, 06 Jul 2018, Andrey Smirnov wrote:

> CMD_GET_STATUS is not supported by some devices implementing
> RDU2-compatible ICD as well as "legacy" devices. To account for that
> fact, add code that obtains the same information (app/bootloader FW
> version) using several different commands.
> 
> Cc: linux-kernel@vger.kernel.org
> Cc: cphealy@gmail.com
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  drivers/mfd/rave-sp.c | 96 ++++++++++++++++++++++++++++---------------
>  1 file changed, 63 insertions(+), 33 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-07-13  7:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-07  2:41 [PATCH 0/6] RAVE SP MFD driver fixes/improvements Andrey Smirnov
2018-07-07  2:41 ` [PATCH 1/6] mfd: rave-sp: Remove unused defines Andrey Smirnov
2018-07-13  7:30   ` Lee Jones
2018-07-07  2:41 ` [PATCH 2/6] mfd: rave-sp: Fix incorrectly specified checksum type Andrey Smirnov
2018-07-13  7:30   ` Lee Jones
2018-07-07  2:41 ` [PATCH 3/6] mfd: rave-sp: Initialize flow control and parity of the port Andrey Smirnov
2018-07-13  7:31   ` Lee Jones
2018-07-07  2:41 ` [PATCH 4/6] mfd: rave-sp: Add legacy EEPROM access command translation Andrey Smirnov
2018-07-13  7:31   ` Lee Jones
2018-07-07  2:41 ` [PATCH 5/6] mfd: rave-sp: Add legacy watchdog ping " Andrey Smirnov
2018-07-13  7:31   ` Lee Jones
2018-07-07  2:41 ` [PATCH 6/6] mfd: rave-sp: Emulate CMD_GET_STATUS on device that don't support it Andrey Smirnov
2018-07-13  7:31   ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).