On Tue, Mar 08, 2016 at 08:25:47AM +0530, Vinod Koul wrote:
> On Mon, Mar 07, 2016 at 09:30:24PM +0100, Maxime Ripard wrote:
> > On Mon, Mar 07, 2016 at 04:08:57PM +0100, Boris Brezillon wrote:
Also just noticed the subsystem name on this is not correct, pls fix that in
subsequent posting
--
On Mon, Mar 07, 2016 at 09:30:24PM +0100, Maxime Ripard wrote:
> On Mon, Mar 07, 2016 at 04:08:57PM +0100, Boris Brezillon wrote:
> > Hi Vinod,
> >
> > On Mon, 7 Mar 2016 20:24:29 +0530
> > Vinod Koul wrote:
> >
> > > On Mon, Mar 07, 2016 at 10:59:31AM +0100, Boris
Hi,
On Sun, Mar 6, 2016 at 1:32 PM, wrote:
> 2016. február 17., szerda 18:16:09 UTC+1 időpontban txsa...@gmail.com a
> következőt írta:
>> Hi
>>
>> I have a Cubieboard2 device, is Allwinner A20 SOC, running and Armbian 5.00
>> with kernel 4.4.1.
>>
>> As in the latest
On Mon, Mar 07, 2016 at 04:08:57PM +0100, Boris Brezillon wrote:
> Hi Vinod,
>
> On Mon, 7 Mar 2016 20:24:29 +0530
> Vinod Koul wrote:
>
> > On Mon, Mar 07, 2016 at 10:59:31AM +0100, Boris Brezillon wrote:
> > > +/* Dedicated DMA parameter register layout */
> > > +#define
On 2016-03-07 01:47, Boris Brezillon wrote:
> Implementing the mtd_ooblayout_ops interface is the new way of exposing
> ECC/OOB layout to MTD users.
Hi Boris,
Tested this revision, works out of the box now!
Thanks!
Tested-by: Stefan Agner
Acked-by: Stefan Agner
Hi,
El 07/03/16 a las 12:47, Boris Brezillon escribió:
(...)
>> Does SPI refer the Serial Peripheral Interface?
>>
>> If yes, then I would point out that current sun4i SPI driver doesn't
>> actually use DMA [1]
>>
>> http://lists.infradead.org/pipermail/linux-arm-kernel/2016-February/411
>>
Thierry,
On Thu, Feb 25, 2016 at 3:14 PM, Doug Anderson wrote:
> So just to summarize:
>
> * Add pwm_get_state(), pwm_apply_state(), pwm_get_args().
> pwm_get_state() initially returns 0 for duty cycle if driver doesn't
> support readout.
>
> * Re-implement pwm_get_period()
NFC_ECC_ERR_CNT() is not taking into account the case when the NAND chip
contains more than 4 ECC blocks (NANDs with 4kB+ pages).
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sunxi_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
Replace open coded polling loops by readl_poll_timeout() calls.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sunxi_nand.c | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git
->dev_ready() is not supposed to wait for busy to ready solution (this is
the role of ->waitfunc()).
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sunxi_nand.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/mtd/nand/sunxi_nand.c
Try to pack address and command cycles into a single NAND controller
command to avoid polling the status register for each single change
on the NAND bus.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sunxi_nand.c | 52
Some NAND operations are so fast that it doesn't make any sense to use
interrupt based waits (the scheduling overhead is not worth it).
Rename sunxi_nfc_wait_int() into sunxi_nfc_wait_events() and add a
parameter to specify whether polling should be used or not.
Note that all sunxi_nfc_wait_int()
When the NAND controller operates in DMA mode it can pipeline ECC
operations which improves the throughput.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sunxi_nand.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
NFC_PAGE_SHIFT() already takes the real page_shift value and subtract 10
to it.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sunxi_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/sunxi_nand.c
We don't need to manually toggle the CE line since the controller handles
it for us. Moreover, keeping the CE line low when interacting with a DDR
NAND can be problematic (data loss in some corner cases).
Signed-off-by: Boris Brezillon
---
mod and ahb clocks are not disabled when the NAND controller device is
removed.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sunxi_nand.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mtd/nand/sunxi_nand.c
Hi,
This patchset aims at fixing a few minor bugs, and improving performances
of NAND accesses going through the sunxi NAND controller.
Note that patch 5 exports functions provided by the core which are needed
in patch 6 to still support raw OOB accesses. Other patches are just
fixes or
The ONFI spec says that EDO should be enabled if the host drives tRC less
than 30ns, but the code just tests for the tRC_min value extracted from
the timings exposed by the NAND chip not the timings actually configured
in the NAND controller.
Fix that by first rounding down the requested clk_rate
Allwinner's ECC engine is capable of protecting a few bytes of the OOB
area. Implement specific OOB functions to benefit from this capability.
Also, when in raw mode, the randomizer is disabled, which means you'll
only be able to retrieve randomized data, which is not really useful
for most
Being able to read subpages can greatly improve read performances if the
MTD user is only interested in a small section of a NAND page.
This is particularly true with large pages (>= 8k).
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sunxi_nand.c | 36
sunxi_nand_chip_set_timings() is extracting a pointer to the nfc from the
nand->controller field, but this field is initialized after
sunxi_nand_chip_set_timings() call.
Reorder the calls to avoid any problem.
Signed-off-by: Boris Brezillon
---
Adapt the NAND controller clk rate to the tWB, tADL, tWHR and tRHW
timings instead of returning an error when the maximum clk divisor is
not big enough to provide an appropriate timing.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sunxi_nand.c | 12
Export the default read/write oob functions (for the standard and syndrome
scheme), so that drivers can use them for their raw implementation and
implement their own functions for the normal oob operation.
This is required if your ECC engine is capable of fixing some of the OOB
data. In this case
Unlike what is specified in the Allwinner datasheets, the NAND clock rate
is not equal to 2/T but 1/T. Fix the clock rate selection accordingly.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sunxi_nand.c | 8 +---
1 file changed, 1 insertion(+), 7
Hi Priit,
On Mon, 07 Mar 2016 17:30:41 +0200
Priit Laes wrote:
> On Mon, 2016-03-07 at 10:59 +0100, Boris Brezillon wrote:
> > Some drivers might need to tweak the block size and wait cycles
> > values
> > to get better performances.
> > Create and export the
Hi Vinod,
On Mon, 7 Mar 2016 20:24:29 +0530
Vinod Koul wrote:
> On Mon, Mar 07, 2016 at 10:59:31AM +0100, Boris Brezillon wrote:
> > +/* Dedicated DMA parameter register layout */
> > +#define SUN4I_DDMA_PARA_DST_DATA_BLK_SIZE(n) (((n) - 1) << 24)
> > +#define
On Mon, Mar 07, 2016 at 10:59:31AM +0100, Boris Brezillon wrote:
> +/* Dedicated DMA parameter register layout */
> +#define SUN4I_DDMA_PARA_DST_DATA_BLK_SIZE(n) (((n) - 1) << 24)
> +#define SUN4I_DDMA_PARA_DST_WAIT_CYCLES(n) (((n) - 1) << 16)
> +#define SUN4I_DDMA_PARA_SRC_DATA_BLK_SIZE(n)
Some drivers might need to tweak the block size and wait cycles values
to get better performances.
Create and export the sun4i_dma_set_chan_config() to do that.
Signed-off-by: Boris Brezillon
---
drivers/dma/sun4i-dma.c | 44
Now that all MTD drivers have moved to the mtd_ooblayout_ops model we can
safely remove the struct nand_ecclayout definition, and all the remaining
places where it was still used.
Signed-off-by: Boris Brezillon
---
drivers/mtd/mtdchar.c | 12 ++---
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sunxi_nand.c | 114 +++---
1 file changed, 52 insertions(+), 62
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users. Modify the onenand drivers to switch to this
approach.
Signed-off-by: Boris Brezillon
---
drivers/mtd/onenand/onenand_base.c | 162
Now that all NAND drivers have switch to mtd_ooblayout_ops, we can kill
the ecc->layout field.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/nand_base.c | 7 ---
drivers/mtd/nand/nand_bch.c | 9 -
include/linux/mtd/nand.h | 2 --
3
Replace the nand_ecclayout definition by the equivalent mtd_ooblayout_ops
definition.
Signed-off-by: Boris Brezillon
---
drivers/staging/mt29f_spinand/mt29f_spinand.c | 48 +--
1 file changed, 30 insertions(+), 18 deletions(-)
diff
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sm_common.c | 93
1 file changed, 77 insertions(+), 16
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
Tested-by: Harvey Hunt
---
drivers/mtd/nand/jz4780_nand.c | 19 +--
1 file changed, 5
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/pxa3xx_nand.c | 104 +
1 file changed, 64 insertions(+), 40
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/mxc_nand.c | 212 ++--
1 file changed, 105 insertions(+), 107
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/sh_flctl.c | 87 ++---
1 file changed, 67 insertions(+), 20
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/s3c2410.c | 32 +++-
1 file changed, 27 insertions(+), 5 deletions(-)
diff
Now that mtd_ooblayout_ecc() returns the ECC byte position using the
OOB free method, we can get rid of the fsmc_nand_eccplace struct.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/fsmc_nand.c | 60 +++-
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/hisi504_nand.c | 26 +++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/omap2.c | 194 +++
1 file changed, 113 insertions(+), 81
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 52 ++
1 file changed, 40 insertions(+), 12
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/lpc32xx_mlc.c | 50 --
drivers/mtd/nand/lpc32xx_slc.c | 41
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/fsmc_nand.c | 298 ---
1 file changed, 82 insertions(+), 216
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/fsl_ifc_nand.c | 230
1 file changed, 66 insertions(+), 164
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/docg4.c | 33 -
1 file changed, 28 insertions(+), 5 deletions(-)
diff
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/diskonchip.c | 60 ---
1 file changed, 45 insertions(+), 15
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/brcmnand/brcmnand.c | 258 +--
1 file changed, 157 insertions(+), 101
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/cafe_nand.c | 44
1 file changed, 32 insertions(+), 12
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/bf5xx_nand.c | 51 ---
1 file changed, 28 insertions(+), 23
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/davinci_nand.c | 118 +++-
1 file changed, 44 insertions(+), 74
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/denali.c | 50 +--
1 file changed, 35 insertions(+), 15
The mtd_ooblayout_xxx() helper functions have been added to avoid direct
accesses to the ecclayout field, and thus ease for future reworks.
Use these helpers in all places where the oobfree[] and eccpos[] arrays
where directly accessed.
Signed-off-by: Boris Brezillon
ECC layout definitions are currently exposed using the nand_ecclayout
struct which embeds oobfree and eccpos arrays with predefined size.
This approach was acceptable when NAND chips were providing relatively
small OOB regions, but MLC and TLC now provide OOB regions of several
hundreds of bytes,
Replace the nand_ecclayout definition by the equivalent mtd_ooblayout_ops
definition.
Signed-off-by: Boris Brezillon
Acked-by: Robert Jarzmik
---
drivers/mtd/devices/docg3.c | 46 ++---
1 file
Replace the default nand_ecclayout definitions for large and small page
devices with the equivalent mtd_ooblayout_ops.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/nand_base.c | 148 ---
include/linux/mtd/nand.h
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
arch/arm/mach-pxa/spitz.c | 55 -
drivers/mtd/nand/sharpsl.c | 2 +-
Use the mtd_set_ecclayout() helper instead of directly assigning the
mtd->ecclayout field.
Signed-off-by: Boris Brezillon
---
drivers/mtd/mtdconcat.c | 2 +-
drivers/mtd/mtdpart.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
The mtd_ooblayout_xxx() helper functions have been added to avoid direct
accesses to the ecclayout field, and thus ease for future reworks.
Use these helpers in all places where the oobfree[] and eccpos[] arrays
where directly accessed.
Signed-off-by: Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/atmel_nand.c | 84 ---
1 file changed, 38 insertions(+), 46
Implementing the mtd_ooblayout_ops interface is the new way of exposing
ECC/OOB layout to MTD users.
Signed-off-by: Boris Brezillon
---
arch/mips/include/asm/mach-jz4740/jz4740_nand.h | 2 +-
arch/mips/jz4740/board-qi_lb60.c| 87
Use the mtd_set_ecclayout() helper instead of directly assigning the
mtd->ecclayout field.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/nand_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/nand_base.c
Use the mtd_set_ecclayout() helper instead of directly assigning the
mtd->ecclayout field.
Signed-off-by: Boris Brezillon
---
drivers/mtd/onenand/onenand_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
The mtd_ooblayout_xxx() helper functions have been added to avoid direct
accesses to the ecclayout field, and thus ease for future reworks.
Use these helpers in all places where the oobfree[] and eccpos[] arrays
where directly accessed.
Signed-off-by: Boris Brezillon
Add an mtd_set_ecclayout() helper function to avoid direct accesses to the
mtd->ecclayout field. This will ease future reworks of ECC layout
definition.
Signed-off-by: Boris Brezillon
---
include/linux/mtd/mtd.h | 6 ++
1 file changed, 6 insertions(+)
The mtd_ooblayout_xxx() helper functions have been added to avoid direct
accesses to the ecclayout field, and thus ease for future reworks.
Use these helpers in all places where the oobfree[] and eccpos[] arrays
where directly accessed.
Signed-off-by: Boris Brezillon
Use the mtd_set_ecclayout() helper instead of directly assigning the
mtd->ecclayout field.
Signed-off-by: Boris Brezillon
Acked-by: Robert Jarzmik
---
drivers/mtd/devices/docg3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
The mtd_ooblayout_xxx() helper functions have been added to avoid direct
accesses to the ecclayout field, and thus ease for future reworks.
Use these helpers in all places where the oobfree[] and eccpos[] arrays
where directly accessed.
Signed-off-by: Boris Brezillon
The mtd_ooblayout_xxx() helper functions have been added to avoid direct
accesses to the ecclayout field, and thus ease for future reworks.
Use these helpers in all places where the oobfree[] and eccpos[] arrays
where directly accessed.
Signed-off-by: Boris Brezillon
Currently, all MTD drivers/sublayers exposing an OOB area are
doing the same kind of test to extract the available OOB size
based on the mtd_info and mtd_oob_ops structures.
Move this common logic into an inline function and make use of it.
Signed-off-by: Boris Brezillon
The mtd_ooblayout_xxx() helper functions have been added to avoid direct
accesses to the ecclayout field, and thus ease for future reworks.
Use these helpers in all places where the oobfree[] and eccpos[] arrays
where directly accessed.
Signed-off-by: Boris Brezillon
Hello,
This patchset aims at getting rid of the nand_ecclayout limitations.
struct nand_ecclayout is defining fixed eccpos and oobfree arrays which
can only be increased by modifying the MTD_MAX_ECCPOS_ENTRIES_LARGE and
MTD_MAX_OOBFREE_ENTRIES_LARGE macros.
This approach forces us to modify the
ecclayout->oobavail is just redundant with the mtd->oobavail field.
Moreover, it prevents static const definition of ecc layouts since the
NAND framework is calculating this value based on the ecclayout->oobfree
field.
Signed-off-by: Boris Brezillon
---
In order to make the ecclayout definition completely dynamic we need to
rework the way the OOB layout are defined and iterated.
Create a few mtd_ooblayout_xxx() helpers to ease OOB bytes manipulation
and hide ecclayout internals to their users.
Signed-off-by: Boris Brezillon
nand_bch_init() requires several arguments which could directly be deduced
from the mtd device. Get rid of those useless parameters.
nand_bch_init() is also requiring the caller to provide a proper eccbytes
value, while this value could be deduced from the ecc.size and
ecc.strength value.
If the MTD device does not have OOB, the mtd->oobsize and mtd->oobavail
fields are set to zero, and we are testing those values in the following
test.
Remove the useless if (!mtd->ecclayout) test.
Signed-off-by: Boris Brezillon
---
drivers/mtd/mtdswap.c | 8
77 matches
Mail list logo