Skip to content

Commit

Permalink
Merge branch 'master' of git://git.marvell.com/orion into devel
Browse files Browse the repository at this point in the history
Conflicts:

	arch/arm/mach-mx1/devices.c
  • Loading branch information
Russell King authored and Russell King committed Mar 19, 2009
2 parents be093be + 569106c commit 7d83f8f
Show file tree
Hide file tree
Showing 55 changed files with 1,721 additions and 263 deletions.
225 changes: 163 additions & 62 deletions arch/arm/configs/kirkwood_defconfig

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions arch/arm/configs/mv78xx0_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ CONFIG_ARCH_MV78XX0=y
# Marvell MV78xx0 Implementations
#
CONFIG_MACH_DB78X00_BP=y
CONFIG_MACH_RD78X00_MASA=y

#
# Boot options
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/configs/orion5x_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ CONFIG_MTD_NAND_IDS=y
# CONFIG_MTD_NAND_DISKONCHIP is not set
# CONFIG_MTD_NAND_CAFE is not set
# CONFIG_MTD_NAND_NANDSIM is not set
# CONFIG_MTD_NAND_PLATFORM is not set
CONFIG_MTD_NAND_PLATFORM=y
# CONFIG_MTD_ALAUDA is not set
CONFIG_MTD_NAND_ORION=y
# CONFIG_MTD_ONENAND is not set
Expand Down Expand Up @@ -1177,7 +1177,7 @@ CONFIG_RTC_DRV_S35390A=y
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
CONFIG_RTC_DRV_M48T86=y
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_V3020 is not set

Expand Down
4 changes: 4 additions & 0 deletions arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ ENTRY(mcount)
.globl mcount_call
mcount_call:
bl ftrace_stub
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc}

ENTRY(ftrace_caller)
Expand All @@ -126,6 +127,7 @@ ENTRY(ftrace_caller)
.globl ftrace_call
ftrace_call:
bl ftrace_stub
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc}

#else
Expand All @@ -137,6 +139,7 @@ ENTRY(mcount)
adr r0, ftrace_stub
cmp r0, r2
bne trace
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc}

trace:
Expand All @@ -145,6 +148,7 @@ trace:
sub r0, r0, #MCOUNT_INSN_SIZE
mov lr, pc
mov pc, r2
mov lr, r1 @ restore lr
ldmia sp!, {r0-r3, pc}

#endif /* CONFIG_DYNAMIC_FTRACE */
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/kernel/fiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void set_fiq_handler(void *start, unsigned int length)
* disable irqs for the duration. Note - these functions are almost
* entirely coded in assembly.
*/
void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs)
void __naked set_fiq_regs(struct pt_regs *regs)
{
register unsigned long tmp;
asm volatile (
Expand All @@ -106,7 +106,7 @@ void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs)
: "r" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE));
}

void __attribute__((naked)) get_fiq_regs(struct pt_regs *regs)
void __naked get_fiq_regs(struct pt_regs *regs)
{
register unsigned long tmp;
asm volatile (
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-ep93xx/include/mach/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#ifndef __ASSEMBLY__

struct i2c_board_info;

struct ep93xx_eth_data
{
unsigned char dev_addr[6];
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/mach-kirkwood/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ config MACH_RD88F6281
Say 'Y' here if you want your kernel to support the
Marvell RD-88F6281 Reference Board.

config MACH_SHEEVAPLUG
bool "Marvell SheevaPlug Reference Board"
help
Say 'Y' here if you want your kernel to support the
Marvell SheevaPlug Reference Board.

endmenu

endif
3 changes: 2 additions & 1 deletion arch/arm/mach-kirkwood/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
obj-y += common.o addr-map.o irq.o pcie.o
obj-y += common.o addr-map.o irq.o pcie.o mpp.o

obj-$(CONFIG_MACH_DB88F6281_BP) += db88f6281-bp-setup.o
obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
56 changes: 53 additions & 3 deletions arch/arm/mach-kirkwood/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <mach/kirkwood.h>
#include <plat/cache-feroceon-l2.h>
#include <plat/ehci-orion.h>
#include <plat/mvsdio.h>
#include <plat/mv_xor.h>
#include <plat/orion_nand.h>
#include <plat/time.h>
Expand Down Expand Up @@ -254,7 +255,7 @@ static struct resource kirkwood_rtc_resource = {
.flags = IORESOURCE_MEM,
};

void __init kirkwood_rtc_init(void)
static void __init kirkwood_rtc_init(void)
{
platform_device_register_simple("rtc-mv", -1, &kirkwood_rtc_resource, 1);
}
Expand Down Expand Up @@ -295,6 +296,50 @@ void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data)
}


/*****************************************************************************
* SD/SDIO/MMC
****************************************************************************/
static struct resource mvsdio_resources[] = {
[0] = {
.start = SDIO_PHYS_BASE,
.end = SDIO_PHYS_BASE + SZ_1K - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_KIRKWOOD_SDIO,
.end = IRQ_KIRKWOOD_SDIO,
.flags = IORESOURCE_IRQ,
},
};

static u64 mvsdio_dmamask = 0xffffffffUL;

static struct platform_device kirkwood_sdio = {
.name = "mvsdio",
.id = -1,
.dev = {
.dma_mask = &mvsdio_dmamask,
.coherent_dma_mask = 0xffffffff,
},
.num_resources = ARRAY_SIZE(mvsdio_resources),
.resource = mvsdio_resources,
};

void __init kirkwood_sdio_init(struct mvsdio_platform_data *mvsdio_data)
{
u32 dev, rev;

kirkwood_pcie_id(&dev, &rev);
if (rev == 0) /* catch all Kirkwood Z0's */
mvsdio_data->clock = 100000000;
else
mvsdio_data->clock = 200000000;
mvsdio_data->dram = &kirkwood_mbus_dram_info;
kirkwood_sdio.dev.platform_data = mvsdio_data;
platform_device_register(&kirkwood_sdio);
}


/*****************************************************************************
* SPI
****************************************************************************/
Expand Down Expand Up @@ -502,7 +547,7 @@ static struct platform_device kirkwood_xor01_channel = {
},
};

void __init kirkwood_xor0_init(void)
static void __init kirkwood_xor0_init(void)
{
platform_device_register(&kirkwood_xor0_shared);

Expand Down Expand Up @@ -600,7 +645,7 @@ static struct platform_device kirkwood_xor11_channel = {
},
};

void __init kirkwood_xor1_init(void)
static void __init kirkwood_xor1_init(void)
{
platform_device_register(&kirkwood_xor1_shared);

Expand Down Expand Up @@ -708,4 +753,9 @@ void __init kirkwood_init(void)
#ifdef CONFIG_CACHE_FEROCEON_L2
kirkwood_l2_init();
#endif

/* internal devices that every board has */
kirkwood_rtc_init();
kirkwood_xor0_init();
kirkwood_xor1_init();
}
5 changes: 2 additions & 3 deletions arch/arm/mach-kirkwood/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
struct dsa_platform_data;
struct mv643xx_eth_platform_data;
struct mv_sata_platform_data;
struct mvsdio_platform_data;

/*
* Basic Kirkwood init functions used early by machine-setup.
Expand All @@ -33,13 +34,11 @@ void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data);
void kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data);
void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq);
void kirkwood_pcie_init(void);
void kirkwood_rtc_init(void);
void kirkwood_sata_init(struct mv_sata_platform_data *sata_data);
void kirkwood_sdio_init(struct mvsdio_platform_data *mvsdio_data);
void kirkwood_spi_init(void);
void kirkwood_uart0_init(void);
void kirkwood_uart1_init(void);
void kirkwood_xor0_init(void);
void kirkwood_xor1_init(void);

extern struct sys_timer kirkwood_timer;

Expand Down
67 changes: 61 additions & 6 deletions arch/arm/mach-kirkwood/db88f6281-bp-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,59 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/pci.h>
#include <linux/irq.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/nand.h>
#include <linux/timer.h>
#include <linux/mtd/partitions.h>
#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include <mach/kirkwood.h>
#include <plat/orion_nand.h>
#include <plat/mvsdio.h>
#include "common.h"
#include "mpp.h"

static struct mtd_partition db88f6281_nand_parts[] = {
{
.name = "u-boot",
.offset = 0,
.size = SZ_1M
}, {
.name = "uImage",
.offset = MTDPART_OFS_NXTBLK,
.size = SZ_4M
}, {
.name = "root",
.offset = MTDPART_OFS_NXTBLK,
.size = MTDPART_SIZ_FULL
},
};

static struct resource db88f6281_nand_resource = {
.flags = IORESOURCE_MEM,
.start = KIRKWOOD_NAND_MEM_PHYS_BASE,
.end = KIRKWOOD_NAND_MEM_PHYS_BASE +
KIRKWOOD_NAND_MEM_SIZE - 1,
};

static struct orion_nand_data db88f6281_nand_data = {
.parts = db88f6281_nand_parts,
.nr_parts = ARRAY_SIZE(db88f6281_nand_parts),
.cle = 0,
.ale = 1,
.width = 8,
.chip_delay = 25,
};

static struct platform_device db88f6281_nand_flash = {
.name = "orion_nand",
.id = -1,
.dev = {
.platform_data = &db88f6281_nand_data,
},
.resource = &db88f6281_nand_resource,
.num_resources = 1,
};

static struct mv643xx_eth_platform_data db88f6281_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
Expand All @@ -32,18 +73,32 @@ static struct mv_sata_platform_data db88f6281_sata_data = {
.n_ports = 2,
};

static struct mvsdio_platform_data db88f6281_mvsdio_data = {
.gpio_write_protect = 37,
.gpio_card_detect = 38,
};

static unsigned int db88f6281_mpp_config[] __initdata = {
MPP37_GPIO,
MPP38_GPIO,
0
};

static void __init db88f6281_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_init();
kirkwood_mpp_conf(db88f6281_mpp_config);

kirkwood_ehci_init();
kirkwood_ge00_init(&db88f6281_ge00_data);
kirkwood_rtc_init();
kirkwood_sata_init(&db88f6281_sata_data);
kirkwood_uart0_init();
kirkwood_sdio_init(&db88f6281_mvsdio_data);

platform_device_register(&db88f6281_nand_flash);
}

static int __init db88f6281_pci_init(void)
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-kirkwood/include/mach/kirkwood.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,7 @@

#define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000)

#define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x90000)


#endif
Loading

0 comments on commit 7d83f8f

Please sign in to comment.