Introduce TI GPMC memory controller driver
Subsystems (3)
cover Introduce TI GPMC memory controller driver
Hi,
The GPMC is a unified memory controller dedicated for interfacing with external memory devices like
- Asynchronous SRAM-like memories and ASICs
- Asynchronous, synchronous, and page mode burst NOR flash
- NAND flash
- Pseudo-SRAM devices
This driver will take care of setting up the GPMC based on the settings specified in the Device tree and then probe its children.
cheers,
-roger
Roger Quadros (3):
scripts: Makefile.spl: Enable memory drivers to be built for SPL dt/bindings: memory: Add bindings for TI GPMC driver
memory: Add TI GPMC driver
.../memory/ti,gpmc-child.yaml | 252 ++++ doc/device-tree-bindings/memory/ti,gpmc.yaml | 190 +++ drivers/memory/Kconfig | 16 + drivers/memory/Makefile | 1 + drivers/memory/ti-gpmc.c | 1237 +++++++++++++++++ drivers/memory/ti-gpmc.h | 298 ++++ include/linux/mtd/omap_gpmc.h | 3 + scripts/Makefile.spl | 1 + 8 files changed, 1998 insertions(+) create mode 100644 doc/device-tree-bindings/memory/ti,gpmc-child.yaml create mode 100644 doc/device-tree-bindings/memory/ti,gpmc.yaml create mode 100644 drivers/memory/ti-gpmc.c create mode 100644 drivers/memory/ti-gpmc.h
Signature · 1 line
2.17.1
PATCH 1/3 scripts: Makefile.spl: Enable memory drivers to be built for SPL
We will need ti-gpmc driver for SPL. Allow memory drivers do be built for SPL.
--- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)
scripts/Makefile.spl +1 -0
@@ -114,6 +114,7 @@ libs-$(CONFIG_PARTITIONS) += disk/ endif libs-y += drivers/ +libs-y += drivers/memory/ libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/dwc3/ libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/cdns3/ libs-y += dts/
Signature · 1 line
2.17.1
PATCH 2/3 dt/bindings: memory: Add bindings for TI GPMC driver
In reply to Roger QuadrosGPMC stands for General Purpose Memory Controller and it is present on many Texas Instruments SoCs.
It supports a number of Asynchronous and Synchronous interfaces and has various settings to configure the bus interface.
The DT bindings define all the various GPMC settings.
As the GPMC supports multiple devices on the bus, each device is represented as a child and the respective GPMC settings are situated there. (see ti,gpmc-child.yaml)
These binding docs are picked up from the Linux kernel.
--- .../memory/ti,gpmc-child.yaml | 252 ++++++++++++++++++ doc/device-tree-bindings/memory/ti,gpmc.yaml | 190 +++++++++++++ 2 files changed, 442 insertions(+) create mode 100644 doc/device-tree-bindings/memory/ti,gpmc-child.yaml create mode 100644 doc/device-tree-bindings/memory/ti,gpmc.yaml
doc/device-tree-bindings/memory/ti,gpmc-child.yaml new file +252 -0
@@ -0,0 +1,252 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/memory-controllers/ti,gpmc-child.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: device tree bindings for children of the Texas Instruments GPMC + +maintainers: + - Tony Lindgren <[email protected]> + - Roger Quadros <[email protected]> + +description: + This binding is meant for the child nodes of the GPMC node. The node + represents any device connected to the GPMC bus. It may be a Flash chip, + RAM chip or Ethernet controller, etc. These properties are meant for + configuring the GPMC settings/timings and will accompany the bindings + supported by the respective device. + +properties: + reg: true + +# GPMC Timing properties for child nodes. All are optional and default to 0. + gpmc,sync-clk-ps: + description: Minimum clock period for synchronous mode + default: 0 + +# Chip-select signal timings corresponding to GPMC_CONFIG2: + gpmc,cs-on-ns: + description: Assertion time + default: 0 + + gpmc,cs-rd-off-ns: + description: Read deassertion time + default: 0 + + gpmc,cs-wr-off-ns: + description: Write deassertion time + default: 0 + +# ADV signal timings corresponding to GPMC_CONFIG3: + gpmc,adv-on-ns: + description: Assertion time + default: 0 + + gpmc,adv-rd-off-ns: + description: Read deassertion time + default: 0 + + gpmc,adv-wr-off-ns: + description: Write deassertion time + default: 0 + + gpmc,adv-aad-mux-on-ns: + description: Assertion time for AAD + default: 0 + + gpmc,adv-aad-mux-rd-off-ns: + description: Read deassertion time for AAD + default: 0 + + gpmc,adv-aad-mux-wr-off-ns: + description: Write deassertion time for AAD + default: 0 + +# WE signals timings corresponding to GPMC_CONFIG4: + gpmc,we-on-ns: + description: Assertion time + default: 0 + + gpmc,we-off-ns: + description: Deassertion time + default: 0 + +# OE signals timings corresponding to GPMC_CONFIG4: + gpmc,oe-on-ns: + description: Assertion time + default: 0 + + gpmc,oe-off-ns: + description: Deassertion time + default: 0 + + gpmc,oe-aad-mux-on-ns: + description: Assertion time for AAD + default: 0 + + gpmc,oe-aad-mux-off-ns: + description: Deassertion time for AAD + default: 0 + +# Access time and cycle time timings (in nanoseconds) corresponding to +# GPMC_CONFIG5: + gpmc,page-burst-access-ns: + description: Multiple access word delay + default: 0 + + gpmc,access-ns: + description: Start-cycle to first data valid delay + default: 0 + + gpmc,rd-cycle-ns: + description: Total read cycle time + default: 0 + + gpmc,wr-cycle-ns: + description: Total write cycle time + default: 0 + + gpmc,bus-turnaround-ns: + description: Turn-around time between successive accesses + default: 0 + + gpmc,cycle2cycle-delay-ns: + description: Delay between chip-select pulses + default: 0 + + gpmc,clk-activation-ns: + description: GPMC clock activation time + default: 0 + + gpmc,wait-monitoring-ns: + description: Start of wait monitoring with regard to valid data + default: 0 + +# Boolean timing parameters. If property is present, parameter is enabled +# otherwise disabled. + gpmc,adv-extra-delay: + description: ADV signal is delayed by half GPMC clock + type: boolean + + gpmc,cs-extra-delay: + description: CS signal is delayed by half GPMC clock + type: boolean + + gpmc,cycle2cycle-diffcsen: + description: | + Add "cycle2cycle-delay" between successive accesses + to a different CS + type: boolean + + gpmc,cycle2cycle-samecsen: + description: | + Add "cycle2cycle-delay" between successive accesses + to the same CS + type: boolean + + gpmc,oe-extra-delay: + description: OE signal is delayed by half GPMC clock + type: boolean + + gpmc,we-extra-delay: + description: WE signal is delayed by half GPMC clock + type: boolean + + gpmc,time-para-granularity: + description: Multiply all access times by 2 + type: boolean + +# The following two properties are applicable only to OMAP3+ and AM335x: + gpmc,wr-access-ns: + description: | + In synchronous write mode, for single or + burst accesses, defines the number of + GPMC_FCLK cycles from start access time + to the GPMC_CLK rising edge used by the + memory device for the first data capture. + default: 0 + + gpmc,wr-data-mux-bus-ns: + description: | + In address-data multiplex mode, specifies + the time when the first data is driven on + the address-data bus. + default: 0 + +# GPMC chip-select settings properties for child nodes. All are optional. + gpmc,burst-length: + description: Page/burst length. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 4, 8, 16] + default: 0 + + gpmc,burst-wrap: + description: Enables wrap bursting + type: boolean + + gpmc,burst-read: + description: Enables read page/burst mode + type: boolean + + gpmc,burst-write: + description: Enables write page/burst mode + type: boolean + + gpmc,device-width: + description: | + Total width of device(s) connected to a GPMC + chip-select in bytes. The GPMC supports 8-bit + and 16-bit devices and so this property must be + 1 or 2. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2] + default: 1 + + gpmc,mux-add-data: + description: | + Address and data multiplexing configuration. + Valid values are + 0 for Non multiplexed mode + 1 for address-address-data multiplexing mode and + 2 for address-data multiplexing mode. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2] + + gpmc,sync-read: + description: | + Enables synchronous read. Defaults to asynchronous + is this is not set. + type: boolean + + gpmc,sync-write: + description: | + Enables synchronous writes. Defaults to asynchronous + is this is not set. + type: boolean + + gpmc,wait-pin: + description: | + Wait-pin used by client. Must be less than "gpmc,num-waitpins". + $ref: /schemas/types.yaml#/definitions/uint32 + + gpmc,wait-pin-polarity: + description: | + Set the desired polarity for the selected wait pin. + 0 for active low, 1 for active high. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + + gpmc,wait-on-read: + description: Enables wait monitoring on reads. + type: boolean + + gpmc,wait-on-write: + description: Enables wait monitoring on writes. + type: boolean + +required: + - reg + +# the GPMC child will have its own native properties +additionalProperties: true
doc/device-tree-bindings/memory/ti,gpmc.yaml new file +190 -0
190 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 3/3 memory: Add TI GPMC driver
In reply to Roger QuadrosThe GPMC is a unified memory controller dedicated for interfacing with external memory devices like
- Asynchronous SRAM-like memories and ASICs
- Asynchronous, synchronous, and page mode burst NOR flash
- NAND flash
- Pseudo-SRAM devices
This driver will take care of setting up the GPMC based on the settings specified in the Device tree and then probe its children.
--- drivers/memory/Kconfig | 16 + drivers/memory/Makefile | 1 + drivers/memory/ti-gpmc.c | 1237 +++++++++++++++++++++++++++++++++ drivers/memory/ti-gpmc.h | 298 ++++++++ include/linux/mtd/omap_gpmc.h | 3 + 5 files changed, 1555 insertions(+) create mode 100644 drivers/memory/ti-gpmc.c create mode 100644 drivers/memory/ti-gpmc.h
drivers/memory/Kconfig +16 -0
@@ -24,4 +24,20 @@ config TI_AEMIF of 256M bytes of any of these memories can be accessed at a given time via four chip selects with 64M byte access per chip select. +config TI_GPMC + bool "Texas Instruments GPMC driver" + depends on ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3 + help + This driver is for the General Purpose Memory Controller (GPMC) + present on Texas Instruments SoCs (e.g. OMAP2+). GPMC allows + interfacing to a variety of asynchronous as well as synchronous + memory drives like NOR, NAND, OneNAND, SRAM. + +config TI_GPMC_DEBUG + bool "Debug Texas Instruments GPMC timings" + default n + help + Enable this to print GPMC timings before and after the GPMC registers + are programmed. This should not be left enabled on production systems. + endmenu
drivers/memory/Makefile +1 -0
@@ -1,3 +1,4 @@ obj-$(CONFIG_STM32_FMC2_EBI) += stm32-fmc2-ebi.o obj-$(CONFIG_TI_AEMIF) += ti-aemif.o +obj-$(CONFIG_TI_GPMC) += ti-gpmc.o
drivers/memory/ti-gpmc.c new file +1237 -0
1,237 lines not on this page · raw message
drivers/memory/ti-gpmc.h new file +298 -0
298 lines not on this page · raw message
include/linux/mtd/omap_gpmc.h +3 -0
@@ -8,6 +8,9 @@#ifndef __ASM_OMAP_GPMC_H#define __ASM_OMAP_GPMC_H +/* Maximum Number of Chip Selects */ +#define GPMC_CS_NUM 8 +#define GPMC_BUF_EMPTY 0#define GPMC_BUF_FULL 1#define GPMC_MAX_SECTORS 8
Signature · 1 line
2.17.1
Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL
In reply to Roger QuadrosHi Roger,
Quoted 8 lines · Roger Quadros
We will need ti-gpmc driver for SPL. Allow memory drivers do be built for SPL.
Signed-off-by Roger Quadros <[email protected]>--- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)
Please can you use the existing drivers/ram directory?
Quoted 14 lines
scripts/Makefile.spl +1
-1@@ -114,6 +114,7 @@ libs-$(CONFIG_PARTITIONS) += disk/ endif libs-y += drivers/ +libs-y += drivers/memory/ libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/dwc3/ libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/cdns3/ libs-y += dts/ --
Quoted 2 lines
2.17.1
Regards,
Simon
Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL
Hi Simon,
Quoted 7 lines · Simon Glass
Hi Roger,
Quoted 4 lines · Roger Quadros
We will need ti-gpmc driver for SPL. Allow memory drivers do be built for SPL.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Roger Quadros <[email protected]>--- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)Please can you use the existing
drivers/ramdirectory?
The ti-gpmc driver is not actually a RAM only controller. Although it can support SRAM. It is a more general purpose controller that can support different peripherals. It is similar to the drivers already existing in the divers/memory directory.
I was just trying to keep the file layout similar to that in the Linux kernel.
Do you still see a problem with it?
Quoted 9 lines
Quoted 9 lines
scripts/Makefile.spl +0
-0@@ -114,6 +114,7 @@ libs-$(CONFIG_PARTITIONS) += disk/ endif
Quoted 11 lines
Quoted 8 lines
scripts/Makefile.spl +1
-1libs-y += drivers/ +libs-y += drivers/memory/ libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/dwc3/ libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/cdns3/ libs-y += dts/ --2.17.1
Regards,
Simon
cheers,
-roger
Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL
Quoted 17 lines · Roger Quadros
Hi Simon,
Quoted 7 lines · Simon Glass
Hi Roger,
Quoted 4 lines · Roger Quadros
We will need ti-gpmc driver for SPL. Allow memory drivers do be built for SPL.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Roger Quadros <[email protected]>--- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)Please can you use the existing
drivers/ramdirectory?
Quoted 7 lines
The ti-gpmc driver is not actually a RAM only controller. Although it can support SRAM. It is a more general purpose controller that can support different peripherals. It is similar to the drivers already existing in the divers/memory directory.
I was just trying to keep the file layout similar to that in the Linux kernel.
Do you still see a problem with it?
Yes, this makes sense because it's not a ram controller driver.
Signature · 1 line
Tom
Quoted 9 lines · Roger Quadros
Hi,
The GPMC is a unified memory controller dedicated for interfacing with external memory devices like
- Asynchronous SRAM-like memories and ASICs
- Asynchronous, synchronous, and page mode burst NOR flash
- NAND flash
- Pseudo-SRAM devices
Quoted 3 lines
This driver will take care of setting up the GPMC based on the settings specified in the Device tree and then probe its children.
Does this mean we'll be seeing some updates to (or removal of) the existing nand/gpmc code under arch/arm/mach-omap2 ?
Signature · 1 line
Tom
Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL
In reply to Roger QuadrosHi Roger,
Quoted 18 lines · Roger Quadros
Hi Simon,
Quoted 7 lines · Simon Glass
Hi Roger,
Quoted 4 lines · Roger Quadros
We will need ti-gpmc driver for SPL. Allow memory drivers do be built for SPL.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Roger Quadros <[email protected]>--- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)Please can you use the existing
drivers/ramdirectory?
Quoted 7 lines
The ti-gpmc driver is not actually a RAM only controller. Although it can support SRAM. It is a more general purpose controller that can support different peripherals. It is similar to the drivers already existing in the divers/memory directory.
I was just trying to keep the file layout similar to that in the Linux kernel.
Do you still see a problem with it?
Well in this case perhaps the RAM device would be a child of this one?
But there is no uclass for your new device. One of the drivers in that dir uses UCLASS_NOP and your one seems to use UCLASS_SIMPLE_BUS
So let's add a uclass for it and describe exactly what it is for.
Regards,
Simon
Hi Tom,
Quoted 11 lines · Tom Rini
Quoted 9 lines · Roger Quadros
Hi,
The GPMC is a unified memory controller dedicated for interfacing with external memory devices like
- Asynchronous SRAM-like memories and ASICs
- Asynchronous, synchronous, and page mode burst NOR flash
- NAND flash
- Pseudo-SRAM devices
Quoted 7 lines
Quoted 3 lines
This driver will take care of setting up the GPMC based on the settings specified in the Device tree and then probe its children.
Does this mean we'll be seeing some updates to (or removal of) the existing nand/gpmc code under
arch/arm/mach-omap2?
My initial plan was to get AM64 NAND to work without requiring any arch specific code.
This should eventually be usable for mach-omap2 as well.
We can then get rid of /arch/arm/mach-omap2/mem-common.c
I have an omap3-beagle with NAND support with me so I could at least get it working on that board.
It should be pretty much the same for all mach-omap2 boards.
cheers,
-roger
Quoted 26 lines · Roger Quadros
Hi Tom,
Quoted 11 lines · Tom Rini
Quoted 9 lines · Roger Quadros
Hi,
The GPMC is a unified memory controller dedicated for interfacing with external memory devices like
- Asynchronous SRAM-like memories and ASICs
- Asynchronous, synchronous, and page mode burst NOR flash
- NAND flash
- Pseudo-SRAM devicesQuoted 7 lines
Quoted 3 lines
This driver will take care of setting up the GPMC based on the settings specified in the Device tree and then probe its children.
Does this mean we'll be seeing some updates to (or removal of) the existing nand/gpmc code under
arch/arm/mach-omap2?My initial plan was to get AM64 NAND to work without requiring any arch specific code.
This should eventually be usable for mach-omap2 as well.
Quoted 6 lines
We can then get rid of /arch/arm/mach-omap2/mem-common.c
I have an omap3-beagle with NAND support with me so I could at least get it working on that board.
It should be pretty much the same for all mach-omap2 boards.
Sounds good, thanks!
Signature · 1 line
Tom
Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL
In reply to Simon GlassSimon,
Quoted 25 lines · Simon Glass
Hi Roger,
Quoted 22 lines · Roger Quadros
Hi Simon,
Quoted 7 lines · Simon Glass
Hi Roger,
Quoted 4 lines · Roger Quadros
We will need ti-gpmc driver for SPL. Allow memory drivers do be built for SPL.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Roger Quadros <[email protected]>--- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)Please can you use the existing
drivers/ramdirectory?The ti-gpmc driver is not actually a RAM only controller. Although it can support SRAM. It is a more general purpose controller that can support different peripherals. It is similar to the drivers already existing in the divers/memory directory.
Quoted 5 lines
Quoted 3 lines
I was just trying to keep the file layout similar to that in the Linux kernel.
Do you still see a problem with it?
Well in this case perhaps the RAM device would be a child of this one?
That's right.
Quoted 5 lines
But there is no uclass for your new device. One of the drivers in that dir uses
UCLASS_NOPand your one seems to useUCLASS_SIMPLE_BUSSo let's add a uclass for it and describe exactly what it is for.
Why isn't UCLASS_SIMPLE_BUS sufficient?
By itself, the GPMC driver doesn't offer any usable functionality. It just configures the bus interface and then populates the children.
cheers,
-roger
Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL
Hi Roger,
Quoted 37 lines · Roger Quadros
Simon,
Quoted 25 lines · Simon Glass
Hi Roger,
Quoted 22 lines · Roger Quadros
Hi Simon,
Quoted 7 lines · Simon Glass
Hi Roger,
Quoted 4 lines · Roger Quadros
We will need ti-gpmc driver for SPL. Allow memory drivers do be built for SPL.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Roger Quadros <[email protected]>--- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)Please can you use the existing
drivers/ramdirectory?The ti-gpmc driver is not actually a RAM only controller. Although it can support SRAM. It is a more general purpose controller that can support different peripherals. It is similar to the drivers already existing in the divers/memory directory.
Quoted 5 lines
Quoted 3 lines
I was just trying to keep the file layout similar to that in the Linux kernel.
Do you still see a problem with it?
Well in this case perhaps the RAM device would be a child of this one?
That's right.
Quoted 1 line
Quoted 8 lines
Quoted 4 lines
But there is no uclass for your new device. One of the drivers in that dir uses
UCLASS_NOPand your one seems to useUCLASS_SIMPLE_BUSSo let's add a uclass for it and describe exactly what it is for.
Why isn't
UCLASS_SIMPLE_BUSsufficient?
By itself, the GPMC driver doesn't offer any usable functionality. It just configures the bus interface and then populates the children.
That's OK, but in that case it should go in drivers/bus and perhaps drivers/memory should go away?
Regards,
Simon
Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL
Quoted 43 lines · Simon Glass
Hi Roger,
Quoted 40 lines · Roger Quadros
Simon,
Quoted 25 lines · Simon Glass
Hi Roger,
Quoted 22 lines · Roger Quadros
Hi Simon,
Quoted 7 lines · Simon Glass
Hi Roger,
Quoted 4 lines · Roger Quadros
We will need ti-gpmc driver for SPL. Allow memory drivers do be built for SPL.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Roger Quadros <[email protected]>--- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)Please can you use the existing
drivers/ramdirectory?The ti-gpmc driver is not actually a RAM only controller. Although it can support SRAM. It is a more general purpose controller that can support different peripherals. It is similar to the drivers already existing in the divers/memory directory.
Quoted 5 lines
Quoted 3 lines
I was just trying to keep the file layout similar to that in the Linux kernel.
Do you still see a problem with it?
Well in this case perhaps the RAM device would be a child of this one?
That's right.
Quoted 4 lines
But there is no uclass for your new device. One of the drivers in that dir uses
UCLASS_NOPand your one seems to useUCLASS_SIMPLE_BUS
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
So let's add a uclass for it and describe exactly what it is for.
Why isn't
UCLASS_SIMPLE_BUSsufficient?
By itself, the GPMC driver doesn't offer any usable functionality. It just configures the bus interface and then populates the children.That's OK, but in that case it should go in
drivers/busand perhapsdrivers/memoryshould go away?
No, drivers/memory/stm32-fmc2-ebi.c is there and is the equivalent (more or less) of drivers/memory/stm32-fmc2-ebi.c in the linux kernel. So maybe a question is, are we talking about the equivalent of drivers/memory/omap-gpmc.c here? Or something else?
Signature · 1 line
Tom
Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL
Quoted 50 lines · Tom Rini
Quoted 49 lines · Simon Glass
Hi Roger,
Quoted 45 lines · Roger Quadros
Simon,
Quoted 25 lines · Simon Glass
Hi Roger,
Quoted 22 lines · Roger Quadros
Hi Simon,
Quoted 7 lines · Simon Glass
Hi Roger,
Quoted 4 lines · Roger Quadros
We will need ti-gpmc driver for SPL. Allow memory drivers do be built for SPL.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Roger Quadros <[email protected]>--- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)Please can you use the existing
drivers/ramdirectory?The ti-gpmc driver is not actually a RAM only controller. Although it can support SRAM. It is a more general purpose controller that can support different peripherals. It is similar to the drivers already existing in the divers/memory directory.
Quoted 5 lines
Quoted 3 lines
I was just trying to keep the file layout similar to that in the Linux kernel.
Do you still see a problem with it?
Well in this case perhaps the RAM device would be a child of this one?
That's right.
Quoted 5 lines
But there is no uclass for your new device. One of the drivers in that dir uses
UCLASS_NOPand your one seems to useUCLASS_SIMPLE_BUSSo let's add a uclass for it and describe exactly what it is for.
Why isn't
UCLASS_SIMPLE_BUSsufficient?
By itself, the GPMC driver doesn't offer any usable functionality. It just configures the bus interface and then populates the children.
Quoted 8 lines
Quoted 2 lines
That's OK, but in that case it should go in
drivers/busand perhapsdrivers/memoryshould go away?No,
drivers/memory/stm32-fmc2-ebi.cis there and is the equivalent (more or less) ofdrivers/memory/stm32-fmc2-ebi.cin the linux kernel. So maybe a question is, are we talking about the equivalent ofdrivers/memory/omap-gpmc.chere? Or something else?
Yes, I just picked up that file and adapted it for u-boot. As GPMC is not only for OMAP devices anymore I renamed it to ti-gpmc.c. If it helps we can retain the kernel naming.
cheers,
-roger
Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL
Hi,
Quoted 61 lines · Roger Quadros
Quoted 50 lines · Tom Rini
Quoted 49 lines · Simon Glass
Hi Roger,
Quoted 45 lines · Roger Quadros
Simon,
Quoted 25 lines · Simon Glass
Hi Roger,
Quoted 22 lines · Roger Quadros
Hi Simon,
Quoted 7 lines · Simon Glass
Hi Roger,
Quoted 4 lines · Roger Quadros
We will need ti-gpmc driver for SPL. Allow memory drivers do be built for SPL.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Roger Quadros <[email protected]>--- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)Please can you use the existing
drivers/ramdirectory?The ti-gpmc driver is not actually a RAM only controller. Although it can support SRAM. It is a more general purpose controller that can support different peripherals. It is similar to the drivers already existing in the divers/memory directory.
Quoted 5 lines
Quoted 3 lines
I was just trying to keep the file layout similar to that in the Linux kernel.
Do you still see a problem with it?
Well in this case perhaps the RAM device would be a child of this one?
That's right.
Quoted 5 lines
But there is no uclass for your new device. One of the drivers in that dir uses
UCLASS_NOPand your one seems to useUCLASS_SIMPLE_BUSSo let's add a uclass for it and describe exactly what it is for.
Why isn't
UCLASS_SIMPLE_BUSsufficient?
By itself, the GPMC driver doesn't offer any usable functionality. It just configures the bus interface and then populates the children.Quoted 8 lines
Quoted 2 lines
That's OK, but in that case it should go in
drivers/busand perhapsdrivers/memoryshould go away?No,
drivers/memory/stm32-fmc2-ebi.cis there and is the equivalent (more or less) ofdrivers/memory/stm32-fmc2-ebi.cin the linux kernel. So maybe a question is, are we talking about the equivalent ofdrivers/memory/omap-gpmc.chere? Or something else?
Quoted 3 lines
Yes, I just picked up that file and adapted it for u-boot. As GPMC is not only for OMAP devices anymore I renamed it to
ti-gpmc.c. If it helps we can retain the kernel naming.
In the fullness of time all driver/xxx directories should have a uclass associated with them. So in this case, do we want to use UCLASS_BUS and put it in drivers/bus or add a UCLASS_MEMORY and put it in drivers/memory?
Regards,
Simon
Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL
Hi,
Quoted 64 lines · Simon Glass
Hi,
Quoted 61 lines · Roger Quadros
Quoted 58 lines · Tom Rini
Quoted 43 lines · Simon Glass
Hi Roger,
Quoted 40 lines · Roger Quadros
Simon,
Quoted 25 lines · Simon Glass
Hi Roger,
Quoted 22 lines · Roger Quadros
Hi Simon,
Quoted 7 lines · Simon Glass
Hi Roger,
Quoted 4 lines · Roger Quadros
We will need ti-gpmc driver for SPL. Allow memory drivers do be built for SPL.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Roger Quadros <[email protected]>--- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)Please can you use the existing
drivers/ramdirectory?The ti-gpmc driver is not actually a RAM only controller. Although it can support SRAM. It is a more general purpose controller that can support different peripherals. It is similar to the drivers already existing in the divers/memory directory.
Quoted 5 lines
Quoted 3 lines
I was just trying to keep the file layout similar to that in the Linux kernel.
Do you still see a problem with it?
Well in this case perhaps the RAM device would be a child of this one?
That's right.
Quoted 4 lines
But there is no uclass for your new device. One of the drivers in that dir uses
UCLASS_NOPand your one seems to useUCLASS_SIMPLE_BUSQuoted 8 lines
Quoted 5 lines
Quoted 1 line
So let's add a uclass for it and describe exactly what it is for.
Why isn't
UCLASS_SIMPLE_BUSsufficient?
By itself, the GPMC driver doesn't offer any usable functionality. It just configures the bus interface and then populates the children.That's OK, but in that case it should go in
drivers/busand perhapsdrivers/memoryshould go away?No,
drivers/memory/stm32-fmc2-ebi.cis there and is the equivalent (more or less) ofdrivers/memory/stm32-fmc2-ebi.cin the linux kernel. So maybe a question is, are we talking about the equivalent ofdrivers/memory/omap-gpmc.chere? Or something else?
Quoted 8 lines
Quoted 3 lines
Yes, I just picked up that file and adapted it for u-boot. As GPMC is not only for OMAP devices anymore I renamed it to
ti-gpmc.c. If it helps we can retain the kernel naming.In the fullness of time all driver/xxx directories should have a uclass associated with them. So in this case, do we want to use
UCLASS_BUSand put it indrivers/busor add aUCLASS_MEMORYand put it indrivers/memory?
I'd opt for UCLASS_MEMORY.
cheers,
-roger
Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL
Hi Roger,
Quoted 72 lines · Roger Quadros
Hi,
Quoted 68 lines · Simon Glass
Hi,
Quoted 64 lines · Roger Quadros
Quoted 50 lines · Tom Rini
Quoted 49 lines · Simon Glass
Hi Roger,
Quoted 45 lines · Roger Quadros
Simon,
Quoted 25 lines · Simon Glass
Hi Roger,
Quoted 22 lines · Roger Quadros
Hi Simon,
Quoted 7 lines · Simon Glass
Hi Roger,
Quoted 4 lines · Roger Quadros
We will need ti-gpmc driver for SPL. Allow memory drivers do be built for SPL.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Roger Quadros <[email protected]>--- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)Please can you use the existing
drivers/ramdirectory?The ti-gpmc driver is not actually a RAM only controller. Although it can support SRAM. It is a more general purpose controller that can support different peripherals. It is similar to the drivers already existing in the divers/memory directory.
Quoted 5 lines
Quoted 3 lines
I was just trying to keep the file layout similar to that in the Linux kernel.
Do you still see a problem with it?
Well in this case perhaps the RAM device would be a child of this one?
That's right.
Quoted 5 lines
But there is no uclass for your new device. One of the drivers in that dir uses
UCLASS_NOPand your one seems to useUCLASS_SIMPLE_BUSSo let's add a uclass for it and describe exactly what it is for.
Why isn't
UCLASS_SIMPLE_BUSsufficient?
By itself, the GPMC driver doesn't offer any usable functionality. It just configures the bus interface and then populates the children.Quoted 8 lines
Quoted 2 lines
That's OK, but in that case it should go in
drivers/busand perhapsdrivers/memoryshould go away?No,
drivers/memory/stm32-fmc2-ebi.cis there and is the equivalent (more or less) ofdrivers/memory/stm32-fmc2-ebi.cin the linux kernel. So maybe a question is, are we talking about the equivalent ofdrivers/memory/omap-gpmc.chere? Or something else?Yes, I just picked up that file and adapted it for u-boot. As GPMC is not only for OMAP devices anymore I renamed it to
ti-gpmc.c. If it helps we can retain the kernel naming.
Quoted 6 lines
Quoted 4 lines
In the fullness of time all driver/xxx directories should have a uclass associated with them. So in this case, do we want to use
UCLASS_BUSand put it indrivers/busor add aUCLASS_MEMORYand put it indrivers/memory?I'd opt for
UCLASS_MEMORY.
OK, here is an example patch for adding a new uclass:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
It is the bare minimum as it has not methods, but it seems like yours won't either.
Regards,
Simon