mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 06:50:08 +00: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: (72 commits) sh: SuperH Mobile CEU and camera platform data for AP325RXA sh: Update smc911x platform data for AP325RXA sh: SuperH Mobile LCDC platform data for AP325RXA sh: Add SuperH Mobile CEU platform data for Migo-R sh: Add SuperH Mobile LCDC platform data for Migo-R sh: Move asid_cache() out of ifdef to fix SH-3/4 nommu build. sh: Workaround for __put_user_asm() bug with gcc 4.x on big-endian. sh: Wire up new syscalls. sh: fix uImage Entry Point sh_keysc: remove request_mem_region() and release_mem_region() sh: Don't miss pending signals returning to user mode after signal processing sh: Use clk_always_enable() on sh7366 sh: Use clk_always_enable() on sh7343 / SE77343 sh: Use clk_always_enable() on sh7722 / Migo-R / SE7722 sh: Use clk_always_enable() on sh7723 / ap325rxa sh: Introduce clk_always_enable() function sh: Show all clocks and their state in /proc/clocks sh: Merge sh7343 and sh7722 clock code sh: Add SuperH Mobile MSTPCR bits to clock framework sh: Use arch_flags to simplify sh7722 siu clock code ...
This commit is contained in:
commit
b10a8b7238
@ -477,6 +477,10 @@ config SH_RTS7751R2D
|
||||
Select RTS7751R2D if configuring for a Renesas Technology
|
||||
Sales SH-Graphics board.
|
||||
|
||||
config SH_RSK7203
|
||||
bool "RSK7203"
|
||||
depends on CPU_SUBTYPE_SH7203
|
||||
|
||||
config SH_SDK7780
|
||||
bool "SDK7780R3"
|
||||
depends on CPU_SUBTYPE_SH7780
|
||||
@ -491,6 +495,21 @@ config SH_HIGHLANDER
|
||||
select SYS_SUPPORTS_PCI
|
||||
select IO_TRAPPED
|
||||
|
||||
config SH_SH7785LCR
|
||||
bool "SH7785LCR"
|
||||
depends on CPU_SUBTYPE_SH7785
|
||||
select SYS_SUPPORTS_PCI
|
||||
select IO_TRAPPED
|
||||
|
||||
config SH_SH7785LCR_29BIT_PHYSMAPS
|
||||
bool "SH7785LCR 29bit physmaps"
|
||||
depends on SH_SH7785LCR
|
||||
default y
|
||||
help
|
||||
This board has 2 physical memory maps. It can be changed with
|
||||
DIP switch(S2-5). If you set the DIP switch for S2-5 = ON,
|
||||
you can access all on-board device in 29bit address mode.
|
||||
|
||||
config SH_MIGOR
|
||||
bool "Migo-R"
|
||||
depends on CPU_SUBTYPE_SH7722
|
||||
@ -498,6 +517,20 @@ config SH_MIGOR
|
||||
Select Migo-R if configuring for the SH7722 Migo-R platform
|
||||
by Renesas System Solutions Asia Pte. Ltd.
|
||||
|
||||
config SH_AP325RXA
|
||||
bool "AP-325RXA"
|
||||
depends on CPU_SUBTYPE_SH7723
|
||||
help
|
||||
Renesas "AP-325RXA" support.
|
||||
Compatible with ALGO SYSTEM CO.,LTD. "AP-320A"
|
||||
|
||||
config SH_SH7763RDP
|
||||
bool "SH7763RDP"
|
||||
depends on CPU_SUBTYPE_SH7763
|
||||
help
|
||||
Select SH7763RDP if configuring for a Renesas SH7763
|
||||
evaluation board.
|
||||
|
||||
config SH_EDOSK7705
|
||||
bool "EDOSK7705"
|
||||
depends on CPU_SUBTYPE_SH7705
|
||||
@ -559,6 +592,7 @@ endmenu
|
||||
source "arch/sh/boards/renesas/rts7751r2d/Kconfig"
|
||||
source "arch/sh/boards/renesas/r7780rp/Kconfig"
|
||||
source "arch/sh/boards/renesas/sdk7780/Kconfig"
|
||||
source "arch/sh/boards/renesas/migor/Kconfig"
|
||||
source "arch/sh/boards/magicpanelr2/Kconfig"
|
||||
|
||||
menu "Timer and clock configuration"
|
||||
|
@ -36,7 +36,8 @@ config EARLY_SCIF_CONSOLE_PORT
|
||||
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
|
||||
CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366 || \
|
||||
CPU_SUBTYPE_SH7343
|
||||
default "0xffe80000" if CPU_SH4
|
||||
default "0xffea0000" if CPU_SUBTYPE_SH7785
|
||||
default "0xfffe8000" if CPU_SUBTYPE_SH7203
|
||||
|
@ -121,6 +121,10 @@ machdir-$(CONFIG_SH_HIGHLANDER) += renesas/r7780rp
|
||||
machdir-$(CONFIG_SH_MIGOR) += renesas/migor
|
||||
machdir-$(CONFIG_SH_SDK7780) += renesas/sdk7780
|
||||
machdir-$(CONFIG_SH_X3PROTO) += renesas/x3proto
|
||||
machdir-$(CONFIG_SH_RSK7203) += renesas/rsk7203
|
||||
machdir-$(CONFIG_SH_AP325RXA) += renesas/ap325rxa
|
||||
machdir-$(CONFIG_SH_SH7763RDP) += renesas/sh7763rdp
|
||||
machdir-$(CONFIG_SH_SH7785LCR) += renesas/sh7785lcr
|
||||
machdir-$(CONFIG_SH_SH4202_MICRODEV) += superh/microdev
|
||||
machdir-$(CONFIG_SH_LANDISK) += landisk
|
||||
machdir-$(CONFIG_SH_TITAN) += titan
|
||||
|
@ -30,7 +30,7 @@
|
||||
*
|
||||
* Grabs the current RTC seconds counter and adjusts it to the Unix Epoch.
|
||||
*/
|
||||
void aica_rtc_gettimeofday(struct timespec *ts)
|
||||
static void aica_rtc_gettimeofday(struct timespec *ts)
|
||||
{
|
||||
unsigned long val1, val2;
|
||||
|
||||
@ -54,7 +54,7 @@ void aica_rtc_gettimeofday(struct timespec *ts)
|
||||
*
|
||||
* Adjusts the given @tv to the AICA Epoch and sets the RTC seconds counter.
|
||||
*/
|
||||
int aica_rtc_settimeofday(const time_t secs)
|
||||
static int aica_rtc_settimeofday(const time_t secs)
|
||||
{
|
||||
unsigned long val1, val2;
|
||||
unsigned long adj = secs + TWENTY_YEARS;
|
||||
|
1
arch/sh/boards/renesas/ap325rxa/Makefile
Normal file
1
arch/sh/boards/renesas/ap325rxa/Makefile
Normal file
@ -0,0 +1 @@
|
||||
obj-y := setup.o
|
313
arch/sh/boards/renesas/ap325rxa/setup.c
Normal file
313
arch/sh/boards/renesas/ap325rxa/setup.c
Normal file
@ -0,0 +1,313 @@
|
||||
/*
|
||||
* Renesas - AP-325RXA
|
||||
* (Compatible with Algo System ., LTD. - AP-320A)
|
||||
*
|
||||
* Copyright (C) 2008 Renesas Solutions Corp.
|
||||
* Author : Yusuke Goda <goda.yuske@renesas.com>
|
||||
*
|
||||
* 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/device.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/smc911x.h>
|
||||
#include <media/soc_camera_platform.h>
|
||||
#include <media/sh_mobile_ceu.h>
|
||||
#include <asm/sh_mobile_lcdc.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/clock.h>
|
||||
|
||||
static struct smc911x_platdata smc911x_info = {
|
||||
.flags = SMC911X_USE_32BIT,
|
||||
.irq_flags = IRQF_TRIGGER_LOW,
|
||||
};
|
||||
|
||||
static struct resource smc9118_resources[] = {
|
||||
[0] = {
|
||||
.start = 0xb6080000,
|
||||
.end = 0xb60fffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 35,
|
||||
.end = 35,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device smc9118_device = {
|
||||
.name = "smc911x",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(smc9118_resources),
|
||||
.resource = smc9118_resources,
|
||||
.dev = {
|
||||
.platform_data = &smc911x_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct mtd_partition ap325rxa_nor_flash_partitions[] = {
|
||||
{
|
||||
.name = "uboot",
|
||||
.offset = 0,
|
||||
.size = (1 * 1024 * 1024),
|
||||
.mask_flags = MTD_WRITEABLE, /* Read-only */
|
||||
}, {
|
||||
.name = "kernel",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = (2 * 1024 * 1024),
|
||||
}, {
|
||||
.name = "other",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data ap325rxa_nor_flash_data = {
|
||||
.width = 2,
|
||||
.parts = ap325rxa_nor_flash_partitions,
|
||||
.nr_parts = ARRAY_SIZE(ap325rxa_nor_flash_partitions),
|
||||
};
|
||||
|
||||
static struct resource ap325rxa_nor_flash_resources[] = {
|
||||
[0] = {
|
||||
.name = "NOR Flash",
|
||||
.start = 0x00000000,
|
||||
.end = 0x00ffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device ap325rxa_nor_flash_device = {
|
||||
.name = "physmap-flash",
|
||||
.resource = ap325rxa_nor_flash_resources,
|
||||
.num_resources = ARRAY_SIZE(ap325rxa_nor_flash_resources),
|
||||
.dev = {
|
||||
.platform_data = &ap325rxa_nor_flash_data,
|
||||
},
|
||||
};
|
||||
|
||||
#define FPGA_LCDREG 0xB4100180
|
||||
#define FPGA_BKLREG 0xB4100212
|
||||
#define FPGA_LCDREG_VAL 0x0018
|
||||
#define PORT_PHCR 0xA405010E
|
||||
#define PORT_PLCR 0xA4050114
|
||||
#define PORT_PMCR 0xA4050116
|
||||
#define PORT_PRCR 0xA405011C
|
||||
#define PORT_PSCR 0xA405011E
|
||||
#define PORT_PZCR 0xA405014C
|
||||
#define PORT_HIZCRA 0xA4050158
|
||||
#define PORT_MSELCRB 0xA4050182
|
||||
#define PORT_PSDR 0xA405013E
|
||||
#define PORT_PZDR 0xA405016C
|
||||
#define PORT_PSELD 0xA4050154
|
||||
|
||||
static void ap320_wvga_power_on(void *board_data)
|
||||
{
|
||||
msleep(100);
|
||||
|
||||
/* ASD AP-320/325 LCD ON */
|
||||
ctrl_outw(FPGA_LCDREG_VAL, FPGA_LCDREG);
|
||||
|
||||
/* backlight */
|
||||
ctrl_outw((ctrl_inw(PORT_PSCR) & ~0x00C0) | 0x40, PORT_PSCR);
|
||||
ctrl_outb(ctrl_inb(PORT_PSDR) & ~0x08, PORT_PSDR);
|
||||
ctrl_outw(0x100, FPGA_BKLREG);
|
||||
}
|
||||
|
||||
static struct sh_mobile_lcdc_info lcdc_info = {
|
||||
.clock_source = LCDC_CLK_EXTERNAL,
|
||||
.ch[0] = {
|
||||
.chan = LCDC_CHAN_MAINLCD,
|
||||
.bpp = 16,
|
||||
.interface_type = RGB18,
|
||||
.clock_divider = 1,
|
||||
.lcd_cfg = {
|
||||
.name = "LB070WV1",
|
||||
.xres = 800,
|
||||
.yres = 480,
|
||||
.left_margin = 40,
|
||||
.right_margin = 160,
|
||||
.hsync_len = 8,
|
||||
.upper_margin = 63,
|
||||
.lower_margin = 80,
|
||||
.vsync_len = 1,
|
||||
.sync = 0, /* hsync and vsync are active low */
|
||||
},
|
||||
.board_cfg = {
|
||||
.display_on = ap320_wvga_power_on,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
static struct resource lcdc_resources[] = {
|
||||
[0] = {
|
||||
.name = "LCDC",
|
||||
.start = 0xfe940000, /* P4-only space */
|
||||
.end = 0xfe941fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device lcdc_device = {
|
||||
.name = "sh_mobile_lcdc_fb",
|
||||
.num_resources = ARRAY_SIZE(lcdc_resources),
|
||||
.resource = lcdc_resources,
|
||||
.dev = {
|
||||
.platform_data = &lcdc_info,
|
||||
},
|
||||
};
|
||||
|
||||
static unsigned char camera_ncm03j_magic[] =
|
||||
{
|
||||
0x87, 0x00, 0x88, 0x08, 0x89, 0x01, 0x8A, 0xE8,
|
||||
0x1D, 0x00, 0x1E, 0x8A, 0x21, 0x00, 0x33, 0x36,
|
||||
0x36, 0x60, 0x37, 0x08, 0x3B, 0x31, 0x44, 0x0F,
|
||||
0x46, 0xF0, 0x4B, 0x28, 0x4C, 0x21, 0x4D, 0x55,
|
||||
0x4E, 0x1B, 0x4F, 0xC7, 0x50, 0xFC, 0x51, 0x12,
|
||||
0x58, 0x02, 0x66, 0xC0, 0x67, 0x46, 0x6B, 0xA0,
|
||||
0x6C, 0x34, 0x7E, 0x25, 0x7F, 0x25, 0x8D, 0x0F,
|
||||
0x92, 0x40, 0x93, 0x04, 0x94, 0x26, 0x95, 0x0A,
|
||||
0x99, 0x03, 0x9A, 0xF0, 0x9B, 0x14, 0x9D, 0x7A,
|
||||
0xC5, 0x02, 0xD6, 0x07, 0x59, 0x00, 0x5A, 0x1A,
|
||||
0x5B, 0x2A, 0x5C, 0x37, 0x5D, 0x42, 0x5E, 0x56,
|
||||
0xC8, 0x00, 0xC9, 0x1A, 0xCA, 0x2A, 0xCB, 0x37,
|
||||
0xCC, 0x42, 0xCD, 0x56, 0xCE, 0x00, 0xCF, 0x1A,
|
||||
0xD0, 0x2A, 0xD1, 0x37, 0xD2, 0x42, 0xD3, 0x56,
|
||||
0x5F, 0x68, 0x60, 0x87, 0x61, 0xA3, 0x62, 0xBC,
|
||||
0x63, 0xD4, 0x64, 0xEA, 0xD6, 0x0F,
|
||||
};
|
||||
|
||||
static int camera_set_capture(struct soc_camera_platform_info *info,
|
||||
int enable)
|
||||
{
|
||||
struct i2c_adapter *a = i2c_get_adapter(0);
|
||||
struct i2c_msg msg;
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
||||
if (!enable)
|
||||
return 0; /* no disable for now */
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(camera_ncm03j_magic); i += 2) {
|
||||
u_int8_t buf[8];
|
||||
|
||||
msg.addr = 0x6e;
|
||||
msg.buf = buf;
|
||||
msg.len = 2;
|
||||
msg.flags = 0;
|
||||
|
||||
buf[0] = camera_ncm03j_magic[i];
|
||||
buf[1] = camera_ncm03j_magic[i + 1];
|
||||
|
||||
ret = (ret < 0) ? ret : i2c_transfer(a, &msg, 1);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct soc_camera_platform_info camera_info = {
|
||||
.iface = 0,
|
||||
.format_name = "UYVY",
|
||||
.format_depth = 16,
|
||||
.format = {
|
||||
.pixelformat = V4L2_PIX_FMT_UYVY,
|
||||
.colorspace = V4L2_COLORSPACE_SMPTE170M,
|
||||
.width = 640,
|
||||
.height = 480,
|
||||
},
|
||||
.bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
|
||||
SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
|
||||
.set_capture = camera_set_capture,
|
||||
};
|
||||
|
||||
static struct platform_device camera_device = {
|
||||
.name = "soc_camera_platform",
|
||||
.dev = {
|
||||
.platform_data = &camera_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
|
||||
.flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
|
||||
SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
|
||||
};
|
||||
|
||||
static struct resource ceu_resources[] = {
|
||||
[0] = {
|
||||
.name = "CEU",
|
||||
.start = 0xfe910000,
|
||||
.end = 0xfe91009f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 52,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
[2] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device ceu_device = {
|
||||
.name = "sh_mobile_ceu",
|
||||
.num_resources = ARRAY_SIZE(ceu_resources),
|
||||
.resource = ceu_resources,
|
||||
.dev = {
|
||||
.platform_data = &sh_mobile_ceu_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *ap325rxa_devices[] __initdata = {
|
||||
&smc9118_device,
|
||||
&ap325rxa_nor_flash_device,
|
||||
&lcdc_device,
|
||||
&ceu_device,
|
||||
&camera_device,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
|
||||
};
|
||||
|
||||
static int __init ap325rxa_devices_setup(void)
|
||||
{
|
||||
clk_always_enable("mstp200"); /* LCDC */
|
||||
clk_always_enable("mstp203"); /* CEU */
|
||||
|
||||
platform_resource_setup_memory(&ceu_device, "ceu", 4 << 20);
|
||||
|
||||
i2c_register_board_info(0, ap325rxa_i2c_devices,
|
||||
ARRAY_SIZE(ap325rxa_i2c_devices));
|
||||
|
||||
return platform_add_devices(ap325rxa_devices,
|
||||
ARRAY_SIZE(ap325rxa_devices));
|
||||
}
|
||||
device_initcall(ap325rxa_devices_setup);
|
||||
|
||||
static void __init ap325rxa_setup(char **cmdline_p)
|
||||
{
|
||||
/* LCDC configuration */
|
||||
ctrl_outw(ctrl_inw(PORT_PHCR) & ~0xffff, PORT_PHCR);
|
||||
ctrl_outw(ctrl_inw(PORT_PLCR) & ~0xffff, PORT_PLCR);
|
||||
ctrl_outw(ctrl_inw(PORT_PMCR) & ~0xffff, PORT_PMCR);
|
||||
ctrl_outw(ctrl_inw(PORT_PRCR) & ~0x03ff, PORT_PRCR);
|
||||
ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x01C0, PORT_HIZCRA);
|
||||
|
||||
/* CEU */
|
||||
ctrl_outw(ctrl_inw(PORT_MSELCRB) & ~0x0001, PORT_MSELCRB);
|
||||
ctrl_outw(ctrl_inw(PORT_PSELD) & ~0x0003, PORT_PSELD);
|
||||
ctrl_outw((ctrl_inw(PORT_PZCR) & ~0xff00) | 0x5500, PORT_PZCR);
|
||||
ctrl_outb((ctrl_inb(PORT_PZDR) & ~0xf0) | 0x20, PORT_PZDR);
|
||||
}
|
||||
|
||||
static struct sh_machine_vector mv_ap325rxa __initmv = {
|
||||
.mv_name = "AP-325RXA",
|
||||
.mv_setup = ap325rxa_setup,
|
||||
};
|
15
arch/sh/boards/renesas/migor/Kconfig
Normal file
15
arch/sh/boards/renesas/migor/Kconfig
Normal file
@ -0,0 +1,15 @@
|
||||
if SH_MIGOR
|
||||
|
||||
choice
|
||||
prompt "Migo-R LCD Panel Board Selection"
|
||||
default SH_MIGOR_QVGA
|
||||
|
||||
config SH_MIGOR_QVGA
|
||||
bool "QVGA (320x240)"
|
||||
|
||||
config SH_MIGOR_RTA_WVGA
|
||||
bool "RTA WVGA (800x480)"
|
||||
|
||||
endchoice
|
||||
|
||||
endif
|
@ -1 +1,2 @@
|
||||
obj-y := setup.o
|
||||
obj-$(CONFIG_SH_MIGOR_QVGA) += lcd_qvga.o
|
||||
|
165
arch/sh/boards/renesas/migor/lcd_qvga.c
Normal file
165
arch/sh/boards/renesas/migor/lcd_qvga.c
Normal file
@ -0,0 +1,165 @@
|
||||
/*
|
||||
* Support for SuperH MigoR Quarter VGA LCD Panel
|
||||
*
|
||||
* Copyright (C) 2008 Magnus Damm
|
||||
*
|
||||
* Based on lcd_powertip.c from Kenati Technologies Pvt Ltd.
|
||||
* Copyright (c) 2007 Ujjwal Pande <ujjwal@kenati.com>,
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <asm/sh_mobile_lcdc.h>
|
||||
#include <asm/migor.h>
|
||||
|
||||
/* LCD Module is a PH240320T according to board schematics. This module
|
||||
* is made up of a 240x320 LCD hooked up to a R61505U (or HX8347-A01?)
|
||||
* Driver IC. This IC is connected to the SH7722 built-in LCDC using a
|
||||
* SYS-80 interface configured in 16 bit mode.
|
||||
*
|
||||
* Index 0: "Device Code Read" returns 0x1505.
|
||||
*/
|
||||
|
||||
static void reset_lcd_module(void)
|
||||
{
|
||||
ctrl_outb(ctrl_inb(PORT_PHDR) & ~0x04, PORT_PHDR);
|
||||
mdelay(2);
|
||||
ctrl_outb(ctrl_inb(PORT_PHDR) | 0x04, PORT_PHDR);
|
||||
mdelay(1);
|
||||
}
|
||||
|
||||
/* DB0-DB7 are connected to D1-D8, and DB8-DB15 to D10-D17 */
|
||||
|
||||
static unsigned long adjust_reg18(unsigned short data)
|
||||
{
|
||||
unsigned long tmp1, tmp2;
|
||||
|
||||
tmp1 = (data<<1 | 0x00000001) & 0x000001FF;
|
||||
tmp2 = (data<<2 | 0x00000200) & 0x0003FE00;
|
||||
return tmp1 | tmp2;
|
||||
}
|
||||
|
||||
static void write_reg(void *sys_ops_handle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *sys_ops,
|
||||
unsigned short reg, unsigned short data)
|
||||
{
|
||||
sys_ops->write_index(sys_ops_handle, adjust_reg18(reg << 8 | data));
|
||||
}
|
||||
|
||||
static void write_reg16(void *sys_ops_handle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *sys_ops,
|
||||
unsigned short reg, unsigned short data)
|
||||
{
|
||||
sys_ops->write_index(sys_ops_handle, adjust_reg18(reg));
|
||||
sys_ops->write_data(sys_ops_handle, adjust_reg18(data));
|
||||
}
|
||||
|
||||
static unsigned long read_reg16(void *sys_ops_handle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *sys_ops,
|
||||
unsigned short reg)
|
||||
{
|
||||
unsigned long data;
|
||||
|
||||
sys_ops->write_index(sys_ops_handle, adjust_reg18(reg));
|
||||
data = sys_ops->read_data(sys_ops_handle);
|
||||
return ((data >> 1) & 0xff) | ((data >> 2) & 0xff00);
|
||||
}
|
||||
|
||||
static void migor_lcd_qvga_seq(void *sys_ops_handle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *sys_ops,
|
||||
unsigned short const *data, int no_data)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < no_data; i += 2)
|
||||
write_reg16(sys_ops_handle, sys_ops, data[i], data[i + 1]);
|
||||
}
|
||||
|
||||
static const unsigned short sync_data[] = {
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
};
|
||||
|
||||
static const unsigned short magic0_data[] = {
|
||||
0x0060, 0x2700, 0x0008, 0x0808, 0x0090, 0x001A, 0x0007, 0x0001,
|
||||
0x0017, 0x0001, 0x0019, 0x0000, 0x0010, 0x17B0, 0x0011, 0x0116,
|
||||
0x0012, 0x0198, 0x0013, 0x1400, 0x0029, 0x000C, 0x0012, 0x01B8,
|
||||
};
|
||||
|
||||
static const unsigned short magic1_data[] = {
|
||||
0x0030, 0x0307, 0x0031, 0x0303, 0x0032, 0x0603, 0x0033, 0x0202,
|
||||
0x0034, 0x0202, 0x0035, 0x0202, 0x0036, 0x1F1F, 0x0037, 0x0303,
|
||||
0x0038, 0x0303, 0x0039, 0x0603, 0x003A, 0x0202, 0x003B, 0x0102,
|
||||
0x003C, 0x0204, 0x003D, 0x0000, 0x0001, 0x0100, 0x0002, 0x0300,
|
||||
0x0003, 0x5028, 0x0020, 0x00ef, 0x0021, 0x0000, 0x0004, 0x0000,
|
||||
0x0009, 0x0000, 0x000A, 0x0008, 0x000C, 0x0000, 0x000D, 0x0000,
|
||||
0x0015, 0x8000,
|
||||
};
|
||||
|
||||
static const unsigned short magic2_data[] = {
|
||||
0x0061, 0x0001, 0x0092, 0x0100, 0x0093, 0x0001, 0x0007, 0x0021,
|
||||
};
|
||||
|
||||
static const unsigned short magic3_data[] = {
|
||||
0x0010, 0x16B0, 0x0011, 0x0111, 0x0007, 0x0061,
|
||||
};
|
||||
|
||||
int migor_lcd_qvga_setup(void *board_data, void *sohandle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *so)
|
||||
{
|
||||
unsigned long xres = 320;
|
||||
unsigned long yres = 240;
|
||||
int k;
|
||||
|
||||
reset_lcd_module();
|
||||
migor_lcd_qvga_seq(sohandle, so, sync_data, ARRAY_SIZE(sync_data));
|
||||
|
||||
if (read_reg16(sohandle, so, 0) != 0x1505)
|
||||
return -ENODEV;
|
||||
|
||||
pr_info("Migo-R QVGA LCD Module detected.\n");
|
||||
|
||||
migor_lcd_qvga_seq(sohandle, so, sync_data, ARRAY_SIZE(sync_data));
|
||||
write_reg16(sohandle, so, 0x00A4, 0x0001);
|
||||
mdelay(10);
|
||||
|
||||
migor_lcd_qvga_seq(sohandle, so, magic0_data, ARRAY_SIZE(magic0_data));
|
||||
mdelay(100);
|
||||
|
||||
migor_lcd_qvga_seq(sohandle, so, magic1_data, ARRAY_SIZE(magic1_data));
|
||||
write_reg16(sohandle, so, 0x0050, 0xef - (yres - 1));
|
||||
write_reg16(sohandle, so, 0x0051, 0x00ef);
|
||||
write_reg16(sohandle, so, 0x0052, 0x0000);
|
||||
write_reg16(sohandle, so, 0x0053, xres - 1);
|
||||
|
||||
migor_lcd_qvga_seq(sohandle, so, magic2_data, ARRAY_SIZE(magic2_data));
|
||||
mdelay(10);
|
||||
|
||||
migor_lcd_qvga_seq(sohandle, so, magic3_data, ARRAY_SIZE(magic3_data));
|
||||
mdelay(40);
|
||||
|
||||
/* clear GRAM to avoid displaying garbage */
|
||||
|
||||
write_reg16(sohandle, so, 0x0020, 0x0000); /* horiz addr */
|
||||
write_reg16(sohandle, so, 0x0021, 0x0000); /* vert addr */
|
||||
|
||||
for (k = 0; k < (xres * 256); k++) /* yes, 256 words per line */
|
||||
write_reg16(sohandle, so, 0x0022, 0x0000);
|
||||
|
||||
write_reg16(sohandle, so, 0x0020, 0x0000); /* reset horiz addr */
|
||||
write_reg16(sohandle, so, 0x0021, 0x0000); /* reset vert addr */
|
||||
write_reg16(sohandle, so, 0x0007, 0x0173);
|
||||
mdelay(40);
|
||||
|
||||
/* enable display */
|
||||
write_reg(sohandle, so, 0x00, 0x22);
|
||||
mdelay(100);
|
||||
return 0;
|
||||
}
|
@ -15,9 +15,15 @@
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/smc91x.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/clk.h>
|
||||
#include <media/soc_camera_platform.h>
|
||||
#include <media/sh_mobile_ceu.h>
|
||||
#include <asm/clock.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/sh_keysc.h>
|
||||
#include <asm/sh_mobile_lcdc.h>
|
||||
#include <asm/migor.h>
|
||||
|
||||
/* Address IRQ Size Bus Description
|
||||
@ -198,14 +204,237 @@ static struct platform_device migor_nand_flash_device = {
|
||||
}
|
||||
};
|
||||
|
||||
static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = {
|
||||
#ifdef CONFIG_SH_MIGOR_RTA_WVGA
|
||||
.clock_source = LCDC_CLK_BUS,
|
||||
.ch[0] = {
|
||||
.chan = LCDC_CHAN_MAINLCD,
|
||||
.bpp = 16,
|
||||
.interface_type = RGB16,
|
||||
.clock_divider = 2,
|
||||
.lcd_cfg = {
|
||||
.name = "LB070WV1",
|
||||
.xres = 800,
|
||||
.yres = 480,
|
||||
.left_margin = 64,
|
||||
.right_margin = 16,
|
||||
.hsync_len = 120,
|
||||
.upper_margin = 1,
|
||||
.lower_margin = 17,
|
||||
.vsync_len = 2,
|
||||
.sync = 0,
|
||||
},
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_SH_MIGOR_QVGA
|
||||
.clock_source = LCDC_CLK_PERIPHERAL,
|
||||
.ch[0] = {
|
||||
.chan = LCDC_CHAN_MAINLCD,
|
||||
.bpp = 16,
|
||||
.interface_type = SYS16A,
|
||||
.clock_divider = 10,
|
||||
.lcd_cfg = {
|
||||
.name = "PH240320T",
|
||||
.xres = 320,
|
||||
.yres = 240,
|
||||
.left_margin = 0,
|
||||
.right_margin = 16,
|
||||
.hsync_len = 8,
|
||||
.upper_margin = 1,
|
||||
.lower_margin = 17,
|
||||
.vsync_len = 2,
|
||||
.sync = FB_SYNC_HOR_HIGH_ACT,
|
||||
},
|
||||
.board_cfg = {
|
||||
.setup_sys = migor_lcd_qvga_setup,
|
||||
},
|
||||
.sys_bus_cfg = {
|
||||
.ldmt2r = 0x06000a09,
|
||||
.ldmt3r = 0x180e3418,
|
||||
},
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct resource migor_lcdc_resources[] = {
|
||||
[0] = {
|
||||
.name = "LCDC",
|
||||
.start = 0xfe940000, /* P4-only space */
|
||||
.end = 0xfe941fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device migor_lcdc_device = {
|
||||
.name = "sh_mobile_lcdc_fb",
|
||||
.num_resources = ARRAY_SIZE(migor_lcdc_resources),
|
||||
.resource = migor_lcdc_resources,
|
||||
.dev = {
|
||||
.platform_data = &sh_mobile_lcdc_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk *camera_clk;
|
||||
|
||||
static void camera_power_on(void)
|
||||
{
|
||||
unsigned char value;
|
||||
|
||||
camera_clk = clk_get(NULL, "video_clk");
|
||||
clk_set_rate(camera_clk, 24000000);
|
||||
clk_enable(camera_clk); /* start VIO_CKO */
|
||||
|
||||
mdelay(10);
|
||||
value = ctrl_inb(PORT_PTDR);
|
||||
value &= ~0x09;
|
||||
#ifndef CONFIG_SH_MIGOR_RTA_WVGA
|
||||
value |= 0x01;
|
||||
#endif
|
||||
ctrl_outb(value, PORT_PTDR);
|
||||
mdelay(10);
|
||||
|
||||
ctrl_outb(value | 8, PORT_PTDR);
|
||||
}
|
||||
|
||||
static void camera_power_off(void)
|
||||
{
|
||||
clk_disable(camera_clk); /* stop VIO_CKO */
|
||||
clk_put(camera_clk);
|
||||
|
||||
ctrl_outb(ctrl_inb(PORT_PTDR) & ~0x08, PORT_PTDR);
|
||||
}
|
||||
|
||||
static unsigned char camera_ov772x_magic[] =
|
||||
{
|
||||
0x09, 0x01, 0x0c, 0x10, 0x0d, 0x41, 0x0e, 0x01,
|
||||
0x12, 0x00, 0x13, 0x8F, 0x14, 0x4A, 0x15, 0x00,
|
||||
0x16, 0x00, 0x17, 0x23, 0x18, 0xa0, 0x19, 0x07,
|
||||
0x1a, 0xf0, 0x1b, 0x40, 0x1f, 0x00, 0x20, 0x10,
|
||||
0x22, 0xff, 0x23, 0x01, 0x28, 0x00, 0x29, 0xa0,
|
||||
0x2a, 0x00, 0x2b, 0x00, 0x2c, 0xf0, 0x2d, 0x00,
|
||||
0x2e, 0x00, 0x30, 0x80, 0x31, 0x60, 0x32, 0x00,
|
||||
0x33, 0x00, 0x34, 0x00, 0x3d, 0x80, 0x3e, 0xe2,
|
||||
0x3f, 0x1f, 0x42, 0x80, 0x43, 0x80, 0x44, 0x80,
|
||||
0x45, 0x80, 0x46, 0x00, 0x47, 0x00, 0x48, 0x00,
|
||||
0x49, 0x50, 0x4a, 0x30, 0x4b, 0x50, 0x4c, 0x50,
|
||||
0x4d, 0x00, 0x4e, 0xef, 0x4f, 0x10, 0x50, 0x60,
|
||||
0x51, 0x00, 0x52, 0x00, 0x53, 0x24, 0x54, 0x7a,
|
||||
0x55, 0xfc, 0x62, 0xff, 0x63, 0xf0, 0x64, 0x1f,
|
||||
0x65, 0x00, 0x66, 0x10, 0x67, 0x00, 0x68, 0x00,
|
||||
0x69, 0x5c, 0x6a, 0x11, 0x6b, 0xa2, 0x6c, 0x01,
|
||||
0x6d, 0x50, 0x6e, 0x80, 0x6f, 0x80, 0x70, 0x0f,
|
||||
0x71, 0x00, 0x72, 0x00, 0x73, 0x0f, 0x74, 0x0f,
|
||||
0x75, 0xff, 0x78, 0x10, 0x79, 0x70, 0x7a, 0x70,
|
||||
0x7b, 0xf0, 0x7c, 0xf0, 0x7d, 0xf0, 0x7e, 0x0e,
|
||||
0x7f, 0x1a, 0x80, 0x31, 0x81, 0x5a, 0x82, 0x69,
|
||||
0x83, 0x75, 0x84, 0x7e, 0x85, 0x88, 0x86, 0x8f,
|
||||
0x87, 0x96, 0x88, 0xa3, 0x89, 0xaf, 0x8a, 0xc4,
|
||||
0x8b, 0xd7, 0x8c, 0xe8, 0x8d, 0x20, 0x8e, 0x00,
|
||||
0x8f, 0x00, 0x90, 0x08, 0x91, 0x10, 0x92, 0x1f,
|
||||
0x93, 0x01, 0x94, 0x2c, 0x95, 0x24, 0x96, 0x08,
|
||||
0x97, 0x14, 0x98, 0x24, 0x99, 0x38, 0x9a, 0x9e,
|
||||
0x9b, 0x00, 0x9c, 0x40, 0x9e, 0x11, 0x9f, 0x02,
|
||||
0xa0, 0x00, 0xa1, 0x40, 0xa2, 0x40, 0xa3, 0x06,
|
||||
0xa4, 0x00, 0xa6, 0x00, 0xa7, 0x40, 0xa8, 0x40,
|
||||
0xa9, 0x80, 0xaa, 0x80, 0xab, 0x06, 0xac, 0xff,
|
||||
0x12, 0x06, 0x64, 0x3f, 0x12, 0x46, 0x17, 0x3f,
|
||||
0x18, 0x50, 0x19, 0x03, 0x1a, 0x78, 0x29, 0x50,
|
||||
0x2c, 0x78,
|
||||
};
|
||||
|
||||
static int ov772x_set_capture(struct soc_camera_platform_info *info,
|
||||
int enable)
|
||||
{
|
||||
struct i2c_adapter *a = i2c_get_adapter(0);
|
||||
struct i2c_msg msg;
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
||||
if (!enable)
|
||||
return 0; /* camera_power_off() is enough */
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(camera_ov772x_magic); i += 2) {
|
||||
u_int8_t buf[8];
|
||||
|
||||
msg.addr = 0x21;
|
||||
msg.buf = buf;
|
||||
msg.len = 2;
|
||||
msg.flags = 0;
|
||||
|
||||
buf[0] = camera_ov772x_magic[i];
|
||||
buf[1] = camera_ov772x_magic[i + 1];
|
||||
|
||||
ret = (ret < 0) ? ret : i2c_transfer(a, &msg, 1);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct soc_camera_platform_info ov772x_info = {
|
||||
.iface = 0,
|
||||
.format_name = "RGB565",
|
||||
.format_depth = 16,
|
||||
.format = {
|
||||
.pixelformat = V4L2_PIX_FMT_RGB565,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.width = 320,
|
||||
.height = 240,
|
||||
},
|
||||
.bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
|
||||
SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
|
||||
.set_capture = ov772x_set_capture,
|
||||
};
|
||||
|
||||
static struct platform_device migor_camera_device = {
|
||||
.name = "soc_camera_platform",
|
||||
.dev = {
|
||||
.platform_data = &ov772x_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
|
||||
.flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \
|
||||
| SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH,
|
||||
.enable_camera = camera_power_on,
|
||||
.disable_camera = camera_power_off,
|
||||
};
|
||||
|
||||
static struct resource migor_ceu_resources[] = {
|
||||
[0] = {
|
||||
.name = "CEU",
|
||||
.start = 0xfe910000,
|
||||
.end = 0xfe91009f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 52,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
[2] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device migor_ceu_device = {
|
||||
.name = "sh_mobile_ceu",
|
||||
.num_resources = ARRAY_SIZE(migor_ceu_resources),
|
||||
.resource = migor_ceu_resources,
|
||||
.dev = {
|
||||
.platform_data = &sh_mobile_ceu_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *migor_devices[] __initdata = {
|
||||
&smc91x_eth_device,
|
||||
&sh_keysc_device,
|
||||
&migor_lcdc_device,
|
||||
&migor_ceu_device,
|
||||
&migor_camera_device,
|
||||
&migor_nor_flash_device,
|
||||
&migor_nand_flash_device,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata migor_i2c_devices[] = {
|
||||
static struct i2c_board_info migor_i2c_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("rs5c372b", 0x32),
|
||||
},
|
||||
@ -217,6 +446,12 @@ static struct i2c_board_info __initdata migor_i2c_devices[] = {
|
||||
|
||||
static int __init migor_devices_setup(void)
|
||||
{
|
||||
clk_always_enable("mstp214"); /* KEYSC */
|
||||
clk_always_enable("mstp200"); /* LCDC */
|
||||
clk_always_enable("mstp203"); /* CEU */
|
||||
|
||||
platform_resource_setup_memory(&migor_ceu_device, "ceu", 4 << 20);
|
||||
|
||||
i2c_register_board_info(0, migor_i2c_devices,
|
||||
ARRAY_SIZE(migor_i2c_devices));
|
||||
|
||||
@ -235,20 +470,51 @@ static void __init migor_setup(char **cmdline_p)
|
||||
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);
|
||||
|
||||
#ifdef CONFIG_SH_MIGOR_RTA_WVGA
|
||||
/* LCDC - WVGA - Enable RGB Interface signals */
|
||||
ctrl_outw(ctrl_inw(PORT_PACR) & ~0x0003, PORT_PACR);
|
||||
ctrl_outw(0x0000, PORT_PHCR);
|
||||
ctrl_outw(0x0000, PORT_PLCR);
|
||||
ctrl_outw(0x0000, PORT_PMCR);
|
||||
ctrl_outw(ctrl_inw(PORT_PRCR) & ~0x000f, PORT_PRCR);
|
||||
ctrl_outw((ctrl_inw(PORT_PSELD) & ~0x000d) | 0x0400, PORT_PSELD);
|
||||
ctrl_outw(ctrl_inw(PORT_MSELCRB) & ~0x0100, PORT_MSELCRB);
|
||||
ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x01e0, PORT_HIZCRA);
|
||||
#endif
|
||||
#ifdef CONFIG_SH_MIGOR_QVGA
|
||||
/* LCDC - QVGA - Enable SYS Interface signals */
|
||||
ctrl_outw(ctrl_inw(PORT_PACR) & ~0x0003, PORT_PACR);
|
||||
ctrl_outw((ctrl_inw(PORT_PHCR) & ~0xcfff) | 0x0010, PORT_PHCR);
|
||||
ctrl_outw(0x0000, PORT_PLCR);
|
||||
ctrl_outw(0x0000, PORT_PMCR);
|
||||
ctrl_outw(ctrl_inw(PORT_PRCR) & ~0x030f, PORT_PRCR);
|
||||
ctrl_outw((ctrl_inw(PORT_PSELD) & ~0x0001) | 0x0420, PORT_PSELD);
|
||||
ctrl_outw(ctrl_inw(PORT_MSELCRB) | 0x0100, PORT_MSELCRB);
|
||||
ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x01e0, PORT_HIZCRA);
|
||||
#endif
|
||||
|
||||
/* CEU */
|
||||
ctrl_outw((ctrl_inw(PORT_PTCR) & ~0x03c3) | 0x0051, PORT_PTCR);
|
||||
ctrl_outw(ctrl_inw(PORT_PUCR) & ~0x03ff, PORT_PUCR);
|
||||
ctrl_outw(ctrl_inw(PORT_PVCR) & ~0x03ff, PORT_PVCR);
|
||||
ctrl_outw(ctrl_inw(PORT_PWCR) & ~0x3c00, PORT_PWCR);
|
||||
ctrl_outw(ctrl_inw(PORT_PSELC) | 0x0001, PORT_PSELC);
|
||||
ctrl_outw(ctrl_inw(PORT_PSELD) & ~0x2000, PORT_PSELD);
|
||||
ctrl_outw(ctrl_inw(PORT_PSELE) | 0x000f, PORT_PSELE);
|
||||
ctrl_outw(ctrl_inw(PORT_MSELCRB) | 0x2200, PORT_MSELCRB);
|
||||
ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x0a00, PORT_HIZCRA);
|
||||
ctrl_outw(ctrl_inw(PORT_HIZCRB) & ~0x0003, PORT_HIZCRB);
|
||||
}
|
||||
|
||||
static struct sh_machine_vector mv_migor __initmv = {
|
||||
|
1
arch/sh/boards/renesas/rsk7203/Makefile
Normal file
1
arch/sh/boards/renesas/rsk7203/Makefile
Normal file
@ -0,0 +1 @@
|
||||
obj-y := setup.o
|
126
arch/sh/boards/renesas/rsk7203/setup.c
Normal file
126
arch/sh/boards/renesas/rsk7203/setup.c
Normal file
@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Renesas Technology Europe RSK+ 7203 Support.
|
||||
*
|
||||
* 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/init.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/mtd/map.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
static struct resource smc911x_resources[] = {
|
||||
[0] = {
|
||||
.start = 0x24000000,
|
||||
.end = 0x24000000 + 0x100,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 64,
|
||||
.end = 64,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device smc911x_device = {
|
||||
.name = "smc911x",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(smc911x_resources),
|
||||
.resource = smc911x_resources,
|
||||
};
|
||||
|
||||
static const char *probes[] = { "cmdlinepart", NULL };
|
||||
|
||||
static struct mtd_partition *parsed_partitions;
|
||||
|
||||
static struct mtd_partition rsk7203_partitions[] = {
|
||||
{
|
||||
.name = "Bootloader",
|
||||
.offset = 0x00000000,
|
||||
.size = 0x00040000,
|
||||
.mask_flags = MTD_WRITEABLE,
|
||||
}, {
|
||||
.name = "Kernel",
|
||||
.offset = MTDPART_OFS_NXTBLK,
|
||||
.size = 0x001c0000,
|
||||
}, {
|
||||
.name = "Flash_FS",
|
||||
.offset = MTDPART_OFS_NXTBLK,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
}
|
||||
};
|
||||
|
||||
static struct physmap_flash_data flash_data = {
|
||||
.width = 2,
|
||||
};
|
||||
|
||||
static struct resource flash_resource = {
|
||||
.start = 0x20000000,
|
||||
.end = 0x20400000,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device flash_device = {
|
||||
.name = "physmap-flash",
|
||||
.id = -1,
|
||||
.resource = &flash_resource,
|
||||
.num_resources = 1,
|
||||
.dev = {
|
||||
.platform_data = &flash_data,
|
||||
},
|
||||
};
|
||||
|
||||
static struct mtd_info *flash_mtd;
|
||||
|
||||
static struct map_info rsk7203_flash_map = {
|
||||
.name = "RSK+ Flash",
|
||||
.size = 0x400000,
|
||||
.bankwidth = 2,
|
||||
};
|
||||
|
||||
static void __init set_mtd_partitions(void)
|
||||
{
|
||||
int nr_parts = 0;
|
||||
|
||||
simple_map_init(&rsk7203_flash_map);
|
||||
flash_mtd = do_map_probe("cfi_probe", &rsk7203_flash_map);
|
||||
nr_parts = parse_mtd_partitions(flash_mtd, probes,
|
||||
&parsed_partitions, 0);
|
||||
/* If there is no partition table, used the hard coded table */
|
||||
if (nr_parts <= 0) {
|
||||
flash_data.parts = rsk7203_partitions;
|
||||
flash_data.nr_parts = ARRAY_SIZE(rsk7203_partitions);
|
||||
} else {
|
||||
flash_data.nr_parts = nr_parts;
|
||||
flash_data.parts = parsed_partitions;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static struct platform_device *rsk7203_devices[] __initdata = {
|
||||
&smc911x_device,
|
||||
&flash_device,
|
||||
};
|
||||
|
||||
static int __init rsk7203_devices_setup(void)
|
||||
{
|
||||
set_mtd_partitions();
|
||||
return platform_add_devices(rsk7203_devices,
|
||||
ARRAY_SIZE(rsk7203_devices));
|
||||
}
|
||||
device_initcall(rsk7203_devices_setup);
|
||||
|
||||
/*
|
||||
* The Machine Vector
|
||||
*/
|
||||
static struct sh_machine_vector mv_rsk7203 __initmv = {
|
||||
.mv_name = "RSK+7203",
|
||||
};
|
1
arch/sh/boards/renesas/sh7763rdp/Makefile
Normal file
1
arch/sh/boards/renesas/sh7763rdp/Makefile
Normal file
@ -0,0 +1 @@
|
||||
obj-y := setup.o irq.o
|
45
arch/sh/boards/renesas/sh7763rdp/irq.c
Normal file
45
arch/sh/boards/renesas/sh7763rdp/irq.c
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* linux/arch/sh/boards/renesas/sh7763rdp/irq.c
|
||||
*
|
||||
* Renesas Solutions SH7763RDP Support.
|
||||
*
|
||||
* Copyright (C) 2008 Renesas Solutions Corp.
|
||||
* Copyright (C) 2008 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
|
||||
*
|
||||
* 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 <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/sh7763rdp.h>
|
||||
|
||||
#define INTC_BASE (0xFFD00000)
|
||||
#define INTC_INT2PRI7 (INTC_BASE+0x4001C)
|
||||
#define INTC_INT2MSKCR (INTC_BASE+0x4003C)
|
||||
#define INTC_INT2MSKCR1 (INTC_BASE+0x400D4)
|
||||
|
||||
/*
|
||||
* Initialize IRQ setting
|
||||
*/
|
||||
void __init init_sh7763rdp_IRQ(void)
|
||||
{
|
||||
/* GPIO enabled */
|
||||
ctrl_outl(1 << 25, INTC_INT2MSKCR);
|
||||
|
||||
/* enable GPIO interrupts */
|
||||
ctrl_outl((ctrl_inl(INTC_INT2PRI7) & 0xFF00FFFF) | 0x000F0000,
|
||||
INTC_INT2PRI7);
|
||||
|
||||
/* USBH enabled */
|
||||
ctrl_outl(1 << 17, INTC_INT2MSKCR1);
|
||||
|
||||
/* GETHER enabled */
|
||||
ctrl_outl(1 << 16, INTC_INT2MSKCR1);
|
||||
|
||||
/* DMAC enabled */
|
||||
ctrl_outl(1 << 8, INTC_INT2MSKCR);
|
||||
}
|
128
arch/sh/boards/renesas/sh7763rdp/setup.c
Normal file
128
arch/sh/boards/renesas/sh7763rdp/setup.c
Normal file
@ -0,0 +1,128 @@
|
||||
/*
|
||||
* linux/arch/sh/boards/renesas/sh7763rdp/setup.c
|
||||
*
|
||||
* Renesas Solutions sh7763rdp board
|
||||
*
|
||||
* Copyright (C) 2008 Renesas Solutions Corp.
|
||||
* Copyright (C) 2008 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
|
||||
*
|
||||
* 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 <linux/interrupt.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/sh7763rdp.h>
|
||||
|
||||
/* NOR Flash */
|
||||
static struct mtd_partition sh7763rdp_nor_flash_partitions[] = {
|
||||
{
|
||||
.name = "U-Boot",
|
||||
.offset = 0,
|
||||
.size = (2 * 128 * 1024),
|
||||
.mask_flags = MTD_WRITEABLE, /* Read-only */
|
||||
}, {
|
||||
.name = "Linux-Kernel",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = (20 * 128 * 1024),
|
||||
}, {
|
||||
.name = "Root Filesystem",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data sh7763rdp_nor_flash_data = {
|
||||
.width = 2,
|
||||
.parts = sh7763rdp_nor_flash_partitions,
|
||||
.nr_parts = ARRAY_SIZE(sh7763rdp_nor_flash_partitions),
|
||||
};
|
||||
|
||||
static struct resource sh7763rdp_nor_flash_resources[] = {
|
||||
[0] = {
|
||||
.name = "NOR Flash",
|
||||
.start = 0,
|
||||
.end = (64 * 1024 * 1024),
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device sh7763rdp_nor_flash_device = {
|
||||
.name = "physmap-flash",
|
||||
.resource = sh7763rdp_nor_flash_resources,
|
||||
.num_resources = ARRAY_SIZE(sh7763rdp_nor_flash_resources),
|
||||
.dev = {
|
||||
.platform_data = &sh7763rdp_nor_flash_data,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *sh7763rdp_devices[] __initdata = {
|
||||
&sh7763rdp_nor_flash_device,
|
||||
};
|
||||
|
||||
static int __init sh7763rdp_devices_setup(void)
|
||||
{
|
||||
return platform_add_devices(sh7763rdp_devices,
|
||||
ARRAY_SIZE(sh7763rdp_devices));
|
||||
}
|
||||
__initcall(sh7763rdp_devices_setup);
|
||||
|
||||
static void __init sh7763rdp_setup(char **cmdline_p)
|
||||
{
|
||||
/* Board version check */
|
||||
if (ctrl_inw(CPLD_BOARD_ID_ERV_REG) == 0xECB1)
|
||||
printk(KERN_INFO "RTE Standard Configuration\n");
|
||||
else
|
||||
printk(KERN_INFO "RTA Standard Configuration\n");
|
||||
|
||||
/* USB pin select bits (clear bit 5-2 to 0) */
|
||||
ctrl_outw((ctrl_inw(PORT_PSEL2) & 0xFFC3), PORT_PSEL2);
|
||||
/* USBH setup port I controls to other (clear bits 4-9 to 0) */
|
||||
ctrl_outw(ctrl_inw(PORT_PICR) & 0xFC0F, PORT_PICR);
|
||||
|
||||
/* Select USB Host controller */
|
||||
ctrl_outw(0x00, USB_USBHSC);
|
||||
|
||||
/* For LCD */
|
||||
/* set PTJ7-1, bits 15-2 of PJCR to 0 */
|
||||
ctrl_outw(ctrl_inw(PORT_PJCR) & 0x0003, PORT_PJCR);
|
||||
/* set PTI5, bits 11-10 of PICR to 0 */
|
||||
ctrl_outw(ctrl_inw(PORT_PICR) & 0xF3FF, PORT_PICR);
|
||||
ctrl_outw(0, PORT_PKCR);
|
||||
ctrl_outw(0, PORT_PLCR);
|
||||
/* set PSEL2 bits 14-8, 5-4, of PSEL2 to 0 */
|
||||
ctrl_outw((ctrl_inw(PORT_PSEL2) & 0x00C0), PORT_PSEL2);
|
||||
/* set PSEL3 bits 14-12, 6-4, 2-0 of PSEL3 to 0 */
|
||||
ctrl_outw((ctrl_inw(PORT_PSEL3) & 0x0700), PORT_PSEL3);
|
||||
|
||||
/* For HAC */
|
||||
/* bit3-0 0100:HAC & SSI1 enable */
|
||||
ctrl_outw((ctrl_inw(PORT_PSEL1) & 0xFFF0) | 0x0004, PORT_PSEL1);
|
||||
/* bit14 1:SSI_HAC_CLK enable */
|
||||
ctrl_outw(ctrl_inw(PORT_PSEL4) | 0x4000, PORT_PSEL4);
|
||||
|
||||
/* SH-Ether */
|
||||
ctrl_outw((ctrl_inw(PORT_PSEL1) & ~0xff00) | 0x2400, PORT_PSEL1);
|
||||
ctrl_outw(0x0, PORT_PFCR);
|
||||
ctrl_outw(0x0, PORT_PFCR);
|
||||
ctrl_outw(0x0, PORT_PFCR);
|
||||
|
||||
/* MMC */
|
||||
/*selects SCIF and MMC other functions */
|
||||
ctrl_outw(0x0001, PORT_PSEL0);
|
||||
/* MMC clock operates */
|
||||
ctrl_outl(ctrl_inl(MSTPCR1) & ~0x8, MSTPCR1);
|
||||
ctrl_outw(ctrl_inw(PORT_PACR) & ~0x3000, PORT_PACR);
|
||||
ctrl_outw(ctrl_inw(PORT_PCCR) & ~0xCFC3, PORT_PCCR);
|
||||
}
|
||||
|
||||
static struct sh_machine_vector mv_sh7763rdp __initmv = {
|
||||
.mv_name = "sh7763drp",
|
||||
.mv_setup = sh7763rdp_setup,
|
||||
.mv_nr_irqs = 112,
|
||||
.mv_init_irq = init_sh7763rdp_IRQ,
|
||||
};
|
1
arch/sh/boards/renesas/sh7785lcr/Makefile
Normal file
1
arch/sh/boards/renesas/sh7785lcr/Makefile
Normal file
@ -0,0 +1 @@
|
||||
obj-y := setup.o
|
302
arch/sh/boards/renesas/sh7785lcr/setup.c
Normal file
302
arch/sh/boards/renesas/sh7785lcr/setup.c
Normal file
@ -0,0 +1,302 @@
|
||||
/*
|
||||
* Renesas Technology Corp. R0P7785LC0011RL Support.
|
||||
*
|
||||
* Copyright (C) 2008 Yoshihiro Shimoda
|
||||
*
|
||||
* 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 <linux/sm501.h>
|
||||
#include <linux/sm501-regs.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c-pca-platform.h>
|
||||
#include <linux/i2c-algo-pca.h>
|
||||
#include <asm/heartbeat.h>
|
||||
#include <asm/sh7785lcr.h>
|
||||
|
||||
/*
|
||||
* NOTE: This board has 2 physical memory maps.
|
||||
* Please look at include/asm-sh/sh7785lcr.h or hardware manual.
|
||||
*/
|
||||
static struct resource heartbeat_resources[] = {
|
||||
[0] = {
|
||||
.start = PLD_LEDCR,
|
||||
.end = PLD_LEDCR,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct heartbeat_data heartbeat_data = {
|
||||
.regsize = 8,
|
||||
};
|
||||
|
||||
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 mtd_partition nor_flash_partitions[] = {
|
||||
{
|
||||
.name = "loader",
|
||||
.offset = 0x00000000,
|
||||
.size = 512 * 1024,
|
||||
},
|
||||
{
|
||||
.name = "bootenv",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = 512 * 1024,
|
||||
},
|
||||
{
|
||||
.name = "kernel",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = 4 * 1024 * 1024,
|
||||
},
|
||||
{
|
||||
.name = "data",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data nor_flash_data = {
|
||||
.width = 4,
|
||||
.parts = nor_flash_partitions,
|
||||
.nr_parts = ARRAY_SIZE(nor_flash_partitions),
|
||||
};
|
||||
|
||||
static struct resource nor_flash_resources[] = {
|
||||
[0] = {
|
||||
.start = NOR_FLASH_ADDR,
|
||||
.end = NOR_FLASH_ADDR + NOR_FLASH_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device nor_flash_device = {
|
||||
.name = "physmap-flash",
|
||||
.dev = {
|
||||
.platform_data = &nor_flash_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(nor_flash_resources),
|
||||
.resource = nor_flash_resources,
|
||||
};
|
||||
|
||||
static struct resource r8a66597_usb_host_resources[] = {
|
||||
[0] = {
|
||||
.name = "r8a66597_hcd",
|
||||
.start = R8A66597_ADDR,
|
||||
.end = R8A66597_ADDR + R8A66597_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.name = "r8a66597_hcd",
|
||||
.start = 2,
|
||||
.end = 2,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device r8a66597_usb_host_device = {
|
||||
.name = "r8a66597_hcd",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.dma_mask = NULL,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(r8a66597_usb_host_resources),
|
||||
.resource = r8a66597_usb_host_resources,
|
||||
};
|
||||
|
||||
static struct resource sm501_resources[] = {
|
||||
[0] = {
|
||||
.start = SM107_MEM_ADDR,
|
||||
.end = SM107_MEM_ADDR + SM107_MEM_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = SM107_REG_ADDR,
|
||||
.end = SM107_REG_ADDR + SM107_REG_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[2] = {
|
||||
.start = 10,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct fb_videomode sm501_default_mode_crt = {
|
||||
.pixclock = 35714, /* 28MHz */
|
||||
.xres = 640,
|
||||
.yres = 480,
|
||||
.left_margin = 105,
|
||||
.right_margin = 16,
|
||||
.upper_margin = 33,
|
||||
.lower_margin = 10,
|
||||
.hsync_len = 39,
|
||||
.vsync_len = 2,
|
||||
.sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
||||
};
|
||||
|
||||
static struct fb_videomode sm501_default_mode_pnl = {
|
||||
.pixclock = 40000, /* 25MHz */
|
||||
.xres = 640,
|
||||
.yres = 480,
|
||||
.left_margin = 2,
|
||||
.right_margin = 16,
|
||||
.upper_margin = 33,
|
||||
.lower_margin = 10,
|
||||
.hsync_len = 39,
|
||||
.vsync_len = 2,
|
||||
.sync = 0,
|
||||
};
|
||||
|
||||
static struct sm501_platdata_fbsub sm501_pdata_fbsub_pnl = {
|
||||
.def_bpp = 16,
|
||||
.def_mode = &sm501_default_mode_pnl,
|
||||
.flags = SM501FB_FLAG_USE_INIT_MODE |
|
||||
SM501FB_FLAG_USE_HWCURSOR |
|
||||
SM501FB_FLAG_USE_HWACCEL |
|
||||
SM501FB_FLAG_DISABLE_AT_EXIT |
|
||||
SM501FB_FLAG_PANEL_NO_VBIASEN,
|
||||
};
|
||||
|
||||
static struct sm501_platdata_fbsub sm501_pdata_fbsub_crt = {
|
||||
.def_bpp = 16,
|
||||
.def_mode = &sm501_default_mode_crt,
|
||||
.flags = SM501FB_FLAG_USE_INIT_MODE |
|
||||
SM501FB_FLAG_USE_HWCURSOR |
|
||||
SM501FB_FLAG_USE_HWACCEL |
|
||||
SM501FB_FLAG_DISABLE_AT_EXIT,
|
||||
};
|
||||
|
||||
static struct sm501_platdata_fb sm501_fb_pdata = {
|
||||
.fb_route = SM501_FB_OWN,
|
||||
.fb_crt = &sm501_pdata_fbsub_crt,
|
||||
.fb_pnl = &sm501_pdata_fbsub_pnl,
|
||||
};
|
||||
|
||||
static struct sm501_initdata sm501_initdata = {
|
||||
.gpio_high = {
|
||||
.set = 0x00001fe0,
|
||||
.mask = 0x0,
|
||||
},
|
||||
.devices = 0,
|
||||
.mclk = 84 * 1000000,
|
||||
.m1xclk = 112 * 1000000,
|
||||
};
|
||||
|
||||
static struct sm501_platdata sm501_platform_data = {
|
||||
.init = &sm501_initdata,
|
||||
.fb = &sm501_fb_pdata,
|
||||
};
|
||||
|
||||
static struct platform_device sm501_device = {
|
||||
.name = "sm501",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &sm501_platform_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(sm501_resources),
|
||||
.resource = sm501_resources,
|
||||
};
|
||||
|
||||
static struct resource i2c_resources[] = {
|
||||
[0] = {
|
||||
.start = PCA9564_ADDR,
|
||||
.end = PCA9564_ADDR + PCA9564_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM | IORESOURCE_MEM_8BIT,
|
||||
},
|
||||
[1] = {
|
||||
.start = 12,
|
||||
.end = 12,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct i2c_pca9564_pf_platform_data i2c_platform_data = {
|
||||
.gpio = 0,
|
||||
.i2c_clock_speed = I2C_PCA_CON_330kHz,
|
||||
.timeout = 100,
|
||||
};
|
||||
|
||||
static struct platform_device i2c_device = {
|
||||
.name = "i2c-pca-platform",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &i2c_platform_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(i2c_resources),
|
||||
.resource = i2c_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *sh7785lcr_devices[] __initdata = {
|
||||
&heartbeat_device,
|
||||
&nor_flash_device,
|
||||
&r8a66597_usb_host_device,
|
||||
&sm501_device,
|
||||
&i2c_device,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata sh7785lcr_i2c_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("r2025sd", 0x32),
|
||||
},
|
||||
};
|
||||
|
||||
static int __init sh7785lcr_devices_setup(void)
|
||||
{
|
||||
i2c_register_board_info(0, sh7785lcr_i2c_devices,
|
||||
ARRAY_SIZE(sh7785lcr_i2c_devices));
|
||||
|
||||
return platform_add_devices(sh7785lcr_devices,
|
||||
ARRAY_SIZE(sh7785lcr_devices));
|
||||
}
|
||||
__initcall(sh7785lcr_devices_setup);
|
||||
|
||||
/* Initialize IRQ setting */
|
||||
void __init init_sh7785lcr_IRQ(void)
|
||||
{
|
||||
plat_irq_setup_pins(IRQ_MODE_IRQ7654);
|
||||
plat_irq_setup_pins(IRQ_MODE_IRQ3210);
|
||||
}
|
||||
|
||||
static void sh7785lcr_power_off(void)
|
||||
{
|
||||
ctrl_outb(0x01, P2SEGADDR(PLD_POFCR));
|
||||
}
|
||||
|
||||
/* Initialize the board */
|
||||
static void __init sh7785lcr_setup(char **cmdline_p)
|
||||
{
|
||||
void __iomem *sm501_reg;
|
||||
|
||||
printk(KERN_INFO "Renesas Technology Corp. R0P7785LC0011RL support.\n");
|
||||
|
||||
pm_power_off = sh7785lcr_power_off;
|
||||
|
||||
/* sm501 DRAM configuration */
|
||||
sm501_reg = (void __iomem *)0xb3e00000 + SM501_DRAM_CONTROL;
|
||||
writel(0x000307c2, sm501_reg);
|
||||
}
|
||||
|
||||
/*
|
||||
* The Machine Vector
|
||||
*/
|
||||
static struct sh_machine_vector mv_sh7785lcr __initmv = {
|
||||
.mv_name = "SH7785LCR",
|
||||
.mv_setup = sh7785lcr_setup,
|
||||
.mv_init_irq = init_sh7785lcr_IRQ,
|
||||
};
|
||||
|
@ -1,202 +1,80 @@
|
||||
/*
|
||||
* arch/sh/boards/se/7343/irq.c
|
||||
* linux/arch/sh/boards/se/7343/irq.c
|
||||
*
|
||||
* Copyright (C) 2008 Yoshihiro Shimoda
|
||||
*
|
||||
* Based on linux/arch/sh/boards/se/7722/irq.c
|
||||
* Copyright (C) 2007 Nobuhiro Iwamatsu
|
||||
*
|
||||
* 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/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/mach/se7343.h>
|
||||
#include <asm/se7343.h>
|
||||
|
||||
static void
|
||||
disable_intreq_irq(unsigned int irq)
|
||||
static void disable_se7343_irq(unsigned int irq)
|
||||
{
|
||||
int bit = irq - OFFCHIP_IRQ_BASE;
|
||||
u16 val;
|
||||
|
||||
val = ctrl_inw(PA_CPLD_IMSK);
|
||||
val |= 1 << bit;
|
||||
ctrl_outw(val, PA_CPLD_IMSK);
|
||||
unsigned int bit = irq - SE7343_FPGA_IRQ_BASE;
|
||||
ctrl_outw(ctrl_inw(PA_CPLD_IMSK) | 1 << bit, PA_CPLD_IMSK);
|
||||
}
|
||||
|
||||
static void
|
||||
enable_intreq_irq(unsigned int irq)
|
||||
static void enable_se7343_irq(unsigned int irq)
|
||||
{
|
||||
int bit = irq - OFFCHIP_IRQ_BASE;
|
||||
u16 val;
|
||||
|
||||
val = ctrl_inw(PA_CPLD_IMSK);
|
||||
val &= ~(1 << bit);
|
||||
ctrl_outw(val, PA_CPLD_IMSK);
|
||||
unsigned int bit = irq - SE7343_FPGA_IRQ_BASE;
|
||||
ctrl_outw(ctrl_inw(PA_CPLD_IMSK) & ~(1 << bit), PA_CPLD_IMSK);
|
||||
}
|
||||
|
||||
static void
|
||||
mask_and_ack_intreq_irq(unsigned int irq)
|
||||
{
|
||||
disable_intreq_irq(irq);
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
startup_intreq_irq(unsigned int irq)
|
||||
{
|
||||
enable_intreq_irq(irq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
shutdown_intreq_irq(unsigned int irq)
|
||||
{
|
||||
disable_intreq_irq(irq);
|
||||
}
|
||||
|
||||
static void
|
||||
end_intreq_irq(unsigned int irq)
|
||||
{
|
||||
if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
|
||||
enable_intreq_irq(irq);
|
||||
}
|
||||
|
||||
static struct hw_interrupt_type intreq_irq_type = {
|
||||
.typename = "FPGA-IRQ",
|
||||
.startup = startup_intreq_irq,
|
||||
.shutdown = shutdown_intreq_irq,
|
||||
.enable = enable_intreq_irq,
|
||||
.disable = disable_intreq_irq,
|
||||
.ack = mask_and_ack_intreq_irq,
|
||||
.end = end_intreq_irq
|
||||
static struct irq_chip se7343_irq_chip __read_mostly = {
|
||||
.name = "SE7343-FPGA",
|
||||
.mask = disable_se7343_irq,
|
||||
.unmask = enable_se7343_irq,
|
||||
.mask_ack = disable_se7343_irq,
|
||||
};
|
||||
|
||||
static void
|
||||
make_intreq_irq(unsigned int irq)
|
||||
static void se7343_irq_demux(unsigned int irq, struct irq_desc *desc)
|
||||
{
|
||||
disable_irq_nosync(irq);
|
||||
irq_desc[irq].chip = &intreq_irq_type;
|
||||
disable_intreq_irq(irq);
|
||||
}
|
||||
unsigned short intv = ctrl_inw(PA_CPLD_ST);
|
||||
struct irq_desc *ext_desc;
|
||||
unsigned int ext_irq = SE7343_FPGA_IRQ_BASE;
|
||||
|
||||
int
|
||||
shmse_irq_demux(int irq)
|
||||
{
|
||||
int bit;
|
||||
volatile u16 val;
|
||||
intv &= (1 << SE7343_FPGA_IRQ_NR) - 1;
|
||||
|
||||
if (irq == IRQ5_IRQ) {
|
||||
/* Read status Register */
|
||||
val = ctrl_inw(PA_CPLD_ST);
|
||||
bit = ffs(val);
|
||||
if (bit != 0)
|
||||
return OFFCHIP_IRQ_BASE + bit - 1;
|
||||
while (intv) {
|
||||
if (intv & 1) {
|
||||
ext_desc = irq_desc + ext_irq;
|
||||
handle_level_irq(ext_irq, ext_desc);
|
||||
}
|
||||
intv >>= 1;
|
||||
ext_irq++;
|
||||
}
|
||||
return irq;
|
||||
}
|
||||
|
||||
/* IRQ5 is multiplexed between the following sources:
|
||||
* 1. PC Card socket
|
||||
* 2. Extension slot
|
||||
* 3. USB Controller
|
||||
* 4. Serial Controller
|
||||
*
|
||||
* We configure IRQ5 as a cascade IRQ.
|
||||
*/
|
||||
static struct irqaction irq5 = {
|
||||
.handler = no_action,
|
||||
.mask = CPU_MASK_NONE,
|
||||
.name = "IRQ5-cascade",
|
||||
};
|
||||
|
||||
static struct ipr_data se7343_irq5_ipr_map[] = {
|
||||
{ IRQ5_IRQ, IRQ5_IPR_ADDR+2, IRQ5_IPR_POS, IRQ5_PRIORITY },
|
||||
};
|
||||
static struct ipr_data se7343_siof0_vpu_ipr_map[] = {
|
||||
{ SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY },
|
||||
{ VPU_IRQ, VPU_IPR_ADDR, VPU_IPR_POS, 8 },
|
||||
};
|
||||
static struct ipr_data se7343_other_ipr_map[] = {
|
||||
{ DMTE0_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY },
|
||||
{ DMTE1_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY },
|
||||
{ DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY },
|
||||
{ DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY },
|
||||
{ DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY },
|
||||
{ DMTE5_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY },
|
||||
|
||||
/* I2C block */
|
||||
{ IIC0_ALI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY },
|
||||
{ IIC0_TACKI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY },
|
||||
{ IIC0_WAITI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY },
|
||||
{ IIC0_DTEI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY },
|
||||
|
||||
{ IIC1_ALI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY },
|
||||
{ IIC1_TACKI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY },
|
||||
{ IIC1_WAITI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY },
|
||||
{ IIC1_DTEI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY },
|
||||
|
||||
/* SIOF */
|
||||
{ SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY },
|
||||
|
||||
/* SIU */
|
||||
{ SIU_IRQ, SIU_IPR_ADDR, SIU_IPR_POS, SIU_PRIORITY },
|
||||
|
||||
/* VIO interrupt */
|
||||
{ CEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY },
|
||||
{ BEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY },
|
||||
{ VEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY },
|
||||
|
||||
/*MFI interrupt*/
|
||||
|
||||
{ MFI_IRQ, MFI_IPR_ADDR, MFI_IPR_POS, MFI_PRIORITY },
|
||||
|
||||
/* LCD controller */
|
||||
{ LCDC_IRQ, LCDC_IPR_ADDR, LCDC_IPR_POS, LCDC_PRIORITY },
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialize IRQ setting
|
||||
*/
|
||||
void __init
|
||||
init_7343se_IRQ(void)
|
||||
void __init init_7343se_IRQ(void)
|
||||
{
|
||||
/* Setup Multiplexed interrupts */
|
||||
ctrl_outw(8, PA_CPLD_MODESET); /* Set all CPLD interrupts to active
|
||||
* low.
|
||||
*/
|
||||
/* Mask all CPLD controller interrupts */
|
||||
ctrl_outw(0x0fff, PA_CPLD_IMSK);
|
||||
int i;
|
||||
|
||||
/* PC Card interrupts */
|
||||
make_intreq_irq(PC_IRQ0);
|
||||
make_intreq_irq(PC_IRQ1);
|
||||
make_intreq_irq(PC_IRQ2);
|
||||
make_intreq_irq(PC_IRQ3);
|
||||
ctrl_outw(0, PA_CPLD_IMSK); /* disable all irqs */
|
||||
ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */
|
||||
|
||||
/* Extension Slot Interrupts */
|
||||
make_intreq_irq(EXT_IRQ0);
|
||||
make_intreq_irq(EXT_IRQ1);
|
||||
make_intreq_irq(EXT_IRQ2);
|
||||
make_intreq_irq(EXT_IRQ3);
|
||||
for (i = 0; i < SE7343_FPGA_IRQ_NR; i++)
|
||||
set_irq_chip_and_handler_name(SE7343_FPGA_IRQ_BASE + i,
|
||||
&se7343_irq_chip,
|
||||
handle_level_irq, "level");
|
||||
|
||||
/* USB Controller interrupts */
|
||||
make_intreq_irq(USB_IRQ0);
|
||||
make_intreq_irq(USB_IRQ1);
|
||||
|
||||
/* Serial Controller interrupts */
|
||||
make_intreq_irq(UART_IRQ0);
|
||||
make_intreq_irq(UART_IRQ1);
|
||||
|
||||
/* Setup all external interrupts to be active low */
|
||||
ctrl_outw(0xaaaa, INTC_ICR1);
|
||||
|
||||
make_ipr_irq(se7343_irq5_ipr_map, ARRAY_SIZE(se7343_irq5_ipr_map));
|
||||
|
||||
setup_irq(IRQ5_IRQ, &irq5);
|
||||
/* Set port control to use IRQ5 */
|
||||
*(u16 *)0xA4050108 &= ~0xc;
|
||||
|
||||
make_ipr_irq(se7343_siof0_vpu_ipr_map, ARRAY_SIZE(se7343_siof0_vpu_ipr_map));
|
||||
|
||||
ctrl_outb(0x0f, INTC_IMCR5); /* enable SCIF IRQ */
|
||||
|
||||
make_ipr_irq(se7343_other_ipr_map, ARRAY_SIZE(se7343_other_ipr_map));
|
||||
|
||||
ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */
|
||||
set_irq_chained_handler(IRQ0_IRQ, se7343_irq_demux);
|
||||
set_irq_type(IRQ0_IRQ, IRQ_TYPE_LEVEL_LOW);
|
||||
set_irq_chained_handler(IRQ1_IRQ, se7343_irq_demux);
|
||||
set_irq_type(IRQ1_IRQ, IRQ_TYPE_LEVEL_LOW);
|
||||
set_irq_chained_handler(IRQ4_IRQ, se7343_irq_demux);
|
||||
set_irq_type(IRQ4_IRQ, IRQ_TYPE_LEVEL_LOW);
|
||||
set_irq_chained_handler(IRQ5_IRQ, se7343_irq_demux);
|
||||
set_irq_type(IRQ5_IRQ, IRQ_TYPE_LEVEL_LOW);
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/mach/se7343.h>
|
||||
#include <asm/heartbeat.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
void init_7343se_IRQ(void);
|
||||
#include <asm/io.h>
|
||||
|
||||
static struct resource smc91x_resources[] = {
|
||||
[0] = {
|
||||
@ -17,8 +18,8 @@ static struct resource smc91x_resources[] = {
|
||||
* shared with other devices via externel
|
||||
* interrupt controller in FPGA...
|
||||
*/
|
||||
.start = EXT_IRQ2,
|
||||
.end = EXT_IRQ2,
|
||||
.start = SMC_IRQ,
|
||||
.end = SMC_IRQ,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
@ -38,16 +39,65 @@ static struct resource heartbeat_resources[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct heartbeat_data heartbeat_data = {
|
||||
.regsize = 16,
|
||||
};
|
||||
|
||||
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 mtd_partition nor_flash_partitions[] = {
|
||||
{
|
||||
.name = "loader",
|
||||
.offset = 0x00000000,
|
||||
.size = 128 * 1024,
|
||||
},
|
||||
{
|
||||
.name = "rootfs",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = 31 * 1024 * 1024,
|
||||
},
|
||||
{
|
||||
.name = "data",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data nor_flash_data = {
|
||||
.width = 2,
|
||||
.parts = nor_flash_partitions,
|
||||
.nr_parts = ARRAY_SIZE(nor_flash_partitions),
|
||||
};
|
||||
|
||||
static struct resource nor_flash_resources[] = {
|
||||
[0] = {
|
||||
.start = 0x00000000,
|
||||
.end = 0x01ffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device nor_flash_device = {
|
||||
.name = "physmap-flash",
|
||||
.dev = {
|
||||
.platform_data = &nor_flash_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(nor_flash_resources),
|
||||
.resource = nor_flash_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *sh7343se_platform_devices[] __initdata = {
|
||||
&smc91x_device,
|
||||
&heartbeat_device,
|
||||
&nor_flash_device,
|
||||
};
|
||||
|
||||
static int __init sh7343se_devices_setup(void)
|
||||
@ -55,10 +105,19 @@ static int __init sh7343se_devices_setup(void)
|
||||
return platform_add_devices(sh7343se_platform_devices,
|
||||
ARRAY_SIZE(sh7343se_platform_devices));
|
||||
}
|
||||
device_initcall(sh7343se_devices_setup);
|
||||
|
||||
/*
|
||||
* Initialize the board
|
||||
*/
|
||||
static void __init sh7343se_setup(char **cmdline_p)
|
||||
{
|
||||
device_initcall(sh7343se_devices_setup);
|
||||
ctrl_outw(0xf900, FPGA_OUT); /* FPGA */
|
||||
|
||||
ctrl_outw(0x0002, PORT_PECR); /* PORT E 1 = IRQ5 */
|
||||
ctrl_outw(0x0020, PORT_PSELD);
|
||||
|
||||
printk(KERN_INFO "MS7343CP01 Setup...done\n");
|
||||
}
|
||||
|
||||
/*
|
||||
@ -90,5 +149,4 @@ static struct sh_machine_vector mv_7343se __initmv = {
|
||||
.mv_outsl = sh7343se_outsl,
|
||||
|
||||
.mv_init_irq = init_7343se_IRQ,
|
||||
.mv_irq_demux = shmse_irq_demux,
|
||||
};
|
||||
|
@ -1,25 +1,13 @@
|
||||
/* $Id: io.c,v 1.7 2006/02/05 21:55:29 lethal Exp $
|
||||
*
|
||||
* linux/arch/sh/kernel/io_se.c
|
||||
*
|
||||
/*
|
||||
* Copyright (C) 2000 Kazumoto Kojima
|
||||
*
|
||||
* I/O routine for Hitachi SolutionEngine.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/se.h>
|
||||
|
||||
/* SH pcmcia io window base, start and end. */
|
||||
int sh_pcic_io_wbase = 0xb8400000;
|
||||
int sh_pcic_io_start;
|
||||
int sh_pcic_io_stop;
|
||||
int sh_pcic_io_type;
|
||||
int sh_pcic_io_dummy;
|
||||
|
||||
/* MS7750 requires special versions of in*, out* routines, since
|
||||
PC-like io ports are located at upper half byte of 16-bit word which
|
||||
can be accessed only with 16-bit wide. */
|
||||
@ -33,8 +21,6 @@ port2adr(unsigned int port)
|
||||
return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000));
|
||||
else if (port >= 0x1000)
|
||||
return (volatile __u16 *) (PA_83902 + (port << 1));
|
||||
else if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop)
|
||||
return (volatile __u16 *) (sh_pcic_io_wbase + (port &~ 1));
|
||||
else
|
||||
return (volatile __u16 *) (PA_SUPERIO + (port << 1));
|
||||
}
|
||||
@ -51,32 +37,27 @@ shifted_port(unsigned long port)
|
||||
|
||||
unsigned char se_inb(unsigned long port)
|
||||
{
|
||||
if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop)
|
||||
return *(__u8 *) (sh_pcic_io_wbase + 0x40000 + port);
|
||||
else if (shifted_port(port))
|
||||
return (*port2adr(port) >> 8);
|
||||
if (shifted_port(port))
|
||||
return (*port2adr(port) >> 8);
|
||||
else
|
||||
return (*port2adr(port))&0xff;
|
||||
return (*port2adr(port))&0xff;
|
||||
}
|
||||
|
||||
unsigned char se_inb_p(unsigned long port)
|
||||
{
|
||||
unsigned long v;
|
||||
|
||||
if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop)
|
||||
v = *(__u8 *) (sh_pcic_io_wbase + 0x40000 + port);
|
||||
else if (shifted_port(port))
|
||||
v = (*port2adr(port) >> 8);
|
||||
if (shifted_port(port))
|
||||
v = (*port2adr(port) >> 8);
|
||||
else
|
||||
v = (*port2adr(port))&0xff;
|
||||
v = (*port2adr(port))&0xff;
|
||||
ctrl_delay();
|
||||
return v;
|
||||
}
|
||||
|
||||
unsigned short se_inw(unsigned long port)
|
||||
{
|
||||
if (port >= 0x2000 ||
|
||||
(sh_pcic_io_start <= port && port <= sh_pcic_io_stop))
|
||||
if (port >= 0x2000)
|
||||
return *port2adr(port);
|
||||
else
|
||||
maybebadio(port);
|
||||
@ -91,9 +72,7 @@ unsigned int se_inl(unsigned long port)
|
||||
|
||||
void se_outb(unsigned char value, unsigned long port)
|
||||
{
|
||||
if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop)
|
||||
*(__u8 *)(sh_pcic_io_wbase + port) = value;
|
||||
else if (shifted_port(port))
|
||||
if (shifted_port(port))
|
||||
*(port2adr(port)) = value << 8;
|
||||
else
|
||||
*(port2adr(port)) = value;
|
||||
@ -101,9 +80,7 @@ void se_outb(unsigned char value, unsigned long port)
|
||||
|
||||
void se_outb_p(unsigned char value, unsigned long port)
|
||||
{
|
||||
if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop)
|
||||
*(__u8 *)(sh_pcic_io_wbase + port) = value;
|
||||
else if (shifted_port(port))
|
||||
if (shifted_port(port))
|
||||
*(port2adr(port)) = value << 8;
|
||||
else
|
||||
*(port2adr(port)) = value;
|
||||
@ -112,8 +89,7 @@ void se_outb_p(unsigned char value, unsigned long port)
|
||||
|
||||
void se_outw(unsigned short value, unsigned long port)
|
||||
{
|
||||
if (port >= 0x2000 ||
|
||||
(sh_pcic_io_start <= port && port <= sh_pcic_io_stop))
|
||||
if (port >= 0x2000)
|
||||
*port2adr(port) = value;
|
||||
else
|
||||
maybebadio(port);
|
||||
@ -129,11 +105,7 @@ void se_insb(unsigned long port, void *addr, unsigned long count)
|
||||
volatile __u16 *p = port2adr(port);
|
||||
__u8 *ap = addr;
|
||||
|
||||
if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop) {
|
||||
volatile __u8 *bp = (__u8 *) (sh_pcic_io_wbase + 0x40000 + port);
|
||||
while (count--)
|
||||
*ap++ = *bp;
|
||||
} else if (shifted_port(port)) {
|
||||
if (shifted_port(port)) {
|
||||
while (count--)
|
||||
*ap++ = *p >> 8;
|
||||
} else {
|
||||
@ -160,11 +132,7 @@ void se_outsb(unsigned long port, const void *addr, unsigned long count)
|
||||
volatile __u16 *p = port2adr(port);
|
||||
const __u8 *ap = addr;
|
||||
|
||||
if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop) {
|
||||
volatile __u8 *bp = (__u8 *) (sh_pcic_io_wbase + port);
|
||||
while (count--)
|
||||
*bp = *ap++;
|
||||
} else if (shifted_port(port)) {
|
||||
if (shifted_port(port)) {
|
||||
while (count--)
|
||||
*p = *ap++ << 8;
|
||||
} else {
|
||||
@ -177,6 +145,7 @@ void se_outsw(unsigned long port, const void *addr, unsigned long count)
|
||||
{
|
||||
volatile __u16 *p = port2adr(port);
|
||||
const __u16 *ap = addr;
|
||||
|
||||
while (count--)
|
||||
*p = *ap++;
|
||||
}
|
||||
|
@ -14,8 +14,6 @@
|
||||
#include <asm/smc37c93x.h>
|
||||
#include <asm/heartbeat.h>
|
||||
|
||||
void init_se_IRQ(void);
|
||||
|
||||
/*
|
||||
* Configure the Super I/O chip
|
||||
*/
|
||||
@ -73,7 +71,7 @@ static struct resource cf_ide_resources[] = {
|
||||
},
|
||||
[1] = {
|
||||
.start = PA_MRSHPC_IO + 0x1f0 + 0x206,
|
||||
.end = PA_MRSHPC_IO + 0x1f0 +8 + 0x206 + 8,
|
||||
.end = PA_MRSHPC_IO + 0x1f0 + 8 + 0x206 + 8,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[2] = {
|
||||
@ -115,9 +113,58 @@ static struct platform_device heartbeat_device = {
|
||||
.resource = heartbeat_resources,
|
||||
};
|
||||
|
||||
/* SH771X Ethernet driver */
|
||||
static struct resource sh_eth0_resources[] = {
|
||||
[0] = {
|
||||
.start = SH_ETH0_BASE,
|
||||
.end = SH_ETH0_BASE + 0x1B8,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = SH_ETH0_IRQ,
|
||||
.end = SH_ETH0_IRQ,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device sh_eth0_device = {
|
||||
.name = "sh-eth",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = PHY_ID,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(sh_eth0_resources),
|
||||
.resource = sh_eth0_resources,
|
||||
};
|
||||
|
||||
static struct resource sh_eth1_resources[] = {
|
||||
[0] = {
|
||||
.start = SH_ETH1_BASE,
|
||||
.end = SH_ETH1_BASE + 0x1B8,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = SH_ETH1_IRQ,
|
||||
.end = SH_ETH1_IRQ,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device sh_eth1_device = {
|
||||
.name = "sh-eth",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = PHY_ID,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(sh_eth1_resources),
|
||||
.resource = sh_eth1_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *se_devices[] __initdata = {
|
||||
&heartbeat_device,
|
||||
&cf_ide_device,
|
||||
&sh_eth0_device,
|
||||
&sh_eth1_device,
|
||||
};
|
||||
|
||||
static int __init se_devices_setup(void)
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <linux/input.h>
|
||||
#include <linux/smc91x.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/clock.h>
|
||||
#include <asm/se7722.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/heartbeat.h>
|
||||
@ -145,6 +146,8 @@ static struct platform_device *se7722_devices[] __initdata = {
|
||||
|
||||
static int __init se7722_devices_setup(void)
|
||||
{
|
||||
clk_always_enable("mstp214"); /* KEYSC */
|
||||
|
||||
return platform_add_devices(se7722_devices,
|
||||
ARRAY_SIZE(se7722_devices));
|
||||
}
|
||||
@ -154,11 +157,6 @@ static void __init se7722_setup(char **cmdline_p)
|
||||
{
|
||||
ctrl_outw(0x010D, FPGA_OUT); /* FPGA */
|
||||
|
||||
ctrl_outl(0x00051001, MSTPCR0);
|
||||
ctrl_outl(0x00000000, MSTPCR1);
|
||||
/* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC, USB */
|
||||
ctrl_outl(0xffffb7c0, MSTPCR2);
|
||||
|
||||
ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */
|
||||
ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */
|
||||
|
||||
|
@ -40,7 +40,7 @@ KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \
|
||||
KERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x%08x" \
|
||||
$$[$(CONFIG_PAGE_OFFSET) + \
|
||||
$(CONFIG_MEMORY_START) + \
|
||||
$(CONFIG_ZERO_PAGE_OFFSET)+0x1000]')
|
||||
$(CONFIG_ZERO_PAGE_OFFSET) + $(CONFIG_ENTRY_OFFSET)]')
|
||||
|
||||
quiet_cmd_uimage = UIMAGE $@
|
||||
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \
|
||||
|
@ -35,8 +35,7 @@ $(obj)/vmlinux.bin: vmlinux FORCE
|
||||
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,gzip)
|
||||
|
||||
LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh-linux -T
|
||||
OBJCOPYFLAGS += -R .empty_zero_page
|
||||
|
||||
$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
|
||||
$(call if_changed,ld)
|
||||
$(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE
|
||||
$(call if_changed,as_o_S)
|
||||
|
@ -37,8 +37,7 @@ $(obj)/vmlinux.bin: vmlinux FORCE
|
||||
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,gzip)
|
||||
|
||||
LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T
|
||||
OBJCOPYFLAGS += -R .empty_zero_page
|
||||
|
||||
$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
|
||||
$(call if_changed,ld)
|
||||
$(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE
|
||||
$(call if_changed,as_o_S)
|
||||
|
8
arch/sh/boot/compressed/piggy.S
Normal file
8
arch/sh/boot/compressed/piggy.S
Normal file
@ -0,0 +1,8 @@
|
||||
.global input_len, input_data
|
||||
.data
|
||||
input_len:
|
||||
.long input_data_end - input_data
|
||||
input_data:
|
||||
.incbin "arch/sh/boot/compressed/vmlinux.bin.gz"
|
||||
input_data_end:
|
||||
.end
|
@ -1,9 +0,0 @@
|
||||
SECTIONS
|
||||
{
|
||||
.data : {
|
||||
input_len = .;
|
||||
LONG(input_data_end - input_data) input_data = .;
|
||||
*(.data)
|
||||
input_data_end = .;
|
||||
}
|
||||
}
|
947
arch/sh/configs/ap325rxa_defconfig
Normal file
947
arch/sh/configs/ap325rxa_defconfig
Normal file
@ -0,0 +1,947 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.26-rc4
|
||||
# Wed Jun 4 17:30:00 2008
|
||||
#
|
||||
CONFIG_SUPERH=y
|
||||
CONFIG_SUPERH32=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_HARDIRQS=y
|
||||
CONFIG_GENERIC_IRQ_PROBE=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_GENERIC_TIME=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_STACKTRACE_SUPPORT=y
|
||||
CONFIG_LOCKDEP_SUPPORT=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
CONFIG_ARCH_NO_VIRT_TO_BUS=y
|
||||
CONFIG_ARCH_SUPPORTS_AOUT=y
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
|
||||
#
|
||||
# General setup
|
||||
#
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_BROKEN_ON_SMP=y
|
||||
CONFIG_LOCK_KERNEL=y
|
||||
CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||
CONFIG_LOCALVERSION=""
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_SWAP=y
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_SYSVIPC_SYSCTL=y
|
||||
# CONFIG_POSIX_MQUEUE is not set
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
# CONFIG_BSD_PROCESS_ACCT_V3 is not set
|
||||
# CONFIG_TASKSTATS is not set
|
||||
# CONFIG_AUDIT is not set
|
||||
# CONFIG_IKCONFIG is not set
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
# CONFIG_CGROUPS is not set
|
||||
CONFIG_GROUP_SCHED=y
|
||||
CONFIG_FAIR_GROUP_SCHED=y
|
||||
# CONFIG_RT_GROUP_SCHED is not set
|
||||
CONFIG_USER_SCHED=y
|
||||
# CONFIG_CGROUP_SCHED is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
# CONFIG_RELAY is not set
|
||||
# CONFIG_NAMESPACES is not set
|
||||
# CONFIG_BLK_DEV_INITRD is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_SYSCTL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_UID16=y
|
||||
CONFIG_SYSCTL_SYSCALL=y
|
||||
CONFIG_SYSCTL_SYSCALL_CHECK=y
|
||||
# CONFIG_KALLSYMS is not set
|
||||
CONFIG_HOTPLUG=y
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
CONFIG_ELF_CORE=y
|
||||
CONFIG_COMPAT_BRK=y
|
||||
CONFIG_BASE_FULL=y
|
||||
CONFIG_FUTEX=y
|
||||
CONFIG_ANON_INODES=y
|
||||
CONFIG_EPOLL=y
|
||||
CONFIG_SIGNALFD=y
|
||||
CONFIG_TIMERFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_SLAB=y
|
||||
# CONFIG_SLUB is not set
|
||||
# CONFIG_SLOB is not set
|
||||
# CONFIG_PROFILING is not set
|
||||
# CONFIG_MARKERS is not set
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
# CONFIG_HAVE_KPROBES is not set
|
||||
# CONFIG_HAVE_KRETPROBES is not set
|
||||
# CONFIG_HAVE_DMA_ATTRS is not set
|
||||
CONFIG_PROC_PAGE_MONITOR=y
|
||||
CONFIG_SLABINFO=y
|
||||
CONFIG_RT_MUTEXES=y
|
||||
# CONFIG_TINY_SHMEM is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_MODULES=y
|
||||
# CONFIG_MODULE_FORCE_LOAD is not set
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_MODULE_FORCE_UNLOAD is not set
|
||||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
CONFIG_KMOD=y
|
||||
CONFIG_BLOCK=y
|
||||
# CONFIG_LBD is not set
|
||||
# CONFIG_BLK_DEV_IO_TRACE is not set
|
||||
# CONFIG_LSF is not set
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
|
||||
#
|
||||
# IO Schedulers
|
||||
#
|
||||
CONFIG_IOSCHED_NOOP=y
|
||||
CONFIG_IOSCHED_AS=y
|
||||
CONFIG_IOSCHED_DEADLINE=y
|
||||
CONFIG_IOSCHED_CFQ=y
|
||||
# CONFIG_DEFAULT_AS is not set
|
||||
# CONFIG_DEFAULT_DEADLINE is not set
|
||||
CONFIG_DEFAULT_CFQ=y
|
||||
# CONFIG_DEFAULT_NOOP is not set
|
||||
CONFIG_DEFAULT_IOSCHED="cfq"
|
||||
CONFIG_CLASSIC_RCU=y
|
||||
|
||||
#
|
||||
# System type
|
||||
#
|
||||
CONFIG_CPU_SH4=y
|
||||
CONFIG_CPU_SH4A=y
|
||||
CONFIG_CPU_SHX2=y
|
||||
# CONFIG_CPU_SUBTYPE_SH7619 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7203 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7206 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7263 is not set
|
||||
# CONFIG_CPU_SUBTYPE_MXG is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7705 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7706 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7707 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7708 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7709 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7710 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7712 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7720 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7721 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7750 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7091 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7750R is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7750S is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7751 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7751R is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7760 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH4_202 is not set
|
||||
CONFIG_CPU_SUBTYPE_SH7723=y
|
||||
# CONFIG_CPU_SUBTYPE_SH7763 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7770 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7780 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7785 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SHX3 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7343 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7722 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7366 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH5_101 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH5_103 is not set
|
||||
|
||||
#
|
||||
# Memory management options
|
||||
#
|
||||
CONFIG_QUICKLIST=y
|
||||
CONFIG_MMU=y
|
||||
CONFIG_PAGE_OFFSET=0x80000000
|
||||
CONFIG_MEMORY_START=0x08000000
|
||||
CONFIG_MEMORY_SIZE=0x08000000
|
||||
CONFIG_29BIT=y
|
||||
# CONFIG_X2TLB is not set
|
||||
CONFIG_VSYSCALL=y
|
||||
CONFIG_ARCH_FLATMEM_ENABLE=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
|
||||
CONFIG_MAX_ACTIVE_REGIONS=1
|
||||
CONFIG_ARCH_POPULATES_NODE_MAP=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_PAGE_SIZE_4KB=y
|
||||
# CONFIG_PAGE_SIZE_8KB is not set
|
||||
# CONFIG_PAGE_SIZE_16KB is not set
|
||||
# CONFIG_PAGE_SIZE_64KB is not set
|
||||
CONFIG_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_FLATMEM_MANUAL=y
|
||||
# CONFIG_DISCONTIGMEM_MANUAL is not set
|
||||
# CONFIG_SPARSEMEM_MANUAL is not set
|
||||
CONFIG_FLATMEM=y
|
||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||
CONFIG_SPARSEMEM_STATIC=y
|
||||
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
|
||||
CONFIG_PAGEFLAGS_EXTENDED=y
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=4
|
||||
# CONFIG_RESOURCES_64BIT is not set
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
||||
CONFIG_NR_QUICK=2
|
||||
|
||||
#
|
||||
# Cache configuration
|
||||
#
|
||||
# CONFIG_SH_DIRECT_MAPPED is not set
|
||||
CONFIG_CACHE_WRITEBACK=y
|
||||
# CONFIG_CACHE_WRITETHROUGH is not set
|
||||
# CONFIG_CACHE_OFF is not set
|
||||
|
||||
#
|
||||
# Processor features
|
||||
#
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
CONFIG_SH_FPU=y
|
||||
# CONFIG_SH_STORE_QUEUES is not set
|
||||
CONFIG_CPU_HAS_INTEVT=y
|
||||
CONFIG_CPU_HAS_SR_RB=y
|
||||
CONFIG_CPU_HAS_PTEA=y
|
||||
CONFIG_CPU_HAS_FPU=y
|
||||
|
||||
#
|
||||
# Board support
|
||||
#
|
||||
CONFIG_SH_AP325RXA=y
|
||||
|
||||
#
|
||||
# Timer and clock configuration
|
||||
#
|
||||
CONFIG_SH_TMU=y
|
||||
CONFIG_SH_TIMER_IRQ=16
|
||||
CONFIG_SH_PCLK_FREQ=33333333
|
||||
CONFIG_TICK_ONESHOT=y
|
||||
# CONFIG_NO_HZ is not set
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
|
||||
|
||||
#
|
||||
# CPU Frequency scaling
|
||||
#
|
||||
# CONFIG_CPU_FREQ is not set
|
||||
|
||||
#
|
||||
# DMA support
|
||||
#
|
||||
# CONFIG_SH_DMA is not set
|
||||
|
||||
#
|
||||
# Companion Chips
|
||||
#
|
||||
|
||||
#
|
||||
# Additional SuperH Device Drivers
|
||||
#
|
||||
# CONFIG_HEARTBEAT is not set
|
||||
# CONFIG_PUSH_SWITCH is not set
|
||||
|
||||
#
|
||||
# Kernel features
|
||||
#
|
||||
# CONFIG_HZ_100 is not set
|
||||
CONFIG_HZ_250=y
|
||||
# CONFIG_HZ_300 is not set
|
||||
# CONFIG_HZ_1000 is not set
|
||||
CONFIG_HZ=250
|
||||
# CONFIG_SCHED_HRTICK is not set
|
||||
# CONFIG_KEXEC is not set
|
||||
# CONFIG_CRASH_DUMP is not set
|
||||
# CONFIG_PREEMPT_NONE is not set
|
||||
# CONFIG_PREEMPT_VOLUNTARY is not set
|
||||
CONFIG_PREEMPT=y
|
||||
# CONFIG_PREEMPT_RCU is not set
|
||||
CONFIG_GUSA=y
|
||||
|
||||
#
|
||||
# Boot options
|
||||
#
|
||||
CONFIG_ZERO_PAGE_OFFSET=0x00001000
|
||||
CONFIG_BOOT_LINK_OFFSET=0x00800000
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_CMDLINE="console=tty1 console=ttySC5,38400 root=/dev/nfs ip=dhcp"
|
||||
|
||||
#
|
||||
# Bus options
|
||||
#
|
||||
# CONFIG_ARCH_SUPPORTS_MSI is not set
|
||||
# CONFIG_PCCARD is not set
|
||||
|
||||
#
|
||||
# Executable file formats
|
||||
#
|
||||
CONFIG_BINFMT_ELF=y
|
||||
# CONFIG_BINFMT_MISC is not set
|
||||
|
||||
#
|
||||
# Networking
|
||||
#
|
||||
CONFIG_NET=y
|
||||
|
||||
#
|
||||
# Networking options
|
||||
#
|
||||
CONFIG_PACKET=y
|
||||
# CONFIG_PACKET_MMAP is not set
|
||||
CONFIG_UNIX=y
|
||||
# CONFIG_NET_KEY is not set
|
||||
CONFIG_INET=y
|
||||
# CONFIG_IP_MULTICAST is not set
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_ASK_IP_FIB_HASH=y
|
||||
# CONFIG_IP_FIB_TRIE is not set
|
||||
CONFIG_IP_FIB_HASH=y
|
||||
# CONFIG_IP_MULTIPLE_TABLES is not set
|
||||
# CONFIG_IP_ROUTE_MULTIPATH is not set
|
||||
# CONFIG_IP_ROUTE_VERBOSE is not set
|
||||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
# CONFIG_IP_PNP_BOOTP is not set
|
||||
# CONFIG_IP_PNP_RARP is not set
|
||||
# CONFIG_NET_IPIP is not set
|
||||
# CONFIG_NET_IPGRE is not set
|
||||
# CONFIG_ARPD is not set
|
||||
# CONFIG_SYN_COOKIES is not set
|
||||
# CONFIG_INET_AH is not set
|
||||
# CONFIG_INET_ESP is not set
|
||||
# CONFIG_INET_IPCOMP is not set
|
||||
# CONFIG_INET_XFRM_TUNNEL is not set
|
||||
# CONFIG_INET_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_LRO is not set
|
||||
CONFIG_INET_DIAG=y
|
||||
CONFIG_INET_TCP_DIAG=y
|
||||
# CONFIG_TCP_CONG_ADVANCED is not set
|
||||
CONFIG_TCP_CONG_CUBIC=y
|
||||
CONFIG_DEFAULT_TCP_CONG="cubic"
|
||||
# CONFIG_TCP_MD5SIG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_NETWORK_SECMARK is not set
|
||||
# CONFIG_NETFILTER is not set
|
||||
# CONFIG_IP_DCCP is not set
|
||||
# CONFIG_IP_SCTP is not set
|
||||
# CONFIG_TIPC is not set
|
||||
# CONFIG_ATM is not set
|
||||
# CONFIG_BRIDGE is not set
|
||||
# CONFIG_VLAN_8021Q is not set
|
||||
# CONFIG_DECNET is not set
|
||||
# CONFIG_LLC2 is not set
|
||||
# CONFIG_IPX is not set
|
||||
# CONFIG_ATALK is not set
|
||||
# CONFIG_X25 is not set
|
||||
# CONFIG_LAPB is not set
|
||||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
|
||||
#
|
||||
# Network testing
|
||||
#
|
||||
# CONFIG_NET_PKTGEN is not set
|
||||
# CONFIG_HAMRADIO is not set
|
||||
# CONFIG_CAN is not set
|
||||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
# CONFIG_AF_RXRPC is not set
|
||||
|
||||
#
|
||||
# Wireless
|
||||
#
|
||||
# CONFIG_CFG80211 is not set
|
||||
# CONFIG_WIRELESS_EXT is not set
|
||||
# CONFIG_MAC80211 is not set
|
||||
# CONFIG_IEEE80211 is not set
|
||||
# CONFIG_RFKILL is not set
|
||||
# CONFIG_NET_9P is not set
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Generic Driver Options
|
||||
#
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_STANDALONE=y
|
||||
CONFIG_PREVENT_FIRMWARE_BUILD=y
|
||||
CONFIG_FW_LOADER=y
|
||||
# CONFIG_SYS_HYPERVISOR is not set
|
||||
# CONFIG_CONNECTOR is not set
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_MTD_DEBUG is not set
|
||||
CONFIG_MTD_CONCAT=y
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
# CONFIG_MTD_AR7_PARTS is not set
|
||||
|
||||
#
|
||||
# User Modules And Translation Layers
|
||||
#
|
||||
CONFIG_MTD_CHAR=y
|
||||
CONFIG_MTD_BLKDEVS=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
# CONFIG_FTL is not set
|
||||
# CONFIG_NFTL is not set
|
||||
# CONFIG_INFTL is not set
|
||||
# CONFIG_RFD_FTL is not set
|
||||
# CONFIG_SSFDC is not set
|
||||
# CONFIG_MTD_OOPS is not set
|
||||
|
||||
#
|
||||
# RAM/ROM/Flash chip drivers
|
||||
#
|
||||
CONFIG_MTD_CFI=y
|
||||
# CONFIG_MTD_JEDECPROBE is not set
|
||||
CONFIG_MTD_GEN_PROBE=y
|
||||
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_1=y
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_2=y
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_4=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
|
||||
CONFIG_MTD_CFI_I1=y
|
||||
CONFIG_MTD_CFI_I2=y
|
||||
# CONFIG_MTD_CFI_I4 is not set
|
||||
# CONFIG_MTD_CFI_I8 is not set
|
||||
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||
CONFIG_MTD_CFI_AMDSTD=y
|
||||
# CONFIG_MTD_CFI_STAA is not set
|
||||
CONFIG_MTD_CFI_UTIL=y
|
||||
# CONFIG_MTD_RAM is not set
|
||||
# CONFIG_MTD_ROM is not set
|
||||
# CONFIG_MTD_ABSENT is not set
|
||||
|
||||
#
|
||||
# Mapping drivers for chip access
|
||||
#
|
||||
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_PHYSMAP_START=0xffffffff
|
||||
CONFIG_MTD_PHYSMAP_LEN=0
|
||||
CONFIG_MTD_PHYSMAP_BANKWIDTH=0
|
||||
# CONFIG_MTD_PLATRAM is not set
|
||||
|
||||
#
|
||||
# Self-contained MTD device drivers
|
||||
#
|
||||
# CONFIG_MTD_SLRAM is not set
|
||||
# CONFIG_MTD_PHRAM is not set
|
||||
# CONFIG_MTD_MTDRAM is not set
|
||||
# CONFIG_MTD_BLOCK2MTD is not set
|
||||
|
||||
#
|
||||
# Disk-On-Chip Device Drivers
|
||||
#
|
||||
# CONFIG_MTD_DOC2000 is not set
|
||||
# CONFIG_MTD_DOC2001 is not set
|
||||
# CONFIG_MTD_DOC2001PLUS is not set
|
||||
# CONFIG_MTD_NAND is not set
|
||||
# CONFIG_MTD_ONENAND is not set
|
||||
|
||||
#
|
||||
# UBI - Unsorted block images
|
||||
#
|
||||
# CONFIG_MTD_UBI is not set
|
||||
# CONFIG_PARPORT is not set
|
||||
CONFIG_BLK_DEV=y
|
||||
# CONFIG_BLK_DEV_COW_COMMON is not set
|
||||
# CONFIG_BLK_DEV_LOOP is not set
|
||||
# CONFIG_BLK_DEV_NBD is not set
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=4
|
||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
# CONFIG_BLK_DEV_XIP is not set
|
||||
# CONFIG_CDROM_PKTCDVD is not set
|
||||
# CONFIG_ATA_OVER_ETH is not set
|
||||
CONFIG_MISC_DEVICES=y
|
||||
# CONFIG_EEPROM_93CX6 is not set
|
||||
# CONFIG_ENCLOSURE_SERVICES is not set
|
||||
CONFIG_HAVE_IDE=y
|
||||
# CONFIG_IDE is not set
|
||||
|
||||
#
|
||||
# SCSI device support
|
||||
#
|
||||
# CONFIG_RAID_ATTRS is not set
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_DMA=y
|
||||
# CONFIG_SCSI_TGT is not set
|
||||
# CONFIG_SCSI_NETLINK is not set
|
||||
CONFIG_SCSI_PROC_FS=y
|
||||
|
||||
#
|
||||
# SCSI support type (disk, tape, CD-ROM)
|
||||
#
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
# CONFIG_CHR_DEV_ST is not set
|
||||
# CONFIG_CHR_DEV_OSST is not set
|
||||
# CONFIG_BLK_DEV_SR is not set
|
||||
# CONFIG_CHR_DEV_SG is not set
|
||||
# CONFIG_CHR_DEV_SCH is not set
|
||||
|
||||
#
|
||||
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
|
||||
#
|
||||
# CONFIG_SCSI_MULTI_LUN is not set
|
||||
# CONFIG_SCSI_CONSTANTS is not set
|
||||
# CONFIG_SCSI_LOGGING is not set
|
||||
# CONFIG_SCSI_SCAN_ASYNC is not set
|
||||
CONFIG_SCSI_WAIT_SCAN=m
|
||||
|
||||
#
|
||||
# SCSI Transports
|
||||
#
|
||||
# CONFIG_SCSI_SPI_ATTRS is not set
|
||||
# CONFIG_SCSI_FC_ATTRS is not set
|
||||
# CONFIG_SCSI_ISCSI_ATTRS is not set
|
||||
# CONFIG_SCSI_SAS_LIBSAS is not set
|
||||
# CONFIG_SCSI_SRP_ATTRS is not set
|
||||
CONFIG_SCSI_LOWLEVEL=y
|
||||
# CONFIG_ISCSI_TCP is not set
|
||||
# CONFIG_SCSI_DEBUG is not set
|
||||
# CONFIG_ATA is not set
|
||||
# CONFIG_MD is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
# CONFIG_NETDEVICES_MULTIQUEUE is not set
|
||||
# CONFIG_DUMMY is not set
|
||||
# CONFIG_BONDING is not set
|
||||
# CONFIG_MACVLAN is not set
|
||||
# CONFIG_EQUALIZER is not set
|
||||
# CONFIG_TUN is not set
|
||||
# CONFIG_VETH is not set
|
||||
# CONFIG_PHYLIB is not set
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_MII=y
|
||||
# CONFIG_AX88796 is not set
|
||||
# CONFIG_STNIC is not set
|
||||
# CONFIG_SMC91X is not set
|
||||
CONFIG_SMC911X=y
|
||||
# CONFIG_IBM_NEW_EMAC_ZMII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_RGMII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_TAH is not set
|
||||
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
|
||||
# CONFIG_B44 is not set
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
|
||||
#
|
||||
# Wireless LAN
|
||||
#
|
||||
# CONFIG_WLAN_PRE80211 is not set
|
||||
# CONFIG_WLAN_80211 is not set
|
||||
# CONFIG_IWLWIFI_LEDS is not set
|
||||
# CONFIG_WAN is not set
|
||||
# CONFIG_PPP is not set
|
||||
# CONFIG_SLIP is not set
|
||||
# CONFIG_NETCONSOLE is not set
|
||||
# CONFIG_NETPOLL is not set
|
||||
# CONFIG_NET_POLL_CONTROLLER is not set
|
||||
# CONFIG_ISDN is not set
|
||||
# CONFIG_PHONE is not set
|
||||
|
||||
#
|
||||
# Input device support
|
||||
#
|
||||
CONFIG_INPUT=y
|
||||
# CONFIG_INPUT_FF_MEMLESS is not set
|
||||
# CONFIG_INPUT_POLLDEV is not set
|
||||
|
||||
#
|
||||
# Userland interfaces
|
||||
#
|
||||
# CONFIG_INPUT_MOUSEDEV is not set
|
||||
# CONFIG_INPUT_JOYDEV is not set
|
||||
# CONFIG_INPUT_EVDEV is not set
|
||||
# CONFIG_INPUT_EVBUG is not set
|
||||
|
||||
#
|
||||
# Input Device Drivers
|
||||
#
|
||||
# CONFIG_INPUT_KEYBOARD is not set
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_INPUT_JOYSTICK is not set
|
||||
# CONFIG_INPUT_TABLET is not set
|
||||
# CONFIG_INPUT_TOUCHSCREEN is not set
|
||||
# CONFIG_INPUT_MISC is not set
|
||||
|
||||
#
|
||||
# Hardware I/O ports
|
||||
#
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_GAMEPORT is not set
|
||||
|
||||
#
|
||||
# Character devices
|
||||
#
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_HW_CONSOLE=y
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_DEVKMEM=y
|
||||
# CONFIG_SERIAL_NONSTANDARD is not set
|
||||
|
||||
#
|
||||
# Serial drivers
|
||||
#
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
|
||||
#
|
||||
# Non-8250 serial port support
|
||||
#
|
||||
CONFIG_SERIAL_SH_SCI=y
|
||||
CONFIG_SERIAL_SH_SCI_NR_UARTS=6
|
||||
CONFIG_SERIAL_SH_SCI_CONSOLE=y
|
||||
CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
CONFIG_UNIX98_PTYS=y
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
# CONFIG_IPMI_HANDLER is not set
|
||||
CONFIG_HW_RANDOM=y
|
||||
# CONFIG_R3964 is not set
|
||||
# CONFIG_RAW_DRIVER is not set
|
||||
# CONFIG_TCG_TPM is not set
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
# CONFIG_W1 is not set
|
||||
# CONFIG_POWER_SUPPLY is not set
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_THERMAL is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
|
||||
#
|
||||
# Sonics Silicon Backplane
|
||||
#
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
# CONFIG_SSB is not set
|
||||
|
||||
#
|
||||
# Multifunction device drivers
|
||||
#
|
||||
# CONFIG_MFD_SM501 is not set
|
||||
# CONFIG_HTC_PASIC3 is not set
|
||||
|
||||
#
|
||||
# Multimedia devices
|
||||
#
|
||||
|
||||
#
|
||||
# Multimedia core support
|
||||
#
|
||||
# CONFIG_VIDEO_DEV is not set
|
||||
# CONFIG_DVB_CORE is not set
|
||||
# CONFIG_VIDEO_MEDIA is not set
|
||||
|
||||
#
|
||||
# Multimedia drivers
|
||||
#
|
||||
# CONFIG_DAB is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
#
|
||||
# CONFIG_VGASTATE is not set
|
||||
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
|
||||
# CONFIG_FB is not set
|
||||
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Display device support
|
||||
#
|
||||
# CONFIG_DISPLAY_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Console display driver support
|
||||
#
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
|
||||
#
|
||||
# Sound
|
||||
#
|
||||
# CONFIG_SOUND is not set
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
# CONFIG_MMC is not set
|
||||
# CONFIG_MEMSTICK is not set
|
||||
# CONFIG_NEW_LEDS is not set
|
||||
# CONFIG_ACCESSIBILITY is not set
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
# CONFIG_UIO is not set
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT2_FS_XATTR=y
|
||||
CONFIG_EXT2_FS_POSIX_ACL=y
|
||||
CONFIG_EXT2_FS_SECURITY=y
|
||||
# CONFIG_EXT2_FS_XIP is not set
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT3_FS_XATTR=y
|
||||
CONFIG_EXT3_FS_POSIX_ACL=y
|
||||
CONFIG_EXT3_FS_SECURITY=y
|
||||
# CONFIG_EXT4DEV_FS is not set
|
||||
CONFIG_JBD=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
CONFIG_DNOTIFY=y
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_INOTIFY_USER=y
|
||||
# CONFIG_QUOTA is not set
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
# CONFIG_FUSE_FS is not set
|
||||
|
||||
#
|
||||
# CD-ROM/DVD Filesystems
|
||||
#
|
||||
# CONFIG_ISO9660_FS is not set
|
||||
# CONFIG_UDF_FS is not set
|
||||
|
||||
#
|
||||
# DOS/FAT/NT Filesystems
|
||||
#
|
||||
CONFIG_FAT_FS=y
|
||||
# CONFIG_MSDOS_FS is not set
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_FAT_DEFAULT_CODEPAGE=437
|
||||
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
|
||||
# CONFIG_NTFS_FS is not set
|
||||
|
||||
#
|
||||
# Pseudo filesystems
|
||||
#
|
||||
CONFIG_PROC_FS=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_PROC_SYSCTL=y
|
||||
CONFIG_SYSFS=y
|
||||
CONFIG_TMPFS=y
|
||||
# CONFIG_TMPFS_POSIX_ACL is not set
|
||||
# CONFIG_HUGETLBFS is not set
|
||||
# CONFIG_HUGETLB_PAGE is not set
|
||||
# CONFIG_CONFIGFS_FS is not set
|
||||
|
||||
#
|
||||
# Miscellaneous filesystems
|
||||
#
|
||||
# CONFIG_ADFS_FS is not set
|
||||
# CONFIG_AFFS_FS is not set
|
||||
# CONFIG_HFS_FS is not set
|
||||
# CONFIG_HFSPLUS_FS is not set
|
||||
# CONFIG_BEFS_FS is not set
|
||||
# CONFIG_BFS_FS is not set
|
||||
# CONFIG_EFS_FS is not set
|
||||
# CONFIG_JFFS2_FS is not set
|
||||
# CONFIG_CRAMFS is not set
|
||||
# CONFIG_VXFS_FS is not set
|
||||
# CONFIG_MINIX_FS is not set
|
||||
# CONFIG_HPFS_FS is not set
|
||||
# CONFIG_QNX4FS_FS is not set
|
||||
# CONFIG_ROMFS_FS is not set
|
||||
# CONFIG_SYSV_FS is not set
|
||||
# CONFIG_UFS_FS is not set
|
||||
CONFIG_NETWORK_FILESYSTEMS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3=y
|
||||
# CONFIG_NFS_V3_ACL is not set
|
||||
# CONFIG_NFS_V4 is not set
|
||||
CONFIG_NFSD=y
|
||||
CONFIG_NFSD_V3=y
|
||||
# CONFIG_NFSD_V3_ACL is not set
|
||||
# CONFIG_NFSD_V4 is not set
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_LOCKD=y
|
||||
CONFIG_LOCKD_V4=y
|
||||
CONFIG_EXPORTFS=y
|
||||
CONFIG_NFS_COMMON=y
|
||||
CONFIG_SUNRPC=y
|
||||
# CONFIG_SUNRPC_BIND34 is not set
|
||||
# CONFIG_RPCSEC_GSS_KRB5 is not set
|
||||
# CONFIG_RPCSEC_GSS_SPKM3 is not set
|
||||
# CONFIG_SMB_FS is not set
|
||||
# CONFIG_CIFS is not set
|
||||
# CONFIG_NCP_FS is not set
|
||||
# CONFIG_CODA_FS is not set
|
||||
# CONFIG_AFS_FS is not set
|
||||
|
||||
#
|
||||
# Partition Types
|
||||
#
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_MSDOS_PARTITION=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_DEFAULT="iso8859-1"
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
# CONFIG_NLS_CODEPAGE_737 is not set
|
||||
# CONFIG_NLS_CODEPAGE_775 is not set
|
||||
# CONFIG_NLS_CODEPAGE_850 is not set
|
||||
# CONFIG_NLS_CODEPAGE_852 is not set
|
||||
# CONFIG_NLS_CODEPAGE_855 is not set
|
||||
# CONFIG_NLS_CODEPAGE_857 is not set
|
||||
# CONFIG_NLS_CODEPAGE_860 is not set
|
||||
# CONFIG_NLS_CODEPAGE_861 is not set
|
||||
# CONFIG_NLS_CODEPAGE_862 is not set
|
||||
# CONFIG_NLS_CODEPAGE_863 is not set
|
||||
# CONFIG_NLS_CODEPAGE_864 is not set
|
||||
# CONFIG_NLS_CODEPAGE_865 is not set
|
||||
# CONFIG_NLS_CODEPAGE_866 is not set
|
||||
# CONFIG_NLS_CODEPAGE_869 is not set
|
||||
# CONFIG_NLS_CODEPAGE_936 is not set
|
||||
# CONFIG_NLS_CODEPAGE_950 is not set
|
||||
CONFIG_NLS_CODEPAGE_932=y
|
||||
# CONFIG_NLS_CODEPAGE_949 is not set
|
||||
# CONFIG_NLS_CODEPAGE_874 is not set
|
||||
# CONFIG_NLS_ISO8859_8 is not set
|
||||
# CONFIG_NLS_CODEPAGE_1250 is not set
|
||||
# CONFIG_NLS_CODEPAGE_1251 is not set
|
||||
# CONFIG_NLS_ASCII is not set
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
# CONFIG_NLS_ISO8859_2 is not set
|
||||
# CONFIG_NLS_ISO8859_3 is not set
|
||||
# CONFIG_NLS_ISO8859_4 is not set
|
||||
# CONFIG_NLS_ISO8859_5 is not set
|
||||
# CONFIG_NLS_ISO8859_6 is not set
|
||||
# CONFIG_NLS_ISO8859_7 is not set
|
||||
# CONFIG_NLS_ISO8859_9 is not set
|
||||
# CONFIG_NLS_ISO8859_13 is not set
|
||||
# CONFIG_NLS_ISO8859_14 is not set
|
||||
# CONFIG_NLS_ISO8859_15 is not set
|
||||
# CONFIG_NLS_KOI8_R is not set
|
||||
# CONFIG_NLS_KOI8_U is not set
|
||||
# CONFIG_NLS_UTF8 is not set
|
||||
# CONFIG_DLM is not set
|
||||
|
||||
#
|
||||
# Kernel hacking
|
||||
#
|
||||
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
|
||||
# CONFIG_PRINTK_TIME is not set
|
||||
CONFIG_ENABLE_WARN_DEPRECATED=y
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
CONFIG_FRAME_WARN=1024
|
||||
# CONFIG_MAGIC_SYSRQ is not set
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
# CONFIG_HEADERS_CHECK is not set
|
||||
# CONFIG_DEBUG_KERNEL is not set
|
||||
# CONFIG_DEBUG_BUGVERBOSE is not set
|
||||
# CONFIG_SAMPLES is not set
|
||||
# CONFIG_SH_STANDARD_BIOS is not set
|
||||
# CONFIG_EARLY_SCIF_CONSOLE is not set
|
||||
# CONFIG_SH_KGDB is not set
|
||||
|
||||
#
|
||||
# Security options
|
||||
#
|
||||
# CONFIG_KEYS is not set
|
||||
# CONFIG_SECURITY is not set
|
||||
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
|
||||
CONFIG_CRYPTO=y
|
||||
|
||||
#
|
||||
# Crypto core or helper
|
||||
#
|
||||
CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_BLKCIPHER=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
# CONFIG_CRYPTO_GF128MUL is not set
|
||||
# CONFIG_CRYPTO_NULL is not set
|
||||
# CONFIG_CRYPTO_CRYPTD is not set
|
||||
# CONFIG_CRYPTO_AUTHENC is not set
|
||||
# CONFIG_CRYPTO_TEST is not set
|
||||
|
||||
#
|
||||
# Authenticated Encryption with Associated Data
|
||||
#
|
||||
# CONFIG_CRYPTO_CCM is not set
|
||||
# CONFIG_CRYPTO_GCM is not set
|
||||
# CONFIG_CRYPTO_SEQIV is not set
|
||||
|
||||
#
|
||||
# Block modes
|
||||
#
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
# CONFIG_CRYPTO_CTR is not set
|
||||
# CONFIG_CRYPTO_CTS is not set
|
||||
# CONFIG_CRYPTO_ECB is not set
|
||||
# CONFIG_CRYPTO_LRW is not set
|
||||
# CONFIG_CRYPTO_PCBC is not set
|
||||
# CONFIG_CRYPTO_XTS is not set
|
||||
|
||||
#
|
||||
# Hash modes
|
||||
#
|
||||
# CONFIG_CRYPTO_HMAC is not set
|
||||
# CONFIG_CRYPTO_XCBC is not set
|
||||
|
||||
#
|
||||
# Digest
|
||||
#
|
||||
# CONFIG_CRYPTO_CRC32C is not set
|
||||
# CONFIG_CRYPTO_MD4 is not set
|
||||
# CONFIG_CRYPTO_MD5 is not set
|
||||
# CONFIG_CRYPTO_MICHAEL_MIC is not set
|
||||
# CONFIG_CRYPTO_SHA1 is not set
|
||||
# CONFIG_CRYPTO_SHA256 is not set
|
||||
# CONFIG_CRYPTO_SHA512 is not set
|
||||
# CONFIG_CRYPTO_TGR192 is not set
|
||||
# CONFIG_CRYPTO_WP512 is not set
|
||||
|
||||
#
|
||||
# Ciphers
|
||||
#
|
||||
# CONFIG_CRYPTO_AES is not set
|
||||
# CONFIG_CRYPTO_ANUBIS is not set
|
||||
# CONFIG_CRYPTO_ARC4 is not set
|
||||
# CONFIG_CRYPTO_BLOWFISH is not set
|
||||
# CONFIG_CRYPTO_CAMELLIA is not set
|
||||
# CONFIG_CRYPTO_CAST5 is not set
|
||||
# CONFIG_CRYPTO_CAST6 is not set
|
||||
# CONFIG_CRYPTO_DES is not set
|
||||
# CONFIG_CRYPTO_FCRYPT is not set
|
||||
# CONFIG_CRYPTO_KHAZAD is not set
|
||||
# CONFIG_CRYPTO_SALSA20 is not set
|
||||
# CONFIG_CRYPTO_SEED is not set
|
||||
# CONFIG_CRYPTO_SERPENT is not set
|
||||
# CONFIG_CRYPTO_TEA is not set
|
||||
# CONFIG_CRYPTO_TWOFISH is not set
|
||||
|
||||
#
|
||||
# Compression
|
||||
#
|
||||
# CONFIG_CRYPTO_DEFLATE is not set
|
||||
# CONFIG_CRYPTO_LZO is not set
|
||||
CONFIG_CRYPTO_HW=y
|
||||
|
||||
#
|
||||
# Library routines
|
||||
#
|
||||
CONFIG_BITREVERSE=y
|
||||
# CONFIG_GENERIC_FIND_FIRST_BIT is not set
|
||||
# CONFIG_CRC_CCITT is not set
|
||||
# CONFIG_CRC16 is not set
|
||||
# CONFIG_CRC_ITU_T is not set
|
||||
CONFIG_CRC32=y
|
||||
# CONFIG_CRC7 is not set
|
||||
# CONFIG_LIBCRC32C is not set
|
||||
CONFIG_PLIST=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_DMA=y
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1052
arch/sh/configs/sh7763rdp_defconfig
Normal file
1052
arch/sh/configs/sh7763rdp_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
1388
arch/sh/configs/sh7785lcr_defconfig
Normal file
1388
arch/sh/configs/sh7785lcr_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
@ -23,3 +23,4 @@ obj-$(CONFIG_SH_LANDISK) += ops-landisk.o
|
||||
obj-$(CONFIG_SH_LBOX_RE2) += ops-lboxre2.o fixups-lboxre2.o
|
||||
obj-$(CONFIG_SH_7780_SOLUTION_ENGINE) += ops-se7780.o fixups-se7780.o
|
||||
obj-$(CONFIG_SH_CAYMAN) += ops-cayman.o
|
||||
obj-$(CONFIG_SH_SH7785LCR) += ops-sh7785lcr.o fixups-sh7785lcr.o
|
||||
|
46
arch/sh/drivers/pci/fixups-sh7785lcr.c
Normal file
46
arch/sh/drivers/pci/fixups-sh7785lcr.c
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* arch/sh/drivers/pci/fixups-sh7785lcr.c
|
||||
*
|
||||
* R0P7785LC0011RL PCI fixups
|
||||
* Copyright (C) 2008 Yoshihiro Shimoda
|
||||
*
|
||||
* Based on arch/sh/drivers/pci/fixups-r7780rp.c
|
||||
* Copyright (C) 2003 Lineo uSolutions, Inc.
|
||||
* Copyright (C) 2004 - 2006 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/pci.h>
|
||||
#include "pci-sh4.h"
|
||||
|
||||
int pci_fixup_pcic(void)
|
||||
{
|
||||
pci_write_reg(0x000043ff, SH4_PCIINTM);
|
||||
pci_write_reg(0x0000380f, SH4_PCIAINTM);
|
||||
|
||||
pci_write_reg(0xfbb00047, SH7780_PCICMD);
|
||||
pci_write_reg(0x00000000, SH7780_PCIIBAR);
|
||||
|
||||
pci_write_reg(0x00011912, SH7780_PCISVID);
|
||||
pci_write_reg(0x08000000, SH7780_PCICSCR0);
|
||||
pci_write_reg(0x0000001b, SH7780_PCICSAR0);
|
||||
pci_write_reg(0xfd000000, SH7780_PCICSCR1);
|
||||
pci_write_reg(0x0000000f, SH7780_PCICSAR1);
|
||||
|
||||
pci_write_reg(0xfd000000, SH7780_PCIMBR0);
|
||||
pci_write_reg(0x00fc0000, SH7780_PCIMBMR0);
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
pci_write_reg(0xc0000000, SH7780_PCIMBR2);
|
||||
pci_write_reg(0x20000000 - SH7780_PCI_IO_SIZE, SH7780_PCIMBMR2);
|
||||
#endif
|
||||
|
||||
/* Set IOBR for windows containing area specified in pci.h */
|
||||
pci_write_reg((PCIBIOS_MIN_IO & ~(SH7780_PCI_IO_SIZE - 1)),
|
||||
SH7780_PCIIOBR);
|
||||
pci_write_reg(((SH7780_PCI_IO_SIZE - 1) & (7 << 18)), SH7780_PCIIOBMR);
|
||||
|
||||
return 0;
|
||||
}
|
@ -22,6 +22,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
@ -48,6 +49,7 @@ struct pci_channel board_pci_channels[] = {
|
||||
&gapspci_mem_resource, 0, 1 },
|
||||
{ 0, }
|
||||
};
|
||||
EXPORT_SYMBOL(board_pci_channels);
|
||||
|
||||
/*
|
||||
* The !gapspci_config_access case really shouldn't happen, ever, unless
|
||||
|
66
arch/sh/drivers/pci/ops-sh7785lcr.c
Normal file
66
arch/sh/drivers/pci/ops-sh7785lcr.c
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Author: Ian DaSilva (idasilva@mvista.com)
|
||||
*
|
||||
* Highly leveraged from pci-bigsur.c, written by Dustin McIntire.
|
||||
*
|
||||
* May be copied or modified under the terms of the GNU General Public
|
||||
* License. See linux/COPYING for more information.
|
||||
*
|
||||
* PCI initialization for the Renesas R0P7785LC0011RL board
|
||||
* Based on arch/sh/drivers/pci/ops-r7780rp.c
|
||||
*
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/pci.h>
|
||||
#include "pci-sh4.h"
|
||||
|
||||
static char irq_tab[] __initdata = {
|
||||
65, 66, 67, 68,
|
||||
};
|
||||
|
||||
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
{
|
||||
return irq_tab[slot];
|
||||
}
|
||||
|
||||
static struct resource sh7785_io_resource = {
|
||||
.name = "SH7785_IO",
|
||||
.start = SH7780_PCI_IO_BASE,
|
||||
.end = SH7780_PCI_IO_BASE + SH7780_PCI_IO_SIZE - 1,
|
||||
.flags = IORESOURCE_IO
|
||||
};
|
||||
|
||||
static struct resource sh7785_mem_resource = {
|
||||
.name = "SH7785_mem",
|
||||
.start = SH7780_PCI_MEMORY_BASE,
|
||||
.end = SH7780_PCI_MEMORY_BASE + SH7780_PCI_MEM_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM
|
||||
};
|
||||
|
||||
struct pci_channel board_pci_channels[] = {
|
||||
{ &sh4_pci_ops, &sh7785_io_resource, &sh7785_mem_resource, 0, 0xff },
|
||||
{ NULL, NULL, NULL, 0, 0 },
|
||||
};
|
||||
EXPORT_SYMBOL(board_pci_channels);
|
||||
|
||||
static struct sh4_pci_address_map sh7785_pci_map = {
|
||||
.window0 = {
|
||||
.base = SH7780_CS2_BASE_ADDR,
|
||||
.size = 0x04000000,
|
||||
},
|
||||
|
||||
.window1 = {
|
||||
.base = SH7780_CS3_BASE_ADDR,
|
||||
.size = 0x04000000,
|
||||
},
|
||||
|
||||
.flags = SH4_PCIC_NO_RESET,
|
||||
};
|
||||
|
||||
int __init pcibios_init_platform(void)
|
||||
{
|
||||
return sh7780_pcic_init(&sh7785_pci_map);
|
||||
}
|
@ -78,7 +78,7 @@ static struct pci_dev *fake_pci_dev(struct pci_channel *hose,
|
||||
}
|
||||
|
||||
#define EARLY_PCI_OP(rw, size, type) \
|
||||
int early_##rw##_config_##size(struct pci_channel *hose, \
|
||||
static int early_##rw##_config_##size(struct pci_channel *hose, \
|
||||
int top_bus, int bus, int devfn, int offset, type value) \
|
||||
{ \
|
||||
return pci_##rw##_config_##size( \
|
||||
|
@ -135,7 +135,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
|
||||
* If we set up a device for bus mastering, we need to check and set
|
||||
* the latency timer as it may not be properly set.
|
||||
*/
|
||||
unsigned int pcibios_max_latency = 255;
|
||||
static unsigned int pcibios_max_latency = 255;
|
||||
|
||||
void pcibios_set_master(struct pci_dev *dev)
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
|
||||
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
|
||||
obj-$(CONFIG_PM) += pm.o
|
||||
obj-$(CONFIG_STACKTRACE) += stacktrace.o
|
||||
obj-$(CONFIG_BINFMT_ELF) += dump_task.o
|
||||
obj-$(CONFIG_ELF_CORE) += dump_task.o
|
||||
obj-$(CONFIG_IO_TRAPPED) += io_trapped.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
|
@ -157,7 +157,7 @@ static int __init cf_init_se(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
int __init cf_init(void)
|
||||
static int __init cf_init(void)
|
||||
{
|
||||
if (mach_is_se() || mach_is_7722se() || mach_is_7721se())
|
||||
return cf_init_se();
|
||||
|
@ -88,7 +88,7 @@ static void propagate_rate(struct clk *clk)
|
||||
}
|
||||
}
|
||||
|
||||
int __clk_enable(struct clk *clk)
|
||||
static int __clk_enable(struct clk *clk)
|
||||
{
|
||||
/*
|
||||
* See if this is the first time we're enabling the clock, some
|
||||
@ -111,7 +111,6 @@ int __clk_enable(struct clk *clk)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__clk_enable);
|
||||
|
||||
int clk_enable(struct clk *clk)
|
||||
{
|
||||
@ -131,7 +130,7 @@ static void clk_kref_release(struct kref *kref)
|
||||
/* Nothing to do */
|
||||
}
|
||||
|
||||
void __clk_disable(struct clk *clk)
|
||||
static void __clk_disable(struct clk *clk)
|
||||
{
|
||||
int count = kref_put(&clk->kref, clk_kref_release);
|
||||
|
||||
@ -143,7 +142,6 @@ void __clk_disable(struct clk *clk)
|
||||
clk->ops->disable(clk);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__clk_disable);
|
||||
|
||||
void clk_disable(struct clk *clk)
|
||||
{
|
||||
@ -310,15 +308,11 @@ static int show_clocks(char *buf, char **start, off_t off,
|
||||
list_for_each_entry_reverse(clk, &clock_list, node) {
|
||||
unsigned long rate = clk_get_rate(clk);
|
||||
|
||||
/*
|
||||
* Don't bother listing dummy clocks with no ancestry
|
||||
* that only support enable and disable ops.
|
||||
*/
|
||||
if (unlikely(!rate && !clk->parent))
|
||||
continue;
|
||||
|
||||
p += sprintf(p, "%-12s\t: %ld.%02ldMHz\n", clk->name,
|
||||
rate / 1000000, (rate % 1000000) / 10000);
|
||||
p += sprintf(p, "%-12s\t: %ld.%02ldMHz\t%s\n", clk->name,
|
||||
rate / 1000000, (rate % 1000000) / 10000,
|
||||
((clk->flags & CLK_ALWAYS_ENABLED) ||
|
||||
(atomic_read(&clk->kref.refcount) != 1)) ?
|
||||
"enabled" : "disabled");
|
||||
}
|
||||
|
||||
return p - buf;
|
||||
|
@ -62,7 +62,7 @@ struct intc_desc_int {
|
||||
#endif
|
||||
|
||||
static unsigned int intc_prio_level[NR_IRQS]; /* for now */
|
||||
#ifdef CONFIG_CPU_SH3
|
||||
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
|
||||
static unsigned long ack_handle[NR_IRQS];
|
||||
#endif
|
||||
|
||||
@ -231,7 +231,7 @@ static void intc_disable(unsigned int irq)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CPU_SH3
|
||||
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
|
||||
static void intc_mask_ack(unsigned int irq)
|
||||
{
|
||||
struct intc_desc_int *d = get_intc_desc(irq);
|
||||
@ -244,8 +244,23 @@ static void intc_mask_ack(unsigned int irq)
|
||||
|
||||
if (handle) {
|
||||
addr = INTC_REG(d, _INTC_ADDR_D(handle), 0);
|
||||
ctrl_inb(addr);
|
||||
ctrl_outb(0x3f ^ set_field(0, 1, handle), addr);
|
||||
switch (_INTC_FN(handle)) {
|
||||
case REG_FN_MODIFY_BASE + 0: /* 8bit */
|
||||
ctrl_inb(addr);
|
||||
ctrl_outb(0xff ^ set_field(0, 1, handle), addr);
|
||||
break;
|
||||
case REG_FN_MODIFY_BASE + 1: /* 16bit */
|
||||
ctrl_inw(addr);
|
||||
ctrl_outw(0xffff ^ set_field(0, 1, handle), addr);
|
||||
break;
|
||||
case REG_FN_MODIFY_BASE + 3: /* 32bit */
|
||||
ctrl_inl(addr);
|
||||
ctrl_outl(0xffffffff ^ set_field(0, 1, handle), addr);
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -466,7 +481,7 @@ static unsigned int __init intc_prio_data(struct intc_desc *desc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CPU_SH3
|
||||
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
|
||||
static unsigned int __init intc_ack_data(struct intc_desc *desc,
|
||||
struct intc_desc_int *d,
|
||||
intc_enum enum_id)
|
||||
@ -601,7 +616,7 @@ static void __init intc_register_irq(struct intc_desc *desc,
|
||||
/* irq should be disabled by default */
|
||||
d->chip.mask(irq);
|
||||
|
||||
#ifdef CONFIG_CPU_SH3
|
||||
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
|
||||
if (desc->ack_regs)
|
||||
ack_handle[irq] = intc_ack_data(desc, d, enum_id);
|
||||
#endif
|
||||
@ -635,7 +650,7 @@ void __init register_intc_controller(struct intc_desc *desc)
|
||||
d->nr_reg += desc->prio_regs ? desc->nr_prio_regs * 2 : 0;
|
||||
d->nr_reg += desc->sense_regs ? desc->nr_sense_regs : 0;
|
||||
|
||||
#ifdef CONFIG_CPU_SH3
|
||||
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
|
||||
d->nr_reg += desc->ack_regs ? desc->nr_ack_regs : 0;
|
||||
#endif
|
||||
d->reg = alloc_bootmem(d->nr_reg * sizeof(*d->reg));
|
||||
@ -676,7 +691,7 @@ void __init register_intc_controller(struct intc_desc *desc)
|
||||
d->chip.mask_ack = intc_disable;
|
||||
d->chip.set_type = intc_set_sense;
|
||||
|
||||
#ifdef CONFIG_CPU_SH3
|
||||
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
|
||||
if (desc->ack_regs) {
|
||||
for (i = 0; i < desc->nr_ack_regs; i++)
|
||||
k += save_reg(d, k, desc->ack_regs[i].set_reg, 0);
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* The SH-2 exception entry
|
||||
*
|
||||
* Copyright (C) 2005,2006 Yoshinori Sato
|
||||
* Copyright (C) 2005-2008 Yoshinori Sato
|
||||
* Copyright (C) 2005 AXE,Inc.
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
@ -36,43 +36,41 @@ OFF_TRA = (16*4+6*4)
|
||||
#include <asm/entry-macros.S>
|
||||
|
||||
ENTRY(exception_handler)
|
||||
! already saved r0/r1
|
||||
! stack
|
||||
! r0 <- point sp
|
||||
! r1
|
||||
! pc
|
||||
! sr
|
||||
! r0 = temporary
|
||||
! r1 = vector (pseudo EXPEVT / INTEVT / TRA)
|
||||
mov.l r2,@-sp
|
||||
mov.l r3,@-sp
|
||||
mov r0,r1
|
||||
cli
|
||||
mov.l $cpu_mode,r2
|
||||
mov.l @r2,r0
|
||||
mov.l @(5*4,r15),r3 ! previous SR
|
||||
shll2 r3 ! set "S" flag
|
||||
rotl r0 ! T <- "S" flag
|
||||
rotl r0 ! "S" flag is LSB
|
||||
rotcr r3 ! T -> r3:b30
|
||||
shlr r3
|
||||
shlr r0
|
||||
bt/s 1f
|
||||
mov.l r3,@(5*4,r15) ! copy cpu mode to SR
|
||||
or r0,r3 ! set MD
|
||||
tst r0,r0
|
||||
bf/s 1f ! previous mode check
|
||||
mov.l r3,@(5*4,r15) ! update SR
|
||||
! switch to kernel mode
|
||||
mov #1,r0
|
||||
rotr r0
|
||||
rotr r0
|
||||
mov.l __md_bit,r0
|
||||
mov.l r0,@r2 ! enter kernel mode
|
||||
mov.l $current_thread_info,r2
|
||||
mov.l @r2,r2
|
||||
mov #0x20,r0
|
||||
mov #(THREAD_SIZE >> 8),r0
|
||||
shll8 r0
|
||||
add r2,r0
|
||||
mov r15,r2 ! r2 = user stack top
|
||||
mov r0,r15 ! switch kernel stack
|
||||
add #-4,r15 ! dummy
|
||||
mov.l r1,@-r15 ! TRA
|
||||
sts.l macl, @-r15
|
||||
sts.l mach, @-r15
|
||||
stc.l gbr, @-r15
|
||||
mov.l @(4*4,r2),r0
|
||||
mov.l @(5*4,r2),r1
|
||||
mov.l r1,@-r15 ! original SR
|
||||
mov.l @(5*4,r2),r0
|
||||
mov.l r0,@-r15 ! original SR
|
||||
sts.l pr,@-r15
|
||||
mov.l @(4*4,r2),r0
|
||||
mov.l r0,@-r15 ! original PC
|
||||
mov r2,r3
|
||||
add #(4+2)*4,r3 ! rewind r0 - r3 + exception frame
|
||||
@ -88,14 +86,15 @@ ENTRY(exception_handler)
|
||||
mov.l r6,@-r15
|
||||
mov.l r5,@-r15
|
||||
mov.l r4,@-r15
|
||||
mov r1,r9 ! save TRA
|
||||
mov r2,r8 ! copy user -> kernel stack
|
||||
mov.l @r8+,r3
|
||||
mov.l @(0,r8),r3
|
||||
mov.l r3,@-r15
|
||||
mov.l @r8+,r2
|
||||
mov.l @(4,r8),r2
|
||||
mov.l r2,@-r15
|
||||
mov.l @r8+,r1
|
||||
mov.l @(12,r8),r1
|
||||
mov.l r1,@-r15
|
||||
mov.l @r8+,r0
|
||||
mov.l @(8,r8),r0
|
||||
bra 2f
|
||||
mov.l r0,@-r15
|
||||
1:
|
||||
@ -107,10 +106,11 @@ ENTRY(exception_handler)
|
||||
mov.l r0,@-r15
|
||||
mov.l @r2+,r0 ! old R2
|
||||
mov.l r0,@-r15
|
||||
mov.l @r2+,r0 ! old R1
|
||||
mov.l r0,@-r15
|
||||
mov.l @r2+,r0 ! old R0
|
||||
mov.l @(4,r2),r0 ! old R1
|
||||
mov.l r0,@-r15
|
||||
mov.l @r2,r0 ! old R0
|
||||
mov.l r0,@-r15
|
||||
add #8,r2
|
||||
mov.l @r2+,r3 ! old PC
|
||||
mov.l @r2+,r0 ! old SR
|
||||
add #-4,r2 ! exception frame stub (sr)
|
||||
@ -135,14 +135,12 @@ ENTRY(exception_handler)
|
||||
mov.l r6,@-r2
|
||||
mov.l r5,@-r2
|
||||
mov.l r4,@-r2
|
||||
mov r1,r9
|
||||
mov.l @(OFF_R0,r15),r0
|
||||
mov.l @(OFF_R1,r15),r1
|
||||
mov.l @(OFF_R2,r15),r2
|
||||
mov.l @(OFF_R3,r15),r3
|
||||
2:
|
||||
mov #OFF_TRA,r8
|
||||
add r15,r8
|
||||
mov.l @r8,r9
|
||||
mov #64,r8
|
||||
cmp/hs r8,r9
|
||||
bt interrupt_entry ! vec >= 64 is interrupt
|
||||
@ -150,26 +148,14 @@ ENTRY(exception_handler)
|
||||
cmp/hs r8,r9
|
||||
bt trap_entry ! 64 > vec >= 32 is trap
|
||||
|
||||
#if defined(CONFIG_SH_FPU)
|
||||
mov #13,r8
|
||||
cmp/eq r8,r9
|
||||
bt 10f ! fpu
|
||||
nop
|
||||
#endif
|
||||
|
||||
mov.l 4f,r8
|
||||
mov r9,r4
|
||||
shll2 r9
|
||||
add r9,r8
|
||||
mov.l @r8,r8
|
||||
mov #0,r9
|
||||
cmp/eq r9,r8
|
||||
mov.l @r8,r8 ! exception handler address
|
||||
tst r8,r8
|
||||
bf 3f
|
||||
mov.l 8f,r8 ! unhandled exception
|
||||
#if defined(CONFIG_SH_FPU)
|
||||
10:
|
||||
mov.l 9f, r8 ! unhandled exception
|
||||
#endif
|
||||
3:
|
||||
mov.l 5f,r10
|
||||
jmp @r8
|
||||
@ -188,10 +174,7 @@ interrupt_entry:
|
||||
5: .long ret_from_exception
|
||||
6: .long ret_from_irq
|
||||
7: .long do_IRQ
|
||||
8: .long do_exception_error
|
||||
#ifdef CONFIG_SH_FPU
|
||||
9: .long fpu_error_trap_handler
|
||||
#endif
|
||||
8: .long exception_error
|
||||
|
||||
trap_entry:
|
||||
mov #0x30,r8
|
||||
@ -200,24 +183,9 @@ trap_entry:
|
||||
add #-0x10,r9 ! convert SH2 to SH3/4 ABI
|
||||
1:
|
||||
shll2 r9 ! TRA
|
||||
mov #OFF_TRA,r8
|
||||
add r15,r8
|
||||
mov.l r9,@r8
|
||||
mov r9,r8
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
mov.l 2f, r9
|
||||
jsr @r9
|
||||
nop
|
||||
#endif
|
||||
sti
|
||||
bra system_call
|
||||
nop
|
||||
bra system_call ! jump common systemcall entry
|
||||
mov r9,r8
|
||||
|
||||
.align 2
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
2: .long trace_hardirqs_on
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SH_STANDARD_BIOS)
|
||||
/* Unwind the stack and jmp to the debug entry */
|
||||
ENTRY(sh_bios_handler)
|
||||
@ -240,7 +208,7 @@ ENTRY(sh_bios_handler)
|
||||
mov.l @r2,r2
|
||||
stc sr,r3
|
||||
mov.l r2,@r0
|
||||
mov.l r3,@r0
|
||||
mov.l r3,@(4,r0)
|
||||
mov.l r1,@(8,r0)
|
||||
mov.l @r15+, r0
|
||||
mov.l @r15+, r1
|
||||
@ -272,22 +240,30 @@ ENTRY(address_error_trap_handler)
|
||||
mov.l 1f,r0
|
||||
jmp @r0
|
||||
mov #0,r5 ! writeaccess is unknown
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
1: .long do_address_error
|
||||
|
||||
restore_all:
|
||||
cli
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
mov.l 1f, r0
|
||||
jsr @r0
|
||||
nop
|
||||
#endif
|
||||
stc sr,r0
|
||||
or #0xf0,r0
|
||||
ldc r0,sr ! all interrupt block (same BL = 1)
|
||||
! restore special register
|
||||
! overlap exception frame
|
||||
mov r15,r0
|
||||
add #17*4,r0
|
||||
lds.l @r0+,pr
|
||||
add #4,r0
|
||||
ldc.l @r0+,gbr
|
||||
lds.l @r0+,mach
|
||||
lds.l @r0+,macl
|
||||
mov r15,r0
|
||||
mov.l $cpu_mode,r2
|
||||
mov #OFF_SR,r3
|
||||
mov.l @(r0,r3),r1
|
||||
mov.l r1,@r2
|
||||
mov.l __md_bit,r3
|
||||
and r1,r3 ! copy MD bit
|
||||
mov.l r3,@r2
|
||||
shll2 r1 ! clear MD bit
|
||||
shlr2 r1
|
||||
mov.l @(OFF_SP,r0),r2
|
||||
@ -297,12 +273,6 @@ restore_all:
|
||||
mov #OFF_PC,r3
|
||||
mov.l @(r0,r3),r1
|
||||
mov.l r1,@r2 ! set pc
|
||||
add #4*16+4,r0
|
||||
lds.l @r0+,pr
|
||||
add #4,r0 ! skip sr
|
||||
ldc.l @r0+,gbr
|
||||
lds.l @r0+,mach
|
||||
lds.l @r0+,macl
|
||||
get_current_thread_info r0, r1
|
||||
mov.l $current_thread_info,r1
|
||||
mov.l r0,@r1
|
||||
@ -326,9 +296,8 @@ restore_all:
|
||||
nop
|
||||
|
||||
.align 2
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
1: .long trace_hardirqs_off
|
||||
#endif
|
||||
__md_bit:
|
||||
.long 0x40000000
|
||||
$current_thread_info:
|
||||
.long __current_thread_info
|
||||
$cpu_mode:
|
||||
|
@ -18,16 +18,17 @@
|
||||
exception_entry:
|
||||
no = 0
|
||||
.rept 256
|
||||
mov.l r0,@-sp
|
||||
mov #no,r0
|
||||
mov.l r1,@-sp
|
||||
bra exception_trampoline
|
||||
and #0xff,r0
|
||||
mov #no,r1
|
||||
no = no + 1
|
||||
.endr
|
||||
exception_trampoline:
|
||||
mov.l r1,@-sp
|
||||
mov.l $exception_handler,r1
|
||||
jmp @r1
|
||||
mov.l r0,@-sp
|
||||
mov.l $exception_handler,r0
|
||||
extu.b r1,r1
|
||||
jmp @r0
|
||||
extu.w r1,r1
|
||||
|
||||
.align 2
|
||||
$exception_entry:
|
||||
@ -41,6 +42,6 @@ $exception_handler:
|
||||
ENTRY(vbr_base)
|
||||
vector = 0
|
||||
.rept 256
|
||||
.long exception_entry + vector * 8
|
||||
.long exception_entry + vector * 6
|
||||
vector = vector + 1
|
||||
.endr
|
||||
|
@ -96,8 +96,32 @@ static struct platform_device sci_device = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource eth_resources[] = {
|
||||
[0] = {
|
||||
.start = 0xfb000000,
|
||||
.end = 0xfb0001c8,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 85,
|
||||
.end = 85,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device eth_device = {
|
||||
.name = "sh-eth",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = (void *)1,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(eth_resources),
|
||||
.resource = eth_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *sh7619_devices[] __initdata = {
|
||||
&sci_device,
|
||||
ð_device,
|
||||
};
|
||||
|
||||
static int __init sh7619_devices_setup(void)
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
obj-y := common.o probe.o opcode_helper.o
|
||||
|
||||
common-y += $(addprefix ../sh2/, ex.o entry.o)
|
||||
common-y += ex.o entry.o
|
||||
|
||||
obj-$(CONFIG_SH_FPU) += fpu.o
|
||||
|
||||
|
249
arch/sh/kernel/cpu/sh2a/entry.S
Normal file
249
arch/sh/kernel/cpu/sh2a/entry.S
Normal file
@ -0,0 +1,249 @@
|
||||
/*
|
||||
* arch/sh/kernel/cpu/sh2a/entry.S
|
||||
*
|
||||
* The SH-2A exception entry
|
||||
*
|
||||
* Copyright (C) 2008 Yoshinori Sato
|
||||
* Based on arch/sh/kernel/cpu/sh2/entry.S
|
||||
*
|
||||
* 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/linkage.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/thread_info.h>
|
||||
#include <asm/cpu/mmu_context.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/errno.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
/* Offsets to the stack */
|
||||
OFF_R0 = 0 /* Return value. New ABI also arg4 */
|
||||
OFF_R1 = 4 /* New ABI: arg5 */
|
||||
OFF_R2 = 8 /* New ABI: arg6 */
|
||||
OFF_R3 = 12 /* New ABI: syscall_nr */
|
||||
OFF_R4 = 16 /* New ABI: arg0 */
|
||||
OFF_R5 = 20 /* New ABI: arg1 */
|
||||
OFF_R6 = 24 /* New ABI: arg2 */
|
||||
OFF_R7 = 28 /* New ABI: arg3 */
|
||||
OFF_SP = (15*4)
|
||||
OFF_PC = (16*4)
|
||||
OFF_SR = (16*4+2*4)
|
||||
OFF_TRA = (16*4+6*4)
|
||||
|
||||
#include <asm/entry-macros.S>
|
||||
|
||||
ENTRY(exception_handler)
|
||||
! stack
|
||||
! r0 <- point sp
|
||||
! r1
|
||||
! pc
|
||||
! sr
|
||||
! r0 = temporary
|
||||
! r1 = vector (pseudo EXPEVT / INTEVT / TRA)
|
||||
mov.l r2,@-sp
|
||||
cli
|
||||
mov.l $cpu_mode,r2
|
||||
bld.b #6,@(0,r2) !previus SR.MD
|
||||
bst.b #6,@(4*4,r15) !set cpu mode to SR.MD
|
||||
bt 1f
|
||||
! switch to kernel mode
|
||||
bset.b #6,@(0,r2) !set SR.MD
|
||||
mov.l $current_thread_info,r2
|
||||
mov.l @r2,r2
|
||||
mov #(THREAD_SIZE >> 8),r0
|
||||
shll8 r0
|
||||
add r2,r0 ! r0 = kernel stack tail
|
||||
mov r15,r2 ! r2 = user stack top
|
||||
mov r0,r15 ! switch kernel stack
|
||||
mov.l r1,@-r15 ! TRA
|
||||
sts.l macl, @-r15
|
||||
sts.l mach, @-r15
|
||||
stc.l gbr, @-r15
|
||||
mov.l @(4*4,r2),r0
|
||||
mov.l r0,@-r15 ! original SR
|
||||
sts.l pr,@-r15
|
||||
mov.l @(3*4,r2),r0
|
||||
mov.l r0,@-r15 ! original PC
|
||||
mov r2,r0
|
||||
add #(3+2)*4,r0 ! rewind r0 - r3 + exception frame
|
||||
lds r0,pr ! pr = original SP
|
||||
movmu.l r3,@-r15 ! save regs
|
||||
mov r2,r8 ! r8 = previus stack top
|
||||
mov r1,r9 ! r9 = interrupt vector
|
||||
! restore previous stack
|
||||
mov.l @r8+,r2
|
||||
mov.l @r8+,r0
|
||||
mov.l @r8+,r1
|
||||
bra 2f
|
||||
movml.l r2,@-r15
|
||||
1:
|
||||
! in kernel exception
|
||||
mov r15,r2
|
||||
add #-((OFF_TRA + 4) - OFF_PC) + 5*4,r15
|
||||
movmu.l r3,@-r15
|
||||
mov r2,r8 ! r8 = previous stack top
|
||||
mov r1,r9 ! r9 = interrupt vector
|
||||
! restore exception frame & regs
|
||||
mov.l @r8+,r2 ! old R2
|
||||
mov.l @r8+,r0 ! old R0
|
||||
mov.l @r8+,r1 ! old R1
|
||||
mov.l @r8+,r10 ! old PC
|
||||
mov.l @r8+,r11 ! old SR
|
||||
movml.l r2,@-r15
|
||||
mov.l r10,@(OFF_PC,r15)
|
||||
mov.l r11,@(OFF_SR,r15)
|
||||
mov.l r8,@(OFF_SP,r15) ! save old sp
|
||||
mov r15,r8
|
||||
add #OFF_TRA + 4,r8
|
||||
mov.l r9,@-r8
|
||||
sts.l macl,@-r8
|
||||
sts.l mach,@-r8
|
||||
stc.l gbr,@-r8
|
||||
add #-4,r8
|
||||
sts.l pr,@-r8
|
||||
2:
|
||||
! dispatch exception / interrupt
|
||||
mov #64,r8
|
||||
cmp/hs r8,r9
|
||||
bt interrupt_entry ! vec >= 64 is interrupt
|
||||
mov #32,r8
|
||||
cmp/hs r8,r9
|
||||
bt trap_entry ! 64 > vec >= 32 is trap
|
||||
|
||||
mov.l 4f,r8
|
||||
mov r9,r4
|
||||
shll2 r9
|
||||
add r9,r8
|
||||
mov.l @r8,r8 ! exception handler address
|
||||
tst r8,r8
|
||||
bf 3f
|
||||
mov.l 8f,r8 ! unhandled exception
|
||||
3:
|
||||
mov.l 5f,r10
|
||||
jmp @r8
|
||||
lds r10,pr
|
||||
|
||||
interrupt_entry:
|
||||
mov r9,r4
|
||||
mov r15,r5
|
||||
mov.l 7f,r8
|
||||
mov.l 6f,r9
|
||||
jmp @r8
|
||||
lds r9,pr
|
||||
|
||||
.align 2
|
||||
4: .long exception_handling_table
|
||||
5: .long ret_from_exception
|
||||
6: .long ret_from_irq
|
||||
7: .long do_IRQ
|
||||
8: .long exception_error
|
||||
|
||||
trap_entry:
|
||||
mov #0x30,r8
|
||||
cmp/ge r8,r9 ! vector 0x20-0x2f is systemcall
|
||||
bt 1f
|
||||
add #-0x10,r9 ! convert SH2 to SH3/4 ABI
|
||||
1:
|
||||
shll2 r9 ! TRA
|
||||
bra system_call ! jump common systemcall entry
|
||||
mov r9,r8
|
||||
|
||||
#if defined(CONFIG_SH_STANDARD_BIOS)
|
||||
/* Unwind the stack and jmp to the debug entry */
|
||||
ENTRY(sh_bios_handler)
|
||||
mov r15,r0
|
||||
add #(22-4)*4-4,r0
|
||||
ldc.l @r0+,gbr
|
||||
lds.l @r0+,mach
|
||||
lds.l @r0+,macl
|
||||
mov r15,r0
|
||||
mov.l @(OFF_SP,r0),r1
|
||||
mov.l @(OFF_SR,r2),r3
|
||||
mov.l r3,@-r1
|
||||
mov.l @(OFF_SP,r2),r3
|
||||
mov.l r3,@-r1
|
||||
mov r15,r0
|
||||
add #(22-4)*4-8,r0
|
||||
mov.l 1f,r2
|
||||
mov.l @r2,r2
|
||||
stc sr,r3
|
||||
mov.l r2,@r0
|
||||
mov.l r3,@(4,r0)
|
||||
mov.l r1,@(8,r0)
|
||||
movml.l @r15+,r14
|
||||
add #8,r15
|
||||
lds.l @r15+, pr
|
||||
rte
|
||||
mov.l @r15+,r15
|
||||
.align 2
|
||||
1: .long gdb_vbr_vector
|
||||
#endif /* CONFIG_SH_STANDARD_BIOS */
|
||||
|
||||
ENTRY(address_error_trap_handler)
|
||||
mov r15,r4 ! regs
|
||||
mov.l @(OFF_PC,r15),r6 ! pc
|
||||
mov.l 1f,r0
|
||||
jmp @r0
|
||||
mov #0,r5 ! writeaccess is unknown
|
||||
|
||||
.align 2
|
||||
1: .long do_address_error
|
||||
|
||||
restore_all:
|
||||
stc sr,r0
|
||||
or #0xf0,r0
|
||||
ldc r0,sr ! all interrupt block (same BL = 1)
|
||||
! restore special register
|
||||
! overlap exception frame
|
||||
mov r15,r0
|
||||
add #17*4,r0
|
||||
lds.l @r0+,pr
|
||||
add #4,r0
|
||||
ldc.l @r0+,gbr
|
||||
lds.l @r0+,mach
|
||||
lds.l @r0+,macl
|
||||
mov r15,r0
|
||||
mov.l $cpu_mode,r2
|
||||
bld.b #6,@(OFF_SR,r15)
|
||||
bst.b #6,@(0,r2) ! save CPU mode
|
||||
mov.l @(OFF_SR,r0),r1
|
||||
shll2 r1
|
||||
shlr2 r1 ! clear MD bit
|
||||
mov.l @(OFF_SP,r0),r2
|
||||
add #-8,r2
|
||||
mov.l r2,@(OFF_SP,r0) ! point exception frame top
|
||||
mov.l r1,@(4,r2) ! set sr
|
||||
mov.l @(OFF_PC,r0),r1
|
||||
mov.l r1,@r2 ! set pc
|
||||
get_current_thread_info r0, r1
|
||||
mov.l $current_thread_info,r1
|
||||
mov.l r0,@r1
|
||||
movml.l @r15+,r14
|
||||
mov.l @r15,r15
|
||||
rte
|
||||
nop
|
||||
|
||||
.align 2
|
||||
$current_thread_info:
|
||||
.long __current_thread_info
|
||||
$cpu_mode:
|
||||
.long __cpu_mode
|
||||
|
||||
! common exception handler
|
||||
#include "../../entry-common.S"
|
||||
|
||||
.data
|
||||
! cpu operation mode
|
||||
! bit30 = MD (compatible SH3/4)
|
||||
__cpu_mode:
|
||||
.long 0x40000000
|
||||
|
||||
.section .bss
|
||||
__current_thread_info:
|
||||
.long 0
|
||||
|
||||
ENTRY(exception_handling_table)
|
||||
.space 4*32
|
72
arch/sh/kernel/cpu/sh2a/ex.S
Normal file
72
arch/sh/kernel/cpu/sh2a/ex.S
Normal file
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* arch/sh/kernel/cpu/sh2a/ex.S
|
||||
*
|
||||
* The SH-2A exception vector table
|
||||
*
|
||||
* Copyright (C) 2008 Yoshinori Sato
|
||||
*
|
||||
* 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/linkage.h>
|
||||
|
||||
!
|
||||
! convert Exception Vector to Exception Number
|
||||
!
|
||||
|
||||
! exception no 0 to 255
|
||||
exception_entry0:
|
||||
no = 0
|
||||
.rept 256
|
||||
mov.l r1,@-sp
|
||||
bra exception_trampoline0
|
||||
mov #no,r1
|
||||
no = no + 1
|
||||
.endr
|
||||
exception_trampoline0:
|
||||
mov.l r0,@-sp
|
||||
mov.l 1f,r0
|
||||
extu.b r1,r1
|
||||
jmp @r0
|
||||
extu.w r1,r1
|
||||
|
||||
.align 2
|
||||
1: .long exception_handler
|
||||
|
||||
! exception no 256 to 511
|
||||
exception_entry1:
|
||||
no = 0
|
||||
.rept 256
|
||||
mov.l r1,@-sp
|
||||
bra exception_trampoline1
|
||||
mov #no,r1
|
||||
no = no + 1
|
||||
.endr
|
||||
exception_trampoline1:
|
||||
mov.l r0,@-sp
|
||||
extu.b r1,r1
|
||||
movi20 #0x100,r0
|
||||
add r0,r1
|
||||
mov.l 1f,r0
|
||||
jmp @r0
|
||||
extu.w r1,r1
|
||||
|
||||
.align 2
|
||||
1: .long exception_handler
|
||||
|
||||
!
|
||||
! Exception Vector Base
|
||||
!
|
||||
.align 2
|
||||
ENTRY(vbr_base)
|
||||
vector = 0
|
||||
.rept 256
|
||||
.long exception_entry0 + vector * 6
|
||||
vector = vector + 1
|
||||
.endr
|
||||
.rept 256
|
||||
.long exception_entry1 + vector * 6
|
||||
vector = vector + 1
|
||||
.endr
|
@ -4,7 +4,7 @@
|
||||
* The SH-3 and SH-4 exception vector table.
|
||||
|
||||
* Copyright (C) 1999, 2000, 2002 Niibe Yutaka
|
||||
* Copyright (C) 2003 - 2006 Paul Mundt
|
||||
* Copyright (C) 2003 - 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
|
||||
@ -12,13 +12,30 @@
|
||||
*/
|
||||
#include <linux/linkage.h>
|
||||
|
||||
#if !defined(CONFIG_MMU)
|
||||
#define tlb_miss_load exception_error
|
||||
#define tlb_miss_store exception_error
|
||||
#define initial_page_write exception_error
|
||||
#define tlb_protection_violation_load exception_error
|
||||
#define tlb_protection_violation_store exception_error
|
||||
#define address_error_load exception_error
|
||||
#define address_error_store exception_error
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_SH_FPU)
|
||||
#define fpu_error_trap_handler exception_error
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_KGDB_NMI)
|
||||
#define kgdb_handle_exception exception_error
|
||||
#endif
|
||||
|
||||
.align 2
|
||||
.data
|
||||
|
||||
ENTRY(exception_handling_table)
|
||||
.long exception_error /* 000 */
|
||||
.long exception_error
|
||||
#if defined(CONFIG_MMU)
|
||||
.long tlb_miss_load /* 040 */
|
||||
.long tlb_miss_store
|
||||
.long initial_page_write
|
||||
@ -26,30 +43,13 @@ ENTRY(exception_handling_table)
|
||||
.long tlb_protection_violation_store
|
||||
.long address_error_load
|
||||
.long address_error_store /* 100 */
|
||||
#else
|
||||
.long exception_error ! tlb miss load /* 040 */
|
||||
.long exception_error ! tlb miss store
|
||||
.long exception_error ! initial page write
|
||||
.long exception_error ! tlb prot violation load
|
||||
.long exception_error ! tlb prot violation store
|
||||
.long exception_error ! address error load
|
||||
.long exception_error ! address error store /* 100 */
|
||||
#endif
|
||||
#if defined(CONFIG_SH_FPU)
|
||||
.long fpu_error_trap_handler /* 120 */
|
||||
#else
|
||||
.long exception_error /* 120 */
|
||||
#endif
|
||||
.long exception_error /* 140 */
|
||||
.long system_call ! Unconditional Trap /* 160 */
|
||||
.long exception_error ! reserved_instruction (filled by trap_init) /* 180 */
|
||||
.long exception_error ! illegal_slot_instruction (filled by trap_init) /*1A0*/
|
||||
ENTRY(nmi_slot)
|
||||
#if defined (CONFIG_KGDB_NMI)
|
||||
.long kgdb_handle_exception /* 1C0 */ ! Allow trap to debugger
|
||||
#else
|
||||
.long exception_none /* 1C0 */ ! Not implemented yet
|
||||
#endif
|
||||
ENTRY(user_break_point_trap)
|
||||
.long break_point_trap /* 1E0 */
|
||||
|
||||
|
@ -50,14 +50,18 @@ int __init detect_cpu_and_cache_system(void)
|
||||
boot_cpu_data.dcache.ways = 1;
|
||||
boot_cpu_data.dcache.linesz = L1_CACHE_BYTES;
|
||||
|
||||
/* We don't know the chip cut */
|
||||
boot_cpu_data.cut_major = boot_cpu_data.cut_minor = -1;
|
||||
|
||||
/*
|
||||
* Setup some generic flags we can probe on SH-4A parts
|
||||
*/
|
||||
if (((pvr >> 24) & 0xff) == 0x10) {
|
||||
if (((pvr >> 16) & 0xff) == 0x10) {
|
||||
if ((cvr & 0x10000000) == 0)
|
||||
boot_cpu_data.flags |= CPU_HAS_DSP;
|
||||
|
||||
boot_cpu_data.flags |= CPU_HAS_LLSC;
|
||||
boot_cpu_data.cut_major = pvr & 0x7f;
|
||||
}
|
||||
|
||||
/* FPU detection works for everyone */
|
||||
|
@ -21,7 +21,7 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7763) := clock-sh7763.o
|
||||
clock-$(CONFIG_CPU_SUBTYPE_SH7770) := clock-sh7770.o
|
||||
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_SH7343) := clock-sh7722.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
|
||||
|
@ -1,99 +0,0 @@
|
||||
/*
|
||||
* arch/sh/kernel/cpu/sh4a/clock-sh7343.c
|
||||
*
|
||||
* SH7343/SH7722 support for the clock framework
|
||||
*
|
||||
* Copyright (C) 2006 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/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/io.h>
|
||||
#include <asm/clock.h>
|
||||
#include <asm/freq.h>
|
||||
|
||||
/*
|
||||
* SH7343/SH7722 uses a common set of multipliers and divisors, so this
|
||||
* is quite simple..
|
||||
*/
|
||||
static int multipliers[] = { 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
|
||||
static int divisors[] = { 1, 3, 2, 5, 3, 4, 5, 6, 8, 10, 12, 16, 20 };
|
||||
|
||||
#define pll_calc() (((ctrl_inl(FRQCR) >> 24) & 0x1f) + 1)
|
||||
|
||||
static void master_clk_init(struct clk *clk)
|
||||
{
|
||||
clk->parent = clk_get(NULL, "cpu_clk");
|
||||
}
|
||||
|
||||
static void master_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int idx = (ctrl_inl(FRQCR) & 0x000f);
|
||||
clk->rate *= clk->parent->rate * multipliers[idx] / divisors[idx];
|
||||
}
|
||||
|
||||
static struct clk_ops sh7343_master_clk_ops = {
|
||||
.init = master_clk_init,
|
||||
.recalc = master_clk_recalc,
|
||||
};
|
||||
|
||||
static void module_clk_init(struct clk *clk)
|
||||
{
|
||||
clk->parent = NULL;
|
||||
clk->rate = CONFIG_SH_PCLK_FREQ;
|
||||
}
|
||||
|
||||
static struct clk_ops sh7343_module_clk_ops = {
|
||||
.init = module_clk_init,
|
||||
};
|
||||
|
||||
static void bus_clk_init(struct clk *clk)
|
||||
{
|
||||
clk->parent = clk_get(NULL, "cpu_clk");
|
||||
}
|
||||
|
||||
static void bus_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int idx = (ctrl_inl(FRQCR) >> 8) & 0x000f;
|
||||
clk->rate = clk->parent->rate * multipliers[idx] / divisors[idx];
|
||||
}
|
||||
|
||||
static struct clk_ops sh7343_bus_clk_ops = {
|
||||
.init = bus_clk_init,
|
||||
.recalc = bus_clk_recalc,
|
||||
};
|
||||
|
||||
static void cpu_clk_init(struct clk *clk)
|
||||
{
|
||||
clk->parent = clk_get(NULL, "module_clk");
|
||||
clk->flags |= CLK_RATE_PROPAGATES;
|
||||
clk_set_rate(clk, clk_get_rate(clk));
|
||||
}
|
||||
|
||||
static void cpu_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int idx = (ctrl_inl(FRQCR) >> 20) & 0x000f;
|
||||
clk->rate = clk->parent->rate * pll_calc() *
|
||||
multipliers[idx] / divisors[idx];
|
||||
}
|
||||
|
||||
static struct clk_ops sh7343_cpu_clk_ops = {
|
||||
.init = cpu_clk_init,
|
||||
.recalc = cpu_clk_recalc,
|
||||
};
|
||||
|
||||
static struct clk_ops *sh7343_clk_ops[] = {
|
||||
&sh7343_master_clk_ops,
|
||||
&sh7343_module_clk_ops,
|
||||
&sh7343_bus_clk_ops,
|
||||
&sh7343_cpu_clk_ops,
|
||||
};
|
||||
|
||||
void __init arch_init_clk_ops(struct clk_ops **ops, int idx)
|
||||
{
|
||||
if (idx < ARRAY_SIZE(sh7343_clk_ops))
|
||||
*ops = sh7343_clk_ops[idx];
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* arch/sh/kernel/cpu/sh4a/clock-sh7722.c
|
||||
*
|
||||
* SH7722 & SH7366 support for the clock framework
|
||||
* SH7343, SH7722, SH7723 & SH7366 support for the clock framework
|
||||
*
|
||||
* Copyright (c) 2006-2007 Nomad Global Solutions Inc
|
||||
* Based on code for sh7343 by Paul Mundt
|
||||
@ -14,6 +14,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/stringify.h>
|
||||
#include <asm/clock.h>
|
||||
#include <asm/freq.h>
|
||||
|
||||
@ -411,40 +412,40 @@ static struct clk_ops sh7722_frqcr_clk_ops = {
|
||||
* clock ops methods for SIU A/B and IrDA clock
|
||||
*
|
||||
*/
|
||||
static int sh7722_siu_which(struct clk *clk)
|
||||
|
||||
#ifndef CONFIG_CPU_SUBTYPE_SH7343
|
||||
|
||||
static int sh7722_siu_set_rate(struct clk *clk, unsigned long rate, int algo_id)
|
||||
{
|
||||
if (!strcmp(clk->name, "siu_a_clk"))
|
||||
return 0;
|
||||
if (!strcmp(clk->name, "siu_b_clk"))
|
||||
return 1;
|
||||
#if defined(CONFIG_CPU_SUBTYPE_SH7722)
|
||||
if (!strcmp(clk->name, "irda_clk"))
|
||||
return 2;
|
||||
#endif
|
||||
return -EINVAL;
|
||||
unsigned long r;
|
||||
int div;
|
||||
|
||||
r = ctrl_inl(clk->arch_flags);
|
||||
div = sh7722_find_divisors(clk->parent->rate, rate);
|
||||
if (div < 0)
|
||||
return div;
|
||||
r = (r & ~0xF) | div;
|
||||
ctrl_outl(r, clk->arch_flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long sh7722_siu_regs[] = {
|
||||
[0] = SCLKACR,
|
||||
[1] = SCLKBCR,
|
||||
#if defined(CONFIG_CPU_SUBTYPE_SH7722)
|
||||
[2] = IrDACLKCR,
|
||||
#endif
|
||||
};
|
||||
static void sh7722_siu_recalc(struct clk *clk)
|
||||
{
|
||||
unsigned long r;
|
||||
|
||||
r = ctrl_inl(clk->arch_flags);
|
||||
clk->rate = clk->parent->rate * 2 / divisors2[r & 0xF];
|
||||
}
|
||||
|
||||
static int sh7722_siu_start_stop(struct clk *clk, int enable)
|
||||
{
|
||||
int siu = sh7722_siu_which(clk);
|
||||
unsigned long r;
|
||||
|
||||
if (siu < 0)
|
||||
return siu;
|
||||
BUG_ON(siu > 2);
|
||||
r = ctrl_inl(sh7722_siu_regs[siu]);
|
||||
r = ctrl_inl(clk->arch_flags);
|
||||
if (enable)
|
||||
ctrl_outl(r & ~(1 << 8), sh7722_siu_regs[siu]);
|
||||
ctrl_outl(r & ~(1 << 8), clk->arch_flags);
|
||||
else
|
||||
ctrl_outl(r | (1 << 8), sh7722_siu_regs[siu]);
|
||||
ctrl_outl(r | (1 << 8), clk->arch_flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -458,6 +459,15 @@ static void sh7722_siu_disable(struct clk *clk)
|
||||
sh7722_siu_start_stop(clk, 0);
|
||||
}
|
||||
|
||||
static struct clk_ops sh7722_siu_clk_ops = {
|
||||
.recalc = sh7722_siu_recalc,
|
||||
.set_rate = sh7722_siu_set_rate,
|
||||
.enable = sh7722_siu_enable,
|
||||
.disable = sh7722_siu_disable,
|
||||
};
|
||||
|
||||
#endif /* CONFIG_CPU_SUBTYPE_SH7343 */
|
||||
|
||||
static void sh7722_video_enable(struct clk *clk)
|
||||
{
|
||||
unsigned long r;
|
||||
@ -494,43 +504,6 @@ static void sh7722_video_recalc(struct clk *clk)
|
||||
clk->rate = clk->parent->rate / ((r & 0x3F) + 1);
|
||||
}
|
||||
|
||||
static int sh7722_siu_set_rate(struct clk *clk, unsigned long rate, int algo_id)
|
||||
{
|
||||
int siu = sh7722_siu_which(clk);
|
||||
unsigned long r;
|
||||
int div;
|
||||
|
||||
if (siu < 0)
|
||||
return siu;
|
||||
BUG_ON(siu > 2);
|
||||
r = ctrl_inl(sh7722_siu_regs[siu]);
|
||||
div = sh7722_find_divisors(clk->parent->rate, rate);
|
||||
if (div < 0)
|
||||
return div;
|
||||
r = (r & ~0xF) | div;
|
||||
ctrl_outl(r, sh7722_siu_regs[siu]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sh7722_siu_recalc(struct clk *clk)
|
||||
{
|
||||
int siu = sh7722_siu_which(clk);
|
||||
unsigned long r;
|
||||
|
||||
if (siu < 0)
|
||||
return /* siu */ ;
|
||||
BUG_ON(siu > 2);
|
||||
r = ctrl_inl(sh7722_siu_regs[siu]);
|
||||
clk->rate = clk->parent->rate * 2 / divisors2[r & 0xF];
|
||||
}
|
||||
|
||||
static struct clk_ops sh7722_siu_clk_ops = {
|
||||
.recalc = sh7722_siu_recalc,
|
||||
.set_rate = sh7722_siu_set_rate,
|
||||
.enable = sh7722_siu_enable,
|
||||
.disable = sh7722_siu_disable,
|
||||
};
|
||||
|
||||
static struct clk_ops sh7722_video_clk_ops = {
|
||||
.recalc = sh7722_video_recalc,
|
||||
.set_rate = sh7722_video_set_rate,
|
||||
@ -560,6 +533,9 @@ static struct clk sh7722_sdram_clock = {
|
||||
.ops = &sh7722_frqcr_clk_ops,
|
||||
};
|
||||
|
||||
|
||||
#ifndef CONFIG_CPU_SUBTYPE_SH7343
|
||||
|
||||
/*
|
||||
* these three clocks - SIU A, SIU B, IrDA - share the same clk_ops
|
||||
* methods of clk_ops determine which register they should access by
|
||||
@ -567,35 +543,150 @@ static struct clk sh7722_sdram_clock = {
|
||||
*/
|
||||
static struct clk sh7722_siu_a_clock = {
|
||||
.name = "siu_a_clk",
|
||||
.arch_flags = SCLKACR,
|
||||
.ops = &sh7722_siu_clk_ops,
|
||||
};
|
||||
|
||||
static struct clk sh7722_siu_b_clock = {
|
||||
.name = "siu_b_clk",
|
||||
.arch_flags = SCLKBCR,
|
||||
.ops = &sh7722_siu_clk_ops,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_CPU_SUBTYPE_SH7722)
|
||||
static struct clk sh7722_irda_clock = {
|
||||
.name = "irda_clk",
|
||||
.arch_flags = IrDACLKCR,
|
||||
.ops = &sh7722_siu_clk_ops,
|
||||
};
|
||||
#endif
|
||||
#endif /* CONFIG_CPU_SUBTYPE_SH7343 */
|
||||
|
||||
static struct clk sh7722_video_clock = {
|
||||
.name = "video_clk",
|
||||
.ops = &sh7722_video_clk_ops,
|
||||
};
|
||||
|
||||
static int sh7722_mstpcr_start_stop(struct clk *clk, unsigned long reg,
|
||||
int enable)
|
||||
{
|
||||
unsigned long bit = clk->arch_flags;
|
||||
unsigned long r;
|
||||
|
||||
r = ctrl_inl(reg);
|
||||
|
||||
if (enable)
|
||||
r &= ~(1 << bit);
|
||||
else
|
||||
r |= (1 << bit);
|
||||
|
||||
ctrl_outl(r, reg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sh7722_mstpcr0_enable(struct clk *clk)
|
||||
{
|
||||
sh7722_mstpcr_start_stop(clk, MSTPCR0, 1);
|
||||
}
|
||||
|
||||
static void sh7722_mstpcr0_disable(struct clk *clk)
|
||||
{
|
||||
sh7722_mstpcr_start_stop(clk, MSTPCR0, 0);
|
||||
}
|
||||
|
||||
static void sh7722_mstpcr1_enable(struct clk *clk)
|
||||
{
|
||||
sh7722_mstpcr_start_stop(clk, MSTPCR1, 1);
|
||||
}
|
||||
|
||||
static void sh7722_mstpcr1_disable(struct clk *clk)
|
||||
{
|
||||
sh7722_mstpcr_start_stop(clk, MSTPCR1, 0);
|
||||
}
|
||||
|
||||
static void sh7722_mstpcr2_enable(struct clk *clk)
|
||||
{
|
||||
sh7722_mstpcr_start_stop(clk, MSTPCR2, 1);
|
||||
}
|
||||
|
||||
static void sh7722_mstpcr2_disable(struct clk *clk)
|
||||
{
|
||||
sh7722_mstpcr_start_stop(clk, MSTPCR2, 0);
|
||||
}
|
||||
|
||||
static struct clk_ops sh7722_mstpcr0_clk_ops = {
|
||||
.enable = sh7722_mstpcr0_enable,
|
||||
.disable = sh7722_mstpcr0_disable,
|
||||
};
|
||||
|
||||
static struct clk_ops sh7722_mstpcr1_clk_ops = {
|
||||
.enable = sh7722_mstpcr1_enable,
|
||||
.disable = sh7722_mstpcr1_disable,
|
||||
};
|
||||
|
||||
static struct clk_ops sh7722_mstpcr2_clk_ops = {
|
||||
.enable = sh7722_mstpcr2_enable,
|
||||
.disable = sh7722_mstpcr2_disable,
|
||||
};
|
||||
|
||||
#define DECLARE_MSTPCRN(regnr, bitnr, bitstr) \
|
||||
{ \
|
||||
.name = "mstp" __stringify(regnr) bitstr, \
|
||||
.arch_flags = bitnr, \
|
||||
.ops = &sh7722_mstpcr ## regnr ## _clk_ops, \
|
||||
}
|
||||
|
||||
#define DECLARE_MSTPCR(regnr) \
|
||||
DECLARE_MSTPCRN(regnr, 31, "31"), \
|
||||
DECLARE_MSTPCRN(regnr, 30, "30"), \
|
||||
DECLARE_MSTPCRN(regnr, 29, "29"), \
|
||||
DECLARE_MSTPCRN(regnr, 28, "28"), \
|
||||
DECLARE_MSTPCRN(regnr, 27, "27"), \
|
||||
DECLARE_MSTPCRN(regnr, 26, "26"), \
|
||||
DECLARE_MSTPCRN(regnr, 25, "25"), \
|
||||
DECLARE_MSTPCRN(regnr, 24, "24"), \
|
||||
DECLARE_MSTPCRN(regnr, 23, "23"), \
|
||||
DECLARE_MSTPCRN(regnr, 22, "22"), \
|
||||
DECLARE_MSTPCRN(regnr, 21, "21"), \
|
||||
DECLARE_MSTPCRN(regnr, 20, "20"), \
|
||||
DECLARE_MSTPCRN(regnr, 19, "19"), \
|
||||
DECLARE_MSTPCRN(regnr, 18, "18"), \
|
||||
DECLARE_MSTPCRN(regnr, 17, "17"), \
|
||||
DECLARE_MSTPCRN(regnr, 16, "16"), \
|
||||
DECLARE_MSTPCRN(regnr, 15, "15"), \
|
||||
DECLARE_MSTPCRN(regnr, 14, "14"), \
|
||||
DECLARE_MSTPCRN(regnr, 13, "13"), \
|
||||
DECLARE_MSTPCRN(regnr, 12, "12"), \
|
||||
DECLARE_MSTPCRN(regnr, 11, "11"), \
|
||||
DECLARE_MSTPCRN(regnr, 10, "10"), \
|
||||
DECLARE_MSTPCRN(regnr, 9, "09"), \
|
||||
DECLARE_MSTPCRN(regnr, 8, "08"), \
|
||||
DECLARE_MSTPCRN(regnr, 7, "07"), \
|
||||
DECLARE_MSTPCRN(regnr, 6, "06"), \
|
||||
DECLARE_MSTPCRN(regnr, 5, "05"), \
|
||||
DECLARE_MSTPCRN(regnr, 4, "04"), \
|
||||
DECLARE_MSTPCRN(regnr, 3, "03"), \
|
||||
DECLARE_MSTPCRN(regnr, 2, "02"), \
|
||||
DECLARE_MSTPCRN(regnr, 1, "01"), \
|
||||
DECLARE_MSTPCRN(regnr, 0, "00")
|
||||
|
||||
static struct clk sh7722_mstpcr[] = {
|
||||
DECLARE_MSTPCR(0),
|
||||
DECLARE_MSTPCR(1),
|
||||
DECLARE_MSTPCR(2),
|
||||
};
|
||||
|
||||
static struct clk *sh7722_clocks[] = {
|
||||
&sh7722_umem_clock,
|
||||
&sh7722_sh_clock,
|
||||
&sh7722_peripheral_clock,
|
||||
&sh7722_sdram_clock,
|
||||
#ifndef CONFIG_CPU_SUBTYPE_SH7343
|
||||
&sh7722_siu_a_clock,
|
||||
&sh7722_siu_b_clock,
|
||||
#if defined(CONFIG_CPU_SUBTYPE_SH7722)
|
||||
&sh7722_irda_clock,
|
||||
#endif
|
||||
#endif
|
||||
&sh7722_video_clock,
|
||||
};
|
||||
@ -629,5 +720,11 @@ int __init arch_clk_init(void)
|
||||
clk_register(sh7722_clocks[i]);
|
||||
}
|
||||
clk_put(master);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(sh7722_mstpcr); i++) {
|
||||
pr_debug( "Registering mstpcr '%s'\n", sh7722_mstpcr[i].name);
|
||||
clk_register(&sh7722_mstpcr[i]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -11,6 +11,104 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/serial_sci.h>
|
||||
#include <linux/uio_driver.h>
|
||||
#include <asm/clock.h>
|
||||
|
||||
static struct resource iic0_resources[] = {
|
||||
[0] = {
|
||||
.name = "IIC0",
|
||||
.start = 0x04470000,
|
||||
.end = 0x04470017,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 96,
|
||||
.end = 99,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device iic0_device = {
|
||||
.name = "i2c-sh_mobile",
|
||||
.num_resources = ARRAY_SIZE(iic0_resources),
|
||||
.resource = iic0_resources,
|
||||
};
|
||||
|
||||
static struct resource iic1_resources[] = {
|
||||
[0] = {
|
||||
.name = "IIC1",
|
||||
.start = 0x04750000,
|
||||
.end = 0x04750017,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 44,
|
||||
.end = 47,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device iic1_device = {
|
||||
.name = "i2c-sh_mobile",
|
||||
.num_resources = ARRAY_SIZE(iic1_resources),
|
||||
.resource = iic1_resources,
|
||||
};
|
||||
|
||||
static struct uio_info vpu_platform_data = {
|
||||
.name = "VPU4",
|
||||
.version = "0",
|
||||
.irq = 60,
|
||||
};
|
||||
|
||||
static struct resource vpu_resources[] = {
|
||||
[0] = {
|
||||
.name = "VPU",
|
||||
.start = 0xfe900000,
|
||||
.end = 0xfe9022eb,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device vpu_device = {
|
||||
.name = "uio_pdrv_genirq",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &vpu_platform_data,
|
||||
},
|
||||
.resource = vpu_resources,
|
||||
.num_resources = ARRAY_SIZE(vpu_resources),
|
||||
};
|
||||
|
||||
static struct uio_info veu_platform_data = {
|
||||
.name = "VEU",
|
||||
.version = "0",
|
||||
.irq = 54,
|
||||
};
|
||||
|
||||
static struct resource veu_resources[] = {
|
||||
[0] = {
|
||||
.name = "VEU",
|
||||
.start = 0xfe920000,
|
||||
.end = 0xfe9200b7,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device veu_device = {
|
||||
.name = "uio_pdrv_genirq",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &veu_platform_data,
|
||||
},
|
||||
.resource = veu_resources,
|
||||
.num_resources = ARRAY_SIZE(veu_resources),
|
||||
};
|
||||
|
||||
static struct plat_sci_port sci_platform_data[] = {
|
||||
{
|
||||
@ -32,16 +130,171 @@ static struct platform_device sci_device = {
|
||||
};
|
||||
|
||||
static struct platform_device *sh7343_devices[] __initdata = {
|
||||
&iic0_device,
|
||||
&iic1_device,
|
||||
&sci_device,
|
||||
&vpu_device,
|
||||
&veu_device,
|
||||
};
|
||||
|
||||
static int __init sh7343_devices_setup(void)
|
||||
{
|
||||
clk_always_enable("mstp031"); /* TLB */
|
||||
clk_always_enable("mstp030"); /* IC */
|
||||
clk_always_enable("mstp029"); /* OC */
|
||||
clk_always_enable("mstp028"); /* URAM */
|
||||
clk_always_enable("mstp026"); /* XYMEM */
|
||||
clk_always_enable("mstp023"); /* INTC3 */
|
||||
clk_always_enable("mstp022"); /* INTC */
|
||||
clk_always_enable("mstp020"); /* SuperHyway */
|
||||
clk_always_enable("mstp109"); /* I2C0 */
|
||||
clk_always_enable("mstp108"); /* I2C1 */
|
||||
clk_always_enable("mstp202"); /* VEU */
|
||||
clk_always_enable("mstp201"); /* VPU */
|
||||
|
||||
platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20);
|
||||
platform_resource_setup_memory(&veu_device, "veu", 2 << 20);
|
||||
|
||||
return platform_add_devices(sh7343_devices,
|
||||
ARRAY_SIZE(sh7343_devices));
|
||||
}
|
||||
__initcall(sh7343_devices_setup);
|
||||
|
||||
enum {
|
||||
UNUSED = 0,
|
||||
|
||||
/* interrupt sources */
|
||||
IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7,
|
||||
DMAC0, DMAC1, DMAC2, DMAC3,
|
||||
VIO_CEUI, VIO_BEUI, VIO_VEUI, VOU,
|
||||
MFI, VPU, TPU, Z3D4, USBI0, USBI1,
|
||||
MMC_ERR, MMC_TRAN, MMC_FSTAT, MMC_FRDY,
|
||||
DMAC4, DMAC5, DMAC_DADERR,
|
||||
KEYSC,
|
||||
SCIF, SCIF1, SCIF2, SCIF3, SCIF4,
|
||||
SIOF0, SIOF1, SIO,
|
||||
FLCTL_FLSTEI, FLCTL_FLENDI, FLCTL_FLTREQ0I, FLCTL_FLTREQ1I,
|
||||
I2C0_ALI, I2C0_TACKI, I2C0_WAITI, I2C0_DTEI,
|
||||
I2C1_ALI, I2C1_TACKI, I2C1_WAITI, I2C1_DTEI,
|
||||
SIM_TEI, SIM_TXI, SIM_RXI, SIM_ERI,
|
||||
IRDA,
|
||||
SDHI0, SDHI1, SDHI2, SDHI3,
|
||||
CMT, TSIF, SIU,
|
||||
TMU0, TMU1, TMU2,
|
||||
JPU, LCDC,
|
||||
|
||||
/* interrupt groups */
|
||||
|
||||
DMAC0123, VIOVOU, MMC, DMAC45, FLCTL, I2C0, I2C1, SIM, SDHI, USB,
|
||||
};
|
||||
|
||||
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(I2C1_ALI, 0x780), INTC_VECT(I2C1_TACKI, 0x7a0),
|
||||
INTC_VECT(I2C1_WAITI, 0x7c0), INTC_VECT(I2C1_DTEI, 0x7e0),
|
||||
INTC_VECT(DMAC0, 0x800), INTC_VECT(DMAC1, 0x820),
|
||||
INTC_VECT(DMAC2, 0x840), INTC_VECT(DMAC3, 0x860),
|
||||
INTC_VECT(VIO_CEUI, 0x880), INTC_VECT(VIO_BEUI, 0x8a0),
|
||||
INTC_VECT(VIO_VEUI, 0x8c0), INTC_VECT(VOU, 0x8e0),
|
||||
INTC_VECT(MFI, 0x900), INTC_VECT(VPU, 0x980),
|
||||
INTC_VECT(TPU, 0x9a0), INTC_VECT(Z3D4, 0x9e0),
|
||||
INTC_VECT(USBI0, 0xa20), INTC_VECT(USBI1, 0xa40),
|
||||
INTC_VECT(MMC_ERR, 0xb00), INTC_VECT(MMC_TRAN, 0xb20),
|
||||
INTC_VECT(MMC_FSTAT, 0xb40), INTC_VECT(MMC_FRDY, 0xb60),
|
||||
INTC_VECT(DMAC4, 0xb80), INTC_VECT(DMAC5, 0xba0),
|
||||
INTC_VECT(DMAC_DADERR, 0xbc0), INTC_VECT(KEYSC, 0xbe0),
|
||||
INTC_VECT(SCIF, 0xc00), INTC_VECT(SCIF1, 0xc20),
|
||||
INTC_VECT(SCIF2, 0xc40), INTC_VECT(SCIF3, 0xc60),
|
||||
INTC_VECT(SIOF0, 0xc80), INTC_VECT(SIOF1, 0xca0),
|
||||
INTC_VECT(SIO, 0xd00),
|
||||
INTC_VECT(FLCTL_FLSTEI, 0xd80), INTC_VECT(FLCTL_FLENDI, 0xda0),
|
||||
INTC_VECT(FLCTL_FLTREQ0I, 0xdc0), INTC_VECT(FLCTL_FLTREQ1I, 0xde0),
|
||||
INTC_VECT(I2C0_ALI, 0xe00), INTC_VECT(I2C0_TACKI, 0xe20),
|
||||
INTC_VECT(I2C0_WAITI, 0xe40), INTC_VECT(I2C0_DTEI, 0xe60),
|
||||
INTC_VECT(SDHI0, 0xe80), INTC_VECT(SDHI1, 0xea0),
|
||||
INTC_VECT(SDHI2, 0xec0), INTC_VECT(SDHI3, 0xee0),
|
||||
INTC_VECT(CMT, 0xf00), INTC_VECT(TSIF, 0xf20),
|
||||
INTC_VECT(SIU, 0xf80),
|
||||
INTC_VECT(TMU0, 0x400), INTC_VECT(TMU1, 0x420),
|
||||
INTC_VECT(TMU2, 0x440),
|
||||
INTC_VECT(JPU, 0x560), INTC_VECT(LCDC, 0x580),
|
||||
};
|
||||
|
||||
static struct intc_group groups[] __initdata = {
|
||||
INTC_GROUP(DMAC0123, DMAC0, DMAC1, DMAC2, DMAC3),
|
||||
INTC_GROUP(VIOVOU, VIO_CEUI, VIO_BEUI, VIO_VEUI, VOU),
|
||||
INTC_GROUP(MMC, MMC_FRDY, MMC_FSTAT, MMC_TRAN, MMC_ERR),
|
||||
INTC_GROUP(DMAC45, DMAC4, DMAC5, DMAC_DADERR),
|
||||
INTC_GROUP(FLCTL, FLCTL_FLSTEI, FLCTL_FLENDI,
|
||||
FLCTL_FLTREQ0I, FLCTL_FLTREQ1I),
|
||||
INTC_GROUP(I2C0, I2C0_ALI, I2C0_TACKI, I2C0_WAITI, I2C0_DTEI),
|
||||
INTC_GROUP(I2C1, I2C1_ALI, I2C1_TACKI, I2C1_WAITI, I2C1_DTEI),
|
||||
INTC_GROUP(SIM, SIM_TEI, SIM_TXI, SIM_RXI, SIM_ERI),
|
||||
INTC_GROUP(SDHI, SDHI0, SDHI1, SDHI2, SDHI3),
|
||||
INTC_GROUP(USB, USBI0, USBI1),
|
||||
};
|
||||
|
||||
static struct intc_mask_reg mask_registers[] __initdata = {
|
||||
{ 0xa4080084, 0xa40800c4, 8, /* IMR1 / IMCR1 */
|
||||
{ VOU, VIO_VEUI, VIO_BEUI, VIO_CEUI, DMAC3, DMAC2, DMAC1, DMAC0 } },
|
||||
{ 0xa4080088, 0xa40800c8, 8, /* IMR2 / IMCR2 */
|
||||
{ 0, 0, 0, VPU, 0, 0, 0, MFI } },
|
||||
{ 0xa408008c, 0xa40800cc, 8, /* IMR3 / IMCR3 */
|
||||
{ SIM_TEI, SIM_TXI, SIM_RXI, SIM_ERI, 0, 0, 0, IRDA } },
|
||||
{ 0xa4080090, 0xa40800d0, 8, /* IMR4 / IMCR4 */
|
||||
{ 0, TMU2, TMU1, TMU0, JPU, 0, 0, LCDC } },
|
||||
{ 0xa4080094, 0xa40800d4, 8, /* IMR5 / IMCR5 */
|
||||
{ KEYSC, DMAC_DADERR, DMAC5, DMAC4, SCIF3, SCIF2, SCIF1, SCIF } },
|
||||
{ 0xa4080098, 0xa40800d8, 8, /* IMR6 / IMCR6 */
|
||||
{ 0, 0, 0, SIO, Z3D4, 0, SIOF1, SIOF0 } },
|
||||
{ 0xa408009c, 0xa40800dc, 8, /* IMR7 / IMCR7 */
|
||||
{ I2C0_DTEI, I2C0_WAITI, I2C0_TACKI, I2C0_ALI,
|
||||
FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLENDI, FLCTL_FLSTEI } },
|
||||
{ 0xa40800a0, 0xa40800e0, 8, /* IMR8 / IMCR8 */
|
||||
{ SDHI3, SDHI2, SDHI1, SDHI0, 0, 0, 0, SIU } },
|
||||
{ 0xa40800a4, 0xa40800e4, 8, /* IMR9 / IMCR9 */
|
||||
{ 0, 0, 0, CMT, 0, USBI1, USBI0 } },
|
||||
{ 0xa40800a8, 0xa40800e8, 8, /* IMR10 / IMCR10 */
|
||||
{ MMC_FRDY, MMC_FSTAT, MMC_TRAN, MMC_ERR } },
|
||||
{ 0xa40800ac, 0xa40800ec, 8, /* IMR11 / IMCR11 */
|
||||
{ I2C1_DTEI, I2C1_WAITI, I2C1_TACKI, I2C1_ALI, TPU, 0, 0, TSIF } },
|
||||
{ 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, TMU1, TMU2 } },
|
||||
{ 0xa4080004, 0, 16, 4, /* IPRB */ { JPU, LCDC, SIM } },
|
||||
{ 0xa4080010, 0, 16, 4, /* IPRE */ { DMAC0123, VIOVOU, MFI, VPU } },
|
||||
{ 0xa4080014, 0, 16, 4, /* IPRF */ { KEYSC, DMAC45, USB, CMT } },
|
||||
{ 0xa4080018, 0, 16, 4, /* IPRG */ { SCIF, SCIF1, SCIF2, SCIF3 } },
|
||||
{ 0xa408001c, 0, 16, 4, /* IPRH */ { SIOF0, SIOF1, FLCTL, I2C0 } },
|
||||
{ 0xa4080020, 0, 16, 4, /* IPRI */ { SIO, 0, TSIF, I2C1 } },
|
||||
{ 0xa4080024, 0, 16, 4, /* IPRJ */ { Z3D4, 0, SIU } },
|
||||
{ 0xa4080028, 0, 16, 4, /* IPRK */ { 0, MMC, 0, SDHI } },
|
||||
{ 0xa408002c, 0, 16, 4, /* IPRL */ { 0, 0, TPU } },
|
||||
{ 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 struct intc_mask_reg ack_registers[] __initdata = {
|
||||
{ 0xa4140024, 0, 8, /* INTREQ00 */
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC_ACK(intc_desc, "sh7343", vectors, groups,
|
||||
mask_registers, prio_registers, sense_registers,
|
||||
ack_registers);
|
||||
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_intc_controller(&intc_desc);
|
||||
}
|
||||
|
@ -13,6 +13,112 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/serial_sci.h>
|
||||
#include <linux/uio_driver.h>
|
||||
#include <asm/clock.h>
|
||||
|
||||
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 uio_info vpu_platform_data = {
|
||||
.name = "VPU5",
|
||||
.version = "0",
|
||||
.irq = 60,
|
||||
};
|
||||
|
||||
static struct resource vpu_resources[] = {
|
||||
[0] = {
|
||||
.name = "VPU",
|
||||
.start = 0xfe900000,
|
||||
.end = 0xfe902807,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device vpu_device = {
|
||||
.name = "uio_pdrv_genirq",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &vpu_platform_data,
|
||||
},
|
||||
.resource = vpu_resources,
|
||||
.num_resources = ARRAY_SIZE(vpu_resources),
|
||||
};
|
||||
|
||||
static struct uio_info veu0_platform_data = {
|
||||
.name = "VEU",
|
||||
.version = "0",
|
||||
.irq = 54,
|
||||
};
|
||||
|
||||
static struct resource veu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "VEU(1)",
|
||||
.start = 0xfe920000,
|
||||
.end = 0xfe9200b7,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device veu0_device = {
|
||||
.name = "uio_pdrv_genirq",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &veu0_platform_data,
|
||||
},
|
||||
.resource = veu0_resources,
|
||||
.num_resources = ARRAY_SIZE(veu0_resources),
|
||||
};
|
||||
|
||||
static struct uio_info veu1_platform_data = {
|
||||
.name = "VEU",
|
||||
.version = "0",
|
||||
.irq = 27,
|
||||
};
|
||||
|
||||
static struct resource veu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "VEU(2)",
|
||||
.start = 0xfe924000,
|
||||
.end = 0xfe9240b7,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device veu1_device = {
|
||||
.name = "uio_pdrv_genirq",
|
||||
.id = 2,
|
||||
.dev = {
|
||||
.platform_data = &veu1_platform_data,
|
||||
},
|
||||
.resource = veu1_resources,
|
||||
.num_resources = ARRAY_SIZE(veu1_resources),
|
||||
};
|
||||
|
||||
static struct plat_sci_port sci_platform_data[] = {
|
||||
{
|
||||
@ -34,11 +140,32 @@ static struct platform_device sci_device = {
|
||||
};
|
||||
|
||||
static struct platform_device *sh7366_devices[] __initdata = {
|
||||
&iic_device,
|
||||
&sci_device,
|
||||
&vpu_device,
|
||||
&veu0_device,
|
||||
&veu1_device,
|
||||
};
|
||||
|
||||
static int __init sh7366_devices_setup(void)
|
||||
{
|
||||
clk_always_enable("mstp031"); /* TLB */
|
||||
clk_always_enable("mstp030"); /* IC */
|
||||
clk_always_enable("mstp029"); /* OC */
|
||||
clk_always_enable("mstp028"); /* RSMEM */
|
||||
clk_always_enable("mstp026"); /* XYMEM */
|
||||
clk_always_enable("mstp023"); /* INTC3 */
|
||||
clk_always_enable("mstp022"); /* INTC */
|
||||
clk_always_enable("mstp020"); /* SuperHyway */
|
||||
clk_always_enable("mstp109"); /* I2C */
|
||||
clk_always_enable("mstp207"); /* VEU-2 */
|
||||
clk_always_enable("mstp202"); /* VEU-1 */
|
||||
clk_always_enable("mstp201"); /* VPU */
|
||||
|
||||
platform_resource_setup_memory(&vpu_device, "vpu", 2 << 20);
|
||||
platform_resource_setup_memory(&veu0_device, "veu0", 2 << 20);
|
||||
platform_resource_setup_memory(&veu1_device, "veu1", 2 << 20);
|
||||
|
||||
return platform_add_devices(sh7366_devices,
|
||||
ARRAY_SIZE(sh7366_devices));
|
||||
}
|
||||
@ -97,7 +224,7 @@ static struct intc_vect vectors[] __initdata = {
|
||||
INTC_VECT(SIU, 0xf80),
|
||||
INTC_VECT(TMU0, 0x400), INTC_VECT(TMU1, 0x420),
|
||||
INTC_VECT(TMU2, 0x440),
|
||||
INTC_VECT(VEU2, 0x580), INTC_VECT(LCDC, 0x580),
|
||||
INTC_VECT(VEU2, 0x560), INTC_VECT(LCDC, 0x580),
|
||||
};
|
||||
|
||||
static struct intc_group groups[] __initdata = {
|
||||
@ -163,8 +290,14 @@ static struct intc_sense_reg sense_registers[] __initdata = {
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC(intc_desc, "sh7366", vectors, groups,
|
||||
mask_registers, prio_registers, sense_registers);
|
||||
static struct intc_mask_reg ack_registers[] __initdata = {
|
||||
{ 0xa4140024, 0, 8, /* INTREQ00 */
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC_ACK(intc_desc, "sh7366", vectors, groups,
|
||||
mask_registers, prio_registers, sense_registers,
|
||||
ack_registers);
|
||||
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
|
@ -12,6 +12,8 @@
|
||||
#include <linux/serial.h>
|
||||
#include <linux/serial_sci.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/uio_driver.h>
|
||||
#include <asm/clock.h>
|
||||
#include <asm/mmzone.h>
|
||||
|
||||
static struct resource usbf_resources[] = {
|
||||
@ -59,6 +61,62 @@ static struct platform_device iic_device = {
|
||||
.resource = iic_resources,
|
||||
};
|
||||
|
||||
static struct uio_info vpu_platform_data = {
|
||||
.name = "VPU4",
|
||||
.version = "0",
|
||||
.irq = 60,
|
||||
};
|
||||
|
||||
static struct resource vpu_resources[] = {
|
||||
[0] = {
|
||||
.name = "VPU",
|
||||
.start = 0xfe900000,
|
||||
.end = 0xfe9022eb,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device vpu_device = {
|
||||
.name = "uio_pdrv_genirq",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &vpu_platform_data,
|
||||
},
|
||||
.resource = vpu_resources,
|
||||
.num_resources = ARRAY_SIZE(vpu_resources),
|
||||
};
|
||||
|
||||
static struct uio_info veu_platform_data = {
|
||||
.name = "VEU",
|
||||
.version = "0",
|
||||
.irq = 54,
|
||||
};
|
||||
|
||||
static struct resource veu_resources[] = {
|
||||
[0] = {
|
||||
.name = "VEU",
|
||||
.start = 0xfe920000,
|
||||
.end = 0xfe9200b7,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device veu_device = {
|
||||
.name = "uio_pdrv_genirq",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &veu_platform_data,
|
||||
},
|
||||
.resource = veu_resources,
|
||||
.num_resources = ARRAY_SIZE(veu_resources),
|
||||
};
|
||||
|
||||
static struct plat_sci_port sci_platform_data[] = {
|
||||
{
|
||||
.mapbase = 0xffe00000,
|
||||
@ -95,10 +153,27 @@ static struct platform_device *sh7722_devices[] __initdata = {
|
||||
&usbf_device,
|
||||
&iic_device,
|
||||
&sci_device,
|
||||
&vpu_device,
|
||||
&veu_device,
|
||||
};
|
||||
|
||||
static int __init sh7722_devices_setup(void)
|
||||
{
|
||||
clk_always_enable("mstp031"); /* TLB */
|
||||
clk_always_enable("mstp030"); /* IC */
|
||||
clk_always_enable("mstp029"); /* OC */
|
||||
clk_always_enable("mstp028"); /* URAM */
|
||||
clk_always_enable("mstp026"); /* XYMEM */
|
||||
clk_always_enable("mstp022"); /* INTC */
|
||||
clk_always_enable("mstp020"); /* SuperHyway */
|
||||
clk_always_enable("mstp109"); /* I2C */
|
||||
clk_always_enable("mstp211"); /* USB */
|
||||
clk_always_enable("mstp202"); /* VEU */
|
||||
clk_always_enable("mstp201"); /* VPU */
|
||||
|
||||
platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20);
|
||||
platform_resource_setup_memory(&veu_device, "veu", 2 << 20);
|
||||
|
||||
return platform_add_devices(sh7722_devices,
|
||||
ARRAY_SIZE(sh7722_devices));
|
||||
}
|
||||
@ -229,8 +304,14 @@ static struct intc_sense_reg sense_registers[] __initdata = {
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC(intc_desc, "sh7722", vectors, groups,
|
||||
mask_registers, prio_registers, sense_registers);
|
||||
static struct intc_mask_reg ack_registers[] __initdata = {
|
||||
{ 0xa4140024, 0, 8, /* INTREQ00 */
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC_ACK(intc_desc, "sh7722", vectors, groups,
|
||||
mask_registers, prio_registers, sense_registers,
|
||||
ack_registers);
|
||||
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
|
@ -12,8 +12,94 @@
|
||||
#include <linux/serial.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/serial_sci.h>
|
||||
#include <linux/uio_driver.h>
|
||||
#include <asm/clock.h>
|
||||
#include <asm/mmzone.h>
|
||||
|
||||
static struct uio_info vpu_platform_data = {
|
||||
.name = "VPU5",
|
||||
.version = "0",
|
||||
.irq = 60,
|
||||
};
|
||||
|
||||
static struct resource vpu_resources[] = {
|
||||
[0] = {
|
||||
.name = "VPU",
|
||||
.start = 0xfe900000,
|
||||
.end = 0xfe902807,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device vpu_device = {
|
||||
.name = "uio_pdrv_genirq",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &vpu_platform_data,
|
||||
},
|
||||
.resource = vpu_resources,
|
||||
.num_resources = ARRAY_SIZE(vpu_resources),
|
||||
};
|
||||
|
||||
static struct uio_info veu0_platform_data = {
|
||||
.name = "VEU",
|
||||
.version = "0",
|
||||
.irq = 54,
|
||||
};
|
||||
|
||||
static struct resource veu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "VEU2H0",
|
||||
.start = 0xfe920000,
|
||||
.end = 0xfe92027b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device veu0_device = {
|
||||
.name = "uio_pdrv_genirq",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &veu0_platform_data,
|
||||
},
|
||||
.resource = veu0_resources,
|
||||
.num_resources = ARRAY_SIZE(veu0_resources),
|
||||
};
|
||||
|
||||
static struct uio_info veu1_platform_data = {
|
||||
.name = "VEU",
|
||||
.version = "0",
|
||||
.irq = 27,
|
||||
};
|
||||
|
||||
static struct resource veu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "VEU2H1",
|
||||
.start = 0xfe924000,
|
||||
.end = 0xfe92427b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device veu1_device = {
|
||||
.name = "uio_pdrv_genirq",
|
||||
.id = 2,
|
||||
.dev = {
|
||||
.platform_data = &veu1_platform_data,
|
||||
},
|
||||
.resource = veu1_resources,
|
||||
.num_resources = ARRAY_SIZE(veu1_resources),
|
||||
};
|
||||
|
||||
static struct plat_sci_port sci_platform_data[] = {
|
||||
{
|
||||
.mapbase = 0xffe00000,
|
||||
@ -113,14 +199,56 @@ static struct platform_device sh7723_usb_host_device = {
|
||||
.resource = sh7723_usb_host_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 platform_device *sh7723_devices[] __initdata = {
|
||||
&sci_device,
|
||||
&rtc_device,
|
||||
&iic_device,
|
||||
&sh7723_usb_host_device,
|
||||
&vpu_device,
|
||||
&veu0_device,
|
||||
&veu1_device,
|
||||
};
|
||||
|
||||
static int __init sh7723_devices_setup(void)
|
||||
{
|
||||
clk_always_enable("mstp031"); /* TLB */
|
||||
clk_always_enable("mstp030"); /* IC */
|
||||
clk_always_enable("mstp029"); /* OC */
|
||||
clk_always_enable("mstp024"); /* FPU */
|
||||
clk_always_enable("mstp022"); /* INTC */
|
||||
clk_always_enable("mstp020"); /* SuperHyway */
|
||||
clk_always_enable("mstp000"); /* MERAM */
|
||||
clk_always_enable("mstp109"); /* I2C */
|
||||
clk_always_enable("mstp108"); /* RTC */
|
||||
clk_always_enable("mstp211"); /* USB */
|
||||
clk_always_enable("mstp206"); /* VEU2H1 */
|
||||
clk_always_enable("mstp202"); /* VEU2H0 */
|
||||
clk_always_enable("mstp201"); /* VPU */
|
||||
|
||||
platform_resource_setup_memory(&vpu_device, "vpu", 2 << 20);
|
||||
platform_resource_setup_memory(&veu0_device, "veu0", 2 << 20);
|
||||
platform_resource_setup_memory(&veu1_device, "veu1", 2 << 20);
|
||||
|
||||
return platform_add_devices(sh7723_devices,
|
||||
ARRAY_SIZE(sh7723_devices));
|
||||
}
|
||||
@ -326,8 +454,14 @@ static struct intc_sense_reg sense_registers[] __initdata = {
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC(intc_desc, "sh7723", vectors, groups,
|
||||
mask_registers, prio_registers, sense_registers);
|
||||
static struct intc_mask_reg ack_registers[] __initdata = {
|
||||
{ 0xa4140024, 0, 8, /* INTREQ00 */
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC_ACK(intc_desc, "sh7723", vectors, groups,
|
||||
mask_registers, prio_registers, sense_registers,
|
||||
ack_registers);
|
||||
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2006 Paul Mundt
|
||||
* Copyright (C) 2007 Yoshihiro Shimoda
|
||||
* Copyright (C) 2008 Nobuhiro Iwamatsu
|
||||
*
|
||||
* 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
|
||||
@ -55,6 +56,11 @@ static struct plat_sci_port sci_platform_data[] = {
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
.type = PORT_SCIF,
|
||||
.irqs = { 76, 77, 79, 78 },
|
||||
}, {
|
||||
.mapbase = 0xffe10000,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
.type = PORT_SCIF,
|
||||
.irqs = { 104, 105, 107, 106 },
|
||||
}, {
|
||||
.flags = 0,
|
||||
}
|
||||
@ -208,8 +214,8 @@ static struct intc_vect vectors[] __initdata = {
|
||||
INTC_VECT(TMU5, 0xe40), INTC_VECT(ADC, 0xe60),
|
||||
INTC_VECT(SSI0, 0xe80), INTC_VECT(SSI1, 0xea0),
|
||||
INTC_VECT(SSI2, 0xec0), INTC_VECT(SSI3, 0xee0),
|
||||
INTC_VECT(SCIF1_ERI, 0xf00), INTC_VECT(SCIF1_RXI, 0xf20),
|
||||
INTC_VECT(SCIF1_BRI, 0xf40), INTC_VECT(SCIF1_TXI, 0xf60),
|
||||
INTC_VECT(SCIF2_ERI, 0xf00), INTC_VECT(SCIF2_RXI, 0xf20),
|
||||
INTC_VECT(SCIF2_BRI, 0xf40), INTC_VECT(SCIF2_TXI, 0xf60),
|
||||
INTC_VECT(GPIO_CH0, 0xf80), INTC_VECT(GPIO_CH1, 0xfa0),
|
||||
INTC_VECT(GPIO_CH2, 0xfc0), INTC_VECT(GPIO_CH3, 0xfe0),
|
||||
};
|
||||
@ -290,9 +296,14 @@ static struct intc_sense_reg irq_sense_registers[] __initdata = {
|
||||
IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC(intc_irq_desc, "sh7763-irq", irq_vectors,
|
||||
NULL, irq_mask_registers, irq_prio_registers,
|
||||
irq_sense_registers);
|
||||
static struct intc_mask_reg irq_ack_registers[] __initdata = {
|
||||
{ 0xffd00024, 0, 32, /* INTREQ */
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC_ACK(intc_irq_desc, "sh7763-irq", irq_vectors,
|
||||
NULL, irq_mask_registers, irq_prio_registers,
|
||||
irq_sense_registers, irq_ack_registers);
|
||||
|
||||
|
||||
/* External interrupt pins in IRL mode */
|
||||
|
@ -217,9 +217,14 @@ static struct intc_sense_reg irq_sense_registers[] __initdata = {
|
||||
IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC(intc_irq_desc, "sh7780-irq", irq_vectors,
|
||||
NULL, irq_mask_registers, irq_prio_registers,
|
||||
irq_sense_registers);
|
||||
static struct intc_mask_reg irq_ack_registers[] __initdata = {
|
||||
{ 0xffd00024, 0, 32, /* INTREQ */
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC_ACK(intc_irq_desc, "sh7780-irq", irq_vectors,
|
||||
NULL, irq_mask_registers, irq_prio_registers,
|
||||
irq_sense_registers, irq_ack_registers);
|
||||
|
||||
/* External interrupt pins in IRL mode */
|
||||
|
||||
|
@ -238,13 +238,18 @@ static struct intc_sense_reg sense_registers[] __initdata = {
|
||||
IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC(intc_desc_irq0123, "sh7785-irq0123", vectors_irq0123,
|
||||
NULL, mask_registers, prio_registers,
|
||||
sense_registers);
|
||||
static struct intc_mask_reg ack_registers[] __initdata = {
|
||||
{ 0xffd00024, 0, 32, /* INTREQ */
|
||||
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
|
||||
};
|
||||
|
||||
static DECLARE_INTC_DESC(intc_desc_irq4567, "sh7785-irq4567", vectors_irq4567,
|
||||
NULL, mask_registers, prio_registers,
|
||||
sense_registers);
|
||||
static DECLARE_INTC_DESC_ACK(intc_desc_irq0123, "sh7785-irq0123",
|
||||
vectors_irq0123, NULL, mask_registers,
|
||||
prio_registers, sense_registers, ack_registers);
|
||||
|
||||
static DECLARE_INTC_DESC_ACK(intc_desc_irq4567, "sh7785-irq4567",
|
||||
vectors_irq4567, NULL, mask_registers,
|
||||
prio_registers, sense_registers, ack_registers);
|
||||
|
||||
/* External interrupt pins in IRL mode */
|
||||
|
||||
|
@ -192,7 +192,7 @@ work_resched:
|
||||
.align 2
|
||||
1: .long schedule
|
||||
2: .long do_notify_resume
|
||||
3: .long restore_all
|
||||
3: .long resume_userspace
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
4: .long trace_hardirqs_on
|
||||
5: .long trace_hardirqs_off
|
||||
|
@ -34,18 +34,6 @@ void (*pm_idle)(void);
|
||||
void (*pm_power_off)(void);
|
||||
EXPORT_SYMBOL(pm_power_off);
|
||||
|
||||
void disable_hlt(void)
|
||||
{
|
||||
hlt_counter++;
|
||||
}
|
||||
EXPORT_SYMBOL(disable_hlt);
|
||||
|
||||
void enable_hlt(void)
|
||||
{
|
||||
hlt_counter--;
|
||||
}
|
||||
EXPORT_SYMBOL(enable_hlt);
|
||||
|
||||
static int __init nohlt_setup(char *__unused)
|
||||
{
|
||||
hlt_counter = 1;
|
||||
@ -60,7 +48,7 @@ static int __init hlt_setup(char *__unused)
|
||||
}
|
||||
__setup("hlt", hlt_setup);
|
||||
|
||||
void default_idle(void)
|
||||
static void default_idle(void)
|
||||
{
|
||||
if (!hlt_counter) {
|
||||
clear_thread_flag(TIF_POLLING_NRFLAG);
|
||||
|
@ -36,16 +36,6 @@ static int hlt_counter = 1;
|
||||
|
||||
#define HARD_IDLE_TIMEOUT (HZ / 3)
|
||||
|
||||
void disable_hlt(void)
|
||||
{
|
||||
hlt_counter++;
|
||||
}
|
||||
|
||||
void enable_hlt(void)
|
||||
{
|
||||
hlt_counter--;
|
||||
}
|
||||
|
||||
static int __init nohlt_setup(char *__unused)
|
||||
{
|
||||
hlt_counter = 1;
|
||||
|
@ -240,6 +240,29 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_BINFMT_ELF_FDPIC
|
||||
case PTRACE_GETFDPIC: {
|
||||
unsigned long tmp = 0;
|
||||
|
||||
switch (addr) {
|
||||
case PTRACE_GETFDPIC_EXEC:
|
||||
tmp = child->mm->context.exec_fdpic_loadmap;
|
||||
break;
|
||||
case PTRACE_GETFDPIC_INTERP:
|
||||
tmp = child->mm->context.interp_fdpic_loadmap;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
if (put_user(tmp, (unsigned long *) data)) {
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
ret = ptrace_request(child, request, addr, data);
|
||||
|
@ -398,6 +398,7 @@ const char *get_cpu_subtype(struct sh_cpuinfo *c)
|
||||
{
|
||||
return cpu_name[c->type];
|
||||
}
|
||||
EXPORT_SYMBOL(get_cpu_subtype);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
/* Symbolic CPU flags, keep in sync with asm/cpu-features.h */
|
||||
@ -452,6 +453,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
|
||||
seq_printf(m, "processor\t: %d\n", cpu);
|
||||
seq_printf(m, "cpu family\t: %s\n", init_utsname()->machine);
|
||||
seq_printf(m, "cpu type\t: %s\n", get_cpu_subtype(c));
|
||||
if (c->cut_major == -1)
|
||||
seq_printf(m, "cut\t\t: unknown\n");
|
||||
else if (c->cut_minor == -1)
|
||||
seq_printf(m, "cut\t\t: %d.x\n", c->cut_major);
|
||||
else
|
||||
seq_printf(m, "cut\t\t: %d.%d\n", c->cut_major, c->cut_minor);
|
||||
|
||||
show_cpuflags(m, c);
|
||||
|
||||
|
@ -33,6 +33,11 @@
|
||||
|
||||
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
|
||||
|
||||
struct fdpic_func_descriptor {
|
||||
unsigned long text;
|
||||
unsigned long GOT;
|
||||
};
|
||||
|
||||
/*
|
||||
* Atomically swap in the new signal mask, and wait for a signal.
|
||||
*/
|
||||
@ -368,6 +373,7 @@ static int setup_frame(int sig, struct k_sigaction *ka,
|
||||
err |= __put_user(OR_R0_R0, &frame->retcode[6]);
|
||||
err |= __put_user((__NR_sigreturn), &frame->retcode[7]);
|
||||
regs->pr = (unsigned long) frame->retcode;
|
||||
flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode));
|
||||
}
|
||||
|
||||
if (err)
|
||||
@ -378,18 +384,21 @@ static int setup_frame(int sig, struct k_sigaction *ka,
|
||||
regs->regs[4] = signal; /* Arg for signal handler */
|
||||
regs->regs[5] = 0;
|
||||
regs->regs[6] = (unsigned long) &frame->sc;
|
||||
regs->pc = (unsigned long) ka->sa.sa_handler;
|
||||
|
||||
if (current->personality & FDPIC_FUNCPTRS) {
|
||||
struct fdpic_func_descriptor __user *funcptr =
|
||||
(struct fdpic_func_descriptor __user *)ka->sa.sa_handler;
|
||||
|
||||
__get_user(regs->pc, &funcptr->text);
|
||||
__get_user(regs->regs[12], &funcptr->GOT);
|
||||
} else
|
||||
regs->pc = (unsigned long)ka->sa.sa_handler;
|
||||
|
||||
set_fs(USER_DS);
|
||||
|
||||
pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n",
|
||||
current->comm, task_pid_nr(current), frame, regs->pc, regs->pr);
|
||||
|
||||
flush_cache_sigtramp(regs->pr);
|
||||
|
||||
if ((-regs->pr & (L1_CACHE_BYTES-1)) < sizeof(frame->retcode))
|
||||
flush_cache_sigtramp(regs->pr + L1_CACHE_BYTES);
|
||||
|
||||
return 0;
|
||||
|
||||
give_sigsegv:
|
||||
@ -458,17 +467,22 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||
regs->regs[4] = signal; /* Arg for signal handler */
|
||||
regs->regs[5] = (unsigned long) &frame->info;
|
||||
regs->regs[6] = (unsigned long) &frame->uc;
|
||||
regs->pc = (unsigned long) ka->sa.sa_handler;
|
||||
|
||||
if (current->personality & FDPIC_FUNCPTRS) {
|
||||
struct fdpic_func_descriptor __user *funcptr =
|
||||
(struct fdpic_func_descriptor __user *)ka->sa.sa_handler;
|
||||
|
||||
__get_user(regs->pc, &funcptr->text);
|
||||
__get_user(regs->regs[12], &funcptr->GOT);
|
||||
} else
|
||||
regs->pc = (unsigned long)ka->sa.sa_handler;
|
||||
|
||||
set_fs(USER_DS);
|
||||
|
||||
pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n",
|
||||
current->comm, task_pid_nr(current), frame, regs->pc, regs->pr);
|
||||
|
||||
flush_cache_sigtramp(regs->pr);
|
||||
|
||||
if ((-regs->pr & (L1_CACHE_BYTES-1)) < sizeof(frame->retcode))
|
||||
flush_cache_sigtramp(regs->pr + L1_CACHE_BYTES);
|
||||
flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode));
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -343,3 +343,9 @@ ENTRY(sys_call_table)
|
||||
.long sys_fallocate
|
||||
.long sys_timerfd_settime /* 325 */
|
||||
.long sys_timerfd_gettime
|
||||
.long sys_signalfd4
|
||||
.long sys_eventfd2
|
||||
.long sys_epoll_create1
|
||||
.long sys_dup3 /* 330 */
|
||||
.long sys_pipe2
|
||||
.long sys_inotify_init1
|
||||
|
@ -381,3 +381,9 @@ sys_call_table:
|
||||
.long sys_fallocate
|
||||
.long sys_timerfd_settime
|
||||
.long sys_timerfd_gettime
|
||||
.long sys_signalfd4 /* 355 */
|
||||
.long sys_eventfd2
|
||||
.long sys_epoll_create1
|
||||
.long sys_dup3
|
||||
.long sys_pipe2
|
||||
.long sys_inotify_init1 /* 360 */
|
||||
|
@ -211,7 +211,7 @@ unsigned long sh_hpt_frequency = 0;
|
||||
|
||||
#define NSEC_PER_CYC_SHIFT 10
|
||||
|
||||
struct clocksource clocksource_sh = {
|
||||
static struct clocksource clocksource_sh = {
|
||||
.name = "SuperH",
|
||||
.rating = 200,
|
||||
.mask = CLOCKSOURCE_MASK(32),
|
||||
|
@ -209,7 +209,7 @@ static int tmu_timer_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct sys_timer_ops tmu_timer_ops = {
|
||||
static struct sys_timer_ops tmu_timer_ops = {
|
||||
.init = tmu_timer_init,
|
||||
.start = tmu_timer_start,
|
||||
.stop = tmu_timer_stop,
|
||||
|
@ -43,6 +43,7 @@
|
||||
# define TRAP_ILLEGAL_SLOT_INST 6
|
||||
# define TRAP_ADDRESS_ERROR 9
|
||||
# ifdef CONFIG_CPU_SH2A
|
||||
# define TRAP_FPU_ERROR 13
|
||||
# define TRAP_DIVZERO_ERROR 17
|
||||
# define TRAP_DIVOVF_ERROR 18
|
||||
# endif
|
||||
@ -851,6 +852,9 @@ void __init trap_init(void)
|
||||
#ifdef CONFIG_CPU_SH2A
|
||||
set_exception_table_vec(TRAP_DIVZERO_ERROR, do_divide_error);
|
||||
set_exception_table_vec(TRAP_DIVOVF_ERROR, do_divide_error);
|
||||
#ifdef CONFIG_SH_FPU
|
||||
set_exception_table_vec(TRAP_FPU_ERROR, fpu_error_trap_handler);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Setup VBR for boot cpu */
|
||||
|
@ -2,9 +2,11 @@
|
||||
# Makefile for SuperH-specific library files..
|
||||
#
|
||||
|
||||
lib-y = delay.o io.o memset.o memmove.o memchr.o \
|
||||
lib-y = delay.o memset.o memmove.o memchr.o \
|
||||
checksum.o strlen.o div64.o div64-generic.o
|
||||
|
||||
obj-y += io.o
|
||||
|
||||
memcpy-y := memcpy.o
|
||||
memcpy-$(CONFIG_CPU_SH4) := memcpy-sh4.o
|
||||
|
||||
|
@ -145,25 +145,39 @@ choice
|
||||
|
||||
config PAGE_SIZE_4KB
|
||||
bool "4kB"
|
||||
depends on !X2TLB
|
||||
depends on !MMU || !X2TLB
|
||||
help
|
||||
This is the default page size used by all SuperH CPUs.
|
||||
|
||||
config PAGE_SIZE_8KB
|
||||
bool "8kB"
|
||||
depends on X2TLB
|
||||
depends on !MMU || X2TLB
|
||||
help
|
||||
This enables 8kB pages as supported by SH-X2 and later MMUs.
|
||||
|
||||
config PAGE_SIZE_16KB
|
||||
bool "16kB"
|
||||
depends on !MMU
|
||||
help
|
||||
This enables 16kB pages on MMU-less SH systems.
|
||||
|
||||
config PAGE_SIZE_64KB
|
||||
bool "64kB"
|
||||
depends on CPU_SH4 || CPU_SH5
|
||||
depends on !MMU || CPU_SH4 || CPU_SH5
|
||||
help
|
||||
This enables support for 64kB pages, possible on all SH-4
|
||||
CPUs and later.
|
||||
|
||||
endchoice
|
||||
|
||||
config ENTRY_OFFSET
|
||||
hex
|
||||
default "0x00001000" if PAGE_SIZE_4KB
|
||||
default "0x00002000" if PAGE_SIZE_8KB
|
||||
default "0x00004000" if PAGE_SIZE_16KB
|
||||
default "0x00010000" if PAGE_SIZE_64KB
|
||||
default "0x00000000"
|
||||
|
||||
choice
|
||||
prompt "HugeTLB page size"
|
||||
depends on HUGETLB_PAGE && (CPU_SH4 || CPU_SH5) && MMU
|
||||
|
@ -120,7 +120,7 @@ static const struct file_operations cache_debugfs_fops = {
|
||||
.open = cache_debugfs_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = seq_release,
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
static int __init cache_debugfs_init(void)
|
||||
|
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 1999, 2000, 2002 Niibe Yutaka
|
||||
* Copyright (C) 2001 - 2007 Paul Mundt
|
||||
* Copyright (C) 2003 Richard Curnow
|
||||
* Copyright (c) 2007 STMicroelectronics (R&D) Ltd.
|
||||
*
|
||||
* 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
|
||||
@ -22,6 +23,7 @@
|
||||
* entirety.
|
||||
*/
|
||||
#define MAX_DCACHE_PAGES 64 /* XXX: Tune for ways */
|
||||
#define MAX_ICACHE_PAGES 32
|
||||
|
||||
static void __flush_dcache_segment_1way(unsigned long start,
|
||||
unsigned long extent);
|
||||
@ -178,42 +180,45 @@ void __flush_invalidate_region(void *start, int size)
|
||||
/*
|
||||
* Write back the range of D-cache, and purge the I-cache.
|
||||
*
|
||||
* Called from kernel/module.c:sys_init_module and routine for a.out format.
|
||||
* Called from kernel/module.c:sys_init_module and routine for a.out format,
|
||||
* signal handler code and kprobes code
|
||||
*/
|
||||
void flush_icache_range(unsigned long start, unsigned long end)
|
||||
{
|
||||
flush_cache_all();
|
||||
}
|
||||
|
||||
/*
|
||||
* Write back the D-cache and purge the I-cache for signal trampoline.
|
||||
* .. which happens to be the same behavior as flush_icache_range().
|
||||
* So, we simply flush out a line.
|
||||
*/
|
||||
void __uses_jump_to_uncached flush_cache_sigtramp(unsigned long addr)
|
||||
{
|
||||
unsigned long v, index;
|
||||
unsigned long flags;
|
||||
int icacheaddr;
|
||||
unsigned long flags, v;
|
||||
int i;
|
||||
|
||||
v = addr & ~(L1_CACHE_BYTES-1);
|
||||
asm volatile("ocbwb %0"
|
||||
: /* no output */
|
||||
: "m" (__m(v)));
|
||||
/* If there are too many pages then just blow the caches */
|
||||
if (((end - start) >> PAGE_SHIFT) >= MAX_ICACHE_PAGES) {
|
||||
flush_cache_all();
|
||||
} else {
|
||||
/* selectively flush d-cache then invalidate the i-cache */
|
||||
/* this is inefficient, so only use for small ranges */
|
||||
start &= ~(L1_CACHE_BYTES-1);
|
||||
end += L1_CACHE_BYTES-1;
|
||||
end &= ~(L1_CACHE_BYTES-1);
|
||||
|
||||
index = CACHE_IC_ADDRESS_ARRAY |
|
||||
(v & boot_cpu_data.icache.entry_mask);
|
||||
local_irq_save(flags);
|
||||
jump_to_uncached();
|
||||
|
||||
local_irq_save(flags);
|
||||
jump_to_uncached();
|
||||
for (v = start; v < end; v+=L1_CACHE_BYTES) {
|
||||
asm volatile("ocbwb %0"
|
||||
: /* no output */
|
||||
: "m" (__m(v)));
|
||||
|
||||
for (i = 0; i < boot_cpu_data.icache.ways;
|
||||
i++, index += boot_cpu_data.icache.way_incr)
|
||||
ctrl_outl(0, index); /* Clear out Valid-bit */
|
||||
icacheaddr = CACHE_IC_ADDRESS_ARRAY | (
|
||||
v & cpu_data->icache.entry_mask);
|
||||
|
||||
back_to_cached();
|
||||
wmb();
|
||||
local_irq_restore(flags);
|
||||
for (i = 0; i < cpu_data->icache.ways;
|
||||
i++, icacheaddr += cpu_data->icache.way_incr)
|
||||
/* Clear i-cache line valid-bit */
|
||||
ctrl_outl(0, icacheaddr);
|
||||
}
|
||||
|
||||
back_to_cached();
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void flush_cache_4096(unsigned long start,
|
||||
|
@ -10,6 +10,7 @@
|
||||
* for more details.
|
||||
*/
|
||||
#include <linux/mm.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/addrspace.h>
|
||||
@ -185,3 +186,32 @@ void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(dma_cache_sync);
|
||||
|
||||
int platform_resource_setup_memory(struct platform_device *pdev,
|
||||
char *name, unsigned long memsize)
|
||||
{
|
||||
struct resource *r;
|
||||
dma_addr_t dma_handle;
|
||||
void *buf;
|
||||
|
||||
r = pdev->resource + pdev->num_resources - 1;
|
||||
if (r->flags) {
|
||||
pr_warning("%s: unable to find empty space for resource\n",
|
||||
name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
buf = dma_alloc_coherent(NULL, memsize, &dma_handle, GFP_KERNEL);
|
||||
if (!buf) {
|
||||
pr_warning("%s: unable to allocate memory\n", name);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset(buf, 0, memsize);
|
||||
|
||||
r->flags = IORESOURCE_MEM;
|
||||
r->start = dma_handle;
|
||||
r->end = r->start + memsize - 1;
|
||||
r->name = name;
|
||||
return 0;
|
||||
}
|
||||
|
@ -37,16 +37,12 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
|
||||
int fault;
|
||||
siginfo_t info;
|
||||
|
||||
trace_hardirqs_on();
|
||||
local_irq_enable();
|
||||
|
||||
#ifdef CONFIG_SH_KGDB
|
||||
if (kgdb_nofault && kgdb_bus_err_hook)
|
||||
kgdb_bus_err_hook();
|
||||
#endif
|
||||
|
||||
tsk = current;
|
||||
mm = tsk->mm;
|
||||
si_code = SEGV_MAPERR;
|
||||
|
||||
if (unlikely(address >= TASK_SIZE)) {
|
||||
@ -88,6 +84,14 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Only enable interrupts if they were on before the fault */
|
||||
if ((regs->sr & SR_IMASK) != SR_IMASK) {
|
||||
trace_hardirqs_on();
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
mm = tsk->mm;
|
||||
|
||||
/*
|
||||
* If we're in an interrupt or have no user
|
||||
* context, we must not take the fault..
|
||||
|
@ -111,7 +111,7 @@ EXPORT_SYMBOL(copy_user_highpage);
|
||||
/*
|
||||
* For SH-4, we have our own implementation for ptep_get_and_clear
|
||||
*/
|
||||
inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
|
||||
pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
|
||||
{
|
||||
pte_t pte = *ptep;
|
||||
|
||||
|
@ -118,7 +118,7 @@ void copy_user_page(void *to, void *from, unsigned long address, struct page *pg
|
||||
* For SH7705, we have our own implementation for ptep_get_and_clear
|
||||
* Copied from pg-sh4.c
|
||||
*/
|
||||
inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
|
||||
pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
|
||||
{
|
||||
pte_t pte = *ptep;
|
||||
|
||||
|
@ -385,7 +385,7 @@ static const struct file_operations pmb_debugfs_fops = {
|
||||
.open = pmb_debugfs_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = seq_release,
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
static int __init pmb_debugfs_init(void)
|
||||
|
@ -46,3 +46,7 @@ R2D_1 RTS7751R2D_1
|
||||
CAYMAN SH_CAYMAN
|
||||
SDK7780 SH_SDK7780
|
||||
MIGOR SH_MIGOR
|
||||
RSK7203 SH_RSK7203
|
||||
AP325RXA SH_AP325RXA
|
||||
SH7763RDP SH_SH7763RDP
|
||||
SH7785LCR SH_SH7785LCR
|
||||
|
@ -158,25 +158,18 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev)
|
||||
memcpy(&priv->pdata, pdev->dev.platform_data, sizeof(priv->pdata));
|
||||
pdata = &priv->pdata;
|
||||
|
||||
res = request_mem_region(res->start, res_size(res), pdev->name);
|
||||
if (res == NULL) {
|
||||
dev_err(&pdev->dev, "failed to request I/O memory\n");
|
||||
error = -EBUSY;
|
||||
goto err1;
|
||||
}
|
||||
|
||||
priv->iomem_base = ioremap_nocache(res->start, res_size(res));
|
||||
if (priv->iomem_base == NULL) {
|
||||
dev_err(&pdev->dev, "failed to remap I/O memory\n");
|
||||
error = -ENXIO;
|
||||
goto err2;
|
||||
goto err1;
|
||||
}
|
||||
|
||||
priv->input = input_allocate_device();
|
||||
if (!priv->input) {
|
||||
dev_err(&pdev->dev, "failed to allocate input device\n");
|
||||
error = -ENOMEM;
|
||||
goto err3;
|
||||
goto err2;
|
||||
}
|
||||
|
||||
input = priv->input;
|
||||
@ -194,7 +187,7 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev)
|
||||
error = request_irq(irq, sh_keysc_isr, 0, pdev->name, pdev);
|
||||
if (error) {
|
||||
dev_err(&pdev->dev, "failed to request IRQ\n");
|
||||
goto err4;
|
||||
goto err3;
|
||||
}
|
||||
|
||||
for (i = 0; i < SH_KEYSC_MAXKEYS; i++) {
|
||||
@ -206,7 +199,7 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev)
|
||||
error = input_register_device(input);
|
||||
if (error) {
|
||||
dev_err(&pdev->dev, "failed to register input device\n");
|
||||
goto err5;
|
||||
goto err4;
|
||||
}
|
||||
|
||||
iowrite16((sh_keysc_mode[pdata->mode].kymd << 8) |
|
||||
@ -214,14 +207,12 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev)
|
||||
iowrite16(0, priv->iomem_base + KYOUTDR_OFFS);
|
||||
iowrite16(KYCR2_IRQ_LEVEL, priv->iomem_base + KYCR2_OFFS);
|
||||
return 0;
|
||||
err5:
|
||||
free_irq(irq, pdev);
|
||||
err4:
|
||||
input_free_device(input);
|
||||
free_irq(irq, pdev);
|
||||
err3:
|
||||
iounmap(priv->iomem_base);
|
||||
input_free_device(input);
|
||||
err2:
|
||||
release_mem_region(res->start, res_size(res));
|
||||
iounmap(priv->iomem_base);
|
||||
err1:
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
kfree(priv);
|
||||
@ -232,7 +223,6 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev)
|
||||
static int __devexit sh_keysc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct sh_keysc_priv *priv = platform_get_drvdata(pdev);
|
||||
struct resource *res;
|
||||
|
||||
iowrite16(KYCR2_IRQ_DISABLED, priv->iomem_base + KYCR2_OFFS);
|
||||
|
||||
@ -240,9 +230,6 @@ static int __devexit sh_keysc_remove(struct platform_device *pdev)
|
||||
free_irq(platform_get_irq(pdev, 0), pdev);
|
||||
iounmap(priv->iomem_base);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
release_mem_region(res->start, res_size(res));
|
||||
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
kfree(priv);
|
||||
return 0;
|
||||
|
@ -410,7 +410,6 @@ static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CPU_SUBTYPE_SH7760) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7763) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7780) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7785)
|
||||
static inline int scif_txroom(struct uart_port *port)
|
||||
@ -422,6 +421,22 @@ static inline int scif_rxroom(struct uart_port *port)
|
||||
{
|
||||
return sci_in(port, SCRFDR) & 0xff;
|
||||
}
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7763)
|
||||
static inline int scif_txroom(struct uart_port *port)
|
||||
{
|
||||
if((port->mapbase == 0xffe00000) || (port->mapbase == 0xffe08000)) /* SCIF0/1*/
|
||||
return SCIF_TXROOM_MAX - (sci_in(port, SCTFDR) & 0xff);
|
||||
else /* SCIF2 */
|
||||
return SCIF2_TXROOM_MAX - (sci_in(port, SCFDR) >> 8);
|
||||
}
|
||||
|
||||
static inline int scif_rxroom(struct uart_port *port)
|
||||
{
|
||||
if((port->mapbase == 0xffe00000) || (port->mapbase == 0xffe08000)) /* SCIF0/1*/
|
||||
return sci_in(port, SCRFDR) & 0xff;
|
||||
else /* SCIF2 */
|
||||
return sci_in(port, SCFDR) & SCIF2_RFDC_MASK;
|
||||
}
|
||||
#else
|
||||
static inline int scif_txroom(struct uart_port *port)
|
||||
{
|
||||
|
@ -123,8 +123,9 @@
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7763)
|
||||
# define SCSPTR0 0xffe00024 /* 16 bit SCIF */
|
||||
# define SCSPTR1 0xffe08024 /* 16 bit SCIF */
|
||||
# define SCSPTR2 0xffe10020 /* 16 bit SCIF/IRDA */
|
||||
# define SCIF_ORER 0x0001 /* overrun error bit */
|
||||
# define SCSCR_INIT(port) 0x3a /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
|
||||
# define SCSCR_INIT(port) 0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
|
||||
# define SCIF_ONLY
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7770)
|
||||
# define SCSPTR0 0xff923020 /* 16 bit SCIF */
|
||||
@ -188,6 +189,7 @@
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7750S) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7751) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7751R) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7763) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7780) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7785) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SHX3)
|
||||
@ -225,14 +227,21 @@
|
||||
#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7720) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7721)
|
||||
#define SCIF_ORER 0x0200
|
||||
#define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK | SCIF_ORER)
|
||||
#define SCIF_RFDC_MASK 0x007f
|
||||
#define SCIF_TXROOM_MAX 64
|
||||
# define SCIF_ORER 0x0200
|
||||
# define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK | SCIF_ORER)
|
||||
# define SCIF_RFDC_MASK 0x007f
|
||||
# define SCIF_TXROOM_MAX 64
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7763)
|
||||
# define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK )
|
||||
# define SCIF_RFDC_MASK 0x007f
|
||||
# define SCIF_TXROOM_MAX 64
|
||||
/* SH7763 SCIF2 support */
|
||||
# define SCIF2_RFDC_MASK 0x001f
|
||||
# define SCIF2_TXROOM_MAX 16
|
||||
#else
|
||||
#define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK)
|
||||
#define SCIF_RFDC_MASK 0x001f
|
||||
#define SCIF_TXROOM_MAX 16
|
||||
# define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK)
|
||||
# define SCIF_RFDC_MASK 0x001f
|
||||
# define SCIF_TXROOM_MAX 16
|
||||
#endif
|
||||
|
||||
#if defined(SCI_ONLY)
|
||||
@ -445,11 +454,16 @@ SCIF_FNS(SCFCR, 0x0c, 8, 0x18, 16)
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7763) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7780) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7785)
|
||||
SCIF_FNS(SCFDR, 0x0e, 16, 0x1C, 16)
|
||||
SCIF_FNS(SCTFDR, 0x0e, 16, 0x1C, 16)
|
||||
SCIF_FNS(SCRFDR, 0x0e, 16, 0x20, 16)
|
||||
SCIF_FNS(SCSPTR, 0, 0, 0x24, 16)
|
||||
SCIF_FNS(SCLSR, 0, 0, 0x28, 16)
|
||||
#if defined(CONFIG_CPU_SUBTYPE_SH7763)
|
||||
/* SH7763 SCIF2 */
|
||||
SCIF_FNS(SCFDR, 0, 0, 0x1C, 16)
|
||||
SCIF_FNS(SCSPTR2, 0, 0, 0x20, 16)
|
||||
SCIF_FNS(SCLSR2, 0, 0, 0x24, 16)
|
||||
#endif /* CONFIG_CPU_SUBTYPE_SH7763 */
|
||||
#else
|
||||
SCIF_FNS(SCFDR, 0x0e, 16, 0x1C, 16)
|
||||
#if defined(CONFIG_CPU_SUBTYPE_SH7722)
|
||||
@ -652,6 +666,9 @@ static inline int sci_rxd_in(struct uart_port *port)
|
||||
return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
|
||||
if (port->mapbase == 0xffe08000)
|
||||
return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
|
||||
if (port->mapbase == 0xffe10000)
|
||||
return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF/IRDA */
|
||||
|
||||
return 1;
|
||||
}
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7770)
|
||||
@ -764,8 +781,7 @@ static inline int sci_rxd_in(struct uart_port *port)
|
||||
* -- Mitch Davis - 15 Jul 2000
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_CPU_SUBTYPE_SH7763) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7780) || \
|
||||
#if defined(CONFIG_CPU_SUBTYPE_SH7780) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7785)
|
||||
#define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(16*bps)-1)
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \
|
||||
|
@ -30,7 +30,7 @@ config COMPAT_BINFMT_ELF
|
||||
config BINFMT_ELF_FDPIC
|
||||
bool "Kernel support for FDPIC ELF binaries"
|
||||
default y
|
||||
depends on (FRV || BLACKFIN)
|
||||
depends on (FRV || BLACKFIN || (SUPERH32 && !MMU))
|
||||
help
|
||||
ELF FDPIC binaries are based on ELF, but allow the individual load
|
||||
segments of a binary to be located in memory independently of each
|
||||
|
@ -470,6 +470,7 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
|
||||
char __user *u_platform, *p;
|
||||
long hwcap;
|
||||
int loop;
|
||||
int nr; /* reset for each csp adjustment */
|
||||
|
||||
/* we're going to shovel a whole load of stuff onto the stack */
|
||||
#ifdef CONFIG_MMU
|
||||
@ -542,10 +543,7 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
|
||||
/* force 16 byte _final_ alignment here for generality */
|
||||
#define DLINFO_ITEMS 13
|
||||
|
||||
nitems = 1 + DLINFO_ITEMS + (k_platform ? 1 : 0);
|
||||
#ifdef DLINFO_ARCH_ITEMS
|
||||
nitems += DLINFO_ARCH_ITEMS;
|
||||
#endif
|
||||
nitems = 1 + DLINFO_ITEMS + (k_platform ? 1 : 0) + AT_VECTOR_SIZE_ARCH;
|
||||
|
||||
csp = sp;
|
||||
sp -= nitems * 2 * sizeof(unsigned long);
|
||||
@ -557,39 +555,46 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
|
||||
sp -= sp & 15UL;
|
||||
|
||||
/* put the ELF interpreter info on the stack */
|
||||
#define NEW_AUX_ENT(nr, id, val) \
|
||||
#define NEW_AUX_ENT(id, val) \
|
||||
do { \
|
||||
struct { unsigned long _id, _val; } __user *ent; \
|
||||
\
|
||||
ent = (void __user *) csp; \
|
||||
__put_user((id), &ent[nr]._id); \
|
||||
__put_user((val), &ent[nr]._val); \
|
||||
nr++; \
|
||||
} while (0)
|
||||
|
||||
nr = 0;
|
||||
csp -= 2 * sizeof(unsigned long);
|
||||
NEW_AUX_ENT(0, AT_NULL, 0);
|
||||
NEW_AUX_ENT(AT_NULL, 0);
|
||||
if (k_platform) {
|
||||
nr = 0;
|
||||
csp -= 2 * sizeof(unsigned long);
|
||||
NEW_AUX_ENT(0, AT_PLATFORM,
|
||||
NEW_AUX_ENT(AT_PLATFORM,
|
||||
(elf_addr_t) (unsigned long) u_platform);
|
||||
}
|
||||
|
||||
nr = 0;
|
||||
csp -= DLINFO_ITEMS * 2 * sizeof(unsigned long);
|
||||
NEW_AUX_ENT( 0, AT_HWCAP, hwcap);
|
||||
NEW_AUX_ENT( 1, AT_PAGESZ, PAGE_SIZE);
|
||||
NEW_AUX_ENT( 2, AT_CLKTCK, CLOCKS_PER_SEC);
|
||||
NEW_AUX_ENT( 3, AT_PHDR, exec_params->ph_addr);
|
||||
NEW_AUX_ENT( 4, AT_PHENT, sizeof(struct elf_phdr));
|
||||
NEW_AUX_ENT( 5, AT_PHNUM, exec_params->hdr.e_phnum);
|
||||
NEW_AUX_ENT( 6, AT_BASE, interp_params->elfhdr_addr);
|
||||
NEW_AUX_ENT( 7, AT_FLAGS, 0);
|
||||
NEW_AUX_ENT( 8, AT_ENTRY, exec_params->entry_addr);
|
||||
NEW_AUX_ENT( 9, AT_UID, (elf_addr_t) current->uid);
|
||||
NEW_AUX_ENT(10, AT_EUID, (elf_addr_t) current->euid);
|
||||
NEW_AUX_ENT(11, AT_GID, (elf_addr_t) current->gid);
|
||||
NEW_AUX_ENT(12, AT_EGID, (elf_addr_t) current->egid);
|
||||
NEW_AUX_ENT(AT_HWCAP, hwcap);
|
||||
NEW_AUX_ENT(AT_PAGESZ, PAGE_SIZE);
|
||||
NEW_AUX_ENT(AT_CLKTCK, CLOCKS_PER_SEC);
|
||||
NEW_AUX_ENT(AT_PHDR, exec_params->ph_addr);
|
||||
NEW_AUX_ENT(AT_PHENT, sizeof(struct elf_phdr));
|
||||
NEW_AUX_ENT(AT_PHNUM, exec_params->hdr.e_phnum);
|
||||
NEW_AUX_ENT(AT_BASE, interp_params->elfhdr_addr);
|
||||
NEW_AUX_ENT(AT_FLAGS, 0);
|
||||
NEW_AUX_ENT(AT_ENTRY, exec_params->entry_addr);
|
||||
NEW_AUX_ENT(AT_UID, (elf_addr_t) current->uid);
|
||||
NEW_AUX_ENT(AT_EUID, (elf_addr_t) current->euid);
|
||||
NEW_AUX_ENT(AT_GID, (elf_addr_t) current->gid);
|
||||
NEW_AUX_ENT(AT_EGID, (elf_addr_t) current->egid);
|
||||
|
||||
#ifdef ARCH_DLINFO
|
||||
nr = 0;
|
||||
csp -= AT_VECTOR_SIZE_ARCH * 2 * sizeof(unsigned long);
|
||||
|
||||
/* ARCH_DLINFO must come last so platform specific code can enforce
|
||||
* special alignment requirements on the AUXV if necessary (eg. PPC).
|
||||
*/
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
struct clk;
|
||||
|
||||
@ -30,6 +31,7 @@ struct clk {
|
||||
|
||||
unsigned long rate;
|
||||
unsigned long flags;
|
||||
unsigned long arch_flags;
|
||||
};
|
||||
|
||||
#define CLK_ALWAYS_ENABLED (1 << 0)
|
||||
@ -41,14 +43,27 @@ void arch_init_clk_ops(struct clk_ops **, int type);
|
||||
/* arch/sh/kernel/cpu/clock.c */
|
||||
int clk_init(void);
|
||||
|
||||
int __clk_enable(struct clk *);
|
||||
void __clk_disable(struct clk *);
|
||||
|
||||
void clk_recalc_rate(struct clk *);
|
||||
|
||||
int clk_register(struct clk *);
|
||||
void clk_unregister(struct clk *);
|
||||
|
||||
static inline int clk_always_enable(const char *id)
|
||||
{
|
||||
struct clk *clk;
|
||||
int ret;
|
||||
|
||||
clk = clk_get(NULL, id);
|
||||
if (IS_ERR(clk))
|
||||
return PTR_ERR(clk);
|
||||
|
||||
ret = clk_enable(clk);
|
||||
if (ret)
|
||||
clk_put(clk);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* the exported API, in addition to clk_set_rate */
|
||||
/**
|
||||
* clk_set_rate_ex - set the clock rate for a clock source, with additional parameter
|
||||
|
@ -30,7 +30,6 @@ void flush_dcache_page(struct page *pg);
|
||||
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
|
||||
|
||||
void flush_icache_range(unsigned long start, unsigned long end);
|
||||
void flush_cache_sigtramp(unsigned long addr);
|
||||
void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
|
||||
unsigned long addr, int len);
|
||||
|
||||
|
@ -12,12 +12,16 @@
|
||||
|
||||
#if defined(CONFIG_CPU_SUBTYPE_SH7722) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7723) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7343) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7366)
|
||||
#define FRQCR 0xa4150000
|
||||
#define VCLKCR 0xa4150004
|
||||
#define SCLKACR 0xa4150008
|
||||
#define SCLKBCR 0xa415000c
|
||||
#define IrDACLKCR 0xa4150010
|
||||
#define MSTPCR0 0xa4150030
|
||||
#define MSTPCR1 0xa4150034
|
||||
#define MSTPCR2 0xa4150038
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7780)
|
||||
#define FRQCR 0xffc80000
|
||||
|
@ -5,3 +5,8 @@
|
||||
*/
|
||||
#include <asm-generic/device.h>
|
||||
|
||||
struct platform_device;
|
||||
/* allocate contiguous memory chunk and fill in struct resource */
|
||||
int platform_resource_setup_memory(struct platform_device *pdev,
|
||||
char *name, unsigned long memsize);
|
||||
|
||||
|
@ -1,10 +1,15 @@
|
||||
#ifndef __ASM_SH_ELF_H
|
||||
#define __ASM_SH_ELF_H
|
||||
|
||||
#include <linux/utsname.h>
|
||||
#include <asm/auxvec.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/user.h>
|
||||
|
||||
/* ELF header e_flags defines */
|
||||
#define EF_SH_PIC 0x100 /* -fpic */
|
||||
#define EF_SH_FDPIC 0x8000 /* -mfdpic */
|
||||
|
||||
/* SH (particularly SHcompact) relocation types */
|
||||
#define R_SH_NONE 0
|
||||
#define R_SH_DIR32 1
|
||||
@ -43,6 +48,28 @@
|
||||
#define R_SH_RELATIVE 165
|
||||
#define R_SH_GOTOFF 166
|
||||
#define R_SH_GOTPC 167
|
||||
|
||||
/* FDPIC relocs */
|
||||
#define R_SH_GOT20 70
|
||||
#define R_SH_GOTOFF20 71
|
||||
#define R_SH_GOTFUNCDESC 72
|
||||
#define R_SH_GOTFUNCDESC20 73
|
||||
#define R_SH_GOTOFFFUNCDESC 74
|
||||
#define R_SH_GOTOFFFUNCDESC20 75
|
||||
#define R_SH_FUNCDESC 76
|
||||
#define R_SH_FUNCDESC_VALUE 77
|
||||
|
||||
#if 0 /* XXX - later .. */
|
||||
#define R_SH_GOT20 198
|
||||
#define R_SH_GOTOFF20 199
|
||||
#define R_SH_GOTFUNCDESC 200
|
||||
#define R_SH_GOTFUNCDESC20 201
|
||||
#define R_SH_GOTOFFFUNCDESC 202
|
||||
#define R_SH_GOTOFFFUNCDESC20 203
|
||||
#define R_SH_FUNCDESC 204
|
||||
#define R_SH_FUNCDESC_VALUE 205
|
||||
#endif
|
||||
|
||||
/* SHmedia relocs */
|
||||
#define R_SH_IMM_LOW16 246
|
||||
#define R_SH_IMM_LOW16_PCREL 247
|
||||
@ -77,9 +104,12 @@ typedef struct user_fpu_struct elf_fpregset_t;
|
||||
/*
|
||||
* This is used to ensure we don't load something for the wrong architecture.
|
||||
*/
|
||||
#define elf_check_arch(x) ( (x)->e_machine == EM_SH )
|
||||
#define elf_check_arch(x) ((x)->e_machine == EM_SH)
|
||||
#define elf_check_fdpic(x) ((x)->e_flags & EF_SH_FDPIC)
|
||||
#define elf_check_const_displacement(x) ((x)->e_flags & EF_SH_PIC)
|
||||
|
||||
#define USE_ELF_CORE_DUMP
|
||||
#define ELF_FDPIC_CORE_EFLAGS EF_SH_FDPIC
|
||||
#define ELF_EXEC_PAGESIZE PAGE_SIZE
|
||||
|
||||
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
|
||||
@ -136,6 +166,27 @@ typedef struct user_fpu_struct elf_fpregset_t;
|
||||
_r->regs[8]=0; _r->regs[9]=0; _r->regs[10]=0; _r->regs[11]=0; \
|
||||
_r->regs[12]=0; _r->regs[13]=0; _r->regs[14]=0; \
|
||||
_r->sr = SR_FD; } while (0)
|
||||
|
||||
#define ELF_FDPIC_PLAT_INIT(_r, _exec_map_addr, _interp_map_addr, \
|
||||
_dynamic_addr) \
|
||||
do { \
|
||||
_r->regs[0] = 0; \
|
||||
_r->regs[1] = 0; \
|
||||
_r->regs[2] = 0; \
|
||||
_r->regs[3] = 0; \
|
||||
_r->regs[4] = 0; \
|
||||
_r->regs[5] = 0; \
|
||||
_r->regs[6] = 0; \
|
||||
_r->regs[7] = 0; \
|
||||
_r->regs[8] = _exec_map_addr; \
|
||||
_r->regs[9] = _interp_map_addr; \
|
||||
_r->regs[10] = _dynamic_addr; \
|
||||
_r->regs[11] = 0; \
|
||||
_r->regs[12] = 0; \
|
||||
_r->regs[13] = 0; \
|
||||
_r->regs[14] = 0; \
|
||||
_r->sr = SR_FD; \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT)
|
||||
|
@ -79,7 +79,7 @@ struct intc_desc {
|
||||
struct intc_sense_reg *sense_regs;
|
||||
unsigned int nr_sense_regs;
|
||||
char *name;
|
||||
#ifdef CONFIG_CPU_SH3
|
||||
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
|
||||
struct intc_mask_reg *ack_regs;
|
||||
unsigned int nr_ack_regs;
|
||||
#endif
|
||||
@ -95,7 +95,7 @@ struct intc_desc symbol __initdata = { \
|
||||
chipname, \
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CPU_SH3
|
||||
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
|
||||
#define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \
|
||||
mask_regs, prio_regs, sense_regs, ack_regs) \
|
||||
struct intc_desc symbol __initdata = { \
|
||||
|
@ -16,10 +16,6 @@
|
||||
#include <asm/addrspace.h>
|
||||
|
||||
/* GPIO */
|
||||
#define MSTPCR0 0xa4150030
|
||||
#define MSTPCR1 0xa4150034
|
||||
#define MSTPCR2 0xa4150038
|
||||
|
||||
#define PORT_PACR 0xa4050100
|
||||
#define PORT_PDCR 0xa4050106
|
||||
#define PORT_PECR 0xa4050108
|
||||
@ -29,11 +25,16 @@
|
||||
#define PORT_PLCR 0xa4050114
|
||||
#define PORT_PMCR 0xa4050116
|
||||
#define PORT_PRCR 0xa405011c
|
||||
#define PORT_PTCR 0xa4050140
|
||||
#define PORT_PUCR 0xa4050142
|
||||
#define PORT_PVCR 0xa4050144
|
||||
#define PORT_PWCR 0xa4050146
|
||||
#define PORT_PXCR 0xa4050148
|
||||
#define PORT_PYCR 0xa405014a
|
||||
#define PORT_PZCR 0xa405014c
|
||||
#define PORT_PADR 0xa4050120
|
||||
#define PORT_PHDR 0xa405012e
|
||||
#define PORT_PTDR 0xa4050160
|
||||
#define PORT_PWDR 0xa4050166
|
||||
|
||||
#define PORT_HIZCRA 0xa4050158
|
||||
@ -48,6 +49,7 @@
|
||||
#define PORT_PSELB 0xa4050150
|
||||
#define PORT_PSELC 0xa4050152
|
||||
#define PORT_PSELD 0xa4050154
|
||||
#define PORT_PSELE 0xa4050156
|
||||
|
||||
#define PORT_HIZCRA 0xa4050158
|
||||
#define PORT_HIZCRB 0xa405015a
|
||||
@ -55,4 +57,9 @@
|
||||
|
||||
#define BSC_CS6ABCR 0xfec1001c
|
||||
|
||||
#include <asm/sh_mobile_lcdc.h>
|
||||
|
||||
int migor_lcd_qvga_setup(void *board_data, void *sys_ops_handle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
|
||||
|
||||
#endif /* __ASM_SH_MIGOR_H */
|
||||
|
@ -12,6 +12,10 @@ typedef struct {
|
||||
struct vm_list_struct *vmlist;
|
||||
unsigned long end_brk;
|
||||
#endif
|
||||
#ifdef CONFIG_BINFMT_ELF_FDPIC
|
||||
unsigned long exec_fdpic_loadmap;
|
||||
unsigned long interp_fdpic_loadmap;
|
||||
#endif
|
||||
} mm_context_t;
|
||||
|
||||
/*
|
||||
|
@ -27,8 +27,9 @@
|
||||
/* ASID is 8-bit value, so it can't be 0x100 */
|
||||
#define MMU_NO_ASID 0x100
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#define asid_cache(cpu) (cpu_data[cpu].asid_cache)
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#define cpu_context(cpu, mm) ((mm)->context.id[cpu])
|
||||
|
||||
#define cpu_asid(cpu, mm) \
|
||||
|
@ -12,6 +12,8 @@
|
||||
# define PAGE_SHIFT 12
|
||||
#elif defined(CONFIG_PAGE_SIZE_8KB)
|
||||
# define PAGE_SHIFT 13
|
||||
#elif defined(CONFIG_PAGE_SIZE_16KB)
|
||||
# define PAGE_SHIFT 14
|
||||
#elif defined(CONFIG_PAGE_SIZE_64KB)
|
||||
# define PAGE_SHIFT 16
|
||||
#else
|
||||
|
@ -102,7 +102,9 @@
|
||||
#define _PAGE_FLAGS_HARDWARE_MASK (PHYS_ADDR_MASK & ~(_PAGE_CLEAR_FLAGS))
|
||||
|
||||
/* Hardware flags, page size encoding */
|
||||
#if defined(CONFIG_X2TLB)
|
||||
#if !defined(CONFIG_MMU)
|
||||
# define _PAGE_FLAGS_HARD 0ULL
|
||||
#elif defined(CONFIG_X2TLB)
|
||||
# if defined(CONFIG_PAGE_SIZE_4KB)
|
||||
# define _PAGE_FLAGS_HARD _PAGE_EXT(_PAGE_EXT_ESZ0)
|
||||
# elif defined(CONFIG_PAGE_SIZE_8KB)
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define __ASM_SH_PROCESSOR_H
|
||||
|
||||
#include <asm/cpu-features.h>
|
||||
#include <asm/segment.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/*
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
struct sh_cpuinfo {
|
||||
unsigned int type;
|
||||
int cut_major, cut_minor;
|
||||
unsigned long loops_per_jiffy;
|
||||
unsigned long asid_cache;
|
||||
|
||||
@ -113,10 +114,6 @@ struct thread_struct {
|
||||
union sh_fpu_union fpu;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
unsigned long seg;
|
||||
} mm_segment_t;
|
||||
|
||||
/* Count of active tasks with UBC settings */
|
||||
extern int ubc_usercnt;
|
||||
|
||||
|
@ -166,10 +166,6 @@ struct thread_struct {
|
||||
union sh_fpu_union fpu;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
unsigned long seg;
|
||||
} mm_segment_t;
|
||||
|
||||
#define INIT_MMAP \
|
||||
{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL }
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user