From: Karol Wrona <k.wrona@samsung.com>
To: Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
linux-iio@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Antonio Borneo <borneo.antonio@gmail.com>,
Karol Wrona <k.wrona@samsung.com>
Subject: [PATCH v4 0/1] misc: st32fwu: Add stm32 upgrade protocol handling
Date: Sat, 08 Nov 2014 14:29:11 +0100 [thread overview]
Message-ID: <1415453352-14842-1-git-send-email-k.wrona@samsung.com> (raw)
Hello,
This patch is needed by the sensorhub driver which uses STM32F4xx and Jonathan
suggested to factor out these sources (mentioned in:
[RFC/PATCH 2/6] misc: sensorhub: Add sensorhub).
I feel a bit ashamed because I know a bit STM32F4 controllers but I did not
realize that it is generic ST protocol. It helped us a lot because this
code really needed some refactoring.
So this patch contains SPI protocol used in the STM32 bootloader and is based
on AN4286. Generally it can be used to implement handling of other interfaces
like UART or I2C because the flow is quite similar and maybe adding proper
hw access callbacks will do all work.
It supports:
- get info frame
- get version
- firmware write (write, read, write address, erase)
>From v3:
Fixes after Hartmut Knaack review:
- typos, comments style
- lengths, timeouts as unsigned values
TODO:
erase command with sector mode
command checking and disabling unimplemented ones
Karol Wrona (1):
misc: st32fwu: Add stm32 upgrade protocol handling
drivers/misc/Kconfig | 1 +
drivers/misc/Makefile | 1 +
drivers/misc/stm32fwu/Kconfig | 6 +
drivers/misc/stm32fwu/Makefile | 1 +
drivers/misc/stm32fwu/stm32_core.c | 403 ++++++++++++++++++++++++++++++++++++
drivers/misc/stm32fwu/stm32_core.h | 81 ++++++++
drivers/misc/stm32fwu/stm32_spi.c | 108 ++++++++++
include/linux/stm32fwu.h | 49 +++++
8 files changed, 650 insertions(+)
create mode 100644 drivers/misc/stm32fwu/Kconfig
create mode 100644 drivers/misc/stm32fwu/Makefile
create mode 100644 drivers/misc/stm32fwu/stm32_core.c
create mode 100644 drivers/misc/stm32fwu/stm32_core.h
create mode 100644 drivers/misc/stm32fwu/stm32_spi.c
create mode 100644 include/linux/stm32fwu.h
--
1.7.9.5
next reply other threads:[~2014-11-08 13:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-08 13:29 Karol Wrona [this message]
2014-11-08 13:29 ` [PATCH v4 1/1] " Karol Wrona
2014-11-19 23:05 ` Hartmut Knaack
2014-11-20 6:18 ` Antonio Borneo
2014-11-20 11:32 ` Karol Wrona
2014-11-20 19:09 ` Karol Wrona
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415453352-14842-1-git-send-email-k.wrona@samsung.com \
--to=k.wrona@samsung.com \
--cc=arnd@arndb.de \
--cc=b.zolnierkie@samsung.com \
--cc=borneo.antonio@gmail.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=kyungmin.park@samsung.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®