Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f7e8fae authored by Haojian Zhuang's avatar Haojian Zhuang Committed by Eric Miao
Browse files

[ARM] mmp: add support for Marvell MMP2



Marvell MMP2 (aka ARMADA610) is a SoC based on PJ4 core. It's
ARMv6 compatible.  Support basic interrupt handler and timer,
and basic support for MMP2 based FLINT platform.

Signed-off-by: default avatarHaojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent 978da5bc
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -497,7 +497,7 @@ config ARCH_ORION5X
	  Orion-2 (5281), Orion-1-90 (6183).
	  Orion-2 (5281), Orion-1-90 (6183).


config ARCH_MMP
config ARCH_MMP
	bool "Marvell PXA168/910"
	bool "Marvell PXA168/910/MMP2"
	depends on MMU
	depends on MMU
	select GENERIC_GPIO
	select GENERIC_GPIO
	select ARCH_REQUIRE_GPIOLIB
	select ARCH_REQUIRE_GPIOLIB
@@ -508,7 +508,7 @@ config ARCH_MMP
	select TICK_ONESHOT
	select TICK_ONESHOT
	select PLAT_PXA
	select PLAT_PXA
	help
	help
	  Support for Marvell's PXA168/910 processor line.
	  Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line.


config ARCH_KS8695
config ARCH_KS8695
	bool "Micrel/Kendin KS8695"
	bool "Micrel/Kendin KS8695"
+17 −1
Original line number Original line Diff line number Diff line
if ARCH_MMP
if ARCH_MMP


menu "Marvell PXA168/910 Implmentations"
menu "Marvell PXA168/910/MMP2 Implmentations"


config MACH_ASPENITE
config MACH_ASPENITE
	bool "Marvell's PXA168 Aspenite Development Board"
	bool "Marvell's PXA168 Aspenite Development Board"
@@ -37,6 +37,16 @@ config MACH_TTC_DKB
	  Say 'Y' here if you want to support the Marvell PXA910-based
	  Say 'Y' here if you want to support the Marvell PXA910-based
	  TTC_DKB Development Board.
	  TTC_DKB Development Board.


config MACH_FLINT
	bool "Marvell's Flint Development Platform"
	select CPU_MMP2
	help
	  Say 'Y' here if you want to support the Marvell MMP2-based
	  Flint Development Platform.
	  MMP2-based board can't be co-existed with PXA168-based &
	  PXA910-based development board. Since MMP2 is compatible to
	  ARMv6 architecture.

endmenu
endmenu


config CPU_PXA168
config CPU_PXA168
@@ -51,4 +61,10 @@ config CPU_PXA910
	help
	help
	  Select code specific to PXA910
	  Select code specific to PXA910


config CPU_MMP2
	bool
	select CPU_V6
	select CPU_32v6K
	help
	  Select code specific to MMP2. MMP2 is ARMv6 compatible.
endif
endif
+2 −0
Original line number Original line Diff line number Diff line
@@ -7,6 +7,7 @@ obj-y += common.o clock.o devices.o time.o
# SoC support
# SoC support
obj-$(CONFIG_CPU_PXA168)	+= pxa168.o irq-pxa168.o
obj-$(CONFIG_CPU_PXA168)	+= pxa168.o irq-pxa168.o
obj-$(CONFIG_CPU_PXA910)	+= pxa910.o irq-pxa168.o
obj-$(CONFIG_CPU_PXA910)	+= pxa910.o irq-pxa168.o
obj-$(CONFIG_CPU_MMP2)		+= mmp2.o irq-mmp2.o


# board support
# board support
obj-$(CONFIG_MACH_ASPENITE)	+= aspenite.o
obj-$(CONFIG_MACH_ASPENITE)	+= aspenite.o
@@ -14,3 +15,4 @@ obj-$(CONFIG_MACH_ZYLONITE2) += aspenite.o
obj-$(CONFIG_MACH_AVENGERS_LITE)+= avengers_lite.o
obj-$(CONFIG_MACH_AVENGERS_LITE)+= avengers_lite.o
obj-$(CONFIG_MACH_TAVOREVB)	+= tavorevb.o
obj-$(CONFIG_MACH_TAVOREVB)	+= tavorevb.o
obj-$(CONFIG_MACH_TTC_DKB)	+= ttc_dkb.o
obj-$(CONFIG_MACH_TTC_DKB)	+= ttc_dkb.o
obj-$(CONFIG_MACH_FLINT)	+= flint.o
+2 −0
Original line number Original line Diff line number Diff line
@@ -6,8 +6,10 @@ extern void timer_init(int irq);


extern struct sys_timer pxa168_timer;
extern struct sys_timer pxa168_timer;
extern struct sys_timer pxa910_timer;
extern struct sys_timer pxa910_timer;
extern struct sys_timer mmp2_timer;
extern void __init pxa168_init_irq(void);
extern void __init pxa168_init_irq(void);
extern void __init pxa910_init_irq(void);
extern void __init pxa910_init_irq(void);
extern void __init mmp2_init_irq(void);


extern void __init icu_init_irq(void);
extern void __init icu_init_irq(void);
extern void __init pxa_map_io(void);
extern void __init pxa_map_io(void);
+123 −0
Original line number Original line Diff line number Diff line
/*
 *  linux/arch/arm/mach-mmp/flint.c
 *
 *  Support for the Marvell Flint Development Platform.
 *
 *  Copyright (C) 2009 Marvell International Ltd.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 2 as
 *  publishhed by the Free Software Foundation.
 */

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/smc91x.h>
#include <linux/io.h>
#include <linux/gpio.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/addr-map.h>
#include <mach/mfp-mmp2.h>
#include <mach/mmp2.h>

#include "common.h"

static unsigned long flint_pin_config[] __initdata = {
	/* UART1 */
	GPIO45_UART1_RXD,
	GPIO46_UART1_TXD,

	/* UART2 */
	GPIO47_UART2_RXD,
	GPIO48_UART2_TXD,

	/* SMC */
	GPIO151_SMC_SCLK,
	GPIO145_SMC_nCS0,
	GPIO146_SMC_nCS1,
	GPIO152_SMC_BE0,
	GPIO153_SMC_BE1,
	GPIO154_SMC_IRQ,
	GPIO113_SMC_RDY,

	/*Ethernet*/
	GPIO155_GPIO155,

	/* DFI */
	GPIO168_DFI_D0,
	GPIO167_DFI_D1,
	GPIO166_DFI_D2,
	GPIO165_DFI_D3,
	GPIO107_DFI_D4,
	GPIO106_DFI_D5,
	GPIO105_DFI_D6,
	GPIO104_DFI_D7,
	GPIO111_DFI_D8,
	GPIO164_DFI_D9,
	GPIO163_DFI_D10,
	GPIO162_DFI_D11,
	GPIO161_DFI_D12,
	GPIO110_DFI_D13,
	GPIO109_DFI_D14,
	GPIO108_DFI_D15,
	GPIO143_ND_nCS0,
	GPIO144_ND_nCS1,
	GPIO147_ND_nWE,
	GPIO148_ND_nRE,
	GPIO150_ND_ALE,
	GPIO149_ND_CLE,
	GPIO112_ND_RDY0,
	GPIO160_ND_RDY1,
};

static struct smc91x_platdata flint_smc91x_info = {
	.flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
};

static struct resource smc91x_resources[] = {
	[0] = {
		.start  = SMC_CS1_PHYS_BASE + 0x300,
		.end    = SMC_CS1_PHYS_BASE + 0xfffff,
		.flags  = IORESOURCE_MEM,
	},
	[1] = {
		.start  = gpio_to_irq(155),
		.end    = gpio_to_irq(155),
		.flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
	}
};

static struct platform_device smc91x_device = {
	.name           = "smc91x",
	.id             = 0,
	.dev            = {
		.platform_data = &flint_smc91x_info,
	},
	.num_resources  = ARRAY_SIZE(smc91x_resources),
	.resource       = smc91x_resources,
};

static void __init flint_init(void)
{
	mfp_config(ARRAY_AND_SIZE(flint_pin_config));

	/* on-chip devices */
	mmp2_add_uart(1);
	mmp2_add_uart(2);

	/* off-chip devices */
	platform_device_register(&smc91x_device);
}

MACHINE_START(FLINT, "Flint Development Platform")
	.phys_io        = APB_PHYS_BASE,
	.boot_params    = 0x00000100,
	.io_pg_offst    = (APB_VIRT_BASE >> 18) & 0xfffc,
	.map_io		= pxa_map_io,
	.init_irq       = mmp2_init_irq,
	.timer          = &mmp2_timer,
	.init_machine   = flint_init,
MACHINE_END
Loading