mtd: hyperbus: add Renesas RPC-IF driver
Subsystems (2)
PATCH v3 1/1 mtd: hyperbus: add Renesas RPC-IF driver
From: Sergei Shtylyov <[email protected]>
Add the HyperFLash driver for the Renesas RPC-IF. It's the "front end" driver using the "back end" APIs in the main driver to talk to the real hardware.
---
This patch is against the 'mtd/next' branch of the MTD 'linux.git' repo.
Changes in version 3:
- factored out rpcif_hb_prepare_read() out of the read16() and copy_from() driver methods and rpcif_hb_prepare_write() out of the write16() method;
- added #define's fo the HyperBus command bits to the HyperBus header file, made use of them in the driver;
- removed #ifndef CONFIG_MTD_CFI_BE_BYTE_SWAP fromn the driver; convertged the 'select' line to 'depends on' line inm the Kconfig option;
- added CONFIG_COMPILE_TEST to the 'depends on' line of the driver's Kconfig option;
- changed HyperFlash to HyperBus in the driver's Kconfig option's help text;
- killed a stray space before the declaration of the 'struct rpcif_hyperbus'.
Changes in version 2:
- added 'select MTD_CFI_ADV_OPTIONS' to the Kconfig entry, added #ifndef CONFIG_MTD_CFI_BE_BYTE_SWAP #error in the driver, and removed be16_to_cpu() call in the read16() method;
- zeroed the target and burst type bits of the HyperBus command codes;
- passed the address of 16-bit entity to rpcif_prepare() in the copy_from() method;
- added an empty line between rpcif_prepare() and rpcif_drirmap_read() calls in the copy_from() method;
- renamed rpcif_io_xfer() to rpcif_manual_xfer();
- removed the C++ style comments to rpcif_prepare() calls;
- removed dev_err() call from the probe() method;
- renamed the 'status' local variable to 'error' in the probe() method;
- extended the driver copyright to this year.
drivers/mtd/hyperbus/Kconfig | 7 + drivers/mtd/hyperbus/Makefile | 1 drivers/mtd/hyperbus/rpc-if.c | 170 ++++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/hyperbus.h | 11 ++ 4 files changed, 189 insertions(+)
drivers/mtd/hyperbus/Kconfig +7 -0
@@ -22,4 +22,11 @@ config HBMC_AM654 This is the driver for HyperBus controller on TI's AM65x and other SoCs +config RPCIF_HYPERBUS + tristate "Renesas RPC-IF HyperBus driver" + depends on RENESAS_RPCIF || COMPILE_TEST + depends on MTD_CFI_BE_BYTE_SWAP + help + This option includes Renesas RPC-IF HyperBus support. + endif # MTD_HYPERBUS
drivers/mtd/hyperbus/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-$(CONFIG_MTD_HYPERBUS) += hyperbus-core.o obj-$(CONFIG_HBMC_AM654) += hbmc-am654.o +obj-$(CONFIG_RPCIF_HYPERBUS) += rpc-if.o
drivers/mtd/hyperbus/rpc-if.c new file +170 -0
170 lines not on this page · raw message
include/linux/mtd/hyperbus.h +11 -0
@@ -8,6 +8,17 @@#include <linux/mtd/map.h> +/* HyperBus command bits */ +#define HYPERBUS_RW 0x80/* R/W# */ +#define HYPERBUS_RW_WRITE 0 +#define HYPERBUS_RW_READ 0x80 +#define HYPERBUS_AS 0x40/* Address Space */ +#define HYPERBUS_AS_MEM 0 +#define HYPERBUS_AS_REG 0x40 +#define HYPERBUS_BT 0x20/* Burst Type */ +#define HYPERBUS_BT_WRAPPED 0 +#define HYPERBUS_BT_LINEAR 0x20 +enum hyperbus_memtype {HYPERFLASH ,HYPERRAM ,
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 3 lines · Sergei Shtylyov
Add the HyperFLash driver for the Renesas RPC-IF. It's the "front end" driver using the "back end" APIs in the main driver to talk to the real hardware.
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git cfi/next, thanks! [1/1] mtd: hyperbus: add Renesas RPC-IF driver
https://git.kernel.org/mtd/c/5de15b610f
--
Regards
Vignesh
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/