Commit 7d83f8fc authored by Russell King's avatar Russell King Committed by Russell King

Merge branch 'master' of git://git.marvell.com/orion into devel

Conflicts:

	arch/arm/mach-mx1/devices.c
parents be093beb 569106c7
This diff is collapsed.
...@@ -165,6 +165,7 @@ CONFIG_ARCH_MV78XX0=y ...@@ -165,6 +165,7 @@ CONFIG_ARCH_MV78XX0=y
# Marvell MV78xx0 Implementations # Marvell MV78xx0 Implementations
# #
CONFIG_MACH_DB78X00_BP=y CONFIG_MACH_DB78X00_BP=y
CONFIG_MACH_RD78X00_MASA=y
# #
# Boot options # Boot options
......
...@@ -481,7 +481,7 @@ CONFIG_MTD_NAND_IDS=y ...@@ -481,7 +481,7 @@ CONFIG_MTD_NAND_IDS=y
# CONFIG_MTD_NAND_DISKONCHIP is not set # CONFIG_MTD_NAND_DISKONCHIP is not set
# CONFIG_MTD_NAND_CAFE is not set # CONFIG_MTD_NAND_CAFE is not set
# CONFIG_MTD_NAND_NANDSIM 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_ALAUDA is not set
CONFIG_MTD_NAND_ORION=y CONFIG_MTD_NAND_ORION=y
# CONFIG_MTD_ONENAND is not set # CONFIG_MTD_ONENAND is not set
...@@ -1177,7 +1177,7 @@ CONFIG_RTC_DRV_S35390A=y ...@@ -1177,7 +1177,7 @@ CONFIG_RTC_DRV_S35390A=y
# CONFIG_RTC_DRV_DS1553 is not set # CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set # CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_STK17TA8 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_M48T59 is not set
# CONFIG_RTC_DRV_V3020 is not set # CONFIG_RTC_DRV_V3020 is not set
......
...@@ -115,6 +115,7 @@ ENTRY(mcount) ...@@ -115,6 +115,7 @@ ENTRY(mcount)
.globl mcount_call .globl mcount_call
mcount_call: mcount_call:
bl ftrace_stub bl ftrace_stub
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc} ldmia sp!, {r0-r3, pc}
ENTRY(ftrace_caller) ENTRY(ftrace_caller)
...@@ -126,6 +127,7 @@ ENTRY(ftrace_caller) ...@@ -126,6 +127,7 @@ ENTRY(ftrace_caller)
.globl ftrace_call .globl ftrace_call
ftrace_call: ftrace_call:
bl ftrace_stub bl ftrace_stub
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc} ldmia sp!, {r0-r3, pc}
#else #else
...@@ -137,6 +139,7 @@ ENTRY(mcount) ...@@ -137,6 +139,7 @@ ENTRY(mcount)
adr r0, ftrace_stub adr r0, ftrace_stub
cmp r0, r2 cmp r0, r2
bne trace bne trace
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc} ldmia sp!, {r0-r3, pc}
trace: trace:
...@@ -145,6 +148,7 @@ trace: ...@@ -145,6 +148,7 @@ trace:
sub r0, r0, #MCOUNT_INSN_SIZE sub r0, r0, #MCOUNT_INSN_SIZE
mov lr, pc mov lr, pc
mov pc, r2 mov pc, r2
mov lr, r1 @ restore lr
ldmia sp!, {r0-r3, pc} ldmia sp!, {r0-r3, pc}
#endif /* CONFIG_DYNAMIC_FTRACE */ #endif /* CONFIG_DYNAMIC_FTRACE */
......
...@@ -88,7 +88,7 @@ void set_fiq_handler(void *start, unsigned int length) ...@@ -88,7 +88,7 @@ void set_fiq_handler(void *start, unsigned int length)
* disable irqs for the duration. Note - these functions are almost * disable irqs for the duration. Note - these functions are almost
* entirely coded in assembly. * 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; register unsigned long tmp;
asm volatile ( asm volatile (
...@@ -106,7 +106,7 @@ void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs) ...@@ -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)); : "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; register unsigned long tmp;
asm volatile ( asm volatile (
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
struct i2c_board_info;
struct ep93xx_eth_data struct ep93xx_eth_data
{ {
unsigned char dev_addr[6]; unsigned char dev_addr[6];
......
...@@ -20,6 +20,12 @@ config MACH_RD88F6281 ...@@ -20,6 +20,12 @@ config MACH_RD88F6281
Say 'Y' here if you want your kernel to support the Say 'Y' here if you want your kernel to support the
Marvell RD-88F6281 Reference Board. 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 endmenu
endif endif
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_DB88F6281_BP) += db88f6281-bp-setup.o
obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <mach/kirkwood.h> #include <mach/kirkwood.h>
#include <plat/cache-feroceon-l2.h> #include <plat/cache-feroceon-l2.h>
#include <plat/ehci-orion.h> #include <plat/ehci-orion.h>
#include <plat/mvsdio.h>
#include <plat/mv_xor.h> #include <plat/mv_xor.h>
#include <plat/orion_nand.h> #include <plat/orion_nand.h>
#include <plat/time.h> #include <plat/time.h>
...@@ -254,7 +255,7 @@ static struct resource kirkwood_rtc_resource = { ...@@ -254,7 +255,7 @@ static struct resource kirkwood_rtc_resource = {
.flags = IORESOURCE_MEM, .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); platform_device_register_simple("rtc-mv", -1, &kirkwood_rtc_resource, 1);
} }
...@@ -295,6 +296,50 @@ void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data) ...@@ -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 * SPI
****************************************************************************/ ****************************************************************************/
...@@ -502,7 +547,7 @@ static struct platform_device kirkwood_xor01_channel = { ...@@ -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); platform_device_register(&kirkwood_xor0_shared);
...@@ -600,7 +645,7 @@ static struct platform_device kirkwood_xor11_channel = { ...@@ -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); platform_device_register(&kirkwood_xor1_shared);
...@@ -708,4 +753,9 @@ void __init kirkwood_init(void) ...@@ -708,4 +753,9 @@ void __init kirkwood_init(void)
#ifdef CONFIG_CACHE_FEROCEON_L2 #ifdef CONFIG_CACHE_FEROCEON_L2
kirkwood_l2_init(); kirkwood_l2_init();
#endif #endif
/* internal devices that every board has */
kirkwood_rtc_init();
kirkwood_xor0_init();
kirkwood_xor1_init();
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
struct dsa_platform_data; struct dsa_platform_data;
struct mv643xx_eth_platform_data; struct mv643xx_eth_platform_data;
struct mv_sata_platform_data; struct mv_sata_platform_data;
struct mvsdio_platform_data;
/* /*
* Basic Kirkwood init functions used early by machine-setup. * Basic Kirkwood init functions used early by machine-setup.
...@@ -33,13 +34,11 @@ void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data); ...@@ -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_ge01_init(struct mv643xx_eth_platform_data *eth_data);
void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq); void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq);
void kirkwood_pcie_init(void); void kirkwood_pcie_init(void);
void kirkwood_rtc_init(void);
void kirkwood_sata_init(struct mv_sata_platform_data *sata_data); 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_spi_init(void);
void kirkwood_uart0_init(void); void kirkwood_uart0_init(void);
void kirkwood_uart1_init(void); void kirkwood_uart1_init(void);
void kirkwood_xor0_init(void);
void kirkwood_xor1_init(void);
extern struct sys_timer kirkwood_timer; extern struct sys_timer kirkwood_timer;
......
...@@ -11,18 +11,59 @@ ...@@ -11,18 +11,59 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.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/mtd/nand.h>
#include <linux/timer.h> #include <linux/mtd/partitions.h>
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h> #include <linux/mv643xx_eth.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include <mach/kirkwood.h> #include <mach/kirkwood.h>
#include <plat/orion_nand.h>
#include <plat/mvsdio.h>
#include "common.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 = { static struct mv643xx_eth_platform_data db88f6281_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8), .phy_addr = MV643XX_ETH_PHY_ADDR(8),
...@@ -32,18 +73,32 @@ static struct mv_sata_platform_data db88f6281_sata_data = { ...@@ -32,18 +73,32 @@ static struct mv_sata_platform_data db88f6281_sata_data = {
.n_ports = 2, .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) static void __init db88f6281_init(void)
{ {
/* /*
* Basic setup. Needs to be called early. * Basic setup. Needs to be called early.
*/ */
kirkwood_init(); kirkwood_init();
kirkwood_mpp_conf(db88f6281_mpp_config);
kirkwood_ehci_init(); kirkwood_ehci_init();
kirkwood_ge00_init(&db88f6281_ge00_data); kirkwood_ge00_init(&db88f6281_ge00_data);
kirkwood_rtc_init();
kirkwood_sata_init(&db88f6281_sata_data); kirkwood_sata_init(&db88f6281_sata_data);
kirkwood_uart0_init(); kirkwood_uart0_init();
kirkwood_sdio_init(&db88f6281_mvsdio_data);
platform_device_register(&db88f6281_nand_flash);
} }
static int __init db88f6281_pci_init(void) static int __init db88f6281_pci_init(void)
......
...@@ -116,5 +116,7 @@ ...@@ -116,5 +116,7 @@
#define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000) #define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000)
#define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x90000)
#endif #endif
/*
* arch/arm/mach-kirkwood/mpp.c
*
* MPP functions for Marvell Kirkwood SoCs
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/mbus.h>
#include <linux/io.h>
#include <asm/gpio.h>
#include <mach/hardware.h>
#include "common.h"
#include "mpp.h"
static unsigned int __init kirkwood_variant(void)
{
u32 dev, rev;
kirkwood_pcie_id(&dev, &rev);
if (dev == MV88F6281_DEV_ID && rev >= MV88F6281_REV_A0)
return MPP_F6281_MASK;
if (dev == MV88F6192_DEV_ID && rev >= MV88F6192_REV_A0)
return MPP_F6192_MASK;
if (dev == MV88F6180_DEV_ID)
return MPP_F6180_MASK;
printk(KERN_ERR "MPP setup: unknown kirkwood variant "
"(dev %#x rev %#x)\n", dev, rev);
return 0;
}
#define MPP_CTRL(i) (DEV_BUS_VIRT_BASE + (i) * 4)
#define MPP_NR_REGS (1 + MPP_MAX/8)
void __init kirkwood_mpp_conf(unsigned int *mpp_list)
{
u32 mpp_ctrl[MPP_NR_REGS];
unsigned int variant_mask;
int i;
variant_mask = kirkwood_variant();
if (!variant_mask)
return;
printk(KERN_DEBUG "initial MPP regs:");
for (i = 0; i < MPP_NR_REGS; i++) {
mpp_ctrl[i] = readl(MPP_CTRL(i));
printk(" %08x", mpp_ctrl[i]);
}
printk("\n");
while (*mpp_list) {
unsigned int num = MPP_NUM(*mpp_list);
unsigned int sel = MPP_SEL(*mpp_list);
int shift, gpio_mode;
if (num > MPP_MAX) {
printk(KERN_ERR "kirkwood_mpp_conf: invalid MPP "
"number (%u)\n", num);
continue;
}
if (!(*mpp_list & variant_mask)) {
printk(KERN_WARNING
"kirkwood_mpp_conf: requested MPP%u config "
"unavailable on this hardware\n", num);
continue;
}
shift = (num & 7) << 2;
mpp_ctrl[num / 8] &= ~(0xf << shift);
mpp_ctrl[num / 8] |= sel << shift;
gpio_mode = 0;
if (*mpp_list & MPP_INPUT_MASK)
gpio_mode |= GPIO_INPUT_OK;
if (*mpp_list & MPP_OUTPUT_MASK)
gpio_mode |= GPIO_OUTPUT_OK;
if (sel != 0)
gpio_mode = 0;
orion_gpio_set_valid(num, gpio_mode);
mpp_list++;
}
printk(KERN_DEBUG " final MPP regs:");
for (i = 0; i < MPP_NR_REGS; i++) {
writel(mpp_ctrl[i], MPP_CTRL(i));
printk(" %08x", mpp_ctrl[i]);
}
printk("\n");
}
This diff is collapsed.
...@@ -11,11 +11,8 @@ ...@@ -11,11 +11,8 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.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/mtd/nand.h>
#include <linux/timer.h> #include <linux/mtd/partitions.h>
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h> #include <linux/mv643xx_eth.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
...@@ -23,7 +20,6 @@ ...@@ -23,7 +20,6 @@
#include <linux/spi/orion_spi.h> #include <linux/spi/orion_spi.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include <mach/kirkwood.h> #include <mach/kirkwood.h>
#include "common.h" #include "common.h"
...@@ -61,14 +57,11 @@ static void __init rd88f6192_init(void) ...@@ -61,14 +57,11 @@ static void __init rd88f6192_init(void)
kirkwood_ehci_init(); kirkwood_ehci_init();
kirkwood_ge00_init(&rd88f6192_ge00_data); kirkwood_ge00_init(&rd88f6192_ge00_data);
kirkwood_rtc_init();
kirkwood_sata_init(&rd88f6192_sata_data); kirkwood_sata_init(&rd88f6192_sata_data);
spi_register_board_info(rd88F6192_spi_slave_info, spi_register_board_info(rd88F6192_spi_slave_info,
ARRAY_SIZE(rd88F6192_spi_slave_info)); ARRAY_SIZE(rd88F6192_spi_slave_info));
kirkwood_spi_init(); kirkwood_spi_init();
kirkwood_uart0_init(); kirkwood_uart0_init();
kirkwood_xor0_init();
kirkwood_xor1_init();
} }
static int __init rd88f6192_pci_init(void) static int __init rd88f6192_pci_init(void)
......
...@@ -11,21 +11,20 @@ ...@@ -11,21 +11,20 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pci.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/nand.h> #include <linux/mtd/nand.h>
#include <linux/timer.h> #include <linux/mtd/partitions.h>
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h> #include <linux/mv643xx_eth.h>
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <net/dsa.h> #include <net/dsa.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include <mach/kirkwood.h> #include <mach/kirkwood.h>
#include <plat/mvsdio.h>
#include <plat/orion_nand.h> #include <plat/orion_nand.h>
#include "common.h" #include "common.h"
#include "mpp.h"
static struct mtd_partition rd88f6281_nand_parts[] = { static struct mtd_partition rd88f6281_nand_parts[] = {
{ {
...@@ -91,6 +90,15 @@ static struct mv_sata_platform_data rd88f6281_sata_data = { ...@@ -91,6 +90,15 @@ static struct mv_sata_platform_data rd88f6281_sata_data = {
.n_ports = 2, .n_ports = 2,
}; };
static struct mvsdio_platform_data rd88f6281_mvsdio_data = {
.gpio_card_detect = 28,
};
static unsigned int rd88f6281_mpp_config[] __initdata = {
MPP28_GPIO,
0
};
static void __init rd88f6281_init(void) static void __init rd88f6281_init(void)
{ {
u32 dev, rev; u32 dev, rev;
...@@ -99,6 +107,7 @@ static void __init rd88f6281_init(void) ...@@ -99,6 +107,7 @@ static void __init rd88f6281_init(void)
* Basic setup. Needs to be called early. * Basic setup. Needs to be called early.
*/ */
kirkwood_init(); kirkwood_init();
kirkwood_mpp_conf(rd88f6281_mpp_config);
kirkwood_ehci_init(); kirkwood_ehci_init();
...@@ -112,8 +121,8 @@ static void __init rd88f6281_init(void) ...@@ -112,8 +121,8 @@ static void __init rd88f6281_init(void)
} }
kirkwood_ge00_switch_init(&rd88f6281_switch_data, NO_IRQ); kirkwood_ge00_switch_init(&rd88f6281_switch_data, NO_IRQ);
kirkwood_rtc_init();
kirkwood_sata_init(&rd88f6281_sata_data); kirkwood_sata_init(&rd88f6281_sata_data);
kirkwood_sdio_init(&rd88f6281_mvsdio_data);
kirkwood_uart0_init(); kirkwood_uart0_init();
platform_device_register(&rd88f6281_nand_flash); platform_device_register(&rd88f6281_nand_flash);
......
/*
* arch/arm/mach-kirkwood/sheevaplug-setup.c
*
* Marvell SheevaPlug Reference Board Setup
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
#include <linux/leds.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
#include <plat/mvsdio.h>
#include <plat/orion_nand.h>
#include "common.h"
#include "mpp.h"
static struct mtd_partition sheevaplug_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 sheevaplug_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 sheevaplug_nand_data = {
.parts = sheevaplug_nand_parts,
.nr_parts = ARRAY_SIZE(sheevaplug_nand_parts),
.cle = 0,
.ale = 1,
.width = 8,
.chip_delay = 25,
};
static struct platform_device sheevaplug_nand_flash = {
.name = "orion_nand",
.id = -1,
.dev = {
.platform_data = &sheevaplug_nand_data,
},
.resource = &sheevaplug_nand_resource,
.num_resources = 1,
};
static struct mv643xx_eth_platform_data sheevaplug_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(0),
};
static struct mvsdio_platform_data sheevaplug_mvsdio_data = {
// unfortunately the CD signal has not been connected */
};
static struct gpio_led sheevaplug_led_pins[] = {
{
.name = "plug:green:health",
.default_trigger = "default-on",
.gpio = 49,
.active_low = 1,
},
};
static struct gpio_led_platform_data sheevaplug_led_data = {
.leds = sheevaplug_led_pins,
.num_leds = ARRAY_SIZE(sheevaplug_led_pins),
};
static struct platform_device sheevaplug_leds = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &sheevaplug_led_data,
}
};
static unsigned int sheevaplug_mpp_config[] __initdata = {
MPP29_GPIO, /* USB Power Enable */
MPP49_GPIO, /* LED */
0
};
static void __init sheevaplug_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_init();
kirkwood_mpp_conf(sheevaplug_mpp_config);
kirkwood_uart0_init();
if (gpio_request(29, "USB Power Enable") != 0 ||
gpio_direction_output(29, 1) != 0)
printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n");
kirkwood_ehci_init();
kirkwood_ge00_init(&sheevaplug_ge00_data);
kirkwood_sdio_init(&sheevaplug_mvsdio_data);
platform_device_register(&sheevaplug_nand_flash);
platform_device_register(&sheevaplug_leds);
}
MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board")
/* Maintainer: shadi Ammouri <shadi@marvell.com> */
.phys_io = KIRKWOOD_REGS_PHYS_BASE,
.io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
.boot_params = 0x00000100,
.init_machine = sheevaplug_init,
.map_io = kirkwood_map_io,
.init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer,
MACHINE_END
...@@ -8,6 +8,12 @@ config MACH_DB78X00_BP ...@@ -8,6 +8,12 @@ config MACH_DB78X00_BP
Say 'Y' here if you want your kernel to support the Say 'Y' here if you want your kernel to support the
Marvell DB-78x00-BP Development Board. Marvell DB-78x00-BP Development Board.
config MACH_RD78X00_MASA
bool "Marvell RD-78x00-mASA Reference Design"
help
Say 'Y' here if you want your kernel to support the
Marvell RD-78x00-mASA Reference Design.
endmenu endmenu
endif endif
obj-y += common.o addr-map.o irq.o pcie.o obj-y += common.o addr-map.o irq.o pcie.o
obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o
obj-$(CONFIG_MACH_RD78X00_MASA) += rd78x00-masa-setup.o
...@@ -14,7 +14,9 @@ ...@@ -14,7 +14,9 @@
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/mbus.h> #include <linux/mbus.h>
#include <linux/mv643xx_eth.h> #include <linux/mv643xx_eth.h>
#include <linux/mv643xx_i2c.h>
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
#include <linux/ethtool.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <mach/mv78xx0.h> #include <mach/mv78xx0.h>
...@@ -430,9 +432,22 @@ static struct platform_device mv78xx0_ge10 = { ...@@ -430,9 +432,22 @@ static struct platform_device mv78xx0_ge10 = {
void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data) void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data)
{ {
u32 dev, rev;
eth_data->shared = &mv78xx0_ge10_shared; eth_data->shared = &mv78xx0_ge10_shared;
mv78xx0_ge10.dev.platform_data = eth_data; mv78xx0_ge10.dev.platform_data = eth_data;
/*
* On the Z0, ge10 and ge11 are internally connected back
* to back, and not brought out.
*/
mv78xx0_pcie_id(&dev, &rev);
if (dev == MV78X00_Z0_DEV_ID) {
eth_data->phy_addr = MV643XX_ETH_PHY_NONE;
eth_data->speed = SPEED_1000;
eth_data->duplex = DUPLEX_FULL;
}
platform_device_register(&mv78xx0_ge10_shared); platform_device_register(&mv78xx0_ge10_shared);
platform_device_register(&mv78xx0_ge10); platform_device_register(&mv78xx0_ge10);
} }
...@@ -484,13 +499,101 @@ static struct platform_device mv78xx0_ge11 = { ...@@ -484,13 +499,101 @@ static struct platform_device mv78xx0_ge11 = {
void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data) void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data)
{ {
u32 dev, rev;
eth_data->shared = &mv78xx0_ge11_shared; eth_data->shared = &mv78xx0_ge11_shared;
mv78xx0_ge11.dev.platform_data = eth_data; mv78xx0_ge11.dev.platform_data = eth_data;
/*
* On the Z0, ge10 and ge11 are internally connected back
* to back, and not brought out.
*/
mv78xx0_pcie_id(&dev, &rev);
if (dev == MV78X00_Z0_DEV_ID) {
eth_data->phy_addr = MV643XX_ETH_PHY_NONE;
eth_data->speed = SPEED_1000;
eth_data->duplex = DUPLEX_FULL;
}
platform_device_register(&mv78xx0_ge11_shared); platform_device_register(&mv78xx0_ge11_shared);
platform_device_register(&mv78xx0_ge11); platform_device_register(&mv78xx0_ge11);
} }
/*****************************************************************************
* I2C bus 0
****************************************************************************/
static struct mv64xxx_i2c_pdata mv78xx0_i2c_0_pdata = {
.freq_m = 8, /* assumes 166 MHz TCLK */
.freq_n = 3,
.timeout = 1000, /* Default timeout of 1 second */
};
static struct resource mv78xx0_i2c_0_resources[] = {
{
.name = "i2c 0 base",
.start = I2C_0_PHYS_BASE,
.end = I2C_0_PHYS_BASE + 0x1f,
.flags = IORESOURCE_MEM,
}, {
.name = "i2c 0 irq",
.start = IRQ_MV78XX0_I2C_0,
.end = IRQ_MV78XX0_I2C_0,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device mv78xx0_i2c_0 = {
.name = MV64XXX_I2C_CTLR_NAME,
.id = 0,
.num_resources = ARRAY_SIZE(mv78xx0_i2c_0_resources),
.resource = mv78xx0_i2c_0_resources,
.dev = {
.platform_data = &mv78xx0_i2c_0_pdata,
},
};
/*****************************************************************************
* I2C bus 1
****************************************************************************/
static struct mv64xxx_i2c_pdata mv78xx0_i2c_1_pdata = {
.freq_m = 8, /* assumes 166 MHz TCLK */
.freq_n = 3,
.timeout = 1000, /* Default timeout of 1 second */
};
static struct resource mv78xx0_i2c_1_resources[] = {
{
.name = "i2c 1 base",
.start = I2C_1_PHYS_BASE,
.end = I2C_1_PHYS_BASE + 0x1f,
.flags = IORESOURCE_MEM,
}, {
.name = "i2c 1 irq",
.start = IRQ_MV78XX0_I2C_1,
.end = IRQ_MV78XX0_I2C_1,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device mv78xx0_i2c_1 = {
.name = MV64XXX_I2C_CTLR_NAME,
.id = 1,
.num_resources = ARRAY_SIZE(mv78xx0_i2c_1_resources),
.resource = mv78xx0_i2c_1_resources,
.dev = {
.platform_data = &mv78xx0_i2c_1_pdata,
},
};
void __init mv78xx0_i2c_init(void)
{
platform_device_register(&mv78xx0_i2c_0);
platform_device_register(&mv78xx0_i2c_1);
}
/***************************************************************************** /*****************************************************************************
* SATA * SATA
...@@ -719,6 +822,32 @@ struct sys_timer mv78xx0_timer = { ...@@ -719,6 +822,32 @@ struct sys_timer mv78xx0_timer = {
/***************************************************************************** /*****************************************************************************
* General * General
****************************************************************************/ ****************************************************************************/
static char * __init mv78xx0_id(void)
{
u32 dev, rev;
mv78xx0_pcie_id(&dev, &rev);
if (dev == MV78X00_Z0_DEV_ID) {
if (rev == MV78X00_REV_Z0)
return "MV78X00-Z0";
else
return "MV78X00-Rev-Unsupported";
} else if (dev == MV78100_DEV_ID) {
if (rev == MV78100_REV_A0)
return "MV78100-A0";
else
return "MV78100-Rev-Unsupported";
} else if (dev == MV78200_DEV_ID) {
if (rev == MV78100_REV_A0)
return "MV78200-A0";
else
return "MV78200-Rev-Unsupported";
} else {
return "Device-Unknown";
}
}
static int __init is_l2_writethrough(void) static int __init is_l2_writethrough(void)
{ {
return !!(readl(CPU_CONTROL) & L2_WRITETHROUGH); return !!(readl(CPU_CONTROL) & L2_WRITETHROUGH);
...@@ -737,7 +866,8 @@ void __init mv78xx0_init(void) ...@@ -737,7 +866,8 @@ void __init mv78xx0_init(void)
get_pclk_l2clk(hclk, core_index, &pclk, &l2clk); get_pclk_l2clk(hclk, core_index, &pclk, &l2clk);
tclk = get_tclk(); tclk = get_tclk();
printk(KERN_INFO "MV78xx0 core #%d, ", core_index); printk(KERN_INFO "%s ", mv78xx0_id());
printk("core #%d, ", core_index);
printk("PCLK = %dMHz, ", (pclk + 499999) / 1000000); printk("PCLK = %dMHz, ", (pclk + 499999) / 1000000);
printk("L2 = %dMHz, ", (l2clk + 499999) / 1000000); printk("L2 = %dMHz, ", (l2clk + 499999) / 1000000);
printk("HCLK = %dMHz, ", (hclk + 499999) / 1000000); printk("HCLK = %dMHz, ", (hclk + 499999) / 1000000);
......
...@@ -29,6 +29,8 @@ void mv78xx0_setup_pcie_io_win(int window, u32 base, u32 size, ...@@ -29,6 +29,8 @@ void mv78xx0_setup_pcie_io_win(int window, u32 base, u32 size,
void mv78xx0_setup_pcie_mem_win(int window, u32 base, u32 size, void mv78xx0_setup_pcie_mem_win(int window, u32 base, u32 size,
int maj, int min); int maj, int min);
void mv78xx0_pcie_id(u32 *dev, u32 *rev);
void mv78xx0_ehci0_init(void); void mv78xx0_ehci0_init(void);
void mv78xx0_ehci1_init(void); void mv78xx0_ehci1_init(void);
void mv78xx0_ehci2_init(void); void mv78xx0_ehci2_init(void);
...@@ -42,6 +44,7 @@ void mv78xx0_uart0_init(void); ...@@ -42,6 +44,7 @@ void mv78xx0_uart0_init(void);
void mv78xx0_uart1_init(void); void mv78xx0_uart1_init(void);
void mv78xx0_uart2_init(void); void mv78xx0_uart2_init(void);
void mv78xx0_uart3_init(void); void mv78xx0_uart3_init(void);
void mv78xx0_i2c_init(void);
extern struct sys_timer mv78xx0_timer; extern struct sys_timer mv78xx0_timer;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h> #include <linux/mv643xx_eth.h>
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <linux/i2c.h>
#include <mach/mv78xx0.h> #include <mach/mv78xx0.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -28,21 +29,22 @@ static struct mv643xx_eth_platform_data db78x00_ge01_data = { ...@@ -28,21 +29,22 @@ static struct mv643xx_eth_platform_data db78x00_ge01_data = {
}; };
static struct mv643xx_eth_platform_data db78x00_ge10_data = { static struct mv643xx_eth_platform_data db78x00_ge10_data = {
.phy_addr = MV643XX_ETH_PHY_NONE, .phy_addr = MV643XX_ETH_PHY_ADDR(10),
.speed = SPEED_1000,
.duplex = DUPLEX_FULL,
}; };
static struct mv643xx_eth_platform_data db78x00_ge11_data = { static struct mv643xx_eth_platform_data db78x00_ge11_data = {
.phy_addr = MV643XX_ETH_PHY_NONE, .phy_addr = MV643XX_ETH_PHY_ADDR(11),
.speed = SPEED_1000,
.duplex = DUPLEX_FULL,
}; };
static struct mv_sata_platform_data db78x00_sata_data = { static struct mv_sata_platform_data db78x00_sata_data = {
.n_ports = 2, .n_ports = 2,
}; };
static struct i2c_board_info __initdata db78x00_i2c_rtc = {
I2C_BOARD_INFO("ds1338", 0x68),
};
static void __init db78x00_init(void) static void __init db78x00_init(void)
{ {
/* /*
...@@ -64,6 +66,8 @@ static void __init db78x00_init(void) ...@@ -64,6 +66,8 @@ static void __init db78x00_init(void)
mv78xx0_sata_init(&db78x00_sata_data); mv78xx0_sata_init(&db78x00_sata_data);
mv78xx0_uart0_init(); mv78xx0_uart0_init();
mv78xx0_uart2_init(); mv78xx0_uart2_init();
mv78xx0_i2c_init();
i2c_register_board_info(0, &db78x00_i2c_rtc, 1);
} else { } else {
mv78xx0_uart1_init(); mv78xx0_uart1_init();
mv78xx0_uart3_init(); mv78xx0_uart3_init();
......
...@@ -79,6 +79,18 @@ ...@@ -79,6 +79,18 @@
#define IRQ_MASK_HIGH_OFF 0x0014 #define IRQ_MASK_HIGH_OFF 0x0014
#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300) #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
/*
* Supported devices and revisions.
*/
#define MV78X00_Z0_DEV_ID 0x6381
#define MV78X00_REV_Z0 1
#define MV78100_DEV_ID 0x7810
#define MV78100_REV_A0 1
#define MV78200_DEV_ID 0x7820
#define MV78200_REV_A0 1
/* /*
* Register Map * Register Map
*/ */
...@@ -90,6 +102,8 @@ ...@@ -90,6 +102,8 @@
#define DEV_BUS_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x10000) #define DEV_BUS_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x10000)
#define SAMPLE_AT_RESET_LOW (DEV_BUS_VIRT_BASE | 0x0030) #define SAMPLE_AT_RESET_LOW (DEV_BUS_VIRT_BASE | 0x0030)
#define SAMPLE_AT_RESET_HIGH (DEV_BUS_VIRT_BASE | 0x0034) #define SAMPLE_AT_RESET_HIGH (DEV_BUS_VIRT_BASE | 0x0034)
#define I2C_0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x1000)
#define I2C_1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x1100)
#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000) #define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000) #define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100) #define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
......
...@@ -33,6 +33,12 @@ static struct resource pcie_io_space; ...@@ -33,6 +33,12 @@ static struct resource pcie_io_space;
static struct resource pcie_mem_space; static struct resource pcie_mem_space;
void __init mv78xx0_pcie_id(u32 *dev, u32 *rev)
{
*dev = orion_pcie_dev_id((void __iomem *)PCIE00_VIRT_BASE);
*rev = orion_pcie_rev((void __iomem *)PCIE00_VIRT_BASE);
}
static void __init mv78xx0_pcie_preinit(void) static void __init mv78xx0_pcie_preinit(void)
{ {
int i; int i;
......
/*
* arch/arm/mach-mv78x00/rd78x00-masa-setup.c
*
* Marvell RD-78x00-mASA Development Board Setup
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
#include <linux/ethtool.h>
#include <mach/mv78xx0.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include "common.h"
static struct mv643xx_eth_platform_data rd78x00_masa_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
};
static struct mv643xx_eth_platform_data rd78x00_masa_ge01_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(9),
};
static struct mv643xx_eth_platform_data rd78x00_masa_ge10_data = {
};
static struct mv643xx_eth_platform_data rd78x00_masa_ge11_data = {
};
static struct mv_sata_platform_data rd78x00_masa_sata_data = {
.n_ports = 2,
};
static void __init rd78x00_masa_init(void)
{
/*
* Basic MV78x00 setup. Needs to be called early.
*/
mv78xx0_init();
/*
* Partition on-chip peripherals between the two CPU cores.
*/
if (mv78xx0_core_index() == 0) {
mv78xx0_ehci0_init();
mv78xx0_ehci1_init();
mv78xx0_ge00_init(&rd78x00_masa_ge00_data);
mv78xx0_ge10_init(&rd78x00_masa_ge10_data);
mv78xx0_sata_init(&rd78x00_masa_sata_data);
mv78xx0_uart0_init();
mv78xx0_uart2_init();
} else {
mv78xx0_ehci2_init();
mv78xx0_ge01_init(&rd78x00_masa_ge01_data);
mv78xx0_ge11_init(&rd78x00_masa_ge11_data);
mv78xx0_uart1_init();
mv78xx0_uart3_init();
}
}
static int __init rd78x00_pci_init(void)
{
/*
* Assign all PCIe devices to CPU core #0.
*/
if (machine_is_rd78x00_masa() && mv78xx0_core_index() == 0)
mv78xx0_pcie_init(1, 1);
return 0;
}
subsys_initcall(rd78x00_pci_init);
MACHINE_START(RD78X00_MASA, "Marvell RD-78x00-MASA Development Board")
/* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
.phys_io = MV78XX0_REGS_PHYS_BASE,
.io_pg_offst = ((MV78XX0_REGS_VIRT_BASE) >> 18) & 0xfffc,
.boot_params = 0x00000100,
.init_machine = rd78x00_masa_init,
.map_io = mv78xx0_map_io,
.init_irq = mv78xx0_init_irq,
.timer = &mv78xx0_timer,
MACHINE_END
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <mach/irqs.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/imx-uart.h> #include <mach/imx-uart.h>
......
...@@ -178,7 +178,9 @@ static int __init omap3_beagle_i2c_init(void) ...@@ -178,7 +178,9 @@ static int __init omap3_beagle_i2c_init(void)
#ifdef CONFIG_I2C2_OMAP_BEAGLE #ifdef CONFIG_I2C2_OMAP_BEAGLE
omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, NULL, 0);
#endif #endif
omap_register_i2c_bus(3, 400, NULL, 0); /* Bus 3 is attached to the DVI port where devices like the pico DLP
* projector don't work reliably with 400kHz */
omap_register_i2c_bus(3, 100, NULL, 0);
return 0; return 0;
} }
......
...@@ -71,6 +71,7 @@ config MACH_WRT350N_V2 ...@@ -71,6 +71,7 @@ config MACH_WRT350N_V2
config MACH_TS78XX config MACH_TS78XX
bool "Technologic Systems TS-78xx" bool "Technologic Systems TS-78xx"
select PM
help help
Say 'Y' here if you want your kernel to support the Say 'Y' here if you want your kernel to support the
Technologic Systems TS-78xx platform. Technologic Systems TS-78xx platform.
......
...@@ -431,6 +431,10 @@ void __init orion5x_uart1_init(void) ...@@ -431,6 +431,10 @@ void __init orion5x_uart1_init(void)
/***************************************************************************** /*****************************************************************************
* XOR engine * XOR engine
****************************************************************************/ ****************************************************************************/
struct mv_xor_platform_shared_data orion5x_xor_shared_data = {
.dram = &orion5x_mbus_dram_info,
};
static struct resource orion5x_xor_shared_resources[] = { static struct resource orion5x_xor_shared_resources[] = {
{ {
.name = "xor low", .name = "xor low",
...@@ -448,6 +452,9 @@ static struct resource orion5x_xor_shared_resources[] = { ...@@ -448,6 +452,9 @@ static struct resource orion5x_xor_shared_resources[] = {
static struct platform_device orion5x_xor_shared = { static struct platform_device orion5x_xor_shared = {
.name = MV_XOR_SHARED_NAME, .name = MV_XOR_SHARED_NAME,
.id = 0, .id = 0,
.dev = {
.platform_data = &orion5x_xor_shared_data,
},
.num_resources = ARRAY_SIZE(orion5x_xor_shared_resources), .num_resources = ARRAY_SIZE(orion5x_xor_shared_resources),
.resource = orion5x_xor_shared_resources, .resource = orion5x_xor_shared_resources,
}; };
......
...@@ -76,7 +76,7 @@ static int __init dns323_dev_id(void) ...@@ -76,7 +76,7 @@ static int __init dns323_dev_id(void)
static int __init dns323_pci_init(void) static int __init dns323_pci_init(void)
{ {
/* The 5182 doesn't really use it's PCI bus, and initialising PCI /* The 5182 doesn't really use its PCI bus, and initialising PCI
* gets in the way of initialising the SATA controller. * gets in the way of initialising the SATA controller.
*/ */
if (machine_is_dns323() && dns323_dev_id() != MV88F5182_DEV_ID) if (machine_is_dns323() && dns323_dev_id() != MV88F5182_DEV_ID)
...@@ -418,7 +418,7 @@ static void __init dns323_init(void) ...@@ -418,7 +418,7 @@ static void __init dns323_init(void)
orion5x_i2c_init(); orion5x_i2c_init();
orion5x_uart0_init(); orion5x_uart0_init();
/* The 5182 has it's SATA controller on-chip, and needs it's own little /* The 5182 has its SATA controller on-chip, and needs its own little
* init routine. * init routine.
*/ */
if (dns323_dev_id() == MV88F5182_DEV_ID) if (dns323_dev_id() == MV88F5182_DEV_ID)
......
#define FPGAID(_magic, _rev) ((_magic << 8) + _rev)
/*
* get yer id's from http://ts78xx.digriz.org.uk/
* do *not* make up your own or 'borrow' any!
*/
enum fpga_ids {
/* Technologic Systems */
TS7800_REV_B2 = FPGAID(0x00b480, 0x02),
TS7800_REV_B3 = FPGAID(0x00b480, 0x03),
};
struct fpga_device {
unsigned present:1;
unsigned init:1;
};
struct fpga_devices {
/* Technologic Systems */
struct fpga_device ts_rtc;
struct fpga_device ts_nand;
};
struct ts78xx_fpga_data {
unsigned int id;
int state;
struct fpga_devices supports;
};
This diff is collapsed.
...@@ -129,7 +129,7 @@ static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = { ...@@ -129,7 +129,7 @@ static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = {
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
}; };
struct map_desc smdk6410_iodesc[] = {}; static struct map_desc smdk6410_iodesc[] = {};
static struct platform_device *smdk6410_devices[] __initdata = { static struct platform_device *smdk6410_devices[] __initdata = {
#ifdef CONFIG_SMDK6410_SD_CH0 #ifdef CONFIG_SMDK6410_SD_CH0
...@@ -146,7 +146,7 @@ static struct platform_device *smdk6410_devices[] __initdata = { ...@@ -146,7 +146,7 @@ static struct platform_device *smdk6410_devices[] __initdata = {
static struct i2c_board_info i2c_devs0[] __initdata = { static struct i2c_board_info i2c_devs0[] __initdata = {
{ I2C_BOARD_INFO("24c08", 0x50), }, { I2C_BOARD_INFO("24c08", 0x50), },
{ I2C_BOARD_INFO("WM8580", 0X1b), }, { I2C_BOARD_INFO("wm8580", 0x1b), },
}; };
static struct i2c_board_info i2c_devs1[] __initdata = { static struct i2c_board_info i2c_devs1[] __initdata = {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/highmem.h> #include <linux/highmem.h>
static void __attribute__((naked)) static void __naked
feroceon_copy_user_page(void *kto, const void *kfrom) feroceon_copy_user_page(void *kto, const void *kfrom)
{ {
asm("\ asm("\
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* *
* FIXME: do we need to handle cache stuff... * FIXME: do we need to handle cache stuff...
*/ */
static void __attribute__((naked)) static void __naked
v3_copy_user_page(void *kto, const void *kfrom) v3_copy_user_page(void *kto, const void *kfrom)
{ {
asm("\n\ asm("\n\
......
...@@ -44,7 +44,7 @@ static DEFINE_SPINLOCK(minicache_lock); ...@@ -44,7 +44,7 @@ static DEFINE_SPINLOCK(minicache_lock);
* instruction. If your processor does not supply this, you have to write your * instruction. If your processor does not supply this, you have to write your
* own copy_user_highpage that does the right thing. * own copy_user_highpage that does the right thing.
*/ */
static void __attribute__((naked)) static void __naked
mc_copy_user_page(void *from, void *to) mc_copy_user_page(void *from, void *to)
{ {
asm volatile( asm volatile(
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* instruction. If your processor does not supply this, you have to write your * instruction. If your processor does not supply this, you have to write your
* own copy_user_highpage that does the right thing. * own copy_user_highpage that does the right thing.
*/ */
static void __attribute__((naked)) static void __naked
v4wb_copy_user_page(void *kto, const void *kfrom) v4wb_copy_user_page(void *kto, const void *kfrom)
{ {
asm("\ asm("\
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* dirty data in the cache. However, we do have to ensure that * dirty data in the cache. However, we do have to ensure that
* subsequent reads are up to date. * subsequent reads are up to date.
*/ */
static void __attribute__((naked)) static void __naked
v4wt_copy_user_page(void *kto, const void *kfrom) v4wt_copy_user_page(void *kto, const void *kfrom)
{ {
asm("\ asm("\
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* if we eventually end up using our copied page. * if we eventually end up using our copied page.
* *
*/ */
static void __attribute__((naked)) static void __naked
xsc3_mc_copy_user_page(void *kto, const void *kfrom) xsc3_mc_copy_user_page(void *kto, const void *kfrom)
{ {
asm("\ asm("\
......
...@@ -42,7 +42,7 @@ static DEFINE_SPINLOCK(minicache_lock); ...@@ -42,7 +42,7 @@ static DEFINE_SPINLOCK(minicache_lock);
* Dcache aliasing issue. The writes will be forwarded to the write buffer, * Dcache aliasing issue. The writes will be forwarded to the write buffer,
* and merged as appropriate. * and merged as appropriate.
*/ */
static void __attribute__((naked)) static void __naked
mc_copy_user_page(void *from, void *to) mc_copy_user_page(void *from, void *to)
{ {
/* /*
......
...@@ -18,7 +18,8 @@ obj-$(CONFIG_CPU_FREQ) += cpu-omap.o ...@@ -18,7 +18,8 @@ obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
obj-$(CONFIG_I2C_OMAP) += i2c.o i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
obj-y += $(i2c-omap-m) $(i2c-omap-y)
# OMAP mailbox framework # OMAP mailbox framework
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o
......
...@@ -199,21 +199,17 @@ static struct clocksource clocksource_32k = { ...@@ -199,21 +199,17 @@ static struct clocksource clocksource_32k = {
.flags = CLOCK_SOURCE_IS_CONTINUOUS, .flags = CLOCK_SOURCE_IS_CONTINUOUS,
}; };
/*
* Rounds down to nearest nsec.
*/
unsigned long long omap_32k_ticks_to_nsecs(unsigned long ticks_32k)
{
return cyc2ns(&clocksource_32k, ticks_32k);
}
/* /*
* Returns current time from boot in nsecs. It's OK for this to wrap * Returns current time from boot in nsecs. It's OK for this to wrap
* around for now, as it's just a relative time stamp. * around for now, as it's just a relative time stamp.
*/ */
unsigned long long sched_clock(void) unsigned long long sched_clock(void)
{ {
return omap_32k_ticks_to_nsecs(omap_32k_read()); unsigned long long ret;
ret = (unsigned long long)omap_32k_read();
ret = (ret * clocksource_32k.mult_orig) >> clocksource_32k.shift;
return ret;
} }
static int __init omap_init_clocksource_32k(void) static int __init omap_init_clocksource_32k(void)
......
...@@ -35,7 +35,7 @@ extern void omap_map_common_io(void); ...@@ -35,7 +35,7 @@ extern void omap_map_common_io(void);
extern struct sys_timer omap_timer; extern struct sys_timer omap_timer;
extern void omap_serial_init(void); extern void omap_serial_init(void);
extern void omap_serial_enable_clocks(int enable); extern void omap_serial_enable_clocks(int enable);
#ifdef CONFIG_I2C_OMAP #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
extern int omap_register_i2c_bus(int bus_id, u32 clkrate, extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
struct i2c_board_info const *info, struct i2c_board_info const *info,
unsigned len); unsigned len);
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
!defined(CONFIG_ARCH_OMAP15XX) && \ !defined(CONFIG_ARCH_OMAP15XX) && \
!defined(CONFIG_ARCH_OMAP16XX) && \ !defined(CONFIG_ARCH_OMAP16XX) && \
!defined(CONFIG_ARCH_OMAP24XX) !defined(CONFIG_ARCH_OMAP24XX)
#error "Power management for this processor not implemented yet" #warning "Power management for this processor not implemented yet"
#endif #endif
#ifndef __ASSEMBLER__ #ifndef __ASSEMBLER__
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
static DEFINE_SPINLOCK(gpio_lock); static DEFINE_SPINLOCK(gpio_lock);
static const char *gpio_label[GPIO_MAX]; /* non null for allocated GPIOs */ static const char *gpio_label[GPIO_MAX]; /* non null for allocated GPIOs */
static unsigned long gpio_valid[BITS_TO_LONGS(GPIO_MAX)]; static unsigned long gpio_valid_input[BITS_TO_LONGS(GPIO_MAX)];
static unsigned long gpio_valid_output[BITS_TO_LONGS(GPIO_MAX)];
static inline void __set_direction(unsigned pin, int input) static inline void __set_direction(unsigned pin, int input)
{ {
...@@ -53,7 +54,7 @@ int gpio_direction_input(unsigned pin) ...@@ -53,7 +54,7 @@ int gpio_direction_input(unsigned pin)
{ {
unsigned long flags; unsigned long flags;
if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid_input)) {
pr_debug("%s: invalid GPIO %d\n", __func__, pin); pr_debug("%s: invalid GPIO %d\n", __func__, pin);
return -EINVAL; return -EINVAL;
} }
...@@ -83,7 +84,7 @@ int gpio_direction_output(unsigned pin, int value) ...@@ -83,7 +84,7 @@ int gpio_direction_output(unsigned pin, int value)
unsigned long flags; unsigned long flags;
u32 u; u32 u;
if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid_output)) {
pr_debug("%s: invalid GPIO %d\n", __func__, pin); pr_debug("%s: invalid GPIO %d\n", __func__, pin);
return -EINVAL; return -EINVAL;
} }
...@@ -161,7 +162,9 @@ int gpio_request(unsigned pin, const char *label) ...@@ -161,7 +162,9 @@ int gpio_request(unsigned pin, const char *label)
unsigned long flags; unsigned long flags;
int ret; int ret;
if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { if (pin >= GPIO_MAX ||
!(test_bit(pin, gpio_valid_input) ||
test_bit(pin, gpio_valid_output))) {
pr_debug("%s: invalid GPIO %d\n", __func__, pin); pr_debug("%s: invalid GPIO %d\n", __func__, pin);
return -EINVAL; return -EINVAL;
} }
...@@ -183,7 +186,9 @@ EXPORT_SYMBOL(gpio_request); ...@@ -183,7 +186,9 @@ EXPORT_SYMBOL(gpio_request);
void gpio_free(unsigned pin) void gpio_free(unsigned pin)
{ {
if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { if (pin >= GPIO_MAX ||
!(test_bit(pin, gpio_valid_input) ||
test_bit(pin, gpio_valid_output))) {
pr_debug("%s: invalid GPIO %d\n", __func__, pin); pr_debug("%s: invalid GPIO %d\n", __func__, pin);
return; return;
} }
...@@ -208,12 +213,18 @@ void __init orion_gpio_set_unused(unsigned pin) ...@@ -208,12 +213,18 @@ void __init orion_gpio_set_unused(unsigned pin)
__set_direction(pin, 0); __set_direction(pin, 0);
} }
void __init orion_gpio_set_valid(unsigned pin, int valid) void __init orion_gpio_set_valid(unsigned pin, int mode)
{ {
if (valid) if (mode == 1)
__set_bit(pin, gpio_valid); mode = GPIO_INPUT_OK | GPIO_OUTPUT_OK;
if (mode & GPIO_INPUT_OK)
__set_bit(pin, gpio_valid_input);
else else
__clear_bit(pin, gpio_valid); __clear_bit(pin, gpio_valid_input);
if (mode & GPIO_OUTPUT_OK)
__set_bit(pin, gpio_valid_output);
else
__clear_bit(pin, gpio_valid_output);
} }
void orion_gpio_set_blink(unsigned pin, int blink) void orion_gpio_set_blink(unsigned pin, int blink)
......
...@@ -25,9 +25,13 @@ void gpio_set_value(unsigned pin, int value); ...@@ -25,9 +25,13 @@ void gpio_set_value(unsigned pin, int value);
* Orion-specific GPIO API extensions. * Orion-specific GPIO API extensions.
*/ */
void orion_gpio_set_unused(unsigned pin); void orion_gpio_set_unused(unsigned pin);
void orion_gpio_set_valid(unsigned pin, int valid);
void orion_gpio_set_blink(unsigned pin, int blink); void orion_gpio_set_blink(unsigned pin, int blink);
#define GPIO_BIDI_OK (1 << 0)
#define GPIO_INPUT_OK (1 << 1)
#define GPIO_OUTPUT_OK (1 << 2)
void orion_gpio_set_valid(unsigned pin, int mode);
/* /*
* GPIO interrupt handling. * GPIO interrupt handling.
*/ */
......
/*
* arch/arm/plat-orion/include/plat/mvsdio.h
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#ifndef __MACH_MVSDIO_H
#define __MACH_MVSDIO_H
#include <linux/mbus.h>
struct mvsdio_platform_data {
struct mbus_dram_target_info *dram;
unsigned int clock;
int gpio_card_detect;
int gpio_write_protect;
};
#endif
...@@ -248,7 +248,7 @@ static struct clk *clks[] __initdata = { ...@@ -248,7 +248,7 @@ static struct clk *clks[] __initdata = {
&clk_48m, &clk_48m,
}; };
void s3c64xx_register_clocks(void) void __init s3c64xx_register_clocks(void)
{ {
struct clk *clkp; struct clk *clkp;
int ret; int ret;
......
...@@ -417,4 +417,4 @@ static __init int s3c64xx_gpiolib_init(void) ...@@ -417,4 +417,4 @@ static __init int s3c64xx_gpiolib_init(void)
return 0; return 0;
} }
arch_initcall(s3c64xx_gpiolib_init); core_initcall(s3c64xx_gpiolib_init);
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
#define IRQ_ONENAND1 S3C64XX_IRQ_VIC1(12) #define IRQ_ONENAND1 S3C64XX_IRQ_VIC1(12)
#define IRQ_NFC S3C64XX_IRQ_VIC1(13) #define IRQ_NFC S3C64XX_IRQ_VIC1(13)
#define IRQ_CFCON S3C64XX_IRQ_VIC1(14) #define IRQ_CFCON S3C64XX_IRQ_VIC1(14)
#define IRQ_UHOST S3C64XX_IRQ_VIC1(15) #define IRQ_USBH S3C64XX_IRQ_VIC1(15)
#define IRQ_SPI0 S3C64XX_IRQ_VIC1(16) #define IRQ_SPI0 S3C64XX_IRQ_VIC1(16)
#define IRQ_SPI1 S3C64XX_IRQ_VIC1(17) #define IRQ_SPI1 S3C64XX_IRQ_VIC1(17)
#define IRQ_IIC S3C64XX_IRQ_VIC1(18) #define IRQ_IIC S3C64XX_IRQ_VIC1(18)
......
...@@ -14,12 +14,15 @@ ...@@ -14,12 +14,15 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/gpio.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/hardware/vic.h> #include <asm/hardware/vic.h>
#include <plat/regs-irqtype.h> #include <plat/regs-irqtype.h>
#include <plat/regs-gpio.h>
#include <plat/gpio-cfg.h>
#include <mach/map.h> #include <mach/map.h>
#include <plat/cpu.h> #include <plat/cpu.h>
...@@ -74,6 +77,7 @@ static void s3c_irq_eint_maskack(unsigned int irq) ...@@ -74,6 +77,7 @@ static void s3c_irq_eint_maskack(unsigned int irq)
static int s3c_irq_eint_set_type(unsigned int irq, unsigned int type) static int s3c_irq_eint_set_type(unsigned int irq, unsigned int type)
{ {
int offs = eint_offset(irq); int offs = eint_offset(irq);
int pin;
int shift; int shift;
u32 ctrl, mask; u32 ctrl, mask;
u32 newvalue = 0; u32 newvalue = 0;
...@@ -125,6 +129,15 @@ static int s3c_irq_eint_set_type(unsigned int irq, unsigned int type) ...@@ -125,6 +129,15 @@ static int s3c_irq_eint_set_type(unsigned int irq, unsigned int type)
ctrl |= newvalue << shift; ctrl |= newvalue << shift;
__raw_writel(ctrl, reg); __raw_writel(ctrl, reg);
/* set the GPIO pin appropriately */
if (offs < 23)
pin = S3C64XX_GPN(offs);
else
pin = S3C64XX_GPM(offs - 23);
s3c_gpio_cfgpin(pin, S3C_GPIO_SFN(2));
return 0; return 0;
} }
...@@ -181,7 +194,7 @@ static void s3c_irq_demux_eint20_27(unsigned int irq, struct irq_desc *desc) ...@@ -181,7 +194,7 @@ static void s3c_irq_demux_eint20_27(unsigned int irq, struct irq_desc *desc)
s3c_irq_demux_eint(20, 27); s3c_irq_demux_eint(20, 27);
} }
int __init s3c64xx_init_irq_eint(void) static int __init s3c64xx_init_irq_eint(void)
{ {
int irq; int irq;
......
...@@ -207,7 +207,7 @@ static struct irq_chip s3c_irq_uart = { ...@@ -207,7 +207,7 @@ static struct irq_chip s3c_irq_uart = {
static void __init s3c64xx_uart_irq(struct uart_irq *uirq) static void __init s3c64xx_uart_irq(struct uart_irq *uirq)
{ {
void *reg_base = uirq->regs; void __iomem *reg_base = uirq->regs;
unsigned int irq; unsigned int irq;
int offs; int offs;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
* ext_xtal_mux for want of an actual name from the manual. * ext_xtal_mux for want of an actual name from the manual.
*/ */
struct clk clk_ext_xtal_mux = { static struct clk clk_ext_xtal_mux = {
.name = "ext_xtal", .name = "ext_xtal",
.id = -1, .id = -1,
}; };
...@@ -63,7 +63,7 @@ struct clksrc_clk { ...@@ -63,7 +63,7 @@ struct clksrc_clk {
void __iomem *reg_divider; void __iomem *reg_divider;
}; };
struct clk clk_fout_apll = { static struct clk clk_fout_apll = {
.name = "fout_apll", .name = "fout_apll",
.id = -1, .id = -1,
}; };
...@@ -78,7 +78,7 @@ static struct clk_sources clk_src_apll = { ...@@ -78,7 +78,7 @@ static struct clk_sources clk_src_apll = {
.nr_sources = ARRAY_SIZE(clk_src_apll_list), .nr_sources = ARRAY_SIZE(clk_src_apll_list),
}; };
struct clksrc_clk clk_mout_apll = { static struct clksrc_clk clk_mout_apll = {
.clk = { .clk = {
.name = "mout_apll", .name = "mout_apll",
.id = -1, .id = -1,
...@@ -88,7 +88,7 @@ struct clksrc_clk clk_mout_apll = { ...@@ -88,7 +88,7 @@ struct clksrc_clk clk_mout_apll = {
.sources = &clk_src_apll, .sources = &clk_src_apll,
}; };
struct clk clk_fout_epll = { static struct clk clk_fout_epll = {
.name = "fout_epll", .name = "fout_epll",
.id = -1, .id = -1,
}; };
...@@ -103,7 +103,7 @@ static struct clk_sources clk_src_epll = { ...@@ -103,7 +103,7 @@ static struct clk_sources clk_src_epll = {
.nr_sources = ARRAY_SIZE(clk_src_epll_list), .nr_sources = ARRAY_SIZE(clk_src_epll_list),
}; };
struct clksrc_clk clk_mout_epll = { static struct clksrc_clk clk_mout_epll = {
.clk = { .clk = {
.name = "mout_epll", .name = "mout_epll",
.id = -1, .id = -1,
...@@ -123,7 +123,7 @@ static struct clk_sources clk_src_mpll = { ...@@ -123,7 +123,7 @@ static struct clk_sources clk_src_mpll = {
.nr_sources = ARRAY_SIZE(clk_src_mpll_list), .nr_sources = ARRAY_SIZE(clk_src_mpll_list),
}; };
struct clksrc_clk clk_mout_mpll = { static struct clksrc_clk clk_mout_mpll = {
.clk = { .clk = {
.name = "mout_mpll", .name = "mout_mpll",
.id = -1, .id = -1,
...@@ -145,7 +145,7 @@ static unsigned long s3c64xx_clk_doutmpll_get_rate(struct clk *clk) ...@@ -145,7 +145,7 @@ static unsigned long s3c64xx_clk_doutmpll_get_rate(struct clk *clk)
return rate; return rate;
} }
struct clk clk_dout_mpll = { static struct clk clk_dout_mpll = {
.name = "dout_mpll", .name = "dout_mpll",
.id = -1, .id = -1,
.parent = &clk_mout_mpll.clk, .parent = &clk_mout_mpll.clk,
...@@ -189,10 +189,10 @@ static struct clk_sources clkset_uart = { ...@@ -189,10 +189,10 @@ static struct clk_sources clkset_uart = {
}; };
static struct clk *clkset_uhost_list[] = { static struct clk *clkset_uhost_list[] = {
&clk_48m,
&clk_mout_epll.clk, &clk_mout_epll.clk,
&clk_dout_mpll, &clk_dout_mpll,
&clk_fin_epll, &clk_fin_epll,
&clk_48m,
}; };
static struct clk_sources clkset_uhost = { static struct clk_sources clkset_uhost = {
...@@ -239,10 +239,12 @@ static int s3c64xx_setrate_clksrc(struct clk *clk, unsigned long rate) ...@@ -239,10 +239,12 @@ static int s3c64xx_setrate_clksrc(struct clk *clk, unsigned long rate)
rate = clk_round_rate(clk, rate); rate = clk_round_rate(clk, rate);
div = clk_get_rate(clk->parent) / rate; div = clk_get_rate(clk->parent) / rate;
if (div > 16)
return -EINVAL;
val = __raw_readl(reg); val = __raw_readl(reg);
val &= ~sclk->mask; val &= ~(0xf << sclk->shift);
val |= (rate - 1) << sclk->shift; val |= (div - 1) << sclk->shift;
__raw_writel(val, reg); __raw_writel(val, reg);
return 0; return 0;
...@@ -351,7 +353,7 @@ static struct clksrc_clk clk_mmc2 = { ...@@ -351,7 +353,7 @@ static struct clksrc_clk clk_mmc2 = {
static struct clksrc_clk clk_usbhost = { static struct clksrc_clk clk_usbhost = {
.clk = { .clk = {
.name = "usb-host-bus", .name = "usb-bus-host",
.id = -1, .id = -1,
.ctrlbit = S3C_CLKCON_SCLK_UHOST, .ctrlbit = S3C_CLKCON_SCLK_UHOST,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# #
# http://www.arm.linux.org.uk/developer/machines/?action=new # http://www.arm.linux.org.uk/developer/machines/?action=new
# #
# Last update: Sun Nov 30 16:39:36 2008 # Last update: Thu Mar 12 18:01:45 2009
# #
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
# #
...@@ -1811,7 +1811,7 @@ pilz_pmi5 MACH_PILZ_PMI5 PILZ_PMI5 1820 ...@@ -1811,7 +1811,7 @@ pilz_pmi5 MACH_PILZ_PMI5 PILZ_PMI5 1820
jade MACH_JADE JADE 1821 jade MACH_JADE JADE 1821
ks8695_softplc MACH_KS8695_SOFTPLC KS8695_SOFTPLC 1822 ks8695_softplc MACH_KS8695_SOFTPLC KS8695_SOFTPLC 1822
gprisc3 MACH_GPRISC3 GPRISC3 1823 gprisc3 MACH_GPRISC3 GPRISC3 1823
stamp9260 MACH_STAMP9260 STAMP9260 1824 stamp9g20 MACH_STAMP9G20 STAMP9G20 1824
smdk6430 MACH_SMDK6430 SMDK6430 1825 smdk6430 MACH_SMDK6430 SMDK6430 1825
smdkc100 MACH_SMDKC100 SMDKC100 1826 smdkc100 MACH_SMDKC100 SMDKC100 1826
tavorevb MACH_TAVOREVB TAVOREVB 1827 tavorevb MACH_TAVOREVB TAVOREVB 1827
...@@ -1993,4 +1993,134 @@ spark MACH_SPARK SPARK 2002 ...@@ -1993,4 +1993,134 @@ spark MACH_SPARK SPARK 2002
benzina MACH_BENZINA BENZINA 2003 benzina MACH_BENZINA BENZINA 2003
blaze MACH_BLAZE BLAZE 2004 blaze MACH_BLAZE BLAZE 2004
linkstation_ls_hgl MACH_LINKSTATION_LS_HGL LINKSTATION_LS_HGL 2005 linkstation_ls_hgl MACH_LINKSTATION_LS_HGL LINKSTATION_LS_HGL 2005
htcvenus MACH_HTCVENUS HTCVENUS 2006 htckovsky MACH_HTCVENUS HTCVENUS 2006
sony_prs505 MACH_SONY_PRS505 SONY_PRS505 2007
hanlin_v3 MACH_HANLIN_V3 HANLIN_V3 2008
sapphira MACH_SAPPHIRA SAPPHIRA 2009
dack_sda_01 MACH_DACK_SDA_01 DACK_SDA_01 2010
armbox MACH_ARMBOX ARMBOX 2011
harris_rvp MACH_HARRIS_RVP HARRIS_RVP 2012
ribaldo MACH_RIBALDO RIBALDO 2013
agora MACH_AGORA AGORA 2014
omap3_mini MACH_OMAP3_MINI OMAP3_MINI 2015
a9sam6432_b MACH_A9SAM6432_B A9SAM6432_B 2016
usg2410 MACH_USG2410 USG2410 2017
pc72052_i10_revb MACH_PC72052_I10_REVB PC72052_I10_REVB 2018
mx35_exm32 MACH_MX35_EXM32 MX35_EXM32 2019
topas910 MACH_TOPAS910 TOPAS910 2020
hyena MACH_HYENA HYENA 2021
pospax MACH_POSPAX POSPAX 2022
hdl_gx MACH_HDL_GX HDL_GX 2023
ctera_4bay MACH_CTERA_4BAY CTERA_4BAY 2024
ctera_plug_c MACH_CTERA_PLUG_C CTERA_PLUG_C 2025
crwea_plug_i MACH_CRWEA_PLUG_I CRWEA_PLUG_I 2026
egauge2 MACH_EGAUGE2 EGAUGE2 2027
didj MACH_DIDJ DIDJ 2028
m_s3c2443 MACH_MEISTER MEISTER 2029
htcblackstone MACH_HTCBLACKSTONE HTCBLACKSTONE 2030
cpuat9g20 MACH_CPUAT9G20 CPUAT9G20 2031
smdk6440 MACH_SMDK6440 SMDK6440 2032
omap_35xx_mvp MACH_OMAP_35XX_MVP OMAP_35XX_MVP 2033
ctera_plug_i MACH_CTERA_PLUG_I CTERA_PLUG_I 2034
pvg610_100 MACH_PVG610 PVG610 2035
hprw6815 MACH_HPRW6815 HPRW6815 2036
omap3_oswald MACH_OMAP3_OSWALD OMAP3_OSWALD 2037
nas4220b MACH_NAS4220B NAS4220B 2038
htcraphael_cdma MACH_HTCRAPHAEL_CDMA HTCRAPHAEL_CDMA 2039
htcdiamond_cdma MACH_HTCDIAMOND_CDMA HTCDIAMOND_CDMA 2040
scaler MACH_SCALER SCALER 2041
zylonite2 MACH_ZYLONITE2 ZYLONITE2 2042
aspenite MACH_ASPENITE ASPENITE 2043
teton MACH_TETON TETON 2044
ttc_dkb MACH_TTC_DKB TTC_DKB 2045
bishop2 MACH_BISHOP2 BISHOP2 2046
ippv5 MACH_IPPV5 IPPV5 2047
farm926 MACH_FARM926 FARM926 2048
mmccpu MACH_MMCCPU MMCCPU 2049
sgmsfl MACH_SGMSFL SGMSFL 2050
tt8000 MACH_TT8000 TT8000 2051
zrn4300lp MACH_ZRN4300LP ZRN4300LP 2052
mptc MACH_MPTC MPTC 2053
h6051 MACH_H6051 H6051 2054
pvg610_101 MACH_PVG610_101 PVG610_101 2055
stamp9261_pc_evb MACH_STAMP9261_PC_EVB STAMP9261_PC_EVB 2056
pelco_odysseus MACH_PELCO_ODYSSEUS PELCO_ODYSSEUS 2057
tny_a9260 MACH_TNY_A9260 TNY_A9260 2058
tny_a9g20 MACH_TNY_A9G20 TNY_A9G20 2059
aesop_mp2530f MACH_AESOP_MP2530F AESOP_MP2530F 2060
dx900 MACH_DX900 DX900 2061
cpodc2 MACH_CPODC2 CPODC2 2062
tilt_8925 MACH_TILT_8925 TILT_8925 2063
davinci_dm357_evm MACH_DAVINCI_DM357_EVM DAVINCI_DM357_EVM 2064
swordfish MACH_SWORDFISH SWORDFISH 2065
corvus MACH_CORVUS CORVUS 2066
taurus MACH_TAURUS TAURUS 2067
axm MACH_AXM AXM 2068
axc MACH_AXC AXC 2069
baby MACH_BABY BABY 2070
mp200 MACH_MP200 MP200 2071
pcm043 MACH_PCM043 PCM043 2072
hanlin_v3c MACH_HANLIN_V3C HANLIN_V3C 2073
kbk9g20 MACH_KBK9G20 KBK9G20 2074
adsturbog5 MACH_ADSTURBOG5 ADSTURBOG5 2075
avenger_lite1 MACH_AVENGER_LITE1 AVENGER_LITE1 2076
suc82x MACH_SUC SUC 2077
at91sam7s256 MACH_AT91SAM7S256 AT91SAM7S256 2078
mendoza MACH_MENDOZA MENDOZA 2079
kira MACH_KIRA KIRA 2080
mx1hbm MACH_MX1HBM MX1HBM 2081
quatro43xx MACH_QUATRO43XX QUATRO43XX 2082
quatro4230 MACH_QUATRO4230 QUATRO4230 2083
nsb400 MACH_NSB400 NSB400 2084
drp255 MACH_DRP255 DRP255 2085
thoth MACH_THOTH THOTH 2086
firestone MACH_FIRESTONE FIRESTONE 2087
asusp750 MACH_ASUSP750 ASUSP750 2088
ctera_dl MACH_CTERA_DL CTERA_DL 2089
socr MACH_SOCR SOCR 2090
htcoxygen MACH_HTCOXYGEN HTCOXYGEN 2091
heroc MACH_HEROC HEROC 2092
zeno6800 MACH_ZENO6800 ZENO6800 2093
sc2mcs MACH_SC2MCS SC2MCS 2094
gene100 MACH_GENE100 GENE100 2095
as353x MACH_AS353X AS353X 2096
sheevaplug MACH_SHEEVAPLUG SHEEVAPLUG 2097
at91sam9g20 MACH_AT91SAM9G20 AT91SAM9G20 2098
mv88f6192gtw_fe MACH_MV88F6192GTW_FE MV88F6192GTW_FE 2099
cc9200 MACH_CC9200 CC9200 2100
sm9200 MACH_SM9200 SM9200 2101
tp9200 MACH_TP9200 TP9200 2102
snapperdv MACH_SNAPPERDV SNAPPERDV 2103
avengers_lite MACH_AVENGERS_LITE AVENGERS_LITE 2104
avengers_lite1 MACH_AVENGERS_LITE1 AVENGERS_LITE1 2105
omap3axon MACH_OMAP3AXON OMAP3AXON 2106
ma8xx MACH_MA8XX MA8XX 2107
mp201ek MACH_MP201EK MP201EK 2108
davinci_tux MACH_DAVINCI_TUX DAVINCI_TUX 2109
mpa1600 MACH_MPA1600 MPA1600 2110
pelco_troy MACH_PELCO_TROY PELCO_TROY 2111
nsb667 MACH_NSB667 NSB667 2112
rovers5_4mpix MACH_ROVERS5_4MPIX ROVERS5_4MPIX 2113
twocom MACH_TWOCOM TWOCOM 2114
ubisys_p9_rcu3r2 MACH_UBISYS_P9_RCU3R2 UBISYS_P9_RCU3R2 2115
hero_espresso MACH_HERO_ESPRESSO HERO_ESPRESSO 2116
afeusb MACH_AFEUSB AFEUSB 2117
t830 MACH_T830 T830 2118
spd8020_cc MACH_SPD8020_CC SPD8020_CC 2119
om_3d7k MACH_OM_3D7K OM_3D7K 2120
picocom2 MACH_PICOCOM2 PICOCOM2 2121
uwg4mx27 MACH_UWG4MX27 UWG4MX27 2122
uwg4mx31 MACH_UWG4MX31 UWG4MX31 2123
cherry MACH_CHERRY CHERRY 2124
mx51_babbage MACH_MX51_BABBAGE MX51_BABBAGE 2125
s3c2440turkiye MACH_S3C2440TURKIYE S3C2440TURKIYE 2126
tx37 MACH_TX37 TX37 2127
sbc2800_9g20 MACH_SBC2800_9G20 SBC2800_9G20 2128
benzglb MACH_BENZGLB BENZGLB 2129
benztd MACH_BENZTD BENZTD 2130
cartesio_plus MACH_CARTESIO_PLUS CARTESIO_PLUS 2131
solrad_g20 MACH_SOLRAD_G20 SOLRAD_G20 2132
mx27wallace MACH_MX27WALLACE MX27WALLACE 2133
fmzwebmodul MACH_FMZWEBMODUL FMZWEBMODUL 2134
rd78x00_masa MACH_RD78X00_MASA RD78X00_MASA 2135
smallogger MACH_SMALLOGGER SMALLOGGER 2136
...@@ -52,7 +52,15 @@ ...@@ -52,7 +52,15 @@
#define __deprecated __attribute__((deprecated)) #define __deprecated __attribute__((deprecated))
#define __packed __attribute__((packed)) #define __packed __attribute__((packed))
#define __weak __attribute__((weak)) #define __weak __attribute__((weak))
#define __naked __attribute__((naked))
/*
* it doesn't make sense on ARM (currently the only user of __naked) to trace
* naked functions because then mcount is called without stack and frame pointer
* being set up and there is no chance to restore the lr register to the value
* before mcount was called.
*/
#define __naked __attribute__((naked)) notrace
#define __noreturn __attribute__((noreturn)) #define __noreturn __attribute__((noreturn))
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment