Re: [PATCH v17 0/5] ZII RAVE platform driver
On Wed, 03 Jan 2018, Andrew Morton wrote: > On Wed, 3 Jan 2018 09:46:21 + Lee Jones wrote: > > > Well I guess we better at least include them in the conversation. > > > > Stephen and Andrew added. > > > > On Tue, 02 Jan 2018, Andrey Smirnov wrote: > > > On Tue, Jan 2, 2018 at 7:17 AM, Lee Jones wrote: > > > > On Wed, 20 Dec 2017, Andrey Smirnov wrote: > > > > > > > >> Everyone: > > > >> > > > >> This patch series is v17 of the driver for supervisory processor found > > > >> on RAVE series of devices from ZII. Supervisory processor is a PIC > > > >> microcontroller connected to various electrical subsystems on RAVE > > > >> devices whose firmware implements protocol to command/qery them. > > > >> > > > >> NOTE: > > > >> > > > >> * This driver dependends on crc_ccitt_false(), added by > > > >>2da9378d531f8cc6670c7497f20d936b706ab80b in 'linux-next', the patch > > > >>was pulled in by Andrew Morton and is currently avaiting users, so > > > >>this series might have to go in through Andrew's tree > > > > > > > > Hmm... well that's annoying! I just attempted to merge this set, but > > > > early build tests fail due to a dependency already merged into -next. > > > > > > > > ../drivers/mfd/rave-sp.c:227:25: error: > > > > implicit declaration of function ‘crc_ccitt_false’ > > > > [-Werror=implicit-function-declaration] > > > > > > > > We need to figure out if either of the following are true: > > > > > > > > - Patch [0] can be dropped from Andrew's tree > > > >- ... and I can take it via the MFD tree instead > > Please merge lib-crc-ccitt-add-ccitt-false-crc16-variant.patch via the > MFD tree, along with its user. Here's my copy: Thanks Andrew. This has now been done. -- Lee Jones Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v17 0/5] ZII RAVE platform driver
On Wed, 3 Jan 2018 09:46:21 + Lee Jones wrote: > Well I guess we better at least include them in the conversation. > > Stephen and Andrew added. > > On Tue, 02 Jan 2018, Andrey Smirnov wrote: > > On Tue, Jan 2, 2018 at 7:17 AM, Lee Jones wrote: > > > On Wed, 20 Dec 2017, Andrey Smirnov wrote: > > > > > >> Everyone: > > >> > > >> This patch series is v17 of the driver for supervisory processor found > > >> on RAVE series of devices from ZII. Supervisory processor is a PIC > > >> microcontroller connected to various electrical subsystems on RAVE > > >> devices whose firmware implements protocol to command/qery them. > > >> > > >> NOTE: > > >> > > >> * This driver dependends on crc_ccitt_false(), added by > > >>2da9378d531f8cc6670c7497f20d936b706ab80b in 'linux-next', the patch > > >>was pulled in by Andrew Morton and is currently avaiting users, so > > >>this series might have to go in through Andrew's tree > > > > > > Hmm... well that's annoying! I just attempted to merge this set, but > > > early build tests fail due to a dependency already merged into -next. > > > > > > ../drivers/mfd/rave-sp.c:227:25: error: > > > implicit declaration of function ‘crc_ccitt_false’ > > > [-Werror=implicit-function-declaration] > > > > > > We need to figure out if either of the following are true: > > > > > > - Patch [0] can be dropped from Andrew's tree > > >- ... and I can take it via the MFD tree instead Please merge lib-crc-ccitt-add-ccitt-false-crc16-variant.patch via the MFD tree, along with its user. Here's my copy: From: Andrey Vostrikov Subject: lib/crc-ccitt: add CCITT-FALSE CRC16 variant In support of a soon to be published MFD driver using serdev to talk to a supervisory processor that uses the CCITT-FALSE CRC16 variant in it's protocol, this patch was tested successfully on an i.MX6 ARM platform. Link: http://lkml.kernel.org/r/20170413142932.27287-1-andrew.smir...@gmail.com Signed-off-by: Andrey Vostrikov Signed-off-by: Andrey Smirnov Tested-by: Chris Healy Signed-off-by: Andrew Morton --- include/linux/crc-ccitt.h |7 lib/crc-ccitt.c | 58 +++- 2 files changed, 64 insertions(+), 1 deletion(-) diff -puN include/linux/crc-ccitt.h~lib-crc-ccitt-add-ccitt-false-crc16-variant include/linux/crc-ccitt.h --- a/include/linux/crc-ccitt.h~lib-crc-ccitt-add-ccitt-false-crc16-variant +++ a/include/linux/crc-ccitt.h @@ -5,12 +5,19 @@ #include extern u16 const crc_ccitt_table[256]; +extern u16 const crc_ccitt_false_table[256]; extern u16 crc_ccitt(u16 crc, const u8 *buffer, size_t len); +extern u16 crc_ccitt_false(u16 crc, const u8 *buffer, size_t len); static inline u16 crc_ccitt_byte(u16 crc, const u8 c) { return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff]; } +static inline u16 crc_ccitt_false_byte(u16 crc, const u8 c) +{ +return (crc << 8) ^ crc_ccitt_false_table[(crc >> 8) ^ c]; +} + #endif /* _LINUX_CRC_CCITT_H */ diff -puN lib/crc-ccitt.c~lib-crc-ccitt-add-ccitt-false-crc16-variant lib/crc-ccitt.c --- a/lib/crc-ccitt.c~lib-crc-ccitt-add-ccitt-false-crc16-variant +++ a/lib/crc-ccitt.c @@ -51,8 +51,49 @@ u16 const crc_ccitt_table[256] = { }; EXPORT_SYMBOL(crc_ccitt_table); +/* + * Similar table to calculate CRC16 variant known as CRC-CCITT-FALSE + * Reflected bits order, does not augment final value. + */ +u16 const crc_ccitt_false_table[256] = { +0x, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, +0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, +0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, +0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE, +0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485, +0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D, +0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4, +0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC, +0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823, +0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B, +0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12, +0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A, +0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41, +0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49, +0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70, +0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78, +0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F, +0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067, +0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E, +0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256, +0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D, +0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, +0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF
Re: [PATCH v17 0/5] ZII RAVE platform driver
Well I guess we better at least include them in the conversation. Stephen and Andrew added. On Tue, 02 Jan 2018, Andrey Smirnov wrote: > On Tue, Jan 2, 2018 at 7:17 AM, Lee Jones wrote: > > On Wed, 20 Dec 2017, Andrey Smirnov wrote: > > > >> Everyone: > >> > >> This patch series is v17 of the driver for supervisory processor found > >> on RAVE series of devices from ZII. Supervisory processor is a PIC > >> microcontroller connected to various electrical subsystems on RAVE > >> devices whose firmware implements protocol to command/qery them. > >> > >> NOTE: > >> > >> * This driver dependends on crc_ccitt_false(), added by > >>2da9378d531f8cc6670c7497f20d936b706ab80b in 'linux-next', the patch > >>was pulled in by Andrew Morton and is currently avaiting users, so > >>this series might have to go in through Andrew's tree > > > > Hmm... well that's annoying! I just attempted to merge this set, but > > early build tests fail due to a dependency already merged into -next. > > > > ../drivers/mfd/rave-sp.c:227:25: error: > > implicit declaration of function ‘crc_ccitt_false’ > > [-Werror=implicit-function-declaration] > > > > We need to figure out if either of the following are true: > > > > - Patch [0] can be dropped from Andrew's tree > >- ... and I can take it via the MFD tree instead > FWIW, it seems to me that the path above should be doable (and might > be simpler?). Let me know if any action needs to be taken on my part. > > Thanks, > Andrey Smirnov > > - Patch [0] is on an immutable branch I can pull in to my PR > > > > If not, it will have to wait until the next cycle. > > > > [0]: > > > > Author: Andrey Vostrikov > > Date: Mon Dec 25 22:39:57 2017 +1100 > > > > lib/crc-ccitt: add CCITT-FALSE CRC16 variant > > > > In support of a soon to be published MFD driver using serdev to talk to > > a supervisory processor that uses the CCITT-FALSE CRC16 variant in it's > > protocol, this patch was tested successfully on an i.MX6 ARM platform. > > > > Link: > > http://lkml.kernel.org/r/20170413142932.27287-1-andrew.smir...@gmail.com > > Signed-off-by: Andrey Vostrikov > > Signed-off-by: Andrey Smirnov > > Tested-by: Chris Healy > > Signed-off-by: Andrew Morton > > Signed-off-by: Stephen Rothwell -- Lee Jones Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v17 0/5] ZII RAVE platform driver
On Tue, Jan 2, 2018 at 7:17 AM, Lee Jones wrote: > On Wed, 20 Dec 2017, Andrey Smirnov wrote: > >> Everyone: >> >> This patch series is v17 of the driver for supervisory processor found >> on RAVE series of devices from ZII. Supervisory processor is a PIC >> microcontroller connected to various electrical subsystems on RAVE >> devices whose firmware implements protocol to command/qery them. >> >> NOTE: >> >> * This driver dependends on crc_ccitt_false(), added by >>2da9378d531f8cc6670c7497f20d936b706ab80b in 'linux-next', the patch >>was pulled in by Andrew Morton and is currently avaiting users, so >>this series might have to go in through Andrew's tree > > Hmm... well that's annoying! I just attempted to merge this set, but > early build tests fail due to a dependency already merged into -next. > > ../drivers/mfd/rave-sp.c:227:25: error: > implicit declaration of function ‘crc_ccitt_false’ > [-Werror=implicit-function-declaration] > > We need to figure out if either of the following are true: > > - Patch [0] can be dropped from Andrew's tree >- ... and I can take it via the MFD tree instead FWIW, it seems to me that the path above should be doable (and might be simpler?). Let me know if any action needs to be taken on my part. Thanks, Andrey Smirnov
Re: [PATCH v17 0/5] ZII RAVE platform driver
On Wed, 20 Dec 2017, Andrey Smirnov wrote: > Everyone: > > This patch series is v17 of the driver for supervisory processor found > on RAVE series of devices from ZII. Supervisory processor is a PIC > microcontroller connected to various electrical subsystems on RAVE > devices whose firmware implements protocol to command/qery them. > > NOTE: > > * This driver dependends on crc_ccitt_false(), added by >2da9378d531f8cc6670c7497f20d936b706ab80b in 'linux-next', the patch >was pulled in by Andrew Morton and is currently avaiting users, so >this series might have to go in through Andrew's tree Hmm... well that's annoying! I just attempted to merge this set, but early build tests fail due to a dependency already merged into -next. ../drivers/mfd/rave-sp.c:227:25: error: implicit declaration of function ‘crc_ccitt_false’ [-Werror=implicit-function-declaration] We need to figure out if either of the following are true: - Patch [0] can be dropped from Andrew's tree - ... and I can take it via the MFD tree instead - Patch [0] is on an immutable branch I can pull in to my PR If not, it will have to wait until the next cycle. [0]: Author: Andrey Vostrikov Date: Mon Dec 25 22:39:57 2017 +1100 lib/crc-ccitt: add CCITT-FALSE CRC16 variant In support of a soon to be published MFD driver using serdev to talk to a supervisory processor that uses the CCITT-FALSE CRC16 variant in it's protocol, this patch was tested successfully on an i.MX6 ARM platform. Link: http://lkml.kernel.org/r/20170413142932.27287-1-andrew.smir...@gmail.com Signed-off-by: Andrey Vostrikov Signed-off-by: Andrey Smirnov Tested-by: Chris Healy Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell -- Lee Jones Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v17 0/5] ZII RAVE platform driver
On Thu 2017-12-21 05:49:59, Guenter Roeck wrote: > On 12/21/2017 01:30 AM, Pavel Machek wrote: > >>Everyone: > >> > >>This patch series is v17 of the driver for supervisory processor found > >>on RAVE series of devices from ZII. Supervisory processor is a PIC > >>microcontroller connected to various electrical subsystems on RAVE > >>devices whose firmware implements protocol to command/qery them. > > > >query. > > > >Can we please get this patch merged? We really don't want to see v34 > >of this patch... > > Maybe if we can all agree that There Shall Be No More Bikeshedding. I'll bite next person who tries to complain comment style. Grrr. And actually, you could help, too. Normally it makes sense to wait few days between resubmitting the patch... Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html signature.asc Description: Digital signature
Re: [PATCH v17 0/5] ZII RAVE platform driver
On 12/21/2017 01:30 AM, Pavel Machek wrote: Everyone: This patch series is v17 of the driver for supervisory processor found on RAVE series of devices from ZII. Supervisory processor is a PIC microcontroller connected to various electrical subsystems on RAVE devices whose firmware implements protocol to command/qery them. query. Can we please get this patch merged? We really don't want to see v34 of this patch... Maybe if we can all agree that There Shall Be No More Bikeshedding. Guenter
Re: [PATCH v17 0/5] ZII RAVE platform driver
> Everyone: > > This patch series is v17 of the driver for supervisory processor found > on RAVE series of devices from ZII. Supervisory processor is a PIC > microcontroller connected to various electrical subsystems on RAVE > devices whose firmware implements protocol to command/qery them. query. Can we please get this patch merged? We really don't want to see v34 of this patch... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html signature.asc Description: Digital signature
[PATCH v17 0/5] ZII RAVE platform driver
Everyone: This patch series is v17 of the driver for supervisory processor found on RAVE series of devices from ZII. Supervisory processor is a PIC microcontroller connected to various electrical subsystems on RAVE devices whose firmware implements protocol to command/qery them. NOTE: * This driver dependends on crc_ccitt_false(), added by 2da9378d531f8cc6670c7497f20d936b706ab80b in 'linux-next', the patch was pulled in by Andrew Morton and is currently avaiting users, so this series might have to go in through Andrew's tree Changes since [v16]: - Fixed commentary style for SPDX tags in .c files - Collected Ack from Philippe Changes since [v15]: - Adopted SPDX tags for licensing information per Philippe's request Changes since [v14]: - Fixed a bug in deframer code where byte processing loop was not being terminated early is it should've been. This would result, among other things, in packets of maximum valid length being incorrectly reported as tool long. - Increased command timeout value in support other valid commands that are outsied of scope for this patch set. - Converted watchdog driver to differentiate between variants based on its own compatiblity string as opposed to relying on that of parent MFD device (as per request by Johan and Lee). NOTE: This change didn't seem to change DT bingins enough to warrant dropping any Acks for patches affected, so I kept them. If anyone wants to rescind their Ack, please let me know. - Collected Acked-by from Pavel - Collected Acked-by from Lee (for patch 3/5) Changes since [v13]: - Fixed incorrect MFD driver menuconfig entry placement Changes since [v12]: - Minor comment inconsistencies fixes in rave-sp.c Changes since [v11]: - Fix incorrect include in rave-sp-wdt.c as uncovered by kernel test robot Changes since [v10]: - Collected Acked-by from Rob and Reviewed-by from Guenter - Incorporated watchdog driver feedback from Gunter and Johan - Incorporated Johan's feedback for the rest of the code Changes since [v9]: - Converted watchdog driver to use watchdog_active() instead of watchdog_hw_running() and replaced WARN_ON with a regular error message as per feedback from Guenter - Changed rave_sp_wdt_start() to set WDOG_HW_RUNNING only if communicating with hardware was sucessful - Collected Reviewd-by from Sebastian (for serdev related patches) - Collected Acked-by from Rob (for watchdog DT bindings) Changes since [v8]: - Driver moved from drivers/platform to drivers/mfd - Collected Reviewed-by from Guenter (for patches 1, 2 and 3) - Incorporated feedback from Guenter into watchdog driver - Incorporated feedback from Rob into watchdog DT bindings - Removed struct rave_sp_rsp_status, which was a leftover from v5 -> v6 code removal. - Fixed minor problems reported by checkpatch Changes since [v7]: - Added watchdog driver to the patchset, so it would be easier to understand how parent/children drivers are tied together - Added serdev patches to implement devm_serdev_device_open() and make .remove optional - "Added" missing serdev_device_close() by converting the driver to use devm_serdev_device_open() - Converted the driver to use devm_of_platform_populate() - Removed needless dependency on MFD_CORE - Removed dependency on SERIAL_DEV_CTRL_TTYPORT Changes since [v6]: - Patch 2/2 has been applied by Lee so it is no longer a part of the series - Removed all sysfs and debugfs attribute to reduce the scope of the driver propsed for inclusion. This is not a critical to have feature and can be added/discussed later. Changes since [v5]: - Fixed a build break, introduced by a last minute change in [v5] - Moved majority of attributes that were exposed over sysfs to debugfs - Document remaining sysfs attributes in Documentation/ABI/testing/sysfs-platform-rave-sp Changes since [v4]: - Replaced usage of DEVICE_ATTR with DEVICE_ATTR_RW - Fixed a number of warnings produces by sparse tool - Incorporated event more feedback from Andy Shevchenko - Collected Reviewed-by from Andy Changes since [v3]: - Re-collected lost Acked-by from Rob - Incorporated further feedback from Andy Shevchenko - Dropped useless change (stray newline) to drivers/mfd/Makefile Changes since [v2]: - Fixed swapped command codes in rave_sp_common_get_boot_source() and rave_sp_common_set_boot_source() revealed by further testing of the code - Incorporated feedback from Andy Shevchenko Changes since [v1]: - Updated wording in DT-bindings as per Rob's request. - Collected Rob's Acked-by for patch 2/2 Feedback is greatly appreciated! Thanks, Andrey Smirnov [v16] lkml.kernel.org/r/20171220204517.28313-1-andrew.smir...@gmail.com [v15]