You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (27 commits) sh: Fix up L2 cache probe. sh: Fix up SH-4A part probe. sh: Add support for SH7723 CPU subtype. sh: Fix up SH7763 build. sh: Add migor_ts support to MigoR sh: Add rs5c732b RTC support to MigoR sh: Add I2C support to MigoR sh: Add I2C platform data to sh7722 sh: MigoR NAND flash support using gen_flash sh: MigoR NOR flash support using physmap-flash sh: Fix up mach-types formatting from merge damage. sh: r7780rp: Hook up the I2C and SMBus platform devices. sh: Use phyical addresses for MigoR smc91x resources sh: Use physical addresses for sh7722 USBF resources sh: Add MigoR header file Fix sh_keysc double free sh: Fix up __access_ok() check for nommu. sh: Allow optimized clear/copy page routines to be used on SH-2. sh: Hook up the rest of the SH7770 serial ports. sh: Add support for Solution Engine SH7721 board ...
This commit is contained in:
+27
-3
@@ -167,6 +167,12 @@ config CPU_SUBTYPE_SH7263
|
||||
select CPU_SH2A
|
||||
select CPU_HAS_FPU
|
||||
|
||||
config CPU_SUBTYPE_MXG
|
||||
bool "Support MX-G processor"
|
||||
select CPU_SH2A
|
||||
help
|
||||
Select MX-G if running on an R8A03022BG part.
|
||||
|
||||
# SH-3 Processor Support
|
||||
|
||||
config CPU_SUBTYPE_SH7705
|
||||
@@ -270,6 +276,15 @@ config CPU_SUBTYPE_SH4_202
|
||||
|
||||
# SH-4A Processor Support
|
||||
|
||||
config CPU_SUBTYPE_SH7723
|
||||
bool "Support SH7723 processor"
|
||||
select CPU_SH4A
|
||||
select CPU_SHX2
|
||||
select ARCH_SPARSEMEM_ENABLE
|
||||
select SYS_SUPPORTS_NUMA
|
||||
help
|
||||
Select SH7723 if you have an SH-MobileR2 CPU.
|
||||
|
||||
config CPU_SUBTYPE_SH7763
|
||||
bool "Support SH7763 processor"
|
||||
select CPU_SH4A
|
||||
@@ -366,6 +381,14 @@ config SH_7619_SOLUTION_ENGINE
|
||||
Select 7619 SolutionEngine if configuring for a Hitachi SH7619
|
||||
evaluation board.
|
||||
|
||||
config SH_7721_SOLUTION_ENGINE
|
||||
bool "SolutionEngine7721"
|
||||
select SOLUTION_ENGINE
|
||||
depends on CPU_SUBTYPE_SH7721
|
||||
help
|
||||
Select 7721 SolutionEngine if configuring for a Hitachi SH7721
|
||||
evaluation board.
|
||||
|
||||
config SH_7722_SOLUTION_ENGINE
|
||||
bool "SolutionEngine7722"
|
||||
select SOLUTION_ENGINE
|
||||
@@ -560,7 +583,7 @@ config SH_TMU
|
||||
config SH_CMT
|
||||
def_bool y
|
||||
prompt "CMT timer support"
|
||||
depends on CPU_SH2
|
||||
depends on CPU_SH2 && !CPU_SUBTYPE_MXG
|
||||
help
|
||||
This enables the use of the CMT as the system timer.
|
||||
|
||||
@@ -578,6 +601,7 @@ config SH_TIMER_IRQ
|
||||
default "86" if CPU_SUBTYPE_SH7619
|
||||
default "140" if CPU_SUBTYPE_SH7206
|
||||
default "142" if CPU_SUBTYPE_SH7203
|
||||
default "238" if CPU_SUBTYPE_MXG
|
||||
default "16"
|
||||
|
||||
config SH_PCLK_FREQ
|
||||
@@ -585,10 +609,10 @@ config SH_PCLK_FREQ
|
||||
default "27000000" if CPU_SUBTYPE_SH7343
|
||||
default "31250000" if CPU_SUBTYPE_SH7619
|
||||
default "32000000" if CPU_SUBTYPE_SH7722
|
||||
default "33333333" if CPU_SUBTYPE_SH7770 || \
|
||||
default "33333333" if CPU_SUBTYPE_SH7770 || CPU_SUBTYPE_SH7723 || \
|
||||
CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \
|
||||
CPU_SUBTYPE_SH7203 || CPU_SUBTYPE_SH7206 || \
|
||||
CPU_SUBTYPE_SH7263
|
||||
CPU_SUBTYPE_SH7263 || CPU_SUBTYPE_MXG
|
||||
default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
|
||||
default "66000000" if CPU_SUBTYPE_SH4_202
|
||||
default "50000000"
|
||||
|
||||
@@ -29,16 +29,17 @@ config EARLY_SCIF_CONSOLE
|
||||
config EARLY_SCIF_CONSOLE_PORT
|
||||
hex
|
||||
depends on EARLY_SCIF_CONSOLE
|
||||
default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763
|
||||
default "0xffe00000" if CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366
|
||||
default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705
|
||||
default "0xa4430000" if CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721
|
||||
default "0xf8420000" if CPU_SUBTYPE_SH7619
|
||||
default "0xff804000" if CPU_SUBTYPE_MXG
|
||||
default "0xffc30000" if CPU_SUBTYPE_SHX3
|
||||
default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763 || \
|
||||
CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366
|
||||
default "0xffe80000" if CPU_SH4
|
||||
default "0xffea0000" if CPU_SUBTYPE_SH7785
|
||||
default "0xfffe8000" if CPU_SUBTYPE_SH7203
|
||||
default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263
|
||||
default "0xf8420000" if CPU_SUBTYPE_SH7619
|
||||
default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705
|
||||
default "0xa4430000" if CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721
|
||||
default "0xffc30000" if CPU_SUBTYPE_SHX3
|
||||
default "0xffe80000" if CPU_SH4
|
||||
default "0x00000000"
|
||||
|
||||
config EARLY_PRINTK
|
||||
|
||||
@@ -107,6 +107,7 @@ machdir-$(CONFIG_SH_7722_SOLUTION_ENGINE) += se/7722
|
||||
machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE) += se/7751
|
||||
machdir-$(CONFIG_SH_7780_SOLUTION_ENGINE) += se/7780
|
||||
machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE) += se/7343
|
||||
machdir-$(CONFIG_SH_7721_SOLUTION_ENGINE) += se/7721
|
||||
machdir-$(CONFIG_SH_HP6XX) += hp6xx
|
||||
machdir-$(CONFIG_SH_DREAMCAST) += dreamcast
|
||||
machdir-$(CONFIG_SH_MPC1211) += mpc1211
|
||||
|
||||
@@ -10,8 +10,14 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/sh_keysc.h>
|
||||
#include <asm/migor.h>
|
||||
|
||||
/* Address IRQ Size Bus Description
|
||||
* 0x00000000 64MB 16 NOR Flash (SP29PL256N)
|
||||
@@ -23,9 +29,9 @@
|
||||
|
||||
static struct resource smc91x_eth_resources[] = {
|
||||
[0] = {
|
||||
.name = "smc91x-regs" ,
|
||||
.start = P2SEGADDR(0x10000300),
|
||||
.end = P2SEGADDR(0x1000030f),
|
||||
.name = "SMC91C111" ,
|
||||
.start = 0x10000300,
|
||||
.end = 0x1000030f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
@@ -40,19 +46,202 @@ static struct platform_device smc91x_eth_device = {
|
||||
.resource = smc91x_eth_resources,
|
||||
};
|
||||
|
||||
static struct sh_keysc_info sh_keysc_info = {
|
||||
.mode = SH_KEYSC_MODE_2, /* KEYOUT0->4, KEYIN1->5 */
|
||||
.scan_timing = 3,
|
||||
.delay = 5,
|
||||
.keycodes = {
|
||||
0, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_ENTER,
|
||||
0, KEY_F, KEY_C, KEY_D, KEY_H, KEY_1,
|
||||
0, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6,
|
||||
0, KEY_7, KEY_8, KEY_9, KEY_S, KEY_0,
|
||||
0, KEY_P, KEY_STOP, KEY_REWIND, KEY_PLAY, KEY_FASTFORWARD,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource sh_keysc_resources[] = {
|
||||
[0] = {
|
||||
.start = 0x044b0000,
|
||||
.end = 0x044b000f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 79,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device sh_keysc_device = {
|
||||
.name = "sh_keysc",
|
||||
.num_resources = ARRAY_SIZE(sh_keysc_resources),
|
||||
.resource = sh_keysc_resources,
|
||||
.dev = {
|
||||
.platform_data = &sh_keysc_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct mtd_partition migor_nor_flash_partitions[] =
|
||||
{
|
||||
{
|
||||
.name = "uboot",
|
||||
.offset = 0,
|
||||
.size = (1 * 1024 * 1024),
|
||||
.mask_flags = MTD_WRITEABLE, /* Read-only */
|
||||
},
|
||||
{
|
||||
.name = "rootfs",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = (15 * 1024 * 1024),
|
||||
},
|
||||
{
|
||||
.name = "other",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data migor_nor_flash_data = {
|
||||
.width = 2,
|
||||
.parts = migor_nor_flash_partitions,
|
||||
.nr_parts = ARRAY_SIZE(migor_nor_flash_partitions),
|
||||
};
|
||||
|
||||
static struct resource migor_nor_flash_resources[] = {
|
||||
[0] = {
|
||||
.name = "NOR Flash",
|
||||
.start = 0x00000000,
|
||||
.end = 0x03ffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device migor_nor_flash_device = {
|
||||
.name = "physmap-flash",
|
||||
.resource = migor_nor_flash_resources,
|
||||
.num_resources = ARRAY_SIZE(migor_nor_flash_resources),
|
||||
.dev = {
|
||||
.platform_data = &migor_nor_flash_data,
|
||||
},
|
||||
};
|
||||
|
||||
static struct mtd_partition migor_nand_flash_partitions[] = {
|
||||
{
|
||||
.name = "nanddata1",
|
||||
.offset = 0x0,
|
||||
.size = 512 * 1024 * 1024,
|
||||
},
|
||||
{
|
||||
.name = "nanddata2",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = 512 * 1024 * 1024,
|
||||
},
|
||||
};
|
||||
|
||||
static void migor_nand_flash_cmd_ctl(struct mtd_info *mtd, int cmd,
|
||||
unsigned int ctrl)
|
||||
{
|
||||
struct nand_chip *chip = mtd->priv;
|
||||
|
||||
if (cmd == NAND_CMD_NONE)
|
||||
return;
|
||||
|
||||
if (ctrl & NAND_CLE)
|
||||
writeb(cmd, chip->IO_ADDR_W + 0x00400000);
|
||||
else if (ctrl & NAND_ALE)
|
||||
writeb(cmd, chip->IO_ADDR_W + 0x00800000);
|
||||
else
|
||||
writeb(cmd, chip->IO_ADDR_W);
|
||||
}
|
||||
|
||||
static int migor_nand_flash_ready(struct mtd_info *mtd)
|
||||
{
|
||||
return ctrl_inb(PORT_PADR) & 0x02; /* PTA1 */
|
||||
}
|
||||
|
||||
struct platform_nand_data migor_nand_flash_data = {
|
||||
.chip = {
|
||||
.nr_chips = 1,
|
||||
.partitions = migor_nand_flash_partitions,
|
||||
.nr_partitions = ARRAY_SIZE(migor_nand_flash_partitions),
|
||||
.chip_delay = 20,
|
||||
.part_probe_types = (const char *[]) { "cmdlinepart", NULL },
|
||||
},
|
||||
.ctrl = {
|
||||
.dev_ready = migor_nand_flash_ready,
|
||||
.cmd_ctrl = migor_nand_flash_cmd_ctl,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource migor_nand_flash_resources[] = {
|
||||
[0] = {
|
||||
.name = "NAND Flash",
|
||||
.start = 0x18000000,
|
||||
.end = 0x18ffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device migor_nand_flash_device = {
|
||||
.name = "gen_nand",
|
||||
.resource = migor_nand_flash_resources,
|
||||
.num_resources = ARRAY_SIZE(migor_nand_flash_resources),
|
||||
.dev = {
|
||||
.platform_data = &migor_nand_flash_data,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device *migor_devices[] __initdata = {
|
||||
&smc91x_eth_device,
|
||||
&sh_keysc_device,
|
||||
&migor_nor_flash_device,
|
||||
&migor_nand_flash_device,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata migor_i2c_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("rtc-rs5c372", 0x32),
|
||||
.type = "rs5c372b",
|
||||
},
|
||||
{
|
||||
I2C_BOARD_INFO("migor_ts", 0x51),
|
||||
.irq = 38, /* IRQ6 */
|
||||
},
|
||||
};
|
||||
|
||||
static int __init migor_devices_setup(void)
|
||||
{
|
||||
i2c_register_board_info(0, migor_i2c_devices,
|
||||
ARRAY_SIZE(migor_i2c_devices));
|
||||
|
||||
return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices));
|
||||
}
|
||||
__initcall(migor_devices_setup);
|
||||
|
||||
static void __init migor_setup(char **cmdline_p)
|
||||
{
|
||||
ctrl_outw(0x1000, 0xa4050110); /* Enable IRQ0 in PJCR */
|
||||
/* SMC91C111 - Enable IRQ0 */
|
||||
ctrl_outw(ctrl_inw(PORT_PJCR) & ~0x0003, PORT_PJCR);
|
||||
|
||||
/* KEYSC */
|
||||
ctrl_outw(ctrl_inw(PORT_PYCR) & ~0x0fff, PORT_PYCR);
|
||||
ctrl_outw(ctrl_inw(PORT_PZCR) & ~0x0ff0, PORT_PZCR);
|
||||
ctrl_outw(ctrl_inw(PORT_PSELA) & ~0x4100, PORT_PSELA);
|
||||
ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x4000, PORT_HIZCRA);
|
||||
ctrl_outw(ctrl_inw(PORT_HIZCRC) & ~0xc000, PORT_HIZCRC);
|
||||
ctrl_outl(ctrl_inl(MSTPCR2) & ~0x00004000, MSTPCR2);
|
||||
|
||||
/* NAND Flash */
|
||||
ctrl_outw(ctrl_inw(PORT_PXCR) & 0x0fff, PORT_PXCR);
|
||||
ctrl_outl((ctrl_inl(BSC_CS6ABCR) & ~0x00000600) | 0x00000200,
|
||||
BSC_CS6ABCR);
|
||||
|
||||
/* I2C */
|
||||
ctrl_outl(ctrl_inl(MSTPCR1) & ~0x00000200, MSTPCR1);
|
||||
|
||||
/* Touch Panel - Enable IRQ6 */
|
||||
ctrl_outw(ctrl_inw(PORT_PZCR) & ~0xc, PORT_PZCR);
|
||||
ctrl_outw((ctrl_inw(PORT_PSELA) | 0x8000), PORT_PSELA);
|
||||
ctrl_outw((ctrl_inw(PORT_HIZCRC) & ~0x4000), PORT_HIZCRC);
|
||||
}
|
||||
|
||||
static struct sh_machine_vector mv_migor __initmv = {
|
||||
|
||||
@@ -18,31 +18,44 @@ enum {
|
||||
UNUSED = 0,
|
||||
|
||||
/* board specific interrupt sources */
|
||||
AX88796, /* Ethernet controller */
|
||||
CF, /* Compact Flash */
|
||||
PSW, /* Push Switch */
|
||||
EXT1, /* EXT1n IRQ */
|
||||
EXT4, /* EXT4n IRQ */
|
||||
CF, /* Compact Flash */
|
||||
TP, /* Touch panel */
|
||||
SCIF1, /* FPGA SCIF1 */
|
||||
SCIF0, /* FPGA SCIF0 */
|
||||
SMBUS, /* SMBUS */
|
||||
RTC, /* RTC Alarm */
|
||||
AX88796, /* Ethernet controller */
|
||||
PSW, /* Push Switch */
|
||||
|
||||
/* external bus connector */
|
||||
EXT1, EXT2, EXT4, EXT5, EXT6,
|
||||
};
|
||||
|
||||
static struct intc_vect vectors[] __initdata = {
|
||||
INTC_IRQ(CF, IRQ_CF),
|
||||
INTC_IRQ(PSW, IRQ_PSW),
|
||||
INTC_IRQ(TP, IRQ_TP),
|
||||
INTC_IRQ(SCIF1, IRQ_SCIF1),
|
||||
INTC_IRQ(SCIF0, IRQ_SCIF0),
|
||||
INTC_IRQ(SMBUS, IRQ_SMBUS),
|
||||
INTC_IRQ(RTC, IRQ_RTC),
|
||||
INTC_IRQ(AX88796, IRQ_AX88796),
|
||||
INTC_IRQ(EXT1, IRQ_EXT1),
|
||||
INTC_IRQ(EXT4, IRQ_EXT4),
|
||||
INTC_IRQ(PSW, IRQ_PSW),
|
||||
|
||||
INTC_IRQ(EXT1, IRQ_EXT1), INTC_IRQ(EXT2, IRQ_EXT2),
|
||||
INTC_IRQ(EXT4, IRQ_EXT4), INTC_IRQ(EXT5, IRQ_EXT5),
|
||||
INTC_IRQ(EXT6, IRQ_EXT6),
|
||||
};
|
||||
|
||||
static struct intc_mask_reg mask_registers[] __initdata = {
|
||||
{ 0xa4000000, 0, 16, /* IRLMSK */
|
||||
{ 0, 0, 0, 0, CF, 0, 0, 0,
|
||||
0, 0, 0, EXT4, 0, EXT1, PSW, AX88796 } },
|
||||
{ SCIF0, SCIF1, RTC, 0, CF, 0, TP, SMBUS,
|
||||
0, EXT6, EXT5, EXT4, EXT2, EXT1, PSW, AX88796 } },
|
||||
};
|
||||
|
||||
static unsigned char irl2irq[HL_NR_IRL] __initdata = {
|
||||
0, IRQ_CF, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, IRQ_EXT4, 0, IRQ_EXT1,
|
||||
0, IRQ_CF, IRQ_TP, IRQ_SCIF1,
|
||||
IRQ_SCIF0, IRQ_SMBUS, IRQ_RTC, IRQ_EXT6,
|
||||
IRQ_EXT5, IRQ_EXT4, IRQ_EXT2, IRQ_EXT1,
|
||||
0, IRQ_AX88796, IRQ_PSW,
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Renesas Solutions Highlander Support.
|
||||
*
|
||||
* Copyright (C) 2002 Atom Create Engineering Co., Ltd.
|
||||
* Copyright (C) 2005 - 2007 Paul Mundt
|
||||
* Copyright (C) 2005 - 2008 Paul Mundt
|
||||
*
|
||||
* This contains support for the R7780RP-1, R7780MP, and R7785RP
|
||||
* Highlander modules.
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/ata_platform.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <net/ax88796.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/r7780rp.h>
|
||||
@@ -176,11 +177,38 @@ static struct platform_device ax88796_device = {
|
||||
.resource = ax88796_resources,
|
||||
};
|
||||
|
||||
static struct resource smbus_resources[] = {
|
||||
[0] = {
|
||||
.start = PA_SMCR,
|
||||
.end = PA_SMCR + 0x100 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = IRQ_SMBUS,
|
||||
.end = IRQ_SMBUS,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device smbus_device = {
|
||||
.name = "i2c-highlander",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(smbus_resources),
|
||||
.resource = smbus_resources,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata highlander_i2c_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("rtc-rs5c372", 0x32),
|
||||
.type = "r2025sd",
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *r7780rp_devices[] __initdata = {
|
||||
&r8a66597_usb_host_device,
|
||||
&m66592_usb_peripheral_device,
|
||||
&heartbeat_device,
|
||||
&smbus_device,
|
||||
#ifndef CONFIG_SH_R7780RP
|
||||
&ax88796_device,
|
||||
#endif
|
||||
@@ -199,12 +227,20 @@ static struct trapped_io cf_trapped_io = {
|
||||
|
||||
static int __init r7780rp_devices_setup(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
#ifndef CONFIG_SH_R7780RP
|
||||
if (register_trapped_io(&cf_trapped_io) == 0)
|
||||
platform_device_register(&cf_ide_device);
|
||||
ret |= platform_device_register(&cf_ide_device);
|
||||
#endif
|
||||
return platform_add_devices(r7780rp_devices,
|
||||
|
||||
ret |= platform_add_devices(r7780rp_devices,
|
||||
ARRAY_SIZE(r7780rp_devices));
|
||||
|
||||
ret |= i2c_register_board_info(0, highlander_i2c_devices,
|
||||
ARRAY_SIZE(highlander_i2c_devices));
|
||||
|
||||
return ret;
|
||||
}
|
||||
device_initcall(r7780rp_devices_setup);
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
obj-y := setup.o irq.o
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* linux/arch/sh/boards/se/7721/irq.c
|
||||
*
|
||||
* Copyright (C) 2008 Renesas Solutions Corp.
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/io.h>
|
||||
#include <asm/se7721.h>
|
||||
|
||||
enum {
|
||||
UNUSED = 0,
|
||||
|
||||
/* board specific interrupt sources */
|
||||
MRSHPC,
|
||||
};
|
||||
|
||||
static struct intc_vect vectors[] __initdata = {
|
||||
INTC_IRQ(MRSHPC, MRSHPC_IRQ0),
|
||||
};
|
||||
|
||||
static struct intc_prio_reg prio_registers[] __initdata = {
|
||||
{ FPGA_ILSR6, 0, 8, 4, /* IRLMSK */
|
||||
{ 0, MRSHPC } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC(intc_desc, "SE7721", vectors,
|
||||
NULL, NULL, prio_registers, NULL);
|
||||
|
||||
/*
|
||||
* Initialize IRQ setting
|
||||
*/
|
||||
void __init init_se7721_IRQ(void)
|
||||
{
|
||||
/* PPCR */
|
||||
ctrl_outw(ctrl_inw(0xa4050118) & ~0x00ff, 0xa4050118);
|
||||
|
||||
register_intc_controller(&intc_desc);
|
||||
intc_set_priority(MRSHPC_IRQ0, 0xf - MRSHPC_IRQ0);
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* linux/arch/sh/boards/se/7721/setup.c
|
||||
*
|
||||
* Copyright (C) 2008 Renesas Solutions Corp.
|
||||
*
|
||||
* Hitachi UL SolutionEngine 7721 Support.
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/se7721.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/heartbeat.h>
|
||||
|
||||
static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
|
||||
|
||||
static struct heartbeat_data heartbeat_data = {
|
||||
.bit_pos = heartbeat_bit_pos,
|
||||
.nr_bits = ARRAY_SIZE(heartbeat_bit_pos),
|
||||
.regsize = 16,
|
||||
};
|
||||
|
||||
static struct resource heartbeat_resources[] = {
|
||||
[0] = {
|
||||
.start = PA_LED,
|
||||
.end = PA_LED,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device heartbeat_device = {
|
||||
.name = "heartbeat",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &heartbeat_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(heartbeat_resources),
|
||||
.resource = heartbeat_resources,
|
||||
};
|
||||
|
||||
static struct resource cf_ide_resources[] = {
|
||||
[0] = {
|
||||
.start = PA_MRSHPC_IO + 0x1f0,
|
||||
.end = PA_MRSHPC_IO + 0x1f0 + 8 ,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
[1] = {
|
||||
.start = PA_MRSHPC_IO + 0x1f0 + 0x206,
|
||||
.end = PA_MRSHPC_IO + 0x1f0 + 8 + 0x206 + 8,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
[2] = {
|
||||
.start = MRSHPC_IRQ0,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device cf_ide_device = {
|
||||
.name = "pata_platform",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(cf_ide_resources),
|
||||
.resource = cf_ide_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *se7721_devices[] __initdata = {
|
||||
&cf_ide_device,
|
||||
&heartbeat_device
|
||||
};
|
||||
|
||||
static int __init se7721_devices_setup(void)
|
||||
{
|
||||
return platform_add_devices(se7721_devices,
|
||||
ARRAY_SIZE(se7721_devices));
|
||||
}
|
||||
device_initcall(se7721_devices_setup);
|
||||
|
||||
static void __init se7721_setup(char **cmdline_p)
|
||||
{
|
||||
/* for USB */
|
||||
ctrl_outw(0x0000, 0xA405010C); /* PGCR */
|
||||
ctrl_outw(0x0000, 0xA405010E); /* PHCR */
|
||||
ctrl_outw(0x00AA, 0xA4050118); /* PPCR */
|
||||
ctrl_outw(0x0000, 0xA4050124); /* PSELA */
|
||||
}
|
||||
|
||||
/*
|
||||
* The Machine Vector
|
||||
*/
|
||||
struct sh_machine_vector mv_se7721 __initmv = {
|
||||
.mv_name = "Solution Engine 7721",
|
||||
.mv_setup = se7721_setup,
|
||||
.mv_nr_irqs = 109,
|
||||
.mv_init_irq = init_se7721_IRQ,
|
||||
};
|
||||
@@ -13,10 +13,12 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/ata_platform.h>
|
||||
#include <linux/input.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/se7722.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/heartbeat.h>
|
||||
#include <asm/sh_keysc.h>
|
||||
|
||||
/* Heartbeat */
|
||||
static struct heartbeat_data heartbeat_data = {
|
||||
@@ -92,10 +94,47 @@ static struct platform_device cf_ide_device = {
|
||||
.resource = cf_ide_resources,
|
||||
};
|
||||
|
||||
static struct sh_keysc_info sh_keysc_info = {
|
||||
.mode = SH_KEYSC_MODE_1, /* KEYOUT0->5, KEYIN0->4 */
|
||||
.scan_timing = 3,
|
||||
.delay = 5,
|
||||
.keycodes = { /* SW1 -> SW30 */
|
||||
KEY_A, KEY_B, KEY_C, KEY_D, KEY_E,
|
||||
KEY_F, KEY_G, KEY_H, KEY_I, KEY_J,
|
||||
KEY_K, KEY_L, KEY_M, KEY_N, KEY_O,
|
||||
KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T,
|
||||
KEY_U, KEY_V, KEY_W, KEY_X, KEY_Y,
|
||||
KEY_Z,
|
||||
KEY_HOME, KEY_SLEEP, KEY_WAKEUP, KEY_COFFEE, /* life */
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource sh_keysc_resources[] = {
|
||||
[0] = {
|
||||
.start = 0x044b0000,
|
||||
.end = 0x044b000f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 79,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device sh_keysc_device = {
|
||||
.name = "sh_keysc",
|
||||
.num_resources = ARRAY_SIZE(sh_keysc_resources),
|
||||
.resource = sh_keysc_resources,
|
||||
.dev = {
|
||||
.platform_data = &sh_keysc_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *se7722_devices[] __initdata = {
|
||||
&heartbeat_device,
|
||||
&smc91x_eth_device,
|
||||
&cf_ide_device,
|
||||
&sh_keysc_device,
|
||||
};
|
||||
|
||||
static int __init se7722_devices_setup(void)
|
||||
@@ -136,6 +175,8 @@ static void __init se7722_setup(char **cmdline_p)
|
||||
ctrl_outw(0x0A10, PORT_PSELA); /* BS,SHHID2 */
|
||||
ctrl_outw(0x0000, PORT_PYCR);
|
||||
ctrl_outw(0x0000, PORT_PZCR);
|
||||
ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x4000, PORT_HIZCRA);
|
||||
ctrl_outw(ctrl_inw(PORT_HIZCRC) & ~0xc000, PORT_HIZCRC);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -83,6 +83,8 @@ static int __init cf_init_default(void)
|
||||
#include <asm/se.h>
|
||||
#elif defined(CONFIG_SH_7722_SOLUTION_ENGINE)
|
||||
#include <asm/se7722.h>
|
||||
#elif defined(CONFIG_SH_7721_SOLUTION_ENGINE)
|
||||
#include <asm/se7721.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -99,7 +101,9 @@ static int __init cf_init_default(void)
|
||||
* 0xB0600000 : I/O
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_SH_SOLUTION_ENGINE) || defined(CONFIG_SH_7722_SOLUTION_ENGINE)
|
||||
#if defined(CONFIG_SH_SOLUTION_ENGINE) || \
|
||||
defined(CONFIG_SH_7722_SOLUTION_ENGINE) || \
|
||||
defined(CONFIG_SH_7721_SOLUTION_ENGINE)
|
||||
static int __init cf_init_se(void)
|
||||
{
|
||||
if ((ctrl_inw(MRSHPC_CSR) & 0x000c) != 0)
|
||||
@@ -112,7 +116,7 @@ static int __init cf_init_se(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* PC-Card window open
|
||||
* PC-Card window open
|
||||
* flag == COMMON/ATTRIBUTE/IO
|
||||
*/
|
||||
/* common window open */
|
||||
@@ -122,7 +126,7 @@ static int __init cf_init_se(void)
|
||||
ctrl_outw(0x0b00, MRSHPC_MW0CR2);
|
||||
else
|
||||
/* common mode & bus width 16bit SWAP = 0*/
|
||||
ctrl_outw(0x0300, MRSHPC_MW0CR2);
|
||||
ctrl_outw(0x0300, MRSHPC_MW0CR2);
|
||||
|
||||
/* attribute window open */
|
||||
ctrl_outw(0x8a85, MRSHPC_MW1CR1);
|
||||
@@ -155,10 +159,9 @@ static int __init cf_init_se(void)
|
||||
|
||||
int __init cf_init(void)
|
||||
{
|
||||
if( mach_is_se() || mach_is_7722se() ){
|
||||
if (mach_is_se() || mach_is_7722se() || mach_is_7721se())
|
||||
return cf_init_se();
|
||||
}
|
||||
|
||||
|
||||
return cf_init_default();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ common-y += $(addprefix ../sh2/, ex.o entry.o)
|
||||
|
||||
obj-$(CONFIG_SH_FPU) += fpu.o
|
||||
|
||||
obj-$(CONFIG_CPU_SUBTYPE_SH7206) += setup-sh7206.o clock-sh7206.o
|
||||
obj-$(CONFIG_CPU_SUBTYPE_SH7203) += setup-sh7203.o clock-sh7203.o
|
||||
obj-$(CONFIG_CPU_SUBTYPE_SH7263) += setup-sh7203.o clock-sh7203.o
|
||||
obj-$(CONFIG_CPU_SUBTYPE_SH7206) += setup-sh7206.o clock-sh7206.o
|
||||
obj-$(CONFIG_CPU_SUBTYPE_SH7203) += setup-sh7203.o clock-sh7203.o
|
||||
obj-$(CONFIG_CPU_SUBTYPE_SH7263) += setup-sh7203.o clock-sh7203.o
|
||||
obj-$(CONFIG_CPU_SUBTYPE_MXG) += setup-mxg.o clock-sh7206.o
|
||||
|
||||
@@ -29,6 +29,9 @@ int __init detect_cpu_and_cache_system(void)
|
||||
boot_cpu_data.type = CPU_SH7206;
|
||||
/* While SH7206 has a DSP.. */
|
||||
boot_cpu_data.flags |= CPU_HAS_DSP;
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_MXG)
|
||||
boot_cpu_data.type = CPU_MXG;
|
||||
boot_cpu_data.flags |= CPU_HAS_DSP;
|
||||
#endif
|
||||
|
||||
boot_cpu_data.dcache.ways = 4;
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* Renesas MX-G (R8A03022BG) Setup
|
||||
*
|
||||
* Copyright (C) 2008 Paul Mundt
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*/
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/serial_sci.h>
|
||||
|
||||
enum {
|
||||
UNUSED = 0,
|
||||
|
||||
/* interrupt sources */
|
||||
IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7,
|
||||
IRQ8, IRQ9, IRQ10, IRQ11, IRQ12, IRQ13, IRQ14, IRQ15,
|
||||
|
||||
PINT0, PINT1, PINT2, PINT3, PINT4, PINT5, PINT6, PINT7,
|
||||
|
||||
SINT8, SINT7, SINT6, SINT5, SINT4, SINT3, SINT2, SINT1,
|
||||
|
||||
SCIF0_BRI, SCIF0_ERI, SCIF0_RXI, SCIF0_TXI,
|
||||
SCIF1_BRI, SCIF1_ERI, SCIF1_RXI, SCIF1_TXI,
|
||||
|
||||
MTU2_TGI0A, MTU2_TGI0B, MTU2_TGI0C, MTU2_TGI0D,
|
||||
MTU2_TCI0V, MTU2_TGI0E, MTU2_TGI0F,
|
||||
MTU2_TGI1A, MTU2_TGI1B, MTU2_TCI1V, MTU2_TCI1U,
|
||||
MTU2_TGI2A, MTU2_TGI2B, MTU2_TCI2V, MTU2_TCI2U,
|
||||
MTU2_TGI3A, MTU2_TGI3B, MTU2_TGI3C, MTU2_TGI3D, MTU2_TCI3V,
|
||||
MTU2_TGI4A, MTU2_TGI4B, MTU2_TGI4C, MTU2_TGI4D, MTU2_TCI4V,
|
||||
MTU2_TGI5U, MTU2_TGI5V, MTU2_TGI5W,
|
||||
|
||||
/* interrupt groups */
|
||||
PINT, SCIF0, SCIF1,
|
||||
MTU2_GROUP1, MTU2_GROUP2, MTU2_GROUP3, MTU2_GROUP4, MTU2_GROUP5
|
||||
};
|
||||
|
||||
static struct intc_vect vectors[] __initdata = {
|
||||
INTC_IRQ(IRQ0, 64), INTC_IRQ(IRQ1, 65),
|
||||
INTC_IRQ(IRQ2, 66), INTC_IRQ(IRQ3, 67),
|
||||
INTC_IRQ(IRQ4, 68), INTC_IRQ(IRQ5, 69),
|
||||
INTC_IRQ(IRQ6, 70), INTC_IRQ(IRQ7, 71),
|
||||
INTC_IRQ(IRQ8, 72), INTC_IRQ(IRQ9, 73),
|
||||
INTC_IRQ(IRQ10, 74), INTC_IRQ(IRQ11, 75),
|
||||
INTC_IRQ(IRQ12, 76), INTC_IRQ(IRQ13, 77),
|
||||
INTC_IRQ(IRQ14, 78), INTC_IRQ(IRQ15, 79),
|
||||
|
||||
INTC_IRQ(PINT0, 80), INTC_IRQ(PINT1, 81),
|
||||
INTC_IRQ(PINT2, 82), INTC_IRQ(PINT3, 83),
|
||||
INTC_IRQ(PINT4, 84), INTC_IRQ(PINT5, 85),
|
||||
INTC_IRQ(PINT6, 86), INTC_IRQ(PINT7, 87),
|
||||
|
||||
INTC_IRQ(SINT8, 94), INTC_IRQ(SINT7, 95),
|
||||
INTC_IRQ(SINT6, 96), INTC_IRQ(SINT5, 97),
|
||||
INTC_IRQ(SINT4, 98), INTC_IRQ(SINT3, 99),
|
||||
INTC_IRQ(SINT2, 100), INTC_IRQ(SINT1, 101),
|
||||
|
||||
INTC_IRQ(SCIF0_RXI, 220), INTC_IRQ(SCIF0_TXI, 221),
|
||||
INTC_IRQ(SCIF0_BRI, 222), INTC_IRQ(SCIF0_ERI, 223),
|
||||
INTC_IRQ(SCIF1_RXI, 224), INTC_IRQ(SCIF1_TXI, 225),
|
||||
INTC_IRQ(SCIF1_BRI, 226), INTC_IRQ(SCIF1_ERI, 227),
|
||||
|
||||
INTC_IRQ(MTU2_TGI0A, 228), INTC_IRQ(MTU2_TGI0B, 229),
|
||||
INTC_IRQ(MTU2_TGI0C, 230), INTC_IRQ(MTU2_TGI0D, 231),
|
||||
INTC_IRQ(MTU2_TCI0V, 232), INTC_IRQ(MTU2_TGI0E, 233),
|
||||
|
||||
INTC_IRQ(MTU2_TGI0F, 234), INTC_IRQ(MTU2_TGI1A, 235),
|
||||
INTC_IRQ(MTU2_TGI1B, 236), INTC_IRQ(MTU2_TCI1V, 237),
|
||||
INTC_IRQ(MTU2_TCI1U, 238), INTC_IRQ(MTU2_TGI2A, 239),
|
||||
|
||||
INTC_IRQ(MTU2_TGI2B, 240), INTC_IRQ(MTU2_TCI2V, 241),
|
||||
INTC_IRQ(MTU2_TCI2U, 242), INTC_IRQ(MTU2_TGI3A, 243),
|
||||
|
||||
INTC_IRQ(MTU2_TGI3B, 244),
|
||||
INTC_IRQ(MTU2_TGI3C, 245),
|
||||
|
||||
INTC_IRQ(MTU2_TGI3D, 246), INTC_IRQ(MTU2_TCI3V, 247),
|
||||
INTC_IRQ(MTU2_TGI4A, 248), INTC_IRQ(MTU2_TGI4B, 249),
|
||||
INTC_IRQ(MTU2_TGI4C, 250), INTC_IRQ(MTU2_TGI4D, 251),
|
||||
|
||||
INTC_IRQ(MTU2_TCI4V, 252), INTC_IRQ(MTU2_TGI5U, 253),
|
||||
INTC_IRQ(MTU2_TGI5V, 254), INTC_IRQ(MTU2_TGI5W, 255),
|
||||
};
|
||||
|
||||
static struct intc_group groups[] __initdata = {
|
||||
INTC_GROUP(PINT, PINT0, PINT1, PINT2, PINT3,
|
||||
PINT4, PINT5, PINT6, PINT7),
|
||||
INTC_GROUP(MTU2_GROUP1, MTU2_TGI0A, MTU2_TGI0B, MTU2_TGI0C, MTU2_TGI0D,
|
||||
MTU2_TCI0V, MTU2_TGI0E),
|
||||
INTC_GROUP(MTU2_GROUP2, MTU2_TGI0F, MTU2_TGI1A, MTU2_TGI1B,
|
||||
MTU2_TCI1V, MTU2_TCI1U, MTU2_TGI2A),
|
||||
INTC_GROUP(MTU2_GROUP3, MTU2_TGI2B, MTU2_TCI2V, MTU2_TCI2U,
|
||||
MTU2_TGI3A),
|
||||
INTC_GROUP(MTU2_GROUP4, MTU2_TGI3D, MTU2_TCI3V, MTU2_TGI4A,
|
||||
MTU2_TGI4B, MTU2_TGI4C, MTU2_TGI4D),
|
||||
INTC_GROUP(MTU2_GROUP5, MTU2_TCI4V, MTU2_TGI5U, MTU2_TGI5V, MTU2_TGI5W),
|
||||
INTC_GROUP(SCIF0, SCIF0_BRI, SCIF0_ERI, SCIF0_RXI, SCIF0_TXI),
|
||||
INTC_GROUP(SCIF1, SCIF1_BRI, SCIF1_ERI, SCIF1_RXI, SCIF1_TXI),
|
||||
};
|
||||
|
||||
static struct intc_prio_reg prio_registers[] __initdata = {
|
||||
{ 0xfffd9418, 0, 16, 4, /* IPR01 */ { IRQ0, IRQ1, IRQ2, IRQ3 } },
|
||||
{ 0xfffd941a, 0, 16, 4, /* IPR02 */ { IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
{ 0xfffd941c, 0, 16, 4, /* IPR03 */ { IRQ8, IRQ9, IRQ10, IRQ11 } },
|
||||
{ 0xfffd941e, 0, 16, 4, /* IPR04 */ { IRQ12, IRQ13, IRQ14, IRQ15 } },
|
||||
{ 0xfffd9420, 0, 16, 4, /* IPR05 */ { PINT, 0, 0, 0 } },
|
||||
{ 0xfffd9800, 0, 16, 4, /* IPR06 */ { } },
|
||||
{ 0xfffd9802, 0, 16, 4, /* IPR07 */ { } },
|
||||
{ 0xfffd9804, 0, 16, 4, /* IPR08 */ { } },
|
||||
{ 0xfffd9806, 0, 16, 4, /* IPR09 */ { } },
|
||||
{ 0xfffd9808, 0, 16, 4, /* IPR10 */ { } },
|
||||
{ 0xfffd980a, 0, 16, 4, /* IPR11 */ { } },
|
||||
{ 0xfffd980c, 0, 16, 4, /* IPR12 */ { } },
|
||||
{ 0xfffd980e, 0, 16, 4, /* IPR13 */ { } },
|
||||
{ 0xfffd9810, 0, 16, 4, /* IPR14 */ { 0, 0, 0, SCIF0 } },
|
||||
{ 0xfffd9812, 0, 16, 4, /* IPR15 */
|
||||
{ SCIF1, MTU2_GROUP1, MTU2_GROUP2, MTU2_GROUP3 } },
|
||||
{ 0xfffd9814, 0, 16, 4, /* IPR16 */
|
||||
{ MTU2_TGI3B, MTU2_TGI3C, MTU2_GROUP4, MTU2_GROUP5 } },
|
||||
};
|
||||
|
||||
static struct intc_mask_reg mask_registers[] __initdata = {
|
||||
{ 0xfffd9408, 0, 16, /* PINTER */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
PINT7, PINT6, PINT5, PINT4, PINT3, PINT2, PINT1, PINT0 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC(intc_desc, "mxg", vectors, groups,
|
||||
mask_registers, prio_registers, NULL);
|
||||
|
||||
static struct plat_sci_port sci_platform_data[] = {
|
||||
{
|
||||
.mapbase = 0xff804000,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
.type = PORT_SCIF,
|
||||
.irqs = { 223, 220, 221, 222 },
|
||||
}, {
|
||||
.flags = 0,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device sci_device = {
|
||||
.name = "sh-sci",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = sci_platform_data,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *mxg_devices[] __initdata = {
|
||||
&sci_device,
|
||||
};
|
||||
|
||||
static int __init mxg_devices_setup(void)
|
||||
{
|
||||
return platform_add_devices(mxg_devices,
|
||||
ARRAY_SIZE(mxg_devices));
|
||||
}
|
||||
__initcall(mxg_devices_setup);
|
||||
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_intc_controller(&intc_desc);
|
||||
}
|
||||
@@ -53,7 +53,7 @@ int __init detect_cpu_and_cache_system(void)
|
||||
/*
|
||||
* Setup some generic flags we can probe on SH-4A parts
|
||||
*/
|
||||
if (((pvr >> 16) & 0xff) == 0x10) {
|
||||
if (((pvr >> 24) & 0xff) == 0x10) {
|
||||
if ((cvr & 0x10000000) == 0)
|
||||
boot_cpu_data.flags |= CPU_HAS_DSP;
|
||||
|
||||
@@ -126,17 +126,22 @@ int __init detect_cpu_and_cache_system(void)
|
||||
CPU_HAS_LLSC;
|
||||
break;
|
||||
case 0x3008:
|
||||
if (prr == 0xa0 || prr == 0xa1) {
|
||||
boot_cpu_data.type = CPU_SH7722;
|
||||
boot_cpu_data.icache.ways = 4;
|
||||
boot_cpu_data.dcache.ways = 4;
|
||||
boot_cpu_data.flags |= CPU_HAS_LLSC;
|
||||
}
|
||||
else if (prr == 0x70) {
|
||||
boot_cpu_data.icache.ways = 4;
|
||||
boot_cpu_data.dcache.ways = 4;
|
||||
boot_cpu_data.flags |= CPU_HAS_LLSC;
|
||||
|
||||
switch (prr) {
|
||||
case 0x50:
|
||||
boot_cpu_data.type = CPU_SH7723;
|
||||
boot_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_L2_CACHE;
|
||||
break;
|
||||
case 0x70:
|
||||
boot_cpu_data.type = CPU_SH7366;
|
||||
boot_cpu_data.icache.ways = 4;
|
||||
boot_cpu_data.dcache.ways = 4;
|
||||
boot_cpu_data.flags |= CPU_HAS_LLSC;
|
||||
break;
|
||||
case 0xa0:
|
||||
case 0xa1:
|
||||
boot_cpu_data.type = CPU_SH7722;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 0x4000: /* 1st cut */
|
||||
@@ -215,6 +220,12 @@ int __init detect_cpu_and_cache_system(void)
|
||||
* SH-4A's have an optional PIPT L2.
|
||||
*/
|
||||
if (boot_cpu_data.flags & CPU_HAS_L2_CACHE) {
|
||||
/* Bug if we can't decode the L2 info */
|
||||
BUG_ON(!(cvr & 0xf));
|
||||
|
||||
/* Silicon and specifications have clearly never met.. */
|
||||
cvr ^= 0xf;
|
||||
|
||||
/*
|
||||
* Size calculation is much more sensible
|
||||
* than it is for the L1.
|
||||
|
||||
@@ -9,6 +9,7 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o
|
||||
obj-$(CONFIG_CPU_SUBTYPE_SH7785) += setup-sh7785.o
|
||||
obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o
|
||||
obj-$(CONFIG_CPU_SUBTYPE_SH7722) += setup-sh7722.o
|
||||
obj-$(CONFIG_CPU_SUBTYPE_SH7723) += setup-sh7723.o
|
||||
obj-$(CONFIG_CPU_SUBTYPE_SH7366) += setup-sh7366.o
|
||||
obj-$(CONFIG_CPU_SUBTYPE_SHX3) += setup-shx3.o
|
||||
|
||||
@@ -22,6 +23,7 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o
|
||||
clock-$(CONFIG_CPU_SUBTYPE_SH7785) := clock-sh7785.o
|
||||
clock-$(CONFIG_CPU_SUBTYPE_SH7343) := clock-sh7343.o
|
||||
clock-$(CONFIG_CPU_SUBTYPE_SH7722) := clock-sh7722.o
|
||||
clock-$(CONFIG_CPU_SUBTYPE_SH7723) := clock-sh7722.o
|
||||
clock-$(CONFIG_CPU_SUBTYPE_SH7366) := clock-sh7722.o
|
||||
clock-$(CONFIG_CPU_SUBTYPE_SHX3) := clock-shx3.o
|
||||
|
||||
|
||||
@@ -16,13 +16,12 @@
|
||||
|
||||
static struct resource usbf_resources[] = {
|
||||
[0] = {
|
||||
.name = "m66592_udc",
|
||||
.start = 0xA4480000,
|
||||
.end = 0xA44800FF,
|
||||
.name = "USBF",
|
||||
.start = 0x04480000,
|
||||
.end = 0x044800FF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.name = "m66592_udc",
|
||||
.start = 65,
|
||||
.end = 65,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
@@ -40,6 +39,26 @@ static struct platform_device usbf_device = {
|
||||
.resource = usbf_resources,
|
||||
};
|
||||
|
||||
static struct resource iic_resources[] = {
|
||||
[0] = {
|
||||
.name = "IIC",
|
||||
.start = 0x04470000,
|
||||
.end = 0x04470017,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 96,
|
||||
.end = 99,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device iic_device = {
|
||||
.name = "i2c-sh_mobile",
|
||||
.num_resources = ARRAY_SIZE(iic_resources),
|
||||
.resource = iic_resources,
|
||||
};
|
||||
|
||||
static struct plat_sci_port sci_platform_data[] = {
|
||||
{
|
||||
.mapbase = 0xffe00000,
|
||||
@@ -74,6 +93,7 @@ static struct platform_device sci_device = {
|
||||
|
||||
static struct platform_device *sh7722_devices[] __initdata = {
|
||||
&usbf_device,
|
||||
&iic_device,
|
||||
&sci_device,
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,300 @@
|
||||
/*
|
||||
* SH7723 Setup
|
||||
*
|
||||
* Copyright (C) 2008 Paul Mundt
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*/
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/serial_sci.h>
|
||||
#include <asm/mmzone.h>
|
||||
|
||||
static struct plat_sci_port sci_platform_data[] = {
|
||||
{
|
||||
.mapbase = 0xa4e30000,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
.type = PORT_SCI,
|
||||
.irqs = { 56, 56, 56, 56 },
|
||||
},{
|
||||
.mapbase = 0xa4e40000,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
.type = PORT_SCI,
|
||||
.irqs = { 88, 88, 88, 88 },
|
||||
},{
|
||||
.mapbase = 0xa4e50000,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
.type = PORT_SCI,
|
||||
.irqs = { 109, 109, 109, 109 },
|
||||
}, {
|
||||
.flags = 0,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device sci_device = {
|
||||
.name = "sh-sci",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = sci_platform_data,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource rtc_resources[] = {
|
||||
[0] = {
|
||||
.start = 0xa465fec0,
|
||||
.end = 0xa465fec0 + 0x58 - 1,
|
||||
.flags = IORESOURCE_IO,
|
||||
},
|
||||
[1] = {
|
||||
/* Period IRQ */
|
||||
.start = 69,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
[2] = {
|
||||
/* Carry IRQ */
|
||||
.start = 70,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
[3] = {
|
||||
/* Alarm IRQ */
|
||||
.start = 68,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device rtc_device = {
|
||||
.name = "sh-rtc",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(rtc_resources),
|
||||
.resource = rtc_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *sh7723_devices[] __initdata = {
|
||||
&sci_device,
|
||||
&rtc_device,
|
||||
};
|
||||
|
||||
static int __init sh7723_devices_setup(void)
|
||||
{
|
||||
return platform_add_devices(sh7723_devices,
|
||||
ARRAY_SIZE(sh7723_devices));
|
||||
}
|
||||
__initcall(sh7723_devices_setup);
|
||||
|
||||
enum {
|
||||
UNUSED=0,
|
||||
|
||||
/* interrupt sources */
|
||||
IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7,
|
||||
HUDI,
|
||||
DMAC1A_DEI0,DMAC1A_DEI1,DMAC1A_DEI2,DMAC1A_DEI3,
|
||||
_2DG_TRI,_2DG_INI,_2DG_CEI,
|
||||
DMAC0A_DEI0,DMAC0A_DEI1,DMAC0A_DEI2,DMAC0A_DEI3,
|
||||
VIO_CEUI,VIO_BEUI,VIO_VEU2HI,VIO_VOUI,
|
||||
SCIFA_SCIFA0,
|
||||
VPU_VPUI,
|
||||
TPU_TPUI,
|
||||
ADC_ADI,
|
||||
USB_USI0,
|
||||
RTC_ATI,RTC_PRI,RTC_CUI,
|
||||
DMAC1B_DEI4,DMAC1B_DEI5,DMAC1B_DADERR,
|
||||
DMAC0B_DEI4,DMAC0B_DEI5,DMAC0B_DADERR,
|
||||
KEYSC_KEYI,
|
||||
SCIF_SCIF0,SCIF_SCIF1,SCIF_SCIF2,
|
||||
MSIOF_MSIOFI0,MSIOF_MSIOFI1,
|
||||
SCIFA_SCIFA1,
|
||||
FLCTL_FLSTEI,FLCTL_FLTENDI,FLCTL_FLTREQ0I,FLCTL_FLTREQ1I,
|
||||
I2C_ALI,I2C_TACKI,I2C_WAITI,I2C_DTEI,
|
||||
SDHI0_SDHII0,SDHI0_SDHII1,SDHI0_SDHII2,
|
||||
CMT_CMTI,
|
||||
TSIF_TSIFI,
|
||||
SIU_SIUI,
|
||||
SCIFA_SCIFA2,
|
||||
TMU0_TUNI0, TMU0_TUNI1, TMU0_TUNI2,
|
||||
IRDA_IRDAI,
|
||||
ATAPI_ATAPII,
|
||||
SDHI1_SDHII0,SDHI1_SDHII1,SDHI1_SDHII2,
|
||||
VEU2H1_VEU2HI,
|
||||
LCDC_LCDCI,
|
||||
TMU1_TUNI0,TMU1_TUNI1,TMU1_TUNI2,
|
||||
|
||||
/* interrupt groups */
|
||||
DMAC1A, DMAC0A, VIO, DMAC0B, FLCTL, I2C, _2DG,
|
||||
SDHI1, RTC, DMAC1B, SDHI0,
|
||||
};
|
||||
|
||||
static struct intc_vect vectors[] __initdata = {
|
||||
INTC_VECT(IRQ0, 0x600), INTC_VECT(IRQ1, 0x620),
|
||||
INTC_VECT(IRQ2, 0x640), INTC_VECT(IRQ3, 0x660),
|
||||
INTC_VECT(IRQ4, 0x680), INTC_VECT(IRQ5, 0x6a0),
|
||||
INTC_VECT(IRQ6, 0x6c0), INTC_VECT(IRQ7, 0x6e0),
|
||||
|
||||
INTC_VECT(DMAC1A_DEI0,0x700),
|
||||
INTC_VECT(DMAC1A_DEI1,0x720),
|
||||
INTC_VECT(DMAC1A_DEI2,0x740),
|
||||
INTC_VECT(DMAC1A_DEI3,0x760),
|
||||
|
||||
INTC_VECT(_2DG_TRI, 0x780),
|
||||
INTC_VECT(_2DG_INI, 0x7A0),
|
||||
INTC_VECT(_2DG_CEI, 0x7C0),
|
||||
|
||||
INTC_VECT(DMAC0A_DEI0,0x800),
|
||||
INTC_VECT(DMAC0A_DEI1,0x820),
|
||||
INTC_VECT(DMAC0A_DEI2,0x840),
|
||||
INTC_VECT(DMAC0A_DEI3,0x860),
|
||||
|
||||
INTC_VECT(VIO_CEUI,0x880),
|
||||
INTC_VECT(VIO_BEUI,0x8A0),
|
||||
INTC_VECT(VIO_VEU2HI,0x8C0),
|
||||
INTC_VECT(VIO_VOUI,0x8E0),
|
||||
|
||||
INTC_VECT(SCIFA_SCIFA0,0x900),
|
||||
INTC_VECT(VPU_VPUI,0x920),
|
||||
INTC_VECT(TPU_TPUI,0x9A0),
|
||||
INTC_VECT(ADC_ADI,0x9E0),
|
||||
INTC_VECT(USB_USI0,0xA20),
|
||||
|
||||
INTC_VECT(RTC_ATI,0xA80),
|
||||
INTC_VECT(RTC_PRI,0xAA0),
|
||||
INTC_VECT(RTC_CUI,0xAC0),
|
||||
|
||||
INTC_VECT(DMAC1B_DEI4,0xB00),
|
||||
INTC_VECT(DMAC1B_DEI5,0xB20),
|
||||
INTC_VECT(DMAC1B_DADERR,0xB40),
|
||||
|
||||
INTC_VECT(DMAC0B_DEI4,0xB80),
|
||||
INTC_VECT(DMAC0B_DEI5,0xBA0),
|
||||
INTC_VECT(DMAC0B_DADERR,0xBC0),
|
||||
|
||||
INTC_VECT(KEYSC_KEYI,0xBE0),
|
||||
INTC_VECT(SCIF_SCIF0,0xC00),
|
||||
INTC_VECT(SCIF_SCIF1,0xC20),
|
||||
INTC_VECT(SCIF_SCIF2,0xC40),
|
||||
INTC_VECT(MSIOF_MSIOFI0,0xC80),
|
||||
INTC_VECT(MSIOF_MSIOFI1,0xCA0),
|
||||
INTC_VECT(SCIFA_SCIFA1,0xD00),
|
||||
|
||||
INTC_VECT(FLCTL_FLSTEI,0xD80),
|
||||
INTC_VECT(FLCTL_FLTENDI,0xDA0),
|
||||
INTC_VECT(FLCTL_FLTREQ0I,0xDC0),
|
||||
INTC_VECT(FLCTL_FLTREQ1I,0xDE0),
|
||||
|
||||
INTC_VECT(I2C_ALI,0xE00),
|
||||
INTC_VECT(I2C_TACKI,0xE20),
|
||||
INTC_VECT(I2C_WAITI,0xE40),
|
||||
INTC_VECT(I2C_DTEI,0xE60),
|
||||
|
||||
INTC_VECT(SDHI0_SDHII0,0xE80),
|
||||
INTC_VECT(SDHI0_SDHII1,0xEA0),
|
||||
INTC_VECT(SDHI0_SDHII2,0xEC0),
|
||||
|
||||
INTC_VECT(CMT_CMTI,0xF00),
|
||||
INTC_VECT(TSIF_TSIFI,0xF20),
|
||||
INTC_VECT(SIU_SIUI,0xF80),
|
||||
INTC_VECT(SCIFA_SCIFA2,0xFA0),
|
||||
|
||||
INTC_VECT(TMU0_TUNI0,0x400),
|
||||
INTC_VECT(TMU0_TUNI1,0x420),
|
||||
INTC_VECT(TMU0_TUNI2,0x440),
|
||||
|
||||
INTC_VECT(IRDA_IRDAI,0x480),
|
||||
INTC_VECT(ATAPI_ATAPII,0x4A0),
|
||||
|
||||
INTC_VECT(SDHI1_SDHII0,0x4E0),
|
||||
INTC_VECT(SDHI1_SDHII1,0x500),
|
||||
INTC_VECT(SDHI1_SDHII2,0x520),
|
||||
|
||||
INTC_VECT(VEU2H1_VEU2HI,0x560),
|
||||
INTC_VECT(LCDC_LCDCI,0x580),
|
||||
|
||||
INTC_VECT(TMU1_TUNI0,0x920),
|
||||
INTC_VECT(TMU1_TUNI1,0x940),
|
||||
INTC_VECT(TMU1_TUNI2,0x960),
|
||||
|
||||
};
|
||||
|
||||
static struct intc_group groups[] __initdata = {
|
||||
INTC_GROUP(DMAC1A,DMAC1A_DEI0,DMAC1A_DEI1,DMAC1A_DEI2,DMAC1A_DEI3),
|
||||
INTC_GROUP(DMAC0A,DMAC0A_DEI0,DMAC0A_DEI1,DMAC0A_DEI2,DMAC0A_DEI3),
|
||||
INTC_GROUP(VIO, VIO_CEUI,VIO_BEUI,VIO_VEU2HI,VIO_VOUI),
|
||||
INTC_GROUP(DMAC0B, DMAC0B_DEI4,DMAC0B_DEI5,DMAC0B_DADERR),
|
||||
INTC_GROUP(FLCTL,FLCTL_FLSTEI,FLCTL_FLTENDI,FLCTL_FLTREQ0I,FLCTL_FLTREQ1I),
|
||||
INTC_GROUP(I2C,I2C_ALI,I2C_TACKI,I2C_WAITI,I2C_DTEI),
|
||||
INTC_GROUP(_2DG, _2DG_TRI,_2DG_INI,_2DG_CEI),
|
||||
INTC_GROUP(SDHI1, SDHI1_SDHII0,SDHI1_SDHII1,SDHI1_SDHII2),
|
||||
INTC_GROUP(RTC, RTC_ATI,RTC_PRI,RTC_CUI),
|
||||
INTC_GROUP(DMAC1B, DMAC1B_DEI4,DMAC1B_DEI5,DMAC1B_DADERR),
|
||||
INTC_GROUP(SDHI0,SDHI0_SDHII0,SDHI0_SDHII1,SDHI0_SDHII2),
|
||||
};
|
||||
|
||||
static struct intc_mask_reg mask_registers[] __initdata = {
|
||||
{ 0xa4080080, 0xa40800c0, 8, /* IMR0 / IMCR0 */
|
||||
{ 0, TMU1_TUNI2,TMU1_TUNI1,TMU1_TUNI0,0,SDHI1_SDHII2,SDHI1_SDHII1,SDHI1_SDHII0} },
|
||||
{ 0xa4080084, 0xa40800c4, 8, /* IMR1 / IMCR1 */
|
||||
{ VIO_VOUI, VIO_VEU2HI,VIO_BEUI,VIO_CEUI,DMAC0A_DEI3,DMAC0A_DEI2,DMAC0A_DEI1,DMAC0A_DEI0 } },
|
||||
{ 0xa4080088, 0xa40800c8, 8, /* IMR2 / IMCR2 */
|
||||
{ 0, 0, 0, VPU_VPUI,0,0,0,SCIFA_SCIFA0 } },
|
||||
{ 0xa408008c, 0xa40800cc, 8, /* IMR3 / IMCR3 */
|
||||
{ DMAC1A_DEI3,DMAC1A_DEI2,DMAC1A_DEI1,DMAC1A_DEI0,0,0,0,IRDA_IRDAI } },
|
||||
{ 0xa4080090, 0xa40800d0, 8, /* IMR4 / IMCR4 */
|
||||
{ 0,TMU0_TUNI2,TMU0_TUNI1,TMU0_TUNI0,VEU2H1_VEU2HI,0,0,LCDC_LCDCI } },
|
||||
{ 0xa4080094, 0xa40800d4, 8, /* IMR5 / IMCR5 */
|
||||
{ KEYSC_KEYI,DMAC0B_DADERR,DMAC0B_DEI5,DMAC0B_DEI4,0,SCIF_SCIF2,SCIF_SCIF1,SCIF_SCIF0 } },
|
||||
{ 0xa4080098, 0xa40800d8, 8, /* IMR6 / IMCR6 */
|
||||
{ 0,0,0,SCIFA_SCIFA1,ADC_ADI,0,MSIOF_MSIOFI1,MSIOF_MSIOFI0 } },
|
||||
{ 0xa408009c, 0xa40800dc, 8, /* IMR7 / IMCR7 */
|
||||
{ I2C_DTEI, I2C_WAITI, I2C_TACKI, I2C_ALI,
|
||||
FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } },
|
||||
{ 0xa40800a0, 0xa40800e0, 8, /* IMR8 / IMCR8 */
|
||||
{ 0,SDHI0_SDHII2,SDHI0_SDHII1,SDHI0_SDHII0,0,0,SCIFA_SCIFA2,SIU_SIUI } },
|
||||
{ 0xa40800a4, 0xa40800e4, 8, /* IMR9 / IMCR9 */
|
||||
{ 0, 0, 0, CMT_CMTI, 0, 0, USB_USI0,0 } },
|
||||
{ 0xa40800a8, 0xa40800e8, 8, /* IMR10 / IMCR10 */
|
||||
{ 0, DMAC1B_DADERR,DMAC1B_DEI5,DMAC1B_DEI4,0,RTC_ATI,RTC_PRI,RTC_CUI } },
|
||||
{ 0xa40800ac, 0xa40800ec, 8, /* IMR11 / IMCR11 */
|
||||
{ 0,_2DG_CEI,_2DG_INI,_2DG_TRI,0,TPU_TPUI,0,TSIF_TSIFI } },
|
||||
{ 0xa40800b0, 0xa40800f0, 8, /* IMR12 / IMCR12 */
|
||||
{ 0,0,0,0,0,0,0,ATAPI_ATAPII } },
|
||||
{ 0xa4140044, 0xa4140064, 8, /* INTMSK00 / INTMSKCLR00 */
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static struct intc_prio_reg prio_registers[] __initdata = {
|
||||
{ 0xa4080000, 0, 16, 4, /* IPRA */ { TMU0_TUNI0, TMU0_TUNI1, TMU0_TUNI2, IRDA_IRDAI } },
|
||||
{ 0xa4080004, 0, 16, 4, /* IPRB */ { VEU2H1_VEU2HI, LCDC_LCDCI, DMAC1A, 0} },
|
||||
{ 0xa4080008, 0, 16, 4, /* IPRC */ { TMU1_TUNI0, TMU1_TUNI1, TMU1_TUNI2, 0} },
|
||||
{ 0xa408000c, 0, 16, 4, /* IPRD */ { } },
|
||||
{ 0xa4080010, 0, 16, 4, /* IPRE */ { DMAC0A, VIO, SCIFA_SCIFA0, VPU_VPUI } },
|
||||
{ 0xa4080014, 0, 16, 4, /* IPRF */ { KEYSC_KEYI, DMAC0B, USB_USI0, CMT_CMTI } },
|
||||
{ 0xa4080018, 0, 16, 4, /* IPRG */ { SCIF_SCIF0, SCIF_SCIF1, SCIF_SCIF2,0 } },
|
||||
{ 0xa408001c, 0, 16, 4, /* IPRH */ { MSIOF_MSIOFI0,MSIOF_MSIOFI1, FLCTL, I2C } },
|
||||
{ 0xa4080020, 0, 16, 4, /* IPRI */ { SCIFA_SCIFA1,0,TSIF_TSIFI,_2DG } },
|
||||
{ 0xa4080024, 0, 16, 4, /* IPRJ */ { ADC_ADI,0,SIU_SIUI,SDHI1 } },
|
||||
{ 0xa4080028, 0, 16, 4, /* IPRK */ { RTC,DMAC1B,0,SDHI0 } },
|
||||
{ 0xa408002c, 0, 16, 4, /* IPRL */ { SCIFA_SCIFA2,0,TPU_TPUI,ATAPI_ATAPII } },
|
||||
{ 0xa4140010, 0, 32, 4, /* INTPRI00 */
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static struct intc_sense_reg sense_registers[] __initdata = {
|
||||
{ 0xa414001c, 16, 2, /* ICR1 */
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC(intc_desc, "sh7723", vectors, groups,
|
||||
mask_registers, prio_registers, sense_registers);
|
||||
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_intc_controller(&intc_desc);
|
||||
}
|
||||
|
||||
void __init plat_mem_setup(void)
|
||||
{
|
||||
/* Register the URAM space as Node 1 */
|
||||
setup_bootmem_node(1, 0x055f0000, 0x05610000);
|
||||
}
|
||||
@@ -231,12 +231,6 @@ static struct intc_group groups[] __initdata = {
|
||||
INTC_GROUP(GPIO, GPIO_CH0, GPIO_CH1, GPIO_CH2, GPIO_CH3),
|
||||
};
|
||||
|
||||
static struct intc_prio priorities[] __initdata = {
|
||||
INTC_PRIO(SCIF0, 3),
|
||||
INTC_PRIO(SCIF1, 3),
|
||||
INTC_PRIO(SCIF2, 3),
|
||||
};
|
||||
|
||||
static struct intc_mask_reg mask_registers[] __initdata = {
|
||||
{ 0xffd40038, 0xffd4003c, 32, /* INT2MSKR / INT2MSKCR */
|
||||
{ 0, 0, 0, 0, 0, 0, GPIO, 0,
|
||||
@@ -270,11 +264,10 @@ static struct intc_prio_reg prio_registers[] __initdata = {
|
||||
{ 0xffd400b4, 0, 32, 8, /* INT2PRI13 */ { 0, 0, STIF1, STIF0 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC(intc_desc, "sh7763", vectors, groups, priorities,
|
||||
static DECLARE_INTC_DESC(intc_desc, "sh7763", vectors, groups,
|
||||
mask_registers, prio_registers, NULL);
|
||||
|
||||
/* Support for external interrupt pins in IRQ mode */
|
||||
|
||||
static struct intc_vect irq_vectors[] __initdata = {
|
||||
INTC_VECT(IRQ0, 0x240), INTC_VECT(IRQ1, 0x280),
|
||||
INTC_VECT(IRQ2, 0x2c0), INTC_VECT(IRQ3, 0x300),
|
||||
@@ -302,7 +295,6 @@ static DECLARE_INTC_DESC(intc_irq_desc, "sh7763-irq", irq_vectors,
|
||||
irq_sense_registers);
|
||||
|
||||
/* External interrupt pins in IRL mode */
|
||||
|
||||
static struct intc_vect irl_vectors[] __initdata = {
|
||||
INTC_VECT(IRL_LLLL, 0x200), INTC_VECT(IRL_LLLH, 0x220),
|
||||
INTC_VECT(IRL_LLHL, 0x240), INTC_VECT(IRL_LLHH, 0x260),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user