Skip to content

Commit

Permalink
[ARM] 5611/1: ep93xx: update ts72xx nor flash support
Browse files Browse the repository at this point in the history
Update the NOR flash support for TS-7200.

The TS-7200 models all have 16-bit NOR flash.  Update the platform
init to support this.

Remove the private TS72XX_NOR_* defines and use the common ep93xx
defines for the external chip select physical base address instead.

Move the NOR flash registration into a static __init function.  When
the NAND flash support is updated this function will also be used
to register the NAND flash for the TS-7250 and TS-7260.

Tested-by: Matthieu Crapet <mcrapet@gmail.com>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Hartley Sweeten authored and Russell King committed Jul 23, 2009
1 parent 4be3bd7 commit 3174c88
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
3 changes: 0 additions & 3 deletions arch/arm/mach-ep93xx/include/mach/ts72xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
#define TS72XX_OPTIONS2_TS9420_BOOT 0x02


#define TS72XX_NOR_PHYS_BASE 0x60000000
#define TS72XX_NOR2_PHYS_BASE 0x62000000

#define TS72XX_NAND1_DATA_PHYS_BASE 0x60000000
#define TS72XX_NAND2_DATA_PHYS_BASE 0x70000000
#define TS72XX_NAND_DATA_VIRT_BASE 0xfebfc000
Expand Down
18 changes: 13 additions & 5 deletions arch/arm/mach-ep93xx/ts72xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,16 @@ static void __init ts72xx_map_io(void)
}
}

/*************************************************************************
* NOR flash (TS-7200 only)
*************************************************************************/
static struct physmap_flash_data ts72xx_flash_data = {
.width = 1,
.width = 2,
};

static struct resource ts72xx_flash_resource = {
.start = TS72XX_NOR_PHYS_BASE,
.end = TS72XX_NOR_PHYS_BASE + SZ_16M - 1,
.start = EP93XX_CS6_PHYS_BASE,
.end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1,
.flags = IORESOURCE_MEM,
};

Expand All @@ -132,6 +135,12 @@ static struct platform_device ts72xx_flash = {
.resource = &ts72xx_flash_resource,
};

static void __init ts72xx_register_flash(void)
{
if (board_is_ts7200())
platform_device_register(&ts72xx_flash);
}

static unsigned char ts72xx_rtc_readbyte(unsigned long addr)
{
__raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE);
Expand Down Expand Up @@ -165,8 +174,7 @@ static struct ep93xx_eth_data ts72xx_eth_data = {
static void __init ts72xx_init_machine(void)
{
ep93xx_init_devices();
if (board_is_ts7200())
platform_device_register(&ts72xx_flash);
ts72xx_register_flash();
platform_device_register(&ts72xx_rtc_device);

ep93xx_register_eth(&ts72xx_eth_data, 1);
Expand Down

0 comments on commit 3174c88

Please sign in to comment.