Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-14 Thread Bill Pringlemeir
On 13 Aug 2014, scottw...@freescale.com wrote: On Tue, 2014-08-12 at 18:58 -0400, Bill Pringlemeir wrote: On 12 Aug 2014, scottw...@freescale.com wrote: On Tue, 2014-08-12 at 23:13 +0200, Stefan Agner wrote: Am 2014-08-12 00:33, schrieb Scott Wood: You should always be using raw I/O

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-14 Thread Bill Pringlemeir
On 13 Aug 2014, scottw...@freescale.com wrote: On Wed, 2014-08-13 at 17:44 -0400, Bill Pringlemeir wrote: Regarding can't know in advance, I think that some of the register values maybe set by the boot rom. This might make more sense for Linux than U-Boot. However, after the initial

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-13 Thread Stefan Agner
Am 2014-08-13 00:58, schrieb Bill Pringlemeir: On 12 Aug 2014, scottw...@freescale.com wrote: On Tue, 2014-08-12 at 23:13 +0200, Stefan Agner wrote: Am 2014-08-12 00:33, schrieb Scott Wood: On Wed, 2014-08-06 at 10:59 +0200, Stefan Agner wrote: This adds initial support for Freescale NFC

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-13 Thread Bill Pringlemeir
On 12 Aug 2014, scottw...@freescale.com wrote: On Tue, 2014-08-12 at 23:13 +0200, Stefan Agner wrote: Am 2014-08-12 00:33, schrieb Scott Wood: On Wed, 2014-08-06 at 10:59 +0200, Stefan Agner wrote: This adds initial support for Freescale NFC (NAND Flash Controller). The IP is used in ARM

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-13 Thread Stefan Agner
Am 2014-08-13 00:58, schrieb Bill Pringlemeir: [snip] +static u32 nfc_read(struct mtd_info *mtd, uint reg) +{ + struct fsl_nfc *nfc = mtd_to_nfc(mtd); + + if (reg == NFC_FLASH_STATUS1 || + reg == NFC_FLASH_STATUS2 || + reg == NFC_IRQ_STATUS) + return __raw_readl(nfc-regs +

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-13 Thread Bill Pringlemeir
On 13 Aug 2014, ste...@agner.ch wrote: Am 2014-08-13 00:58, schrieb Bill Pringlemeir: [snip] +static u32 nfc_read(struct mtd_info *mtd, uint reg) +{ +struct fsl_nfc *nfc = mtd_to_nfc(mtd); + +if (reg == NFC_FLASH_STATUS1 || +reg == NFC_FLASH_STATUS2 || +

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-13 Thread Stefan Agner
Am 2014-08-13 17:14, schrieb Bill Pringlemeir: On 13 Aug 2014, ste...@agner.ch wrote: Am 2014-08-13 00:58, schrieb Bill Pringlemeir: [snip] +static u32 nfc_read(struct mtd_info *mtd, uint reg) +{ + struct fsl_nfc *nfc = mtd_to_nfc(mtd); + + if (reg == NFC_FLASH_STATUS1 || +

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-13 Thread Bill Pringlemeir
On 13 Aug 2014, ste...@agner.ch wrote: Funny is, the size is bigger in the first uninlined case... Maybe GCC inlined the function only for some calls, I did not checked that... With if/else text data bss dec hex filename 2395 2904 0529914b3

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-13 Thread Scott Wood
On Wed, 2014-08-13 at 13:20 +0200, Stefan Agner wrote: IMHO we should use the raw_writel only and hand optimize for functions which are used often. For the initialization/configuration functions, there is little value to save some register access. raw_writel() is itself something that should

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-13 Thread Scott Wood
On Tue, 2014-08-12 at 18:58 -0400, Bill Pringlemeir wrote: On 12 Aug 2014, scottw...@freescale.com wrote: On Tue, 2014-08-12 at 23:13 +0200, Stefan Agner wrote: Am 2014-08-12 00:33, schrieb Scott Wood: You should always be using raw I/O accessors. If the intent is to bypass I/O

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-13 Thread Scott Wood
On Wed, 2014-08-13 at 17:44 -0400, Bill Pringlemeir wrote: Regarding can't know in advance, I think that some of the register values maybe set by the boot rom. This might make more sense for Linux than U-Boot. However, after the initial configuration, many do need the 'read/modify/write' as

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-12 Thread Stefan Agner
Am 2014-08-12 00:33, schrieb Scott Wood: On Wed, 2014-08-06 at 10:59 +0200, Stefan Agner wrote: This adds initial support for Freescale NFC (NAND Flash Controller). The IP is used in ARM based Vybrid SoCs as well as on some PowerPC devices. This driver is only tested on Vybrid.

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-12 Thread Scott Wood
On Tue, 2014-08-12 at 23:13 +0200, Stefan Agner wrote: Am 2014-08-12 00:33, schrieb Scott Wood: On Wed, 2014-08-06 at 10:59 +0200, Stefan Agner wrote: This adds initial support for Freescale NFC (NAND Flash Controller). The IP is used in ARM based Vybrid SoCs as well as on some PowerPC

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-11 Thread Scott Wood
On Wed, 2014-08-06 at 10:59 +0200, Stefan Agner wrote: This adds initial support for Freescale NFC (NAND Flash Controller). The IP is used in ARM based Vybrid SoCs as well as on some PowerPC devices. This driver is only tested on Vybrid. Signed-off-by: Stefan Agner ste...@agner.ch ---

[U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-06 Thread Stefan Agner
This adds initial support for Freescale NFC (NAND Flash Controller). The IP is used in ARM based Vybrid SoCs as well as on some PowerPC devices. This driver is only tested on Vybrid. Signed-off-by: Stefan Agner ste...@agner.ch --- drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/fsl_nfc.c |

Re: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver

2014-08-06 Thread Bill Pringlemeir
On 6 Aug 2014, ste...@agner.ch wrote: This adds initial support for Freescale NFC (NAND Flash Controller). The IP is used in ARM based Vybrid SoCs as well as on some PowerPC devices. This driver is only tested on Vybrid. Signed-off-by: Stefan Agner ste...@agner.ch ---