mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
ARM: 5750/1: ep93xx/micro9: Update platform code
Update Contec Micro9 platform code Cc: Ryan Mallon <ryan@bluewatersys.com> Requires: 5749/1 Signed-off-by: Hubert Feurstein <hubert.feurstein@contec.at> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
9415009544
commit
14636005ff
3 changed files with 75 additions and 58 deletions
|
@ -130,28 +130,28 @@ config MACH_MICRO9
|
||||||
bool
|
bool
|
||||||
|
|
||||||
config MACH_MICRO9H
|
config MACH_MICRO9H
|
||||||
bool "Support Contec Hypercontrol Micro9-H"
|
bool "Support Contec Micro9-High"
|
||||||
depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
||||||
select MACH_MICRO9
|
select MACH_MICRO9
|
||||||
help
|
help
|
||||||
Say 'Y' here if you want your kernel to support the
|
Say 'Y' here if you want your kernel to support the
|
||||||
Contec Hypercontrol Micro9-H board.
|
Contec Micro9-High board.
|
||||||
|
|
||||||
config MACH_MICRO9M
|
config MACH_MICRO9M
|
||||||
bool "Support Contec Hypercontrol Micro9-M"
|
bool "Support Contec Micro9-Mid"
|
||||||
depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
depends on EP93XX_SDCE3_ASYNC_PHYS_OFFSET
|
||||||
select MACH_MICRO9
|
select MACH_MICRO9
|
||||||
help
|
help
|
||||||
Say 'Y' here if you want your kernel to support the
|
Say 'Y' here if you want your kernel to support the
|
||||||
Contec Hypercontrol Micro9-M board.
|
Contec Micro9-Mid board.
|
||||||
|
|
||||||
config MACH_MICRO9L
|
config MACH_MICRO9L
|
||||||
bool "Support Contec Hypercontrol Micro9-L"
|
bool "Support Contec Micro9-Lite"
|
||||||
depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET
|
||||||
select MACH_MICRO9
|
select MACH_MICRO9
|
||||||
help
|
help
|
||||||
Say 'Y' here if you want your kernel to support the
|
Say 'Y' here if you want your kernel to support the
|
||||||
Contec Hypercontrol Micro9-L board.
|
Contec Micro9-Lite board.
|
||||||
|
|
||||||
config MACH_TS72XX
|
config MACH_TS72XX
|
||||||
bool "Support Technologic Systems TS-72xx SBC"
|
bool "Support Technologic Systems TS-72xx SBC"
|
||||||
|
|
|
@ -218,6 +218,17 @@
|
||||||
#define EP93XX_SYSCON_KEYTCHCLKDIV_ADIV (1<<16)
|
#define EP93XX_SYSCON_KEYTCHCLKDIV_ADIV (1<<16)
|
||||||
#define EP93XX_SYSCON_KEYTCHCLKDIV_KEN (1<<15)
|
#define EP93XX_SYSCON_KEYTCHCLKDIV_KEN (1<<15)
|
||||||
#define EP93XX_SYSCON_KEYTCHCLKDIV_KDIV (1<<0)
|
#define EP93XX_SYSCON_KEYTCHCLKDIV_KDIV (1<<0)
|
||||||
|
#define EP93XX_SYSCON_SYSCFG EP93XX_SYSCON_REG(0x9c)
|
||||||
|
#define EP93XX_SYSCON_SYSCFG_REV_MASK (0xf0000000)
|
||||||
|
#define EP93XX_SYSCON_SYSCFG_REV_SHIFT (28)
|
||||||
|
#define EP93XX_SYSCON_SYSCFG_SBOOT (1<<8)
|
||||||
|
#define EP93XX_SYSCON_SYSCFG_LCSN7 (1<<7)
|
||||||
|
#define EP93XX_SYSCON_SYSCFG_LCSN6 (1<<6)
|
||||||
|
#define EP93XX_SYSCON_SYSCFG_LASDO (1<<5)
|
||||||
|
#define EP93XX_SYSCON_SYSCFG_LEEDA (1<<4)
|
||||||
|
#define EP93XX_SYSCON_SYSCFG_LEECLK (1<<3)
|
||||||
|
#define EP93XX_SYSCON_SYSCFG_LCSN2 (1<<1)
|
||||||
|
#define EP93XX_SYSCON_SYSCFG_LCSN1 (1<<0)
|
||||||
#define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0)
|
#define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0)
|
||||||
|
|
||||||
#define EP93XX_WATCHDOG_BASE EP93XX_APB_IOMEM(0x00140000)
|
#define EP93XX_WATCHDOG_BASE EP93XX_APB_IOMEM(0x00140000)
|
||||||
|
|
|
@ -22,52 +22,77 @@
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
|
||||||
|
|
||||||
static struct ep93xx_eth_data micro9_eth_data = {
|
/*************************************************************************
|
||||||
.phy_id = 0x1f,
|
* Micro9 NOR Flash
|
||||||
};
|
*
|
||||||
|
* Micro9-High has up to 64MB of 32-bit flash on CS1
|
||||||
|
* Micro9-Mid has up to 64MB of either 32-bit or 16-bit flash on CS1
|
||||||
|
* Micro9-Lite uses a seperate MTD map driver for flash support
|
||||||
|
*************************************************************************/
|
||||||
|
static struct physmap_flash_data micro9_flash_data;
|
||||||
|
|
||||||
static void __init micro9_init(void)
|
static struct resource micro9_flash_resource = {
|
||||||
{
|
|
||||||
ep93xx_register_eth(µ9_eth_data, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Micro9-H
|
|
||||||
*/
|
|
||||||
#ifdef CONFIG_MACH_MICRO9H
|
|
||||||
static struct physmap_flash_data micro9h_flash_data = {
|
|
||||||
.width = 4,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct resource micro9h_flash_resource = {
|
|
||||||
.start = EP93XX_CS1_PHYS_BASE,
|
.start = EP93XX_CS1_PHYS_BASE,
|
||||||
.end = EP93XX_CS1_PHYS_BASE + SZ_64M - 1,
|
.end = EP93XX_CS1_PHYS_BASE + SZ_64M - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device micro9h_flash = {
|
static struct platform_device micro9_flash = {
|
||||||
.name = "physmap-flash",
|
.name = "physmap-flash",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = µ9h_flash_data,
|
.platform_data = µ9_flash_data,
|
||||||
},
|
},
|
||||||
.num_resources = 1,
|
.num_resources = 1,
|
||||||
.resource = µ9h_flash_resource,
|
.resource = µ9_flash_resource,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __init micro9h_init(void)
|
static void __init __micro9_register_flash(unsigned int width)
|
||||||
{
|
{
|
||||||
platform_device_register(µ9h_flash);
|
micro9_flash_data.width = width;
|
||||||
|
|
||||||
|
platform_device_register(µ9_flash);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init micro9h_init_machine(void)
|
static unsigned int __init micro9_detect_bootwidth(void)
|
||||||
|
{
|
||||||
|
u32 v;
|
||||||
|
|
||||||
|
/* Detect the bus width of the external flash memory */
|
||||||
|
v = __raw_readl(EP93XX_SYSCON_SYSCFG);
|
||||||
|
if (v & EP93XX_SYSCON_SYSCFG_LCSN7)
|
||||||
|
return 4; /* 32-bit */
|
||||||
|
else
|
||||||
|
return 2; /* 16-bit */
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __init micro9_register_flash(void)
|
||||||
|
{
|
||||||
|
if (machine_is_micro9())
|
||||||
|
__micro9_register_flash(4);
|
||||||
|
else if (machine_is_micro9m())
|
||||||
|
__micro9_register_flash(micro9_detect_bootwidth());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* Micro9 Ethernet
|
||||||
|
*************************************************************************/
|
||||||
|
static struct ep93xx_eth_data micro9_eth_data = {
|
||||||
|
.phy_id = 0x1f,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static void __init micro9_init_machine(void)
|
||||||
{
|
{
|
||||||
ep93xx_init_devices();
|
ep93xx_init_devices();
|
||||||
micro9_init();
|
ep93xx_register_eth(µ9_eth_data, 1);
|
||||||
micro9h_init();
|
micro9_register_flash();
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H")
|
|
||||||
|
#ifdef CONFIG_MACH_MICRO9H
|
||||||
|
MACHINE_START(MICRO9, "Contec Micro9-High")
|
||||||
/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
|
/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
|
||||||
.phys_io = EP93XX_APB_PHYS_BASE,
|
.phys_io = EP93XX_APB_PHYS_BASE,
|
||||||
.io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
|
.io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
|
||||||
|
@ -75,43 +100,25 @@ MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H")
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = micro9h_init_machine,
|
.init_machine = micro9_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* Micro9-M
|
|
||||||
*/
|
|
||||||
#ifdef CONFIG_MACH_MICRO9M
|
#ifdef CONFIG_MACH_MICRO9M
|
||||||
static void __init micro9m_init_machine(void)
|
MACHINE_START(MICRO9M, "Contec Micro9-Mid")
|
||||||
{
|
|
||||||
ep93xx_init_devices();
|
|
||||||
micro9_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
MACHINE_START(MICRO9M, "Contec Hypercontrol Micro9-M")
|
|
||||||
/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
|
/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
|
||||||
.phys_io = EP93XX_APB_PHYS_BASE,
|
.phys_io = EP93XX_APB_PHYS_BASE,
|
||||||
.io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
|
.io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
|
||||||
.boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
|
.boot_params = EP93XX_SDCE3_PHYS_BASE_ASYNC + 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = micro9m_init_machine,
|
.init_machine = micro9_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* Micro9-L
|
|
||||||
*/
|
|
||||||
#ifdef CONFIG_MACH_MICRO9L
|
#ifdef CONFIG_MACH_MICRO9L
|
||||||
static void __init micro9l_init_machine(void)
|
MACHINE_START(MICRO9L, "Contec Micro9-Lite")
|
||||||
{
|
|
||||||
ep93xx_init_devices();
|
|
||||||
micro9_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L")
|
|
||||||
/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
|
/* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
|
||||||
.phys_io = EP93XX_APB_PHYS_BASE,
|
.phys_io = EP93XX_APB_PHYS_BASE,
|
||||||
.io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
|
.io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
|
||||||
|
@ -119,7 +126,6 @@ MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L")
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = micro9l_init_machine,
|
.init_machine = micro9_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue