* [cip-dev] [PATCH 4.19.y-cip 1/7] dt-bindings: memory: document Renesas RPC-IF bindings
2020-11-23 12:03 [cip-dev] [PATCH 4.19.y-cip 0/7] Add RPC-IF driver for RZ/G2x SoC's Lad Prabhakar
@ 2020-11-23 12:03 ` Lad Prabhakar
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver Lad Prabhakar
` (5 subsequent siblings)
6 siblings, 0 replies; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 12:03 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
[-- Attachment #1: Type: text/plain, Size: 3643 bytes --]
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
commit ab1c362061d92556bd96fd2c0b188f8e4223e3e3 upstream.
Renesas Reduced Pin Count Interface (RPC-IF) allows a SPI flash or
HyperFlash connected to the SoC to be accessed via the external address
space read mode or the manual mode.
Document the device tree bindings for the Renesas RPC-IF found in the R-Car
gen3 SoCs.
Based on the original patch by Mason Yang <masonccyang@mxic.com.tw>.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Link: https://lore.kernel.org/r/54a84c75-fa17-9976-d9a6-a69ef67c418b@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
.../memory-controllers/renesas,rpc-if.yaml | 88 +++++++++++++++++++
1 file changed, 88 insertions(+)
create mode 100644 Documentation/devicetree/bindings/memory-controllers/renesas,rpc-if.yaml
diff --git a/Documentation/devicetree/bindings/memory-controllers/renesas,rpc-if.yaml b/Documentation/devicetree/bindings/memory-controllers/renesas,rpc-if.yaml
new file mode 100644
index 000000000000..660005601a7f
--- /dev/null
+++ b/Documentation/devicetree/bindings/memory-controllers/renesas,rpc-if.yaml
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/memory-controllers/renesas,rpc-if.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas Reduced Pin Count Interface (RPC-IF)
+
+maintainers:
+ - Sergei Shtylyov <sergei.shtylyov@gmail.com>
+
+description: |
+ Renesas RPC-IF allows a SPI flash or HyperFlash connected to the SoC to
+ be accessed via the external address space read mode or the manual mode.
+
+ The flash chip itself should be represented by a subnode of the RPC-IF node.
+ The flash interface is selected based on the "compatible" property of this
+ subnode:
+ - if it contains "jedec,spi-nor", then SPI is used;
+ - if it contains "cfi-flash", then HyperFlash is used.
+
+allOf:
+ - $ref: "/schemas/spi/spi-controller.yaml#"
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - renesas,r8a77970-rpc-if # R-Car V3M
+ - renesas,r8a77980-rpc-if # R-Car V3H
+ - renesas,r8a77995-rpc-if # R-Car D3
+ - const: renesas,rcar-gen3-rpc-if # a generic R-Car gen3 device
+
+ reg:
+ items:
+ - description: RPC-IF registers
+ - description: direct mapping read mode area
+ - description: write buffer area
+
+ reg-names:
+ items:
+ - const: regs
+ - const: dirmap
+ - const: wbuf
+
+ clocks:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+patternProperties:
+ "flash@[0-9a-f]+$":
+ type: object
+ properties:
+ compatible:
+ enum:
+ - cfi-flash
+ - jedec,spi-nor
+
+examples:
+ - |
+ #include <dt-bindings/clock/renesas-cpg-mssr.h>
+ #include <dt-bindings/power/r8a77995-sysc.h>
+
+ spi@ee200000 {
+ compatible = "renesas,r8a77995-rpc-if", "renesas,rcar-gen3-rpc-if";
+ reg = <0xee200000 0x200>,
+ <0x08000000 0x4000000>,
+ <0xee208000 0x100>;
+ reg-names = "regs", "dirmap", "wbuf";
+ clocks = <&cpg CPG_MOD 917>;
+ power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+ resets = <&cpg 917>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+ spi-tx-bus-width = <1>;
+ spi-rx-bus-width = <1>;
+ };
+ };
--
2.17.1
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5817): https://lists.cip-project.org/g/cip-dev/message/5817
Mute This Topic: https://lists.cip-project.org/mt/78451539/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [cip-dev] [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver
2020-11-23 12:03 [cip-dev] [PATCH 4.19.y-cip 0/7] Add RPC-IF driver for RZ/G2x SoC's Lad Prabhakar
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 1/7] dt-bindings: memory: document Renesas RPC-IF bindings Lad Prabhakar
@ 2020-11-23 12:03 ` Lad Prabhakar
2020-11-23 19:37 ` Pavel Machek
2020-11-23 19:38 ` Pavel Machek
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 3/7] spi: spi-mem: Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum Lad Prabhakar
` (4 subsequent siblings)
6 siblings, 2 replies; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 12:03 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
[-- Attachment #1: Type: text/plain, Size: 21943 bytes --]
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
commit ca7d8b980b67f133317525c4273e144116ee1ae5 upstream.
Add the memory driver for Renesas RPC-IF which registers either SPI or
HyperFLash device depending on the contents of the device tree subnode.
It also provides the absract "back end" device APIs that can be used by
the "front end" SPI/MTD drivers to talk to the real hardware.
Based on the original patch by Mason Yang <masonccyang@mxic.com.tw>.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Link: https://lore.kernel.org/r/9a3606ec-d4d0-c63a-4fb6-631ab38e621c@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
[PL: manually applied change to Makefile]
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/memory/Kconfig | 9 +
drivers/memory/Makefile | 1 +
drivers/memory/renesas-rpc-if.c | 603 ++++++++++++++++++++++++++++++++
include/memory/renesas-rpc-if.h | 87 +++++
4 files changed, 700 insertions(+)
create mode 100644 drivers/memory/renesas-rpc-if.c
create mode 100644 include/memory/renesas-rpc-if.h
diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
index 63389f075f1d..eeb776f3db34 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -145,6 +145,15 @@ config DA8XX_DDRCTL
Texas Instruments da8xx SoCs. It's used to tweak various memory
controller configuration options.
+config RENESAS_RPCIF
+ tristate "Renesas RPC-IF driver"
+ depends on ARCH_RENESAS
+ select REGMAP_MMIO
+ help
+ This supports Renesas R-Car Gen3 RPC-IF which provides either SPI
+ host or HyperFlash. You'll have to select individual components
+ under the corresponding menu.
+
source "drivers/memory/samsung/Kconfig"
source "drivers/memory/tegra/Kconfig"
diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile
index a01ab3e22f94..735c0e5d30da 100644
--- a/drivers/memory/Makefile
+++ b/drivers/memory/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_MVEBU_DEVBUS) += mvebu-devbus.o
obj-$(CONFIG_JZ4780_NEMC) += jz4780-nemc.o
obj-$(CONFIG_MTK_SMI) += mtk-smi.o
obj-$(CONFIG_DA8XX_DDRCTL) += da8xx-ddrctl.o
+obj-$(CONFIG_RENESAS_RPCIF) += renesas-rpc-if.o
obj-$(CONFIG_SAMSUNG_MC) += samsung/
obj-$(CONFIG_TEGRA_MC) += tegra/
diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c
new file mode 100644
index 000000000000..88f51ec8f1d1
--- /dev/null
+++ b/drivers/memory/renesas-rpc-if.c
@@ -0,0 +1,603 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Renesas RPC-IF core driver
+ *
+ * Copyright (C) 2018-2019 Renesas Solutions Corp.
+ * Copyright (C) 2019 Macronix International Co., Ltd.
+ * Copyright (C) 2019-2020 Cogent Embedded, Inc.
+ */
+
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/of.h>
+#include <linux/pm_runtime.h>
+#include <linux/regmap.h>
+#include <linux/reset.h>
+
+#include <memory/renesas-rpc-if.h>
+
+#define RPCIF_CMNCR 0x0000 /* R/W */
+#define RPCIF_CMNCR_MD BIT(31)
+#define RPCIF_CMNCR_SFDE BIT(24) /* undocumented but must be set */
+#define RPCIF_CMNCR_MOIIO3(val) (((val) & 0x3) << 22)
+#define RPCIF_CMNCR_MOIIO2(val) (((val) & 0x3) << 20)
+#define RPCIF_CMNCR_MOIIO1(val) (((val) & 0x3) << 18)
+#define RPCIF_CMNCR_MOIIO0(val) (((val) & 0x3) << 16)
+#define RPCIF_CMNCR_MOIIO_HIZ (RPCIF_CMNCR_MOIIO0(3) | \
+ RPCIF_CMNCR_MOIIO1(3) | \
+ RPCIF_CMNCR_MOIIO2(3) | RPCIF_CMNCR_MOIIO3(3))
+#define RPCIF_CMNCR_IO3FV(val) (((val) & 0x3) << 14) /* undocumented */
+#define RPCIF_CMNCR_IO2FV(val) (((val) & 0x3) << 12) /* undocumented */
+#define RPCIF_CMNCR_IO0FV(val) (((val) & 0x3) << 8)
+#define RPCIF_CMNCR_IOFV_HIZ (RPCIF_CMNCR_IO0FV(3) | RPCIF_CMNCR_IO2FV(3) | \
+ RPCIF_CMNCR_IO3FV(3))
+#define RPCIF_CMNCR_BSZ(val) (((val) & 0x3) << 0)
+
+#define RPCIF_SSLDR 0x0004 /* R/W */
+#define RPCIF_SSLDR_SPNDL(d) (((d) & 0x7) << 16)
+#define RPCIF_SSLDR_SLNDL(d) (((d) & 0x7) << 8)
+#define RPCIF_SSLDR_SCKDL(d) (((d) & 0x7) << 0)
+
+#define RPCIF_DRCR 0x000C /* R/W */
+#define RPCIF_DRCR_SSLN BIT(24)
+#define RPCIF_DRCR_RBURST(v) ((((v) - 1) & 0x1F) << 16)
+#define RPCIF_DRCR_RCF BIT(9)
+#define RPCIF_DRCR_RBE BIT(8)
+#define RPCIF_DRCR_SSLE BIT(0)
+
+#define RPCIF_DRCMR 0x0010 /* R/W */
+#define RPCIF_DRCMR_CMD(c) (((c) & 0xFF) << 16)
+#define RPCIF_DRCMR_OCMD(c) (((c) & 0xFF) << 0)
+
+#define RPCIF_DREAR 0x0014 /* R/W */
+#define RPCIF_DREAR_EAV(c) (((c) & 0xF) << 16)
+#define RPCIF_DREAR_EAC(c) (((c) & 0x7) << 0)
+
+#define RPCIF_DROPR 0x0018 /* R/W */
+
+#define RPCIF_DRENR 0x001C /* R/W */
+#define RPCIF_DRENR_CDB(o) (u32)((((o) & 0x3) << 30))
+#define RPCIF_DRENR_OCDB(o) (((o) & 0x3) << 28)
+#define RPCIF_DRENR_ADB(o) (((o) & 0x3) << 24)
+#define RPCIF_DRENR_OPDB(o) (((o) & 0x3) << 20)
+#define RPCIF_DRENR_DRDB(o) (((o) & 0x3) << 16)
+#define RPCIF_DRENR_DME BIT(15)
+#define RPCIF_DRENR_CDE BIT(14)
+#define RPCIF_DRENR_OCDE BIT(12)
+#define RPCIF_DRENR_ADE(v) (((v) & 0xF) << 8)
+#define RPCIF_DRENR_OPDE(v) (((v) & 0xF) << 4)
+
+#define RPCIF_SMCR 0x0020 /* R/W */
+#define RPCIF_SMCR_SSLKP BIT(8)
+#define RPCIF_SMCR_SPIRE BIT(2)
+#define RPCIF_SMCR_SPIWE BIT(1)
+#define RPCIF_SMCR_SPIE BIT(0)
+
+#define RPCIF_SMCMR 0x0024 /* R/W */
+#define RPCIF_SMCMR_CMD(c) (((c) & 0xFF) << 16)
+#define RPCIF_SMCMR_OCMD(c) (((c) & 0xFF) << 0)
+
+#define RPCIF_SMADR 0x0028 /* R/W */
+
+#define RPCIF_SMOPR 0x002C /* R/W */
+#define RPCIF_SMOPR_OPD3(o) (((o) & 0xFF) << 24)
+#define RPCIF_SMOPR_OPD2(o) (((o) & 0xFF) << 16)
+#define RPCIF_SMOPR_OPD1(o) (((o) & 0xFF) << 8)
+#define RPCIF_SMOPR_OPD0(o) (((o) & 0xFF) << 0)
+
+#define RPCIF_SMENR 0x0030 /* R/W */
+#define RPCIF_SMENR_CDB(o) (((o) & 0x3) << 30)
+#define RPCIF_SMENR_OCDB(o) (((o) & 0x3) << 28)
+#define RPCIF_SMENR_ADB(o) (((o) & 0x3) << 24)
+#define RPCIF_SMENR_OPDB(o) (((o) & 0x3) << 20)
+#define RPCIF_SMENR_SPIDB(o) (((o) & 0x3) << 16)
+#define RPCIF_SMENR_DME BIT(15)
+#define RPCIF_SMENR_CDE BIT(14)
+#define RPCIF_SMENR_OCDE BIT(12)
+#define RPCIF_SMENR_ADE(v) (((v) & 0xF) << 8)
+#define RPCIF_SMENR_OPDE(v) (((v) & 0xF) << 4)
+#define RPCIF_SMENR_SPIDE(v) (((v) & 0xF) << 0)
+
+#define RPCIF_SMRDR0 0x0038 /* R */
+#define RPCIF_SMRDR1 0x003C /* R */
+#define RPCIF_SMWDR0 0x0040 /* W */
+#define RPCIF_SMWDR1 0x0044 /* W */
+
+#define RPCIF_CMNSR 0x0048 /* R */
+#define RPCIF_CMNSR_SSLF BIT(1)
+#define RPCIF_CMNSR_TEND BIT(0)
+
+#define RPCIF_DRDMCR 0x0058 /* R/W */
+#define RPCIF_DMDMCR_DMCYC(v) ((((v) - 1) & 0x1F) << 0)
+
+#define RPCIF_DRDRENR 0x005C /* R/W */
+#define RPCIF_DRDRENR_HYPE(v) (((v) & 0x7) << 12)
+#define RPCIF_DRDRENR_ADDRE BIT(8)
+#define RPCIF_DRDRENR_OPDRE BIT(4)
+#define RPCIF_DRDRENR_DRDRE BIT(0)
+
+#define RPCIF_SMDMCR 0x0060 /* R/W */
+#define RPCIF_SMDMCR_DMCYC(v) ((((v) - 1) & 0x1F) << 0)
+
+#define RPCIF_SMDRENR 0x0064 /* R/W */
+#define RPCIF_SMDRENR_HYPE(v) (((v) & 0x7) << 12)
+#define RPCIF_SMDRENR_ADDRE BIT(8)
+#define RPCIF_SMDRENR_OPDRE BIT(4)
+#define RPCIF_SMDRENR_SPIDRE BIT(0)
+
+#define RPCIF_PHYCNT 0x007C /* R/W */
+#define RPCIF_PHYCNT_CAL BIT(31)
+#define RPCIF_PHYCNT_OCTA(v) (((v) & 0x3) << 22)
+#define RPCIF_PHYCNT_EXDS BIT(21)
+#define RPCIF_PHYCNT_OCT BIT(20)
+#define RPCIF_PHYCNT_DDRCAL BIT(19)
+#define RPCIF_PHYCNT_HS BIT(18)
+#define RPCIF_PHYCNT_STRTIM(v) (((v) & 0x7) << 15)
+#define RPCIF_PHYCNT_WBUF2 BIT(4)
+#define RPCIF_PHYCNT_WBUF BIT(2)
+#define RPCIF_PHYCNT_PHYMEM(v) (((v) & 0x3) << 0)
+
+#define RPCIF_PHYOFFSET1 0x0080 /* R/W */
+#define RPCIF_PHYOFFSET1_DDRTMG(v) (((v) & 0x3) << 28)
+
+#define RPCIF_PHYOFFSET2 0x0084 /* R/W */
+#define RPCIF_PHYOFFSET2_OCTTMG(v) (((v) & 0x7) << 8)
+
+#define RPCIF_PHYINT 0x0088 /* R/W */
+#define RPCIF_PHYINT_WPVAL BIT(1)
+
+#define RPCIF_DIRMAP_SIZE 0x4000000
+
+static const struct regmap_range rpcif_volatile_ranges[] = {
+ regmap_reg_range(RPCIF_SMRDR0, RPCIF_SMRDR1),
+ regmap_reg_range(RPCIF_SMWDR0, RPCIF_SMWDR1),
+ regmap_reg_range(RPCIF_CMNSR, RPCIF_CMNSR),
+};
+
+static const struct regmap_access_table rpcif_volatile_table = {
+ .yes_ranges = rpcif_volatile_ranges,
+ .n_yes_ranges = ARRAY_SIZE(rpcif_volatile_ranges),
+};
+
+static const struct regmap_config rpcif_regmap_config = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+ .fast_io = true,
+ .max_register = RPCIF_PHYINT,
+ .volatile_table = &rpcif_volatile_table,
+};
+
+int rpcif_sw_init(struct rpcif *rpc, struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct resource *res;
+ void __iomem *base;
+
+ rpc->dev = dev;
+
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
+ base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
+
+ rpc->regmap = devm_regmap_init_mmio(&pdev->dev, base,
+ &rpcif_regmap_config);
+ if (IS_ERR(rpc->regmap)) {
+ dev_err(&pdev->dev,
+ "failed to init regmap for rpcif, error %ld\n",
+ PTR_ERR(rpc->regmap));
+ return PTR_ERR(rpc->regmap);
+ }
+
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dirmap");
+ rpc->size = resource_size(res);
+ rpc->dirmap = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(rpc->dirmap))
+ rpc->dirmap = NULL;
+
+ rpc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
+ if (IS_ERR(rpc->rstc))
+ return PTR_ERR(rpc->rstc);
+
+ return 0;
+}
+EXPORT_SYMBOL(rpcif_sw_init);
+
+void rpcif_enable_rpm(struct rpcif *rpc)
+{
+ pm_runtime_enable(rpc->dev);
+}
+EXPORT_SYMBOL(rpcif_enable_rpm);
+
+void rpcif_disable_rpm(struct rpcif *rpc)
+{
+ pm_runtime_put_sync(rpc->dev);
+}
+EXPORT_SYMBOL(rpcif_disable_rpm);
+
+void rpcif_hw_init(struct rpcif *rpc, bool hyperflash)
+{
+ u32 dummy;
+
+ pm_runtime_get_sync(rpc->dev);
+
+ /*
+ * NOTE: The 0x260 are undocumented bits, but they must be set.
+ * RPCIF_PHYCNT_STRTIM is strobe timing adjustment bits,
+ * 0x0 : the delay is biggest,
+ * 0x1 : the delay is 2nd biggest,
+ * On H3 ES1.x, the value should be 0, while on others,
+ * the value should be 7.
+ */
+ regmap_write(rpc->regmap, RPCIF_PHYCNT, RPCIF_PHYCNT_STRTIM(7) |
+ RPCIF_PHYCNT_PHYMEM(hyperflash ? 3 : 0) | 0x260);
+
+ /*
+ * NOTE: The 0x1511144 are undocumented bits, but they must be set
+ * for RPCIF_PHYOFFSET1.
+ * The 0x31 are undocumented bits, but they must be set
+ * for RPCIF_PHYOFFSET2.
+ */
+ regmap_write(rpc->regmap, RPCIF_PHYOFFSET1, 0x1511144 |
+ RPCIF_PHYOFFSET1_DDRTMG(3));
+ regmap_write(rpc->regmap, RPCIF_PHYOFFSET2, 0x31 |
+ RPCIF_PHYOFFSET2_OCTTMG(4));
+
+ if (hyperflash)
+ regmap_update_bits(rpc->regmap, RPCIF_PHYINT,
+ RPCIF_PHYINT_WPVAL, 0);
+
+ regmap_write(rpc->regmap, RPCIF_CMNCR, RPCIF_CMNCR_SFDE |
+ RPCIF_CMNCR_MOIIO_HIZ | RPCIF_CMNCR_IOFV_HIZ |
+ RPCIF_CMNCR_BSZ(hyperflash ? 1 : 0));
+ /* Set RCF after BSZ update */
+ regmap_write(rpc->regmap, RPCIF_DRCR, RPCIF_DRCR_RCF);
+ /* Dummy read according to spec */
+ regmap_read(rpc->regmap, RPCIF_DRCR, &dummy);
+ regmap_write(rpc->regmap, RPCIF_SSLDR, RPCIF_SSLDR_SPNDL(7) |
+ RPCIF_SSLDR_SLNDL(7) | RPCIF_SSLDR_SCKDL(7));
+
+ pm_runtime_put(rpc->dev);
+
+ rpc->bus_size = hyperflash ? 2 : 1;
+}
+EXPORT_SYMBOL(rpcif_hw_init);
+
+static int wait_msg_xfer_end(struct rpcif *rpc)
+{
+ u32 sts;
+
+ return regmap_read_poll_timeout(rpc->regmap, RPCIF_CMNSR, sts,
+ sts & RPCIF_CMNSR_TEND, 0,
+ USEC_PER_SEC);
+}
+
+static u8 rpcif_bits_set(struct rpcif *rpc, u32 nbytes)
+{
+ if (rpc->bus_size == 2)
+ nbytes /= 2;
+ nbytes = clamp(nbytes, 1U, 4U);
+ return GENMASK(3, 4 - nbytes);
+}
+
+static u8 rpcif_bit_size(u8 buswidth)
+{
+ return buswidth > 4 ? 2 : ilog2(buswidth);
+}
+
+void rpcif_prepare(struct rpcif *rpc, const struct rpcif_op *op, u64 *offs,
+ size_t *len)
+{
+ rpc->smcr = 0;
+ rpc->smadr = 0;
+ rpc->enable = 0;
+ rpc->command = 0;
+ rpc->option = 0;
+ rpc->dummy = 0;
+ rpc->ddr = 0;
+ rpc->xferlen = 0;
+
+ if (op->cmd.buswidth) {
+ rpc->enable = RPCIF_SMENR_CDE |
+ RPCIF_SMENR_CDB(rpcif_bit_size(op->cmd.buswidth));
+ rpc->command = RPCIF_SMCMR_CMD(op->cmd.opcode);
+ if (op->cmd.ddr)
+ rpc->ddr = RPCIF_SMDRENR_HYPE(0x5);
+ }
+ if (op->ocmd.buswidth) {
+ rpc->enable |= RPCIF_SMENR_OCDE |
+ RPCIF_SMENR_OCDB(rpcif_bit_size(op->ocmd.buswidth));
+ rpc->command |= RPCIF_SMCMR_OCMD(op->ocmd.opcode);
+ }
+
+ if (op->addr.buswidth) {
+ rpc->enable |=
+ RPCIF_SMENR_ADB(rpcif_bit_size(op->addr.buswidth));
+ if (op->addr.nbytes == 4)
+ rpc->enable |= RPCIF_SMENR_ADE(0xF);
+ else
+ rpc->enable |= RPCIF_SMENR_ADE(GENMASK(
+ 2, 3 - op->addr.nbytes));
+ if (op->addr.ddr)
+ rpc->ddr |= RPCIF_SMDRENR_ADDRE;
+
+ if (offs && len)
+ rpc->smadr = *offs;
+ else
+ rpc->smadr = op->addr.val;
+ }
+
+ if (op->dummy.buswidth) {
+ rpc->enable |= RPCIF_SMENR_DME;
+ rpc->dummy = RPCIF_SMDMCR_DMCYC(op->dummy.ncycles /
+ op->dummy.buswidth);
+ }
+
+ if (op->option.buswidth) {
+ rpc->enable |= RPCIF_SMENR_OPDE(
+ rpcif_bits_set(rpc, op->option.nbytes)) |
+ RPCIF_SMENR_OPDB(rpcif_bit_size(op->option.buswidth));
+ if (op->option.ddr)
+ rpc->ddr |= RPCIF_SMDRENR_OPDRE;
+ rpc->option = op->option.val;
+ }
+
+ rpc->dir = op->data.dir;
+ if (op->data.buswidth) {
+ u32 nbytes;
+
+ rpc->buffer = op->data.buf.in;
+ switch (op->data.dir) {
+ case RPCIF_DATA_IN:
+ rpc->smcr = RPCIF_SMCR_SPIRE;
+ break;
+ case RPCIF_DATA_OUT:
+ rpc->smcr = RPCIF_SMCR_SPIWE;
+ break;
+ default:
+ break;
+ }
+ if (op->data.ddr)
+ rpc->ddr |= RPCIF_SMDRENR_SPIDRE;
+
+ if (offs && len)
+ nbytes = *len;
+ else
+ nbytes = op->data.nbytes;
+ rpc->xferlen = nbytes;
+
+ rpc->enable |= RPCIF_SMENR_SPIDE(rpcif_bits_set(rpc, nbytes)) |
+ RPCIF_SMENR_SPIDB(rpcif_bit_size(op->data.buswidth));
+ }
+}
+EXPORT_SYMBOL(rpcif_prepare);
+
+int rpcif_manual_xfer(struct rpcif *rpc)
+{
+ u32 smenr, smcr, pos = 0, max = 4;
+ int ret = 0;
+
+ if (rpc->bus_size == 2)
+ max = 8;
+
+ pm_runtime_get_sync(rpc->dev);
+
+ regmap_update_bits(rpc->regmap, RPCIF_PHYCNT,
+ RPCIF_PHYCNT_CAL, RPCIF_PHYCNT_CAL);
+ regmap_update_bits(rpc->regmap, RPCIF_CMNCR,
+ RPCIF_CMNCR_MD, RPCIF_CMNCR_MD);
+ regmap_write(rpc->regmap, RPCIF_SMCMR, rpc->command);
+ regmap_write(rpc->regmap, RPCIF_SMOPR, rpc->option);
+ regmap_write(rpc->regmap, RPCIF_SMDMCR, rpc->dummy);
+ regmap_write(rpc->regmap, RPCIF_SMDRENR, rpc->ddr);
+ smenr = rpc->enable;
+
+ switch (rpc->dir) {
+ case RPCIF_DATA_OUT:
+ while (pos < rpc->xferlen) {
+ u32 nbytes = rpc->xferlen - pos;
+ u32 data[2];
+
+ smcr = rpc->smcr | RPCIF_SMCR_SPIE;
+ if (nbytes > max) {
+ nbytes = max;
+ smcr |= RPCIF_SMCR_SSLKP;
+ }
+
+ memcpy(data, rpc->buffer + pos, nbytes);
+ if (nbytes > 4) {
+ regmap_write(rpc->regmap, RPCIF_SMWDR1,
+ data[0]);
+ regmap_write(rpc->regmap, RPCIF_SMWDR0,
+ data[1]);
+ } else if (nbytes > 2) {
+ regmap_write(rpc->regmap, RPCIF_SMWDR0,
+ data[0]);
+ } else {
+ regmap_write(rpc->regmap, RPCIF_SMWDR0,
+ data[0] << 16);
+ }
+
+ regmap_write(rpc->regmap, RPCIF_SMADR,
+ rpc->smadr + pos);
+ regmap_write(rpc->regmap, RPCIF_SMENR, smenr);
+ regmap_write(rpc->regmap, RPCIF_SMCR, smcr);
+ ret = wait_msg_xfer_end(rpc);
+ if (ret)
+ goto err_out;
+
+ pos += nbytes;
+ smenr = rpc->enable &
+ ~RPCIF_SMENR_CDE & ~RPCIF_SMENR_ADE(0xF);
+ }
+ break;
+ case RPCIF_DATA_IN:
+ /*
+ * RPC-IF spoils the data for the commands without an address
+ * phase (like RDID) in the manual mode, so we'll have to work
+ * around this issue by using the external address space read
+ * mode instead.
+ */
+ if (!(smenr & RPCIF_SMENR_ADE(0xF)) && rpc->dirmap) {
+ u32 dummy;
+
+ regmap_update_bits(rpc->regmap, RPCIF_CMNCR,
+ RPCIF_CMNCR_MD, 0);
+ regmap_write(rpc->regmap, RPCIF_DRCR,
+ RPCIF_DRCR_RBURST(32) | RPCIF_DRCR_RBE);
+ regmap_write(rpc->regmap, RPCIF_DRCMR, rpc->command);
+ regmap_write(rpc->regmap, RPCIF_DREAR,
+ RPCIF_DREAR_EAC(1));
+ regmap_write(rpc->regmap, RPCIF_DROPR, rpc->option);
+ regmap_write(rpc->regmap, RPCIF_DRENR,
+ smenr & ~RPCIF_SMENR_SPIDE(0xF));
+ regmap_write(rpc->regmap, RPCIF_DRDMCR, rpc->dummy);
+ regmap_write(rpc->regmap, RPCIF_DRDRENR, rpc->ddr);
+ memcpy_fromio(rpc->buffer, rpc->dirmap, rpc->xferlen);
+ regmap_write(rpc->regmap, RPCIF_DRCR, RPCIF_DRCR_RCF);
+ /* Dummy read according to spec */
+ regmap_read(rpc->regmap, RPCIF_DRCR, &dummy);
+ break;
+ }
+ while (pos < rpc->xferlen) {
+ u32 nbytes = rpc->xferlen - pos;
+ u32 data[2];
+
+ if (nbytes > max)
+ nbytes = max;
+
+ regmap_write(rpc->regmap, RPCIF_SMADR,
+ rpc->smadr + pos);
+ regmap_write(rpc->regmap, RPCIF_SMENR, smenr);
+ regmap_write(rpc->regmap, RPCIF_SMCR,
+ rpc->smcr | RPCIF_SMCR_SPIE);
+ ret = wait_msg_xfer_end(rpc);
+ if (ret)
+ goto err_out;
+
+ if (nbytes > 4) {
+ regmap_read(rpc->regmap, RPCIF_SMRDR1,
+ &data[0]);
+ regmap_read(rpc->regmap, RPCIF_SMRDR0,
+ &data[1]);
+ } else if (nbytes > 2) {
+ regmap_read(rpc->regmap, RPCIF_SMRDR0,
+ &data[0]);
+ } else {
+ regmap_read(rpc->regmap, RPCIF_SMRDR0,
+ &data[0]);
+ data[0] >>= 16;
+ }
+ memcpy(rpc->buffer + pos, data, nbytes);
+
+ pos += nbytes;
+ }
+ break;
+ default:
+ regmap_write(rpc->regmap, RPCIF_SMENR, rpc->enable);
+ regmap_write(rpc->regmap, RPCIF_SMCR,
+ rpc->smcr | RPCIF_SMCR_SPIE);
+ ret = wait_msg_xfer_end(rpc);
+ if (ret)
+ goto err_out;
+ }
+
+exit:
+ pm_runtime_put(rpc->dev);
+ return ret;
+
+err_out:
+ ret = reset_control_reset(rpc->rstc);
+ rpcif_hw_init(rpc, rpc->bus_size == 2);
+ goto exit;
+}
+EXPORT_SYMBOL(rpcif_manual_xfer);
+
+ssize_t rpcif_dirmap_read(struct rpcif *rpc, u64 offs, size_t len, void *buf)
+{
+ loff_t from = offs & (RPCIF_DIRMAP_SIZE - 1);
+ size_t size = RPCIF_DIRMAP_SIZE - from;
+
+ if (len > size)
+ len = size;
+
+ pm_runtime_get_sync(rpc->dev);
+
+ regmap_update_bits(rpc->regmap, RPCIF_CMNCR, RPCIF_CMNCR_MD, 0);
+ regmap_write(rpc->regmap, RPCIF_DRCR, 0);
+ regmap_write(rpc->regmap, RPCIF_DRCMR, rpc->command);
+ regmap_write(rpc->regmap, RPCIF_DREAR,
+ RPCIF_DREAR_EAV(offs >> 25) | RPCIF_DREAR_EAC(1));
+ regmap_write(rpc->regmap, RPCIF_DROPR, rpc->option);
+ regmap_write(rpc->regmap, RPCIF_DRENR,
+ rpc->enable & ~RPCIF_SMENR_SPIDE(0xF));
+ regmap_write(rpc->regmap, RPCIF_DRDMCR, rpc->dummy);
+ regmap_write(rpc->regmap, RPCIF_DRDRENR, rpc->ddr);
+
+ memcpy_fromio(buf, rpc->dirmap + from, len);
+
+ pm_runtime_put(rpc->dev);
+
+ return len;
+}
+EXPORT_SYMBOL(rpcif_dirmap_read);
+
+static int rpcif_probe(struct platform_device *pdev)
+{
+ struct platform_device *vdev;
+ struct device_node *flash;
+ const char *name;
+
+ flash = of_get_next_child(pdev->dev.of_node, NULL);
+ if (!flash) {
+ dev_warn(&pdev->dev, "no flash node found\n");
+ return -ENODEV;
+ }
+
+ if (of_device_is_compatible(flash, "jedec,spi-nor")) {
+ name = "rpc-if-spi";
+ } else if (of_device_is_compatible(flash, "cfi-flash")) {
+ name = "rpc-if-hyperflash";
+ } else {
+ dev_warn(&pdev->dev, "unknown flash type\n");
+ return -ENODEV;
+ }
+
+ vdev = platform_device_alloc(name, pdev->id);
+ if (!vdev)
+ return -ENOMEM;
+ vdev->dev.parent = &pdev->dev;
+ platform_set_drvdata(pdev, vdev);
+ return platform_device_add(vdev);
+}
+
+static int rpcif_remove(struct platform_device *pdev)
+{
+ struct platform_device *vdev = platform_get_drvdata(pdev);
+
+ platform_device_unregister(vdev);
+
+ return 0;
+}
+
+static const struct of_device_id rpcif_of_match[] = {
+ { .compatible = "renesas,rcar-gen3-rpc-if", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, rpcif_of_match);
+
+static struct platform_driver rpcif_driver = {
+ .probe = rpcif_probe,
+ .remove = rpcif_remove,
+ .driver = {
+ .name = "rpc-if",
+ .of_match_table = rpcif_of_match,
+ },
+};
+module_platform_driver(rpcif_driver);
+
+MODULE_DESCRIPTION("Renesas RPC-IF core driver");
+MODULE_LICENSE("GPL v2");
diff --git a/include/memory/renesas-rpc-if.h b/include/memory/renesas-rpc-if.h
new file mode 100644
index 000000000000..9ad136682c47
--- /dev/null
+++ b/include/memory/renesas-rpc-if.h
@@ -0,0 +1,87 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Renesas RPC-IF core driver
+ *
+ * Copyright (C) 2018~2019 Renesas Solutions Corp.
+ * Copyright (C) 2019 Macronix International Co., Ltd.
+ * Copyright (C) 2019-2020 Cogent Embedded, Inc.
+ */
+
+#ifndef __RENESAS_RPC_IF_H
+#define __RENESAS_RPC_IF_H
+
+#include <linux/types.h>
+
+enum rpcif_data_dir {
+ RPCIF_NO_DATA,
+ RPCIF_DATA_IN,
+ RPCIF_DATA_OUT,
+};
+
+struct rpcif_op {
+ struct {
+ u8 buswidth;
+ u8 opcode;
+ bool ddr;
+ } cmd, ocmd;
+
+ struct {
+ u8 nbytes;
+ u8 buswidth;
+ bool ddr;
+ u64 val;
+ } addr;
+
+ struct {
+ u8 ncycles;
+ u8 buswidth;
+ } dummy;
+
+ struct {
+ u8 nbytes;
+ u8 buswidth;
+ bool ddr;
+ u32 val;
+ } option;
+
+ struct {
+ u8 buswidth;
+ unsigned int nbytes;
+ enum rpcif_data_dir dir;
+ bool ddr;
+ union {
+ void *in;
+ const void *out;
+ } buf;
+ } data;
+};
+
+struct rpcif {
+ struct device *dev;
+ void __iomem *dirmap;
+ struct regmap *regmap;
+ struct reset_control *rstc;
+ size_t size;
+ enum rpcif_data_dir dir;
+ u8 bus_size;
+ void *buffer;
+ u32 xferlen;
+ u32 smcr;
+ u32 smadr;
+ u32 command; /* DRCMR or SMCMR */
+ u32 option; /* DROPR or SMOPR */
+ u32 enable; /* DRENR or SMENR */
+ u32 dummy; /* DRDMCR or SMDMCR */
+ u32 ddr; /* DRDRENR or SMDRENR */
+};
+
+int rpcif_sw_init(struct rpcif *rpc, struct device *dev);
+void rpcif_hw_init(struct rpcif *rpc, bool hyperflash);
+void rpcif_enable_rpm(struct rpcif *rpc);
+void rpcif_disable_rpm(struct rpcif *rpc);
+void rpcif_prepare(struct rpcif *rpc, const struct rpcif_op *op, u64 *offs,
+ size_t *len);
+int rpcif_manual_xfer(struct rpcif *rpc);
+ssize_t rpcif_dirmap_read(struct rpcif *rpc, u64 offs, size_t len, void *buf);
+
+#endif // __RENESAS_RPC_IF_H
--
2.17.1
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5818): https://lists.cip-project.org/g/cip-dev/message/5818
Mute This Topic: https://lists.cip-project.org/mt/78451541/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver Lad Prabhakar
@ 2020-11-23 19:37 ` Pavel Machek
2020-11-23 23:00 ` Lad Prabhakar
2020-11-23 19:38 ` Pavel Machek
1 sibling, 1 reply; 20+ messages in thread
From: Pavel Machek @ 2020-11-23 19:37 UTC (permalink / raw)
To: Lad Prabhakar; +Cc: cip-dev, Nobuhiro Iwamatsu, Pavel Machek, Biju Das
[-- Attachment #1.1: Type: text/plain, Size: 2148 bytes --]
Hi!
> +EXPORT_SYMBOL(rpcif_sw_init);
EXPORT_SYMBOL_GPL?
> +void rpcif_enable_rpm(struct rpcif *rpc)
> +{
> + pm_runtime_enable(rpc->dev);
> +}
> +EXPORT_SYMBOL(rpcif_enable_rpm);
> +
> +void rpcif_disable_rpm(struct rpcif *rpc)
> +{
> + pm_runtime_put_sync(rpc->dev);
> +}
> +EXPORT_SYMBOL(rpcif_disable_rpm);
Should these go to header as static inlines?
> +static int wait_msg_xfer_end(struct rpcif *rpc)
> +{
> + u32 sts;
> +
> + return regmap_read_poll_timeout(rpc->regmap, RPCIF_CMNSR, sts,
> + sts & RPCIF_CMNSR_TEND, 0,
> + USEC_PER_SEC);
> +}
This can't be right. sts is used uninitialized here.
> +int rpcif_manual_xfer(struct rpcif *rpc)
> +{
> + default:
> + regmap_write(rpc->regmap, RPCIF_SMENR, rpc->enable);
> + regmap_write(rpc->regmap, RPCIF_SMCR,
> + rpc->smcr | RPCIF_SMCR_SPIE);
> + ret = wait_msg_xfer_end(rpc);
> + if (ret)
> + goto err_out;
> + }
> +
> +exit:
> + pm_runtime_put(rpc->dev);
> + return ret;
> +
> +err_out:
> + ret = reset_control_reset(rpc->rstc);
> + rpcif_hw_init(rpc, rpc->bus_size == 2);
> + goto exit;
> +}
So we get failure in wait_msg_xfer_end(rpc); but then
reset_control_reset(rpc->rstc); returns success and whole function
returns success. Is that ok?
> +static int rpcif_probe(struct platform_device *pdev)
> +{
> + struct platform_device *vdev;
> + struct device_node *flash;
> + const char *name;
> +
> + flash = of_get_next_child(pdev->dev.of_node, NULL);
> + if (!flash) {
> + dev_warn(&pdev->dev, "no flash node found\n");
> + return -ENODEV;
> + }
Does this need corresponding of_node_put()?
> +struct rpcif_op {
Weird formatting; we normally use spaces (not tabs) for this.
> + struct {
> + u8 buswidth;
...
> + struct {
> + u8 ncycles;
> + u8 buswidth;
> + } dummy;
Are you sure this will be consistent accross architectures? Should the
structure be marked attribute packed or something?
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5827): https://lists.cip-project.org/g/cip-dev/message/5827
Mute This Topic: https://lists.cip-project.org/mt/78451541/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver
2020-11-23 19:37 ` Pavel Machek
@ 2020-11-23 23:00 ` Lad Prabhakar
2020-11-24 9:27 ` Pavel Machek
0 siblings, 1 reply; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 23:00 UTC (permalink / raw)
To: Pavel Machek; +Cc: cip-dev, Nobuhiro Iwamatsu, Biju Das
[-- Attachment #1: Type: text/plain, Size: 3345 bytes --]
Hi Pavel,
Thank you for the review.
> -----Original Message-----
> From: Pavel Machek <pavel@denx.de>
> Sent: 23 November 2020 19:38
> To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Cc: cip-dev@lists.cip-project.org; Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek
> <pavel@denx.de>; Biju Das <biju.das.jz@bp.renesas.com>
> Subject: Re: [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver
>
> Hi!
>
> > +EXPORT_SYMBOL(rpcif_sw_init);
>
> EXPORT_SYMBOL_GPL?
>
Agreed will fix that and squash that in the current patch.
> > +void rpcif_enable_rpm(struct rpcif *rpc)
> > +{
> > + pm_runtime_enable(rpc->dev);
> > +}
> > +EXPORT_SYMBOL(rpcif_enable_rpm);
> > +
> > +void rpcif_disable_rpm(struct rpcif *rpc)
> > +{
> > + pm_runtime_put_sync(rpc->dev);
> > +}
> > +EXPORT_SYMBOL(rpcif_disable_rpm);
>
> Should these go to header as static inlines?
>
Would be nice will make them inline and squash it in the current patch.
> > +static int wait_msg_xfer_end(struct rpcif *rpc)
> > +{
> > + u32 sts;
> > +
> > + return regmap_read_poll_timeout(rpc->regmap, RPCIF_CMNSR, sts,
> > + sts & RPCIF_CMNSR_TEND, 0,
> > + USEC_PER_SEC);
> > +}
>
> This can't be right. sts is used uninitialized here.
>
Third parameter in regmap_read_poll_timeout() is the variable in which value is read and the fourth parameter condition has to be tied with the third parameter (there are similar instance in the kernel).
> > +int rpcif_manual_xfer(struct rpcif *rpc)
> > +{
> > + default:
> > + regmap_write(rpc->regmap, RPCIF_SMENR, rpc->enable);
> > + regmap_write(rpc->regmap, RPCIF_SMCR,
> > + rpc->smcr | RPCIF_SMCR_SPIE);
> > + ret = wait_msg_xfer_end(rpc);
> > + if (ret)
> > + goto err_out;
> > + }
> > +
> > +exit:
> > + pm_runtime_put(rpc->dev);
> > + return ret;
> > +
> > +err_out:
> > + ret = reset_control_reset(rpc->rstc);
> > + rpcif_hw_init(rpc, rpc->bus_size == 2);
> > + goto exit;
> > +}
>
> So we get failure in wait_msg_xfer_end(rpc); but then
> reset_control_reset(rpc->rstc); returns success and whole function
> returns success. Is that ok?
>
Good catch this needs fixing (upstream too).
> > +static int rpcif_probe(struct platform_device *pdev)
> > +{
> > + struct platform_device *vdev;
> > + struct device_node *flash;
> > + const char *name;
> > +
> > + flash = of_get_next_child(pdev->dev.of_node, NULL);
> > + if (!flash) {
> > + dev_warn(&pdev->dev, "no flash node found\n");
> > + return -ENODEV;
> > + }
>
> Does this need corresponding of_node_put()?
>
Agreed this needs fixing (upstream too).
> > +struct rpcif_op {
>
> Weird formatting; we normally use spaces (not tabs) for this.
>
Agreed will fix that.
> > + struct {
> > + u8 buswidth;
> ...
> > + struct {
> > + u8 ncycles;
> > + u8 buswidth;
> > + } dummy;
>
> Are you sure this will be consistent accross architectures? Should the
> structure be marked attribute packed or something?
>
Should be OK as this driver is intended only on R-Car Gen3 and RZ/G2x (arm64).
Cheers,
Prabhakar
> Best regards,
> Pavel
> --
> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5832): https://lists.cip-project.org/g/cip-dev/message/5832
Mute This Topic: https://lists.cip-project.org/mt/78451541/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver
2020-11-23 23:00 ` Lad Prabhakar
@ 2020-11-24 9:27 ` Pavel Machek
0 siblings, 0 replies; 20+ messages in thread
From: Pavel Machek @ 2020-11-24 9:27 UTC (permalink / raw)
To: Prabhakar Mahadev Lad; +Cc: Pavel Machek, cip-dev, Nobuhiro Iwamatsu, Biju Das
[-- Attachment #1.1: Type: text/plain, Size: 1369 bytes --]
Hi!
> > > +void rpcif_enable_rpm(struct rpcif *rpc)
> > > +{
> > > + pm_runtime_enable(rpc->dev);
> > > +}
> > > +EXPORT_SYMBOL(rpcif_enable_rpm);
> > > +
> > > +void rpcif_disable_rpm(struct rpcif *rpc)
> > > +{
> > > + pm_runtime_put_sync(rpc->dev);
> > > +}
> > > +EXPORT_SYMBOL(rpcif_disable_rpm);
> >
> > Should these go to header as static inlines?
> >
> Would be nice will make them inline and squash it in the current
> patch.
For this series, maybe squashing is not neccessary. It is pretty good
as-is.
> > > +static int wait_msg_xfer_end(struct rpcif *rpc)
> > > +{
> > > + u32 sts;
> > > +
> > > + return regmap_read_poll_timeout(rpc->regmap, RPCIF_CMNSR, sts,
> > > + sts & RPCIF_CMNSR_TEND, 0,
> > > + USEC_PER_SEC);
> > > +}
> >
> > This can't be right. sts is used uninitialized here.
> >
> Third parameter in regmap_read_poll_timeout() is the variable in which value is read and the fourth parameter condition has to be tied with the third parameter (there are similar instance in the kernel).
>
Okay, that's some rather evil code. It should really be
REGMAP_READ_POLL_TIMEOUT, because it is macro with weird semantics.
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5837): https://lists.cip-project.org/g/cip-dev/message/5837
Mute This Topic: https://lists.cip-project.org/mt/78451541/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver Lad Prabhakar
2020-11-23 19:37 ` Pavel Machek
@ 2020-11-23 19:38 ` Pavel Machek
2020-11-23 23:02 ` Lad Prabhakar
1 sibling, 1 reply; 20+ messages in thread
From: Pavel Machek @ 2020-11-23 19:38 UTC (permalink / raw)
To: Lad Prabhakar; +Cc: cip-dev, Nobuhiro Iwamatsu, Pavel Machek, Biju Das
[-- Attachment #1.1: Type: text/plain, Size: 458 bytes --]
Hi!
> From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> +int rpcif_manual_xfer(struct rpcif *rpc);
> +ssize_t rpcif_dirmap_read(struct rpcif *rpc, u64 offs, size_t len, void *buf);
> +
> +#endif // __RENESAS_RPC_IF_H
Oh and I'd use normal C comment here.
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5828): https://lists.cip-project.org/g/cip-dev/message/5828
Mute This Topic: https://lists.cip-project.org/mt/78451541/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver
2020-11-23 19:38 ` Pavel Machek
@ 2020-11-23 23:02 ` Lad Prabhakar
0 siblings, 0 replies; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 23:02 UTC (permalink / raw)
To: Pavel Machek; +Cc: cip-dev, Nobuhiro Iwamatsu, Biju Das
[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]
Hi Pavel,
Thank you for the review.
> -----Original Message-----
> From: Pavel Machek <pavel@denx.de>
> Sent: 23 November 2020 19:39
> To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Cc: cip-dev@lists.cip-project.org; Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek
> <pavel@denx.de>; Biju Das <biju.das.jz@bp.renesas.com>
> Subject: Re: [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver
>
> Hi!
>
> > From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> > +int rpcif_manual_xfer(struct rpcif *rpc);
> > +ssize_t rpcif_dirmap_read(struct rpcif *rpc, u64 offs, size_t len, void *buf);
> > +
> > +#endif // __RENESAS_RPC_IF_H
>
> Oh and I'd use normal C comment here.
>
Agreed not sure why checkpatch failed to catch this for upstream.
Cheers,
Prabhakar
> Best regards,
> Pavel
> --
> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5833): https://lists.cip-project.org/g/cip-dev/message/5833
Mute This Topic: https://lists.cip-project.org/mt/78451541/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 20+ messages in thread
* [cip-dev] [PATCH 4.19.y-cip 3/7] spi: spi-mem: Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum
2020-11-23 12:03 [cip-dev] [PATCH 4.19.y-cip 0/7] Add RPC-IF driver for RZ/G2x SoC's Lad Prabhakar
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 1/7] dt-bindings: memory: document Renesas RPC-IF bindings Lad Prabhakar
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver Lad Prabhakar
@ 2020-11-23 12:03 ` Lad Prabhakar
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 4/7] spi: spi-mem: export spi_mem_default_supports_op() Lad Prabhakar
` (3 subsequent siblings)
6 siblings, 0 replies; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 12:03 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
[-- Attachment #1: Type: text/plain, Size: 1977 bytes --]
From: Boris Brezillon <boris.brezillon@bootlin.com>
commit 0ebb261a0b2d090de618a383d2378d4a00834958 upstream.
When defining spi_mem_op templates we don't necessarily know the size
that will be passed when the template is actually used, and basing the
supports_op() check on op->data.nbytes to know whether there will be
data transferred for a specific operation is this not possible.
Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum so that we can base
our checks on op->data.dir instead of op->data.nbytes.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
[PL: manually applied the changes]
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/spi/spi-mem.c | 2 +-
include/linux/spi/spi-mem.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index 62a7b80801d2..967f581bca4f 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -142,7 +142,7 @@ static bool spi_mem_default_supports_op(struct spi_mem *mem,
spi_check_buswidth_req(mem, op->dummy.buswidth, true))
return false;
- if (op->data.nbytes &&
+ if (op->data.dir != SPI_MEM_NO_DATA &&
spi_check_buswidth_req(mem, op->data.buswidth,
op->data.dir == SPI_MEM_DATA_OUT))
return false;
diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index 69ee30456864..80db2de83402 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -57,10 +57,12 @@
/**
* enum spi_mem_data_dir - describes the direction of a SPI memory data
* transfer from the controller perspective
+ * @SPI_MEM_NO_DATA: no data transferred
* @SPI_MEM_DATA_IN: data coming from the SPI memory
* @SPI_MEM_DATA_OUT: data sent the SPI memory
*/
enum spi_mem_data_dir {
+ SPI_MEM_NO_DATA,
SPI_MEM_DATA_IN,
SPI_MEM_DATA_OUT,
};
--
2.17.1
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5819): https://lists.cip-project.org/g/cip-dev/message/5819
Mute This Topic: https://lists.cip-project.org/mt/78451542/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [cip-dev] [PATCH 4.19.y-cip 4/7] spi: spi-mem: export spi_mem_default_supports_op()
2020-11-23 12:03 [cip-dev] [PATCH 4.19.y-cip 0/7] Add RPC-IF driver for RZ/G2x SoC's Lad Prabhakar
` (2 preceding siblings ...)
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 3/7] spi: spi-mem: Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum Lad Prabhakar
@ 2020-11-23 12:03 ` Lad Prabhakar
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 5/7] spi: spi-mem: Split spi_mem_exec_op() code Lad Prabhakar
` (2 subsequent siblings)
6 siblings, 0 replies; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 12:03 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
[-- Attachment #1: Type: text/plain, Size: 2906 bytes --]
From: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
commit 46109648052fe778c75f199d72255c899578d6f7 upstream.
Export spi_mem_default_supports_op(), so that controller drivers
can use this.
spi-mem driver already exports this using EXPORT_SYMBOL,
but not declared it in spi-mem.h.
This patch declares spi_mem_default_supports_op() in spi-mem.h and
also removes the static from the function prototype.
This patch also squashes upstream commit 72e6841608b9 ("spi: spi-mem: Fix
build error without CONFIG_SPI_MEM")' in the current patch as commit
46109648052f ("spi: spi-mem: export spi_mem_default_supports_op()")'
introduced below build error when built without CONFIG_SPI_MEM:
drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'
Signed-off-by: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
[PL: manually applied the changes, squashed commit 72e6841608b9
("spi: spi-mem: Fix build error without CONFIG_SPI_MEM")' in current patch]
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/spi/spi-mem.c | 4 ++--
include/linux/spi/spi-mem.h | 11 +++++++++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index 967f581bca4f..b319a9f0138c 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -128,8 +128,8 @@ static int spi_check_buswidth_req(struct spi_mem *mem, u8 buswidth, bool tx)
return -ENOTSUPP;
}
-static bool spi_mem_default_supports_op(struct spi_mem *mem,
- const struct spi_mem_op *op)
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+ const struct spi_mem_op *op)
{
if (spi_check_buswidth_req(mem, op->cmd.buswidth, true))
return false;
diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index 80db2de83402..253a8d451d4c 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -224,6 +224,10 @@ int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
void spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
const struct spi_mem_op *op,
struct sg_table *sg);
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+ const struct spi_mem_op *op);
+
#else
static inline int
spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
@@ -239,6 +243,13 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
struct sg_table *sg)
{
}
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+ const struct spi_mem_op *op)
+{
+ return false;
+}
+
#endif /* CONFIG_SPI_MEM */
int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
--
2.17.1
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5820): https://lists.cip-project.org/g/cip-dev/message/5820
Mute This Topic: https://lists.cip-project.org/mt/78451543/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [cip-dev] [PATCH 4.19.y-cip 5/7] spi: spi-mem: Split spi_mem_exec_op() code
2020-11-23 12:03 [cip-dev] [PATCH 4.19.y-cip 0/7] Add RPC-IF driver for RZ/G2x SoC's Lad Prabhakar
` (3 preceding siblings ...)
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 4/7] spi: spi-mem: export spi_mem_default_supports_op() Lad Prabhakar
@ 2020-11-23 12:03 ` Lad Prabhakar
2020-11-23 19:43 ` Pavel Machek
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 6/7] spi: spi-mem: Add a new API to support direct mapping Lad Prabhakar
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 7/7] spi: add Renesas RPC-IF driver Lad Prabhakar
6 siblings, 1 reply; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 12:03 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
[-- Attachment #1: Type: text/plain, Size: 2766 bytes --]
From: Boris Brezillon <boris.brezillon@bootlin.com>
commit f86c24f4795303e4024bc113196de32782f6ccb5 upstream.
The logic surrounding the ->exec_op() call applies to direct mapping
accessors. Move this code to separate functions to avoid duplicating
code.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/spi/spi-mem.c | 63 ++++++++++++++++++++++++++++---------------
1 file changed, 42 insertions(+), 21 deletions(-)
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index b319a9f0138c..0908f979f6a8 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -213,6 +213,44 @@ bool spi_mem_supports_op(struct spi_mem *mem, const struct spi_mem_op *op)
}
EXPORT_SYMBOL_GPL(spi_mem_supports_op);
+static int spi_mem_access_start(struct spi_mem *mem)
+{
+ struct spi_controller *ctlr = mem->spi->controller;
+
+ /*
+ * Flush the message queue before executing our SPI memory
+ * operation to prevent preemption of regular SPI transfers.
+ */
+ spi_flush_queue(ctlr);
+
+ if (ctlr->auto_runtime_pm) {
+ int ret;
+
+ ret = pm_runtime_get_sync(ctlr->dev.parent);
+ if (ret < 0) {
+ dev_err(&ctlr->dev, "Failed to power device: %d\n",
+ ret);
+ return ret;
+ }
+ }
+
+ mutex_lock(&ctlr->bus_lock_mutex);
+ mutex_lock(&ctlr->io_mutex);
+
+ return 0;
+}
+
+static void spi_mem_access_end(struct spi_mem *mem)
+{
+ struct spi_controller *ctlr = mem->spi->controller;
+
+ mutex_unlock(&ctlr->io_mutex);
+ mutex_unlock(&ctlr->bus_lock_mutex);
+
+ if (ctlr->auto_runtime_pm)
+ pm_runtime_put(ctlr->dev.parent);
+}
+
/**
* spi_mem_exec_op() - Execute a memory operation
* @mem: the SPI memory
@@ -242,30 +280,13 @@ int spi_mem_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
return -ENOTSUPP;
if (ctlr->mem_ops) {
- /*
- * Flush the message queue before executing our SPI memory
- * operation to prevent preemption of regular SPI transfers.
- */
- spi_flush_queue(ctlr);
-
- if (ctlr->auto_runtime_pm) {
- ret = pm_runtime_get_sync(ctlr->dev.parent);
- if (ret < 0) {
- dev_err(&ctlr->dev,
- "Failed to power device: %d\n",
- ret);
- return ret;
- }
- }
+ ret = spi_mem_access_start(mem);
+ if (ret)
+ return ret;
- mutex_lock(&ctlr->bus_lock_mutex);
- mutex_lock(&ctlr->io_mutex);
ret = ctlr->mem_ops->exec_op(mem, op);
- mutex_unlock(&ctlr->io_mutex);
- mutex_unlock(&ctlr->bus_lock_mutex);
- if (ctlr->auto_runtime_pm)
- pm_runtime_put(ctlr->dev.parent);
+ spi_mem_access_end(mem);
/*
* Some controllers only optimize specific paths (typically the
--
2.17.1
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5821): https://lists.cip-project.org/g/cip-dev/message/5821
Mute This Topic: https://lists.cip-project.org/mt/78451545/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 5/7] spi: spi-mem: Split spi_mem_exec_op() code
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 5/7] spi: spi-mem: Split spi_mem_exec_op() code Lad Prabhakar
@ 2020-11-23 19:43 ` Pavel Machek
2020-11-23 23:05 ` Lad Prabhakar
0 siblings, 1 reply; 20+ messages in thread
From: Pavel Machek @ 2020-11-23 19:43 UTC (permalink / raw)
To: Lad Prabhakar; +Cc: cip-dev, Nobuhiro Iwamatsu, Pavel Machek, Biju Das
[-- Attachment #1.1: Type: text/plain, Size: 1210 bytes --]
Hi!
> From: Boris Brezillon <boris.brezillon@bootlin.com>
>
> commit f86c24f4795303e4024bc113196de32782f6ccb5 upstream.
>
> The logic surrounding the ->exec_op() call applies to direct mapping
> accessors. Move this code to separate functions to avoid duplicating
> code.
>
> +++ b/drivers/spi/spi-mem.c
> @@ -213,6 +213,44 @@ bool spi_mem_supports_op(struct spi_mem *mem, const struct spi_mem_op *op)
> }
> EXPORT_SYMBOL_GPL(spi_mem_supports_op);
>
> +static int spi_mem_access_start(struct spi_mem *mem)
> +{
> + struct spi_controller *ctlr = mem->spi->controller;
...
> + if (ctlr->auto_runtime_pm) {
> + int ret;
> +
> + ret = pm_runtime_get_sync(ctlr->dev.parent);
> + if (ret < 0) {
> + dev_err(&ctlr->dev, "Failed to power device: %d\n",
> + ret);
> + return ret;
> + }
This misses pm_runtime_put() in the error case.
> + mutex_lock(&ctlr->bus_lock_mutex);
> + mutex_lock(&ctlr->io_mutex);
Plus hiding locking into function like this ... is quite
"interesting".
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5829): https://lists.cip-project.org/g/cip-dev/message/5829
Mute This Topic: https://lists.cip-project.org/mt/78451545/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 5/7] spi: spi-mem: Split spi_mem_exec_op() code
2020-11-23 19:43 ` Pavel Machek
@ 2020-11-23 23:05 ` Lad Prabhakar
0 siblings, 0 replies; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 23:05 UTC (permalink / raw)
To: Pavel Machek; +Cc: cip-dev, Nobuhiro Iwamatsu, Biju Das
[-- Attachment #1: Type: text/plain, Size: 1822 bytes --]
Hi Pavel,
Thank you for the review.
> -----Original Message-----
> From: Pavel Machek <pavel@denx.de>
> Sent: 23 November 2020 19:44
> To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Cc: cip-dev@lists.cip-project.org; Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek
> <pavel@denx.de>; Biju Das <biju.das.jz@bp.renesas.com>
> Subject: Re: [PATCH 4.19.y-cip 5/7] spi: spi-mem: Split spi_mem_exec_op() code
>
> Hi!
>
> > From: Boris Brezillon <boris.brezillon@bootlin.com>
> >
> > commit f86c24f4795303e4024bc113196de32782f6ccb5 upstream.
> >
> > The logic surrounding the ->exec_op() call applies to direct mapping
> > accessors. Move this code to separate functions to avoid duplicating
> > code.
> >
>
> > +++ b/drivers/spi/spi-mem.c
> > @@ -213,6 +213,44 @@ bool spi_mem_supports_op(struct spi_mem *mem, const struct spi_mem_op *op)
> > }
> > EXPORT_SYMBOL_GPL(spi_mem_supports_op);
> >
> > +static int spi_mem_access_start(struct spi_mem *mem)
> > +{
> > + struct spi_controller *ctlr = mem->spi->controller;
> ...
> > + if (ctlr->auto_runtime_pm) {
> > + int ret;
> > +
> > + ret = pm_runtime_get_sync(ctlr->dev.parent);
> > + if (ret < 0) {
> > + dev_err(&ctlr->dev, "Failed to power device: %d\n",
> > + ret);
> > + return ret;
> > + }
>
> This misses pm_runtime_put() in the error case.
>
Agreed (pm_runtime_put_noidle()).
> > + mutex_lock(&ctlr->bus_lock_mutex);
> > + mutex_lock(&ctlr->io_mutex);
>
> Plus hiding locking into function like this ... is quite
> "interesting".
>
😊
Cheers,
Prabhakar
> Best regards,
> Pavel
>
> --
> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5834): https://lists.cip-project.org/g/cip-dev/message/5834
Mute This Topic: https://lists.cip-project.org/mt/78451545/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 20+ messages in thread
* [cip-dev] [PATCH 4.19.y-cip 6/7] spi: spi-mem: Add a new API to support direct mapping
2020-11-23 12:03 [cip-dev] [PATCH 4.19.y-cip 0/7] Add RPC-IF driver for RZ/G2x SoC's Lad Prabhakar
` (4 preceding siblings ...)
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 5/7] spi: spi-mem: Split spi_mem_exec_op() code Lad Prabhakar
@ 2020-11-23 12:03 ` Lad Prabhakar
2020-11-23 19:46 ` Pavel Machek
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 7/7] spi: add Renesas RPC-IF driver Lad Prabhakar
6 siblings, 1 reply; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 12:03 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
[-- Attachment #1: Type: text/plain, Size: 12598 bytes --]
From: Boris Brezillon <boris.brezillon@bootlin.com>
commit aa167f3fed0c37e0e4c707d4331d827661f46644 upstream.
Most modern SPI controllers can directly map a SPI memory (or a portion
of the SPI memory) in the CPU address space. Most of the time this
brings significant performance improvements as it automates the whole
process of sending SPI memory operations every time a new region is
accessed.
This new API allows SPI memory drivers to create direct mappings and
then use them to access the memory instead of using spi_mem_exec_op().
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/spi/spi-mem.c | 204 ++++++++++++++++++++++++++++++++++++
include/linux/spi/spi-mem.h | 80 ++++++++++++++
2 files changed, 284 insertions(+)
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index 0908f979f6a8..349ab2077f19 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -432,6 +432,210 @@ int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op)
}
EXPORT_SYMBOL_GPL(spi_mem_adjust_op_size);
+static ssize_t spi_mem_no_dirmap_read(struct spi_mem_dirmap_desc *desc,
+ u64 offs, size_t len, void *buf)
+{
+ struct spi_mem_op op = desc->info.op_tmpl;
+ int ret;
+
+ op.addr.val = desc->info.offset + offs;
+ op.data.buf.in = buf;
+ op.data.nbytes = len;
+ ret = spi_mem_adjust_op_size(desc->mem, &op);
+ if (ret)
+ return ret;
+
+ ret = spi_mem_exec_op(desc->mem, &op);
+ if (ret)
+ return ret;
+
+ return op.data.nbytes;
+}
+
+static ssize_t spi_mem_no_dirmap_write(struct spi_mem_dirmap_desc *desc,
+ u64 offs, size_t len, const void *buf)
+{
+ struct spi_mem_op op = desc->info.op_tmpl;
+ int ret;
+
+ op.addr.val = desc->info.offset + offs;
+ op.data.buf.out = buf;
+ op.data.nbytes = len;
+ ret = spi_mem_adjust_op_size(desc->mem, &op);
+ if (ret)
+ return ret;
+
+ ret = spi_mem_exec_op(desc->mem, &op);
+ if (ret)
+ return ret;
+
+ return op.data.nbytes;
+}
+
+/**
+ * spi_mem_dirmap_create() - Create a direct mapping descriptor
+ * @mem: SPI mem device this direct mapping should be created for
+ * @info: direct mapping information
+ *
+ * This function is creating a direct mapping descriptor which can then be used
+ * to access the memory using spi_mem_dirmap_read() or spi_mem_dirmap_write().
+ * If the SPI controller driver does not support direct mapping, this function
+ * fallback to an implementation using spi_mem_exec_op(), so that the caller
+ * doesn't have to bother implementing a fallback on his own.
+ *
+ * Return: a valid pointer in case of success, and ERR_PTR() otherwise.
+ */
+struct spi_mem_dirmap_desc *
+spi_mem_dirmap_create(struct spi_mem *mem,
+ const struct spi_mem_dirmap_info *info)
+{
+ struct spi_controller *ctlr = mem->spi->controller;
+ struct spi_mem_dirmap_desc *desc;
+ int ret = -ENOTSUPP;
+
+ /* Make sure the number of address cycles is between 1 and 8 bytes. */
+ if (!info->op_tmpl.addr.nbytes || info->op_tmpl.addr.nbytes > 8)
+ return ERR_PTR(-EINVAL);
+
+ /* data.dir should either be SPI_MEM_DATA_IN or SPI_MEM_DATA_OUT. */
+ if (info->op_tmpl.data.dir == SPI_MEM_NO_DATA)
+ return ERR_PTR(-EINVAL);
+
+ desc = kzalloc(sizeof(*desc), GFP_KERNEL);
+ if (!desc)
+ return ERR_PTR(-ENOMEM);
+
+ desc->mem = mem;
+ desc->info = *info;
+ if (ctlr->mem_ops && ctlr->mem_ops->dirmap_create)
+ ret = ctlr->mem_ops->dirmap_create(desc);
+
+ if (ret) {
+ desc->nodirmap = true;
+ if (!spi_mem_supports_op(desc->mem, &desc->info.op_tmpl))
+ ret = -ENOTSUPP;
+ else
+ ret = 0;
+ }
+
+ if (ret) {
+ kfree(desc);
+ return ERR_PTR(ret);
+ }
+
+ return desc;
+}
+EXPORT_SYMBOL_GPL(spi_mem_dirmap_create);
+
+/**
+ * spi_mem_dirmap_destroy() - Destroy a direct mapping descriptor
+ * @desc: the direct mapping descriptor to destroy
+ * @info: direct mapping information
+ *
+ * This function destroys a direct mapping descriptor previously created by
+ * spi_mem_dirmap_create().
+ */
+void spi_mem_dirmap_destroy(struct spi_mem_dirmap_desc *desc)
+{
+ struct spi_controller *ctlr = desc->mem->spi->controller;
+
+ if (!desc->nodirmap && ctlr->mem_ops && ctlr->mem_ops->dirmap_destroy)
+ ctlr->mem_ops->dirmap_destroy(desc);
+}
+EXPORT_SYMBOL_GPL(spi_mem_dirmap_destroy);
+
+/**
+ * spi_mem_dirmap_dirmap_read() - Read data through a direct mapping
+ * @desc: direct mapping descriptor
+ * @offs: offset to start reading from. Note that this is not an absolute
+ * offset, but the offset within the direct mapping which already has
+ * its own offset
+ * @len: length in bytes
+ * @buf: destination buffer. This buffer must be DMA-able
+ *
+ * This function reads data from a memory device using a direct mapping
+ * previously instantiated with spi_mem_dirmap_create().
+ *
+ * Return: the amount of data read from the memory device or a negative error
+ * code. Note that the returned size might be smaller than @len, and the caller
+ * is responsible for calling spi_mem_dirmap_read() again when that happens.
+ */
+ssize_t spi_mem_dirmap_read(struct spi_mem_dirmap_desc *desc,
+ u64 offs, size_t len, void *buf)
+{
+ struct spi_controller *ctlr = desc->mem->spi->controller;
+ ssize_t ret;
+
+ if (desc->info.op_tmpl.data.dir != SPI_MEM_DATA_IN)
+ return -EINVAL;
+
+ if (!len)
+ return 0;
+
+ if (desc->nodirmap) {
+ ret = spi_mem_no_dirmap_read(desc, offs, len, buf);
+ } else if (ctlr->mem_ops && ctlr->mem_ops->dirmap_read) {
+ ret = spi_mem_access_start(desc->mem);
+ if (ret)
+ return ret;
+
+ ret = ctlr->mem_ops->dirmap_read(desc, offs, len, buf);
+
+ spi_mem_access_end(desc->mem);
+ } else {
+ ret = -ENOTSUPP;
+ }
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(spi_mem_dirmap_read);
+
+/**
+ * spi_mem_dirmap_dirmap_write() - Write data through a direct mapping
+ * @desc: direct mapping descriptor
+ * @offs: offset to start writing from. Note that this is not an absolute
+ * offset, but the offset within the direct mapping which already has
+ * its own offset
+ * @len: length in bytes
+ * @buf: source buffer. This buffer must be DMA-able
+ *
+ * This function writes data to a memory device using a direct mapping
+ * previously instantiated with spi_mem_dirmap_create().
+ *
+ * Return: the amount of data written to the memory device or a negative error
+ * code. Note that the returned size might be smaller than @len, and the caller
+ * is responsible for calling spi_mem_dirmap_write() again when that happens.
+ */
+ssize_t spi_mem_dirmap_write(struct spi_mem_dirmap_desc *desc,
+ u64 offs, size_t len, const void *buf)
+{
+ struct spi_controller *ctlr = desc->mem->spi->controller;
+ ssize_t ret;
+
+ if (desc->info.op_tmpl.data.dir != SPI_MEM_DATA_OUT)
+ return -EINVAL;
+
+ if (!len)
+ return 0;
+
+ if (desc->nodirmap) {
+ ret = spi_mem_no_dirmap_write(desc, offs, len, buf);
+ } else if (ctlr->mem_ops && ctlr->mem_ops->dirmap_write) {
+ ret = spi_mem_access_start(desc->mem);
+ if (ret)
+ return ret;
+
+ ret = ctlr->mem_ops->dirmap_write(desc, offs, len, buf);
+
+ spi_mem_access_end(desc->mem);
+ } else {
+ ret = -ENOTSUPP;
+ }
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(spi_mem_dirmap_write);
+
static inline struct spi_mem_driver *to_spi_mem_drv(struct device_driver *drv)
{
return container_of(drv, struct spi_mem_driver, spidrv.driver);
diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index 253a8d451d4c..762b3974cf9c 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -124,6 +124,49 @@ struct spi_mem_op {
.data = __data, \
}
+/**
+ * struct spi_mem_dirmap_info - Direct mapping information
+ * @op_tmpl: operation template that should be used by the direct mapping when
+ * the memory device is accessed
+ * @offset: absolute offset this direct mapping is pointing to
+ * @length: length in byte of this direct mapping
+ *
+ * These information are used by the controller specific implementation to know
+ * the portion of memory that is directly mapped and the spi_mem_op that should
+ * be used to access the device.
+ * A direct mapping is only valid for one direction (read or write) and this
+ * direction is directly encoded in the ->op_tmpl.data.dir field.
+ */
+struct spi_mem_dirmap_info {
+ struct spi_mem_op op_tmpl;
+ u64 offset;
+ u64 length;
+};
+
+/**
+ * struct spi_mem_dirmap_desc - Direct mapping descriptor
+ * @mem: the SPI memory device this direct mapping is attached to
+ * @info: information passed at direct mapping creation time
+ * @nodirmap: set to 1 if the SPI controller does not implement
+ * ->mem_ops->dirmap_create() or when this function returned an
+ * error. If @nodirmap is true, all spi_mem_dirmap_{read,write}()
+ * calls will use spi_mem_exec_op() to access the memory. This is a
+ * degraded mode that allows spi_mem drivers to use the same code
+ * no matter whether the controller supports direct mapping or not
+ * @priv: field pointing to controller specific data
+ *
+ * Common part of a direct mapping descriptor. This object is created by
+ * spi_mem_dirmap_create() and controller implementation of ->create_dirmap()
+ * can create/attach direct mapping resources to the descriptor in the ->priv
+ * field.
+ */
+struct spi_mem_dirmap_desc {
+ struct spi_mem *mem;
+ struct spi_mem_dirmap_info info;
+ unsigned int nodirmap;
+ void *priv;
+};
+
/**
* struct spi_mem - describes a SPI memory device
* @spi: the underlying SPI device
@@ -179,10 +222,32 @@ static inline void *spi_mem_get_drvdata(struct spi_mem *mem)
* Note that if the implementation of this function allocates memory
* dynamically, then it should do so with devm_xxx(), as we don't
* have a ->free_name() function.
+ * @dirmap_create: create a direct mapping descriptor that can later be used to
+ * access the memory device. This method is optional
+ * @dirmap_destroy: destroy a memory descriptor previous created by
+ * ->dirmap_create()
+ * @dirmap_read: read data from the memory device using the direct mapping
+ * created by ->dirmap_create(). The function can return less
+ * data than requested (for example when the request is crossing
+ * the currently mapped area), and the caller of
+ * spi_mem_dirmap_read() is responsible for calling it again in
+ * this case.
+ * @dirmap_write: write data to the memory device using the direct mapping
+ * created by ->dirmap_create(). The function can return less
+ * data than requested (for example when the request is crossing
+ * the currently mapped area), and the caller of
+ * spi_mem_dirmap_write() is responsible for calling it again in
+ * this case.
*
* This interface should be implemented by SPI controllers providing an
* high-level interface to execute SPI memory operation, which is usually the
* case for QSPI controllers.
+ *
+ * Note on ->dirmap_{read,write}(): drivers should avoid accessing the direct
+ * mapping from the CPU because doing that can stall the CPU waiting for the
+ * SPI mem transaction to finish, and this will make real-time maintainers
+ * unhappy and might make your system less reactive. Instead, drivers should
+ * use DMA to access this direct mapping.
*/
struct spi_controller_mem_ops {
int (*adjust_op_size)(struct spi_mem *mem, struct spi_mem_op *op);
@@ -191,6 +256,12 @@ struct spi_controller_mem_ops {
int (*exec_op)(struct spi_mem *mem,
const struct spi_mem_op *op);
const char *(*get_name)(struct spi_mem *mem);
+ int (*dirmap_create)(struct spi_mem_dirmap_desc *desc);
+ void (*dirmap_destroy)(struct spi_mem_dirmap_desc *desc);
+ ssize_t (*dirmap_read)(struct spi_mem_dirmap_desc *desc,
+ u64 offs, size_t len, void *buf);
+ ssize_t (*dirmap_write)(struct spi_mem_dirmap_desc *desc,
+ u64 offs, size_t len, const void *buf);
};
/**
@@ -262,6 +333,15 @@ int spi_mem_exec_op(struct spi_mem *mem,
const char *spi_mem_get_name(struct spi_mem *mem);
+struct spi_mem_dirmap_desc *
+spi_mem_dirmap_create(struct spi_mem *mem,
+ const struct spi_mem_dirmap_info *info);
+void spi_mem_dirmap_destroy(struct spi_mem_dirmap_desc *desc);
+ssize_t spi_mem_dirmap_read(struct spi_mem_dirmap_desc *desc,
+ u64 offs, size_t len, void *buf);
+ssize_t spi_mem_dirmap_write(struct spi_mem_dirmap_desc *desc,
+ u64 offs, size_t len, const void *buf);
+
int spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
struct module *owner);
--
2.17.1
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5822): https://lists.cip-project.org/g/cip-dev/message/5822
Mute This Topic: https://lists.cip-project.org/mt/78451547/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 6/7] spi: spi-mem: Add a new API to support direct mapping
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 6/7] spi: spi-mem: Add a new API to support direct mapping Lad Prabhakar
@ 2020-11-23 19:46 ` Pavel Machek
2020-11-23 23:08 ` Lad Prabhakar
0 siblings, 1 reply; 20+ messages in thread
From: Pavel Machek @ 2020-11-23 19:46 UTC (permalink / raw)
To: Lad Prabhakar; +Cc: cip-dev, Nobuhiro Iwamatsu, Pavel Machek, Biju Das
[-- Attachment #1.1: Type: text/plain, Size: 1792 bytes --]
Hi!
> commit aa167f3fed0c37e0e4c707d4331d827661f46644 upstream.
>
> Most modern SPI controllers can directly map a SPI memory (or a portion
> of the SPI memory) in the CPU address space. Most of the time this
> brings significant performance improvements as it automates the whole
> process of sending SPI memory operations every time a new region is
> accessed.
>
> This new API allows SPI memory drivers to create direct mappings and
> then use them to access the memory instead of using
> spi_mem_exec_op().
> + * Return: the amount of data read from the memory device or a negative error
> + * code. Note that the returned size might be smaller than @len, and the caller
> + * is responsible for calling spi_mem_dirmap_read() again when that happens.
> + */
> +ssize_t spi_mem_dirmap_read(struct spi_mem_dirmap_desc *desc,
> + u64 offs, size_t len, void *buf)
> +{
> + struct spi_controller *ctlr = desc->mem->spi->controller;
> + ssize_t ret;
> +
> + if (desc->info.op_tmpl.data.dir != SPI_MEM_DATA_IN)
> + return -EINVAL;
> +
> + if (!len)
> + return 0;
> +
> + if (desc->nodirmap) {
> + ret = spi_mem_no_dirmap_read(desc, offs, len, buf);
I'd do return ... here.
> + } else if (ctlr->mem_ops && ctlr->mem_ops->dirmap_read) {
> + ret = spi_mem_access_start(desc->mem);
> + if (ret)
> + return ret;
> +
> + ret = ctlr->mem_ops->dirmap_read(desc, offs, len, buf);
> +
> + spi_mem_access_end(desc->mem);
and here.
> + } else {
> + ret = -ENOTSUPP;
> + }
To help with if/else nesting. spi_mem_dirmap_write could use same
treatment.
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5830): https://lists.cip-project.org/g/cip-dev/message/5830
Mute This Topic: https://lists.cip-project.org/mt/78451547/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 6/7] spi: spi-mem: Add a new API to support direct mapping
2020-11-23 19:46 ` Pavel Machek
@ 2020-11-23 23:08 ` Lad Prabhakar
0 siblings, 0 replies; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 23:08 UTC (permalink / raw)
To: Pavel Machek; +Cc: cip-dev, Nobuhiro Iwamatsu, Biju Das
[-- Attachment #1: Type: text/plain, Size: 2514 bytes --]
Hi Pavel,
Thank you for the review.
> -----Original Message-----
> From: Pavel Machek <pavel@denx.de>
> Sent: 23 November 2020 19:46
> To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Cc: cip-dev@lists.cip-project.org; Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek
> <pavel@denx.de>; Biju Das <biju.das.jz@bp.renesas.com>
> Subject: Re: [PATCH 4.19.y-cip 6/7] spi: spi-mem: Add a new API to support direct mapping
>
> Hi!
>
> > commit aa167f3fed0c37e0e4c707d4331d827661f46644 upstream.
> >
> > Most modern SPI controllers can directly map a SPI memory (or a portion
> > of the SPI memory) in the CPU address space. Most of the time this
> > brings significant performance improvements as it automates the whole
> > process of sending SPI memory operations every time a new region is
> > accessed.
> >
> > This new API allows SPI memory drivers to create direct mappings and
> > then use them to access the memory instead of using
> > spi_mem_exec_op().
>
> > + * Return: the amount of data read from the memory device or a negative error
> > + * code. Note that the returned size might be smaller than @len, and the caller
> > + * is responsible for calling spi_mem_dirmap_read() again when that happens.
> > + */
> > +ssize_t spi_mem_dirmap_read(struct spi_mem_dirmap_desc *desc,
> > + u64 offs, size_t len, void *buf)
> > +{
> > + struct spi_controller *ctlr = desc->mem->spi->controller;
> > + ssize_t ret;
> > +
> > + if (desc->info.op_tmpl.data.dir != SPI_MEM_DATA_IN)
> > + return -EINVAL;
> > +
> > + if (!len)
> > + return 0;
> > +
> > + if (desc->nodirmap) {
> > + ret = spi_mem_no_dirmap_read(desc, offs, len, buf);
>
> I'd do return ... here.
>
Agreed.
> > + } else if (ctlr->mem_ops && ctlr->mem_ops->dirmap_read) {
> > + ret = spi_mem_access_start(desc->mem);
> > + if (ret)
> > + return ret;
> > +
> > + ret = ctlr->mem_ops->dirmap_read(desc, offs, len, buf);
> > +
> > + spi_mem_access_end(desc->mem);
>
> and here.
>
Ditto.
> > + } else {
> > + ret = -ENOTSUPP;
> > + }
>
> To help with if/else nesting. spi_mem_dirmap_write could use same
> treatment.
>
Agreed will fix that and squash the changes in current patch and post it as part of v2.
Cheers,
Prabhakar
> Best regards,
> Pavel
>
> --
> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5835): https://lists.cip-project.org/g/cip-dev/message/5835
Mute This Topic: https://lists.cip-project.org/mt/78451547/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 20+ messages in thread
* [cip-dev] [PATCH 4.19.y-cip 7/7] spi: add Renesas RPC-IF driver
2020-11-23 12:03 [cip-dev] [PATCH 4.19.y-cip 0/7] Add RPC-IF driver for RZ/G2x SoC's Lad Prabhakar
` (5 preceding siblings ...)
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 6/7] spi: spi-mem: Add a new API to support direct mapping Lad Prabhakar
@ 2020-11-23 12:03 ` Lad Prabhakar
2020-11-23 19:52 ` Pavel Machek
6 siblings, 1 reply; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 12:03 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
[-- Attachment #1: Type: text/plain, Size: 7627 bytes --]
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
commit eb8d6d464a27850498dced21a8450e85d4a02009 upstream.
Add the SPI 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.
We only implement the 'spi-mem' interface -- there's no need to implement
the usual SPI driver methods...
Based on the original patch by Mason Yang <masonccyang@mxic.com.tw>.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Link: https://lore.kernel.org/r/1ece0e6c-71af-f0f1-709e-571f4b0b4853@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/spi/Kconfig | 6 ++
drivers/spi/Makefile | 1 +
drivers/spi/spi-rpc-if.c | 216 +++++++++++++++++++++++++++++++++++++++
3 files changed, 223 insertions(+)
create mode 100644 drivers/spi/spi-rpc-if.c
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 0a7fd56c1ed9..461315967f96 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -514,6 +514,12 @@ config SPI_RB4XX
help
SPI controller driver for the Mikrotik RB4xx series boards.
+config SPI_RPCIF
+ tristate "Renesas RPC-IF SPI driver"
+ depends on RENESAS_RPCIF
+ help
+ SPI driver for Renesas R-Car Gen3 RPC-IF.
+
config SPI_RSPI
tristate "Renesas RSPI/QSPI controller"
depends on SUPERH || ARCH_RENESAS || COMPILE_TEST
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index a90d55970036..e0b5478fde62 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -77,6 +77,7 @@ obj-$(CONFIG_SPI_PXA2XX_PCI) += spi-pxa2xx-pci.o
obj-$(CONFIG_SPI_QUP) += spi-qup.o
obj-$(CONFIG_SPI_ROCKCHIP) += spi-rockchip.o
obj-$(CONFIG_SPI_RB4XX) += spi-rb4xx.o
+obj-$(CONFIG_SPI_RPCIF) += spi-rpc-if.o
obj-$(CONFIG_SPI_RSPI) += spi-rspi.o
obj-$(CONFIG_SPI_S3C24XX) += spi-s3c24xx-hw.o
spi-s3c24xx-hw-y := spi-s3c24xx.o
diff --git a/drivers/spi/spi-rpc-if.c b/drivers/spi/spi-rpc-if.c
new file mode 100644
index 000000000000..ed3e548227f4
--- /dev/null
+++ b/drivers/spi/spi-rpc-if.c
@@ -0,0 +1,216 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// RPC-IF SPI/QSPI/Octa driver
+//
+// Copyright (C) 2018 ~ 2019 Renesas Solutions Corp.
+// Copyright (C) 2019 Macronix International Co., Ltd.
+// Copyright (C) 2019 - 2020 Cogent Embedded, Inc.
+//
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/spi-mem.h>
+
+#include <memory/renesas-rpc-if.h>
+
+#include <asm/unaligned.h>
+
+static void rpcif_spi_mem_prepare(struct spi_device *spi_dev,
+ const struct spi_mem_op *spi_op,
+ u64 *offs, size_t *len)
+{
+ struct rpcif *rpc = spi_controller_get_devdata(spi_dev->controller);
+ struct rpcif_op rpc_op = { };
+
+ rpc_op.cmd.opcode = spi_op->cmd.opcode;
+ rpc_op.cmd.buswidth = spi_op->cmd.buswidth;
+
+ if (spi_op->addr.nbytes) {
+ rpc_op.addr.buswidth = spi_op->addr.buswidth;
+ rpc_op.addr.nbytes = spi_op->addr.nbytes;
+ rpc_op.addr.val = spi_op->addr.val;
+ }
+
+ if (spi_op->dummy.nbytes) {
+ rpc_op.dummy.buswidth = spi_op->dummy.buswidth;
+ rpc_op.dummy.ncycles = spi_op->dummy.nbytes * 8 /
+ spi_op->dummy.buswidth;
+ }
+
+ if (spi_op->data.nbytes || (offs && len)) {
+ rpc_op.data.buswidth = spi_op->data.buswidth;
+ rpc_op.data.nbytes = spi_op->data.nbytes;
+ switch (spi_op->data.dir) {
+ case SPI_MEM_DATA_IN:
+ rpc_op.data.dir = RPCIF_DATA_IN;
+ rpc_op.data.buf.in = spi_op->data.buf.in;
+ break;
+ case SPI_MEM_DATA_OUT:
+ rpc_op.data.dir = RPCIF_DATA_OUT;
+ rpc_op.data.buf.out = spi_op->data.buf.out;
+ break;
+ case SPI_MEM_NO_DATA:
+ rpc_op.data.dir = RPCIF_NO_DATA;
+ break;
+ }
+ } else {
+ rpc_op.data.dir = RPCIF_NO_DATA;
+ }
+
+ rpcif_prepare(rpc, &rpc_op, offs, len);
+}
+
+static bool rpcif_spi_mem_supports_op(struct spi_mem *mem,
+ const struct spi_mem_op *op)
+{
+ if (!spi_mem_default_supports_op(mem, op))
+ return false;
+
+ if (op->data.buswidth > 4 || op->addr.buswidth > 4 ||
+ op->dummy.buswidth > 4 || op->cmd.buswidth > 4 ||
+ op->addr.nbytes > 4)
+ return false;
+
+ return true;
+}
+
+static ssize_t rpcif_spi_mem_dirmap_read(struct spi_mem_dirmap_desc *desc,
+ u64 offs, size_t len, void *buf)
+{
+ struct rpcif *rpc =
+ spi_controller_get_devdata(desc->mem->spi->controller);
+
+ if (offs + desc->info.offset + len > U32_MAX)
+ return -EINVAL;
+
+ rpcif_spi_mem_prepare(desc->mem->spi, &desc->info.op_tmpl, &offs, &len);
+
+ return rpcif_dirmap_read(rpc, offs, len, buf);
+}
+
+static int rpcif_spi_mem_dirmap_create(struct spi_mem_dirmap_desc *desc)
+{
+ struct rpcif *rpc =
+ spi_controller_get_devdata(desc->mem->spi->controller);
+
+ if (desc->info.offset + desc->info.length > U32_MAX)
+ return -ENOTSUPP;
+
+ if (!rpcif_spi_mem_supports_op(desc->mem, &desc->info.op_tmpl))
+ return -ENOTSUPP;
+
+ if (!rpc->dirmap && desc->info.op_tmpl.data.dir == SPI_MEM_DATA_IN)
+ return -ENOTSUPP;
+
+ if (desc->info.op_tmpl.data.dir == SPI_MEM_DATA_OUT)
+ return -ENOTSUPP;
+
+ return 0;
+}
+
+static int rpcif_spi_mem_exec_op(struct spi_mem *mem,
+ const struct spi_mem_op *op)
+{
+ struct rpcif *rpc =
+ spi_controller_get_devdata(mem->spi->controller);
+
+ rpcif_spi_mem_prepare(mem->spi, op, NULL, NULL);
+
+ return rpcif_manual_xfer(rpc);
+}
+
+static const struct spi_controller_mem_ops rpcif_spi_mem_ops = {
+ .supports_op = rpcif_spi_mem_supports_op,
+ .exec_op = rpcif_spi_mem_exec_op,
+ .dirmap_create = rpcif_spi_mem_dirmap_create,
+ .dirmap_read = rpcif_spi_mem_dirmap_read,
+};
+
+static int rpcif_spi_probe(struct platform_device *pdev)
+{
+ struct device *parent = pdev->dev.parent;
+ struct spi_controller *ctlr;
+ struct rpcif *rpc;
+ int error;
+
+ ctlr = spi_alloc_master(&pdev->dev, sizeof(*rpc));
+ if (!ctlr)
+ return -ENOMEM;
+
+ rpc = spi_controller_get_devdata(ctlr);
+ rpcif_sw_init(rpc, parent);
+
+ platform_set_drvdata(pdev, ctlr);
+
+ ctlr->dev.of_node = parent->of_node;
+
+ rpcif_enable_rpm(rpc);
+
+ ctlr->num_chipselect = 1;
+ ctlr->mem_ops = &rpcif_spi_mem_ops;
+
+ ctlr->bits_per_word_mask = SPI_BPW_MASK(8);
+ ctlr->mode_bits = SPI_CPOL | SPI_CPHA | SPI_TX_QUAD | SPI_RX_QUAD;
+ ctlr->flags = SPI_CONTROLLER_HALF_DUPLEX;
+
+ rpcif_hw_init(rpc, false);
+
+ error = spi_register_controller(ctlr);
+ if (error) {
+ dev_err(&pdev->dev, "spi_register_controller failed\n");
+ goto err_put_ctlr;
+ }
+ return 0;
+
+err_put_ctlr:
+ rpcif_disable_rpm(rpc);
+ spi_controller_put(ctlr);
+
+ return error;
+}
+
+static int rpcif_spi_remove(struct platform_device *pdev)
+{
+ struct spi_controller *ctlr = platform_get_drvdata(pdev);
+ struct rpcif *rpc = spi_controller_get_devdata(ctlr);
+
+ spi_unregister_controller(ctlr);
+ rpcif_disable_rpm(rpc);
+
+ return 0;
+}
+
+#ifdef CONFIG_PM_SLEEP
+static int rpcif_spi_suspend(struct device *dev)
+{
+ struct spi_controller *ctlr = dev_get_drvdata(dev);
+
+ return spi_controller_suspend(ctlr);
+}
+
+static int rpcif_spi_resume(struct device *dev)
+{
+ struct spi_controller *ctlr = dev_get_drvdata(dev);
+
+ return spi_controller_resume(ctlr);
+}
+
+static SIMPLE_DEV_PM_OPS(rpcif_spi_pm_ops, rpcif_spi_suspend, rpcif_spi_resume);
+#define DEV_PM_OPS (&rpcif_spi_pm_ops)
+#else
+#define DEV_PM_OPS NULL
+#endif
+
+static struct platform_driver rpcif_spi_driver = {
+ .probe = rpcif_spi_probe,
+ .remove = rpcif_spi_remove,
+ .driver = {
+ .name = "rpc-if-spi",
+ .pm = DEV_PM_OPS,
+ },
+};
+module_platform_driver(rpcif_spi_driver);
+
+MODULE_DESCRIPTION("Renesas RPC-IF SPI driver");
+MODULE_LICENSE("GPL v2");
--
2.17.1
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5823): https://lists.cip-project.org/g/cip-dev/message/5823
Mute This Topic: https://lists.cip-project.org/mt/78451549/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 7/7] spi: add Renesas RPC-IF driver
2020-11-23 12:03 ` [cip-dev] [PATCH 4.19.y-cip 7/7] spi: add Renesas RPC-IF driver Lad Prabhakar
@ 2020-11-23 19:52 ` Pavel Machek
2020-11-23 23:12 ` Lad Prabhakar
0 siblings, 1 reply; 20+ messages in thread
From: Pavel Machek @ 2020-11-23 19:52 UTC (permalink / raw)
To: Lad Prabhakar; +Cc: cip-dev, Nobuhiro Iwamatsu, Pavel Machek, Biju Das
[-- Attachment #1.1: Type: text/plain, Size: 2832 bytes --]
Hi!
> commit eb8d6d464a27850498dced21a8450e85d4a02009 upstream.
>
> Add the SPI 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.
> We only implement the 'spi-mem' interface -- there's no need to implement
> the usual SPI driver methods...
>
> Based on the original patch by Mason Yang <masonccyang@mxic.com.tw>.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Link: https://lore.kernel.org/r/1ece0e6c-71af-f0f1-709e-571f4b0b4853@cogentembedded.com
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> drivers/spi/Kconfig | 6 ++
> drivers/spi/Makefile | 1 +
> drivers/spi/spi-rpc-if.c | 216 +++++++++++++++++++++++++++++++++++++++
> 3 files changed, 223 insertions(+)
> create mode 100644 drivers/spi/spi-rpc-if.c
>
> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> index 0a7fd56c1ed9..461315967f96 100644
> --- a/drivers/spi/Kconfig
> +++ b/drivers/spi/Kconfig
> @@ -514,6 +514,12 @@ config SPI_RB4XX
> help
> SPI controller driver for the Mikrotik RB4xx series boards.
>
> +config SPI_RPCIF
> + tristate "Renesas RPC-IF SPI driver"
> + depends on RENESAS_RPCIF
> + help
> + SPI driver for Renesas R-Car Gen3 RPC-IF.
Few lines here explaining the acronyms etc. would be nice.
> + error = spi_register_controller(ctlr);
> + if (error) {
> + dev_err(&pdev->dev, "spi_register_controller failed\n");
> + goto err_put_ctlr;
> + }
> + return 0;
> +
> +err_put_ctlr:
> + rpcif_disable_rpm(rpc);
> + spi_controller_put(ctlr);
> +
> + return error;
> +}
With just one user of the error exit, I'd avoid the goto.
> +#ifdef CONFIG_PM_SLEEP
> +static int rpcif_spi_suspend(struct device *dev)
> +{
> + struct spi_controller *ctlr = dev_get_drvdata(dev);
> +
> + return spi_controller_suspend(ctlr);
> +}
> +
> +static int rpcif_spi_resume(struct device *dev)
> +{
> + struct spi_controller *ctlr = dev_get_drvdata(dev);
> +
> + return spi_controller_resume(ctlr);
> +}
> +
> +static SIMPLE_DEV_PM_OPS(rpcif_spi_pm_ops, rpcif_spi_suspend, rpcif_spi_resume);
> +#define DEV_PM_OPS (&rpcif_spi_pm_ops)
> +#else
> +#define DEV_PM_OPS NULL
> +#endif
> +
> +static struct platform_driver rpcif_spi_driver = {
> + .probe = rpcif_spi_probe,
> + .remove = rpcif_spi_remove,
> + .driver = {
> + .name = "rpc-if-spi",
> + .pm = DEV_PM_OPS,
> + },
> +};
Can you just add "__maybe_unused" annotation and avoid the ifdefs,
like atmel-quadspi.c does?
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5831): https://lists.cip-project.org/g/cip-dev/message/5831
Mute This Topic: https://lists.cip-project.org/mt/78451549/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 7/7] spi: add Renesas RPC-IF driver
2020-11-23 19:52 ` Pavel Machek
@ 2020-11-23 23:12 ` Lad Prabhakar
0 siblings, 0 replies; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 23:12 UTC (permalink / raw)
To: Pavel Machek; +Cc: cip-dev, Nobuhiro Iwamatsu, Biju Das
[-- Attachment #1: Type: text/plain, Size: 3548 bytes --]
Hi Pavel,
Thank you for the review.
> -----Original Message-----
> From: Pavel Machek <pavel@denx.de>
> Sent: 23 November 2020 19:52
> To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Cc: cip-dev@lists.cip-project.org; Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek
> <pavel@denx.de>; Biju Das <biju.das.jz@bp.renesas.com>
> Subject: Re: [PATCH 4.19.y-cip 7/7] spi: add Renesas RPC-IF driver
>
> Hi!
>
> > commit eb8d6d464a27850498dced21a8450e85d4a02009 upstream.
> >
> > Add the SPI 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.
> > We only implement the 'spi-mem' interface -- there's no need to implement
> > the usual SPI driver methods...
> >
> > Based on the original patch by Mason Yang <masonccyang@mxic.com.tw>.
> >
> > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> > Link: https://lore.kernel.org/r/1ece0e6c-71af-f0f1-709e-571f4b0b4853@cogentembedded.com
> > Signed-off-by: Mark Brown <broonie@kernel.org>
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > ---
> > drivers/spi/Kconfig | 6 ++
> > drivers/spi/Makefile | 1 +
> > drivers/spi/spi-rpc-if.c | 216 +++++++++++++++++++++++++++++++++++++++
> > 3 files changed, 223 insertions(+)
> > create mode 100644 drivers/spi/spi-rpc-if.c
> >
> > diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> > index 0a7fd56c1ed9..461315967f96 100644
> > --- a/drivers/spi/Kconfig
> > +++ b/drivers/spi/Kconfig
> > @@ -514,6 +514,12 @@ config SPI_RB4XX
> > help
> > SPI controller driver for the Mikrotik RB4xx series boards.
> >
> > +config SPI_RPCIF
> > + tristate "Renesas RPC-IF SPI driver"
> > + depends on RENESAS_RPCIF
> > + help
> > + SPI driver for Renesas R-Car Gen3 RPC-IF.
>
> Few lines here explaining the acronyms etc. would be nice.
>
Will do.
> > + error = spi_register_controller(ctlr);
> > + if (error) {
> > + dev_err(&pdev->dev, "spi_register_controller failed\n");
> > + goto err_put_ctlr;
> > + }
> > + return 0;
> > +
> > +err_put_ctlr:
> > + rpcif_disable_rpm(rpc);
> > + spi_controller_put(ctlr);
> > +
> > + return error;
> > +}
>
> With just one user of the error exit, I'd avoid the goto.
>
Agreed shall fix that.
> > +#ifdef CONFIG_PM_SLEEP
> > +static int rpcif_spi_suspend(struct device *dev)
> > +{
> > + struct spi_controller *ctlr = dev_get_drvdata(dev);
> > +
> > + return spi_controller_suspend(ctlr);
> > +}
> > +
> > +static int rpcif_spi_resume(struct device *dev)
> > +{
> > + struct spi_controller *ctlr = dev_get_drvdata(dev);
> > +
> > + return spi_controller_resume(ctlr);
> > +}
> > +
> > +static SIMPLE_DEV_PM_OPS(rpcif_spi_pm_ops, rpcif_spi_suspend, rpcif_spi_resume);
> > +#define DEV_PM_OPS (&rpcif_spi_pm_ops)
> > +#else
> > +#define DEV_PM_OPS NULL
> > +#endif
> > +
> > +static struct platform_driver rpcif_spi_driver = {
> > + .probe = rpcif_spi_probe,
> > + .remove = rpcif_spi_remove,
> > + .driver = {
> > + .name = "rpc-if-spi",
> > + .pm = DEV_PM_OPS,
> > + },
> > +};
>
> Can you just add "__maybe_unused" annotation and avoid the ifdefs,
> like atmel-quadspi.c does?
>
Agreed will replace that.
Cheers,
Prabhakar
> Best regards,
> Pavel
> --
> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5836): https://lists.cip-project.org/g/cip-dev/message/5836
Mute This Topic: https://lists.cip-project.org/mt/78451549/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 0/7] Add RPC-IF driver for RZ/G2x SoC's
[not found] <164A217D4ABC0430.14225@lists.cip-project.org>
@ 2020-11-23 12:08 ` Lad Prabhakar
0 siblings, 0 replies; 20+ messages in thread
From: Lad Prabhakar @ 2020-11-23 12:08 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
[-- Attachment #1: Type: text/plain, Size: 4149 bytes --]
Hi,
> -----Original Message-----
> From: cip-dev@lists.cip-project.org <cip-dev@lists.cip-project.org> On Behalf Of Lad Prabhakar via
> lists.cip-project.org
> Sent: 23 November 2020 12:04
> To: cip-dev@lists.cip-project.org; Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek
> <pavel@denx.de>
> Cc: Biju Das <biju.das.jz@bp.renesas.com>
> Subject: [cip-dev] [PATCH 4.19.y-cip 0/7] Add RPC-IF driver for RZ/G2x SoC's
>
> Hi Nobuhiro, Pavel,
>
> This patch series adds SPI driver for the Renesas RPC-IF.
> Alongside relevant changes for spi-mem have been also
> backported. This enables accessing SPI flash chip connected
> to RPC-IF on RZ/G2x boards.
>
> We currently only aim to backport just the driver hence there
> are no changes to dts/i files. The driver has been tested on
> RZ/G2{EM} (I shall reply to this e-mail with the results) with
> all the required dts/i changes [1].
>
Attached are the test results for RZ/G2{EM}.
Cheers,
Prabhakar
> Currently we are upstreaming clock [2] and pinctrl [3] changes
> required for RPC-IF interface on RZ/G2x SoC's once that hits
> v5.11 we shall backport it.
>
> All the patches have been cherry picked from Linux 5.9-rc5.
>
> [1]
> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fprabhakarlad%2Fcip%2Fco
> mmits%2Fmaster&data=04%7C01%7Cprabhakar.mahadev-
> lad.rj%40bp.renesas.com%7C8e71f2e5942e45872a1108d88fa7dd65%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%
> 7C637417298430851440%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXV
> CI6Mn0%3D%7C1000&sdata=DZWkJ8%2FDxbajvUrYyXqmCbZupzJVlbp4X4Uv41ziYDg%3D&reserved=0
> [2]
> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.kernel.org%2Fproject%2Flin
> ux-renesas-soc%2Flist%2F%3Fseries%3D365697&data=04%7C01%7Cprabhakar.mahadev-
> lad.rj%40bp.renesas.com%7C8e71f2e5942e45872a1108d88fa7dd65%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%
> 7C637417298430861437%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXV
> CI6Mn0%3D%7C1000&sdata=vXiHtwxTw2n7Bdug0YuaGoz%2FojdV4i2LW60ahxdvndU%3D&reserved=0
> [3]
> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.kernel.org%2Fproject%2Flin
> ux-renesas-soc%2Flist%2F%3Fseries%3D387535&data=04%7C01%7Cprabhakar.mahadev-
> lad.rj%40bp.renesas.com%7C8e71f2e5942e45872a1108d88fa7dd65%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%
> 7C637417298430861437%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXV
> CI6Mn0%3D%7C1000&sdata=CSlWNaoxlVedSnTXGQuZeZ2rNap1p8YQcA5VrnDfFbM%3D&reserved=0
>
> Cheers,
> Prabhakar
>
> Boris Brezillon (3):
> spi: spi-mem: Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum
> spi: spi-mem: Split spi_mem_exec_op() code
> spi: spi-mem: Add a new API to support direct mapping
>
> Naga Sureshkumar Relli (1):
> spi: spi-mem: export spi_mem_default_supports_op()
>
> Sergei Shtylyov (3):
> dt-bindings: memory: document Renesas RPC-IF bindings
> memory: add Renesas RPC-IF driver
> spi: add Renesas RPC-IF driver
>
> .../memory-controllers/renesas,rpc-if.yaml | 88 +++
> drivers/memory/Kconfig | 9 +
> drivers/memory/Makefile | 1 +
> drivers/memory/renesas-rpc-if.c | 603 ++++++++++++++++++
> drivers/spi/Kconfig | 6 +
> drivers/spi/Makefile | 1 +
> drivers/spi/spi-mem.c | 273 +++++++-
> drivers/spi/spi-rpc-if.c | 216 +++++++
> include/linux/spi/spi-mem.h | 93 +++
> include/memory/renesas-rpc-if.h | 87 +++
> 10 files changed, 1353 insertions(+), 24 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/memory-controllers/renesas,rpc-if.yaml
> create mode 100644 drivers/memory/renesas-rpc-if.c
> create mode 100644 drivers/spi/spi-rpc-if.c
> create mode 100644 include/memory/renesas-rpc-if.h
>
> --
> 2.17.1
[-- Attachment #2: g2e.txt --]
[-- Type: text/plain, Size: 43370 bytes --]
NOTICE: BL2: RZ/G2 Initial Program Loader(CA53) Rev.2.0.6
NOTICE: BL2: PRR is RZ/G2E Ver.1.0
NOTICE: BL2: PLL1 nonSSCG Clock select
NOTICE: BL2: Board is EK874 RZ/G2E Rev.1.0
NOTICE: BL2: Boot device is QSPI Flash(40MHz)
NOTICE: BL2: LCM state is CM
NOTICE: BL2: DDR1856(rev.0.12)
NOTICE: BL2: [COLD_BOOT]
NOTICE: BL2: DRAM Split is OFF
NOTICE: BL2: QoS is default setting(rev.0.05)
NOTICE: BL2: DRAM refresh interval 3.9 usec
NOTICE: BL2: CH0: 400000000 - 47fffffff, 2 GiB
NOTICE: BL2: FDT at 0xe63138a0
NOTICE: BL2: v2.3(release):v2.4-rc0-11-ge7eff9951
NOTICE: BL2: Built : 16:38:43, Nov 17 2020
NOTICE: BL2: Normal boot
NOTICE: BL2: dst=0xe6313000 src=0x8180000 len=512(0x200)
NOTICE: BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
NOTICE: rcar_file_len: len: 0x0003e000
NOTICE: BL2: dst=0x44000000 src=0x81c0000 len=253952(0x3e000)
NOTICE: rcar_file_len: len: 0x00100000
NOTICE: BL2: dst=0x50000000 src=0x8300000 len=1048576(0x100000)
NOTICE: BL2: Booting BL31
U-Boot 2021.01-rc2-g4ed00b6491 (Nov 18 2020 - 09:15:12 +0000)
CPU: Renesas Electronics R8A774C0 rev 1.0
Model: Silicon Linux RZ/G2E evaluation kit EK874 (CAT874 + CAT875)
DRAM: 1.9 GiB
MMC: mmc@ee100000: 0
Loading Environment from SPIFlash... SF: Detected w25m512jv with page size 256 Bytes, erase size 4 KiB, total 64 MiB
OK
In: serial@e6e88000
Out: serial@e6e88000
Err: serial@e6e88000
Net: eth0: ethernet@e6800000
Hit any key to stop autoboot: 0
ethernet@e6800000 Waiting for PHY auto negotiation to complete...... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.10.139 (1277 ms)
Using ethernet@e6800000 device
TFTP from server 192.168.10.1; our IP address is 192.168.10.139
Filename 'mipi/Image.gz'.
Load address: 0x4a080000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############################################
2.1 MiB/s
done
Bytes transferred = 7353744 (703590 hex)
Using ethernet@e6800000 device
TFTP from server 192.168.10.1; our IP address is 192.168.10.139
Filename 'mipi/r8a774c0-ek874.dtb'.
Load address: 0x48000000
Loading: ###
1.6 MiB/s
done
Bytes transferred = 43400 (a988 hex)
Uncompressed size: 16368128 = 0xF9C200
## Flattened Device Tree blob at 48000000
Booting using the fdt blob at 0x48000000
Using Device Tree in place at 0000000048000000, end 000000004800d987
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 4.19.157-cip38+ (prasmi@prasmi) (gcc version 7.5.0 (Linaro GCC 7.5-2019.12)) #38 SMP PREEMPT Fri Nov 20 09:55:31 0
[ 0.000000] Machine model: Silicon Linux RZ/G2E evaluation kit EK874 (CAT874 + CAT875)
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 96 MiB at 0x00000000ba000000
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.0
[ 0.000000] random: get_random_bytes called from start_kernel+0xac/0x480 with crng_init=0
[ 0.000000] percpu: Embedded 24 pages/cpu s61256 r8192 d28856 u98304
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 483840
[ 0.000000] Kernel command line: root=/dev/nfs rw nfsroot=192.168.10.1:/mnt/mipig2e,vers=4.1,tcp ip=dhcp cma=96M
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Memory: 1802876K/1966080K available (10428K kernel code, 1200K rwdata, 3588K rodata, 704K init, 12240K bss, 64900K reserved, 98)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] Running RCU self tests
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU lockdep checking is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000240] Console: colour dummy device 80x25
[ 0.001810] console [tty0] enabled
[ 0.001852] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[ 0.001919] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.001960] ... MAX_LOCK_DEPTH: 48
[ 0.002002] ... MAX_LOCKDEP_KEYS: 8191
[ 0.002044] ... CLASSHASH_SIZE: 4096
[ 0.002087] ... MAX_LOCKDEP_ENTRIES: 32768
[ 0.002130] ... MAX_LOCKDEP_CHAINS: 65536
[ 0.002173] ... CHAINHASH_SIZE: 32768
[ 0.002217] memory used by lock dependency info: 7391 kB
[ 0.002266] per task-struct memory footprint: 1920 bytes
[ 0.002387] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.002479] pid_max: default: 32768 minimum: 301
[ 0.002849] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.002918] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.007096] ASID allocator initialised with 32768 entries
[ 0.007561] rcu: Hierarchical SRCU implementation.
[ 0.009400] Detected Renesas RZ/G2 r8a774c0 ES1.0
[ 0.010228] EFI services will not be available.
[ 0.010966] smp: Bringing up secondary CPUs ...
[ 0.012688] Detected VIPT I-cache on CPU1
[ 0.012801] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.013331] smp: Brought up 1 node, 2 CPUs
[ 0.013507] SMP: Total of 2 processors activated.
[ 0.013565] CPU features: detected: 32-bit EL0 Support
[ 0.014556] CPU: All CPU(s) started at EL1
[ 0.014641] alternatives: patching kernel code
[ 0.018029] devtmpfs: initialized
[ 0.041608] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.041774] futex hash table entries: 512 (order: 4, 65536 bytes)
[ 0.045405] pinctrl core: initialized pinctrl subsystem
[ 0.047638] DMI not present or invalid.
[ 0.048929] NET: Registered protocol family 16
[ 0.050067] audit: initializing netlink subsys (disabled)
[ 0.050729] audit: type=2000 audit(0.048:1): state=initialized audit_enabled=0 res=1
[ 0.052301] cpuidle: using governor menu
[ 0.052855] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.055991] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.062009] sh-pfc e6060000.pin-controller: r8a774c0_pfc support registered
[ 0.110264] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.111935] cryptd: max_cpu_qlen set to 1000
[ 0.122245] vgaarb: loaded
[ 0.122951] SCSI subsystem initialized
[ 0.124307] usbcore: registered new interface driver usbfs
[ 0.124505] usbcore: registered new interface driver hub
[ 0.124763] usbcore: registered new device driver usb
[ 0.126669] media: Linux media interface: v0.10
[ 0.126790] videodev: Linux video capture interface: v2.00
[ 0.127025] pps_core: LinuxPPS API ver. 1 registered
[ 0.127081] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.127194] PTP clock support registered
[ 0.127286] EDAC MC: Ver: 3.0.0
[ 0.130066] Advanced Linux Sound Architecture Driver Initialized.
[ 0.132628] clocksource: Switched to clocksource arch_sys_counter
[ 0.279619] VFS: Disk quotas dquot_6.6.0
[ 0.279840] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.299058] NET: Registered protocol family 2
[ 0.301174] tcp_listen_portaddr_hash hash table entries: 1024 (order: 4, 73728 bytes)
[ 0.301434] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.301640] TCP bind hash table entries: 16384 (order: 8, 1048576 bytes)
[ 0.303231] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.304111] UDP hash table entries: 1024 (order: 5, 163840 bytes)
[ 0.304450] UDP-Lite hash table entries: 1024 (order: 5, 163840 bytes)
[ 0.305443] NET: Registered protocol family 1
[ 0.307612] RPC: Registered named UNIX socket transport module.
[ 0.307733] RPC: Registered udp transport module.
[ 0.307787] RPC: Registered tcp transport module.
[ 0.307840] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.310230] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 0.311022] kvm [1]: HYP mode not available
[ 0.322402] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[ 0.341892] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.344005] NFS: Registering the id_resolver key type
[ 0.344325] Key type id_resolver registered
[ 0.344399] Key type id_legacy registered
[ 0.344474] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.353146] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 0.353593] io scheduler noop registered
[ 0.353648] io scheduler deadline registered
[ 0.354110] io scheduler cfq registered (default)
[ 0.354170] io scheduler mq-deadline registered
[ 0.354224] io scheduler kyber registered
[ 0.362859] gpio_rcar e6050000.gpio: driving 18 GPIOs
[ 0.364122] gpio_rcar e6051000.gpio: driving 23 GPIOs
[ 0.365422] gpio_rcar e6052000.gpio: driving 26 GPIOs
[ 0.366504] gpio_rcar e6053000.gpio: driving 16 GPIOs
[ 0.367538] gpio_rcar e6054000.gpio: driving 11 GPIOs
[ 0.368529] gpio_rcar e6055000.gpio: driving 20 GPIOs
[ 0.369841] gpio_rcar e6055400.gpio: driving 18 GPIOs
[ 0.371818] rcar-pcie fe000000.pcie: host bridge /soc/pcie@fe000000 ranges:
[ 0.371968] rcar-pcie fe000000.pcie: IO 0xfe100000..0xfe1fffff -> 0x00000000
[ 0.372434] rcar-pcie fe000000.pcie: MEM 0xfe200000..0xfe3fffff -> 0xfe200000
[ 0.372548] rcar-pcie fe000000.pcie: MEM 0x30000000..0x37ffffff -> 0x30000000
[ 0.372756] rcar-pcie fe000000.pcie: MEM 0x38000000..0x3fffffff -> 0x38000000
[ 0.425797] rcar-pcie fe000000.pcie: PCIe link down
[ 0.538289] SuperH (H)SCI(F) driver initialized
[ 0.540274] e6560000.serial: ttySC1 at MMIO 0xe6560000 (irq = 26, base_baud = 0) is a hscif
[ 0.542773] e6e88000.serial: ttySC0 at MMIO 0xe6e88000 (irq = 109, base_baud = 0) is a scif
[ 1.293149] console [ttySC0] enabled
[ 1.302312] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.309183] [drm] No driver support for vblank timestamp query.
[ 1.345551] loop: module loaded
[ 1.355641] libphy: Fixed MDIO Bus: probed
[ 1.361112] tun: Universal TUN/TAP device driver, 1.6
[ 1.367324] CAN device driver interface
[ 1.373956] rcar_can e6c30000.can: device registered (IRQ107)
[ 1.381776] rcar_can e6c38000.can: device registered (IRQ108)
[ 1.390949] VFIO - User Level meta-driver version: 0.3
[ 1.396840] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.403506] ehci-pci: EHCI PCI platform driver
[ 1.408175] ehci-platform: EHCI generic platform driver
[ 1.441444] ehci-platform ee080100.usb: EHCI Host Controller
[ 1.447517] ehci-platform ee080100.usb: new USB bus registered, assigned bus number 1
[ 1.456872] ehci-platform ee080100.usb: irq 129, io mem 0xee080100
[ 1.476706] ehci-platform ee080100.usb: USB 2.0 started, EHCI 1.10
[ 1.486366] hub 1-0:1.0: USB hub found
[ 1.490519] hub 1-0:1.0: 1 port detected
[ 1.496872] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.503313] ohci-pci: OHCI PCI platform driver
[ 1.507982] ohci-platform: OHCI generic platform driver
[ 1.514208] ohci-platform ee080000.usb: Generic Platform OHCI controller
[ 1.521112] ohci-platform ee080000.usb: new USB bus registered, assigned bus number 2
[ 1.529694] ohci-platform ee080000.usb: irq 129, io mem 0xee080000
[ 1.625098] hub 2-0:1.0: USB hub found
[ 1.629078] hub 2-0:1.0: 1 port detected
[ 1.635828] xhci-hcd ee000000.usb: xHCI Host Controller
[ 1.641271] xhci-hcd ee000000.usb: new USB bus registered, assigned bus number 3
[ 1.664909] xhci-hcd ee000000.usb: hcc params 0x014051ce hci version 0x100 quirks 0x0000000000830410
[ 1.674345] xhci-hcd ee000000.usb: irq 127, io mem 0xee000000
[ 1.682847] hub 3-0:1.0: USB hub found
[ 1.687324] hub 3-0:1.0: 1 port detected
[ 1.692395] xhci-hcd ee000000.usb: xHCI Host Controller
[ 1.697785] xhci-hcd ee000000.usb: new USB bus registered, assigned bus number 4
[ 1.705430] xhci-hcd ee000000.usb: Host supports USB 3.0 SuperSpeed
[ 1.712111] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[ 1.722391] hub 4-0:1.0: USB hub found
[ 1.726385] hub 4-0:1.0: 1 port detected
[ 1.731996] usbcore: registered new interface driver usb-storage
[ 1.743555] renesas_usb3 ee020000.usb: probed
[ 1.749998] i2c /dev entries driver
[ 1.763922] hd3ss3220 0-0047: probed revision=0x2
[ 1.828935] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 1.902429] tda998x 0-0070: found TDA19988
[ 1.915730] i2c-rcar e6500000.i2c: probed
[ 1.923846] rtc-rx8581 1-0032: low voltage detected, date/time is not reliable.
[ 1.932094] rtc-rx8581 1-0032: registered as rtc0
[ 1.938129] i2c-rcar e6508000.i2c: probed
[ 1.952928] rcar_thermal e6190000.thermal: 1 sensor probed
[ 1.971314] renesas_sdhi_internal_dmac ee100000.mmc: Got CD GPIO
[ 1.978485] renesas_sdhi_internal_dmac ee100000.mmc: Linked as a consumer to regulator.2
[ 1.987406] renesas_sdhi_internal_dmac ee100000.mmc: Dropping the link to regulator.2
[ 1.998028] hub 1-1:1.0: USB hub found
[ 2.002485] hub 1-1:1.0: 4 ports detected
[ 2.006793] ledtrig-cpu: registered to indicate activity on CPUs
[ 2.015949] usbcore: registered new interface driver usbhid
[ 2.021793] usbhid: USB HID core driver
[ 2.039696] m25p80 spi0.0: w25m512jv (32768 Kbytes)
[ 2.045107] 8 fixed-partitions partitions found on MTD device spi0.0
[ 2.051595] Creating 8 MTD partitions on "spi0.0":
[ 2.056500] 0x000000000000-0x000000040000 : "bootparam"
[ 2.066945] 0x000000040000-0x000000080000 : "bl2"
[ 2.074373] 0x000000180000-0x0000001c0000 : "cert_header_sa6"
[ 2.082550] 0x0000001c0000-0x000000620000 : "bl31"
[ 2.089949] 0x000000200000-0x000000660000 : "tee"
[ 2.097218] 0x000000300000-0x0000003c0000 : "uboot"
[ 2.104376] 0x0000003f0000-0x000000400000 : "uboot-env"
[ 2.112275] 0x000000400000-0x000002000000 : "user"
[ 2.139214] NET: Registered protocol family 17
[ 2.143897] can: controller area network core (rev 20170425 abi 9)
[ 2.150482] NET: Registered protocol family 29
[ 2.155093] can: raw protocol (rev 20170425)
[ 2.159923] can: broadcast manager protocol (rev 20170425 t)
[ 2.165727] can: netlink gateway (rev 20170425) max_hops=1
[ 2.172298] Key type dns_resolver registered
[ 2.178429] registered taskstats version 1
[ 2.224800] renesas_irqc e61c0000.interrupt-controller: driving 6 irqs
[ 2.238619] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.245510] [drm] No driver support for vblank timestamp query.
[ 2.261446] renesas_sdhi_internal_dmac ee100000.mmc: Got CD GPIO
[ 2.268464] renesas_sdhi_internal_dmac ee100000.mmc: Linked as a consumer to regulator.2
[ 2.277085] renesas_sdhi_internal_dmac ee100000.mmc: Linked as a consumer to regulator.4
[ 2.337300] renesas_sdhi_internal_dmac ee100000.mmc: mmc0 base at 0xee100000 max clock rate 200 MHz
[ 2.348808] renesas_sdhi_internal_dmac ee160000.mmc: Linked as a consumer to regulator.3
[ 2.483025] renesas_sdhi_internal_dmac ee160000.mmc: mmc1 base at 0xee160000 max clock rate 200 MHz
[ 2.510315] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.517151] [drm] No driver support for vblank timestamp query.
[ 2.545210] rcar-dmac e6700000.dma-controller: ignoring dependency for device, assuming no driver
[ 2.566081] rcar-dmac e7300000.dma-controller: ignoring dependency for device, assuming no driver
[ 2.576762] renesas_sdhi_internal_dmac ee160000.mmc: card claims to support voltages below defined range
[ 2.595870] rcar-dmac e7310000.dma-controller: ignoring dependency for device, assuming no driver
[ 2.609028] random: fast init done
[ 2.620277] rcar-dmac ec700000.dma-controller: ignoring dependency for device, assuming no driver
[ 2.641977] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.648807] [drm] No driver support for vblank timestamp query.
[ 2.656833] ravb e6800000.ethernet: ignoring dependency for device, assuming no driver
[ 2.669165] libphy: ravb_mii: probed
[ 2.681299] ravb e6800000.ethernet eth0: Base address at 0xe6800000, 40:21:9e:a8:28:11, IRQ 104.
[ 2.691153] rcar-fcp fe96f000.fcp: ignoring dependency for device, assuming no driver
[ 2.699967] rcar-fcp fea27000.fcp: ignoring dependency for device, assuming no driver
[ 2.708805] rcar-fcp fea2f000.fcp: ignoring dependency for device, assuming no driver
[ 2.717552] rcar-fcp fe9af000.fcp: ignoring dependency for device, assuming no driver
[ 2.775850] rcar_sound ec500000.sound: probed
[ 2.782370] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.789185] [drm] No driver support for vblank timestamp query.
[ 2.801454] [drm] Initialized rcar-du 1.0.0 20130110 for feb00000.display on minor 0
[ 2.809488] [drm] Device feb00000.display probed
[ 2.816683] [drm] Cannot find any crtc or sizes
[ 2.827555] [drm] Cannot find any crtc or sizes
[ 2.832934] asoc-simple-card sound: i2s-hifi <-> ec500000.sound mapping ok
[ 2.840078] asoc-simple-card sound: ASoC: no DMI vendor name!
[ 2.855528] rtc-rx8581 1-0032: low voltage detected, date/time is not reliable.
[ 2.863226] rtc-rx8581 1-0032: hctosys: unable to read the hardware clock
[ 2.874088] mmc1: new high speed SDIO card at address 0001
[ 2.889789] RTL8211E Gigabit Ethernet e6800000.ethernet-ffffffff:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=e680)
[ 5.752810] ravb e6800000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 5.780733] Sending DHCP requests .., OK
[ 8.600865] IP-Config: Got DHCP answer from 192.168.10.1, my address is 192.168.10.139
[ 8.608936] IP-Config: Complete:
[ 8.612210] device=eth0, hwaddr=40:21:9e:a8:28:11, ipaddr=192.168.10.139, mask=255.255.255.0, gw=192.168.10.1
[ 8.622715] host=192.168.10.139, domain=example.org, nis-domain=(none)
[ 8.629802] bootserver=192.168.10.1, rootserver=192.168.10.1, rootpath=
[ 8.629808] nameserver0=192.168.10.1
[ 8.642636] ALSA device list:
[ 8.645840] #0: CAT874 HDMI sound
[ 8.735899] VFS: Mounted root (nfs4 filesystem) on device 0:17.
[ 8.747943] devtmpfs: mounted
[ 8.752009] Freeing unused kernel memory: 704K
[ 8.757534] Run /sbin/init as init process
[ 9.350277] systemd[1]: System time before build time, advancing clock.
[ 9.519886] systemd[1]: systemd 234 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCR)
[ 9.542740] systemd[1]: Detected architecture arm64.
Welcome to Poky (Yocto Project Reference Distro) 2.4.3 (rocko)!
[ 9.578842] systemd[1]: Set hostname to <ek874>.
[ 11.308743] random: systemd: uninitialized urandom read (16 bytes read)
[ 11.319183] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ 11.345248] random: systemd: uninitialized urandom read (16 bytes read)
[ 11.355514] systemd[1]: Listening on udev Control Socket.
[ OK ] Listening on udev Control Socket.
[ 11.377205] random: systemd: uninitialized urandom read (16 bytes read)
[ 11.385585] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Started Dispatch Password Requests to Console Directory Watch.
[ 11.415583] systemd[1]: Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket (/dev/log).
[ 11.438001] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ 11.465183] systemd[1]: Reached target Paths.
[ OK ] Reached target Paths.
[ 11.485175] systemd[1]: Reached target Swap.
[ OK ] Reached target Swap.
[ OK ] Reached target Remote File Systems.
[ OK ] Listening on udev Kernel Socket.
[ OK ] Reached target Host and Network Name Lookups.
[ OK ] Listening on Journal Audit Socket.
[ OK ] Created slice User and Session Slice.
[ OK ] Listening on Network Service Netlink Socket.
[ OK ] Created slice System Slice.
Mounting Temporary Directory (/tmp)...
Mounting Kernel Debug File System...
Mounting Huge Pages File System...
Mounting POSIX Message Queue File System...
[ OK ] Reached target Slices.
[ OK ] Created slice system-getty.slice.
[ OK ] Created slice system-serial\x2dgetty.slice.
[ OK ] Listening on Journal Socket.
Starting Load Kernel Modules...
Starting Remount Root and Kernel File Systems...
Starting Journal Service...
[ OK ] Mounted Kernel Debug File System.
[ OK ] Mounted POSIX Message Queue File System.
[ OK ] Mounted Huge Pages File System.
[ OK ] Mounted Temporary Directory (/tmp).
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[ OK ] Started Remount Root and Kernel File Systems.
Starting udev Coldplug all Devices...
Starting Create Static Device Nodes in /dev...
Starting Apply Kernel Variables...
Mounting Kernel Configuration File System...
[ OK ] Started Journal Service.
[ OK ] Started Apply Kernel Variables.
[ OK ] Mounted Kernel Configuration File System.
Starting Flush Journal to Persistent Storage...
[ OK ] Started Create Static Device Nodes in /dev.
Starting udev Kernel Device Manager...
[ OK ] Reached target Local File Systems (Pre).
Mounting /var/volatile...
[ 13.023160] systemd-journald[196]: Received request to flush runtime journal from PID 1
[ OK ] Mounted /var/volatile.
[ OK ] Started Flush Journal to Persistent Storage.
Starting Load/Save Random Seed...
[ OK ] Reached target Local File Systems.
Starting Create Volatile Files and Directories...
[ OK ] Started Load/Save Random Seed.
[ OK ] Started udev Kernel Device Manager.
[ OK ] Started Create Volatile Files and Directories.
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Started udev Coldplug all Devices.
[ OK ] Reached target System Initialization.
[ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Listening on RPCbind Server Activation Socket.
Starting Network Service...
[ OK ] Started dnf-automatic-notifyonly timer.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Started dnf makecache timer.
[ OK ] Started dnf-automatic-install timer.
[ OK ] Started dnf-automatic-download timer.
[ OK ] Reached target Timers.
[ OK ] Listening on dropbear.socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting Login Service...
[ OK ] Started Bluetooth Audio ALSA Backend.
[ OK ] Started optee services.
[ OK ] Started D-Bus System Message Bus.
Starting Connection service...
Starting Avahi mDNS/DNS-SD Stack...
[ OK ] Reached target Containers.
Starting Telephony service...
Starting Save/Restore Sound Card State...
Starting PowerVR consumer services...
Starting pvrinit.service...
[ 17.291378] random: crng init done
[ 17.294925] random: 7 urandom warning(s) missed due to ratelimiting
[ 17.471423] rcar_sound ec500000.sound: Can't update kctrl when idle
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[FAILED] Failed to start Avahi mDNS/DNS-SD Stack.
See 'systemctl status avahi-daemon.service' for details.
[ OK ] Started Save/Restore Sound Card State.
[ OK ] Found device /dev/ttySC0.
[ OK ] Started PowerVR consumer services.
[ OK ] Started pvrinit.service.
[ OK ] Started Telephony service.
[ OK ] Started Connection service.
[ OK ] Started Login Service.
[ OK ] Stopped Network Service.
Starting Network Service...
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[ OK ] Stopped Network Service.
Starting Network Service...
[ OK ] Reached target Sound Card.
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[ OK ] Stopped Network Service.
[ 19.368576] rcar_sound ec500000.sound: Can't update kctrl when idle
Starting Network Service...
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[ OK ] Stopped Network Service.
Starting Network Service...
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[ OK ] Stopped Network Service.
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[ OK ] Reached target Network.
Starting Permit User Sessions...
Starting Target Communication Framework agent...
[ OK ] Started Permit User Sessions.
[ OK ] Started Getty on tty1.
[ OK ] Started Serial Getty on ttySC0.
[ OK ] Reached target Login Prompts.
[ OK ] Started Target Communication Framework agent.
[ OK ] Reached target Multi-User System.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Started Weston Wayland compositor.
[ OK ] Started Update UTMP about System Runlevel Changes.
[ 21.207022] audit: type=1006 audit(1580996707.852:2): pid=340 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=1 res=1
Poky (Yocto Project Reference Distro) 2.4.3 ek874 ttySC0
BSP: RZG2E/EK874/1.0.2
LSI: RZG2E
Version: 1.0.2
ek874 login: root
Last login: Thu Feb 6 13:45:07 UTC 2020 on tty2
amixer: Unable to find simple control 'DVC In',0
Simple mixer control 'DVC Out',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 8388607
Mono:
Front Left: Playback 1677722 [20%]
Front Right: Playback 1677722 [20%]
sed: no previous regexp
sed: no previous regexp
root@ek874:~#
root@ek874:~#
root@ek874:~# [ 39.912236] wlan-en-regulator: disabling
[ 39.916763] SDHI0 VccQ: disabling
root@ek874:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00001000 "bootparam"
mtd1: 00040000 00001000 "bl2"
mtd2: 00040000 00001000 "cert_header_sa6"
mtd3: 00460000 00001000 "bl31"
mtd4: 00460000 00001000 "tee"
mtd5: 000c0000 00001000 "uboot"
mtd6: 00010000 00001000 "uboot-env"
mtd7: 01c00000 00001000 "user"
root@ek874:~#
root@ek874:~# dmesg | grep spi
[ 2.039696] m25p80 spi0.0: w25m512jv (32768 Kbytes)
[ 2.045107] 8 fixed-partitions partitions found on MTD device spi0.0
[ 2.051595] Creating 8 MTD partitions on "spi0.0":
root@ek874:~#
root@ek874:~#
root@ek874:~# hexdump -C /dev/mtd6
00000000 bb 1d d3 0e 61 75 74 6f 6c 6f 61 64 3d 6e 6f 00 |....autoload=no.|
00000010 62 61 75 64 72 61 74 65 3d 31 31 35 32 30 30 00 |baudrate=115200.|
00000020 62 6f 6f 74 61 72 67 73 3d 72 6f 6f 74 3d 2f 64 |bootargs=root=/d|
00000030 65 76 2f 6e 66 73 20 72 77 20 6e 66 73 72 6f 6f |ev/nfs rw nfsroo|
00000040 74 3d 3a 2f 6d 6e 74 2f 67 32 65 2c 76 65 72 73 |t=:/mnt/g2e,vers|
00000050 3d 34 2e 31 2c 74 63 70 20 69 70 3d 64 68 63 70 |=4.1,tcp ip=dhcp|
00000060 20 63 6d 61 3d 39 36 4d 00 62 6f 6f 74 61 72 67 | cma=96M.bootarg|
00000070 73 2d 6e 66 73 2d 72 7a 2d 67 32 65 3d 73 65 74 |s-nfs-rz-g2e=set|
00000080 65 6e 76 20 62 6f 6f 74 61 72 67 73 20 72 77 20 |env bootargs rw |
00000090 72 6f 6f 74 3d 2f 64 65 76 2f 6e 66 73 20 6e 66 |root=/dev/nfs nf|
000000a0 73 72 6f 6f 74 3d 31 39 32 2e 31 36 38 2e 31 2e |sroot=192.168.1.|
000000b0 33 30 3a 2f 74 66 74 70 62 6f 6f 74 2f 52 5a 2d |30:/tftpboot/RZ-|
000000c0 47 32 45 20 69 70 3d 31 39 32 2e 31 36 38 2e 31 |G2E ip=192.168.1|
000000d0 2e 34 32 00 62 6f 6f 74 61 72 67 73 5f 6e 66 73 |.42.bootargs_nfs|
000000e0 3d 73 65 74 65 6e 76 20 62 6f 6f 74 61 72 67 73 |=setenv bootargs|
000000f0 20 63 6f 6e 73 6f 6c 65 3d 74 74 79 53 43 30 2c | console=ttySC0,|
00000100 31 31 35 32 30 30 6e 38 20 69 67 6e 6f 72 65 5f |115200n8 ignore_|
00000110 6c 6f 67 6c 65 76 65 6c 20 6e 66 73 72 6f 6f 74 |loglevel nfsroot|
00000120 64 65 62 75 67 20 72 6f 6f 74 3d 2f 64 65 76 2f |debug root=/dev/|
00000130 6e 66 73 20 72 77 20 6e 66 73 72 6f 6f 74 3d 24 |nfs rw nfsroot=$|
00000140 7b 73 65 72 76 65 72 69 70 7d 3a 2f 74 66 74 70 |{serverip}:/tftp|
00000150 62 6f 6f 74 2f 52 5a 2d 47 32 45 20 69 70 3d 64 |boot/RZ-G2E ip=d|
00000160 68 63 70 00 62 6f 6f 74 63 6d 64 3d 6d 64 20 30 |hcp.bootcmd=md 0|
00000170 78 65 36 31 35 30 32 33 38 3b 72 75 6e 20 70 72 |xe6150238;run pr|
00000180 61 5f 62 6f 6f 74 63 6d 64 00 62 6f 6f 74 63 6d |a_bootcmd.bootcm|
00000190 64 2d 6e 66 73 2d 72 7a 2d 67 32 65 3d 74 66 74 |d-nfs-rz-g2e=tft|
000001a0 70 20 30 78 34 38 30 38 30 30 30 30 20 52 5a 2d |p 0x48080000 RZ-|
000001b0 47 32 45 2f 62 6f 6f 74 2f 49 6d 61 67 65 3b 74 |G2E/boot/Image;t|
000001c0 66 74 70 20 30 78 34 38 30 30 30 30 30 30 20 52 |ftp 0x48000000 R|
000001d0 5a 2d 47 32 45 2f 62 6f 6f 74 2f 64 74 62 3b 62 |Z-G2E/boot/dtb;b|
000001e0 6f 6f 74 69 20 30 78 34 38 30 38 30 30 30 30 20 |ooti 0x48080000 |
000001f0 2d 20 30 78 34 38 30 30 30 30 30 30 00 62 6f 6f |- 0x48000000.boo|
00000200 74 63 6d 64 5f 6e 66 73 3d 72 75 6e 20 6e 65 74 |tcmd_nfs=run net|
00000210 77 6f 72 6b 3b 20 72 75 6e 20 62 6f 6f 74 61 72 |work; run bootar|
00000220 67 73 5f 6e 66 73 3b 20 74 66 74 70 20 30 78 34 |gs_nfs; tftp 0x4|
00000230 38 30 38 30 30 30 30 20 52 5a 2d 47 32 45 2f 62 |8080000 RZ-G2E/b|
00000240 6f 6f 74 2f 49 6d 61 67 65 3b 20 74 66 74 70 20 |oot/Image; tftp |
00000250 30 78 34 38 30 30 30 30 30 30 20 52 5a 2d 47 32 |0x48000000 RZ-G2|
00000260 45 2f 62 6f 6f 74 2f 64 74 62 3b 20 62 6f 6f 74 |E/boot/dtb; boot|
00000270 69 20 30 78 34 38 30 38 30 30 30 30 20 2d 20 30 |i 0x48080000 - 0|
00000280 78 34 38 30 30 30 30 30 30 00 62 6f 6f 74 63 6d |x48000000.bootcm|
00000290 64 5f 6f 72 69 67 69 6e 61 6c 3d 72 75 6e 20 62 |d_original=run b|
000002a0 6f 6f 74 61 72 67 73 2d 6e 66 73 2d 72 7a 2d 67 |ootargs-nfs-rz-g|
000002b0 32 65 3b 20 72 75 6e 20 62 6f 6f 74 63 6d 64 2d |2e; run bootcmd-|
000002c0 6e 66 73 2d 72 7a 2d 67 32 65 00 62 6f 6f 74 64 |nfs-rz-g2e.bootd|
000002d0 65 6c 61 79 3d 32 00 63 68 72 69 73 66 5f 62 6f |elay=2.chrisf_bo|
000002e0 6f 74 61 72 67 73 3d 73 65 74 65 6e 76 20 62 6f |otargs=setenv bo|
000002f0 6f 74 61 72 67 73 20 63 6f 6e 73 6f 6c 65 3d 74 |otargs console=t|
00000300 74 79 53 43 30 2c 31 31 35 32 30 30 6e 38 20 69 |tySC0,115200n8 i|
00000310 67 6e 6f 72 65 5f 6c 6f 67 6c 65 76 65 6c 20 6e |gnore_loglevel n|
00000320 66 73 72 6f 6f 74 64 65 62 75 67 20 72 6f 6f 74 |fsrootdebug root|
00000330 3d 2f 64 65 76 2f 6e 66 73 20 72 77 20 6e 66 73 |=/dev/nfs rw nfs|
00000340 72 6f 6f 74 3d 24 7b 73 65 72 76 65 72 69 70 7d |root=${serverip}|
00000350 3a 2f 74 66 74 70 62 6f 6f 74 2f 52 5a 2d 47 32 |:/tftpboot/RZ-G2|
00000360 45 2d 54 45 53 54 2c 6e 66 73 76 65 72 73 3d 33 |E-TEST,nfsvers=3|
00000370 20 69 70 3d 64 68 63 70 20 63 6d 61 3d 39 36 4d | ip=dhcp cma=96M|
00000380 00 63 68 72 69 73 66 5f 62 6f 6f 74 63 6d 64 3d |.chrisf_bootcmd=|
00000390 72 75 6e 20 63 68 72 69 73 66 5f 6e 65 74 77 6f |run chrisf_netwo|
000003a0 72 6b 3b 72 75 6e 20 63 68 72 69 73 66 5f 62 6f |rk;run chrisf_bo|
000003b0 6f 74 61 72 67 73 3b 74 66 74 70 62 6f 6f 74 20 |otargs;tftpboot |
000003c0 24 7b 63 68 72 69 73 66 5f 6b 65 72 6e 65 6c 5f |${chrisf_kernel_|
000003d0 61 64 64 72 7d 20 24 7b 63 68 72 69 73 66 5f 6b |addr} ${chrisf_k|
000003e0 65 72 6e 65 6c 7d 3b 74 66 74 70 62 6f 6f 74 20 |ernel};tftpboot |
000003f0 24 7b 63 68 72 69 73 66 5f 66 64 74 5f 61 64 64 |${chrisf_fdt_add|
00000400 72 7d 20 24 7b 63 68 72 69 73 66 5f 66 64 74 5f |r} ${chrisf_fdt_|
00000410 66 69 6c 65 7d 3b 62 6f 6f 74 69 20 24 7b 63 68 |file};booti ${ch|
00000420 72 69 73 66 5f 6b 65 72 6e 65 6c 5f 61 64 64 72 |risf_kernel_addr|
00000430 7d 20 2d 20 24 7b 63 68 72 69 73 66 5f 66 64 74 |} - ${chrisf_fdt|
00000440 5f 61 64 64 72 7d 00 63 68 72 69 73 66 5f 66 64 |_addr}.chrisf_fd|
00000450 74 5f 61 64 64 72 3d 30 78 34 38 30 30 30 30 30 |t_addr=0x4800000|
00000460 30 00 63 68 72 69 73 66 5f 66 64 74 5f 66 69 6c |0.chrisf_fdt_fil|
00000470 65 3d 52 5a 2d 47 32 45 2d 54 45 53 54 2f 49 6d |e=RZ-G2E-TEST/Im|
00000480 61 67 65 2d 72 38 61 37 37 34 63 30 2d 65 6b 38 |age-r8a774c0-ek8|
00000490 37 34 2e 64 74 62 00 63 68 72 69 73 66 5f 6b 65 |74.dtb.chrisf_ke|
000004a0 72 6e 65 6c 3d 52 5a 2d 47 32 45 2d 54 45 53 54 |rnel=RZ-G2E-TEST|
000004b0 2f 49 6d 61 67 65 2d 65 6b 38 37 34 2e 62 69 6e |/Image-ek874.bin|
000004c0 00 63 68 72 69 73 66 5f 6b 65 72 6e 65 6c 5f 61 |.chrisf_kernel_a|
000004d0 64 64 72 3d 30 78 34 38 30 38 30 30 30 30 00 63 |ddr=0x48080000.c|
000004e0 68 72 69 73 66 5f 6e 65 74 77 6f 72 6b 3d 73 65 |hrisf_network=se|
000004f0 74 65 6e 76 20 73 65 72 76 65 72 69 70 20 31 39 |tenv serverip 19|
00000500 32 2e 31 36 38 2e 31 2e 33 30 3b 20 73 65 74 65 |2.168.1.30; sete|
00000510 6e 76 20 61 75 74 6f 6c 6f 61 64 20 6e 6f 3b 20 |nv autoload no; |
00000520 64 68 63 70 00 63 68 72 69 73 66 5f 73 64 5f 62 |dhcp.chrisf_sd_b|
00000530 6f 6f 74 61 72 67 73 3d 73 65 74 65 6e 76 20 62 |ootargs=setenv b|
00000540 6f 6f 74 61 72 67 73 20 63 6f 6e 73 6f 6c 65 3d |ootargs console=|
00000550 74 74 79 53 43 30 2c 31 31 35 32 30 30 6e 38 20 |ttySC0,115200n8 |
00000560 69 67 6e 6f 72 65 5f 6c 6f 67 6c 65 76 65 6c 20 |ignore_loglevel |
00000570 72 6f 6f 74 3d 2f 64 65 76 2f 6d 6d 63 62 6c 6b |root=/dev/mmcblk|
00000580 30 70 31 20 72 6f 6f 74 77 61 69 74 20 72 77 00 |0p1 rootwait rw.|
00000590 63 68 72 69 73 66 5f 73 64 5f 62 6f 6f 74 63 6d |chrisf_sd_bootcm|
000005a0 64 3d 72 75 6e 20 63 68 72 69 73 66 5f 73 64 5f |d=run chrisf_sd_|
000005b0 62 6f 6f 74 61 72 67 73 3b 65 78 74 34 6c 6f 61 |bootargs;ext4loa|
000005c0 64 20 6d 6d 63 20 30 3a 31 20 30 78 34 38 30 38 |d mmc 0:1 0x4808|
000005d0 30 30 30 30 20 49 6d 61 67 65 2d 65 6b 38 37 34 |0000 Image-ek874|
000005e0 2e 62 69 6e 3b 20 65 78 74 34 6c 6f 61 64 20 6d |.bin; ext4load m|
000005f0 6d 63 20 30 3a 31 20 30 78 34 38 30 30 30 30 30 |mc 0:1 0x4800000|
00000600 30 20 49 6d 61 67 65 2d 72 38 61 37 37 34 63 30 |0 Image-r8a774c0|
00000610 2d 65 6b 38 37 34 2e 64 74 62 3b 20 62 6f 6f 74 |-ek874.dtb; boot|
00000620 69 20 30 78 34 38 30 38 30 30 30 30 20 2d 20 30 |i 0x48080000 - 0|
00000630 78 34 38 30 30 30 30 30 30 00 63 75 74 5f 76 65 |x48000000.cut_ve|
00000640 72 3d 31 30 00 65 74 68 31 61 64 64 72 3d 34 30 |r=10.eth1addr=40|
00000650 3a 32 31 3a 39 66 3a 61 63 3a 32 38 3a 31 31 00 |:21:9f:ac:28:11.|
00000660 65 74 68 61 63 74 3d 65 74 68 5f 72 74 6c 38 31 |ethact=eth_rtl81|
00000670 36 39 00 65 74 68 61 64 64 72 3d 34 30 3a 32 31 |69.ethaddr=40:21|
00000680 3a 39 65 3a 61 38 3a 32 38 3a 31 31 00 66 61 62 |:9e:a8:28:11.fab|
00000690 5f 62 6f 6f 74 61 72 67 73 3d 73 65 74 65 6e 76 |_bootargs=setenv|
000006a0 20 62 6f 6f 74 61 72 67 73 20 63 6f 6e 73 6f 6c | bootargs consol|
000006b0 65 3d 74 74 79 53 43 30 2c 31 31 35 32 30 30 6e |e=ttySC0,115200n|
000006c0 38 20 69 67 6e 6f 72 65 5f 6c 6f 67 6c 65 76 65 |8 ignore_logleve|
000006d0 6c 20 6e 66 73 72 6f 6f 74 64 65 62 75 67 20 72 |l nfsrootdebug r|
000006e0 6f 6f 74 3d 2f 64 65 76 2f 6e 66 73 20 72 77 20 |oot=/dev/nfs rw |
000006f0 6e 66 73 72 6f 6f 74 3d 24 7b 73 65 72 76 65 72 |nfsroot=${server|
00000700 69 70 7d 3a 2f 74 66 74 70 62 6f 6f 74 2f 52 5a |ip}:/tftpboot/RZ|
00000710 2d 47 32 45 20 69 70 3d 64 68 63 70 20 63 6d 61 |-G2E ip=dhcp cma|
00000720 3d 39 36 4d 00 66 61 62 5f 62 6f 6f 74 63 6d 64 |=96M.fab_bootcmd|
00000730 3d 72 75 6e 20 66 61 62 5f 6e 65 74 77 6f 72 6b |=run fab_network|
00000740 3b 72 75 6e 20 66 61 62 5f 62 6f 6f 74 61 72 67 |;run fab_bootarg|
00000750 73 3b 74 66 74 70 62 6f 6f 74 20 24 7b 66 61 62 |s;tftpboot ${fab|
00000760 5f 6c 6f 61 64 61 64 64 72 7d 20 24 7b 66 61 62 |_loadaddr} ${fab|
00000770 5f 6b 65 72 6e 65 6c 7d 3b 74 66 74 70 62 6f 6f |_kernel};tftpboo|
00000780 74 20 24 7b 66 61 62 5f 66 64 74 5f 61 64 64 72 |t ${fab_fdt_addr|
00000790 7d 20 24 7b 66 61 62 5f 66 64 74 5f 66 69 6c 65 |} ${fab_fdt_file|
000007a0 7d 3b 75 6e 7a 69 70 20 24 7b 66 61 62 5f 6c 6f |};unzip ${fab_lo|
000007b0 61 64 61 64 64 72 7d 20 24 7b 66 61 62 5f 6b 65 |adaddr} ${fab_ke|
000007c0 72 6e 65 6c 5f 61 64 64 72 7d 3b 62 6f 6f 74 69 |rnel_addr};booti|
000007d0 20 24 7b 66 61 62 5f 6b 65 72 6e 65 6c 5f 61 64 | ${fab_kernel_ad|
000007e0 64 72 7d 20 2d 20 24 7b 66 61 62 5f 66 64 74 5f |dr} - ${fab_fdt_|
000007f0 61 64 64 72 7d 00 66 61 62 5f 64 65 62 75 67 3d |addr}.fab_debug=|
00000800 64 72 6d 2e 64 65 62 75 67 3d 30 78 33 66 00 66 |drm.debug=0x3f.f|
00000810 61 62 5f 66 64 74 5f 61 64 64 72 3d 30 78 34 38 |ab_fdt_addr=0x48|
00000820 30 30 30 30 30 30 00 66 61 62 5f 66 64 74 5f 66 |000000.fab_fdt_f|
00000830 69 6c 65 3d 72 7a 67 32 65 2f 62 6f 6f 74 2e 69 |ile=rzg2e/boot.i|
00000840 6e 2d 70 72 6f 67 72 65 73 73 2f 72 38 61 37 37 |n-progress/r8a77|
00000850 34 63 30 2d 65 6b 38 37 34 2d 69 64 6b 2d 32 31 |4c0-ek874-idk-21|
00000860 32 31 77 72 2e 64 74 62 00 66 61 62 5f 6b 65 72 |21wr.dtb.fab_ker|
00000870 6e 65 6c 3d 72 7a 67 32 65 2f 62 6f 6f 74 2e 69 |nel=rzg2e/boot.i|
00000880 6e 2d 70 72 6f 67 72 65 73 73 2f 49 6d 61 67 65 |n-progress/Image|
00000890 2e 67 7a 00 66 61 62 5f 6b 65 72 6e 65 6c 5f 61 |.gz.fab_kernel_a|
000008a0 64 64 72 3d 30 78 34 38 30 38 30 30 30 30 00 66 |ddr=0x48080000.f|
000008b0 61 62 5f 6c 6f 61 64 61 64 64 72 3d 30 78 34 41 |ab_loadaddr=0x4A|
000008c0 30 38 30 30 30 31 00 66 61 62 5f 6e 65 74 77 6f |080001.fab_netwo|
000008d0 72 6b 3d 73 65 74 65 6e 76 20 73 65 72 76 65 72 |rk=setenv server|
000008e0 69 70 20 31 39 32 2e 31 36 38 2e 31 2e 33 30 3b |ip 192.168.1.30;|
000008f0 20 73 65 74 65 6e 76 20 61 75 74 6f 6c 6f 61 64 | setenv autoload|
00000900 20 6e 6f 3b 20 64 68 63 70 00 66 64 74 5f 68 69 | no; dhcp.fdt_hi|
00000910 67 68 3d 30 78 66 66 66 66 66 66 66 66 66 66 66 |gh=0xfffffffffff|
00000920 66 66 66 66 66 00 66 64 74 63 6f 6e 74 72 6f 6c |fffff.fdtcontrol|
00000930 61 64 64 72 3d 62 62 66 32 36 32 66 30 00 66 69 |addr=bbf262f0.fi|
00000940 6c 65 61 64 64 72 3d 34 61 30 38 30 30 30 30 00 |leaddr=4a080000.|
00000950 66 69 6c 65 73 69 7a 65 3d 31 63 38 62 32 30 30 |filesize=1c8b200|
00000960 00 67 61 74 65 77 61 79 69 70 3d 31 39 32 2e 31 |.gatewayip=192.1|
00000970 36 38 2e 31 30 2e 31 00 69 6e 69 74 72 64 5f 68 |68.10.1.initrd_h|
00000980 69 67 68 3d 30 78 66 66 66 66 66 66 66 66 66 66 |igh=0xffffffffff|
00000990 66 66 66 66 66 66 00 6c 6f 61 64 61 64 64 72 3d |ffffff.loadaddr=|
000009a0 30 78 35 38 30 30 30 30 30 30 00 6d 65 6d 3d 31 |0x58000000.mem=1|
000009b0 39 33 33 33 31 32 6b 00 6e 65 74 6d 61 73 6b 3d |933312k.netmask=|
000009c0 32 35 35 2e 32 35 35 2e 32 35 35 2e 30 00 6e 65 |255.255.255.0.ne|
000009d0 74 77 6f 72 6b 3d 73 65 74 65 6e 76 20 73 65 72 |twork=setenv ser|
000009e0 76 65 72 69 70 20 31 39 32 2e 31 36 38 2e 31 2e |verip 192.168.1.|
000009f0 33 30 3b 20 73 65 74 65 6e 76 20 61 75 74 6f 6c |30; setenv autol|
00000a00 6f 61 64 20 6e 6f 3b 20 64 68 63 70 00 70 6c 61 |oad no; dhcp.pla|
00000a10 74 66 6f 72 6d 3d 72 38 61 37 37 34 63 30 00 70 |tform=r8a774c0.p|
00000a20 72 61 5f 62 6f 6f 74 61 72 67 73 3d 73 65 74 65 |ra_bootargs=sete|
00000a30 6e 76 20 62 6f 6f 74 61 72 67 73 20 72 6f 6f 74 |nv bootargs root|
00000a40 3d 2f 64 65 76 2f 6e 66 73 20 72 77 20 6e 66 73 |=/dev/nfs rw nfs|
00000a50 72 6f 6f 74 3d 24 7b 73 65 72 76 65 72 69 70 7d |root=${serverip}|
00000a60 3a 2f 6d 6e 74 2f 6d 69 70 69 67 32 65 2c 76 65 |:/mnt/mipig2e,ve|
00000a70 72 73 3d 34 2e 31 2c 74 63 70 20 69 70 3d 64 68 |rs=4.1,tcp ip=dh|
00000a80 63 70 20 63 6d 61 3d 39 36 4d 00 70 72 61 5f 62 |cp cma=96M.pra_b|
00000a90 6f 6f 74 63 6d 64 3d 64 68 63 70 3b 72 75 6e 20 |ootcmd=dhcp;run |
00000aa0 70 72 61 5f 62 6f 6f 74 61 72 67 73 3b 74 66 74 |pra_bootargs;tft|
00000ab0 70 62 6f 6f 74 20 30 78 34 41 30 38 30 30 30 30 |pboot 0x4A080000|
00000ac0 20 6d 69 70 69 2f 49 6d 61 67 65 2e 67 7a 3b 74 | mipi/Image.gz;t|
00000ad0 66 74 70 62 6f 6f 74 20 30 78 34 38 30 30 30 30 |ftpboot 0x480000|
00000ae0 30 30 20 6d 69 70 69 2f 72 38 61 37 37 34 63 30 |00 mipi/r8a774c0|
00000af0 2d 65 6b 38 37 34 2e 64 74 62 3b 75 6e 7a 69 70 |-ek874.dtb;unzip|
00000b00 20 30 78 34 41 30 38 30 30 30 30 20 30 78 34 38 | 0x4A080000 0x48|
00000b10 30 38 30 30 30 30 3b 62 6f 6f 74 69 20 30 78 34 |080000;booti 0x4|
00000b20 38 30 38 30 30 30 30 20 2d 20 30 78 34 38 30 30 |8080000 - 0x4800|
00000b30 30 30 30 30 00 73 74 64 65 72 72 3d 73 65 72 69 |0000.stderr=seri|
00000b40 61 6c 40 65 36 65 38 38 30 30 30 00 73 74 64 69 |al@e6e88000.stdi|
00000b50 6e 3d 73 65 72 69 61 6c 40 65 36 65 38 38 30 30 |n=serial@e6e8800|
00000b60 30 00 73 74 64 6f 75 74 3d 73 65 72 69 61 6c 40 |0.stdout=serial@|
00000b70 65 36 65 38 38 30 30 30 00 75 73 62 5f 70 67 6f |e6e88000.usb_pgo|
00000b80 6f 64 5f 64 65 6c 61 79 3d 32 30 30 30 00 76 65 |od_delay=2000.ve|
00000b90 72 3d 55 2d 42 6f 6f 74 20 32 30 32 31 2e 30 31 |r=U-Boot 2021.01|
00000ba0 2d 72 63 32 2d 67 34 65 64 30 30 62 36 34 39 31 |-rc2-g4ed00b6491|
00000bb0 20 28 4e 6f 76 20 31 38 20 32 30 32 30 20 2d 20 | (Nov 18 2020 - |
00000bc0 30 39 3a 31 35 3a 31 32 20 2b 30 30 30 30 29 00 |09:15:12 +0000).|
00000bd0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00010000
root@ek874:~#
root@ek874:~#
root@ek874:~#
root@ek874:~#
[-- Attachment #3: g2e.txt --]
[-- Type: text/plain, Size: 43370 bytes --]
NOTICE: BL2: RZ/G2 Initial Program Loader(CA53) Rev.2.0.6
NOTICE: BL2: PRR is RZ/G2E Ver.1.0
NOTICE: BL2: PLL1 nonSSCG Clock select
NOTICE: BL2: Board is EK874 RZ/G2E Rev.1.0
NOTICE: BL2: Boot device is QSPI Flash(40MHz)
NOTICE: BL2: LCM state is CM
NOTICE: BL2: DDR1856(rev.0.12)
NOTICE: BL2: [COLD_BOOT]
NOTICE: BL2: DRAM Split is OFF
NOTICE: BL2: QoS is default setting(rev.0.05)
NOTICE: BL2: DRAM refresh interval 3.9 usec
NOTICE: BL2: CH0: 400000000 - 47fffffff, 2 GiB
NOTICE: BL2: FDT at 0xe63138a0
NOTICE: BL2: v2.3(release):v2.4-rc0-11-ge7eff9951
NOTICE: BL2: Built : 16:38:43, Nov 17 2020
NOTICE: BL2: Normal boot
NOTICE: BL2: dst=0xe6313000 src=0x8180000 len=512(0x200)
NOTICE: BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
NOTICE: rcar_file_len: len: 0x0003e000
NOTICE: BL2: dst=0x44000000 src=0x81c0000 len=253952(0x3e000)
NOTICE: rcar_file_len: len: 0x00100000
NOTICE: BL2: dst=0x50000000 src=0x8300000 len=1048576(0x100000)
NOTICE: BL2: Booting BL31
U-Boot 2021.01-rc2-g4ed00b6491 (Nov 18 2020 - 09:15:12 +0000)
CPU: Renesas Electronics R8A774C0 rev 1.0
Model: Silicon Linux RZ/G2E evaluation kit EK874 (CAT874 + CAT875)
DRAM: 1.9 GiB
MMC: mmc@ee100000: 0
Loading Environment from SPIFlash... SF: Detected w25m512jv with page size 256 Bytes, erase size 4 KiB, total 64 MiB
OK
In: serial@e6e88000
Out: serial@e6e88000
Err: serial@e6e88000
Net: eth0: ethernet@e6800000
Hit any key to stop autoboot: 0
ethernet@e6800000 Waiting for PHY auto negotiation to complete...... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.10.139 (1277 ms)
Using ethernet@e6800000 device
TFTP from server 192.168.10.1; our IP address is 192.168.10.139
Filename 'mipi/Image.gz'.
Load address: 0x4a080000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############################################
2.1 MiB/s
done
Bytes transferred = 7353744 (703590 hex)
Using ethernet@e6800000 device
TFTP from server 192.168.10.1; our IP address is 192.168.10.139
Filename 'mipi/r8a774c0-ek874.dtb'.
Load address: 0x48000000
Loading: ###
1.6 MiB/s
done
Bytes transferred = 43400 (a988 hex)
Uncompressed size: 16368128 = 0xF9C200
## Flattened Device Tree blob at 48000000
Booting using the fdt blob at 0x48000000
Using Device Tree in place at 0000000048000000, end 000000004800d987
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 4.19.157-cip38+ (prasmi@prasmi) (gcc version 7.5.0 (Linaro GCC 7.5-2019.12)) #38 SMP PREEMPT Fri Nov 20 09:55:31 0
[ 0.000000] Machine model: Silicon Linux RZ/G2E evaluation kit EK874 (CAT874 + CAT875)
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 96 MiB at 0x00000000ba000000
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.0
[ 0.000000] random: get_random_bytes called from start_kernel+0xac/0x480 with crng_init=0
[ 0.000000] percpu: Embedded 24 pages/cpu s61256 r8192 d28856 u98304
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 483840
[ 0.000000] Kernel command line: root=/dev/nfs rw nfsroot=192.168.10.1:/mnt/mipig2e,vers=4.1,tcp ip=dhcp cma=96M
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Memory: 1802876K/1966080K available (10428K kernel code, 1200K rwdata, 3588K rodata, 704K init, 12240K bss, 64900K reserved, 98)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] Running RCU self tests
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU lockdep checking is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000240] Console: colour dummy device 80x25
[ 0.001810] console [tty0] enabled
[ 0.001852] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[ 0.001919] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.001960] ... MAX_LOCK_DEPTH: 48
[ 0.002002] ... MAX_LOCKDEP_KEYS: 8191
[ 0.002044] ... CLASSHASH_SIZE: 4096
[ 0.002087] ... MAX_LOCKDEP_ENTRIES: 32768
[ 0.002130] ... MAX_LOCKDEP_CHAINS: 65536
[ 0.002173] ... CHAINHASH_SIZE: 32768
[ 0.002217] memory used by lock dependency info: 7391 kB
[ 0.002266] per task-struct memory footprint: 1920 bytes
[ 0.002387] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.002479] pid_max: default: 32768 minimum: 301
[ 0.002849] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.002918] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.007096] ASID allocator initialised with 32768 entries
[ 0.007561] rcu: Hierarchical SRCU implementation.
[ 0.009400] Detected Renesas RZ/G2 r8a774c0 ES1.0
[ 0.010228] EFI services will not be available.
[ 0.010966] smp: Bringing up secondary CPUs ...
[ 0.012688] Detected VIPT I-cache on CPU1
[ 0.012801] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.013331] smp: Brought up 1 node, 2 CPUs
[ 0.013507] SMP: Total of 2 processors activated.
[ 0.013565] CPU features: detected: 32-bit EL0 Support
[ 0.014556] CPU: All CPU(s) started at EL1
[ 0.014641] alternatives: patching kernel code
[ 0.018029] devtmpfs: initialized
[ 0.041608] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.041774] futex hash table entries: 512 (order: 4, 65536 bytes)
[ 0.045405] pinctrl core: initialized pinctrl subsystem
[ 0.047638] DMI not present or invalid.
[ 0.048929] NET: Registered protocol family 16
[ 0.050067] audit: initializing netlink subsys (disabled)
[ 0.050729] audit: type=2000 audit(0.048:1): state=initialized audit_enabled=0 res=1
[ 0.052301] cpuidle: using governor menu
[ 0.052855] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.055991] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.062009] sh-pfc e6060000.pin-controller: r8a774c0_pfc support registered
[ 0.110264] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.111935] cryptd: max_cpu_qlen set to 1000
[ 0.122245] vgaarb: loaded
[ 0.122951] SCSI subsystem initialized
[ 0.124307] usbcore: registered new interface driver usbfs
[ 0.124505] usbcore: registered new interface driver hub
[ 0.124763] usbcore: registered new device driver usb
[ 0.126669] media: Linux media interface: v0.10
[ 0.126790] videodev: Linux video capture interface: v2.00
[ 0.127025] pps_core: LinuxPPS API ver. 1 registered
[ 0.127081] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.127194] PTP clock support registered
[ 0.127286] EDAC MC: Ver: 3.0.0
[ 0.130066] Advanced Linux Sound Architecture Driver Initialized.
[ 0.132628] clocksource: Switched to clocksource arch_sys_counter
[ 0.279619] VFS: Disk quotas dquot_6.6.0
[ 0.279840] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.299058] NET: Registered protocol family 2
[ 0.301174] tcp_listen_portaddr_hash hash table entries: 1024 (order: 4, 73728 bytes)
[ 0.301434] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.301640] TCP bind hash table entries: 16384 (order: 8, 1048576 bytes)
[ 0.303231] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.304111] UDP hash table entries: 1024 (order: 5, 163840 bytes)
[ 0.304450] UDP-Lite hash table entries: 1024 (order: 5, 163840 bytes)
[ 0.305443] NET: Registered protocol family 1
[ 0.307612] RPC: Registered named UNIX socket transport module.
[ 0.307733] RPC: Registered udp transport module.
[ 0.307787] RPC: Registered tcp transport module.
[ 0.307840] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.310230] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 0.311022] kvm [1]: HYP mode not available
[ 0.322402] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[ 0.341892] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.344005] NFS: Registering the id_resolver key type
[ 0.344325] Key type id_resolver registered
[ 0.344399] Key type id_legacy registered
[ 0.344474] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.353146] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 0.353593] io scheduler noop registered
[ 0.353648] io scheduler deadline registered
[ 0.354110] io scheduler cfq registered (default)
[ 0.354170] io scheduler mq-deadline registered
[ 0.354224] io scheduler kyber registered
[ 0.362859] gpio_rcar e6050000.gpio: driving 18 GPIOs
[ 0.364122] gpio_rcar e6051000.gpio: driving 23 GPIOs
[ 0.365422] gpio_rcar e6052000.gpio: driving 26 GPIOs
[ 0.366504] gpio_rcar e6053000.gpio: driving 16 GPIOs
[ 0.367538] gpio_rcar e6054000.gpio: driving 11 GPIOs
[ 0.368529] gpio_rcar e6055000.gpio: driving 20 GPIOs
[ 0.369841] gpio_rcar e6055400.gpio: driving 18 GPIOs
[ 0.371818] rcar-pcie fe000000.pcie: host bridge /soc/pcie@fe000000 ranges:
[ 0.371968] rcar-pcie fe000000.pcie: IO 0xfe100000..0xfe1fffff -> 0x00000000
[ 0.372434] rcar-pcie fe000000.pcie: MEM 0xfe200000..0xfe3fffff -> 0xfe200000
[ 0.372548] rcar-pcie fe000000.pcie: MEM 0x30000000..0x37ffffff -> 0x30000000
[ 0.372756] rcar-pcie fe000000.pcie: MEM 0x38000000..0x3fffffff -> 0x38000000
[ 0.425797] rcar-pcie fe000000.pcie: PCIe link down
[ 0.538289] SuperH (H)SCI(F) driver initialized
[ 0.540274] e6560000.serial: ttySC1 at MMIO 0xe6560000 (irq = 26, base_baud = 0) is a hscif
[ 0.542773] e6e88000.serial: ttySC0 at MMIO 0xe6e88000 (irq = 109, base_baud = 0) is a scif
[ 1.293149] console [ttySC0] enabled
[ 1.302312] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.309183] [drm] No driver support for vblank timestamp query.
[ 1.345551] loop: module loaded
[ 1.355641] libphy: Fixed MDIO Bus: probed
[ 1.361112] tun: Universal TUN/TAP device driver, 1.6
[ 1.367324] CAN device driver interface
[ 1.373956] rcar_can e6c30000.can: device registered (IRQ107)
[ 1.381776] rcar_can e6c38000.can: device registered (IRQ108)
[ 1.390949] VFIO - User Level meta-driver version: 0.3
[ 1.396840] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.403506] ehci-pci: EHCI PCI platform driver
[ 1.408175] ehci-platform: EHCI generic platform driver
[ 1.441444] ehci-platform ee080100.usb: EHCI Host Controller
[ 1.447517] ehci-platform ee080100.usb: new USB bus registered, assigned bus number 1
[ 1.456872] ehci-platform ee080100.usb: irq 129, io mem 0xee080100
[ 1.476706] ehci-platform ee080100.usb: USB 2.0 started, EHCI 1.10
[ 1.486366] hub 1-0:1.0: USB hub found
[ 1.490519] hub 1-0:1.0: 1 port detected
[ 1.496872] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.503313] ohci-pci: OHCI PCI platform driver
[ 1.507982] ohci-platform: OHCI generic platform driver
[ 1.514208] ohci-platform ee080000.usb: Generic Platform OHCI controller
[ 1.521112] ohci-platform ee080000.usb: new USB bus registered, assigned bus number 2
[ 1.529694] ohci-platform ee080000.usb: irq 129, io mem 0xee080000
[ 1.625098] hub 2-0:1.0: USB hub found
[ 1.629078] hub 2-0:1.0: 1 port detected
[ 1.635828] xhci-hcd ee000000.usb: xHCI Host Controller
[ 1.641271] xhci-hcd ee000000.usb: new USB bus registered, assigned bus number 3
[ 1.664909] xhci-hcd ee000000.usb: hcc params 0x014051ce hci version 0x100 quirks 0x0000000000830410
[ 1.674345] xhci-hcd ee000000.usb: irq 127, io mem 0xee000000
[ 1.682847] hub 3-0:1.0: USB hub found
[ 1.687324] hub 3-0:1.0: 1 port detected
[ 1.692395] xhci-hcd ee000000.usb: xHCI Host Controller
[ 1.697785] xhci-hcd ee000000.usb: new USB bus registered, assigned bus number 4
[ 1.705430] xhci-hcd ee000000.usb: Host supports USB 3.0 SuperSpeed
[ 1.712111] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[ 1.722391] hub 4-0:1.0: USB hub found
[ 1.726385] hub 4-0:1.0: 1 port detected
[ 1.731996] usbcore: registered new interface driver usb-storage
[ 1.743555] renesas_usb3 ee020000.usb: probed
[ 1.749998] i2c /dev entries driver
[ 1.763922] hd3ss3220 0-0047: probed revision=0x2
[ 1.828935] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 1.902429] tda998x 0-0070: found TDA19988
[ 1.915730] i2c-rcar e6500000.i2c: probed
[ 1.923846] rtc-rx8581 1-0032: low voltage detected, date/time is not reliable.
[ 1.932094] rtc-rx8581 1-0032: registered as rtc0
[ 1.938129] i2c-rcar e6508000.i2c: probed
[ 1.952928] rcar_thermal e6190000.thermal: 1 sensor probed
[ 1.971314] renesas_sdhi_internal_dmac ee100000.mmc: Got CD GPIO
[ 1.978485] renesas_sdhi_internal_dmac ee100000.mmc: Linked as a consumer to regulator.2
[ 1.987406] renesas_sdhi_internal_dmac ee100000.mmc: Dropping the link to regulator.2
[ 1.998028] hub 1-1:1.0: USB hub found
[ 2.002485] hub 1-1:1.0: 4 ports detected
[ 2.006793] ledtrig-cpu: registered to indicate activity on CPUs
[ 2.015949] usbcore: registered new interface driver usbhid
[ 2.021793] usbhid: USB HID core driver
[ 2.039696] m25p80 spi0.0: w25m512jv (32768 Kbytes)
[ 2.045107] 8 fixed-partitions partitions found on MTD device spi0.0
[ 2.051595] Creating 8 MTD partitions on "spi0.0":
[ 2.056500] 0x000000000000-0x000000040000 : "bootparam"
[ 2.066945] 0x000000040000-0x000000080000 : "bl2"
[ 2.074373] 0x000000180000-0x0000001c0000 : "cert_header_sa6"
[ 2.082550] 0x0000001c0000-0x000000620000 : "bl31"
[ 2.089949] 0x000000200000-0x000000660000 : "tee"
[ 2.097218] 0x000000300000-0x0000003c0000 : "uboot"
[ 2.104376] 0x0000003f0000-0x000000400000 : "uboot-env"
[ 2.112275] 0x000000400000-0x000002000000 : "user"
[ 2.139214] NET: Registered protocol family 17
[ 2.143897] can: controller area network core (rev 20170425 abi 9)
[ 2.150482] NET: Registered protocol family 29
[ 2.155093] can: raw protocol (rev 20170425)
[ 2.159923] can: broadcast manager protocol (rev 20170425 t)
[ 2.165727] can: netlink gateway (rev 20170425) max_hops=1
[ 2.172298] Key type dns_resolver registered
[ 2.178429] registered taskstats version 1
[ 2.224800] renesas_irqc e61c0000.interrupt-controller: driving 6 irqs
[ 2.238619] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.245510] [drm] No driver support for vblank timestamp query.
[ 2.261446] renesas_sdhi_internal_dmac ee100000.mmc: Got CD GPIO
[ 2.268464] renesas_sdhi_internal_dmac ee100000.mmc: Linked as a consumer to regulator.2
[ 2.277085] renesas_sdhi_internal_dmac ee100000.mmc: Linked as a consumer to regulator.4
[ 2.337300] renesas_sdhi_internal_dmac ee100000.mmc: mmc0 base at 0xee100000 max clock rate 200 MHz
[ 2.348808] renesas_sdhi_internal_dmac ee160000.mmc: Linked as a consumer to regulator.3
[ 2.483025] renesas_sdhi_internal_dmac ee160000.mmc: mmc1 base at 0xee160000 max clock rate 200 MHz
[ 2.510315] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.517151] [drm] No driver support for vblank timestamp query.
[ 2.545210] rcar-dmac e6700000.dma-controller: ignoring dependency for device, assuming no driver
[ 2.566081] rcar-dmac e7300000.dma-controller: ignoring dependency for device, assuming no driver
[ 2.576762] renesas_sdhi_internal_dmac ee160000.mmc: card claims to support voltages below defined range
[ 2.595870] rcar-dmac e7310000.dma-controller: ignoring dependency for device, assuming no driver
[ 2.609028] random: fast init done
[ 2.620277] rcar-dmac ec700000.dma-controller: ignoring dependency for device, assuming no driver
[ 2.641977] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.648807] [drm] No driver support for vblank timestamp query.
[ 2.656833] ravb e6800000.ethernet: ignoring dependency for device, assuming no driver
[ 2.669165] libphy: ravb_mii: probed
[ 2.681299] ravb e6800000.ethernet eth0: Base address at 0xe6800000, 40:21:9e:a8:28:11, IRQ 104.
[ 2.691153] rcar-fcp fe96f000.fcp: ignoring dependency for device, assuming no driver
[ 2.699967] rcar-fcp fea27000.fcp: ignoring dependency for device, assuming no driver
[ 2.708805] rcar-fcp fea2f000.fcp: ignoring dependency for device, assuming no driver
[ 2.717552] rcar-fcp fe9af000.fcp: ignoring dependency for device, assuming no driver
[ 2.775850] rcar_sound ec500000.sound: probed
[ 2.782370] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.789185] [drm] No driver support for vblank timestamp query.
[ 2.801454] [drm] Initialized rcar-du 1.0.0 20130110 for feb00000.display on minor 0
[ 2.809488] [drm] Device feb00000.display probed
[ 2.816683] [drm] Cannot find any crtc or sizes
[ 2.827555] [drm] Cannot find any crtc or sizes
[ 2.832934] asoc-simple-card sound: i2s-hifi <-> ec500000.sound mapping ok
[ 2.840078] asoc-simple-card sound: ASoC: no DMI vendor name!
[ 2.855528] rtc-rx8581 1-0032: low voltage detected, date/time is not reliable.
[ 2.863226] rtc-rx8581 1-0032: hctosys: unable to read the hardware clock
[ 2.874088] mmc1: new high speed SDIO card at address 0001
[ 2.889789] RTL8211E Gigabit Ethernet e6800000.ethernet-ffffffff:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=e680)
[ 5.752810] ravb e6800000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 5.780733] Sending DHCP requests .., OK
[ 8.600865] IP-Config: Got DHCP answer from 192.168.10.1, my address is 192.168.10.139
[ 8.608936] IP-Config: Complete:
[ 8.612210] device=eth0, hwaddr=40:21:9e:a8:28:11, ipaddr=192.168.10.139, mask=255.255.255.0, gw=192.168.10.1
[ 8.622715] host=192.168.10.139, domain=example.org, nis-domain=(none)
[ 8.629802] bootserver=192.168.10.1, rootserver=192.168.10.1, rootpath=
[ 8.629808] nameserver0=192.168.10.1
[ 8.642636] ALSA device list:
[ 8.645840] #0: CAT874 HDMI sound
[ 8.735899] VFS: Mounted root (nfs4 filesystem) on device 0:17.
[ 8.747943] devtmpfs: mounted
[ 8.752009] Freeing unused kernel memory: 704K
[ 8.757534] Run /sbin/init as init process
[ 9.350277] systemd[1]: System time before build time, advancing clock.
[ 9.519886] systemd[1]: systemd 234 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCR)
[ 9.542740] systemd[1]: Detected architecture arm64.
Welcome to Poky (Yocto Project Reference Distro) 2.4.3 (rocko)!
[ 9.578842] systemd[1]: Set hostname to <ek874>.
[ 11.308743] random: systemd: uninitialized urandom read (16 bytes read)
[ 11.319183] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ 11.345248] random: systemd: uninitialized urandom read (16 bytes read)
[ 11.355514] systemd[1]: Listening on udev Control Socket.
[ OK ] Listening on udev Control Socket.
[ 11.377205] random: systemd: uninitialized urandom read (16 bytes read)
[ 11.385585] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Started Dispatch Password Requests to Console Directory Watch.
[ 11.415583] systemd[1]: Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket (/dev/log).
[ 11.438001] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ 11.465183] systemd[1]: Reached target Paths.
[ OK ] Reached target Paths.
[ 11.485175] systemd[1]: Reached target Swap.
[ OK ] Reached target Swap.
[ OK ] Reached target Remote File Systems.
[ OK ] Listening on udev Kernel Socket.
[ OK ] Reached target Host and Network Name Lookups.
[ OK ] Listening on Journal Audit Socket.
[ OK ] Created slice User and Session Slice.
[ OK ] Listening on Network Service Netlink Socket.
[ OK ] Created slice System Slice.
Mounting Temporary Directory (/tmp)...
Mounting Kernel Debug File System...
Mounting Huge Pages File System...
Mounting POSIX Message Queue File System...
[ OK ] Reached target Slices.
[ OK ] Created slice system-getty.slice.
[ OK ] Created slice system-serial\x2dgetty.slice.
[ OK ] Listening on Journal Socket.
Starting Load Kernel Modules...
Starting Remount Root and Kernel File Systems...
Starting Journal Service...
[ OK ] Mounted Kernel Debug File System.
[ OK ] Mounted POSIX Message Queue File System.
[ OK ] Mounted Huge Pages File System.
[ OK ] Mounted Temporary Directory (/tmp).
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[ OK ] Started Remount Root and Kernel File Systems.
Starting udev Coldplug all Devices...
Starting Create Static Device Nodes in /dev...
Starting Apply Kernel Variables...
Mounting Kernel Configuration File System...
[ OK ] Started Journal Service.
[ OK ] Started Apply Kernel Variables.
[ OK ] Mounted Kernel Configuration File System.
Starting Flush Journal to Persistent Storage...
[ OK ] Started Create Static Device Nodes in /dev.
Starting udev Kernel Device Manager...
[ OK ] Reached target Local File Systems (Pre).
Mounting /var/volatile...
[ 13.023160] systemd-journald[196]: Received request to flush runtime journal from PID 1
[ OK ] Mounted /var/volatile.
[ OK ] Started Flush Journal to Persistent Storage.
Starting Load/Save Random Seed...
[ OK ] Reached target Local File Systems.
Starting Create Volatile Files and Directories...
[ OK ] Started Load/Save Random Seed.
[ OK ] Started udev Kernel Device Manager.
[ OK ] Started Create Volatile Files and Directories.
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Started udev Coldplug all Devices.
[ OK ] Reached target System Initialization.
[ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Listening on RPCbind Server Activation Socket.
Starting Network Service...
[ OK ] Started dnf-automatic-notifyonly timer.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Started dnf makecache timer.
[ OK ] Started dnf-automatic-install timer.
[ OK ] Started dnf-automatic-download timer.
[ OK ] Reached target Timers.
[ OK ] Listening on dropbear.socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting Login Service...
[ OK ] Started Bluetooth Audio ALSA Backend.
[ OK ] Started optee services.
[ OK ] Started D-Bus System Message Bus.
Starting Connection service...
Starting Avahi mDNS/DNS-SD Stack...
[ OK ] Reached target Containers.
Starting Telephony service...
Starting Save/Restore Sound Card State...
Starting PowerVR consumer services...
Starting pvrinit.service...
[ 17.291378] random: crng init done
[ 17.294925] random: 7 urandom warning(s) missed due to ratelimiting
[ 17.471423] rcar_sound ec500000.sound: Can't update kctrl when idle
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[FAILED] Failed to start Avahi mDNS/DNS-SD Stack.
See 'systemctl status avahi-daemon.service' for details.
[ OK ] Started Save/Restore Sound Card State.
[ OK ] Found device /dev/ttySC0.
[ OK ] Started PowerVR consumer services.
[ OK ] Started pvrinit.service.
[ OK ] Started Telephony service.
[ OK ] Started Connection service.
[ OK ] Started Login Service.
[ OK ] Stopped Network Service.
Starting Network Service...
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[ OK ] Stopped Network Service.
Starting Network Service...
[ OK ] Reached target Sound Card.
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[ OK ] Stopped Network Service.
[ 19.368576] rcar_sound ec500000.sound: Can't update kctrl when idle
Starting Network Service...
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[ OK ] Stopped Network Service.
Starting Network Service...
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[ OK ] Stopped Network Service.
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[ OK ] Reached target Network.
Starting Permit User Sessions...
Starting Target Communication Framework agent...
[ OK ] Started Permit User Sessions.
[ OK ] Started Getty on tty1.
[ OK ] Started Serial Getty on ttySC0.
[ OK ] Reached target Login Prompts.
[ OK ] Started Target Communication Framework agent.
[ OK ] Reached target Multi-User System.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Started Weston Wayland compositor.
[ OK ] Started Update UTMP about System Runlevel Changes.
[ 21.207022] audit: type=1006 audit(1580996707.852:2): pid=340 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=1 res=1
Poky (Yocto Project Reference Distro) 2.4.3 ek874 ttySC0
BSP: RZG2E/EK874/1.0.2
LSI: RZG2E
Version: 1.0.2
ek874 login: root
Last login: Thu Feb 6 13:45:07 UTC 2020 on tty2
amixer: Unable to find simple control 'DVC In',0
Simple mixer control 'DVC Out',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 8388607
Mono:
Front Left: Playback 1677722 [20%]
Front Right: Playback 1677722 [20%]
sed: no previous regexp
sed: no previous regexp
root@ek874:~#
root@ek874:~#
root@ek874:~# [ 39.912236] wlan-en-regulator: disabling
[ 39.916763] SDHI0 VccQ: disabling
root@ek874:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00001000 "bootparam"
mtd1: 00040000 00001000 "bl2"
mtd2: 00040000 00001000 "cert_header_sa6"
mtd3: 00460000 00001000 "bl31"
mtd4: 00460000 00001000 "tee"
mtd5: 000c0000 00001000 "uboot"
mtd6: 00010000 00001000 "uboot-env"
mtd7: 01c00000 00001000 "user"
root@ek874:~#
root@ek874:~# dmesg | grep spi
[ 2.039696] m25p80 spi0.0: w25m512jv (32768 Kbytes)
[ 2.045107] 8 fixed-partitions partitions found on MTD device spi0.0
[ 2.051595] Creating 8 MTD partitions on "spi0.0":
root@ek874:~#
root@ek874:~#
root@ek874:~# hexdump -C /dev/mtd6
00000000 bb 1d d3 0e 61 75 74 6f 6c 6f 61 64 3d 6e 6f 00 |....autoload=no.|
00000010 62 61 75 64 72 61 74 65 3d 31 31 35 32 30 30 00 |baudrate=115200.|
00000020 62 6f 6f 74 61 72 67 73 3d 72 6f 6f 74 3d 2f 64 |bootargs=root=/d|
00000030 65 76 2f 6e 66 73 20 72 77 20 6e 66 73 72 6f 6f |ev/nfs rw nfsroo|
00000040 74 3d 3a 2f 6d 6e 74 2f 67 32 65 2c 76 65 72 73 |t=:/mnt/g2e,vers|
00000050 3d 34 2e 31 2c 74 63 70 20 69 70 3d 64 68 63 70 |=4.1,tcp ip=dhcp|
00000060 20 63 6d 61 3d 39 36 4d 00 62 6f 6f 74 61 72 67 | cma=96M.bootarg|
00000070 73 2d 6e 66 73 2d 72 7a 2d 67 32 65 3d 73 65 74 |s-nfs-rz-g2e=set|
00000080 65 6e 76 20 62 6f 6f 74 61 72 67 73 20 72 77 20 |env bootargs rw |
00000090 72 6f 6f 74 3d 2f 64 65 76 2f 6e 66 73 20 6e 66 |root=/dev/nfs nf|
000000a0 73 72 6f 6f 74 3d 31 39 32 2e 31 36 38 2e 31 2e |sroot=192.168.1.|
000000b0 33 30 3a 2f 74 66 74 70 62 6f 6f 74 2f 52 5a 2d |30:/tftpboot/RZ-|
000000c0 47 32 45 20 69 70 3d 31 39 32 2e 31 36 38 2e 31 |G2E ip=192.168.1|
000000d0 2e 34 32 00 62 6f 6f 74 61 72 67 73 5f 6e 66 73 |.42.bootargs_nfs|
000000e0 3d 73 65 74 65 6e 76 20 62 6f 6f 74 61 72 67 73 |=setenv bootargs|
000000f0 20 63 6f 6e 73 6f 6c 65 3d 74 74 79 53 43 30 2c | console=ttySC0,|
00000100 31 31 35 32 30 30 6e 38 20 69 67 6e 6f 72 65 5f |115200n8 ignore_|
00000110 6c 6f 67 6c 65 76 65 6c 20 6e 66 73 72 6f 6f 74 |loglevel nfsroot|
00000120 64 65 62 75 67 20 72 6f 6f 74 3d 2f 64 65 76 2f |debug root=/dev/|
00000130 6e 66 73 20 72 77 20 6e 66 73 72 6f 6f 74 3d 24 |nfs rw nfsroot=$|
00000140 7b 73 65 72 76 65 72 69 70 7d 3a 2f 74 66 74 70 |{serverip}:/tftp|
00000150 62 6f 6f 74 2f 52 5a 2d 47 32 45 20 69 70 3d 64 |boot/RZ-G2E ip=d|
00000160 68 63 70 00 62 6f 6f 74 63 6d 64 3d 6d 64 20 30 |hcp.bootcmd=md 0|
00000170 78 65 36 31 35 30 32 33 38 3b 72 75 6e 20 70 72 |xe6150238;run pr|
00000180 61 5f 62 6f 6f 74 63 6d 64 00 62 6f 6f 74 63 6d |a_bootcmd.bootcm|
00000190 64 2d 6e 66 73 2d 72 7a 2d 67 32 65 3d 74 66 74 |d-nfs-rz-g2e=tft|
000001a0 70 20 30 78 34 38 30 38 30 30 30 30 20 52 5a 2d |p 0x48080000 RZ-|
000001b0 47 32 45 2f 62 6f 6f 74 2f 49 6d 61 67 65 3b 74 |G2E/boot/Image;t|
000001c0 66 74 70 20 30 78 34 38 30 30 30 30 30 30 20 52 |ftp 0x48000000 R|
000001d0 5a 2d 47 32 45 2f 62 6f 6f 74 2f 64 74 62 3b 62 |Z-G2E/boot/dtb;b|
000001e0 6f 6f 74 69 20 30 78 34 38 30 38 30 30 30 30 20 |ooti 0x48080000 |
000001f0 2d 20 30 78 34 38 30 30 30 30 30 30 00 62 6f 6f |- 0x48000000.boo|
00000200 74 63 6d 64 5f 6e 66 73 3d 72 75 6e 20 6e 65 74 |tcmd_nfs=run net|
00000210 77 6f 72 6b 3b 20 72 75 6e 20 62 6f 6f 74 61 72 |work; run bootar|
00000220 67 73 5f 6e 66 73 3b 20 74 66 74 70 20 30 78 34 |gs_nfs; tftp 0x4|
00000230 38 30 38 30 30 30 30 20 52 5a 2d 47 32 45 2f 62 |8080000 RZ-G2E/b|
00000240 6f 6f 74 2f 49 6d 61 67 65 3b 20 74 66 74 70 20 |oot/Image; tftp |
00000250 30 78 34 38 30 30 30 30 30 30 20 52 5a 2d 47 32 |0x48000000 RZ-G2|
00000260 45 2f 62 6f 6f 74 2f 64 74 62 3b 20 62 6f 6f 74 |E/boot/dtb; boot|
00000270 69 20 30 78 34 38 30 38 30 30 30 30 20 2d 20 30 |i 0x48080000 - 0|
00000280 78 34 38 30 30 30 30 30 30 00 62 6f 6f 74 63 6d |x48000000.bootcm|
00000290 64 5f 6f 72 69 67 69 6e 61 6c 3d 72 75 6e 20 62 |d_original=run b|
000002a0 6f 6f 74 61 72 67 73 2d 6e 66 73 2d 72 7a 2d 67 |ootargs-nfs-rz-g|
000002b0 32 65 3b 20 72 75 6e 20 62 6f 6f 74 63 6d 64 2d |2e; run bootcmd-|
000002c0 6e 66 73 2d 72 7a 2d 67 32 65 00 62 6f 6f 74 64 |nfs-rz-g2e.bootd|
000002d0 65 6c 61 79 3d 32 00 63 68 72 69 73 66 5f 62 6f |elay=2.chrisf_bo|
000002e0 6f 74 61 72 67 73 3d 73 65 74 65 6e 76 20 62 6f |otargs=setenv bo|
000002f0 6f 74 61 72 67 73 20 63 6f 6e 73 6f 6c 65 3d 74 |otargs console=t|
00000300 74 79 53 43 30 2c 31 31 35 32 30 30 6e 38 20 69 |tySC0,115200n8 i|
00000310 67 6e 6f 72 65 5f 6c 6f 67 6c 65 76 65 6c 20 6e |gnore_loglevel n|
00000320 66 73 72 6f 6f 74 64 65 62 75 67 20 72 6f 6f 74 |fsrootdebug root|
00000330 3d 2f 64 65 76 2f 6e 66 73 20 72 77 20 6e 66 73 |=/dev/nfs rw nfs|
00000340 72 6f 6f 74 3d 24 7b 73 65 72 76 65 72 69 70 7d |root=${serverip}|
00000350 3a 2f 74 66 74 70 62 6f 6f 74 2f 52 5a 2d 47 32 |:/tftpboot/RZ-G2|
00000360 45 2d 54 45 53 54 2c 6e 66 73 76 65 72 73 3d 33 |E-TEST,nfsvers=3|
00000370 20 69 70 3d 64 68 63 70 20 63 6d 61 3d 39 36 4d | ip=dhcp cma=96M|
00000380 00 63 68 72 69 73 66 5f 62 6f 6f 74 63 6d 64 3d |.chrisf_bootcmd=|
00000390 72 75 6e 20 63 68 72 69 73 66 5f 6e 65 74 77 6f |run chrisf_netwo|
000003a0 72 6b 3b 72 75 6e 20 63 68 72 69 73 66 5f 62 6f |rk;run chrisf_bo|
000003b0 6f 74 61 72 67 73 3b 74 66 74 70 62 6f 6f 74 20 |otargs;tftpboot |
000003c0 24 7b 63 68 72 69 73 66 5f 6b 65 72 6e 65 6c 5f |${chrisf_kernel_|
000003d0 61 64 64 72 7d 20 24 7b 63 68 72 69 73 66 5f 6b |addr} ${chrisf_k|
000003e0 65 72 6e 65 6c 7d 3b 74 66 74 70 62 6f 6f 74 20 |ernel};tftpboot |
000003f0 24 7b 63 68 72 69 73 66 5f 66 64 74 5f 61 64 64 |${chrisf_fdt_add|
00000400 72 7d 20 24 7b 63 68 72 69 73 66 5f 66 64 74 5f |r} ${chrisf_fdt_|
00000410 66 69 6c 65 7d 3b 62 6f 6f 74 69 20 24 7b 63 68 |file};booti ${ch|
00000420 72 69 73 66 5f 6b 65 72 6e 65 6c 5f 61 64 64 72 |risf_kernel_addr|
00000430 7d 20 2d 20 24 7b 63 68 72 69 73 66 5f 66 64 74 |} - ${chrisf_fdt|
00000440 5f 61 64 64 72 7d 00 63 68 72 69 73 66 5f 66 64 |_addr}.chrisf_fd|
00000450 74 5f 61 64 64 72 3d 30 78 34 38 30 30 30 30 30 |t_addr=0x4800000|
00000460 30 00 63 68 72 69 73 66 5f 66 64 74 5f 66 69 6c |0.chrisf_fdt_fil|
00000470 65 3d 52 5a 2d 47 32 45 2d 54 45 53 54 2f 49 6d |e=RZ-G2E-TEST/Im|
00000480 61 67 65 2d 72 38 61 37 37 34 63 30 2d 65 6b 38 |age-r8a774c0-ek8|
00000490 37 34 2e 64 74 62 00 63 68 72 69 73 66 5f 6b 65 |74.dtb.chrisf_ke|
000004a0 72 6e 65 6c 3d 52 5a 2d 47 32 45 2d 54 45 53 54 |rnel=RZ-G2E-TEST|
000004b0 2f 49 6d 61 67 65 2d 65 6b 38 37 34 2e 62 69 6e |/Image-ek874.bin|
000004c0 00 63 68 72 69 73 66 5f 6b 65 72 6e 65 6c 5f 61 |.chrisf_kernel_a|
000004d0 64 64 72 3d 30 78 34 38 30 38 30 30 30 30 00 63 |ddr=0x48080000.c|
000004e0 68 72 69 73 66 5f 6e 65 74 77 6f 72 6b 3d 73 65 |hrisf_network=se|
000004f0 74 65 6e 76 20 73 65 72 76 65 72 69 70 20 31 39 |tenv serverip 19|
00000500 32 2e 31 36 38 2e 31 2e 33 30 3b 20 73 65 74 65 |2.168.1.30; sete|
00000510 6e 76 20 61 75 74 6f 6c 6f 61 64 20 6e 6f 3b 20 |nv autoload no; |
00000520 64 68 63 70 00 63 68 72 69 73 66 5f 73 64 5f 62 |dhcp.chrisf_sd_b|
00000530 6f 6f 74 61 72 67 73 3d 73 65 74 65 6e 76 20 62 |ootargs=setenv b|
00000540 6f 6f 74 61 72 67 73 20 63 6f 6e 73 6f 6c 65 3d |ootargs console=|
00000550 74 74 79 53 43 30 2c 31 31 35 32 30 30 6e 38 20 |ttySC0,115200n8 |
00000560 69 67 6e 6f 72 65 5f 6c 6f 67 6c 65 76 65 6c 20 |ignore_loglevel |
00000570 72 6f 6f 74 3d 2f 64 65 76 2f 6d 6d 63 62 6c 6b |root=/dev/mmcblk|
00000580 30 70 31 20 72 6f 6f 74 77 61 69 74 20 72 77 00 |0p1 rootwait rw.|
00000590 63 68 72 69 73 66 5f 73 64 5f 62 6f 6f 74 63 6d |chrisf_sd_bootcm|
000005a0 64 3d 72 75 6e 20 63 68 72 69 73 66 5f 73 64 5f |d=run chrisf_sd_|
000005b0 62 6f 6f 74 61 72 67 73 3b 65 78 74 34 6c 6f 61 |bootargs;ext4loa|
000005c0 64 20 6d 6d 63 20 30 3a 31 20 30 78 34 38 30 38 |d mmc 0:1 0x4808|
000005d0 30 30 30 30 20 49 6d 61 67 65 2d 65 6b 38 37 34 |0000 Image-ek874|
000005e0 2e 62 69 6e 3b 20 65 78 74 34 6c 6f 61 64 20 6d |.bin; ext4load m|
000005f0 6d 63 20 30 3a 31 20 30 78 34 38 30 30 30 30 30 |mc 0:1 0x4800000|
00000600 30 20 49 6d 61 67 65 2d 72 38 61 37 37 34 63 30 |0 Image-r8a774c0|
00000610 2d 65 6b 38 37 34 2e 64 74 62 3b 20 62 6f 6f 74 |-ek874.dtb; boot|
00000620 69 20 30 78 34 38 30 38 30 30 30 30 20 2d 20 30 |i 0x48080000 - 0|
00000630 78 34 38 30 30 30 30 30 30 00 63 75 74 5f 76 65 |x48000000.cut_ve|
00000640 72 3d 31 30 00 65 74 68 31 61 64 64 72 3d 34 30 |r=10.eth1addr=40|
00000650 3a 32 31 3a 39 66 3a 61 63 3a 32 38 3a 31 31 00 |:21:9f:ac:28:11.|
00000660 65 74 68 61 63 74 3d 65 74 68 5f 72 74 6c 38 31 |ethact=eth_rtl81|
00000670 36 39 00 65 74 68 61 64 64 72 3d 34 30 3a 32 31 |69.ethaddr=40:21|
00000680 3a 39 65 3a 61 38 3a 32 38 3a 31 31 00 66 61 62 |:9e:a8:28:11.fab|
00000690 5f 62 6f 6f 74 61 72 67 73 3d 73 65 74 65 6e 76 |_bootargs=setenv|
000006a0 20 62 6f 6f 74 61 72 67 73 20 63 6f 6e 73 6f 6c | bootargs consol|
000006b0 65 3d 74 74 79 53 43 30 2c 31 31 35 32 30 30 6e |e=ttySC0,115200n|
000006c0 38 20 69 67 6e 6f 72 65 5f 6c 6f 67 6c 65 76 65 |8 ignore_logleve|
000006d0 6c 20 6e 66 73 72 6f 6f 74 64 65 62 75 67 20 72 |l nfsrootdebug r|
000006e0 6f 6f 74 3d 2f 64 65 76 2f 6e 66 73 20 72 77 20 |oot=/dev/nfs rw |
000006f0 6e 66 73 72 6f 6f 74 3d 24 7b 73 65 72 76 65 72 |nfsroot=${server|
00000700 69 70 7d 3a 2f 74 66 74 70 62 6f 6f 74 2f 52 5a |ip}:/tftpboot/RZ|
00000710 2d 47 32 45 20 69 70 3d 64 68 63 70 20 63 6d 61 |-G2E ip=dhcp cma|
00000720 3d 39 36 4d 00 66 61 62 5f 62 6f 6f 74 63 6d 64 |=96M.fab_bootcmd|
00000730 3d 72 75 6e 20 66 61 62 5f 6e 65 74 77 6f 72 6b |=run fab_network|
00000740 3b 72 75 6e 20 66 61 62 5f 62 6f 6f 74 61 72 67 |;run fab_bootarg|
00000750 73 3b 74 66 74 70 62 6f 6f 74 20 24 7b 66 61 62 |s;tftpboot ${fab|
00000760 5f 6c 6f 61 64 61 64 64 72 7d 20 24 7b 66 61 62 |_loadaddr} ${fab|
00000770 5f 6b 65 72 6e 65 6c 7d 3b 74 66 74 70 62 6f 6f |_kernel};tftpboo|
00000780 74 20 24 7b 66 61 62 5f 66 64 74 5f 61 64 64 72 |t ${fab_fdt_addr|
00000790 7d 20 24 7b 66 61 62 5f 66 64 74 5f 66 69 6c 65 |} ${fab_fdt_file|
000007a0 7d 3b 75 6e 7a 69 70 20 24 7b 66 61 62 5f 6c 6f |};unzip ${fab_lo|
000007b0 61 64 61 64 64 72 7d 20 24 7b 66 61 62 5f 6b 65 |adaddr} ${fab_ke|
000007c0 72 6e 65 6c 5f 61 64 64 72 7d 3b 62 6f 6f 74 69 |rnel_addr};booti|
000007d0 20 24 7b 66 61 62 5f 6b 65 72 6e 65 6c 5f 61 64 | ${fab_kernel_ad|
000007e0 64 72 7d 20 2d 20 24 7b 66 61 62 5f 66 64 74 5f |dr} - ${fab_fdt_|
000007f0 61 64 64 72 7d 00 66 61 62 5f 64 65 62 75 67 3d |addr}.fab_debug=|
00000800 64 72 6d 2e 64 65 62 75 67 3d 30 78 33 66 00 66 |drm.debug=0x3f.f|
00000810 61 62 5f 66 64 74 5f 61 64 64 72 3d 30 78 34 38 |ab_fdt_addr=0x48|
00000820 30 30 30 30 30 30 00 66 61 62 5f 66 64 74 5f 66 |000000.fab_fdt_f|
00000830 69 6c 65 3d 72 7a 67 32 65 2f 62 6f 6f 74 2e 69 |ile=rzg2e/boot.i|
00000840 6e 2d 70 72 6f 67 72 65 73 73 2f 72 38 61 37 37 |n-progress/r8a77|
00000850 34 63 30 2d 65 6b 38 37 34 2d 69 64 6b 2d 32 31 |4c0-ek874-idk-21|
00000860 32 31 77 72 2e 64 74 62 00 66 61 62 5f 6b 65 72 |21wr.dtb.fab_ker|
00000870 6e 65 6c 3d 72 7a 67 32 65 2f 62 6f 6f 74 2e 69 |nel=rzg2e/boot.i|
00000880 6e 2d 70 72 6f 67 72 65 73 73 2f 49 6d 61 67 65 |n-progress/Image|
00000890 2e 67 7a 00 66 61 62 5f 6b 65 72 6e 65 6c 5f 61 |.gz.fab_kernel_a|
000008a0 64 64 72 3d 30 78 34 38 30 38 30 30 30 30 00 66 |ddr=0x48080000.f|
000008b0 61 62 5f 6c 6f 61 64 61 64 64 72 3d 30 78 34 41 |ab_loadaddr=0x4A|
000008c0 30 38 30 30 30 31 00 66 61 62 5f 6e 65 74 77 6f |080001.fab_netwo|
000008d0 72 6b 3d 73 65 74 65 6e 76 20 73 65 72 76 65 72 |rk=setenv server|
000008e0 69 70 20 31 39 32 2e 31 36 38 2e 31 2e 33 30 3b |ip 192.168.1.30;|
000008f0 20 73 65 74 65 6e 76 20 61 75 74 6f 6c 6f 61 64 | setenv autoload|
00000900 20 6e 6f 3b 20 64 68 63 70 00 66 64 74 5f 68 69 | no; dhcp.fdt_hi|
00000910 67 68 3d 30 78 66 66 66 66 66 66 66 66 66 66 66 |gh=0xfffffffffff|
00000920 66 66 66 66 66 00 66 64 74 63 6f 6e 74 72 6f 6c |fffff.fdtcontrol|
00000930 61 64 64 72 3d 62 62 66 32 36 32 66 30 00 66 69 |addr=bbf262f0.fi|
00000940 6c 65 61 64 64 72 3d 34 61 30 38 30 30 30 30 00 |leaddr=4a080000.|
00000950 66 69 6c 65 73 69 7a 65 3d 31 63 38 62 32 30 30 |filesize=1c8b200|
00000960 00 67 61 74 65 77 61 79 69 70 3d 31 39 32 2e 31 |.gatewayip=192.1|
00000970 36 38 2e 31 30 2e 31 00 69 6e 69 74 72 64 5f 68 |68.10.1.initrd_h|
00000980 69 67 68 3d 30 78 66 66 66 66 66 66 66 66 66 66 |igh=0xffffffffff|
00000990 66 66 66 66 66 66 00 6c 6f 61 64 61 64 64 72 3d |ffffff.loadaddr=|
000009a0 30 78 35 38 30 30 30 30 30 30 00 6d 65 6d 3d 31 |0x58000000.mem=1|
000009b0 39 33 33 33 31 32 6b 00 6e 65 74 6d 61 73 6b 3d |933312k.netmask=|
000009c0 32 35 35 2e 32 35 35 2e 32 35 35 2e 30 00 6e 65 |255.255.255.0.ne|
000009d0 74 77 6f 72 6b 3d 73 65 74 65 6e 76 20 73 65 72 |twork=setenv ser|
000009e0 76 65 72 69 70 20 31 39 32 2e 31 36 38 2e 31 2e |verip 192.168.1.|
000009f0 33 30 3b 20 73 65 74 65 6e 76 20 61 75 74 6f 6c |30; setenv autol|
00000a00 6f 61 64 20 6e 6f 3b 20 64 68 63 70 00 70 6c 61 |oad no; dhcp.pla|
00000a10 74 66 6f 72 6d 3d 72 38 61 37 37 34 63 30 00 70 |tform=r8a774c0.p|
00000a20 72 61 5f 62 6f 6f 74 61 72 67 73 3d 73 65 74 65 |ra_bootargs=sete|
00000a30 6e 76 20 62 6f 6f 74 61 72 67 73 20 72 6f 6f 74 |nv bootargs root|
00000a40 3d 2f 64 65 76 2f 6e 66 73 20 72 77 20 6e 66 73 |=/dev/nfs rw nfs|
00000a50 72 6f 6f 74 3d 24 7b 73 65 72 76 65 72 69 70 7d |root=${serverip}|
00000a60 3a 2f 6d 6e 74 2f 6d 69 70 69 67 32 65 2c 76 65 |:/mnt/mipig2e,ve|
00000a70 72 73 3d 34 2e 31 2c 74 63 70 20 69 70 3d 64 68 |rs=4.1,tcp ip=dh|
00000a80 63 70 20 63 6d 61 3d 39 36 4d 00 70 72 61 5f 62 |cp cma=96M.pra_b|
00000a90 6f 6f 74 63 6d 64 3d 64 68 63 70 3b 72 75 6e 20 |ootcmd=dhcp;run |
00000aa0 70 72 61 5f 62 6f 6f 74 61 72 67 73 3b 74 66 74 |pra_bootargs;tft|
00000ab0 70 62 6f 6f 74 20 30 78 34 41 30 38 30 30 30 30 |pboot 0x4A080000|
00000ac0 20 6d 69 70 69 2f 49 6d 61 67 65 2e 67 7a 3b 74 | mipi/Image.gz;t|
00000ad0 66 74 70 62 6f 6f 74 20 30 78 34 38 30 30 30 30 |ftpboot 0x480000|
00000ae0 30 30 20 6d 69 70 69 2f 72 38 61 37 37 34 63 30 |00 mipi/r8a774c0|
00000af0 2d 65 6b 38 37 34 2e 64 74 62 3b 75 6e 7a 69 70 |-ek874.dtb;unzip|
00000b00 20 30 78 34 41 30 38 30 30 30 30 20 30 78 34 38 | 0x4A080000 0x48|
00000b10 30 38 30 30 30 30 3b 62 6f 6f 74 69 20 30 78 34 |080000;booti 0x4|
00000b20 38 30 38 30 30 30 30 20 2d 20 30 78 34 38 30 30 |8080000 - 0x4800|
00000b30 30 30 30 30 00 73 74 64 65 72 72 3d 73 65 72 69 |0000.stderr=seri|
00000b40 61 6c 40 65 36 65 38 38 30 30 30 00 73 74 64 69 |al@e6e88000.stdi|
00000b50 6e 3d 73 65 72 69 61 6c 40 65 36 65 38 38 30 30 |n=serial@e6e8800|
00000b60 30 00 73 74 64 6f 75 74 3d 73 65 72 69 61 6c 40 |0.stdout=serial@|
00000b70 65 36 65 38 38 30 30 30 00 75 73 62 5f 70 67 6f |e6e88000.usb_pgo|
00000b80 6f 64 5f 64 65 6c 61 79 3d 32 30 30 30 00 76 65 |od_delay=2000.ve|
00000b90 72 3d 55 2d 42 6f 6f 74 20 32 30 32 31 2e 30 31 |r=U-Boot 2021.01|
00000ba0 2d 72 63 32 2d 67 34 65 64 30 30 62 36 34 39 31 |-rc2-g4ed00b6491|
00000bb0 20 28 4e 6f 76 20 31 38 20 32 30 32 30 20 2d 20 | (Nov 18 2020 - |
00000bc0 30 39 3a 31 35 3a 31 32 20 2b 30 30 30 30 29 00 |09:15:12 +0000).|
00000bd0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00010000
root@ek874:~#
root@ek874:~#
root@ek874:~#
root@ek874:~#
[-- Attachment #4: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5824): https://lists.cip-project.org/g/cip-dev/message/5824
Mute This Topic: https://lists.cip-project.org/mt/78451537/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 20+ messages in thread