From: Mike Rapoport <mike@compulab.co.il>
To: Sukumar Ghorai <s-ghorai@ti.com>
Cc: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org,
tony@atomide.com, sakoman@gmail.com, Artem.Bityutskiy@nokia.com,
Mike Rapoport <mike@compulab.co.il>
Subject: Re: [PATCH 1/3] omap3: GPMC register definition at common location
Date: Thu, 13 May 2010 09:15:47 +0300 [thread overview]
Message-ID: <4BEB9913.2000303@compulab.co.il> (raw)
In-Reply-To: <1273657718-12517-2-git-send-email-s-ghorai@ti.com>
Sukumar Ghorai wrote:
> GPMC register definition move to common place in gpmc.h.
>
> Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com>
Looks Ok to me, just minor comments
> ---
> arch/arm/mach-omap2/gpmc.c | 38 +------------------------------
> arch/arm/plat-omap/include/plat/gpmc.h | 36 +++++++++++++++++++++++++++--
> drivers/mtd/nand/omap2.c | 14 ++++-------
> 3 files changed, 40 insertions(+), 48 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
> index 5bc3ca0..9c77af0
> --- a/arch/arm/mach-omap2/gpmc.c
> +++ b/arch/arm/mach-omap2/gpmc.c
> @@ -28,40 +28,6 @@
>
> #include <plat/sdrc.h>
>
> -/* GPMC register offsets */
> -#define GPMC_REVISION 0x00
> -#define GPMC_SYSCONFIG 0x10
> -#define GPMC_SYSSTATUS 0x14
> -#define GPMC_IRQSTATUS 0x18
> -#define GPMC_IRQENABLE 0x1c
> -#define GPMC_TIMEOUT_CONTROL 0x40
> -#define GPMC_ERR_ADDRESS 0x44
> -#define GPMC_ERR_TYPE 0x48
> -#define GPMC_CONFIG 0x50
> -#define GPMC_STATUS 0x54
> -#define GPMC_PREFETCH_CONFIG1 0x1e0
> -#define GPMC_PREFETCH_CONFIG2 0x1e4
> -#define GPMC_PREFETCH_CONTROL 0x1ec
> -#define GPMC_PREFETCH_STATUS 0x1f0
> -#define GPMC_ECC_CONFIG 0x1f4
> -#define GPMC_ECC_CONTROL 0x1f8
> -#define GPMC_ECC_SIZE_CONFIG 0x1fc
> -
> -#define GPMC_CS0 0x60
> -#define GPMC_CS_SIZE 0x30
> -
> -#define GPMC_MEM_START 0x00000000
> -#define GPMC_MEM_END 0x3FFFFFFF
> -#define BOOT_ROM_SPACE 0x100000 /* 1MB */
> -
> -#define GPMC_CHUNK_SHIFT 24 /* 16 MB */
> -#define GPMC_SECTION_SHIFT 28 /* 128 MB */
> -
> -#define PREFETCH_FIFOTHRESHOLD (0x40 << 8)
> -#define CS_NUM_SHIFT 24
> -#define ENABLE_PREFETCH (0x1 << 7)
> -#define DMA_MPU_MODE 2
> -
> /* Structure to save gpmc cs context */
> struct gpmc_cs_config {
> u32 config1;
> @@ -112,7 +78,7 @@ void gpmc_cs_write_reg(int cs, int idx, u32 val)
> {
> void __iomem *reg_addr;
>
> - reg_addr = gpmc_base + GPMC_CS0 + (cs * GPMC_CS_SIZE) + idx;
> + reg_addr = gpmc_base + GPMC_CS0_BASE + (cs * GPMC_CS_SIZE) + idx;
> __raw_writel(val, reg_addr);
> }
>
> @@ -120,7 +86,7 @@ u32 gpmc_cs_read_reg(int cs, int idx)
> {
> void __iomem *reg_addr;
>
> - reg_addr = gpmc_base + GPMC_CS0 + (cs * GPMC_CS_SIZE) + idx;
> + reg_addr = gpmc_base + GPMC_CS0_BASE + (cs * GPMC_CS_SIZE) + idx;
> return __raw_readl(reg_addr);
> }
>
> diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h
> index 145838a..347d212 100644
> --- a/arch/arm/plat-omap/include/plat/gpmc.h
> +++ b/arch/arm/plat-omap/include/plat/gpmc.h
> @@ -25,10 +25,40 @@
> #define GPMC_CS_NAND_ADDRESS 0x20
> #define GPMC_CS_NAND_DATA 0x24
>
> -#define GPMC_CONFIG 0x50
> -#define GPMC_STATUS 0x54
> +/* GPMC register offsets */
> +#define GPMC_REVISION 0x00
> +#define GPMC_SYSCONFIG 0x10
> +#define GPMC_SYSSTATUS 0x14
> +#define GPMC_IRQSTATUS 0x18
> +#define GPMC_IRQENABLE 0x1c
> +#define GPMC_TIMEOUT_CONTROL 0x40
> +#define GPMC_ERR_ADDRESS 0x44
> +#define GPMC_ERR_TYPE 0x48
> +#define GPMC_CONFIG 0x50
> +#define GPMC_STATUS 0x54
> +#define GPMC_PREFETCH_CONFIG1 0x1e0
> +#define GPMC_PREFETCH_CONFIG2 0x1e4
> +#define GPMC_PREFETCH_CONTROL 0x1ec
> +#define GPMC_PREFETCH_STATUS 0x1f0
> +#define GPMC_ECC_CONFIG 0x1f4
> +#define GPMC_ECC_CONTROL 0x1f8
> +#define GPMC_ECC_SIZE_CONFIG 0x1fc
> +#define GPMC_ECC1_RESULT 0x200
> +
> #define GPMC_CS0_BASE 0x60
> -#define GPMC_CS_SIZE 0x30
> +#define GPMC_CS_SIZE 0x30
> +
> +#define GPMC_MEM_START 0x00000000
> +#define GPMC_MEM_END 0x3FFFFFFF
> +#define BOOT_ROM_SPACE 0x100000 /* 1MB */
> +
> +#define GPMC_CHUNK_SHIFT 24 /* 16 MB */
> +#define GPMC_SECTION_SHIFT 28 /* 128 MB */
> +
> +#define PREFETCH_FIFOTHRESHOLD (0x40 << 8)
> +#define CS_NUM_SHIFT 24
> +#define ENABLE_PREFETCH (0x1 << 7)
> +#define DMA_MPU_MODE 2
>
> #define GPMC_CONFIG1_WRAPBURST_SUPP (1 << 31)
> #define GPMC_CONFIG1_READMULTIPLE_SUPP (1 << 30)
> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index 7545568..258bf06
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -23,12 +23,6 @@
> #include <plat/gpmc.h>
> #include <plat/nand.h>
>
> -#define GPMC_IRQ_STATUS 0x18
> -#define GPMC_ECC_CONFIG 0x1F4
> -#define GPMC_ECC_CONTROL 0x1F8
> -#define GPMC_ECC_SIZE_CONFIG 0x1FC
> -#define GPMC_ECC1_RESULT 0x200
> -
> #define DRIVER_NAME "omap2-nand"
>
> #define NAND_WP_OFF 0
> @@ -37,6 +31,7 @@
> #define GPMC_BUF_FULL 0x00000001
> #define GPMC_BUF_EMPTY 0x00000000
>
> +#ifdef CONFIG_MTD_NAND_OMAP_HWECC
This change does not seem related to the patch subject.
> #define NAND_Ecc_P1e (1 << 0)
> #define NAND_Ecc_P2e (1 << 1)
> #define NAND_Ecc_P4e (1 << 2)
> @@ -103,6 +98,7 @@
>
> #define P4e_s(a) (TF(a & NAND_Ecc_P4e) << 0)
> #define P4o_s(a) (TF(a & NAND_Ecc_P4o) << 1)
> +#endif /* CONFIG_MTD_NAND_OMAP_HWECC */
>
> #ifdef CONFIG_MTD_PARTITIONS
> static const char *part_probes[] = { "cmdlinepart", NULL };
> @@ -854,20 +850,20 @@ static int omap_dev_ready(struct mtd_info *mtd)
> {
> struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
> mtd);
> - unsigned int val = __raw_readl(info->gpmc_baseaddr + GPMC_IRQ_STATUS);
> + unsigned int val = __raw_readl(info->gpmc_baseaddr + GPMC_IRQSTATUS);
>
> if ((val & 0x100) == 0x100) {
> /* Clear IRQ Interrupt */
> val |= 0x100;
> val &= ~(0x0);
> - __raw_writel(val, info->gpmc_baseaddr + GPMC_IRQ_STATUS);
> + __raw_writel(val, info->gpmc_baseaddr + GPMC_IRQSTATUS);
> } else {
> unsigned int cnt = 0;
> while (cnt++ < 0x1FF) {
> if ((val & 0x100) == 0x100)
> return 0;
> val = __raw_readl(info->gpmc_baseaddr +
> - GPMC_IRQ_STATUS);
> + GPMC_IRQSTATUS);
> }
> }
>
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2010-05-13 6:16 UTC|newest]
Thread overview: 102+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Sukumar Ghorai <s-ghorai@ti.com>
2010-04-06 12:29 ` [PATCH 0/2] OMAP: Flash device support 3630 sdp board Sukumar Ghorai
2010-04-06 12:29 ` [PATCH 1/2] OMAP3630SDP: Add support for Flash Sukumar Ghorai
2010-04-06 12:29 ` [PATCH 2/2] OMAP3630SDP: enable Flash device support Sukumar Ghorai
2010-04-06 13:02 ` [PATCH 1/2] OMAP3630SDP: Add support for Flash Vimal Singh
2010-04-13 17:37 ` [PATCH] nand support on omap3 boards Sukumar Ghorai
2010-04-13 17:37 ` [PATCH v3 1/8] omap3: zoom: Introducing 'board-zoom-flash.c' Sukumar Ghorai
2010-04-13 17:37 ` [PATCH v3 2/8] omap3: add support for NAND on zoom2 board Sukumar Ghorai
2010-04-13 17:37 ` [PATCH v3 3/8] omap3: add support for NAND on zoom3 board Sukumar Ghorai
2010-04-13 17:37 ` [PATCH v2 4/8] omap-3630-sdp : Add support for Flash Sukumar Ghorai
2010-04-13 17:37 ` [PATCH v2 5/8] omap-3630-sdp: enable Flash device support Sukumar Ghorai
2010-04-13 17:37 ` [PATCH v2 6/8] omap3: add support for NAND on LDP board Sukumar Ghorai
2010-04-13 17:37 ` [PATCH 7/8] zoom2: enable NAND support Sukumar Ghorai
2010-04-13 17:37 ` [PATCH 8/8] zoom3: " Sukumar Ghorai
2010-04-13 17:37 ` [PATCH] nand support on omap3 boards Sukumar Ghorai
2010-04-13 17:37 ` [PATCH 8/8] omap3: GPMC register definition at common location Sukumar Ghorai
2010-04-13 17:37 ` [PATCH] omap3: NAND Prefetch in IRQ mode support Sukumar Ghorai
2010-04-13 17:37 ` [PATCH] omap-3630 NAND: enable NAND io in prefetch-irq mode Sukumar Ghorai
2010-04-13 17:37 ` [PATCH] omap: NAND: ecc layout select from board file Sukumar Ghorai
2010-04-13 17:37 ` [PATCH] omap: NAND: Making ecc layout as compatible with romcode ecc Sukumar Ghorai
2010-04-14 4:35 ` [PATCH] nand support on omap3 boards Vimal Singh
2010-04-14 4:37 ` Vimal Singh
2010-04-14 4:38 ` Ghorai, Sukumar
2010-05-04 6:00 ` Ghorai, Sukumar
2010-05-04 6:01 ` Ghorai, Sukumar
2010-05-28 13:48 ` Ghorai, Sukumar
2010-04-13 17:44 ` Sukumar Ghorai
2010-04-16 11:32 ` [PATCH 0/6] nand prefetch-irq support and ecc layout chanage Sukumar Ghorai
2010-04-16 11:34 ` [PATCH 1/6] omap3: GPMC register definition at common location Sukumar Ghorai
2010-04-16 11:35 ` [PATCH 2/6] omap3: NAND Prefetch in IRQ mode support Sukumar Ghorai
2010-04-16 11:35 ` [PATCH 3/6] OMAP NAND: configurable fifo threshold to gain the throughput Sukumar Ghorai
2010-04-16 12:45 ` Vimal Singh
2010-04-16 11:35 ` [PATCH 4/6] omap-3630 NAND: enable NAND io in prefetch-irq mode Sukumar Ghorai
2010-04-16 11:35 ` [PATCH 5/6] omap: NAND: ecc layout select from board file Sukumar Ghorai
2010-04-16 11:35 ` [PATCH 6/6] omap: NAND: Making ecc layout as compatible with romcode ecc Sukumar Ghorai
2010-05-12 9:48 ` [PATCH 0/3] omap3 nand: cleanup exiting platform related code Sukumar Ghorai
2010-05-12 9:48 ` [PATCH 1/3] omap3: GPMC register definition at common location Sukumar Ghorai
2010-05-12 9:48 ` [PATCH 2/3] omap3 nand: cleanup for not to use GPMC virtual address Sukumar Ghorai
2010-05-12 9:48 ` [PATCH 3/3] omap3 nand: fix issue in board file to detect the nand Sukumar Ghorai
2010-05-13 15:41 ` [PATCH 2/3] omap3 nand: cleanup for not to use GPMC virtual address Tony Lindgren
2010-05-13 18:48 ` Ghorai, Sukumar
2010-05-13 6:15 ` Mike Rapoport [this message]
2010-05-13 15:41 ` [PATCH 1/3] omap3: GPMC register definition at common location Tony Lindgren
2010-05-13 15:44 ` [PATCH 0/3] omap3 nand: cleanup exiting platform related code Tony Lindgren
2010-05-14 15:23 ` [PATCH v2 0/2] " Sukumar Ghorai
2010-05-14 15:23 ` [PATCH v2 1/2] omap3 nand: cleanup for not to use GPMC virtual address Sukumar Ghorai
2010-05-14 15:23 ` [PATCH v2 2/2] omap3 nand: fix issue in board file to detect the nand Sukumar Ghorai
2010-05-14 15:28 ` [PATCH v2 1/2] omap3 nand: cleanup for not to use GPMC virtual address Tony Lindgren
2010-05-14 18:02 ` Vimal Singh
2010-05-17 4:22 ` Ghorai, Sukumar
2010-05-17 14:26 ` Vimal Singh
2010-05-17 14:34 ` Ghorai, Sukumar
2010-05-14 23:58 ` Tony Lindgren
2010-05-17 5:48 ` Ghorai, Sukumar
2010-05-18 11:16 ` [PATCH v3 0/3] omap3 nand: cleanup exiting platform related code Sukumar Ghorai
2010-05-18 11:16 ` [PATCH v3 1/3] omap3 gpmc: functionality enhancement Sukumar Ghorai
2010-05-18 11:16 ` [PATCH v3 2/3] omap3 nand: cleanup virtual address usages Sukumar Ghorai
2010-05-18 11:16 ` [PATCH v3 3/3] omap3 nand: fix issue in board file to detect nand Sukumar Ghorai
2010-05-19 15:30 ` [PATCH v3 2/3] omap3 nand: cleanup virtual address usages Vimal Singh
2010-05-19 17:24 ` Ghorai, Sukumar
2010-05-19 18:07 ` Vimal Singh
2010-05-19 18:19 ` Tony Lindgren
2010-05-19 14:46 ` [PATCH v3 1/3] omap3 gpmc: functionality enhancement Vimal Singh
2010-05-19 15:14 ` Peter Barada
2010-05-19 15:48 ` Peter Barada
2010-05-19 18:04 ` Ghorai, Sukumar
2010-05-19 18:30 ` Vimal Singh
2010-05-20 5:38 ` Ghorai, Sukumar
2010-05-20 14:34 ` Vimal Singh
2010-05-25 14:37 ` Ghorai, Sukumar
2010-05-25 15:34 ` Vimal Singh
2010-05-27 13:24 ` [PATCH v4 0/3] omap3 nand: cleanup exiting platform related code Sukumar Ghorai
2010-05-27 13:24 ` [PATCH v4 1/3] omap3 gpmc: functionality enhancement Sukumar Ghorai
2010-05-27 13:24 ` [PATCH v4 2/3] omap3 nand: cleanup virtual address usages Sukumar Ghorai
2010-05-27 13:24 ` [PATCH v4 3/3] omap3 nand: fix issue in board file to detect nand Sukumar Ghorai
2010-05-27 18:26 ` [PATCH v4 1/3] omap3 gpmc: functionality enhancement Vimal Singh
2010-06-04 7:40 ` [PATCH v5 0/3] omap3 nand: cleanup exiting platform related code Sukumar Ghorai
2010-06-04 7:40 ` [PATCH v5 1/3] omap3 gpmc: functionality enhancement Sukumar Ghorai
2010-06-04 7:40 ` [PATCH v5 2/3] omap3 nand: cleanup virtual address usages Sukumar Ghorai
2010-06-04 7:40 ` [PATCH v5 3/3] omap3 nand: fix issue in board file to detect nand Sukumar Ghorai
2010-07-07 10:21 ` [PATCH v5 2/3] omap3 nand: cleanup virtual address usages Tony Lindgren
2010-07-07 12:22 ` Ghorai, Sukumar
2010-07-07 10:18 ` [PATCH v5 1/3] omap3 gpmc: functionality enhancement Tony Lindgren
2010-07-07 12:32 ` Ghorai, Sukumar
2010-07-07 13:01 ` Tony Lindgren
2010-07-08 3:54 ` Ghorai, Sukumar
2010-06-08 17:12 ` [PATCH v5 0/3] omap3 nand: cleanup exiting platform related code Vimal Singh
2010-06-15 13:26 ` Ghorai, Sukumar
2010-06-30 14:42 ` Ghorai, Sukumar
2010-06-16 11:39 ` [PATCH v3 0/8] nand support on omap3 boards Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 1/8] omap3 flash: rename board-sdp-flash.c to be use by other boards Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 2/8] omap3: add support for NAND on zoom2 board Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 3/8] omap3: add support for NAND on zoom3 board Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 4/8] omap-3630-sdp : Add support for Flash Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 5/8] omap3: add support for NAND on LDP board Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 6/8] omap-3630-sdp: enable Flash device support Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 7/8] zoom2: enable NAND support Sukumar Ghorai
2010-06-16 11:40 ` [PATCH v3 8/8] zoom3: " Sukumar Ghorai
2010-07-05 12:27 ` [PATCH v3 6/8] omap-3630-sdp: enable Flash device support Tony Lindgren
2010-07-06 5:23 ` Ghorai, Sukumar
2010-07-05 12:23 ` [PATCH v3 1/8] omap3 flash: rename board-sdp-flash.c to be use by other boards Tony Lindgren
2010-07-06 6:05 ` Shilimkar, Santosh
2010-07-06 6:27 ` Ghorai, Sukumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BEB9913.2000303@compulab.co.il \
--to=mike@compulab.co.il \
--cc=Artem.Bityutskiy@nokia.com \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=s-ghorai@ti.com \
--cc=sakoman@gmail.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).