Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-18 Thread Brian Norris
On Mon, Mar 16, 2015 at 11:55:16AM -0700, Florian Fainelli wrote: > On 06/03/15 17:18, Brian Norris wrote: > > +static int brcmnand_revision_init(struct brcmnand_controller *ctrl) > > +{ > > + static const unsigned int block_sizes_v6[] = { 8, 16, 128, 256, 512, > > 1024, 2048, 0 }; > > + stati

Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-16 Thread Florian Fainelli
[snip] > +static int brcmnand_dma_trans(struct brcmnand_host *host, u64 addr, u32 *buf, > + u32 len, u8 dma_cmd) > +{ > + struct brcmnand_controller *ctrl = host->ctrl; > + dma_addr_t buf_pa; > + int dir = dma_cmd == CMD_PAGE_READ ? DMA_FROM_DEVICE : DMA_TO_DE

Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-16 Thread Florian Fainelli
On 06/03/15 17:18, Brian Norris wrote: > This core originated in Set-Top Box chips (BCM7xxx) but is used in a > variety of other Broadcom chips, including some BCM63xxx, BCM33xx, and > iProc/Cygnus. It's been used only on ARM and MIPS SoCs, so restrict it > to those architectures. > > There are mu

Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-09 Thread Ray Jui
On 3/9/2015 10:49 AM, Brian Norris wrote: > On Sun, Mar 08, 2015 at 01:44:02AM +0100, Rafał Miłecki wrote: >> On 7 March 2015 at 18:39, Rafał Miłecki wrote: >>> It seems that brcmnand_ctlrdy_irq never fires on my device. Just like >>> controller was never generating any IRQ. >>> >>> >>> I starte

Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-09 Thread Brian Norris
On Sun, Mar 08, 2015 at 01:44:02AM +0100, Rafał Miłecki wrote: > On 7 March 2015 at 18:39, Rafał Miłecki wrote: > > It seems that brcmnand_ctlrdy_irq never fires on my device. Just like > > controller was never generating any IRQ. > > > > > > I started comparing your driver with OpenWrt's bcm_nand

Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-09 Thread Brian Norris
On Sat, Mar 07, 2015 at 02:21:26PM +0100, Rafał Miłecki wrote: > On 7 March 2015 at 02:18, Brian Norris wrote: > > + /* NAND register range */ > > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > + ctrl->nand_base = devm_ioremap_resource(dev, res); > > + if (!ctr

Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-09 Thread Brian Norris
On Sat, Mar 07, 2015 at 01:39:43PM +0100, Paul Bolle wrote: > Only a license nit. > > Brian Norris schreef op vr 06-03-2015 om 17:18 [-0800]: > > > --- /dev/null > > +++ b/drivers/mtd/nand/brcmstb_nand.c > > @@ -0,0 +1,2182 @@ > > +/* > > + * Copyright © 2010-2015 Broadcom Corporation > > + * > >

Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-07 Thread Rafał Miłecki
On 7 March 2015 at 18:39, Rafał Miłecki wrote: > It seems that brcmnand_ctlrdy_irq never fires on my device. Just like > controller was never generating any IRQ. > > > I started comparing your driver with OpenWrt's bcm_nand.c (which > should be very similar to Broadcom's SDK NAND driver for ARM).

Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-07 Thread Rafał Miłecki
On 7 March 2015 at 02:18, Brian Norris wrote: > +static int brcmnand_waitfunc(struct mtd_info *mtd, struct nand_chip *this) > +{ > + struct nand_chip *chip = mtd->priv; > + struct brcmnand_host *host = chip->priv; > + struct brcmnand_controller *ctrl = host->ctrl; > + unsig

Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-07 Thread Rafał Miłecki
On 7 March 2015 at 18:39, Rafał Miłecki wrote: > On 7 March 2015 at 02:18, Brian Norris wrote: >> This core originated in Set-Top Box chips (BCM7xxx) but is used in a >> variety of other Broadcom chips, including some BCM63xxx, BCM33xx, and >> iProc/Cygnus. It's been used only on ARM and MIPS SoC

Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-07 Thread Rafał Miłecki
On 7 March 2015 at 02:18, Brian Norris wrote: > This core originated in Set-Top Box chips (BCM7xxx) but is used in a > variety of other Broadcom chips, including some BCM63xxx, BCM33xx, and > iProc/Cygnus. It's been used only on ARM and MIPS SoCs, so restrict it > to those architectures. > > There

Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-07 Thread Rafał Miłecki
On 7 March 2015 at 02:18, Brian Norris wrote: > + /* NAND register range */ > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + ctrl->nand_base = devm_ioremap_resource(dev, res); > + if (!ctrl->nand_base) > + return -ENODEV; This is what I got durin

Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-07 Thread Paul Bolle
Only a license nit. Brian Norris schreef op vr 06-03-2015 om 17:18 [-0800]: > --- /dev/null > +++ b/drivers/mtd/nand/brcmstb_nand.c > @@ -0,0 +1,2182 @@ > +/* > + * Copyright © 2010-2015 Broadcom Corporation > + * > + * This program is free software; you can redistribute it and/or modify > + * it

[PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

2015-03-06 Thread Brian Norris
This core originated in Set-Top Box chips (BCM7xxx) but is used in a variety of other Broadcom chips, including some BCM63xxx, BCM33xx, and iProc/Cygnus. It's been used only on ARM and MIPS SoCs, so restrict it to those architectures. There are multiple revisions of this core throughout the years,