mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +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: (262 commits) sh: mach-ecovec24: Add user debug switch support sh: Kill off unused se_skipped in alignment trap notification code. sh: Wire up HAVE_SYSCALL_TRACEPOINTS. video: sh_mobile_lcdcfb: use both register sets for display panning video: sh_mobile_lcdcfb: implement display panning sh: Fix up sh7705 flush_dcache_page() build. sh: kfr2r09: document the PLL/FLL <-> RF relationship. sh: mach-ecovec24: need asm/clock.h. sh: mach-ecovec24: deassert usb irq on boot. sh: Add KEYSC support for EcoVec24 sh: add kycr2_delay for sh_keysc sh: cpufreq: Include CPU id in info messages. sh: multi-evt support for SH-X3 proto CPU. sh: clkfwk: remove bogus set_bus_parent() from SH7709. sh: Fix the indication point of the liquid crystal of AP-325RXA(AP3300) sh: Add EcoVec24 romImage defconfig sh: USB disable process is needed if romImage boot for EcoVec24 sh: EcoVec24: add HIZA setting for LED sh: EcoVec24: write MAC address in boot sh: Add romImage support for EcoVec24 ...
This commit is contained in:
commit
515b696b28
229 changed files with 18938 additions and 3989 deletions
|
@ -1565,7 +1565,7 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
of returning the full 64-bit number.
|
||||
The default is to return 64-bit inode numbers.
|
||||
|
||||
nmi_debug= [KNL,AVR32] Specify one or more actions to take
|
||||
nmi_debug= [KNL,AVR32,SH] Specify one or more actions to take
|
||||
when a NMI is triggered.
|
||||
Format: [state][,regs][,debounce][,die]
|
||||
|
||||
|
|
|
@ -10,12 +10,17 @@ config SUPERH
|
|||
select EMBEDDED
|
||||
select HAVE_CLK
|
||||
select HAVE_IDE
|
||||
select HAVE_LMB
|
||||
select HAVE_OPROFILE
|
||||
select HAVE_GENERIC_DMA_COHERENT
|
||||
select HAVE_IOREMAP_PROT if MMU
|
||||
select HAVE_ARCH_TRACEHOOK
|
||||
select HAVE_DMA_API_DEBUG
|
||||
select HAVE_PERF_COUNTERS
|
||||
select HAVE_KERNEL_GZIP
|
||||
select HAVE_KERNEL_BZIP2
|
||||
select HAVE_KERNEL_LZMA
|
||||
select HAVE_SYSCALL_TRACEPOINTS
|
||||
select RTC_LIB
|
||||
select GENERIC_ATOMIC64
|
||||
help
|
||||
|
@ -31,6 +36,9 @@ config SUPERH32
|
|||
select HAVE_FUNCTION_TRACER
|
||||
select HAVE_FTRACE_MCOUNT_RECORD
|
||||
select HAVE_DYNAMIC_FTRACE
|
||||
select HAVE_FUNCTION_TRACE_MCOUNT_TEST
|
||||
select HAVE_FTRACE_SYSCALLS
|
||||
select HAVE_FUNCTION_GRAPH_TRACER
|
||||
select HAVE_ARCH_KGDB
|
||||
select ARCH_HIBERNATION_POSSIBLE if MMU
|
||||
|
||||
|
@ -212,6 +220,8 @@ config CPU_SHX3
|
|||
config ARCH_SHMOBILE
|
||||
bool
|
||||
select ARCH_SUSPEND_POSSIBLE
|
||||
select PM
|
||||
select PM_RUNTIME
|
||||
|
||||
if SUPERH32
|
||||
|
||||
|
@ -389,6 +399,13 @@ config CPU_SUBTYPE_SH7724
|
|||
help
|
||||
Select SH7724 if you have an SH-MobileR2R CPU.
|
||||
|
||||
config CPU_SUBTYPE_SH7757
|
||||
bool "Support SH7757 processor"
|
||||
select CPU_SH4A
|
||||
select CPU_SHX2
|
||||
help
|
||||
Select SH7757 if you have a SH4A SH7757 CPU.
|
||||
|
||||
config CPU_SUBTYPE_SH7763
|
||||
bool "Support SH7763 processor"
|
||||
select CPU_SH4A
|
||||
|
@ -751,12 +768,31 @@ config UBC_WAKEUP
|
|||
|
||||
If unsure, say N.
|
||||
|
||||
config CMDLINE_BOOL
|
||||
bool "Default bootloader kernel arguments"
|
||||
choice
|
||||
prompt "Kernel command line"
|
||||
optional
|
||||
default CMDLINE_OVERWRITE
|
||||
help
|
||||
Setting this option allows the kernel command line arguments
|
||||
to be set.
|
||||
|
||||
config CMDLINE_OVERWRITE
|
||||
bool "Overwrite bootloader kernel arguments"
|
||||
help
|
||||
Given string will overwrite any arguments passed in by
|
||||
a bootloader.
|
||||
|
||||
config CMDLINE_EXTEND
|
||||
bool "Extend bootloader kernel arguments"
|
||||
help
|
||||
Given string will be concatenated with arguments passed in
|
||||
by a bootloader.
|
||||
|
||||
endchoice
|
||||
|
||||
config CMDLINE
|
||||
string "Initial kernel command string"
|
||||
depends on CMDLINE_BOOL
|
||||
string "Kernel command line arguments string"
|
||||
depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
|
||||
default "console=ttySC1,115200"
|
||||
|
||||
endmenu
|
||||
|
|
|
@ -38,11 +38,13 @@ config EARLY_SCIF_CONSOLE_PORT
|
|||
default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763 || \
|
||||
CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366 || \
|
||||
CPU_SUBTYPE_SH7343
|
||||
default "0xffea0000" if CPU_SUBTYPE_SH7785
|
||||
default "0xfe4c0000" if CPU_SUBTYPE_SH7757
|
||||
default "0xffeb0000" if CPU_SUBTYPE_SH7785
|
||||
default "0xffeb0000" if CPU_SUBTYPE_SH7786
|
||||
default "0xfffe8000" if CPU_SUBTYPE_SH7203
|
||||
default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263
|
||||
default "0xffe80000" if CPU_SH4
|
||||
default "0xa4000150" if CPU_SH3
|
||||
default "0x00000000"
|
||||
|
||||
config EARLY_PRINTK
|
||||
|
@ -61,12 +63,14 @@ config EARLY_PRINTK
|
|||
select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using
|
||||
the kernel command line option to toggle back and forth.
|
||||
|
||||
config DEBUG_STACKOVERFLOW
|
||||
config STACK_DEBUG
|
||||
bool "Check for stack overflows"
|
||||
depends on DEBUG_KERNEL && SUPERH32
|
||||
help
|
||||
This option will cause messages to be printed if free stack space
|
||||
drops below a certain limit.
|
||||
drops below a certain limit. Saying Y here will add overhead to
|
||||
every function call and will therefore incur a major
|
||||
performance hit. Most users should say N.
|
||||
|
||||
config DEBUG_STACK_USAGE
|
||||
bool "Stack utilization instrumentation"
|
||||
|
@ -107,6 +111,14 @@ config DUMP_CODE
|
|||
|
||||
Those looking for more verbose debugging output should say Y.
|
||||
|
||||
config DWARF_UNWINDER
|
||||
bool "Enable the DWARF unwinder for stacktraces"
|
||||
select FRAME_POINTER
|
||||
default n
|
||||
help
|
||||
Enabling this option will make stacktraces more accurate, at
|
||||
the cost of an increase in overall kernel size.
|
||||
|
||||
config SH_NO_BSS_INIT
|
||||
bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)"
|
||||
depends on DEBUG_KERNEL
|
||||
|
@ -123,4 +135,9 @@ config SH64_SR_WATCH
|
|||
bool "Debug: set SR.WATCH to enable hardware watchpoints and trace"
|
||||
depends on SUPERH64
|
||||
|
||||
config MCOUNT
|
||||
def_bool y
|
||||
depends on SUPERH32
|
||||
depends on STACK_DEBUG || FUNCTION_TRACER
|
||||
|
||||
endmenu
|
||||
|
|
|
@ -136,6 +136,8 @@ machdir-$(CONFIG_SH_7751_SYSTEMH) += mach-systemh
|
|||
machdir-$(CONFIG_SH_EDOSK7705) += mach-edosk7705
|
||||
machdir-$(CONFIG_SH_HIGHLANDER) += mach-highlander
|
||||
machdir-$(CONFIG_SH_MIGOR) += mach-migor
|
||||
machdir-$(CONFIG_SH_KFR2R09) += mach-kfr2r09
|
||||
machdir-$(CONFIG_SH_ECOVEC) += mach-ecovec24
|
||||
machdir-$(CONFIG_SH_SDK7780) += mach-sdk7780
|
||||
machdir-$(CONFIG_SH_X3PROTO) += mach-x3proto
|
||||
machdir-$(CONFIG_SH_SH7763RDP) += mach-sh7763rdp
|
||||
|
@ -186,17 +188,27 @@ KBUILD_CFLAGS += -pipe $(cflags-y)
|
|||
KBUILD_CPPFLAGS += $(cflags-y)
|
||||
KBUILD_AFLAGS += $(cflags-y)
|
||||
|
||||
ifeq ($(CONFIG_MCOUNT),y)
|
||||
KBUILD_CFLAGS += -pg
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DWARF_UNWINDER),y)
|
||||
KBUILD_CFLAGS += -fasynchronous-unwind-tables
|
||||
endif
|
||||
|
||||
libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y)
|
||||
libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)
|
||||
|
||||
PHONY += maketools FORCE
|
||||
BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.srec \
|
||||
zImage vmlinux.srec romImage
|
||||
PHONY += maketools $(BOOT_TARGETS) FORCE
|
||||
|
||||
maketools: include/linux/version.h FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
|
||||
|
||||
all: $(KBUILD_IMAGE)
|
||||
|
||||
zImage uImage uImage.srec vmlinux.srec: vmlinux
|
||||
$(BOOT_TARGETS): vmlinux
|
||||
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
|
||||
|
||||
compressed: zImage
|
||||
|
@ -208,10 +220,14 @@ archclean:
|
|||
$(Q)$(MAKE) $(clean)=arch/sh/kernel/vsyscall
|
||||
|
||||
define archhelp
|
||||
@echo '* zImage - Compressed kernel image'
|
||||
@echo ' zImage - Compressed kernel image'
|
||||
@echo ' romImage - Compressed ROM image, if supported'
|
||||
@echo ' vmlinux.srec - Create an ELF S-record'
|
||||
@echo ' uImage - Create a bootable image for U-Boot'
|
||||
@echo ' uImage.srec - Create an S-record for U-Boot'
|
||||
@echo '* uImage - Alias to bootable U-Boot image'
|
||||
@echo ' uImage.srec - Create an S-record for U-Boot'
|
||||
@echo '* uImage.gz - Kernel-only image for U-Boot (gzip)'
|
||||
@echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)'
|
||||
@echo ' uImage.lzma - Kernel-only image for U-Boot (lzma)'
|
||||
endef
|
||||
|
||||
CLEAN_FILES += include/asm-sh/machtypes.h
|
||||
|
|
|
@ -160,7 +160,6 @@ config SH_SH7785LCR
|
|||
bool "SH7785LCR"
|
||||
depends on CPU_SUBTYPE_SH7785
|
||||
select SYS_SUPPORTS_PCI
|
||||
select IO_TRAPPED if MMU
|
||||
|
||||
config SH_SH7785LCR_29BIT_PHYSMAPS
|
||||
bool "SH7785LCR 29bit physmaps"
|
||||
|
@ -171,6 +170,13 @@ config SH_SH7785LCR_29BIT_PHYSMAPS
|
|||
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_SH7785LCR_PT
|
||||
bool "SH7785LCR prototype board on 32-bit MMU mode"
|
||||
depends on SH_SH7785LCR && 32BIT
|
||||
default n
|
||||
help
|
||||
If you use prototype board, this option is enabled.
|
||||
|
||||
config SH_URQUELL
|
||||
bool "Urquell"
|
||||
depends on CPU_SUBTYPE_SH7786
|
||||
|
@ -193,6 +199,20 @@ config SH_AP325RXA
|
|||
Renesas "AP-325RXA" support.
|
||||
Compatible with ALGO SYSTEM CO.,LTD. "AP-320A"
|
||||
|
||||
config SH_KFR2R09
|
||||
bool "KFR2R09"
|
||||
depends on CPU_SUBTYPE_SH7724
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
help
|
||||
"Kit For R2R for 2009" support.
|
||||
|
||||
config SH_ECOVEC
|
||||
bool "EcoVec"
|
||||
depends on CPU_SUBTYPE_SH7724
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
help
|
||||
Renesas "R0P7724LC0011/21RL (EcoVec)" support.
|
||||
|
||||
config SH_SH7763RDP
|
||||
bool "SH7763RDP"
|
||||
depends on CPU_SUBTYPE_SH7763
|
||||
|
|
|
@ -188,7 +188,7 @@ static struct sh_mobile_lcdc_info lcdc_info = {
|
|||
.name = "LB070WV1",
|
||||
.xres = 800,
|
||||
.yres = 480,
|
||||
.left_margin = 40,
|
||||
.left_margin = 32,
|
||||
.right_margin = 160,
|
||||
.hsync_len = 8,
|
||||
.upper_margin = 63,
|
||||
|
@ -211,7 +211,7 @@ static struct resource lcdc_resources[] = {
|
|||
[0] = {
|
||||
.name = "LCDC",
|
||||
.start = 0xfe940000, /* P4-only space */
|
||||
.end = 0xfe941fff,
|
||||
.end = 0xfe942fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
|
@ -227,6 +227,9 @@ static struct platform_device lcdc_device = {
|
|||
.dev = {
|
||||
.platform_data = &lcdc_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_LCDC,
|
||||
},
|
||||
};
|
||||
|
||||
static void camera_power(int val)
|
||||
|
@ -377,6 +380,9 @@ static struct platform_device ceu_device = {
|
|||
.dev = {
|
||||
.platform_data = &sh_mobile_ceu_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_CEU,
|
||||
},
|
||||
};
|
||||
|
||||
struct spi_gpio_platform_data sdcard_cn3_platform_data = {
|
||||
|
|
|
@ -223,6 +223,19 @@ static struct platform_device sm501_device = {
|
|||
.resource = sm501_resources,
|
||||
};
|
||||
|
||||
static struct resource i2c_proto_resources[] = {
|
||||
[0] = {
|
||||
.start = PCA9564_PROTO_32BIT_ADDR,
|
||||
.end = PCA9564_PROTO_32BIT_ADDR + PCA9564_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM | IORESOURCE_MEM_8BIT,
|
||||
},
|
||||
[1] = {
|
||||
.start = 12,
|
||||
.end = 12,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource i2c_resources[] = {
|
||||
[0] = {
|
||||
.start = PCA9564_ADDR,
|
||||
|
@ -271,6 +284,11 @@ static int __init sh7785lcr_devices_setup(void)
|
|||
i2c_register_board_info(0, sh7785lcr_i2c_devices,
|
||||
ARRAY_SIZE(sh7785lcr_i2c_devices));
|
||||
|
||||
if (mach_is_sh7785lcr_pt()) {
|
||||
i2c_device.resource = i2c_proto_resources;
|
||||
i2c_device.num_resources = ARRAY_SIZE(i2c_proto_resources);
|
||||
}
|
||||
|
||||
return platform_add_devices(sh7785lcr_devices,
|
||||
ARRAY_SIZE(sh7785lcr_devices));
|
||||
}
|
||||
|
|
9
arch/sh/boards/mach-ecovec24/Makefile
Normal file
9
arch/sh/boards/mach-ecovec24/Makefile
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Makefile for the R0P7724LC0011/21RL (EcoVec)
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
obj-y := setup.o
|
670
arch/sh/boards/mach-ecovec24/setup.c
Normal file
670
arch/sh/boards/mach-ecovec24/setup.c
Normal file
|
@ -0,0 +1,670 @@
|
|||
/*
|
||||
* Copyright (C) 2009 Renesas Solutions Corp.
|
||||
*
|
||||
* Kuninori Morimoto <morimoto.kuninori@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/platform_device.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/usb/r8a66597.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/input.h>
|
||||
#include <video/sh_mobile_lcdc.h>
|
||||
#include <media/sh_mobile_ceu.h>
|
||||
#include <asm/heartbeat.h>
|
||||
#include <asm/sh_eth.h>
|
||||
#include <asm/sh_keysc.h>
|
||||
#include <asm/clock.h>
|
||||
#include <cpu/sh7724.h>
|
||||
|
||||
/*
|
||||
* Address Interface BusWidth
|
||||
*-----------------------------------------
|
||||
* 0x0000_0000 uboot 16bit
|
||||
* 0x0004_0000 Linux romImage 16bit
|
||||
* 0x0014_0000 MTD for Linux 16bit
|
||||
* 0x0400_0000 Internal I/O 16/32bit
|
||||
* 0x0800_0000 DRAM 32bit
|
||||
* 0x1800_0000 MFI 16bit
|
||||
*/
|
||||
|
||||
/* Heartbeat */
|
||||
static unsigned char led_pos[] = { 0, 1, 2, 3 };
|
||||
static struct heartbeat_data heartbeat_data = {
|
||||
.regsize = 8,
|
||||
.nr_bits = 4,
|
||||
.bit_pos = led_pos,
|
||||
};
|
||||
|
||||
static struct resource heartbeat_resources[] = {
|
||||
[0] = {
|
||||
.start = 0xA405012C, /* PTG */
|
||||
.end = 0xA405012E - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device heartbeat_device = {
|
||||
.name = "heartbeat",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &heartbeat_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(heartbeat_resources),
|
||||
.resource = heartbeat_resources,
|
||||
};
|
||||
|
||||
/* MTD */
|
||||
static struct mtd_partition nor_flash_partitions[] = {
|
||||
{
|
||||
.name = "boot loader",
|
||||
.offset = 0,
|
||||
.size = (5 * 1024 * 1024),
|
||||
.mask_flags = MTD_CAP_ROM,
|
||||
}, {
|
||||
.name = "free-area",
|
||||
.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] = {
|
||||
.name = "NOR Flash",
|
||||
.start = 0x00000000,
|
||||
.end = 0x03ffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device nor_flash_device = {
|
||||
.name = "physmap-flash",
|
||||
.resource = nor_flash_resources,
|
||||
.num_resources = ARRAY_SIZE(nor_flash_resources),
|
||||
.dev = {
|
||||
.platform_data = &nor_flash_data,
|
||||
},
|
||||
};
|
||||
|
||||
/* SH Eth */
|
||||
#define SH_ETH_ADDR (0xA4600000)
|
||||
#define SH_ETH_MAHR (SH_ETH_ADDR + 0x1C0)
|
||||
#define SH_ETH_MALR (SH_ETH_ADDR + 0x1C8)
|
||||
static struct resource sh_eth_resources[] = {
|
||||
[0] = {
|
||||
.start = SH_ETH_ADDR,
|
||||
.end = SH_ETH_ADDR + 0x1FC,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 91,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
},
|
||||
};
|
||||
|
||||
struct sh_eth_plat_data sh_eth_plat = {
|
||||
.phy = 0x1f, /* SMSC LAN8700 */
|
||||
.edmac_endian = EDMAC_LITTLE_ENDIAN,
|
||||
};
|
||||
|
||||
static struct platform_device sh_eth_device = {
|
||||
.name = "sh-eth",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &sh_eth_plat,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(sh_eth_resources),
|
||||
.resource = sh_eth_resources,
|
||||
};
|
||||
|
||||
/* USB0 host */
|
||||
void usb0_port_power(int port, int power)
|
||||
{
|
||||
gpio_set_value(GPIO_PTB4, power);
|
||||
}
|
||||
|
||||
static struct r8a66597_platdata usb0_host_data = {
|
||||
.on_chip = 1,
|
||||
.port_power = usb0_port_power,
|
||||
};
|
||||
|
||||
static struct resource usb0_host_resources[] = {
|
||||
[0] = {
|
||||
.start = 0xa4d80000,
|
||||
.end = 0xa4d80124 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 65,
|
||||
.end = 65,
|
||||
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device usb0_host_device = {
|
||||
.name = "r8a66597_hcd",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = NULL, /* not use dma */
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.platform_data = &usb0_host_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(usb0_host_resources),
|
||||
.resource = usb0_host_resources,
|
||||
};
|
||||
|
||||
/*
|
||||
* USB1
|
||||
*
|
||||
* CN5 can use both host/function,
|
||||
* and we can determine it by checking PTB[3]
|
||||
*
|
||||
* This time only USB1 host is supported.
|
||||
*/
|
||||
void usb1_port_power(int port, int power)
|
||||
{
|
||||
if (!gpio_get_value(GPIO_PTB3)) {
|
||||
printk(KERN_ERR "USB1 function is not supported\n");
|
||||
return;
|
||||
}
|
||||
|
||||
gpio_set_value(GPIO_PTB5, power);
|
||||
}
|
||||
|
||||
static struct r8a66597_platdata usb1_host_data = {
|
||||
.on_chip = 1,
|
||||
.port_power = usb1_port_power,
|
||||
};
|
||||
|
||||
static struct resource usb1_host_resources[] = {
|
||||
[0] = {
|
||||
.start = 0xa4d90000,
|
||||
.end = 0xa4d90124 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 66,
|
||||
.end = 66,
|
||||
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device usb1_host_device = {
|
||||
.name = "r8a66597_hcd",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.dma_mask = NULL, /* not use dma */
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.platform_data = &usb1_host_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(usb1_host_resources),
|
||||
.resource = usb1_host_resources,
|
||||
};
|
||||
|
||||
/* LCDC */
|
||||
static struct sh_mobile_lcdc_info lcdc_info = {
|
||||
.ch[0] = {
|
||||
.interface_type = RGB18,
|
||||
.chan = LCDC_CHAN_MAINLCD,
|
||||
.bpp = 16,
|
||||
.lcd_cfg = {
|
||||
.sync = 0, /* hsync and vsync are active low */
|
||||
},
|
||||
.lcd_size_cfg = { /* 7.0 inch */
|
||||
.width = 152,
|
||||
.height = 91,
|
||||
},
|
||||
.board_cfg = {
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
static struct resource lcdc_resources[] = {
|
||||
[0] = {
|
||||
.name = "LCDC",
|
||||
.start = 0xfe940000,
|
||||
.end = 0xfe942fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 106,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
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,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_LCDC,
|
||||
},
|
||||
};
|
||||
|
||||
/* CEU0 */
|
||||
static struct sh_mobile_ceu_info sh_mobile_ceu0_info = {
|
||||
.flags = SH_CEU_FLAG_USE_8BIT_BUS,
|
||||
};
|
||||
|
||||
static struct resource ceu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "CEU0",
|
||||
.start = 0xfe910000,
|
||||
.end = 0xfe91009f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 52,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
[2] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device ceu0_device = {
|
||||
.name = "sh_mobile_ceu",
|
||||
.id = 0, /* "ceu0" clock */
|
||||
.num_resources = ARRAY_SIZE(ceu0_resources),
|
||||
.resource = ceu0_resources,
|
||||
.dev = {
|
||||
.platform_data = &sh_mobile_ceu0_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_CEU0,
|
||||
},
|
||||
};
|
||||
|
||||
/* CEU1 */
|
||||
static struct sh_mobile_ceu_info sh_mobile_ceu1_info = {
|
||||
.flags = SH_CEU_FLAG_USE_8BIT_BUS,
|
||||
};
|
||||
|
||||
static struct resource ceu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "CEU1",
|
||||
.start = 0xfe914000,
|
||||
.end = 0xfe91409f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 63,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
[2] = {
|
||||
/* place holder for contiguous memory */
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device ceu1_device = {
|
||||
.name = "sh_mobile_ceu",
|
||||
.id = 1, /* "ceu1" clock */
|
||||
.num_resources = ARRAY_SIZE(ceu1_resources),
|
||||
.resource = ceu1_resources,
|
||||
.dev = {
|
||||
.platform_data = &sh_mobile_ceu1_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_CEU1,
|
||||
},
|
||||
};
|
||||
|
||||
/* I2C device */
|
||||
static struct i2c_board_info i2c1_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("r2025sd", 0x32),
|
||||
},
|
||||
};
|
||||
|
||||
/* KEYSC */
|
||||
static struct sh_keysc_info keysc_info = {
|
||||
.mode = SH_KEYSC_MODE_1,
|
||||
.scan_timing = 3,
|
||||
.delay = 50,
|
||||
.kycr2_delay = 100,
|
||||
.keycodes = { KEY_1, 0, 0, 0, 0,
|
||||
KEY_2, 0, 0, 0, 0,
|
||||
KEY_3, 0, 0, 0, 0,
|
||||
KEY_4, 0, 0, 0, 0,
|
||||
KEY_5, 0, 0, 0, 0,
|
||||
KEY_6, 0, 0, 0, 0, },
|
||||
};
|
||||
|
||||
static struct resource keysc_resources[] = {
|
||||
[0] = {
|
||||
.name = "KEYSC",
|
||||
.start = 0x044b0000,
|
||||
.end = 0x044b000f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 79,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device keysc_device = {
|
||||
.name = "sh_keysc",
|
||||
.id = 0, /* keysc0 clock */
|
||||
.num_resources = ARRAY_SIZE(keysc_resources),
|
||||
.resource = keysc_resources,
|
||||
.dev = {
|
||||
.platform_data = &keysc_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_KEYSC,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *ecovec_devices[] __initdata = {
|
||||
&heartbeat_device,
|
||||
&nor_flash_device,
|
||||
&sh_eth_device,
|
||||
&usb0_host_device,
|
||||
&usb1_host_device, /* USB1 host support */
|
||||
&lcdc_device,
|
||||
&ceu0_device,
|
||||
&ceu1_device,
|
||||
&keysc_device,
|
||||
};
|
||||
|
||||
#define EEPROM_ADDR 0x50
|
||||
static u8 mac_read(struct i2c_adapter *a, u8 command)
|
||||
{
|
||||
struct i2c_msg msg[2];
|
||||
u8 buf;
|
||||
int ret;
|
||||
|
||||
msg[0].addr = EEPROM_ADDR;
|
||||
msg[0].flags = 0;
|
||||
msg[0].len = 1;
|
||||
msg[0].buf = &command;
|
||||
|
||||
msg[1].addr = EEPROM_ADDR;
|
||||
msg[1].flags = I2C_M_RD;
|
||||
msg[1].len = 1;
|
||||
msg[1].buf = &buf;
|
||||
|
||||
ret = i2c_transfer(a, msg, 2);
|
||||
if (ret < 0) {
|
||||
printk(KERN_ERR "error %d\n", ret);
|
||||
buf = 0xff;
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
#define MAC_LEN 6
|
||||
static void __init sh_eth_init(void)
|
||||
{
|
||||
struct i2c_adapter *a = i2c_get_adapter(1);
|
||||
struct clk *eth_clk;
|
||||
u8 mac[MAC_LEN];
|
||||
int i;
|
||||
|
||||
if (!a) {
|
||||
pr_err("can not get I2C 1\n");
|
||||
return;
|
||||
}
|
||||
|
||||
eth_clk = clk_get(NULL, "eth0");
|
||||
if (!eth_clk) {
|
||||
pr_err("can not get eth0 clk\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* read MAC address frome EEPROM */
|
||||
for (i = 0; i < MAC_LEN; i++) {
|
||||
mac[i] = mac_read(a, 0x10 + i);
|
||||
msleep(10);
|
||||
}
|
||||
|
||||
/* clock enable */
|
||||
clk_enable(eth_clk);
|
||||
|
||||
/* reset sh-eth */
|
||||
ctrl_outl(0x1, SH_ETH_ADDR + 0x0);
|
||||
|
||||
/* set MAC addr */
|
||||
ctrl_outl((mac[0] << 24) |
|
||||
(mac[1] << 16) |
|
||||
(mac[2] << 8) |
|
||||
(mac[3] << 0), SH_ETH_MAHR);
|
||||
ctrl_outl((mac[4] << 8) |
|
||||
(mac[5] << 0), SH_ETH_MALR);
|
||||
|
||||
clk_put(eth_clk);
|
||||
}
|
||||
|
||||
#define PORT_HIZA 0xA4050158
|
||||
#define IODRIVEA 0xA405018A
|
||||
static int __init arch_setup(void)
|
||||
{
|
||||
/* enable SCIFA0 */
|
||||
gpio_request(GPIO_FN_SCIF0_TXD, NULL);
|
||||
gpio_request(GPIO_FN_SCIF0_RXD, NULL);
|
||||
|
||||
/* enable debug LED */
|
||||
gpio_request(GPIO_PTG0, NULL);
|
||||
gpio_request(GPIO_PTG1, NULL);
|
||||
gpio_request(GPIO_PTG2, NULL);
|
||||
gpio_request(GPIO_PTG3, NULL);
|
||||
gpio_direction_output(GPIO_PTG0, 0);
|
||||
gpio_direction_output(GPIO_PTG1, 0);
|
||||
gpio_direction_output(GPIO_PTG2, 0);
|
||||
gpio_direction_output(GPIO_PTG3, 0);
|
||||
ctrl_outw((ctrl_inw(PORT_HIZA) & ~(0x1 << 1)) , PORT_HIZA);
|
||||
|
||||
/* enable SH-Eth */
|
||||
gpio_request(GPIO_PTA1, NULL);
|
||||
gpio_direction_output(GPIO_PTA1, 1);
|
||||
mdelay(20);
|
||||
|
||||
gpio_request(GPIO_FN_RMII_RXD0, NULL);
|
||||
gpio_request(GPIO_FN_RMII_RXD1, NULL);
|
||||
gpio_request(GPIO_FN_RMII_TXD0, NULL);
|
||||
gpio_request(GPIO_FN_RMII_TXD1, NULL);
|
||||
gpio_request(GPIO_FN_RMII_REF_CLK, NULL);
|
||||
gpio_request(GPIO_FN_RMII_TX_EN, NULL);
|
||||
gpio_request(GPIO_FN_RMII_RX_ER, NULL);
|
||||
gpio_request(GPIO_FN_RMII_CRS_DV, NULL);
|
||||
gpio_request(GPIO_FN_MDIO, NULL);
|
||||
gpio_request(GPIO_FN_MDC, NULL);
|
||||
gpio_request(GPIO_FN_LNKSTA, NULL);
|
||||
|
||||
/* enable USB */
|
||||
ctrl_outw(0x0000, 0xA4D80000);
|
||||
ctrl_outw(0x0000, 0xA4D90000);
|
||||
gpio_request(GPIO_PTB3, NULL);
|
||||
gpio_request(GPIO_PTB4, NULL);
|
||||
gpio_request(GPIO_PTB5, NULL);
|
||||
gpio_direction_input(GPIO_PTB3);
|
||||
gpio_direction_output(GPIO_PTB4, 0);
|
||||
gpio_direction_output(GPIO_PTB5, 0);
|
||||
ctrl_outw(0x0600, 0xa40501d4);
|
||||
ctrl_outw(0x0600, 0xa4050192);
|
||||
|
||||
/* enable LCDC */
|
||||
gpio_request(GPIO_FN_LCDD23, NULL);
|
||||
gpio_request(GPIO_FN_LCDD22, NULL);
|
||||
gpio_request(GPIO_FN_LCDD21, NULL);
|
||||
gpio_request(GPIO_FN_LCDD20, NULL);
|
||||
gpio_request(GPIO_FN_LCDD19, NULL);
|
||||
gpio_request(GPIO_FN_LCDD18, NULL);
|
||||
gpio_request(GPIO_FN_LCDD17, NULL);
|
||||
gpio_request(GPIO_FN_LCDD16, NULL);
|
||||
gpio_request(GPIO_FN_LCDD15, NULL);
|
||||
gpio_request(GPIO_FN_LCDD14, NULL);
|
||||
gpio_request(GPIO_FN_LCDD13, NULL);
|
||||
gpio_request(GPIO_FN_LCDD12, NULL);
|
||||
gpio_request(GPIO_FN_LCDD11, NULL);
|
||||
gpio_request(GPIO_FN_LCDD10, NULL);
|
||||
gpio_request(GPIO_FN_LCDD9, NULL);
|
||||
gpio_request(GPIO_FN_LCDD8, NULL);
|
||||
gpio_request(GPIO_FN_LCDD7, NULL);
|
||||
gpio_request(GPIO_FN_LCDD6, NULL);
|
||||
gpio_request(GPIO_FN_LCDD5, NULL);
|
||||
gpio_request(GPIO_FN_LCDD4, NULL);
|
||||
gpio_request(GPIO_FN_LCDD3, NULL);
|
||||
gpio_request(GPIO_FN_LCDD2, NULL);
|
||||
gpio_request(GPIO_FN_LCDD1, NULL);
|
||||
gpio_request(GPIO_FN_LCDD0, NULL);
|
||||
gpio_request(GPIO_FN_LCDDISP, NULL);
|
||||
gpio_request(GPIO_FN_LCDHSYN, NULL);
|
||||
gpio_request(GPIO_FN_LCDDCK, NULL);
|
||||
gpio_request(GPIO_FN_LCDVSYN, NULL);
|
||||
gpio_request(GPIO_FN_LCDDON, NULL);
|
||||
gpio_request(GPIO_FN_LCDLCLK, NULL);
|
||||
ctrl_outw((ctrl_inw(PORT_HIZA) & ~0x0001), PORT_HIZA);
|
||||
|
||||
gpio_request(GPIO_PTE6, NULL);
|
||||
gpio_request(GPIO_PTU1, NULL);
|
||||
gpio_request(GPIO_PTR1, NULL);
|
||||
gpio_request(GPIO_PTA2, NULL);
|
||||
gpio_direction_input(GPIO_PTE6);
|
||||
gpio_direction_output(GPIO_PTU1, 0);
|
||||
gpio_direction_output(GPIO_PTR1, 0);
|
||||
gpio_direction_output(GPIO_PTA2, 0);
|
||||
|
||||
/* I/O buffer drive ability is low */
|
||||
ctrl_outw((ctrl_inw(IODRIVEA) & ~0x00c0) | 0x0040 , IODRIVEA);
|
||||
|
||||
if (gpio_get_value(GPIO_PTE6)) {
|
||||
/* DVI */
|
||||
lcdc_info.clock_source = LCDC_CLK_EXTERNAL;
|
||||
lcdc_info.ch[0].clock_divider = 1,
|
||||
lcdc_info.ch[0].lcd_cfg.name = "DVI";
|
||||
lcdc_info.ch[0].lcd_cfg.xres = 1280;
|
||||
lcdc_info.ch[0].lcd_cfg.yres = 720;
|
||||
lcdc_info.ch[0].lcd_cfg.left_margin = 220;
|
||||
lcdc_info.ch[0].lcd_cfg.right_margin = 110;
|
||||
lcdc_info.ch[0].lcd_cfg.hsync_len = 40;
|
||||
lcdc_info.ch[0].lcd_cfg.upper_margin = 20;
|
||||
lcdc_info.ch[0].lcd_cfg.lower_margin = 5;
|
||||
lcdc_info.ch[0].lcd_cfg.vsync_len = 5;
|
||||
|
||||
gpio_set_value(GPIO_PTA2, 1);
|
||||
gpio_set_value(GPIO_PTU1, 1);
|
||||
} else {
|
||||
/* Panel */
|
||||
|
||||
lcdc_info.clock_source = LCDC_CLK_PERIPHERAL;
|
||||
lcdc_info.ch[0].clock_divider = 2,
|
||||
lcdc_info.ch[0].lcd_cfg.name = "Panel";
|
||||
lcdc_info.ch[0].lcd_cfg.xres = 800;
|
||||
lcdc_info.ch[0].lcd_cfg.yres = 480;
|
||||
lcdc_info.ch[0].lcd_cfg.left_margin = 220;
|
||||
lcdc_info.ch[0].lcd_cfg.right_margin = 110;
|
||||
lcdc_info.ch[0].lcd_cfg.hsync_len = 70;
|
||||
lcdc_info.ch[0].lcd_cfg.upper_margin = 20;
|
||||
lcdc_info.ch[0].lcd_cfg.lower_margin = 5;
|
||||
lcdc_info.ch[0].lcd_cfg.vsync_len = 5;
|
||||
|
||||
gpio_set_value(GPIO_PTR1, 1);
|
||||
|
||||
/* FIXME
|
||||
*
|
||||
* LCDDON control is needed for Panel,
|
||||
* but current sh_mobile_lcdc driver doesn't control it.
|
||||
* It is temporary correspondence
|
||||
*/
|
||||
gpio_request(GPIO_PTF4, NULL);
|
||||
gpio_direction_output(GPIO_PTF4, 1);
|
||||
}
|
||||
|
||||
/* enable CEU0 */
|
||||
gpio_request(GPIO_FN_VIO0_D15, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D14, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D13, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D12, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D11, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D10, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D9, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D8, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D7, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D6, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D5, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D4, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D3, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D2, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D1, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_D0, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_VD, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_CLK, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_FLD, NULL);
|
||||
gpio_request(GPIO_FN_VIO0_HD, NULL);
|
||||
platform_resource_setup_memory(&ceu0_device, "ceu0", 4 << 20);
|
||||
|
||||
/* enable CEU1 */
|
||||
gpio_request(GPIO_FN_VIO1_D7, NULL);
|
||||
gpio_request(GPIO_FN_VIO1_D6, NULL);
|
||||
gpio_request(GPIO_FN_VIO1_D5, NULL);
|
||||
gpio_request(GPIO_FN_VIO1_D4, NULL);
|
||||
gpio_request(GPIO_FN_VIO1_D3, NULL);
|
||||
gpio_request(GPIO_FN_VIO1_D2, NULL);
|
||||
gpio_request(GPIO_FN_VIO1_D1, NULL);
|
||||
gpio_request(GPIO_FN_VIO1_D0, NULL);
|
||||
gpio_request(GPIO_FN_VIO1_FLD, NULL);
|
||||
gpio_request(GPIO_FN_VIO1_HD, NULL);
|
||||
gpio_request(GPIO_FN_VIO1_VD, NULL);
|
||||
gpio_request(GPIO_FN_VIO1_CLK, NULL);
|
||||
platform_resource_setup_memory(&ceu1_device, "ceu1", 4 << 20);
|
||||
|
||||
/* enable KEYSC */
|
||||
gpio_request(GPIO_FN_KEYOUT5_IN5, NULL);
|
||||
gpio_request(GPIO_FN_KEYOUT4_IN6, NULL);
|
||||
gpio_request(GPIO_FN_KEYOUT3, NULL);
|
||||
gpio_request(GPIO_FN_KEYOUT2, NULL);
|
||||
gpio_request(GPIO_FN_KEYOUT1, NULL);
|
||||
gpio_request(GPIO_FN_KEYOUT0, NULL);
|
||||
gpio_request(GPIO_FN_KEYIN0, NULL);
|
||||
|
||||
/* enable user debug switch */
|
||||
gpio_request(GPIO_PTR0, NULL);
|
||||
gpio_request(GPIO_PTR4, NULL);
|
||||
gpio_request(GPIO_PTR5, NULL);
|
||||
gpio_request(GPIO_PTR6, NULL);
|
||||
gpio_direction_input(GPIO_PTR0);
|
||||
gpio_direction_input(GPIO_PTR4);
|
||||
gpio_direction_input(GPIO_PTR5);
|
||||
gpio_direction_input(GPIO_PTR6);
|
||||
|
||||
/* enable I2C device */
|
||||
i2c_register_board_info(1, i2c1_devices,
|
||||
ARRAY_SIZE(i2c1_devices));
|
||||
|
||||
return platform_add_devices(ecovec_devices,
|
||||
ARRAY_SIZE(ecovec_devices));
|
||||
}
|
||||
arch_initcall(arch_setup);
|
||||
|
||||
static int __init devices_setup(void)
|
||||
{
|
||||
sh_eth_init();
|
||||
return 0;
|
||||
}
|
||||
device_initcall(devices_setup);
|
||||
|
||||
|
||||
static struct sh_machine_vector mv_ecovec __initmv = {
|
||||
.mv_name = "R0P7724 (EcoVec)",
|
||||
};
|
|
@ -22,6 +22,7 @@
|
|||
#include <linux/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/usb/r8a66597.h>
|
||||
#include <linux/usb/m66592.h>
|
||||
#include <net/ax88796.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <mach/highlander.h>
|
||||
|
@ -60,6 +61,11 @@ static struct platform_device r8a66597_usb_host_device = {
|
|||
.resource = r8a66597_usb_host_resources,
|
||||
};
|
||||
|
||||
static struct m66592_platdata usbf_platdata = {
|
||||
.xtal = M66592_PLATDATA_XTAL_24MHZ,
|
||||
.vif = 1,
|
||||
};
|
||||
|
||||
static struct resource m66592_usb_peripheral_resources[] = {
|
||||
[0] = {
|
||||
.name = "m66592_udc",
|
||||
|
@ -81,6 +87,7 @@ static struct platform_device m66592_usb_peripheral_device = {
|
|||
.dev = {
|
||||
.dma_mask = NULL, /* don't use dma */
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.platform_data = &usbf_platdata,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(m66592_usb_peripheral_resources),
|
||||
.resource = m66592_usb_peripheral_resources,
|
||||
|
|
2
arch/sh/boards/mach-kfr2r09/Makefile
Normal file
2
arch/sh/boards/mach-kfr2r09/Makefile
Normal file
|
@ -0,0 +1,2 @@
|
|||
obj-y := setup.o
|
||||
obj-$(CONFIG_FB_SH_MOBILE_LCDC) += lcd_wqvga.o
|
332
arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
Normal file
332
arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
Normal file
|
@ -0,0 +1,332 @@
|
|||
/*
|
||||
* KFR2R09 LCD panel support
|
||||
*
|
||||
* Copyright (C) 2009 Magnus Damm
|
||||
*
|
||||
* Register settings based on the out-of-tree t33fb.c driver
|
||||
* Copyright (C) 2008 Lineo Solutions, Inc.
|
||||
*
|
||||
* 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/delay.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <video/sh_mobile_lcdc.h>
|
||||
#include <mach/kfr2r09.h>
|
||||
#include <cpu/sh7724.h>
|
||||
|
||||
/* The on-board LCD module is a Hitachi TX07D34VM0AAA. This module is made
|
||||
* up of a 240x400 LCD hooked up to a R61517 driver IC. The driver IC is
|
||||
* communicating with the main port of the LCDC using an 18-bit SYS interface.
|
||||
*
|
||||
* The device code for this LCD module is 0x01221517.
|
||||
*/
|
||||
|
||||
static const unsigned char data_frame_if[] = {
|
||||
0x02, /* WEMODE: 1=cont, 0=one-shot */
|
||||
0x00, 0x00,
|
||||
0x00, /* EPF, DFM */
|
||||
0x02, /* RIM[1] : 1 (18bpp) */
|
||||
};
|
||||
|
||||
static const unsigned char data_panel[] = {
|
||||
0x0b,
|
||||
0x63, /* 400 lines */
|
||||
0x04, 0x00, 0x00, 0x04, 0x11, 0x00, 0x00,
|
||||
};
|
||||
|
||||
static const unsigned char data_timing[] = {
|
||||
0x00, 0x00, 0x13, 0x08, 0x08,
|
||||
};
|
||||
|
||||
static const unsigned char data_timing_src[] = {
|
||||
0x11, 0x01, 0x00, 0x01,
|
||||
};
|
||||
|
||||
static const unsigned char data_gamma[] = {
|
||||
0x01, 0x02, 0x08, 0x23, 0x03, 0x0c, 0x00, 0x06, 0x00, 0x00,
|
||||
0x01, 0x00, 0x0c, 0x23, 0x03, 0x08, 0x02, 0x06, 0x00, 0x00,
|
||||
};
|
||||
|
||||
static const unsigned char data_power[] = {
|
||||
0x07, 0xc5, 0xdc, 0x02, 0x33, 0x0a,
|
||||
};
|
||||
|
||||
static unsigned long read_reg(void *sohandle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *so)
|
||||
{
|
||||
return so->read_data(sohandle);
|
||||
}
|
||||
|
||||
static void write_reg(void *sohandle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *so,
|
||||
int i, unsigned long v)
|
||||
{
|
||||
if (i)
|
||||
so->write_data(sohandle, v); /* PTH4/LCDRS High [param, 17:0] */
|
||||
else
|
||||
so->write_index(sohandle, v); /* PTH4/LCDRS Low [cmd, 7:0] */
|
||||
}
|
||||
|
||||
static void write_data(void *sohandle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *so,
|
||||
unsigned char const *data, int no_data)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < no_data; i++)
|
||||
write_reg(sohandle, so, 1, data[i]);
|
||||
}
|
||||
|
||||
static unsigned long read_device_code(void *sohandle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *so)
|
||||
{
|
||||
unsigned long device_code;
|
||||
|
||||
/* access protect OFF */
|
||||
write_reg(sohandle, so, 0, 0xb0);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
|
||||
/* deep standby OFF */
|
||||
write_reg(sohandle, so, 0, 0xb1);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
|
||||
/* device code command */
|
||||
write_reg(sohandle, so, 0, 0xbf);
|
||||
mdelay(50);
|
||||
|
||||
/* dummy read */
|
||||
read_reg(sohandle, so);
|
||||
|
||||
/* read device code */
|
||||
device_code = ((read_reg(sohandle, so) & 0xff) << 24);
|
||||
device_code |= ((read_reg(sohandle, so) & 0xff) << 16);
|
||||
device_code |= ((read_reg(sohandle, so) & 0xff) << 8);
|
||||
device_code |= (read_reg(sohandle, so) & 0xff);
|
||||
|
||||
return device_code;
|
||||
}
|
||||
|
||||
static void write_memory_start(void *sohandle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *so)
|
||||
{
|
||||
write_reg(sohandle, so, 0, 0x2c);
|
||||
}
|
||||
|
||||
static void clear_memory(void *sohandle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *so)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* write start */
|
||||
write_memory_start(sohandle, so);
|
||||
|
||||
/* paint it black */
|
||||
for (i = 0; i < (240 * 400); i++)
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
}
|
||||
|
||||
static void display_on(void *sohandle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *so)
|
||||
{
|
||||
/* access protect off */
|
||||
write_reg(sohandle, so, 0, 0xb0);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
|
||||
/* exit deep standby mode */
|
||||
write_reg(sohandle, so, 0, 0xb1);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
|
||||
/* frame memory I/F */
|
||||
write_reg(sohandle, so, 0, 0xb3);
|
||||
write_data(sohandle, so, data_frame_if, ARRAY_SIZE(data_frame_if));
|
||||
|
||||
/* display mode and frame memory write mode */
|
||||
write_reg(sohandle, so, 0, 0xb4);
|
||||
write_reg(sohandle, so, 1, 0x00); /* DBI, internal clock */
|
||||
|
||||
/* panel */
|
||||
write_reg(sohandle, so, 0, 0xc0);
|
||||
write_data(sohandle, so, data_panel, ARRAY_SIZE(data_panel));
|
||||
|
||||
/* timing (normal) */
|
||||
write_reg(sohandle, so, 0, 0xc1);
|
||||
write_data(sohandle, so, data_timing, ARRAY_SIZE(data_timing));
|
||||
|
||||
/* timing (partial) */
|
||||
write_reg(sohandle, so, 0, 0xc2);
|
||||
write_data(sohandle, so, data_timing, ARRAY_SIZE(data_timing));
|
||||
|
||||
/* timing (idle) */
|
||||
write_reg(sohandle, so, 0, 0xc3);
|
||||
write_data(sohandle, so, data_timing, ARRAY_SIZE(data_timing));
|
||||
|
||||
/* timing (source/VCOM/gate driving) */
|
||||
write_reg(sohandle, so, 0, 0xc4);
|
||||
write_data(sohandle, so, data_timing_src, ARRAY_SIZE(data_timing_src));
|
||||
|
||||
/* gamma (red) */
|
||||
write_reg(sohandle, so, 0, 0xc8);
|
||||
write_data(sohandle, so, data_gamma, ARRAY_SIZE(data_gamma));
|
||||
|
||||
/* gamma (green) */
|
||||
write_reg(sohandle, so, 0, 0xc9);
|
||||
write_data(sohandle, so, data_gamma, ARRAY_SIZE(data_gamma));
|
||||
|
||||
/* gamma (blue) */
|
||||
write_reg(sohandle, so, 0, 0xca);
|
||||
write_data(sohandle, so, data_gamma, ARRAY_SIZE(data_gamma));
|
||||
|
||||
/* power (common) */
|
||||
write_reg(sohandle, so, 0, 0xd0);
|
||||
write_data(sohandle, so, data_power, ARRAY_SIZE(data_power));
|
||||
|
||||
/* VCOM */
|
||||
write_reg(sohandle, so, 0, 0xd1);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
write_reg(sohandle, so, 1, 0x0f);
|
||||
write_reg(sohandle, so, 1, 0x02);
|
||||
|
||||
/* power (normal) */
|
||||
write_reg(sohandle, so, 0, 0xd2);
|
||||
write_reg(sohandle, so, 1, 0x63);
|
||||
write_reg(sohandle, so, 1, 0x24);
|
||||
|
||||
/* power (partial) */
|
||||
write_reg(sohandle, so, 0, 0xd3);
|
||||
write_reg(sohandle, so, 1, 0x63);
|
||||
write_reg(sohandle, so, 1, 0x24);
|
||||
|
||||
/* power (idle) */
|
||||
write_reg(sohandle, so, 0, 0xd4);
|
||||
write_reg(sohandle, so, 1, 0x63);
|
||||
write_reg(sohandle, so, 1, 0x24);
|
||||
|
||||
write_reg(sohandle, so, 0, 0xd8);
|
||||
write_reg(sohandle, so, 1, 0x77);
|
||||
write_reg(sohandle, so, 1, 0x77);
|
||||
|
||||
/* TE signal */
|
||||
write_reg(sohandle, so, 0, 0x35);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
|
||||
/* TE signal line */
|
||||
write_reg(sohandle, so, 0, 0x44);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
|
||||
/* column address */
|
||||
write_reg(sohandle, so, 0, 0x2a);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
write_reg(sohandle, so, 1, 0xef);
|
||||
|
||||
/* page address */
|
||||
write_reg(sohandle, so, 0, 0x2b);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
write_reg(sohandle, so, 1, 0x00);
|
||||
write_reg(sohandle, so, 1, 0x01);
|
||||
write_reg(sohandle, so, 1, 0x8f);
|
||||
|
||||
/* exit sleep mode */
|
||||
write_reg(sohandle, so, 0, 0x11);
|
||||
|
||||
mdelay(120);
|
||||
|
||||
/* clear vram */
|
||||
clear_memory(sohandle, so);
|
||||
|
||||
/* display ON */
|
||||
write_reg(sohandle, so, 0, 0x29);
|
||||
mdelay(1);
|
||||
|
||||
write_memory_start(sohandle, so);
|
||||
}
|
||||
|
||||
int kfr2r09_lcd_setup(void *board_data, void *sohandle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *so)
|
||||
{
|
||||
/* power on */
|
||||
gpio_set_value(GPIO_PTF4, 0); /* PROTECT/ -> L */
|
||||
gpio_set_value(GPIO_PTE4, 0); /* LCD_RST/ -> L */
|
||||
gpio_set_value(GPIO_PTF4, 1); /* PROTECT/ -> H */
|
||||
udelay(1100);
|
||||
gpio_set_value(GPIO_PTE4, 1); /* LCD_RST/ -> H */
|
||||
udelay(10);
|
||||
gpio_set_value(GPIO_PTF4, 0); /* PROTECT/ -> L */
|
||||
mdelay(20);
|
||||
|
||||
if (read_device_code(sohandle, so) != 0x01221517)
|
||||
return -ENODEV;
|
||||
|
||||
pr_info("KFR2R09 WQVGA LCD Module detected.\n");
|
||||
|
||||
display_on(sohandle, so);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define CTRL_CKSW 0x10
|
||||
#define CTRL_C10 0x20
|
||||
#define CTRL_CPSW 0x80
|
||||
#define MAIN_MLED4 0x40
|
||||
#define MAIN_MSW 0x80
|
||||
|
||||
static int kfr2r09_lcd_backlight(int on)
|
||||
{
|
||||
struct i2c_adapter *a;
|
||||
struct i2c_msg msg;
|
||||
unsigned char buf[2];
|
||||
int ret;
|
||||
|
||||
a = i2c_get_adapter(0);
|
||||
if (!a)
|
||||
return -ENODEV;
|
||||
|
||||
buf[0] = 0x00;
|
||||
if (on)
|
||||
buf[1] = CTRL_CPSW | CTRL_C10 | CTRL_CKSW;
|
||||
else
|
||||
buf[1] = 0;
|
||||
|
||||
msg.addr = 0x75;
|
||||
msg.buf = buf;
|
||||
msg.len = 2;
|
||||
msg.flags = 0;
|
||||
ret = i2c_transfer(a, &msg, 1);
|
||||
if (ret != 1)
|
||||
return -ENODEV;
|
||||
|
||||
buf[0] = 0x01;
|
||||
if (on)
|
||||
buf[1] = MAIN_MSW | MAIN_MLED4 | 0x0c;
|
||||
else
|
||||
buf[1] = 0;
|
||||
|
||||
msg.addr = 0x75;
|
||||
msg.buf = buf;
|
||||
msg.len = 2;
|
||||
msg.flags = 0;
|
||||
ret = i2c_transfer(a, &msg, 1);
|
||||
if (ret != 1)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void kfr2r09_lcd_on(void *board_data)
|
||||
{
|
||||
kfr2r09_lcd_backlight(1);
|
||||
}
|
||||
|
||||
void kfr2r09_lcd_off(void *board_data)
|
||||
{
|
||||
kfr2r09_lcd_backlight(0);
|
||||
}
|
386
arch/sh/boards/mach-kfr2r09/setup.c
Normal file
386
arch/sh/boards/mach-kfr2r09/setup.c
Normal file
|
@ -0,0 +1,386 @@
|
|||
/*
|
||||
* KFR2R09 board support code
|
||||
*
|
||||
* Copyright (C) 2009 Magnus Damm
|
||||
*
|
||||
* 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/mtd/physmap.h>
|
||||
#include <linux/mtd/onenand.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/usb/r8a66597.h>
|
||||
#include <video/sh_mobile_lcdc.h>
|
||||
#include <asm/clock.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/sh_keysc.h>
|
||||
#include <cpu/sh7724.h>
|
||||
#include <mach/kfr2r09.h>
|
||||
|
||||
static struct mtd_partition kfr2r09_nor_flash_partitions[] =
|
||||
{
|
||||
{
|
||||
.name = "boot",
|
||||
.offset = 0,
|
||||
.size = (4 * 1024 * 1024),
|
||||
.mask_flags = MTD_WRITEABLE, /* Read-only */
|
||||
},
|
||||
{
|
||||
.name = "other",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data kfr2r09_nor_flash_data = {
|
||||
.width = 2,
|
||||
.parts = kfr2r09_nor_flash_partitions,
|
||||
.nr_parts = ARRAY_SIZE(kfr2r09_nor_flash_partitions),
|
||||
};
|
||||
|
||||
static struct resource kfr2r09_nor_flash_resources[] = {
|
||||
[0] = {
|
||||
.name = "NOR Flash",
|
||||
.start = 0x00000000,
|
||||
.end = 0x03ffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device kfr2r09_nor_flash_device = {
|
||||
.name = "physmap-flash",
|
||||
.resource = kfr2r09_nor_flash_resources,
|
||||
.num_resources = ARRAY_SIZE(kfr2r09_nor_flash_resources),
|
||||
.dev = {
|
||||
.platform_data = &kfr2r09_nor_flash_data,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource kfr2r09_nand_flash_resources[] = {
|
||||
[0] = {
|
||||
.name = "NAND Flash",
|
||||
.start = 0x10000000,
|
||||
.end = 0x1001ffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device kfr2r09_nand_flash_device = {
|
||||
.name = "onenand-flash",
|
||||
.resource = kfr2r09_nand_flash_resources,
|
||||
.num_resources = ARRAY_SIZE(kfr2r09_nand_flash_resources),
|
||||
};
|
||||
|
||||
static struct sh_keysc_info kfr2r09_sh_keysc_info = {
|
||||
.mode = SH_KEYSC_MODE_1, /* KEYOUT0->4, KEYIN0->4 */
|
||||
.scan_timing = 3,
|
||||
.delay = 10,
|
||||
.keycodes = {
|
||||
KEY_PHONE, KEY_CLEAR, KEY_MAIL, KEY_WWW, KEY_ENTER,
|
||||
KEY_1, KEY_2, KEY_3, 0, KEY_UP,
|
||||
KEY_4, KEY_5, KEY_6, 0, KEY_LEFT,
|
||||
KEY_7, KEY_8, KEY_9, KEY_PROG1, KEY_RIGHT,
|
||||
KEY_S, KEY_0, KEY_P, KEY_PROG2, KEY_DOWN,
|
||||
0, 0, 0, 0, 0
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource kfr2r09_sh_keysc_resources[] = {
|
||||
[0] = {
|
||||
.name = "KEYSC",
|
||||
.start = 0x044b0000,
|
||||
.end = 0x044b000f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 79,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device kfr2r09_sh_keysc_device = {
|
||||
.name = "sh_keysc",
|
||||
.id = 0, /* "keysc0" clock */
|
||||
.num_resources = ARRAY_SIZE(kfr2r09_sh_keysc_resources),
|
||||
.resource = kfr2r09_sh_keysc_resources,
|
||||
.dev = {
|
||||
.platform_data = &kfr2r09_sh_keysc_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_KEYSC,
|
||||
},
|
||||
};
|
||||
|
||||
static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = {
|
||||
.clock_source = LCDC_CLK_BUS,
|
||||
.ch[0] = {
|
||||
.chan = LCDC_CHAN_MAINLCD,
|
||||
.bpp = 16,
|
||||
.interface_type = SYS18,
|
||||
.clock_divider = 6,
|
||||
.flags = LCDC_FLAGS_DWPOL,
|
||||
.lcd_cfg = {
|
||||
.name = "TX07D34VM0AAA",
|
||||
.xres = 240,
|
||||
.yres = 400,
|
||||
.left_margin = 0,
|
||||
.right_margin = 16,
|
||||
.hsync_len = 8,
|
||||
.upper_margin = 0,
|
||||
.lower_margin = 1,
|
||||
.vsync_len = 1,
|
||||
.sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
||||
},
|
||||
.lcd_size_cfg = {
|
||||
.width = 35,
|
||||
.height = 58,
|
||||
},
|
||||
.board_cfg = {
|
||||
.setup_sys = kfr2r09_lcd_setup,
|
||||
.display_on = kfr2r09_lcd_on,
|
||||
.display_off = kfr2r09_lcd_off,
|
||||
},
|
||||
.sys_bus_cfg = {
|
||||
.ldmt2r = 0x07010904,
|
||||
.ldmt3r = 0x14012914,
|
||||
/* set 1s delay to encourage fsync() */
|
||||
.deferred_io_msec = 1000,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
static struct resource kfr2r09_sh_lcdc_resources[] = {
|
||||
[0] = {
|
||||
.name = "LCDC",
|
||||
.start = 0xfe940000, /* P4-only space */
|
||||
.end = 0xfe942fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 106,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device kfr2r09_sh_lcdc_device = {
|
||||
.name = "sh_mobile_lcdc_fb",
|
||||
.num_resources = ARRAY_SIZE(kfr2r09_sh_lcdc_resources),
|
||||
.resource = kfr2r09_sh_lcdc_resources,
|
||||
.dev = {
|
||||
.platform_data = &kfr2r09_sh_lcdc_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_LCDC,
|
||||
},
|
||||
};
|
||||
|
||||
static struct r8a66597_platdata kfr2r09_usb0_gadget_data = {
|
||||
.on_chip = 1,
|
||||
};
|
||||
|
||||
static struct resource kfr2r09_usb0_gadget_resources[] = {
|
||||
[0] = {
|
||||
.start = 0x04d80000,
|
||||
.end = 0x04d80123,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 65,
|
||||
.end = 65,
|
||||
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device kfr2r09_usb0_gadget_device = {
|
||||
.name = "r8a66597_udc",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = NULL, /* not use dma */
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.platform_data = &kfr2r09_usb0_gadget_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(kfr2r09_usb0_gadget_resources),
|
||||
.resource = kfr2r09_usb0_gadget_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *kfr2r09_devices[] __initdata = {
|
||||
&kfr2r09_nor_flash_device,
|
||||
&kfr2r09_nand_flash_device,
|
||||
&kfr2r09_sh_keysc_device,
|
||||
&kfr2r09_sh_lcdc_device,
|
||||
};
|
||||
|
||||
#define BSC_CS0BCR 0xfec10004
|
||||
#define BSC_CS0WCR 0xfec10024
|
||||
#define BSC_CS4BCR 0xfec10010
|
||||
#define BSC_CS4WCR 0xfec10030
|
||||
#define PORT_MSELCRB 0xa4050182
|
||||
|
||||
#ifdef CONFIG_I2C
|
||||
static int kfr2r09_usb0_gadget_i2c_setup(void)
|
||||
{
|
||||
struct i2c_adapter *a;
|
||||
struct i2c_msg msg;
|
||||
unsigned char buf[2];
|
||||
int ret;
|
||||
|
||||
a = i2c_get_adapter(0);
|
||||
if (!a)
|
||||
return -ENODEV;
|
||||
|
||||
/* set bit 1 (the second bit) of chip at 0x09, register 0x13 */
|
||||
buf[0] = 0x13;
|
||||
msg.addr = 0x09;
|
||||
msg.buf = buf;
|
||||
msg.len = 1;
|
||||
msg.flags = 0;
|
||||
ret = i2c_transfer(a, &msg, 1);
|
||||
if (ret != 1)
|
||||
return -ENODEV;
|
||||
|
||||
buf[0] = 0;
|
||||
msg.addr = 0x09;
|
||||
msg.buf = buf;
|
||||
msg.len = 1;
|
||||
msg.flags = I2C_M_RD;
|
||||
ret = i2c_transfer(a, &msg, 1);
|
||||
if (ret != 1)
|
||||
return -ENODEV;
|
||||
|
||||
buf[1] = buf[0] | (1 << 1);
|
||||
buf[0] = 0x13;
|
||||
msg.addr = 0x09;
|
||||
msg.buf = buf;
|
||||
msg.len = 2;
|
||||
msg.flags = 0;
|
||||
ret = i2c_transfer(a, &msg, 1);
|
||||
if (ret != 1)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static int kfr2r09_usb0_gadget_i2c_setup(void)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int kfr2r09_usb0_gadget_setup(void)
|
||||
{
|
||||
int plugged_in;
|
||||
|
||||
gpio_request(GPIO_PTN4, NULL); /* USB_DET */
|
||||
gpio_direction_input(GPIO_PTN4);
|
||||
plugged_in = gpio_get_value(GPIO_PTN4);
|
||||
if (!plugged_in)
|
||||
return -ENODEV; /* no cable plugged in */
|
||||
|
||||
if (kfr2r09_usb0_gadget_i2c_setup() != 0)
|
||||
return -ENODEV; /* unable to configure using i2c */
|
||||
|
||||
ctrl_outw((ctrl_inw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB);
|
||||
gpio_request(GPIO_FN_PDSTATUS, NULL); /* R-standby disables USB clock */
|
||||
gpio_request(GPIO_PTV6, NULL); /* USBCLK_ON */
|
||||
gpio_direction_output(GPIO_PTV6, 1); /* USBCLK_ON = H */
|
||||
msleep(20); /* wait 20ms to let the clock settle */
|
||||
clk_enable(clk_get(NULL, "usb0"));
|
||||
ctrl_outw(0x0600, 0xa40501d4);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init kfr2r09_devices_setup(void)
|
||||
{
|
||||
/* enable SCIF1 serial port for YC401 console support */
|
||||
gpio_request(GPIO_FN_SCIF1_RXD, NULL);
|
||||
gpio_request(GPIO_FN_SCIF1_TXD, NULL);
|
||||
|
||||
/* setup NOR flash at CS0 */
|
||||
ctrl_outl(0x36db0400, BSC_CS0BCR);
|
||||
ctrl_outl(0x00000500, BSC_CS0WCR);
|
||||
|
||||
/* setup NAND flash at CS4 */
|
||||
ctrl_outl(0x36db0400, BSC_CS4BCR);
|
||||
ctrl_outl(0x00000500, BSC_CS4WCR);
|
||||
|
||||
/* setup KEYSC pins */
|
||||
gpio_request(GPIO_FN_KEYOUT0, NULL);
|
||||
gpio_request(GPIO_FN_KEYOUT1, NULL);
|
||||
gpio_request(GPIO_FN_KEYOUT2, NULL);
|
||||
gpio_request(GPIO_FN_KEYOUT3, NULL);
|
||||
gpio_request(GPIO_FN_KEYOUT4_IN6, NULL);
|
||||
gpio_request(GPIO_FN_KEYIN0, NULL);
|
||||
gpio_request(GPIO_FN_KEYIN1, NULL);
|
||||
gpio_request(GPIO_FN_KEYIN2, NULL);
|
||||
gpio_request(GPIO_FN_KEYIN3, NULL);
|
||||
gpio_request(GPIO_FN_KEYIN4, NULL);
|
||||
gpio_request(GPIO_FN_KEYOUT5_IN5, NULL);
|
||||
|
||||
/* setup LCDC pins for SYS panel */
|
||||
gpio_request(GPIO_FN_LCDD17, NULL);
|
||||
gpio_request(GPIO_FN_LCDD16, NULL);
|
||||
gpio_request(GPIO_FN_LCDD15, NULL);
|
||||
gpio_request(GPIO_FN_LCDD14, NULL);
|
||||
gpio_request(GPIO_FN_LCDD13, NULL);
|
||||
gpio_request(GPIO_FN_LCDD12, NULL);
|
||||
gpio_request(GPIO_FN_LCDD11, NULL);
|
||||
gpio_request(GPIO_FN_LCDD10, NULL);
|
||||
gpio_request(GPIO_FN_LCDD9, NULL);
|
||||
gpio_request(GPIO_FN_LCDD8, NULL);
|
||||
gpio_request(GPIO_FN_LCDD7, NULL);
|
||||
gpio_request(GPIO_FN_LCDD6, NULL);
|
||||
gpio_request(GPIO_FN_LCDD5, NULL);
|
||||
gpio_request(GPIO_FN_LCDD4, NULL);
|
||||
gpio_request(GPIO_FN_LCDD3, NULL);
|
||||
gpio_request(GPIO_FN_LCDD2, NULL);
|
||||
gpio_request(GPIO_FN_LCDD1, NULL);
|
||||
gpio_request(GPIO_FN_LCDD0, NULL);
|
||||
gpio_request(GPIO_FN_LCDRS, NULL); /* LCD_RS */
|
||||
gpio_request(GPIO_FN_LCDCS, NULL); /* LCD_CS/ */
|
||||
gpio_request(GPIO_FN_LCDRD, NULL); /* LCD_RD/ */
|
||||
gpio_request(GPIO_FN_LCDWR, NULL); /* LCD_WR/ */
|
||||
gpio_request(GPIO_FN_LCDVSYN, NULL); /* LCD_VSYNC */
|
||||
gpio_request(GPIO_PTE4, NULL); /* LCD_RST/ */
|
||||
gpio_direction_output(GPIO_PTE4, 1);
|
||||
gpio_request(GPIO_PTF4, NULL); /* PROTECT/ */
|
||||
gpio_direction_output(GPIO_PTF4, 1);
|
||||
gpio_request(GPIO_PTU0, NULL); /* LEDSTDBY/ */
|
||||
gpio_direction_output(GPIO_PTU0, 1);
|
||||
|
||||
/* setup USB function */
|
||||
if (kfr2r09_usb0_gadget_setup() == 0)
|
||||
platform_device_register(&kfr2r09_usb0_gadget_device);
|
||||
|
||||
return platform_add_devices(kfr2r09_devices,
|
||||
ARRAY_SIZE(kfr2r09_devices));
|
||||
}
|
||||
device_initcall(kfr2r09_devices_setup);
|
||||
|
||||
/* Return the board specific boot mode pin configuration */
|
||||
static int kfr2r09_mode_pins(void)
|
||||
{
|
||||
/* MD0=1, MD1=1, MD2=0: Clock Mode 3
|
||||
* MD3=0: 16-bit Area0 Bus Width
|
||||
* MD5=1: Little Endian
|
||||
* MD8=1: Test Mode Disabled
|
||||
*/
|
||||
return MODE_PIN0 | MODE_PIN1 | MODE_PIN5 | MODE_PIN8;
|
||||
}
|
||||
|
||||
/*
|
||||
* The Machine Vector
|
||||
*/
|
||||
static struct sh_machine_vector mv_kfr2r09 __initmv = {
|
||||
.mv_name = "kfr2r09",
|
||||
.mv_mode_pins = kfr2r09_mode_pins,
|
||||
};
|
|
@ -98,6 +98,9 @@ static struct platform_device sh_keysc_device = {
|
|||
.dev = {
|
||||
.platform_data = &sh_keysc_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_KEYSC,
|
||||
},
|
||||
};
|
||||
|
||||
static struct mtd_partition migor_nor_flash_partitions[] =
|
||||
|
@ -276,7 +279,7 @@ static struct resource migor_lcdc_resources[] = {
|
|||
[0] = {
|
||||
.name = "LCDC",
|
||||
.start = 0xfe940000, /* P4-only space */
|
||||
.end = 0xfe941fff,
|
||||
.end = 0xfe942fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
|
@ -292,6 +295,9 @@ static struct platform_device migor_lcdc_device = {
|
|||
.dev = {
|
||||
.platform_data = &sh_mobile_lcdc_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_LCDC,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk *camera_clk;
|
||||
|
@ -379,6 +385,9 @@ static struct platform_device migor_ceu_device = {
|
|||
.dev = {
|
||||
.platform_data = &sh_mobile_ceu_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_CEU,
|
||||
},
|
||||
};
|
||||
|
||||
struct spi_gpio_platform_data sdcard_cn9_platform_data = {
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/heartbeat.h>
|
||||
#include <asm/sh_keysc.h>
|
||||
#include <cpu/sh7722.h>
|
||||
|
||||
/* Heartbeat */
|
||||
static struct heartbeat_data heartbeat_data = {
|
||||
|
@ -137,6 +138,9 @@ static struct platform_device sh_keysc_device = {
|
|||
.dev = {
|
||||
.platform_data = &sh_keysc_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_KEYSC,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *se7722_devices[] __initdata = {
|
||||
|
|
|
@ -39,7 +39,15 @@
|
|||
* SW41 : abxx xxxx -> a = 0 : Analog monitor
|
||||
* 1 : Digital monitor
|
||||
* b = 0 : VGA
|
||||
* 1 : SVGA
|
||||
* 1 : 720p
|
||||
*/
|
||||
|
||||
/*
|
||||
* about 720p
|
||||
*
|
||||
* When you use 1280 x 720 lcdc output,
|
||||
* you should change OSC6 lcdc clock from 25.175MHz to 74.25MHz,
|
||||
* and change SW41 to use 720p
|
||||
*/
|
||||
|
||||
/* Heartbeat */
|
||||
|
@ -158,7 +166,7 @@ static struct resource lcdc_resources[] = {
|
|||
[0] = {
|
||||
.name = "LCDC",
|
||||
.start = 0xfe940000,
|
||||
.end = 0xfe941fff,
|
||||
.end = 0xfe942fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
|
@ -174,6 +182,9 @@ static struct platform_device lcdc_device = {
|
|||
.dev = {
|
||||
.platform_data = &lcdc_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_LCDC,
|
||||
},
|
||||
};
|
||||
|
||||
/* CEU0 */
|
||||
|
@ -205,6 +216,9 @@ static struct platform_device ceu0_device = {
|
|||
.dev = {
|
||||
.platform_data = &sh_mobile_ceu0_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_CEU0,
|
||||
},
|
||||
};
|
||||
|
||||
/* CEU1 */
|
||||
|
@ -236,6 +250,9 @@ static struct platform_device ceu1_device = {
|
|||
.dev = {
|
||||
.platform_data = &sh_mobile_ceu1_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_CEU1,
|
||||
},
|
||||
};
|
||||
|
||||
/* KEYSC in SoC (Needs SW33-2 set to ON) */
|
||||
|
@ -274,6 +291,9 @@ static struct platform_device keysc_device = {
|
|||
.dev = {
|
||||
.platform_data = &keysc_info,
|
||||
},
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_KEYSC,
|
||||
},
|
||||
};
|
||||
|
||||
/* SH Eth */
|
||||
|
@ -302,15 +322,19 @@ static struct platform_device sh_eth_device = {
|
|||
},
|
||||
.num_resources = ARRAY_SIZE(sh_eth_resources),
|
||||
.resource = sh_eth_resources,
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_ETHER,
|
||||
},
|
||||
};
|
||||
|
||||
static struct r8a66597_platdata sh7724_usb0_host_data = {
|
||||
.on_chip = 1,
|
||||
};
|
||||
|
||||
static struct resource sh7724_usb0_host_resources[] = {
|
||||
[0] = {
|
||||
.start = 0xa4d80000,
|
||||
.end = 0xa4d800ff,
|
||||
.end = 0xa4d80124 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
|
@ -330,6 +354,38 @@ static struct platform_device sh7724_usb0_host_device = {
|
|||
},
|
||||
.num_resources = ARRAY_SIZE(sh7724_usb0_host_resources),
|
||||
.resource = sh7724_usb0_host_resources,
|
||||
.archdata = {
|
||||
.hwblk_id = HWBLK_USB0,
|
||||
},
|
||||
};
|
||||
|
||||
static struct r8a66597_platdata sh7724_usb1_gadget_data = {
|
||||
.on_chip = 1,
|
||||
};
|
||||
|
||||
static struct resource sh7724_usb1_gadget_resources[] = {
|
||||
[0] = {
|
||||
.start = 0xa4d90000,
|
||||
.end = 0xa4d90123,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 66,
|
||||
.end = 66,
|
||||
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device sh7724_usb1_gadget_device = {
|
||||
.name = "r8a66597_udc",
|
||||
.id = 1, /* USB1 */
|
||||
.dev = {
|
||||
.dma_mask = NULL, /* not use dma */
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.platform_data = &sh7724_usb1_gadget_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(sh7724_usb1_gadget_resources),
|
||||
.resource = sh7724_usb1_gadget_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *ms7724se_devices[] __initdata = {
|
||||
|
@ -342,6 +398,7 @@ static struct platform_device *ms7724se_devices[] __initdata = {
|
|||
&keysc_device,
|
||||
&sh_eth_device,
|
||||
&sh7724_usb0_host_device,
|
||||
&sh7724_usb1_gadget_device,
|
||||
};
|
||||
|
||||
#define EEPROM_OP 0xBA206000
|
||||
|
@ -421,9 +478,38 @@ static int __init devices_setup(void)
|
|||
/* turn on USB clocks, use external clock */
|
||||
ctrl_outw((ctrl_inw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/* Let LED9 show STATUS2 */
|
||||
gpio_request(GPIO_FN_STATUS2, NULL);
|
||||
|
||||
/* Lit LED10 show STATUS0 */
|
||||
gpio_request(GPIO_FN_STATUS0, NULL);
|
||||
|
||||
/* Lit LED11 show PDSTATUS */
|
||||
gpio_request(GPIO_FN_PDSTATUS, NULL);
|
||||
#else
|
||||
/* Lit LED9 */
|
||||
gpio_request(GPIO_PTJ6, NULL);
|
||||
gpio_direction_output(GPIO_PTJ6, 1);
|
||||
gpio_export(GPIO_PTJ6, 0);
|
||||
|
||||
/* Lit LED10 */
|
||||
gpio_request(GPIO_PTJ5, NULL);
|
||||
gpio_direction_output(GPIO_PTJ5, 1);
|
||||
gpio_export(GPIO_PTJ5, 0);
|
||||
|
||||
/* Lit LED11 */
|
||||
gpio_request(GPIO_PTJ7, NULL);
|
||||
gpio_direction_output(GPIO_PTJ7, 1);
|
||||
gpio_export(GPIO_PTJ7, 0);
|
||||
#endif
|
||||
|
||||
/* enable USB0 port */
|
||||
ctrl_outw(0x0600, 0xa40501d4);
|
||||
|
||||
/* enable USB1 port */
|
||||
ctrl_outw(0x0600, 0xa4050192);
|
||||
|
||||
/* enable IRQ 0,1,2 */
|
||||
gpio_request(GPIO_FN_INTC_IRQ0, NULL);
|
||||
gpio_request(GPIO_FN_INTC_IRQ1, NULL);
|
||||
|
@ -546,15 +632,15 @@ static int __init devices_setup(void)
|
|||
sh_eth_init();
|
||||
|
||||
if (sw & SW41_B) {
|
||||
/* SVGA */
|
||||
lcdc_info.ch[0].lcd_cfg.xres = 800;
|
||||
lcdc_info.ch[0].lcd_cfg.yres = 600;
|
||||
lcdc_info.ch[0].lcd_cfg.left_margin = 142;
|
||||
lcdc_info.ch[0].lcd_cfg.right_margin = 52;
|
||||
lcdc_info.ch[0].lcd_cfg.hsync_len = 96;
|
||||
lcdc_info.ch[0].lcd_cfg.upper_margin = 24;
|
||||
lcdc_info.ch[0].lcd_cfg.lower_margin = 2;
|
||||
lcdc_info.ch[0].lcd_cfg.vsync_len = 2;
|
||||
/* 720p */
|
||||
lcdc_info.ch[0].lcd_cfg.xres = 1280;
|
||||
lcdc_info.ch[0].lcd_cfg.yres = 720;
|
||||
lcdc_info.ch[0].lcd_cfg.left_margin = 220;
|
||||
lcdc_info.ch[0].lcd_cfg.right_margin = 110;
|
||||
lcdc_info.ch[0].lcd_cfg.hsync_len = 40;
|
||||
lcdc_info.ch[0].lcd_cfg.upper_margin = 20;
|
||||
lcdc_info.ch[0].lcd_cfg.lower_margin = 5;
|
||||
lcdc_info.ch[0].lcd_cfg.vsync_len = 5;
|
||||
} else {
|
||||
/* VGA */
|
||||
lcdc_info.ch[0].lcd_cfg.xres = 640;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <linux/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/usb/r8a66597.h>
|
||||
#include <linux/usb/m66592.h>
|
||||
#include <asm/ilsel.h>
|
||||
|
||||
static struct resource heartbeat_resources[] = {
|
||||
|
@ -89,6 +90,11 @@ static struct platform_device r8a66597_usb_host_device = {
|
|||
.resource = r8a66597_usb_host_resources,
|
||||
};
|
||||
|
||||
static struct m66592_platdata usbf_platdata = {
|
||||
.xtal = M66592_PLATDATA_XTAL_24MHZ,
|
||||
.vif = 1,
|
||||
};
|
||||
|
||||
static struct resource m66592_usb_peripheral_resources[] = {
|
||||
[0] = {
|
||||
.name = "m66592_udc",
|
||||
|
@ -109,6 +115,7 @@ static struct platform_device m66592_usb_peripheral_device = {
|
|||
.dev = {
|
||||
.dma_mask = NULL, /* don't use dma */
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.platform_data = &usbf_platdata,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(m66592_usb_peripheral_resources),
|
||||
.resource = m66592_usb_peripheral_resources,
|
||||
|
|
5
arch/sh/boot/.gitignore
vendored
5
arch/sh/boot/.gitignore
vendored
|
@ -1,4 +1,3 @@
|
|||
zImage
|
||||
vmlinux.srec
|
||||
uImage
|
||||
uImage.srec
|
||||
vmlinux*
|
||||
uImage*
|
||||
|
|
|
@ -20,8 +20,13 @@ CONFIG_BOOT_LINK_OFFSET ?= 0x00800000
|
|||
CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000
|
||||
CONFIG_ENTRY_OFFSET ?= 0x00001000
|
||||
|
||||
targets := zImage vmlinux.srec uImage uImage.srec
|
||||
subdir- := compressed
|
||||
suffix-$(CONFIG_KERNEL_GZIP) := gz
|
||||
suffix-$(CONFIG_KERNEL_BZIP2) := bz2
|
||||
suffix-$(CONFIG_KERNEL_LZMA) := lzma
|
||||
|
||||
targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz uImage.bz2 uImage.lzma
|
||||
extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma
|
||||
subdir- := compressed romimage
|
||||
|
||||
$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
@ -30,6 +35,13 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
|
|||
$(obj)/compressed/vmlinux: FORCE
|
||||
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
|
||||
|
||||
$(obj)/romImage: $(obj)/romimage/vmlinux FORCE
|
||||
$(call if_changed,objcopy)
|
||||
@echo ' Kernel: $@ is ready'
|
||||
|
||||
$(obj)/romimage/vmlinux: $(obj)/zImage FORCE
|
||||
$(Q)$(MAKE) $(build)=$(obj)/romimage $@
|
||||
|
||||
KERNEL_MEMORY := 0x00000000
|
||||
ifeq ($(CONFIG_PMB_FIXED),y)
|
||||
KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \
|
||||
|
@ -40,9 +52,6 @@ KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \
|
|||
$$[$(CONFIG_MEMORY_START)]')
|
||||
endif
|
||||
|
||||
export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \
|
||||
CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET KERNEL_MEMORY
|
||||
|
||||
KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \
|
||||
$$[$(CONFIG_PAGE_OFFSET) + \
|
||||
$(KERNEL_MEMORY) + \
|
||||
|
@ -55,19 +64,30 @@ KERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x%08x" \
|
|||
|
||||
quiet_cmd_uimage = UIMAGE $@
|
||||
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \
|
||||
-C gzip -a $(KERNEL_LOAD) -e $(KERNEL_ENTRY) \
|
||||
-C $(2) -a $(KERNEL_LOAD) -e $(KERNEL_ENTRY) \
|
||||
-n 'Linux-$(KERNELRELEASE)' -d $< $@
|
||||
|
||||
$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
|
||||
$(call if_changed,uimage)
|
||||
@echo ' Image $@ is ready'
|
||||
|
||||
$(obj)/vmlinux.bin: vmlinux FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,gzip)
|
||||
|
||||
$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,bzip2)
|
||||
|
||||
$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,lzma)
|
||||
|
||||
$(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2
|
||||
$(call if_changed,uimage,bzip2)
|
||||
|
||||
$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz
|
||||
$(call if_changed,uimage,gzip)
|
||||
|
||||
$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma
|
||||
$(call if_changed,uimage,lzma)
|
||||
|
||||
OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec
|
||||
$(obj)/vmlinux.srec: $(obj)/compressed/vmlinux
|
||||
$(call if_changed,objcopy)
|
||||
|
@ -76,5 +96,9 @@ OBJCOPYFLAGS_uImage.srec := -I binary -O srec
|
|||
$(obj)/uImage.srec: $(obj)/uImage
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
clean-files += uImage uImage.srec vmlinux.srec \
|
||||
vmlinux.bin vmlinux.bin.gz
|
||||
$(obj)/uImage: $(obj)/uImage.$(suffix-y)
|
||||
@ln -sf $(notdir $<) $@
|
||||
@echo ' Image $@ is ready'
|
||||
|
||||
export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \
|
||||
CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET KERNEL_MEMORY suffix-y
|
||||
|
|
1
arch/sh/boot/compressed/.gitignore
vendored
Normal file
1
arch/sh/boot/compressed/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
vmlinux.bin.*
|
|
@ -5,9 +5,10 @@
|
|||
#
|
||||
|
||||
targets := vmlinux vmlinux.bin vmlinux.bin.gz \
|
||||
head_$(BITS).o misc_$(BITS).o piggy.o
|
||||
vmlinux.bin.bz2 vmlinux.bin.lzma \
|
||||
head_$(BITS).o misc.o piggy.o
|
||||
|
||||
OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc_$(BITS).o $(obj)/cache.o
|
||||
OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o
|
||||
|
||||
ifdef CONFIG_SH_STANDARD_BIOS
|
||||
OBJECTS += $(obj)/../../kernel/sh_bios.o
|
||||
|
@ -23,7 +24,7 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
|
|||
|
||||
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
|
||||
|
||||
ifeq ($(CONFIG_FUNCTION_TRACER),y)
|
||||
ifeq ($(CONFIG_MCOUNT),y)
|
||||
ORIG_CFLAGS := $(KBUILD_CFLAGS)
|
||||
KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
|
||||
endif
|
||||
|
@ -38,10 +39,18 @@ $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
|
|||
$(obj)/vmlinux.bin: vmlinux FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
|
||||
vmlinux.bin.all-y := $(obj)/vmlinux.bin
|
||||
|
||||
$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
|
||||
$(call if_changed,gzip)
|
||||
$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
|
||||
$(call if_changed,bzip2)
|
||||
$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
|
||||
$(call if_changed,lzma)
|
||||
|
||||
OBJCOPYFLAGS += -R .empty_zero_page
|
||||
|
||||
$(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE
|
||||
$(call if_changed,as_o_S)
|
||||
LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
|
||||
|
||||
$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
|
||||
$(call if_changed,ld)
|
||||
|
|
|
@ -22,7 +22,7 @@ startup:
|
|||
bt clear_bss
|
||||
sub r0, r2
|
||||
mov.l bss_start_addr, r0
|
||||
mov #0xe0, r1
|
||||
mov #0xffffffe0, r1
|
||||
and r1, r0 ! align cache line
|
||||
mov.l text_start_addr, r3
|
||||
mov r0, r1
|
||||
|
|
149
arch/sh/boot/compressed/misc.c
Normal file
149
arch/sh/boot/compressed/misc.c
Normal file
|
@ -0,0 +1,149 @@
|
|||
/*
|
||||
* arch/sh/boot/compressed/misc.c
|
||||
*
|
||||
* This is a collection of several routines from gzip-1.0.3
|
||||
* adapted for Linux.
|
||||
*
|
||||
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
|
||||
*
|
||||
* Adapted for SH by Stuart Menefy, Aug 1999
|
||||
*
|
||||
* Modified to use standard LinuxSH BIOS by Greg Banks 7Jul2000
|
||||
*/
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/sh_bios.h>
|
||||
|
||||
/*
|
||||
* gzip declarations
|
||||
*/
|
||||
|
||||
#define STATIC static
|
||||
|
||||
#undef memset
|
||||
#undef memcpy
|
||||
#define memzero(s, n) memset ((s), 0, (n))
|
||||
|
||||
/* cache.c */
|
||||
#define CACHE_ENABLE 0
|
||||
#define CACHE_DISABLE 1
|
||||
int cache_control(unsigned int command);
|
||||
|
||||
extern char input_data[];
|
||||
extern int input_len;
|
||||
static unsigned char *output;
|
||||
|
||||
static void error(char *m);
|
||||
|
||||
int puts(const char *);
|
||||
|
||||
extern int _text; /* Defined in vmlinux.lds.S */
|
||||
extern int _end;
|
||||
static unsigned long free_mem_ptr;
|
||||
static unsigned long free_mem_end_ptr;
|
||||
|
||||
#ifdef CONFIG_HAVE_KERNEL_BZIP2
|
||||
#define HEAP_SIZE 0x400000
|
||||
#else
|
||||
#define HEAP_SIZE 0x10000
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KERNEL_GZIP
|
||||
#include "../../../../lib/decompress_inflate.c"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KERNEL_BZIP2
|
||||
#include "../../../../lib/decompress_bunzip2.c"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KERNEL_LZMA
|
||||
#include "../../../../lib/decompress_unlzma.c"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SH_STANDARD_BIOS
|
||||
size_t strlen(const char *s)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
while (*s++)
|
||||
i++;
|
||||
return i;
|
||||
}
|
||||
|
||||
int puts(const char *s)
|
||||
{
|
||||
int len = strlen(s);
|
||||
sh_bios_console_write(s, len);
|
||||
return len;
|
||||
}
|
||||
#else
|
||||
int puts(const char *s)
|
||||
{
|
||||
/* This should be updated to use the sh-sci routines */
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void* memset(void* s, int c, size_t n)
|
||||
{
|
||||
int i;
|
||||
char *ss = (char*)s;
|
||||
|
||||
for (i=0;i<n;i++) ss[i] = c;
|
||||
return s;
|
||||
}
|
||||
|
||||
void* memcpy(void* __dest, __const void* __src,
|
||||
size_t __n)
|
||||
{
|
||||
int i;
|
||||
char *d = (char *)__dest, *s = (char *)__src;
|
||||
|
||||
for (i=0;i<__n;i++) d[i] = s[i];
|
||||
return __dest;
|
||||
}
|
||||
|
||||
static void error(char *x)
|
||||
{
|
||||
puts("\n\n");
|
||||
puts(x);
|
||||
puts("\n\n -- System halted");
|
||||
|
||||
while(1); /* Halt */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SUPERH64
|
||||
#define stackalign 8
|
||||
#else
|
||||
#define stackalign 4
|
||||
#endif
|
||||
|
||||
#define STACK_SIZE (4096)
|
||||
long __attribute__ ((aligned(stackalign))) user_stack[STACK_SIZE];
|
||||
long *stack_start = &user_stack[STACK_SIZE];
|
||||
|
||||
void decompress_kernel(void)
|
||||
{
|
||||
unsigned long output_addr;
|
||||
|
||||
#ifdef CONFIG_SUPERH64
|
||||
output_addr = (CONFIG_MEMORY_START + 0x2000);
|
||||
#else
|
||||
output_addr = PHYSADDR((unsigned long)&_text+PAGE_SIZE);
|
||||
#ifdef CONFIG_29BIT
|
||||
output_addr |= P2SEG;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
output = (unsigned char *)output_addr;
|
||||
free_mem_ptr = (unsigned long)&_end;
|
||||
free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
|
||||
|
||||
puts("Uncompressing Linux... ");
|
||||
cache_control(CACHE_ENABLE);
|
||||
decompress(input_data, input_len, NULL, NULL, output, NULL, error);
|
||||
cache_control(CACHE_DISABLE);
|
||||
puts("Ok, booting the kernel.\n");
|
||||
}
|
|
@ -1,206 +0,0 @@
|
|||
/*
|
||||
* arch/sh/boot/compressed/misc.c
|
||||
*
|
||||
* This is a collection of several routines from gzip-1.0.3
|
||||
* adapted for Linux.
|
||||
*
|
||||
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
|
||||
*
|
||||
* Adapted for SH by Stuart Menefy, Aug 1999
|
||||
*
|
||||
* Modified to use standard LinuxSH BIOS by Greg Banks 7Jul2000
|
||||
*/
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/page.h>
|
||||
#ifdef CONFIG_SH_STANDARD_BIOS
|
||||
#include <asm/sh_bios.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* gzip declarations
|
||||
*/
|
||||
|
||||
#define OF(args) args
|
||||
#define STATIC static
|
||||
|
||||
#undef memset
|
||||
#undef memcpy
|
||||
#define memzero(s, n) memset ((s), 0, (n))
|
||||
|
||||
typedef unsigned char uch;
|
||||
typedef unsigned short ush;
|
||||
typedef unsigned long ulg;
|
||||
|
||||
#define WSIZE 0x8000 /* Window size must be at least 32k, */
|
||||
/* and a power of two */
|
||||
|
||||
static uch *inbuf; /* input buffer */
|
||||
static uch window[WSIZE]; /* Sliding window buffer */
|
||||
|
||||
static unsigned insize = 0; /* valid bytes in inbuf */
|
||||
static unsigned inptr = 0; /* index of next byte to be processed in inbuf */
|
||||
static unsigned outcnt = 0; /* bytes in output buffer */
|
||||
|
||||
/* gzip flag byte */
|
||||
#define ASCII_FLAG 0x01 /* bit 0 set: file probably ASCII text */
|
||||
#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
|
||||
#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
|
||||
#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
|
||||
#define COMMENT 0x10 /* bit 4 set: file comment present */
|
||||
#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
|
||||
#define RESERVED 0xC0 /* bit 6,7: reserved */
|
||||
|
||||
#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf())
|
||||
|
||||
/* Diagnostic functions */
|
||||
#ifdef DEBUG
|
||||
# define Assert(cond,msg) {if(!(cond)) error(msg);}
|
||||
# define Trace(x) fprintf x
|
||||
# define Tracev(x) {if (verbose) fprintf x ;}
|
||||
# define Tracevv(x) {if (verbose>1) fprintf x ;}
|
||||
# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
|
||||
# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
|
||||
#else
|
||||
# define Assert(cond,msg)
|
||||
# define Trace(x)
|
||||
# define Tracev(x)
|
||||
# define Tracevv(x)
|
||||
# define Tracec(c,x)
|
||||
# define Tracecv(c,x)
|
||||
#endif
|
||||
|
||||
static int fill_inbuf(void);
|
||||
static void flush_window(void);
|
||||
static void error(char *m);
|
||||
|
||||
extern char input_data[];
|
||||
extern int input_len;
|
||||
|
||||
static long bytes_out = 0;
|
||||
static uch *output_data;
|
||||
static unsigned long output_ptr = 0;
|
||||
|
||||
static void error(char *m);
|
||||
|
||||
int puts(const char *);
|
||||
|
||||
extern int _text; /* Defined in vmlinux.lds.S */
|
||||
extern int _end;
|
||||
static unsigned long free_mem_ptr;
|
||||
static unsigned long free_mem_end_ptr;
|
||||
|
||||
#define HEAP_SIZE 0x10000
|
||||
|
||||
#include "../../../../lib/inflate.c"
|
||||
|
||||
#ifdef CONFIG_SH_STANDARD_BIOS
|
||||
size_t strlen(const char *s)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
while (*s++)
|
||||
i++;
|
||||
return i;
|
||||
}
|
||||
|
||||
int puts(const char *s)
|
||||
{
|
||||
int len = strlen(s);
|
||||
sh_bios_console_write(s, len);
|
||||
return len;
|
||||
}
|
||||
#else
|
||||
int puts(const char *s)
|
||||
{
|
||||
/* This should be updated to use the sh-sci routines */
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void* memset(void* s, int c, size_t n)
|
||||
{
|
||||
int i;
|
||||
char *ss = (char*)s;
|
||||
|
||||
for (i=0;i<n;i++) ss[i] = c;
|
||||
return s;
|
||||
}
|
||||
|
||||
void* memcpy(void* __dest, __const void* __src,
|
||||
size_t __n)
|
||||
{
|
||||
int i;
|
||||
char *d = (char *)__dest, *s = (char *)__src;
|
||||
|
||||
for (i=0;i<__n;i++) d[i] = s[i];
|
||||
return __dest;
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Fill the input buffer. This is called only when the buffer is empty
|
||||
* and at least one byte is really needed.
|
||||
*/
|
||||
static int fill_inbuf(void)
|
||||
{
|
||||
if (insize != 0) {
|
||||
error("ran out of input data");
|
||||
}
|
||||
|
||||
inbuf = input_data;
|
||||
insize = input_len;
|
||||
inptr = 1;
|
||||
return inbuf[0];
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Write the output window window[0..outcnt-1] and update crc and bytes_out.
|
||||
* (Used for the decompressed data only.)
|
||||
*/
|
||||
static void flush_window(void)
|
||||
{
|
||||
ulg c = crc; /* temporary variable */
|
||||
unsigned n;
|
||||
uch *in, *out, ch;
|
||||
|
||||
in = window;
|
||||
out = &output_data[output_ptr];
|
||||
for (n = 0; n < outcnt; n++) {
|
||||
ch = *out++ = *in++;
|
||||
c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
|
||||
}
|
||||
crc = c;
|
||||
bytes_out += (ulg)outcnt;
|
||||
output_ptr += (ulg)outcnt;
|
||||
outcnt = 0;
|
||||
}
|
||||
|
||||
static void error(char *x)
|
||||
{
|
||||
puts("\n\n");
|
||||
puts(x);
|
||||
puts("\n\n -- System halted");
|
||||
|
||||
while(1); /* Halt */
|
||||
}
|
||||
|
||||
#define STACK_SIZE (4096)
|
||||
long user_stack [STACK_SIZE];
|
||||
long* stack_start = &user_stack[STACK_SIZE];
|
||||
|
||||
void decompress_kernel(void)
|
||||
{
|
||||
output_data = NULL;
|
||||
output_ptr = PHYSADDR((unsigned long)&_text+PAGE_SIZE);
|
||||
#ifdef CONFIG_29BIT
|
||||
output_ptr |= P2SEG;
|
||||
#endif
|
||||
free_mem_ptr = (unsigned long)&_end;
|
||||
free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
|
||||
|
||||
makecrc();
|
||||
puts("Uncompressing Linux... ");
|
||||
gunzip();
|
||||
puts("Ok, booting the kernel.\n");
|
||||
}
|
|
@ -1,210 +0,0 @@
|
|||
/*
|
||||
* arch/sh/boot/compressed/misc_64.c
|
||||
*
|
||||
* This is a collection of several routines from gzip-1.0.3
|
||||
* adapted for Linux.
|
||||
*
|
||||
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
|
||||
*
|
||||
* Adapted for SHmedia from sh by Stuart Menefy, May 2002
|
||||
*/
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
/* cache.c */
|
||||
#define CACHE_ENABLE 0
|
||||
#define CACHE_DISABLE 1
|
||||
int cache_control(unsigned int command);
|
||||
|
||||
/*
|
||||
* gzip declarations
|
||||
*/
|
||||
|
||||
#define OF(args) args
|
||||
#define STATIC static
|
||||
|
||||
#undef memset
|
||||
#undef memcpy
|
||||
#define memzero(s, n) memset ((s), 0, (n))
|
||||
|
||||
typedef unsigned char uch;
|
||||
typedef unsigned short ush;
|
||||
typedef unsigned long ulg;
|
||||
|
||||
#define WSIZE 0x8000 /* Window size must be at least 32k, */
|
||||
/* and a power of two */
|
||||
|
||||
static uch *inbuf; /* input buffer */
|
||||
static uch window[WSIZE]; /* Sliding window buffer */
|
||||
|
||||
static unsigned insize = 0; /* valid bytes in inbuf */
|
||||
static unsigned inptr = 0; /* index of next byte to be processed in inbuf */
|
||||
static unsigned outcnt = 0; /* bytes in output buffer */
|
||||
|
||||
/* gzip flag byte */
|
||||
#define ASCII_FLAG 0x01 /* bit 0 set: file probably ASCII text */
|
||||
#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
|
||||
#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
|
||||
#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
|
||||
#define COMMENT 0x10 /* bit 4 set: file comment present */
|
||||
#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
|
||||
#define RESERVED 0xC0 /* bit 6,7: reserved */
|
||||
|
||||
#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf())
|
||||
|
||||
/* Diagnostic functions */
|
||||
#ifdef DEBUG
|
||||
# define Assert(cond,msg) {if(!(cond)) error(msg);}
|
||||
# define Trace(x) fprintf x
|
||||
# define Tracev(x) {if (verbose) fprintf x ;}
|
||||
# define Tracevv(x) {if (verbose>1) fprintf x ;}
|
||||
# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
|
||||
# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
|
||||
#else
|
||||
# define Assert(cond,msg)
|
||||
# define Trace(x)
|
||||
# define Tracev(x)
|
||||
# define Tracevv(x)
|
||||
# define Tracec(c,x)
|
||||
# define Tracecv(c,x)
|
||||
#endif
|
||||
|
||||
static int fill_inbuf(void);
|
||||
static void flush_window(void);
|
||||
static void error(char *m);
|
||||
|
||||
extern char input_data[];
|
||||
extern int input_len;
|
||||
|
||||
static long bytes_out = 0;
|
||||
static uch *output_data;
|
||||
static unsigned long output_ptr = 0;
|
||||
|
||||
static void error(char *m);
|
||||
|
||||
static void puts(const char *);
|
||||
|
||||
extern int _text; /* Defined in vmlinux.lds.S */
|
||||
extern int _end;
|
||||
static unsigned long free_mem_ptr;
|
||||
static unsigned long free_mem_end_ptr;
|
||||
|
||||
#define HEAP_SIZE 0x10000
|
||||
|
||||
#include "../../../../lib/inflate.c"
|
||||
|
||||
void puts(const char *s)
|
||||
{
|
||||
}
|
||||
|
||||
void *memset(void *s, int c, size_t n)
|
||||
{
|
||||
int i;
|
||||
char *ss = (char *) s;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
ss[i] = c;
|
||||
return s;
|
||||
}
|
||||
|
||||
void *memcpy(void *__dest, __const void *__src, size_t __n)
|
||||
{
|
||||
int i;
|
||||
char *d = (char *) __dest, *s = (char *) __src;
|
||||
|
||||
for (i = 0; i < __n; i++)
|
||||
d[i] = s[i];
|
||||
return __dest;
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Fill the input buffer. This is called only when the buffer is empty
|
||||
* and at least one byte is really needed.
|
||||
*/
|
||||
static int fill_inbuf(void)
|
||||
{
|
||||
if (insize != 0) {
|
||||
error("ran out of input data\n");
|
||||
}
|
||||
|
||||
inbuf = input_data;
|
||||
insize = input_len;
|
||||
inptr = 1;
|
||||
return inbuf[0];
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Write the output window window[0..outcnt-1] and update crc and bytes_out.
|
||||
* (Used for the decompressed data only.)
|
||||
*/
|
||||
static void flush_window(void)
|
||||
{
|
||||
ulg c = crc; /* temporary variable */
|
||||
unsigned n;
|
||||
uch *in, *out, ch;
|
||||
|
||||
in = window;
|
||||
out = &output_data[output_ptr];
|
||||
for (n = 0; n < outcnt; n++) {
|
||||
ch = *out++ = *in++;
|
||||
c = crc_32_tab[((int) c ^ ch) & 0xff] ^ (c >> 8);
|
||||
}
|
||||
crc = c;
|
||||
bytes_out += (ulg) outcnt;
|
||||
output_ptr += (ulg) outcnt;
|
||||
outcnt = 0;
|
||||
puts(".");
|
||||
}
|
||||
|
||||
static void error(char *x)
|
||||
{
|
||||
puts("\n\n");
|
||||
puts(x);
|
||||
puts("\n\n -- System halted");
|
||||
|
||||
while (1) ; /* Halt */
|
||||
}
|
||||
|
||||
#define STACK_SIZE (4096)
|
||||
long __attribute__ ((aligned(8))) user_stack[STACK_SIZE];
|
||||
long *stack_start = &user_stack[STACK_SIZE];
|
||||
|
||||
void decompress_kernel(void)
|
||||
{
|
||||
output_data = (uch *) (CONFIG_MEMORY_START + 0x2000);
|
||||
free_mem_ptr = (unsigned long) &_end;
|
||||
free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
|
||||
|
||||
makecrc();
|
||||
puts("Uncompressing Linux... ");
|
||||
cache_control(CACHE_ENABLE);
|
||||
gunzip();
|
||||
puts("\n");
|
||||
|
||||
#if 0
|
||||
/* When booting from ROM may want to do something like this if the
|
||||
* boot loader doesn't.
|
||||
*/
|
||||
|
||||
/* Set up the parameters and command line */
|
||||
{
|
||||
volatile unsigned int *parambase =
|
||||
(int *) (CONFIG_MEMORY_START + 0x1000);
|
||||
|
||||
parambase[0] = 0x1; /* MOUNT_ROOT_RDONLY */
|
||||
parambase[1] = 0x0; /* RAMDISK_FLAGS */
|
||||
parambase[2] = 0x0200; /* ORIG_ROOT_DEV */
|
||||
parambase[3] = 0x0; /* LOADER_TYPE */
|
||||
parambase[4] = 0x0; /* INITRD_START */
|
||||
parambase[5] = 0x0; /* INITRD_SIZE */
|
||||
parambase[6] = 0;
|
||||
|
||||
strcpy((char *) ((int) parambase + 0x100),
|
||||
"console=ttySC0,38400");
|
||||
}
|
||||
#endif
|
||||
|
||||
puts("Ok, booting the kernel.\n");
|
||||
|
||||
cache_control(CACHE_DISABLE);
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
.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
|
10
arch/sh/boot/compressed/vmlinux.scr
Normal file
10
arch/sh/boot/compressed/vmlinux.scr
Normal file
|
@ -0,0 +1,10 @@
|
|||
SECTIONS
|
||||
{
|
||||
.rodata.compressed : {
|
||||
input_len = .;
|
||||
LONG(input_data_end - input_data) input_data = .;
|
||||
*(.data)
|
||||
output_len = . - 4;
|
||||
input_data_end = .;
|
||||
}
|
||||
}
|
19
arch/sh/boot/romimage/Makefile
Normal file
19
arch/sh/boot/romimage/Makefile
Normal file
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# linux/arch/sh/boot/romimage/Makefile
|
||||
#
|
||||
# create an image suitable for burning to flash from zImage
|
||||
#
|
||||
|
||||
targets := vmlinux head.o
|
||||
|
||||
OBJECTS = $(obj)/head.o
|
||||
LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext 0 -e romstart
|
||||
|
||||
$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
|
||||
$(call if_changed,ld)
|
||||
@:
|
||||
|
||||
LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
|
||||
|
||||
$(obj)/piggy.o: $(obj)/vmlinux.scr arch/sh/boot/zImage FORCE
|
||||
$(call if_changed,ld)
|
10
arch/sh/boot/romimage/head.S
Normal file
10
arch/sh/boot/romimage/head.S
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* linux/arch/sh/boot/romimage/head.S
|
||||
*
|
||||
* Board specific setup code, executed before zImage loader
|
||||
*/
|
||||
|
||||
.text
|
||||
.global romstart
|
||||
romstart:
|
||||
#include <mach/romimage.h>
|
6
arch/sh/boot/romimage/vmlinux.scr
Normal file
6
arch/sh/boot/romimage/vmlinux.scr
Normal file
|
@ -0,0 +1,6 @@
|
|||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
*(.data)
|
||||
}
|
||||
}
|
1032
arch/sh/configs/ecovec24-romimage_defconfig
Normal file
1032
arch/sh/configs/ecovec24-romimage_defconfig
Normal file
File diff suppressed because it is too large
Load diff
1558
arch/sh/configs/ecovec24_defconfig
Normal file
1558
arch/sh/configs/ecovec24_defconfig
Normal file
File diff suppressed because it is too large
Load diff
774
arch/sh/configs/kfr2r09-romimage_defconfig
Normal file
774
arch/sh/configs/kfr2r09-romimage_defconfig
Normal file
|
@ -0,0 +1,774 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.31-rc6
|
||||
# Thu Aug 20 15:09:16 2009
|
||||
#
|
||||
CONFIG_SUPERH=y
|
||||
CONFIG_SUPERH32=y
|
||||
# CONFIG_SUPERH64 is not set
|
||||
CONFIG_ARCH_DEFCONFIG="arch/sh/configs/shx3_defconfig"
|
||||
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_HARDIRQS_NO__DO_IRQ=y
|
||||
CONFIG_GENERIC_IRQ_PROBE=y
|
||||
CONFIG_IRQ_PER_CPU=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
CONFIG_GENERIC_TIME=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_SYS_SUPPORTS_CMT=y
|
||||
CONFIG_SYS_SUPPORTS_TMU=y
|
||||
CONFIG_STACKTRACE_SUPPORT=y
|
||||
CONFIG_LOCKDEP_SUPPORT=y
|
||||
CONFIG_HAVE_LATENCYTOP_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_HAS_DEFAULT_IDLE=y
|
||||
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
CONFIG_CONSTRUCTORS=y
|
||||
|
||||
#
|
||||
# General setup
|
||||
#
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_BROKEN_ON_SMP=y
|
||||
CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||
CONFIG_LOCALVERSION=""
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_HAVE_KERNEL_GZIP=y
|
||||
CONFIG_HAVE_KERNEL_BZIP2=y
|
||||
CONFIG_HAVE_KERNEL_LZMA=y
|
||||
CONFIG_KERNEL_GZIP=y
|
||||
# CONFIG_KERNEL_BZIP2 is not set
|
||||
# CONFIG_KERNEL_LZMA is not set
|
||||
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
|
||||
|
||||
#
|
||||
# RCU Subsystem
|
||||
#
|
||||
CONFIG_CLASSIC_RCU=y
|
||||
# CONFIG_TREE_RCU is not set
|
||||
# CONFIG_PREEMPT_RCU is not set
|
||||
# CONFIG_TREE_RCU_TRACE is not set
|
||||
# CONFIG_PREEMPT_RCU_TRACE is not set
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
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_CGROUPS 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=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INITRAMFS_ROOT_UID=0
|
||||
CONFIG_INITRAMFS_ROOT_GID=0
|
||||
CONFIG_RD_GZIP=y
|
||||
# CONFIG_RD_BZIP2 is not set
|
||||
# CONFIG_RD_LZMA is not set
|
||||
# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
|
||||
CONFIG_INITRAMFS_COMPRESSION_GZIP=y
|
||||
# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
|
||||
# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_SYSCTL=y
|
||||
CONFIG_ANON_INODES=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_UID16=y
|
||||
CONFIG_SYSCTL_SYSCALL=y
|
||||
# CONFIG_KALLSYMS is not set
|
||||
CONFIG_HOTPLUG=y
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
CONFIG_ELF_CORE=y
|
||||
CONFIG_BASE_FULL=y
|
||||
CONFIG_FUTEX=y
|
||||
CONFIG_EPOLL=y
|
||||
CONFIG_SIGNALFD=y
|
||||
CONFIG_TIMERFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_AIO=y
|
||||
CONFIG_HAVE_PERF_COUNTERS=y
|
||||
|
||||
#
|
||||
# Performance Counters
|
||||
#
|
||||
# CONFIG_PERF_COUNTERS is not set
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_COMPAT_BRK=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_IOREMAP_PROT=y
|
||||
CONFIG_HAVE_KPROBES=y
|
||||
CONFIG_HAVE_KRETPROBES=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
CONFIG_HAVE_CLK=y
|
||||
CONFIG_HAVE_DMA_API_DEBUG=y
|
||||
|
||||
#
|
||||
# GCOV-based kernel profiling
|
||||
#
|
||||
# CONFIG_GCOV_KERNEL is not set
|
||||
# CONFIG_SLOW_WORK is not set
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_SLABINFO=y
|
||||
CONFIG_RT_MUTEXES=y
|
||||
CONFIG_BASE_SMALL=0
|
||||
# CONFIG_MODULES is not set
|
||||
# CONFIG_BLOCK is not set
|
||||
# CONFIG_FREEZER is not set
|
||||
|
||||
#
|
||||
# System type
|
||||
#
|
||||
CONFIG_CPU_SH4=y
|
||||
CONFIG_CPU_SH4A=y
|
||||
CONFIG_CPU_SHX2=y
|
||||
CONFIG_ARCH_SHMOBILE=y
|
||||
# CONFIG_CPU_SUBTYPE_SH7619 is not set
|
||||
# CONFIG_CPU_SUBTYPE_SH7201 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 is not set
|
||||
CONFIG_CPU_SUBTYPE_SH7724=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_SH7786 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
|
||||
|
||||
#
|
||||
# Memory management options
|
||||
#
|
||||
CONFIG_QUICKLIST=y
|
||||
CONFIG_MMU=y
|
||||
CONFIG_PAGE_OFFSET=0x80000000
|
||||
CONFIG_FORCE_MAX_ZONEORDER=11
|
||||
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_PAGEFLAGS_EXTENDED=y
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=4
|
||||
# CONFIG_PHYS_ADDR_T_64BIT is not set
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
||||
CONFIG_NR_QUICK=2
|
||||
CONFIG_HAVE_MLOCK=y
|
||||
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
|
||||
|
||||
#
|
||||
# Cache configuration
|
||||
#
|
||||
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_FPU=y
|
||||
|
||||
#
|
||||
# Board support
|
||||
#
|
||||
# CONFIG_SH_7724_SOLUTION_ENGINE is not set
|
||||
CONFIG_SH_KFR2R09=y
|
||||
# CONFIG_SH_ECOVEC is not set
|
||||
|
||||
#
|
||||
# Timer and clock configuration
|
||||
#
|
||||
# CONFIG_SH_TIMER_TMU is not set
|
||||
CONFIG_SH_TIMER_CMT=y
|
||||
CONFIG_SH_PCLK_FREQ=33333333
|
||||
CONFIG_SH_CLK_CPG=y
|
||||
# CONFIG_NO_HZ is not set
|
||||
# CONFIG_HIGH_RES_TIMERS is not set
|
||||
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=y
|
||||
# CONFIG_HZ_250 is not set
|
||||
# CONFIG_HZ_300 is not set
|
||||
# CONFIG_HZ_1000 is not set
|
||||
CONFIG_HZ=100
|
||||
# CONFIG_SCHED_HRTICK is not set
|
||||
CONFIG_KEXEC=y
|
||||
# CONFIG_CRASH_DUMP is not set
|
||||
# CONFIG_SECCOMP is not set
|
||||
CONFIG_PREEMPT_NONE=y
|
||||
# CONFIG_PREEMPT_VOLUNTARY is not set
|
||||
# CONFIG_PREEMPT is not set
|
||||
CONFIG_GUSA=y
|
||||
# CONFIG_SPARSE_IRQ is not set
|
||||
|
||||
#
|
||||
# Boot options
|
||||
#
|
||||
CONFIG_ZERO_PAGE_OFFSET=0x00001000
|
||||
CONFIG_BOOT_LINK_OFFSET=0x00800000
|
||||
CONFIG_ENTRY_OFFSET=0x00001000
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_CMDLINE="console=ttySC1,115200 quiet"
|
||||
|
||||
#
|
||||
# Bus options
|
||||
#
|
||||
# CONFIG_ARCH_SUPPORTS_MSI is not set
|
||||
# CONFIG_PCCARD is not set
|
||||
|
||||
#
|
||||
# Executable file formats
|
||||
#
|
||||
CONFIG_BINFMT_ELF=y
|
||||
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
||||
# CONFIG_HAVE_AOUT is not set
|
||||
# CONFIG_BINFMT_MISC is not set
|
||||
|
||||
#
|
||||
# Power management options (EXPERIMENTAL)
|
||||
#
|
||||
CONFIG_PM=y
|
||||
# CONFIG_PM_DEBUG is not set
|
||||
# CONFIG_SUSPEND is not set
|
||||
# CONFIG_CPU_IDLE is not set
|
||||
CONFIG_NET=y
|
||||
|
||||
#
|
||||
# Networking options
|
||||
#
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_PACKET_MMAP=y
|
||||
CONFIG_UNIX=y
|
||||
# CONFIG_NET_KEY is not set
|
||||
CONFIG_INET=y
|
||||
# CONFIG_IP_MULTICAST is not set
|
||||
# CONFIG_IP_ADVANCED_ROUTER is not set
|
||||
CONFIG_IP_FIB_HASH=y
|
||||
# CONFIG_IP_PNP 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 is not set
|
||||
# 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_NET_DSA 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_PHONET is not set
|
||||
# CONFIG_IEEE802154 is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
# CONFIG_DCB 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
|
||||
# CONFIG_WIRELESS is not set
|
||||
# CONFIG_WIMAX 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_FIRMWARE_IN_KERNEL=y
|
||||
CONFIG_EXTRA_FIRMWARE=""
|
||||
# CONFIG_SYS_HYPERVISOR is not set
|
||||
# CONFIG_CONNECTOR is not set
|
||||
# CONFIG_MTD is not set
|
||||
# CONFIG_PARPORT is not set
|
||||
# CONFIG_MISC_DEVICES is not set
|
||||
CONFIG_HAVE_IDE=y
|
||||
|
||||
#
|
||||
# SCSI device support
|
||||
#
|
||||
# CONFIG_SCSI_DMA is not set
|
||||
# CONFIG_SCSI_NETLINK is not set
|
||||
# CONFIG_NETDEVICES 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_CONSOLE_TRANSLATIONS=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_DEVPTS_MULTIPLE_INSTANCES is not set
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
# CONFIG_IPMI_HANDLER is not set
|
||||
CONFIG_HW_RANDOM=y
|
||||
# CONFIG_HW_RANDOM_TIMERIOMEM is not set
|
||||
# CONFIG_R3964 is not set
|
||||
# CONFIG_TCG_TPM is not set
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
# CONFIG_I2C_CHARDEV is not set
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
|
||||
#
|
||||
# I2C Hardware Bus support
|
||||
#
|
||||
|
||||
#
|
||||
# I2C system bus drivers (mostly embedded / system-on-chip)
|
||||
#
|
||||
# CONFIG_I2C_DESIGNWARE is not set
|
||||
# CONFIG_I2C_GPIO is not set
|
||||
# CONFIG_I2C_OCORES is not set
|
||||
CONFIG_I2C_SH_MOBILE=y
|
||||
# CONFIG_I2C_SIMTEC is not set
|
||||
|
||||
#
|
||||
# External I2C/SMBus adapter drivers
|
||||
#
|
||||
# CONFIG_I2C_PARPORT_LIGHT is not set
|
||||
# CONFIG_I2C_TAOS_EVM is not set
|
||||
|
||||
#
|
||||
# Other I2C/SMBus bus drivers
|
||||
#
|
||||
# CONFIG_I2C_PCA_PLATFORM is not set
|
||||
|
||||
#
|
||||
# Miscellaneous I2C Chip support
|
||||
#
|
||||
# CONFIG_DS1682 is not set
|
||||
# CONFIG_SENSORS_PCF8574 is not set
|
||||
# CONFIG_PCF8575 is not set
|
||||
# CONFIG_SENSORS_PCA9539 is not set
|
||||
# CONFIG_SENSORS_TSL2550 is not set
|
||||
# CONFIG_I2C_DEBUG_CORE is not set
|
||||
# CONFIG_I2C_DEBUG_ALGO is not set
|
||||
# CONFIG_I2C_DEBUG_BUS is not set
|
||||
# CONFIG_I2C_DEBUG_CHIP is not set
|
||||
# CONFIG_SPI is not set
|
||||
|
||||
#
|
||||
# PPS support
|
||||
#
|
||||
# CONFIG_PPS is not set
|
||||
CONFIG_ARCH_REQUIRE_GPIOLIB=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
|
||||
#
|
||||
# Memory mapped GPIO expanders:
|
||||
#
|
||||
|
||||
#
|
||||
# I2C GPIO expanders:
|
||||
#
|
||||
# CONFIG_GPIO_MAX732X is not set
|
||||
# CONFIG_GPIO_PCA953X is not set
|
||||
# CONFIG_GPIO_PCF857X is not set
|
||||
|
||||
#
|
||||
# PCI GPIO expanders:
|
||||
#
|
||||
|
||||
#
|
||||
# SPI GPIO expanders:
|
||||
#
|
||||
# CONFIG_W1 is not set
|
||||
# CONFIG_POWER_SUPPLY is not set
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_THERMAL is not set
|
||||
# CONFIG_THERMAL_HWMON is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
|
||||
#
|
||||
# Sonics Silicon Backplane
|
||||
#
|
||||
# CONFIG_SSB is not set
|
||||
|
||||
#
|
||||
# Multifunction device drivers
|
||||
#
|
||||
# CONFIG_MFD_CORE is not set
|
||||
# CONFIG_MFD_SM501 is not set
|
||||
# CONFIG_HTC_PASIC3 is not set
|
||||
# CONFIG_TPS65010 is not set
|
||||
# CONFIG_TWL4030_CORE is not set
|
||||
# CONFIG_MFD_TMIO is not set
|
||||
# CONFIG_PMIC_DA903X is not set
|
||||
# CONFIG_MFD_WM8400 is not set
|
||||
# CONFIG_MFD_WM8350_I2C is not set
|
||||
# CONFIG_MFD_PCF50633 is not set
|
||||
# CONFIG_AB3100_CORE is not set
|
||||
# CONFIG_REGULATOR is not set
|
||||
# CONFIG_MEDIA_SUPPORT 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
|
||||
# CONFIG_SOUND is not set
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_ARCH_HAS_HCD=y
|
||||
# CONFIG_USB_ARCH_HAS_OHCI is not set
|
||||
# CONFIG_USB_ARCH_HAS_EHCI is not set
|
||||
# CONFIG_USB is not set
|
||||
# CONFIG_USB_OTG_WHITELIST is not set
|
||||
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
|
||||
# CONFIG_USB_GADGET_MUSB_HDRC is not set
|
||||
|
||||
#
|
||||
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
|
||||
#
|
||||
CONFIG_USB_GADGET=y
|
||||
# CONFIG_USB_GADGET_DEBUG_FILES is not set
|
||||
# CONFIG_USB_GADGET_DEBUG_FS is not set
|
||||
CONFIG_USB_GADGET_VBUS_DRAW=2
|
||||
CONFIG_USB_GADGET_SELECTED=y
|
||||
# CONFIG_USB_GADGET_AT91 is not set
|
||||
# CONFIG_USB_GADGET_ATMEL_USBA is not set
|
||||
# CONFIG_USB_GADGET_FSL_USB2 is not set
|
||||
# CONFIG_USB_GADGET_LH7A40X is not set
|
||||
# CONFIG_USB_GADGET_OMAP is not set
|
||||
# CONFIG_USB_GADGET_PXA25X is not set
|
||||
CONFIG_USB_GADGET_R8A66597=y
|
||||
CONFIG_USB_R8A66597=y
|
||||
# CONFIG_USB_GADGET_PXA27X is not set
|
||||
# CONFIG_USB_GADGET_S3C_HSOTG is not set
|
||||
# CONFIG_USB_GADGET_IMX is not set
|
||||
# CONFIG_USB_GADGET_S3C2410 is not set
|
||||
# CONFIG_USB_GADGET_M66592 is not set
|
||||
# CONFIG_USB_GADGET_AMD5536UDC is not set
|
||||
# CONFIG_USB_GADGET_FSL_QE is not set
|
||||
# CONFIG_USB_GADGET_CI13XXX is not set
|
||||
# CONFIG_USB_GADGET_NET2280 is not set
|
||||
# CONFIG_USB_GADGET_GOKU is not set
|
||||
# CONFIG_USB_GADGET_LANGWELL is not set
|
||||
# CONFIG_USB_GADGET_DUMMY_HCD is not set
|
||||
CONFIG_USB_GADGET_DUALSPEED=y
|
||||
# CONFIG_USB_ZERO is not set
|
||||
# CONFIG_USB_AUDIO is not set
|
||||
# CONFIG_USB_ETH is not set
|
||||
# CONFIG_USB_GADGETFS is not set
|
||||
# CONFIG_USB_FILE_STORAGE is not set
|
||||
# CONFIG_USB_G_SERIAL is not set
|
||||
# CONFIG_USB_MIDI_GADGET is not set
|
||||
# CONFIG_USB_G_PRINTER is not set
|
||||
CONFIG_USB_CDC_COMPOSITE=y
|
||||
|
||||
#
|
||||
# OTG and related infrastructure
|
||||
#
|
||||
# CONFIG_USB_GPIO_VBUS is not set
|
||||
# CONFIG_NOP_USB_XCEIV 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_LIB=y
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
# CONFIG_DMADEVICES is not set
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
# CONFIG_UIO is not set
|
||||
|
||||
#
|
||||
# TI VLYNQ
|
||||
#
|
||||
# CONFIG_STAGING is not set
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
CONFIG_FILE_LOCKING=y
|
||||
# CONFIG_FSNOTIFY is not set
|
||||
# CONFIG_DNOTIFY is not set
|
||||
# CONFIG_INOTIFY is not set
|
||||
# CONFIG_INOTIFY_USER is not set
|
||||
# CONFIG_QUOTA is not set
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
# CONFIG_FUSE_FS is not set
|
||||
|
||||
#
|
||||
# Caches
|
||||
#
|
||||
# CONFIG_FSCACHE is not set
|
||||
|
||||
#
|
||||
# Pseudo filesystems
|
||||
#
|
||||
CONFIG_PROC_FS=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_PROC_SYSCTL=y
|
||||
CONFIG_PROC_PAGE_MONITOR=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
|
||||
# CONFIG_MISC_FILESYSTEMS is not set
|
||||
# CONFIG_NETWORK_FILESYSTEMS is not set
|
||||
# CONFIG_NLS 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=y
|
||||
# CONFIG_HEADERS_CHECK is not set
|
||||
# CONFIG_DEBUG_KERNEL is not set
|
||||
# CONFIG_DEBUG_BUGVERBOSE is not set
|
||||
# CONFIG_DEBUG_MEMORY_INIT is not set
|
||||
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
|
||||
# CONFIG_LATENCYTOP is not set
|
||||
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FTRACE_SYSCALLS=y
|
||||
CONFIG_TRACING_SUPPORT=y
|
||||
# CONFIG_FTRACE is not set
|
||||
# CONFIG_DYNAMIC_DEBUG is not set
|
||||
# CONFIG_DMA_API_DEBUG is not set
|
||||
# CONFIG_SAMPLES is not set
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
# CONFIG_SH_STANDARD_BIOS is not set
|
||||
# CONFIG_EARLY_SCIF_CONSOLE is not set
|
||||
# CONFIG_DWARF_UNWINDER is not set
|
||||
|
||||
#
|
||||
# Security options
|
||||
#
|
||||
# CONFIG_KEYS is not set
|
||||
# CONFIG_SECURITY is not set
|
||||
# CONFIG_SECURITYFS is not set
|
||||
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
|
||||
# CONFIG_CRYPTO is not set
|
||||
# CONFIG_BINARY_PRINTF is not set
|
||||
|
||||
#
|
||||
# Library routines
|
||||
#
|
||||
CONFIG_GENERIC_FIND_LAST_BIT=y
|
||||
# CONFIG_CRC_CCITT is not set
|
||||
# CONFIG_CRC16 is not set
|
||||
# CONFIG_CRC_T10DIF is not set
|
||||
# CONFIG_CRC_ITU_T is not set
|
||||
# CONFIG_CRC32 is not set
|
||||
# CONFIG_CRC7 is not set
|
||||
# CONFIG_LIBCRC32C is not set
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_DECOMPRESS_GZIP=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAVE_LMB=y
|
||||
CONFIG_NLATTR=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
1059
arch/sh/configs/kfr2r09_defconfig
Normal file
1059
arch/sh/configs/kfr2r09_defconfig
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.30
|
||||
# Thu Jun 18 13:11:58 2009
|
||||
# Linux kernel version: 2.6.31-rc6
|
||||
# Thu Aug 20 15:03:04 2009
|
||||
#
|
||||
CONFIG_SUPERH=y
|
||||
CONFIG_SUPERH32=y
|
||||
|
@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
|
|||
CONFIG_GENERIC_HARDIRQS=y
|
||||
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
|
||||
CONFIG_GENERIC_IRQ_PROBE=y
|
||||
CONFIG_IRQ_PER_CPU=y
|
||||
# CONFIG_GENERIC_GPIO is not set
|
||||
CONFIG_GENERIC_TIME=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
|
@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
|
|||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
CONFIG_ARCH_NO_VIRT_TO_BUS=y
|
||||
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
|
||||
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
CONFIG_CONSTRUCTORS=y
|
||||
|
||||
#
|
||||
# General setup
|
||||
|
@ -38,6 +41,12 @@ CONFIG_BROKEN_ON_SMP=y
|
|||
CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||
CONFIG_LOCALVERSION=""
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_HAVE_KERNEL_GZIP=y
|
||||
CONFIG_HAVE_KERNEL_BZIP2=y
|
||||
CONFIG_HAVE_KERNEL_LZMA=y
|
||||
CONFIG_KERNEL_GZIP=y
|
||||
# CONFIG_KERNEL_BZIP2 is not set
|
||||
# CONFIG_KERNEL_LZMA is not set
|
||||
# CONFIG_SWAP is not set
|
||||
# CONFIG_SYSVIPC is not set
|
||||
# CONFIG_POSIX_MQUEUE is not set
|
||||
|
@ -86,10 +95,12 @@ CONFIG_TIMERFD=y
|
|||
CONFIG_EVENTFD=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_AIO=y
|
||||
CONFIG_HAVE_PERF_COUNTERS=y
|
||||
|
||||
#
|
||||
# Performance Counters
|
||||
#
|
||||
# CONFIG_PERF_COUNTERS is not set
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_PCI_QUIRKS=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
|
@ -106,6 +117,10 @@ CONFIG_HAVE_KRETPROBES=y
|
|||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
CONFIG_HAVE_CLK=y
|
||||
CONFIG_HAVE_DMA_API_DEBUG=y
|
||||
|
||||
#
|
||||
# GCOV-based kernel profiling
|
||||
#
|
||||
# CONFIG_SLOW_WORK is not set
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_SLABINFO=y
|
||||
|
@ -113,7 +128,7 @@ CONFIG_RT_MUTEXES=y
|
|||
CONFIG_BASE_SMALL=0
|
||||
# CONFIG_MODULES is not set
|
||||
CONFIG_BLOCK=y
|
||||
# CONFIG_LBD is not set
|
||||
CONFIG_LBDAF=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_BLK_DEV_INTEGRITY is not set
|
||||
|
||||
|
@ -534,7 +549,11 @@ CONFIG_HAVE_IDE=y
|
|||
#
|
||||
|
||||
#
|
||||
# Enable only one of the two stacks, unless you know what you are doing
|
||||
# You can enable one or both FireWire driver stacks.
|
||||
#
|
||||
|
||||
#
|
||||
# See the help texts for more information.
|
||||
#
|
||||
# CONFIG_FIREWIRE is not set
|
||||
# CONFIG_IEEE1394 is not set
|
||||
|
@ -686,6 +705,11 @@ CONFIG_LEGACY_PTY_COUNT=256
|
|||
CONFIG_DEVPORT=y
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
|
||||
#
|
||||
# PPS support
|
||||
#
|
||||
# CONFIG_PPS is not set
|
||||
# CONFIG_W1 is not set
|
||||
# CONFIG_POWER_SUPPLY is not set
|
||||
# CONFIG_HWMON is not set
|
||||
|
@ -732,7 +756,44 @@ CONFIG_SSB_POSSIBLE=y
|
|||
# CONFIG_ACCESSIBILITY is not set
|
||||
# CONFIG_INFINIBAND is not set
|
||||
CONFIG_RTC_LIB=y
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_HCTOSYS=y
|
||||
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
|
||||
# CONFIG_RTC_DEBUG is not set
|
||||
|
||||
#
|
||||
# RTC interfaces
|
||||
#
|
||||
CONFIG_RTC_INTF_SYSFS=y
|
||||
CONFIG_RTC_INTF_PROC=y
|
||||
CONFIG_RTC_INTF_DEV=y
|
||||
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
|
||||
# CONFIG_RTC_DRV_TEST is not set
|
||||
|
||||
#
|
||||
# SPI RTC drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Platform RTC drivers
|
||||
#
|
||||
# CONFIG_RTC_DRV_DS1286 is not set
|
||||
CONFIG_RTC_DRV_DS1302=y
|
||||
# CONFIG_RTC_DRV_DS1511 is not set
|
||||
# CONFIG_RTC_DRV_DS1553 is not set
|
||||
# CONFIG_RTC_DRV_DS1742 is not set
|
||||
# CONFIG_RTC_DRV_STK17TA8 is not set
|
||||
# CONFIG_RTC_DRV_M48T86 is not set
|
||||
# CONFIG_RTC_DRV_M48T35 is not set
|
||||
# CONFIG_RTC_DRV_M48T59 is not set
|
||||
# CONFIG_RTC_DRV_BQ4802 is not set
|
||||
# CONFIG_RTC_DRV_V3020 is not set
|
||||
|
||||
#
|
||||
# on-CPU RTC drivers
|
||||
#
|
||||
# CONFIG_RTC_DRV_SH is not set
|
||||
# CONFIG_RTC_DRV_GENERIC is not set
|
||||
# CONFIG_DMADEVICES is not set
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
# CONFIG_UIO is not set
|
||||
|
@ -754,6 +815,7 @@ CONFIG_EXT2_FS=y
|
|||
# CONFIG_JFS_FS is not set
|
||||
# CONFIG_FS_POSIX_ACL is not set
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_GFS2_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_BTRFS_FS is not set
|
||||
CONFIG_FILE_LOCKING=y
|
||||
|
@ -856,8 +918,11 @@ CONFIG_FRAME_WARN=1024
|
|||
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
|
||||
# CONFIG_LATENCYTOP is not set
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FTRACE_SYSCALLS=y
|
||||
CONFIG_TRACING_SUPPORT=y
|
||||
# CONFIG_FTRACE is not set
|
||||
# CONFIG_DMA_API_DEBUG is not set
|
||||
|
@ -865,6 +930,7 @@ CONFIG_TRACING_SUPPORT=y
|
|||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
# CONFIG_SH_STANDARD_BIOS is not set
|
||||
# CONFIG_EARLY_SCIF_CONSOLE is not set
|
||||
# CONFIG_DWARF_UNWINDER is not set
|
||||
|
||||
#
|
||||
# Security options
|
||||
|
@ -893,5 +959,6 @@ CONFIG_DECOMPRESS_GZIP=y
|
|||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAVE_LMB=y
|
||||
CONFIG_NLATTR=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
|
|
|
@ -27,12 +27,12 @@ config NR_ONCHIP_DMA_CHANNELS
|
|||
default "8" if CPU_SUBTYPE_SH7750R || CPU_SUBTYPE_SH7751R || \
|
||||
CPU_SUBTYPE_SH7760
|
||||
default "12" if CPU_SUBTYPE_SH7723 || CPU_SUBTYPE_SH7780 || \
|
||||
CPU_SUBTYPE_SH7785
|
||||
CPU_SUBTYPE_SH7785 || CPU_SUBTYPE_SH7724
|
||||
default "6"
|
||||
help
|
||||
This allows you to specify the number of channels that the on-chip
|
||||
DMAC supports. This will be 4 for SH7091/SH7750/SH7751 and 8 for the
|
||||
SH7750R/SH7751R.
|
||||
DMAC supports. This will be 4 for SH7750/SH7751/Sh7750S/SH7091 and 8 for the
|
||||
SH7750R/SH7751R/SH7760, 12 for the SH7723/SH7780/SH7785/SH7724, default is 6.
|
||||
|
||||
config NR_DMA_CHANNELS_BOOL
|
||||
depends on SH_DMA
|
||||
|
|
|
@ -40,14 +40,19 @@ static inline void heartbeat_toggle_bit(struct heartbeat_data *hd,
|
|||
if (inverted)
|
||||
new = ~new;
|
||||
|
||||
new &= hd->mask;
|
||||
|
||||
switch (hd->regsize) {
|
||||
case 32:
|
||||
new |= ioread32(hd->base) & ~hd->mask;
|
||||
iowrite32(new, hd->base);
|
||||
break;
|
||||
case 16:
|
||||
new |= ioread16(hd->base) & ~hd->mask;
|
||||
iowrite16(new, hd->base);
|
||||
break;
|
||||
default:
|
||||
new |= ioread8(hd->base) & ~hd->mask;
|
||||
iowrite8(new, hd->base);
|
||||
break;
|
||||
}
|
||||
|
@ -72,6 +77,7 @@ static int heartbeat_drv_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct resource *res;
|
||||
struct heartbeat_data *hd;
|
||||
int i;
|
||||
|
||||
if (unlikely(pdev->num_resources != 1)) {
|
||||
dev_err(&pdev->dev, "invalid number of resources\n");
|
||||
|
@ -107,6 +113,10 @@ static int heartbeat_drv_probe(struct platform_device *pdev)
|
|||
hd->nr_bits = ARRAY_SIZE(default_bit_pos);
|
||||
}
|
||||
|
||||
hd->mask = 0;
|
||||
for (i = 0; i < hd->nr_bits; i++)
|
||||
hd->mask |= (1 << hd->bit_pos[i]);
|
||||
|
||||
if (!hd->regsize)
|
||||
hd->regsize = 8; /* default access size */
|
||||
|
||||
|
|
|
@ -295,6 +295,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
|
|||
vma->vm_page_prot);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_GENERIC_IOMAP
|
||||
|
||||
static void __iomem *ioport_map_pci(struct pci_dev *dev,
|
||||
unsigned long port, unsigned int nr)
|
||||
{
|
||||
|
@ -346,6 +348,8 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
|
|||
}
|
||||
EXPORT_SYMBOL(pci_iounmap);
|
||||
|
||||
#endif /* CONFIG_GENERIC_IOMAP */
|
||||
|
||||
#ifdef CONFIG_HOTPLUG
|
||||
EXPORT_SYMBOL(pcibios_resource_to_bus);
|
||||
EXPORT_SYMBOL(pcibios_bus_to_resource);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
include include/asm-generic/Kbuild.asm
|
||||
|
||||
header-y += cpu-features.h
|
||||
header-y += cachectl.h cpu-features.h
|
||||
|
||||
unifdef-y += unistd_32.h
|
||||
unifdef-y += unistd_64.h
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define __ASM_SH_BUG_H
|
||||
|
||||
#define TRAPA_BUG_OPCODE 0xc33e /* trapa #0x3e */
|
||||
#define BUGFLAG_UNWINDER (1 << 1)
|
||||
|
||||
#ifdef CONFIG_GENERIC_BUG
|
||||
#define HAVE_ARCH_BUG
|
||||
|
@ -72,6 +73,36 @@ do { \
|
|||
unlikely(__ret_warn_on); \
|
||||
})
|
||||
|
||||
#define UNWINDER_BUG() \
|
||||
do { \
|
||||
__asm__ __volatile__ ( \
|
||||
"1:\t.short %O0\n" \
|
||||
_EMIT_BUG_ENTRY \
|
||||
: \
|
||||
: "n" (TRAPA_BUG_OPCODE), \
|
||||
"i" (__FILE__), \
|
||||
"i" (__LINE__), \
|
||||
"i" (BUGFLAG_UNWINDER), \
|
||||
"i" (sizeof(struct bug_entry))); \
|
||||
} while (0)
|
||||
|
||||
#define UNWINDER_BUG_ON(x) ({ \
|
||||
int __ret_unwinder_on = !!(x); \
|
||||
if (__builtin_constant_p(__ret_unwinder_on)) { \
|
||||
if (__ret_unwinder_on) \
|
||||
UNWINDER_BUG(); \
|
||||
} else { \
|
||||
if (unlikely(__ret_unwinder_on)) \
|
||||
UNWINDER_BUG(); \
|
||||
} \
|
||||
unlikely(__ret_unwinder_on); \
|
||||
})
|
||||
|
||||
#else
|
||||
|
||||
#define UNWINDER_BUG BUG
|
||||
#define UNWINDER_BUG_ON BUG_ON
|
||||
|
||||
#endif /* CONFIG_GENERIC_BUG */
|
||||
|
||||
#include <asm-generic/bug.h>
|
||||
|
|
|
@ -21,25 +21,25 @@ static void __init check_bugs(void)
|
|||
|
||||
current_cpu_data.loops_per_jiffy = loops_per_jiffy;
|
||||
|
||||
switch (current_cpu_data.type) {
|
||||
case CPU_SH7619:
|
||||
switch (current_cpu_data.family) {
|
||||
case CPU_FAMILY_SH2:
|
||||
*p++ = '2';
|
||||
break;
|
||||
case CPU_SH7201 ... CPU_MXG:
|
||||
case CPU_FAMILY_SH2A:
|
||||
*p++ = '2';
|
||||
*p++ = 'a';
|
||||
break;
|
||||
case CPU_SH7705 ... CPU_SH7729:
|
||||
case CPU_FAMILY_SH3:
|
||||
*p++ = '3';
|
||||
break;
|
||||
case CPU_SH7750 ... CPU_SH4_501:
|
||||
case CPU_FAMILY_SH4:
|
||||
*p++ = '4';
|
||||
break;
|
||||
case CPU_SH7763 ... CPU_SHX3:
|
||||
case CPU_FAMILY_SH4A:
|
||||
*p++ = '4';
|
||||
*p++ = 'a';
|
||||
break;
|
||||
case CPU_SH7343 ... CPU_SH7366:
|
||||
case CPU_FAMILY_SH4AL_DSP:
|
||||
*p++ = '4';
|
||||
*p++ = 'a';
|
||||
*p++ = 'l';
|
||||
|
@ -48,15 +48,15 @@ static void __init check_bugs(void)
|
|||
*p++ = 's';
|
||||
*p++ = 'p';
|
||||
break;
|
||||
case CPU_SH5_101 ... CPU_SH5_103:
|
||||
case CPU_FAMILY_SH5:
|
||||
*p++ = '6';
|
||||
*p++ = '4';
|
||||
break;
|
||||
case CPU_SH_NONE:
|
||||
case CPU_FAMILY_UNKNOWN:
|
||||
/*
|
||||
* Specifically use CPU_SH_NONE rather than default:,
|
||||
* so we're able to have the compiler whine about
|
||||
* unhandled enumerations.
|
||||
* Specifically use CPU_FAMILY_UNKNOWN rather than
|
||||
* default:, so we're able to have the compiler whine
|
||||
* about unhandled enumerations.
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
|
19
arch/sh/include/asm/cachectl.h
Normal file
19
arch/sh/include/asm/cachectl.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef _SH_CACHECTL_H
|
||||
#define _SH_CACHECTL_H
|
||||
|
||||
/* Definitions for the cacheflush system call. */
|
||||
|
||||
#define CACHEFLUSH_D_INVAL 0x1 /* invalidate (without write back) */
|
||||
#define CACHEFLUSH_D_WB 0x2 /* write back (without invalidate) */
|
||||
#define CACHEFLUSH_D_PURGE 0x3 /* writeback and invalidate */
|
||||
|
||||
#define CACHEFLUSH_I 0x4
|
||||
|
||||
/*
|
||||
* Options for cacheflush system call
|
||||
*/
|
||||
#define ICACHE CACHEFLUSH_I /* flush instruction cache */
|
||||
#define DCACHE CACHEFLUSH_D_PURGE /* writeback and flush data cache */
|
||||
#define BCACHE (ICACHE|DCACHE) /* flush both caches */
|
||||
|
||||
#endif /* _SH_CACHECTL_H */
|
|
@ -3,45 +3,65 @@
|
|||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifdef CONFIG_CACHE_OFF
|
||||
#include <linux/mm.h>
|
||||
|
||||
/*
|
||||
* Nothing to do when the cache is disabled, initial flush and explicit
|
||||
* disabling is handled at CPU init time.
|
||||
* Cache flushing:
|
||||
*
|
||||
* See arch/sh/kernel/cpu/init.c:cache_init().
|
||||
* - flush_cache_all() flushes entire cache
|
||||
* - flush_cache_mm(mm) flushes the specified mm context's cache lines
|
||||
* - flush_cache_dup mm(mm) handles cache flushing when forking
|
||||
* - flush_cache_page(mm, vmaddr, pfn) flushes a single page
|
||||
* - flush_cache_range(vma, start, end) flushes a range of pages
|
||||
*
|
||||
* - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache
|
||||
* - flush_icache_range(start, end) flushes(invalidates) a range for icache
|
||||
* - flush_icache_page(vma, pg) flushes(invalidates) a page for icache
|
||||
* - flush_cache_sigtramp(vaddr) flushes the signal trampoline
|
||||
*/
|
||||
#define p3_cache_init() do { } while (0)
|
||||
#define flush_cache_all() do { } while (0)
|
||||
#define flush_cache_mm(mm) do { } while (0)
|
||||
#define flush_cache_dup_mm(mm) do { } while (0)
|
||||
#define flush_cache_range(vma, start, end) do { } while (0)
|
||||
#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
|
||||
#define flush_dcache_page(page) do { } while (0)
|
||||
#define flush_icache_range(start, end) do { } while (0)
|
||||
#define flush_icache_page(vma,pg) do { } while (0)
|
||||
#define flush_dcache_mmap_lock(mapping) do { } while (0)
|
||||
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
|
||||
#define flush_cache_sigtramp(vaddr) do { } while (0)
|
||||
#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
|
||||
#define __flush_wback_region(start, size) do { (void)(start); } while (0)
|
||||
#define __flush_purge_region(start, size) do { (void)(start); } while (0)
|
||||
#define __flush_invalidate_region(start, size) do { (void)(start); } while (0)
|
||||
#else
|
||||
#include <cpu/cacheflush.h>
|
||||
extern void (*local_flush_cache_all)(void *args);
|
||||
extern void (*local_flush_cache_mm)(void *args);
|
||||
extern void (*local_flush_cache_dup_mm)(void *args);
|
||||
extern void (*local_flush_cache_page)(void *args);
|
||||
extern void (*local_flush_cache_range)(void *args);
|
||||
extern void (*local_flush_dcache_page)(void *args);
|
||||
extern void (*local_flush_icache_range)(void *args);
|
||||
extern void (*local_flush_icache_page)(void *args);
|
||||
extern void (*local_flush_cache_sigtramp)(void *args);
|
||||
|
||||
/*
|
||||
* Consistent DMA requires that the __flush_xxx() primitives must be set
|
||||
* for any of the enabled non-coherent caches (most of the UP CPUs),
|
||||
* regardless of PIPT or VIPT cache configurations.
|
||||
*/
|
||||
static inline void cache_noop(void *args) { }
|
||||
|
||||
/* Flush (write-back only) a region (smaller than a page) */
|
||||
extern void __flush_wback_region(void *start, int size);
|
||||
/* Flush (write-back & invalidate) a region (smaller than a page) */
|
||||
extern void __flush_purge_region(void *start, int size);
|
||||
/* Flush (invalidate only) a region (smaller than a page) */
|
||||
extern void __flush_invalidate_region(void *start, int size);
|
||||
#endif
|
||||
extern void (*__flush_wback_region)(void *start, int size);
|
||||
extern void (*__flush_purge_region)(void *start, int size);
|
||||
extern void (*__flush_invalidate_region)(void *start, int size);
|
||||
|
||||
extern void flush_cache_all(void);
|
||||
extern void flush_cache_mm(struct mm_struct *mm);
|
||||
extern void flush_cache_dup_mm(struct mm_struct *mm);
|
||||
extern void flush_cache_page(struct vm_area_struct *vma,
|
||||
unsigned long addr, unsigned long pfn);
|
||||
extern void flush_cache_range(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end);
|
||||
extern void flush_dcache_page(struct page *page);
|
||||
extern void flush_icache_range(unsigned long start, unsigned long end);
|
||||
extern void flush_icache_page(struct vm_area_struct *vma,
|
||||
struct page *page);
|
||||
extern void flush_cache_sigtramp(unsigned long address);
|
||||
|
||||
struct flusher_data {
|
||||
struct vm_area_struct *vma;
|
||||
unsigned long addr1, addr2;
|
||||
};
|
||||
|
||||
#define ARCH_HAS_FLUSH_ANON_PAGE
|
||||
extern void __flush_anon_page(struct page *page, unsigned long);
|
||||
|
||||
static inline void flush_anon_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vmaddr)
|
||||
{
|
||||
if (boot_cpu_data.dcache.n_aliases && PageAnon(page))
|
||||
__flush_anon_page(page, vmaddr);
|
||||
}
|
||||
|
||||
#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
|
||||
static inline void flush_kernel_dcache_page(struct page *page)
|
||||
|
@ -49,7 +69,6 @@ static inline void flush_kernel_dcache_page(struct page *page)
|
|||
flush_dcache_page(page);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_CACHE_OFF)
|
||||
extern void copy_to_user_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len);
|
||||
|
@ -57,23 +76,20 @@ extern void copy_to_user_page(struct vm_area_struct *vma,
|
|||
extern void copy_from_user_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len);
|
||||
#else
|
||||
#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
|
||||
do { \
|
||||
flush_cache_page(vma, vaddr, page_to_pfn(page));\
|
||||
memcpy(dst, src, len); \
|
||||
flush_icache_user_range(vma, page, vaddr, len); \
|
||||
} while (0)
|
||||
|
||||
#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
|
||||
do { \
|
||||
flush_cache_page(vma, vaddr, page_to_pfn(page));\
|
||||
memcpy(dst, src, len); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define flush_cache_vmap(start, end) flush_cache_all()
|
||||
#define flush_cache_vunmap(start, end) flush_cache_all()
|
||||
|
||||
#define flush_dcache_mmap_lock(mapping) do { } while (0)
|
||||
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
|
||||
|
||||
void kmap_coherent_init(void);
|
||||
void *kmap_coherent(struct page *page, unsigned long addr);
|
||||
void kunmap_coherent(void *kvaddr);
|
||||
|
||||
#define PG_dcache_dirty PG_arch_1
|
||||
|
||||
void cpu_cache_init(void);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __ASM_SH_CACHEFLUSH_H */
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
*
|
||||
* This file is released under the GPLv2
|
||||
*/
|
||||
#include <asm-generic/device.h>
|
||||
|
||||
struct dev_archdata {
|
||||
};
|
||||
|
||||
struct platform_device;
|
||||
/* allocate contiguous memory chunk and fill in struct resource */
|
||||
|
@ -12,3 +14,15 @@ int platform_resource_setup_memory(struct platform_device *pdev,
|
|||
|
||||
void plat_early_device_setup(void);
|
||||
|
||||
#define PDEV_ARCHDATA_FLAG_INIT 0
|
||||
#define PDEV_ARCHDATA_FLAG_IDLE 1
|
||||
#define PDEV_ARCHDATA_FLAG_SUSP 2
|
||||
|
||||
struct pdev_archdata {
|
||||
int hwblk_id;
|
||||
#ifdef CONFIG_PM_RUNTIME
|
||||
unsigned long flags;
|
||||
struct list_head entry;
|
||||
struct mutex mutex;
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
/* DMAOR contorl: The DMAOR access size is different by CPU.*/
|
||||
#if defined(CONFIG_CPU_SUBTYPE_SH7723) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7724) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7780) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7785)
|
||||
#define dmaor_read_reg(n) \
|
||||
|
|
398
arch/sh/include/asm/dwarf.h
Normal file
398
arch/sh/include/asm/dwarf.h
Normal file
|
@ -0,0 +1,398 @@
|
|||
/*
|
||||
* Copyright (C) 2009 Matt Fleming <matt@console-pimps.org>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
#ifndef __ASM_SH_DWARF_H
|
||||
#define __ASM_SH_DWARF_H
|
||||
|
||||
#ifdef CONFIG_DWARF_UNWINDER
|
||||
|
||||
/*
|
||||
* DWARF expression operations
|
||||
*/
|
||||
#define DW_OP_addr 0x03
|
||||
#define DW_OP_deref 0x06
|
||||
#define DW_OP_const1u 0x08
|
||||
#define DW_OP_const1s 0x09
|
||||
#define DW_OP_const2u 0x0a
|
||||
#define DW_OP_const2s 0x0b
|
||||
#define DW_OP_const4u 0x0c
|
||||
#define DW_OP_const4s 0x0d
|
||||
#define DW_OP_const8u 0x0e
|
||||
#define DW_OP_const8s 0x0f
|
||||
#define DW_OP_constu 0x10
|
||||
#define DW_OP_consts 0x11
|
||||
#define DW_OP_dup 0x12
|
||||
#define DW_OP_drop 0x13
|
||||
#define DW_OP_over 0x14
|
||||
#define DW_OP_pick 0x15
|
||||
#define DW_OP_swap 0x16
|
||||
#define DW_OP_rot 0x17
|
||||
#define DW_OP_xderef 0x18
|
||||
#define DW_OP_abs 0x19
|
||||
#define DW_OP_and 0x1a
|
||||
#define DW_OP_div 0x1b
|
||||
#define DW_OP_minus 0x1c
|
||||
#define DW_OP_mod 0x1d
|
||||
#define DW_OP_mul 0x1e
|
||||
#define DW_OP_neg 0x1f
|
||||
#define DW_OP_not 0x20
|
||||
#define DW_OP_or 0x21
|
||||
#define DW_OP_plus 0x22
|
||||
#define DW_OP_plus_uconst 0x23
|
||||
#define DW_OP_shl 0x24
|
||||
#define DW_OP_shr 0x25
|
||||
#define DW_OP_shra 0x26
|
||||
#define DW_OP_xor 0x27
|
||||
#define DW_OP_skip 0x2f
|
||||
#define DW_OP_bra 0x28
|
||||
#define DW_OP_eq 0x29
|
||||
#define DW_OP_ge 0x2a
|
||||
#define DW_OP_gt 0x2b
|
||||
#define DW_OP_le 0x2c
|
||||
#define DW_OP_lt 0x2d
|
||||
#define DW_OP_ne 0x2e
|
||||
#define DW_OP_lit0 0x30
|
||||
#define DW_OP_lit1 0x31
|
||||
#define DW_OP_lit2 0x32
|
||||
#define DW_OP_lit3 0x33
|
||||
#define DW_OP_lit4 0x34
|
||||
#define DW_OP_lit5 0x35
|
||||
#define DW_OP_lit6 0x36
|
||||
#define DW_OP_lit7 0x37
|
||||
#define DW_OP_lit8 0x38
|
||||
#define DW_OP_lit9 0x39
|
||||
#define DW_OP_lit10 0x3a
|
||||
#define DW_OP_lit11 0x3b
|
||||
#define DW_OP_lit12 0x3c
|
||||
#define DW_OP_lit13 0x3d
|
||||
#define DW_OP_lit14 0x3e
|
||||
#define DW_OP_lit15 0x3f
|
||||
#define DW_OP_lit16 0x40
|
||||
#define DW_OP_lit17 0x41
|
||||
#define DW_OP_lit18 0x42
|
||||
#define DW_OP_lit19 0x43
|
||||
#define DW_OP_lit20 0x44
|
||||
#define DW_OP_lit21 0x45
|
||||
#define DW_OP_lit22 0x46
|
||||
#define DW_OP_lit23 0x47
|
||||
#define DW_OP_lit24 0x48
|
||||
#define DW_OP_lit25 0x49
|
||||
#define DW_OP_lit26 0x4a
|
||||
#define DW_OP_lit27 0x4b
|
||||
#define DW_OP_lit28 0x4c
|
||||
#define DW_OP_lit29 0x4d
|
||||
#define DW_OP_lit30 0x4e
|
||||
#define DW_OP_lit31 0x4f
|
||||
#define DW_OP_reg0 0x50
|
||||
#define DW_OP_reg1 0x51
|
||||
#define DW_OP_reg2 0x52
|
||||
#define DW_OP_reg3 0x53
|
||||
#define DW_OP_reg4 0x54
|
||||
#define DW_OP_reg5 0x55
|
||||
#define DW_OP_reg6 0x56
|
||||
#define DW_OP_reg7 0x57
|
||||
#define DW_OP_reg8 0x58
|
||||
#define DW_OP_reg9 0x59
|
||||
#define DW_OP_reg10 0x5a
|
||||
#define DW_OP_reg11 0x5b
|
||||
#define DW_OP_reg12 0x5c
|
||||
#define DW_OP_reg13 0x5d
|
||||
#define DW_OP_reg14 0x5e
|
||||
#define DW_OP_reg15 0x5f
|
||||
#define DW_OP_reg16 0x60
|
||||
#define DW_OP_reg17 0x61
|
||||
#define DW_OP_reg18 0x62
|
||||
#define DW_OP_reg19 0x63
|
||||
#define DW_OP_reg20 0x64
|
||||
#define DW_OP_reg21 0x65
|
||||
#define DW_OP_reg22 0x66
|
||||
#define DW_OP_reg23 0x67
|
||||
#define DW_OP_reg24 0x68
|
||||
#define DW_OP_reg25 0x69
|
||||
#define DW_OP_reg26 0x6a
|
||||
#define DW_OP_reg27 0x6b
|
||||
#define DW_OP_reg28 0x6c
|
||||
#define DW_OP_reg29 0x6d
|
||||
#define DW_OP_reg30 0x6e
|
||||
#define DW_OP_reg31 0x6f
|
||||
#define DW_OP_breg0 0x70
|
||||
#define DW_OP_breg1 0x71
|
||||
#define DW_OP_breg2 0x72
|
||||
#define DW_OP_breg3 0x73
|
||||
#define DW_OP_breg4 0x74
|
||||
#define DW_OP_breg5 0x75
|
||||
#define DW_OP_breg6 0x76
|
||||
#define DW_OP_breg7 0x77
|
||||
#define DW_OP_breg8 0x78
|
||||
#define DW_OP_breg9 0x79
|
||||
#define DW_OP_breg10 0x7a
|
||||
#define DW_OP_breg11 0x7b
|
||||
#define DW_OP_breg12 0x7c
|
||||
#define DW_OP_breg13 0x7d
|
||||
#define DW_OP_breg14 0x7e
|
||||
#define DW_OP_breg15 0x7f
|
||||
#define DW_OP_breg16 0x80
|
||||
#define DW_OP_breg17 0x81
|
||||
#define DW_OP_breg18 0x82
|
||||
#define DW_OP_breg19 0x83
|
||||
#define DW_OP_breg20 0x84
|
||||
#define DW_OP_breg21 0x85
|
||||
#define DW_OP_breg22 0x86
|
||||
#define DW_OP_breg23 0x87
|
||||
#define DW_OP_breg24 0x88
|
||||
#define DW_OP_breg25 0x89
|
||||
#define DW_OP_breg26 0x8a
|
||||
#define DW_OP_breg27 0x8b
|
||||
#define DW_OP_breg28 0x8c
|
||||
#define DW_OP_breg29 0x8d
|
||||
#define DW_OP_breg30 0x8e
|
||||
#define DW_OP_breg31 0x8f
|
||||
#define DW_OP_regx 0x90
|
||||
#define DW_OP_fbreg 0x91
|
||||
#define DW_OP_bregx 0x92
|
||||
#define DW_OP_piece 0x93
|
||||
#define DW_OP_deref_size 0x94
|
||||
#define DW_OP_xderef_size 0x95
|
||||
#define DW_OP_nop 0x96
|
||||
#define DW_OP_push_object_address 0x97
|
||||
#define DW_OP_call2 0x98
|
||||
#define DW_OP_call4 0x99
|
||||
#define DW_OP_call_ref 0x9a
|
||||
#define DW_OP_form_tls_address 0x9b
|
||||
#define DW_OP_call_frame_cfa 0x9c
|
||||
#define DW_OP_bit_piece 0x9d
|
||||
#define DW_OP_lo_user 0xe0
|
||||
#define DW_OP_hi_user 0xff
|
||||
|
||||
/*
|
||||
* Addresses used in FDE entries in the .eh_frame section may be encoded
|
||||
* using one of the following encodings.
|
||||
*/
|
||||
#define DW_EH_PE_absptr 0x00
|
||||
#define DW_EH_PE_omit 0xff
|
||||
#define DW_EH_PE_uleb128 0x01
|
||||
#define DW_EH_PE_udata2 0x02
|
||||
#define DW_EH_PE_udata4 0x03
|
||||
#define DW_EH_PE_udata8 0x04
|
||||
#define DW_EH_PE_sleb128 0x09
|
||||
#define DW_EH_PE_sdata2 0x0a
|
||||
#define DW_EH_PE_sdata4 0x0b
|
||||
#define DW_EH_PE_sdata8 0x0c
|
||||
#define DW_EH_PE_signed 0x09
|
||||
|
||||
#define DW_EH_PE_pcrel 0x10
|
||||
|
||||
/*
|
||||
* The architecture-specific register number that contains the return
|
||||
* address in the .debug_frame table.
|
||||
*/
|
||||
#define DWARF_ARCH_RA_REG 17
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/*
|
||||
* Read either the frame pointer (r14) or the stack pointer (r15).
|
||||
* NOTE: this MUST be inlined.
|
||||
*/
|
||||
static __always_inline unsigned long dwarf_read_arch_reg(unsigned int reg)
|
||||
{
|
||||
unsigned long value = 0;
|
||||
|
||||
switch (reg) {
|
||||
case 14:
|
||||
__asm__ __volatile__("mov r14, %0\n" : "=r" (value));
|
||||
break;
|
||||
case 15:
|
||||
__asm__ __volatile__("mov r15, %0\n" : "=r" (value));
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* dwarf_cie - Common Information Entry
|
||||
*/
|
||||
struct dwarf_cie {
|
||||
unsigned long length;
|
||||
unsigned long cie_id;
|
||||
unsigned char version;
|
||||
const char *augmentation;
|
||||
unsigned int code_alignment_factor;
|
||||
int data_alignment_factor;
|
||||
|
||||
/* Which column in the rule table represents return addr of func. */
|
||||
unsigned int return_address_reg;
|
||||
|
||||
unsigned char *initial_instructions;
|
||||
unsigned char *instructions_end;
|
||||
|
||||
unsigned char encoding;
|
||||
|
||||
unsigned long cie_pointer;
|
||||
|
||||
struct list_head link;
|
||||
|
||||
unsigned long flags;
|
||||
#define DWARF_CIE_Z_AUGMENTATION (1 << 0)
|
||||
};
|
||||
|
||||
/**
|
||||
* dwarf_fde - Frame Description Entry
|
||||
*/
|
||||
struct dwarf_fde {
|
||||
unsigned long length;
|
||||
unsigned long cie_pointer;
|
||||
struct dwarf_cie *cie;
|
||||
unsigned long initial_location;
|
||||
unsigned long address_range;
|
||||
unsigned char *instructions;
|
||||
unsigned char *end;
|
||||
struct list_head link;
|
||||
};
|
||||
|
||||
/**
|
||||
* dwarf_frame - DWARF information for a frame in the call stack
|
||||
*/
|
||||
struct dwarf_frame {
|
||||
struct dwarf_frame *prev, *next;
|
||||
|
||||
unsigned long pc;
|
||||
|
||||
struct list_head reg_list;
|
||||
|
||||
unsigned long cfa;
|
||||
|
||||
/* Valid when DW_FRAME_CFA_REG_OFFSET is set in flags */
|
||||
unsigned int cfa_register;
|
||||
unsigned int cfa_offset;
|
||||
|
||||
/* Valid when DW_FRAME_CFA_REG_EXP is set in flags */
|
||||
unsigned char *cfa_expr;
|
||||
unsigned int cfa_expr_len;
|
||||
|
||||
unsigned long flags;
|
||||
#define DWARF_FRAME_CFA_REG_OFFSET (1 << 0)
|
||||
#define DWARF_FRAME_CFA_REG_EXP (1 << 1)
|
||||
|
||||
unsigned long return_addr;
|
||||
};
|
||||
|
||||
/**
|
||||
* dwarf_reg - DWARF register
|
||||
* @flags: Describes how to calculate the value of this register
|
||||
*/
|
||||
struct dwarf_reg {
|
||||
struct list_head link;
|
||||
|
||||
unsigned int number;
|
||||
|
||||
unsigned long addr;
|
||||
unsigned long flags;
|
||||
#define DWARF_REG_OFFSET (1 << 0)
|
||||
#define DWARF_VAL_OFFSET (1 << 1)
|
||||
#define DWARF_UNDEFINED (1 << 2)
|
||||
};
|
||||
|
||||
/*
|
||||
* Call Frame instruction opcodes.
|
||||
*/
|
||||
#define DW_CFA_advance_loc 0x40
|
||||
#define DW_CFA_offset 0x80
|
||||
#define DW_CFA_restore 0xc0
|
||||
#define DW_CFA_nop 0x00
|
||||
#define DW_CFA_set_loc 0x01
|
||||
#define DW_CFA_advance_loc1 0x02
|
||||
#define DW_CFA_advance_loc2 0x03
|
||||
#define DW_CFA_advance_loc4 0x04
|
||||
#define DW_CFA_offset_extended 0x05
|
||||
#define DW_CFA_restore_extended 0x06
|
||||
#define DW_CFA_undefined 0x07
|
||||
#define DW_CFA_same_value 0x08
|
||||
#define DW_CFA_register 0x09
|
||||
#define DW_CFA_remember_state 0x0a
|
||||
#define DW_CFA_restore_state 0x0b
|
||||
#define DW_CFA_def_cfa 0x0c
|
||||
#define DW_CFA_def_cfa_register 0x0d
|
||||
#define DW_CFA_def_cfa_offset 0x0e
|
||||
#define DW_CFA_def_cfa_expression 0x0f
|
||||
#define DW_CFA_expression 0x10
|
||||
#define DW_CFA_offset_extended_sf 0x11
|
||||
#define DW_CFA_def_cfa_sf 0x12
|
||||
#define DW_CFA_def_cfa_offset_sf 0x13
|
||||
#define DW_CFA_val_offset 0x14
|
||||
#define DW_CFA_val_offset_sf 0x15
|
||||
#define DW_CFA_val_expression 0x16
|
||||
#define DW_CFA_lo_user 0x1c
|
||||
#define DW_CFA_hi_user 0x3f
|
||||
|
||||
/* GNU extension opcodes */
|
||||
#define DW_CFA_GNU_args_size 0x2e
|
||||
#define DW_CFA_GNU_negative_offset_extended 0x2f
|
||||
|
||||
/*
|
||||
* Some call frame instructions encode their operands in the opcode. We
|
||||
* need some helper functions to extract both the opcode and operands
|
||||
* from an instruction.
|
||||
*/
|
||||
static inline unsigned int DW_CFA_opcode(unsigned long insn)
|
||||
{
|
||||
return (insn & 0xc0);
|
||||
}
|
||||
|
||||
static inline unsigned int DW_CFA_operand(unsigned long insn)
|
||||
{
|
||||
return (insn & 0x3f);
|
||||
}
|
||||
|
||||
#define DW_EH_FRAME_CIE 0 /* .eh_frame CIE IDs are 0 */
|
||||
#define DW_CIE_ID 0xffffffff
|
||||
#define DW64_CIE_ID 0xffffffffffffffffULL
|
||||
|
||||
/*
|
||||
* DWARF FDE/CIE length field values.
|
||||
*/
|
||||
#define DW_EXT_LO 0xfffffff0
|
||||
#define DW_EXT_HI 0xffffffff
|
||||
#define DW_EXT_DWARF64 DW_EXT_HI
|
||||
|
||||
extern struct dwarf_frame *dwarf_unwind_stack(unsigned long,
|
||||
struct dwarf_frame *);
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#define CFI_STARTPROC .cfi_startproc
|
||||
#define CFI_ENDPROC .cfi_endproc
|
||||
#define CFI_DEF_CFA .cfi_def_cfa
|
||||
#define CFI_REGISTER .cfi_register
|
||||
#define CFI_REL_OFFSET .cfi_rel_offset
|
||||
#define CFI_UNDEFINED .cfi_undefined
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* Use the asm comment character to ignore the rest of the line.
|
||||
*/
|
||||
#define CFI_IGNORE !
|
||||
|
||||
#define CFI_STARTPROC CFI_IGNORE
|
||||
#define CFI_ENDPROC CFI_IGNORE
|
||||
#define CFI_DEF_CFA CFI_IGNORE
|
||||
#define CFI_REGISTER CFI_IGNORE
|
||||
#define CFI_REL_OFFSET CFI_IGNORE
|
||||
#define CFI_UNDEFINED CFI_IGNORE
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
static inline void dwarf_unwinder_init(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_DWARF_UNWINDER */
|
||||
|
||||
#endif /* __ASM_SH_DWARF_H */
|
|
@ -7,7 +7,7 @@
|
|||
.endm
|
||||
|
||||
.macro sti
|
||||
mov #0xf0, r11
|
||||
mov #0xfffffff0, r11
|
||||
extu.b r11, r11
|
||||
not r11, r11
|
||||
stc sr, r10
|
||||
|
@ -31,8 +31,92 @@
|
|||
#endif
|
||||
.endm
|
||||
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
|
||||
.macro TRACE_IRQS_ON
|
||||
mov.l r0, @-r15
|
||||
mov.l r1, @-r15
|
||||
mov.l r2, @-r15
|
||||
mov.l r3, @-r15
|
||||
mov.l r4, @-r15
|
||||
mov.l r5, @-r15
|
||||
mov.l r6, @-r15
|
||||
mov.l r7, @-r15
|
||||
|
||||
mov.l 7834f, r0
|
||||
jsr @r0
|
||||
nop
|
||||
|
||||
mov.l @r15+, r7
|
||||
mov.l @r15+, r6
|
||||
mov.l @r15+, r5
|
||||
mov.l @r15+, r4
|
||||
mov.l @r15+, r3
|
||||
mov.l @r15+, r2
|
||||
mov.l @r15+, r1
|
||||
mov.l @r15+, r0
|
||||
mov.l 7834f, r0
|
||||
|
||||
bra 7835f
|
||||
nop
|
||||
.balign 4
|
||||
7834: .long trace_hardirqs_on
|
||||
7835:
|
||||
.endm
|
||||
.macro TRACE_IRQS_OFF
|
||||
|
||||
mov.l r0, @-r15
|
||||
mov.l r1, @-r15
|
||||
mov.l r2, @-r15
|
||||
mov.l r3, @-r15
|
||||
mov.l r4, @-r15
|
||||
mov.l r5, @-r15
|
||||
mov.l r6, @-r15
|
||||
mov.l r7, @-r15
|
||||
|
||||
mov.l 7834f, r0
|
||||
jsr @r0
|
||||
nop
|
||||
|
||||
mov.l @r15+, r7
|
||||
mov.l @r15+, r6
|
||||
mov.l @r15+, r5
|
||||
mov.l @r15+, r4
|
||||
mov.l @r15+, r3
|
||||
mov.l @r15+, r2
|
||||
mov.l @r15+, r1
|
||||
mov.l @r15+, r0
|
||||
mov.l 7834f, r0
|
||||
|
||||
bra 7835f
|
||||
nop
|
||||
.balign 4
|
||||
7834: .long trace_hardirqs_off
|
||||
7835:
|
||||
.endm
|
||||
|
||||
#else
|
||||
.macro TRACE_IRQS_ON
|
||||
.endm
|
||||
|
||||
.macro TRACE_IRQS_OFF
|
||||
.endm
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CPU_SH2A) || defined(CONFIG_CPU_SH4)
|
||||
# define PREF(x) pref @x
|
||||
#else
|
||||
# define PREF(x) nop
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Macro for use within assembly. Because the DWARF unwinder
|
||||
* needs to use the frame register to unwind the stack, we
|
||||
* need to setup r14 with the value of the stack pointer as
|
||||
* the return address is usually on the stack somewhere.
|
||||
*/
|
||||
.macro setup_frame_reg
|
||||
#ifdef CONFIG_DWARF_UNWINDER
|
||||
mov r15, r14
|
||||
#endif
|
||||
.endm
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#ifdef CONFIG_FUNCTION_TRACER
|
||||
|
||||
#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
|
||||
#define FTRACE_SYSCALL_MAX NR_syscalls
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
extern void mcount(void);
|
||||
|
@ -11,10 +12,13 @@ extern void mcount(void);
|
|||
#define MCOUNT_ADDR ((long)(mcount))
|
||||
|
||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||
#define CALLER_ADDR ((long)(ftrace_caller))
|
||||
#define CALL_ADDR ((long)(ftrace_call))
|
||||
#define STUB_ADDR ((long)(ftrace_stub))
|
||||
#define GRAPH_ADDR ((long)(ftrace_graph_call))
|
||||
#define CALLER_ADDR ((long)(ftrace_caller))
|
||||
|
||||
#define MCOUNT_INSN_OFFSET ((STUB_ADDR - CALLER_ADDR) >> 1)
|
||||
#define MCOUNT_INSN_OFFSET ((STUB_ADDR - CALL_ADDR) - 4)
|
||||
#define GRAPH_INSN_OFFSET ((CALLER_ADDR - GRAPH_ADDR) - 4)
|
||||
|
||||
struct dyn_arch_ftrace {
|
||||
/* No extra data needed on sh */
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
#ifndef __ASM_SH_HARDIRQ_H
|
||||
#define __ASM_SH_HARDIRQ_H
|
||||
|
||||
#include <linux/threads.h>
|
||||
#include <linux/irq.h>
|
||||
|
||||
/* entry.S is sensitive to the offsets of these fields */
|
||||
typedef struct {
|
||||
unsigned int __softirq_pending;
|
||||
} ____cacheline_aligned irq_cpustat_t;
|
||||
|
||||
#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
|
||||
|
||||
extern void ack_bad_irq(unsigned int irq);
|
||||
#define ack_bad_irq ack_bad_irq
|
||||
|
||||
#include <asm-generic/hardirq.h>
|
||||
|
||||
#endif /* __ASM_SH_HARDIRQ_H */
|
||||
|
|
|
@ -11,6 +11,7 @@ struct heartbeat_data {
|
|||
unsigned int nr_bits;
|
||||
struct timer_list timer;
|
||||
unsigned int regsize;
|
||||
unsigned int mask;
|
||||
unsigned long flags;
|
||||
};
|
||||
|
||||
|
|
72
arch/sh/include/asm/hwblk.h
Normal file
72
arch/sh/include/asm/hwblk.h
Normal file
|
@ -0,0 +1,72 @@
|
|||
#ifndef __ASM_SH_HWBLK_H
|
||||
#define __ASM_SH_HWBLK_H
|
||||
|
||||
#include <asm/clock.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
#define HWBLK_CNT_USAGE 0
|
||||
#define HWBLK_CNT_IDLE 1
|
||||
#define HWBLK_CNT_DEVICES 2
|
||||
#define HWBLK_CNT_NR 3
|
||||
|
||||
#define HWBLK_AREA_FLAG_PARENT (1 << 0) /* valid parent */
|
||||
|
||||
#define HWBLK_AREA(_flags, _parent) \
|
||||
{ \
|
||||
.flags = _flags, \
|
||||
.parent = _parent, \
|
||||
}
|
||||
|
||||
struct hwblk_area {
|
||||
int cnt[HWBLK_CNT_NR];
|
||||
unsigned char parent;
|
||||
unsigned char flags;
|
||||
};
|
||||
|
||||
#define HWBLK(_mstp, _bit, _area) \
|
||||
{ \
|
||||
.mstp = (void __iomem *)_mstp, \
|
||||
.bit = _bit, \
|
||||
.area = _area, \
|
||||
}
|
||||
|
||||
struct hwblk {
|
||||
void __iomem *mstp;
|
||||
unsigned char bit;
|
||||
unsigned char area;
|
||||
int cnt[HWBLK_CNT_NR];
|
||||
};
|
||||
|
||||
struct hwblk_info {
|
||||
struct hwblk_area *areas;
|
||||
int nr_areas;
|
||||
struct hwblk *hwblks;
|
||||
int nr_hwblks;
|
||||
};
|
||||
|
||||
/* Should be defined by processor-specific code */
|
||||
int arch_hwblk_init(void);
|
||||
int arch_hwblk_sleep_mode(void);
|
||||
|
||||
int hwblk_register(struct hwblk_info *info);
|
||||
int hwblk_init(void);
|
||||
|
||||
void hwblk_enable(struct hwblk_info *info, int hwblk);
|
||||
void hwblk_disable(struct hwblk_info *info, int hwblk);
|
||||
|
||||
void hwblk_cnt_inc(struct hwblk_info *info, int hwblk, int cnt);
|
||||
void hwblk_cnt_dec(struct hwblk_info *info, int hwblk, int cnt);
|
||||
|
||||
/* allow clocks to enable and disable hardware blocks */
|
||||
#define SH_HWBLK_CLK(_name, _id, _parent, _hwblk, _flags) \
|
||||
{ \
|
||||
.name = _name, \
|
||||
.id = _id, \
|
||||
.parent = _parent, \
|
||||
.arch_flags = _hwblk, \
|
||||
.flags = _flags, \
|
||||
}
|
||||
|
||||
int sh_hwblk_clk_register(struct clk *clks, int nr);
|
||||
|
||||
#endif /* __ASM_SH_HWBLK_H */
|
|
@ -92,8 +92,12 @@
|
|||
|
||||
static inline void ctrl_delay(void)
|
||||
{
|
||||
#ifdef P2SEG
|
||||
#ifdef CONFIG_CPU_SH4
|
||||
__raw_readw(CCN_PVR);
|
||||
#elif defined(P2SEG)
|
||||
__raw_readw(P2SEG);
|
||||
#else
|
||||
#error "Need a dummy address for delay"
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -146,6 +150,7 @@ __BUILD_MEMORY_STRING(q, u64)
|
|||
#define readl_relaxed(a) readl(a)
|
||||
#define readq_relaxed(a) readq(a)
|
||||
|
||||
#ifndef CONFIG_GENERIC_IOMAP
|
||||
/* Simple MMIO */
|
||||
#define ioread8(a) __raw_readb(a)
|
||||
#define ioread16(a) __raw_readw(a)
|
||||
|
@ -166,6 +171,15 @@ __BUILD_MEMORY_STRING(q, u64)
|
|||
#define iowrite8_rep(a, s, c) __raw_writesb((a), (s), (c))
|
||||
#define iowrite16_rep(a, s, c) __raw_writesw((a), (s), (c))
|
||||
#define iowrite32_rep(a, s, c) __raw_writesl((a), (s), (c))
|
||||
#endif
|
||||
|
||||
#define mmio_insb(p,d,c) __raw_readsb(p,d,c)
|
||||
#define mmio_insw(p,d,c) __raw_readsw(p,d,c)
|
||||
#define mmio_insl(p,d,c) __raw_readsl(p,d,c)
|
||||
|
||||
#define mmio_outsb(p,s,c) __raw_writesb(p,s,c)
|
||||
#define mmio_outsw(p,s,c) __raw_writesw(p,s,c)
|
||||
#define mmio_outsl(p,s,c) __raw_writesl(p,s,c)
|
||||
|
||||
/* synco on SH-4A, otherwise a nop */
|
||||
#define mmiowb() wmb()
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
/* Grossly misnamed. */
|
||||
enum die_val {
|
||||
DIE_TRAP,
|
||||
DIE_NMI,
|
||||
DIE_OOPS,
|
||||
};
|
||||
|
||||
|
|
|
@ -30,9 +30,6 @@ static inline void arch_kgdb_breakpoint(void)
|
|||
__asm__ __volatile__ ("trapa #0x3c\n");
|
||||
}
|
||||
|
||||
/* State info */
|
||||
extern char in_nmi; /* Debounce flag to prevent NMI reentry*/
|
||||
|
||||
#define BUFMAX 2048
|
||||
|
||||
#define CACHE_FLUSH_IS_SAFE 1
|
||||
|
|
6
arch/sh/include/asm/lmb.h
Normal file
6
arch/sh/include/asm/lmb.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef __ASM_SH_LMB_H
|
||||
#define __ASM_SH_LMB_H
|
||||
|
||||
#define LMB_REAL_LIMIT 0
|
||||
|
||||
#endif /* __ASM_SH_LMB_H */
|
|
@ -69,7 +69,7 @@ static inline void get_mmu_context(struct mm_struct *mm, unsigned int cpu)
|
|||
* We exhaust ASID of this version.
|
||||
* Flush all TLB and start new cycle.
|
||||
*/
|
||||
flush_tlb_all();
|
||||
local_flush_tlb_all();
|
||||
|
||||
#ifdef CONFIG_SUPERH64
|
||||
/*
|
||||
|
|
|
@ -50,26 +50,24 @@ extern unsigned long shm_align_mask;
|
|||
extern unsigned long max_low_pfn, min_low_pfn;
|
||||
extern unsigned long memory_start, memory_end;
|
||||
|
||||
extern void clear_page(void *to);
|
||||
static inline unsigned long
|
||||
pages_do_alias(unsigned long addr1, unsigned long addr2)
|
||||
{
|
||||
return (addr1 ^ addr2) & shm_align_mask;
|
||||
}
|
||||
|
||||
|
||||
#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
|
||||
extern void copy_page(void *to, void *from);
|
||||
|
||||
#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \
|
||||
(defined(CONFIG_CPU_SH5) || defined(CONFIG_CPU_SH4) || \
|
||||
defined(CONFIG_SH7705_CACHE_32KB))
|
||||
struct page;
|
||||
struct vm_area_struct;
|
||||
extern void clear_user_page(void *to, unsigned long address, struct page *page);
|
||||
extern void copy_user_page(void *to, void *from, unsigned long address,
|
||||
struct page *page);
|
||||
#if defined(CONFIG_CPU_SH4)
|
||||
|
||||
extern void copy_user_highpage(struct page *to, struct page *from,
|
||||
unsigned long vaddr, struct vm_area_struct *vma);
|
||||
#define __HAVE_ARCH_COPY_USER_HIGHPAGE
|
||||
#endif
|
||||
#else
|
||||
#define clear_user_page(page, vaddr, pg) clear_page(page)
|
||||
#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
|
||||
#endif
|
||||
extern void clear_user_highpage(struct page *page, unsigned long vaddr);
|
||||
#define clear_user_highpage clear_user_highpage
|
||||
|
||||
/*
|
||||
* These are used to make use of C type-checking..
|
||||
|
|
|
@ -36,6 +36,12 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
|
|||
#define NEFF_SIGN (1LL << (NEFF - 1))
|
||||
#define NEFF_MASK (-1LL << NEFF)
|
||||
|
||||
static inline unsigned long long neff_sign_extend(unsigned long val)
|
||||
{
|
||||
unsigned long long extended = val;
|
||||
return (extended & NEFF_SIGN) ? (extended | NEFF_MASK) : extended;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_29BIT
|
||||
#define NPHYS 29
|
||||
#else
|
||||
|
@ -133,27 +139,25 @@ typedef pte_t *pte_addr_t;
|
|||
*/
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
#if !defined(CONFIG_CACHE_OFF) && (defined(CONFIG_CPU_SH4) || \
|
||||
defined(CONFIG_SH7705_CACHE_32KB))
|
||||
struct mm_struct;
|
||||
#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
|
||||
pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
|
||||
#endif
|
||||
|
||||
struct vm_area_struct;
|
||||
extern void update_mmu_cache(struct vm_area_struct * vma,
|
||||
unsigned long address, pte_t pte);
|
||||
|
||||
extern void __update_cache(struct vm_area_struct *vma,
|
||||
unsigned long address, pte_t pte);
|
||||
extern void __update_tlb(struct vm_area_struct *vma,
|
||||
unsigned long address, pte_t pte);
|
||||
|
||||
static inline void
|
||||
update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte)
|
||||
{
|
||||
__update_cache(vma, address, pte);
|
||||
__update_tlb(vma, address, pte);
|
||||
}
|
||||
|
||||
extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
|
||||
extern void paging_init(void);
|
||||
extern void page_table_range_init(unsigned long start, unsigned long end,
|
||||
pgd_t *pgd);
|
||||
|
||||
#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_CPU_SH4) && defined(CONFIG_MMU)
|
||||
extern void kmap_coherent_init(void);
|
||||
#else
|
||||
#define kmap_coherent_init() do { } while (0)
|
||||
#endif
|
||||
|
||||
/* arch/sh/mm/mmap.c */
|
||||
#define HAVE_ARCH_UNMAPPED_AREA
|
||||
#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* - Bit 9 is reserved by everyone and used by _PAGE_PROTNONE.
|
||||
*
|
||||
* - Bits 10 and 11 are low bits of the PPN that are reserved on >= 4K pages.
|
||||
* Bit 10 is used for _PAGE_ACCESSED, bit 11 remains unused.
|
||||
* Bit 10 is used for _PAGE_ACCESSED, and bit 11 is used for _PAGE_SPECIAL.
|
||||
*
|
||||
* - On 29 bit platforms, bits 31 to 29 are used for the space attributes
|
||||
* and timing control which (together with bit 0) are moved into the
|
||||
|
@ -52,6 +52,7 @@
|
|||
#define _PAGE_PROTNONE 0x200 /* software: if not present */
|
||||
#define _PAGE_ACCESSED 0x400 /* software: page referenced */
|
||||
#define _PAGE_FILE _PAGE_WT /* software: pagecache or swap? */
|
||||
#define _PAGE_SPECIAL 0x800 /* software: special page */
|
||||
|
||||
#define _PAGE_SZ_MASK (_PAGE_SZ0 | _PAGE_SZ1)
|
||||
#define _PAGE_PR_MASK (_PAGE_RW | _PAGE_USER)
|
||||
|
@ -86,6 +87,14 @@
|
|||
#define _PAGE_PCC_ATR8 0x60000000 /* Attribute Memory space, 8 bit bus */
|
||||
#define _PAGE_PCC_ATR16 0x60000001 /* Attribute Memory space, 6 bit bus */
|
||||
|
||||
#ifndef CONFIG_X2TLB
|
||||
/* copy the ptea attributes */
|
||||
static inline unsigned long copy_ptea_attributes(unsigned long x)
|
||||
{
|
||||
return ((x >> 28) & 0xe) | (x & 0x1);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Mask which drops unused bits from the PTEL value */
|
||||
#if defined(CONFIG_CPU_SH3)
|
||||
#define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED| \
|
||||
|
@ -148,8 +157,12 @@
|
|||
# define _PAGE_SZHUGE (_PAGE_FLAGS_HARD)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Mask of bits that are to be preserved accross pgprot changes.
|
||||
*/
|
||||
#define _PAGE_CHG_MASK \
|
||||
(PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | _PAGE_DIRTY)
|
||||
(PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \
|
||||
_PAGE_DIRTY | _PAGE_SPECIAL)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
@ -328,7 +341,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
|
|||
#define pte_dirty(pte) ((pte).pte_low & _PAGE_DIRTY)
|
||||
#define pte_young(pte) ((pte).pte_low & _PAGE_ACCESSED)
|
||||
#define pte_file(pte) ((pte).pte_low & _PAGE_FILE)
|
||||
#define pte_special(pte) (0)
|
||||
#define pte_special(pte) ((pte).pte_low & _PAGE_SPECIAL)
|
||||
|
||||
#ifdef CONFIG_X2TLB
|
||||
#define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE)
|
||||
|
@ -358,8 +371,9 @@ PTE_BIT_FUNC(low, mkclean, &= ~_PAGE_DIRTY);
|
|||
PTE_BIT_FUNC(low, mkdirty, |= _PAGE_DIRTY);
|
||||
PTE_BIT_FUNC(low, mkold, &= ~_PAGE_ACCESSED);
|
||||
PTE_BIT_FUNC(low, mkyoung, |= _PAGE_ACCESSED);
|
||||
PTE_BIT_FUNC(low, mkspecial, |= _PAGE_SPECIAL);
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
#define __HAVE_ARCH_PTE_SPECIAL
|
||||
|
||||
/*
|
||||
* Macro and implementation to make a page protection as uncachable.
|
||||
|
@ -394,13 +408,19 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
|
|||
|
||||
/* to find an entry in a page-table-directory. */
|
||||
#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
|
||||
#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address))
|
||||
#define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address))
|
||||
#define __pgd_offset(address) pgd_index(address)
|
||||
|
||||
/* to find an entry in a kernel page-table-directory */
|
||||
#define pgd_offset_k(address) pgd_offset(&init_mm, address)
|
||||
|
||||
#define __pud_offset(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1))
|
||||
#define __pmd_offset(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
|
||||
|
||||
/* Find an entry in the third-level page table.. */
|
||||
#define pte_index(address) ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
|
||||
#define __pte_offset(address) pte_index(address)
|
||||
|
||||
#define pte_offset_kernel(dir, address) \
|
||||
((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(address))
|
||||
#define pte_offset_map(dir, address) pte_offset_kernel(dir, address)
|
||||
|
|
|
@ -60,6 +60,9 @@ static __inline__ void pmd_set(pmd_t *pmdp,pte_t *ptep)
|
|||
/* To find an entry in a kernel PGD. */
|
||||
#define pgd_offset_k(address) pgd_offset(&init_mm, address)
|
||||
|
||||
#define __pud_offset(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1))
|
||||
#define __pmd_offset(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
|
||||
|
||||
/*
|
||||
* PMD level access routines. Same notes as above.
|
||||
*/
|
||||
|
@ -80,6 +83,8 @@ static __inline__ void pmd_set(pmd_t *pmdp,pte_t *ptep)
|
|||
#define pte_index(address) \
|
||||
((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
|
||||
|
||||
#define __pte_offset(address) pte_index(address)
|
||||
|
||||
#define pte_offset_kernel(dir, addr) \
|
||||
((pte_t *) ((pmd_val(*(dir))) & PAGE_MASK) + pte_index((addr)))
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ enum cpu_type {
|
|||
|
||||
/* SH-4A types */
|
||||
CPU_SH7763, CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, CPU_SH7786,
|
||||
CPU_SH7723, CPU_SH7724, CPU_SHX3,
|
||||
CPU_SH7723, CPU_SH7724, CPU_SH7757, CPU_SHX3,
|
||||
|
||||
/* SH4AL-DSP types */
|
||||
CPU_SH7343, CPU_SH7722, CPU_SH7366,
|
||||
|
@ -44,6 +44,17 @@ enum cpu_type {
|
|||
CPU_SH_NONE
|
||||
};
|
||||
|
||||
enum cpu_family {
|
||||
CPU_FAMILY_SH2,
|
||||
CPU_FAMILY_SH2A,
|
||||
CPU_FAMILY_SH3,
|
||||
CPU_FAMILY_SH4,
|
||||
CPU_FAMILY_SH4A,
|
||||
CPU_FAMILY_SH4AL_DSP,
|
||||
CPU_FAMILY_SH5,
|
||||
CPU_FAMILY_UNKNOWN,
|
||||
};
|
||||
|
||||
/*
|
||||
* TLB information structure
|
||||
*
|
||||
|
@ -61,7 +72,7 @@ struct tlb_info {
|
|||
};
|
||||
|
||||
struct sh_cpuinfo {
|
||||
unsigned int type;
|
||||
unsigned int type, family;
|
||||
int cut_major, cut_minor;
|
||||
unsigned long loops_per_jiffy;
|
||||
unsigned long asid_cache;
|
||||
|
|
73
arch/sh/include/asm/romimage-macros.h
Normal file
73
arch/sh/include/asm/romimage-macros.h
Normal file
|
@ -0,0 +1,73 @@
|
|||
#ifndef __ROMIMAGE_MACRO_H
|
||||
#define __ROMIMAGE_MACRO_H
|
||||
|
||||
/* The LIST command is used to include comments in the script */
|
||||
.macro LIST comment
|
||||
.endm
|
||||
|
||||
/* The ED command is used to write a 32-bit word */
|
||||
.macro ED, addr, data
|
||||
mov.l 1f, r1
|
||||
mov.l 2f, r0
|
||||
mov.l r0, @r1
|
||||
bra 3f
|
||||
nop
|
||||
.align 2
|
||||
1 : .long \addr
|
||||
2 : .long \data
|
||||
3 :
|
||||
.endm
|
||||
|
||||
/* The EW command is used to write a 16-bit word */
|
||||
.macro EW, addr, data
|
||||
mov.l 1f, r1
|
||||
mov.l 2f, r0
|
||||
mov.w r0, @r1
|
||||
bra 3f
|
||||
nop
|
||||
.align 2
|
||||
1 : .long \addr
|
||||
2 : .long \data
|
||||
3 :
|
||||
.endm
|
||||
|
||||
/* The EB command is used to write an 8-bit word */
|
||||
.macro EB, addr, data
|
||||
mov.l 1f, r1
|
||||
mov.l 2f, r0
|
||||
mov.b r0, @r1
|
||||
bra 3f
|
||||
nop
|
||||
.align 2
|
||||
1 : .long \addr
|
||||
2 : .long \data
|
||||
3 :
|
||||
.endm
|
||||
|
||||
/* The WAIT command is used to delay the execution */
|
||||
.macro WAIT, time
|
||||
mov.l 2f, r3
|
||||
1 :
|
||||
nop
|
||||
tst r3, r3
|
||||
bf/s 1b
|
||||
dt r3
|
||||
bra 3f
|
||||
nop
|
||||
.align 2
|
||||
2 : .long \time * 100
|
||||
3 :
|
||||
.endm
|
||||
|
||||
/* The DD command is used to read a 32-bit word */
|
||||
.macro DD, addr, addr2, nr
|
||||
mov.l 1f, r1
|
||||
mov.l @r1, r0
|
||||
bra 2f
|
||||
nop
|
||||
.align 2
|
||||
1 : .long \addr
|
||||
2 :
|
||||
.endm
|
||||
|
||||
#endif /* __ROMIMAGE_MACRO_H */
|
|
@ -7,6 +7,7 @@ extern void __nosave_begin, __nosave_end;
|
|||
extern long __machvec_start, __machvec_end;
|
||||
extern char __uncached_start, __uncached_end;
|
||||
extern char _ebss[];
|
||||
extern char __start_eh_frame[], __stop_eh_frame[];
|
||||
|
||||
#endif /* __ASM_SH_SECTIONS_H */
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ struct sh_keysc_info {
|
|||
enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3 } mode;
|
||||
int scan_timing; /* 0 -> 7, see KYCR1, SCN[2:0] */
|
||||
int delay;
|
||||
int kycr2_delay;
|
||||
int keycodes[SH_KEYSC_MAXKEYS];
|
||||
};
|
||||
|
||||
|
|
25
arch/sh/include/asm/stacktrace.h
Normal file
25
arch/sh/include/asm/stacktrace.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (C) 2009 Matt Fleming
|
||||
*
|
||||
* Based on:
|
||||
* The x86 implementation - arch/x86/include/asm/stacktrace.h
|
||||
*/
|
||||
#ifndef _ASM_SH_STACKTRACE_H
|
||||
#define _ASM_SH_STACKTRACE_H
|
||||
|
||||
/* Generic stack tracer with callbacks */
|
||||
|
||||
struct stacktrace_ops {
|
||||
void (*warning)(void *data, char *msg);
|
||||
/* msg must contain %s for the symbol */
|
||||
void (*warning_symbol)(void *data, char *msg, unsigned long symbol);
|
||||
void (*address)(void *data, unsigned long address, int reliable);
|
||||
/* On negative return stop dumping */
|
||||
int (*stack)(void *data, char *name);
|
||||
};
|
||||
|
||||
void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
|
||||
unsigned long *stack,
|
||||
const struct stacktrace_ops *ops, void *data);
|
||||
|
||||
#endif /* _ASM_SH_STACKTRACE_H */
|
|
@ -10,6 +10,15 @@ struct swsusp_arch_regs {
|
|||
struct pt_regs user_regs;
|
||||
unsigned long bank1_regs[8];
|
||||
};
|
||||
|
||||
void sh_mobile_call_standby(unsigned long mode);
|
||||
|
||||
#ifdef CONFIG_CPU_IDLE
|
||||
void sh_mobile_setup_cpuidle(void);
|
||||
#else
|
||||
static inline void sh_mobile_setup_cpuidle(void) {}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* flags passed to assembly suspend code */
|
||||
|
|
|
@ -65,6 +65,7 @@ static inline void syscall_get_arguments(struct task_struct *task,
|
|||
case 3: args[2] = regs->regs[6];
|
||||
case 2: args[1] = regs->regs[5];
|
||||
case 1: args[0] = regs->regs[4];
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
|
|
|
@ -14,18 +14,6 @@
|
|||
|
||||
#define AT_VECTOR_SIZE_ARCH 5 /* entries in ARCH_DLINFO */
|
||||
|
||||
#if defined(CONFIG_CPU_SH4A) || defined(CONFIG_CPU_SH5)
|
||||
#define __icbi() \
|
||||
{ \
|
||||
unsigned long __addr; \
|
||||
__addr = 0xa8000000; \
|
||||
__asm__ __volatile__( \
|
||||
"icbi %0\n\t" \
|
||||
: /* no output */ \
|
||||
: "m" (__m(__addr))); \
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* A brief note on ctrl_barrier(), the control register write barrier.
|
||||
*
|
||||
|
@ -44,7 +32,7 @@
|
|||
#define mb() __asm__ __volatile__ ("synco": : :"memory")
|
||||
#define rmb() mb()
|
||||
#define wmb() __asm__ __volatile__ ("synco": : :"memory")
|
||||
#define ctrl_barrier() __icbi()
|
||||
#define ctrl_barrier() __icbi(0xa8000000)
|
||||
#define read_barrier_depends() do { } while(0)
|
||||
#else
|
||||
#define mb() __asm__ __volatile__ ("": : :"memory")
|
||||
|
@ -181,6 +169,11 @@ BUILD_TRAP_HANDLER(breakpoint);
|
|||
BUILD_TRAP_HANDLER(singlestep);
|
||||
BUILD_TRAP_HANDLER(fpu_error);
|
||||
BUILD_TRAP_HANDLER(fpu_state_restore);
|
||||
BUILD_TRAP_HANDLER(nmi);
|
||||
|
||||
#ifdef CONFIG_BUG
|
||||
extern void handle_BUG(struct pt_regs *);
|
||||
#endif
|
||||
|
||||
#define arch_align_stack(x) (x)
|
||||
|
||||
|
|
|
@ -14,12 +14,12 @@ do { \
|
|||
(u32 *)&tsk->thread.dsp_status; \
|
||||
__asm__ __volatile__ ( \
|
||||
".balign 4\n\t" \
|
||||
"movs.l @r2+, a0\n\t" \
|
||||
"movs.l @r2+, a1\n\t" \
|
||||
"movs.l @r2+, a0g\n\t" \
|
||||
"movs.l @r2+, a1g\n\t" \
|
||||
"movs.l @r2+, m0\n\t" \
|
||||
"movs.l @r2+, m1\n\t" \
|
||||
"movs.l @r2+, a0\n\t" \
|
||||
"movs.l @r2+, x0\n\t" \
|
||||
"movs.l @r2+, x1\n\t" \
|
||||
"movs.l @r2+, y0\n\t" \
|
||||
|
@ -39,20 +39,20 @@ do { \
|
|||
\
|
||||
__asm__ __volatile__ ( \
|
||||
".balign 4\n\t" \
|
||||
"stc.l mod, @-r2\n\t" \
|
||||
"stc.l mod, @-r2\n\t" \
|
||||
"stc.l re, @-r2\n\t" \
|
||||
"stc.l rs, @-r2\n\t" \
|
||||
"sts.l dsr, @-r2\n\t" \
|
||||
"sts.l y1, @-r2\n\t" \
|
||||
"sts.l y0, @-r2\n\t" \
|
||||
"sts.l x1, @-r2\n\t" \
|
||||
"sts.l x0, @-r2\n\t" \
|
||||
"sts.l a0, @-r2\n\t" \
|
||||
".word 0xf653 ! movs.l a1, @-r2\n\t" \
|
||||
".word 0xf6f3 ! movs.l a0g, @-r2\n\t" \
|
||||
".word 0xf6d3 ! movs.l a1g, @-r2\n\t" \
|
||||
".word 0xf6c3 ! movs.l m0, @-r2\n\t" \
|
||||
".word 0xf6e3 ! movs.l m1, @-r2\n\t" \
|
||||
"sts.l dsr, @-r2\n\t" \
|
||||
"movs.l y1, @-r2\n\t" \
|
||||
"movs.l y0, @-r2\n\t" \
|
||||
"movs.l x1, @-r2\n\t" \
|
||||
"movs.l x0, @-r2\n\t" \
|
||||
"movs.l m1, @-r2\n\t" \
|
||||
"movs.l m0, @-r2\n\t" \
|
||||
"movs.l a1g, @-r2\n\t" \
|
||||
"movs.l a0g, @-r2\n\t" \
|
||||
"movs.l a1, @-r2\n\t" \
|
||||
"movs.l a0, @-r2\n\t" \
|
||||
: : "r" (__ts2)); \
|
||||
} while (0)
|
||||
|
||||
|
@ -63,6 +63,16 @@ do { \
|
|||
#define __restore_dsp(tsk) do { } while (0)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CPU_SH4A)
|
||||
#define __icbi(addr) __asm__ __volatile__ ( "icbi @%0\n\t" : : "r" (addr))
|
||||
#else
|
||||
#define __icbi(addr) mb()
|
||||
#endif
|
||||
|
||||
#define __ocbp(addr) __asm__ __volatile__ ( "ocbp @%0\n\t" : : "r" (addr))
|
||||
#define __ocbi(addr) __asm__ __volatile__ ( "ocbi @%0\n\t" : : "r" (addr))
|
||||
#define __ocbwb(addr) __asm__ __volatile__ ( "ocbwb @%0\n\t" : : "r" (addr))
|
||||
|
||||
struct task_struct *__switch_to(struct task_struct *prev,
|
||||
struct task_struct *next);
|
||||
|
||||
|
@ -198,8 +208,13 @@ do { \
|
|||
})
|
||||
#endif
|
||||
|
||||
static inline reg_size_t register_align(void *val)
|
||||
{
|
||||
return (unsigned long)(signed long)val;
|
||||
}
|
||||
|
||||
int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs,
|
||||
struct mem_access *ma);
|
||||
struct mem_access *ma, int);
|
||||
|
||||
asmlinkage void do_address_error(struct pt_regs *regs,
|
||||
unsigned long writeaccess,
|
||||
|
|
|
@ -37,4 +37,14 @@ do { \
|
|||
#define jump_to_uncached() do { } while (0)
|
||||
#define back_to_cached() do { } while (0)
|
||||
|
||||
#define __icbi(addr) __asm__ __volatile__ ( "icbi %0, 0\n\t" : : "r" (addr))
|
||||
#define __ocbp(addr) __asm__ __volatile__ ( "ocbp %0, 0\n\t" : : "r" (addr))
|
||||
#define __ocbi(addr) __asm__ __volatile__ ( "ocbi %0, 0\n\t" : : "r" (addr))
|
||||
#define __ocbwb(addr) __asm__ __volatile__ ( "ocbwb %0, 0\n\t" : : "r" (addr))
|
||||
|
||||
static inline reg_size_t register_align(void *val)
|
||||
{
|
||||
return (unsigned long long)(signed long long)(signed long)val;
|
||||
}
|
||||
|
||||
#endif /* __ASM_SH_SYSTEM_64_H */
|
||||
|
|
|
@ -97,7 +97,7 @@ static inline struct thread_info *current_thread_info(void)
|
|||
|
||||
extern struct thread_info *alloc_thread_info(struct task_struct *tsk);
|
||||
extern void free_thread_info(struct thread_info *ti);
|
||||
|
||||
|
||||
#endif /* THREAD_SHIFT < PAGE_SHIFT */
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
@ -116,6 +116,7 @@ extern void free_thread_info(struct thread_info *ti);
|
|||
#define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */
|
||||
#define TIF_SECCOMP 6 /* secure computing */
|
||||
#define TIF_NOTIFY_RESUME 7 /* callback before returning to user */
|
||||
#define TIF_SYSCALL_TRACEPOINT 8 /* for ftrace syscall instrumentation */
|
||||
#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
|
||||
#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */
|
||||
#define TIF_MEMDIE 18
|
||||
|
@ -129,25 +130,27 @@ extern void free_thread_info(struct thread_info *ti);
|
|||
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
|
||||
#define _TIF_SECCOMP (1 << TIF_SECCOMP)
|
||||
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
|
||||
#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
|
||||
#define _TIF_USEDFPU (1 << TIF_USEDFPU)
|
||||
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
|
||||
#define _TIF_FREEZE (1 << TIF_FREEZE)
|
||||
|
||||
/*
|
||||
* _TIF_ALLWORK_MASK and _TIF_WORK_MASK need to fit within a byte, or we
|
||||
* _TIF_ALLWORK_MASK and _TIF_WORK_MASK need to fit within 2 bytes, or we
|
||||
* blow the tst immediate size constraints and need to fix up
|
||||
* arch/sh/kernel/entry-common.S.
|
||||
*/
|
||||
|
||||
/* work to do in syscall trace */
|
||||
#define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \
|
||||
_TIF_SYSCALL_AUDIT | _TIF_SECCOMP)
|
||||
_TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \
|
||||
_TIF_SYSCALL_TRACEPOINT)
|
||||
|
||||
/* work to do on any return to u-space */
|
||||
#define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \
|
||||
_TIF_NEED_RESCHED | _TIF_SYSCALL_AUDIT | \
|
||||
_TIF_SINGLESTEP | _TIF_RESTORE_SIGMASK | \
|
||||
_TIF_NOTIFY_RESUME)
|
||||
_TIF_NOTIFY_RESUME | _TIF_SYSCALL_TRACEPOINT)
|
||||
|
||||
/* work to do on interrupt/exception return */
|
||||
#define _TIF_WORK_MASK (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \
|
||||
|
|
|
@ -11,8 +11,10 @@
|
|||
|
||||
#ifdef CONFIG_SUPERH32
|
||||
typedef u16 insn_size_t;
|
||||
typedef u32 reg_size_t;
|
||||
#else
|
||||
typedef u32 insn_size_t;
|
||||
typedef u64 reg_size_t;
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
#define __NR_clone 120
|
||||
#define __NR_setdomainname 121
|
||||
#define __NR_uname 122
|
||||
#define __NR_modify_ldt 123
|
||||
#define __NR_cacheflush 123
|
||||
#define __NR_adjtimex 124
|
||||
#define __NR_mprotect 125
|
||||
#define __NR_sigprocmask 126
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
#define __NR_clone 120
|
||||
#define __NR_setdomainname 121
|
||||
#define __NR_uname 122
|
||||
#define __NR_modify_ldt 123
|
||||
#define __NR_cacheflush 123
|
||||
#define __NR_adjtimex 124
|
||||
#define __NR_mprotect 125
|
||||
#define __NR_sigprocmask 126
|
||||
|
|
31
arch/sh/include/asm/unwinder.h
Normal file
31
arch/sh/include/asm/unwinder.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
#ifndef _LINUX_UNWINDER_H
|
||||
#define _LINUX_UNWINDER_H
|
||||
|
||||
#include <asm/stacktrace.h>
|
||||
|
||||
struct unwinder {
|
||||
const char *name;
|
||||
struct list_head list;
|
||||
int rating;
|
||||
void (*dump)(struct task_struct *, struct pt_regs *,
|
||||
unsigned long *, const struct stacktrace_ops *, void *);
|
||||
};
|
||||
|
||||
extern int unwinder_init(void);
|
||||
extern int unwinder_register(struct unwinder *);
|
||||
|
||||
extern void unwind_stack(struct task_struct *, struct pt_regs *,
|
||||
unsigned long *, const struct stacktrace_ops *,
|
||||
void *);
|
||||
|
||||
extern void stack_reader_dump(struct task_struct *, struct pt_regs *,
|
||||
unsigned long *, const struct stacktrace_ops *,
|
||||
void *);
|
||||
|
||||
/*
|
||||
* Used by fault handling code to signal to the unwinder code that it
|
||||
* should switch to a different unwinder.
|
||||
*/
|
||||
extern int unwinder_faulted;
|
||||
|
||||
#endif /* _LINUX_UNWINDER_H */
|
17
arch/sh/include/asm/vmlinux.lds.h
Normal file
17
arch/sh/include/asm/vmlinux.lds.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef __ASM_SH_VMLINUX_LDS_H
|
||||
#define __ASM_SH_VMLINUX_LDS_H
|
||||
|
||||
#include <asm-generic/vmlinux.lds.h>
|
||||
|
||||
#ifdef CONFIG_DWARF_UNWINDER
|
||||
#define DWARF_EH_FRAME \
|
||||
.eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__start_eh_frame) = .; \
|
||||
*(.eh_frame) \
|
||||
VMLINUX_SYMBOL(__stop_eh_frame) = .; \
|
||||
}
|
||||
#else
|
||||
#define DWARF_EH_FRAME
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_SH_VMLINUX_LDS_H */
|
|
@ -13,10 +13,18 @@
|
|||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <cpu/watchdog.h>
|
||||
#include <asm/io.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
/*
|
||||
#define WTCNT_HIGH 0x5a
|
||||
#define WTCSR_HIGH 0xa5
|
||||
|
||||
#define WTCSR_CKS2 0x04
|
||||
#define WTCSR_CKS1 0x02
|
||||
#define WTCSR_CKS0 0x01
|
||||
|
||||
#include <cpu/watchdog.h>
|
||||
|
||||
/*
|
||||
* See cpu-sh2/watchdog.h for explanation of this stupidity..
|
||||
*/
|
||||
#ifndef WTCNT_R
|
||||
|
@ -27,13 +35,6 @@
|
|||
# define WTCSR_R WTCSR
|
||||
#endif
|
||||
|
||||
#define WTCNT_HIGH 0x5a
|
||||
#define WTCSR_HIGH 0xa5
|
||||
|
||||
#define WTCSR_CKS2 0x04
|
||||
#define WTCSR_CKS1 0x02
|
||||
#define WTCSR_CKS0 0x01
|
||||
|
||||
/*
|
||||
* CKS0-2 supports a number of clock division ratios. At the time the watchdog
|
||||
* is enabled, it defaults to a 41 usec overflow period .. we overload this to
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* include/asm-sh/cpu-sh2/cacheflush.h
|
||||
*
|
||||
* Copyright (C) 2003 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.
|
||||
*/
|
||||
#ifndef __ASM_CPU_SH2_CACHEFLUSH_H
|
||||
#define __ASM_CPU_SH2_CACHEFLUSH_H
|
||||
|
||||
/*
|
||||
* Cache flushing:
|
||||
*
|
||||
* - flush_cache_all() flushes entire cache
|
||||
* - flush_cache_mm(mm) flushes the specified mm context's cache lines
|
||||
* - flush_cache_dup mm(mm) handles cache flushing when forking
|
||||
* - flush_cache_page(mm, vmaddr, pfn) flushes a single page
|
||||
* - flush_cache_range(vma, start, end) flushes a range of pages
|
||||
*
|
||||
* - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache
|
||||
* - flush_icache_range(start, end) flushes(invalidates) a range for icache
|
||||
* - flush_icache_page(vma, pg) flushes(invalidates) a page for icache
|
||||
*
|
||||
* Caches are indexed (effectively) by physical address on SH-2, so
|
||||
* we don't need them.
|
||||
*/
|
||||
#define flush_cache_all() do { } while (0)
|
||||
#define flush_cache_mm(mm) do { } while (0)
|
||||
#define flush_cache_dup_mm(mm) do { } while (0)
|
||||
#define flush_cache_range(vma, start, end) do { } while (0)
|
||||
#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
|
||||
#define flush_dcache_page(page) do { } while (0)
|
||||
#define flush_dcache_mmap_lock(mapping) do { } while (0)
|
||||
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
|
||||
#define flush_icache_range(start, end) do { } while (0)
|
||||
#define flush_icache_page(vma,pg) do { } while (0)
|
||||
#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
|
||||
#define flush_cache_sigtramp(vaddr) do { } while (0)
|
||||
|
||||
#define p3_cache_init() do { } while (0)
|
||||
|
||||
#endif /* __ASM_CPU_SH2_CACHEFLUSH_H */
|
|
@ -1,34 +0,0 @@
|
|||
#ifndef __ASM_CPU_SH2A_CACHEFLUSH_H
|
||||
#define __ASM_CPU_SH2A_CACHEFLUSH_H
|
||||
|
||||
/*
|
||||
* Cache flushing:
|
||||
*
|
||||
* - flush_cache_all() flushes entire cache
|
||||
* - flush_cache_mm(mm) flushes the specified mm context's cache lines
|
||||
* - flush_cache_dup mm(mm) handles cache flushing when forking
|
||||
* - flush_cache_page(mm, vmaddr, pfn) flushes a single page
|
||||
* - flush_cache_range(vma, start, end) flushes a range of pages
|
||||
*
|
||||
* - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache
|
||||
* - flush_icache_range(start, end) flushes(invalidates) a range for icache
|
||||
* - flush_icache_page(vma, pg) flushes(invalidates) a page for icache
|
||||
*
|
||||
* Caches are indexed (effectively) by physical address on SH-2, so
|
||||
* we don't need them.
|
||||
*/
|
||||
#define flush_cache_all() do { } while (0)
|
||||
#define flush_cache_mm(mm) do { } while (0)
|
||||
#define flush_cache_dup_mm(mm) do { } while (0)
|
||||
#define flush_cache_range(vma, start, end) do { } while (0)
|
||||
#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
|
||||
#define flush_dcache_page(page) do { } while (0)
|
||||
#define flush_dcache_mmap_lock(mapping) do { } while (0)
|
||||
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
|
||||
void flush_icache_range(unsigned long start, unsigned long end);
|
||||
#define flush_icache_page(vma,pg) do { } while (0)
|
||||
#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
|
||||
#define flush_cache_sigtramp(vaddr) do { } while (0)
|
||||
|
||||
#define p3_cache_init() do { } while (0)
|
||||
#endif /* __ASM_CPU_SH2A_CACHEFLUSH_H */
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
* include/asm-sh/cpu-sh3/cacheflush.h
|
||||
*
|
||||
* Copyright (C) 1999 Niibe Yutaka
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
#ifndef __ASM_CPU_SH3_CACHEFLUSH_H
|
||||
#define __ASM_CPU_SH3_CACHEFLUSH_H
|
||||
|
||||
#if defined(CONFIG_SH7705_CACHE_32KB)
|
||||
/* SH7705 is an SH3 processor with 32KB cache. This has alias issues like the
|
||||
* SH4. Unlike the SH4 this is a unified cache so we need to do some work
|
||||
* in mmap when 'exec'ing a new binary
|
||||
*/
|
||||
/* 32KB cache, 4kb PAGE sizes need to check bit 12 */
|
||||
#define CACHE_ALIAS 0x00001000
|
||||
|
||||
#define PG_mapped PG_arch_1
|
||||
|
||||
void flush_cache_all(void);
|
||||
void flush_cache_mm(struct mm_struct *mm);
|
||||
#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
|
||||
void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
|
||||
unsigned long end);
|
||||
void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn);
|
||||
void flush_dcache_page(struct page *pg);
|
||||
void flush_icache_range(unsigned long start, unsigned long end);
|
||||
void flush_icache_page(struct vm_area_struct *vma, struct page *page);
|
||||
|
||||
#define flush_dcache_mmap_lock(mapping) do { } while (0)
|
||||
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
|
||||
|
||||
/* SH3 has unified cache so no special action needed here */
|
||||
#define flush_cache_sigtramp(vaddr) do { } while (0)
|
||||
#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
|
||||
|
||||
#define p3_cache_init() do { } while (0)
|
||||
|
||||
#else
|
||||
#include <cpu-common/cpu/cacheflush.h>
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_CPU_SH3_CACHEFLUSH_H */
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
* include/asm-sh/cpu-sh4/cacheflush.h
|
||||
*
|
||||
* Copyright (C) 1999 Niibe Yutaka
|
||||
* Copyright (C) 2003 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.
|
||||
*/
|
||||
#ifndef __ASM_CPU_SH4_CACHEFLUSH_H
|
||||
#define __ASM_CPU_SH4_CACHEFLUSH_H
|
||||
|
||||
/*
|
||||
* Caches are broken on SH-4 (unless we use write-through
|
||||
* caching; in which case they're only semi-broken),
|
||||
* so we need them.
|
||||
*/
|
||||
void flush_cache_all(void);
|
||||
void flush_dcache_all(void);
|
||||
void flush_cache_mm(struct mm_struct *mm);
|
||||
#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
|
||||
void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
|
||||
unsigned long end);
|
||||
void flush_cache_page(struct vm_area_struct *vma, unsigned long addr,
|
||||
unsigned long pfn);
|
||||
void flush_dcache_page(struct page *pg);
|
||||
|
||||
#define flush_dcache_mmap_lock(mapping) do { } while (0)
|
||||
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
|
||||
|
||||
void flush_icache_range(unsigned long start, unsigned long end);
|
||||
void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
|
||||
unsigned long addr, int len);
|
||||
|
||||
#define flush_icache_page(vma,pg) do { } while (0)
|
||||
|
||||
/* Initialization of P3 area for copy_user_page */
|
||||
void p3_cache_init(void);
|
||||
|
||||
#define PG_mapped PG_arch_1
|
||||
|
||||
#endif /* __ASM_CPU_SH4_CACHEFLUSH_H */
|
|
@ -16,7 +16,8 @@
|
|||
#define DMAE0_IRQ 38
|
||||
#define SH_DMAC_BASE0 0xFF608020
|
||||
#define SH_DMARS_BASE 0xFF609000
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7723)
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7723) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7724)
|
||||
#define DMTE0_IRQ 48 /* DMAC0A*/
|
||||
#define DMTE4_IRQ 40 /* DMAC0B */
|
||||
#define DMTE6_IRQ 42
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
#define MSTPCR0 0xa4150030
|
||||
#define MSTPCR1 0xa4150034
|
||||
#define MSTPCR2 0xa4150038
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7757)
|
||||
#define FRQCR 0xffc80000
|
||||
#define OSCCR 0xffc80018
|
||||
#define PLLCR 0xffc80024
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \
|
||||
defined(CONFIG_CPU_SUBTYPE_SH7780)
|
||||
#define FRQCR 0xffc80000
|
||||
|
|
|
@ -221,4 +221,18 @@ enum {
|
|||
GPIO_FN_KEYOUT3, GPIO_FN_KEYOUT4_IN6, GPIO_FN_KEYOUT5_IN5,
|
||||
};
|
||||
|
||||
enum {
|
||||
HWBLK_UNKNOWN = 0,
|
||||
HWBLK_TLB, HWBLK_IC, HWBLK_OC, HWBLK_URAM, HWBLK_XYMEM,
|
||||
HWBLK_INTC, HWBLK_DMAC, HWBLK_SHYWAY, HWBLK_HUDI,
|
||||
HWBLK_UBC, HWBLK_TMU, HWBLK_CMT, HWBLK_RWDT, HWBLK_FLCTL,
|
||||
HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2, HWBLK_SIO,
|
||||
HWBLK_SIOF0, HWBLK_SIOF1, HWBLK_IIC, HWBLK_RTC,
|
||||
HWBLK_TPU, HWBLK_IRDA, HWBLK_SDHI, HWBLK_SIM, HWBLK_KEYSC,
|
||||
HWBLK_TSIF, HWBLK_USBF, HWBLK_2DG, HWBLK_SIU, HWBLK_VOU,
|
||||
HWBLK_JPU, HWBLK_BEU, HWBLK_CEU, HWBLK_VEU, HWBLK_VPU,
|
||||
HWBLK_LCDC,
|
||||
HWBLK_NR,
|
||||
};
|
||||
|
||||
#endif /* __ASM_SH7722_H__ */
|
||||
|
|
|
@ -265,4 +265,21 @@ enum {
|
|||
GPIO_FN_IDEA1, GPIO_FN_IDEA0,
|
||||
};
|
||||
|
||||
enum {
|
||||
HWBLK_UNKNOWN = 0,
|
||||
HWBLK_TLB, HWBLK_IC, HWBLK_OC, HWBLK_L2C, HWBLK_ILMEM, HWBLK_FPU,
|
||||
HWBLK_INTC, HWBLK_DMAC0, HWBLK_SHYWAY,
|
||||
HWBLK_HUDI, HWBLK_DBG, HWBLK_UBC, HWBLK_SUBC,
|
||||
HWBLK_TMU0, HWBLK_CMT, HWBLK_RWDT, HWBLK_DMAC1, HWBLK_TMU1,
|
||||
HWBLK_FLCTL,
|
||||
HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2,
|
||||
HWBLK_SCIF3, HWBLK_SCIF4, HWBLK_SCIF5,
|
||||
HWBLK_MSIOF0, HWBLK_MSIOF1, HWBLK_MERAM, HWBLK_IIC, HWBLK_RTC,
|
||||
HWBLK_ATAPI, HWBLK_ADC, HWBLK_TPU, HWBLK_IRDA, HWBLK_TSIF, HWBLK_ICB,
|
||||
HWBLK_SDHI0, HWBLK_SDHI1, HWBLK_KEYSC, HWBLK_USB,
|
||||
HWBLK_2DG, HWBLK_SIU, HWBLK_VEU2H1, HWBLK_VOU, HWBLK_BEU, HWBLK_CEU,
|
||||
HWBLK_VEU2H0, HWBLK_VPU, HWBLK_LCDC,
|
||||
HWBLK_NR,
|
||||
};
|
||||
|
||||
#endif /* __ASM_SH7723_H__ */
|
||||
|
|
|
@ -266,4 +266,21 @@ enum {
|
|||
GPIO_FN_INTC_IRQ1, GPIO_FN_INTC_IRQ0,
|
||||
};
|
||||
|
||||
enum {
|
||||
HWBLK_UNKNOWN = 0,
|
||||
HWBLK_TLB, HWBLK_IC, HWBLK_OC, HWBLK_RSMEM, HWBLK_ILMEM, HWBLK_L2C,
|
||||
HWBLK_FPU, HWBLK_INTC, HWBLK_DMAC0, HWBLK_SHYWAY,
|
||||
HWBLK_HUDI, HWBLK_DBG, HWBLK_UBC,
|
||||
HWBLK_TMU0, HWBLK_CMT, HWBLK_RWDT, HWBLK_DMAC1, HWBLK_TMU1,
|
||||
HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2, HWBLK_SCIF3,
|
||||
HWBLK_SCIF4, HWBLK_SCIF5, HWBLK_MSIOF0, HWBLK_MSIOF1,
|
||||
HWBLK_KEYSC, HWBLK_RTC, HWBLK_IIC0, HWBLK_IIC1,
|
||||
HWBLK_MMC, HWBLK_ETHER, HWBLK_ATAPI, HWBLK_TPU, HWBLK_IRDA,
|
||||
HWBLK_TSIF, HWBLK_USB1, HWBLK_USB0, HWBLK_2DG,
|
||||
HWBLK_SDHI0, HWBLK_SDHI1, HWBLK_VEU1, HWBLK_CEU1, HWBLK_BEU1,
|
||||
HWBLK_2DDMAC, HWBLK_SPU, HWBLK_JPU, HWBLK_VOU,
|
||||
HWBLK_BEU0, HWBLK_CEU0, HWBLK_VEU0, HWBLK_VPU, HWBLK_LCDC,
|
||||
HWBLK_NR,
|
||||
};
|
||||
|
||||
#endif /* __ASM_SH7724_H__ */
|
||||
|
|
243
arch/sh/include/cpu-sh4/cpu/sh7757.h
Normal file
243
arch/sh/include/cpu-sh4/cpu/sh7757.h
Normal file
|
@ -0,0 +1,243 @@
|
|||
#ifndef __ASM_SH7757_H__
|
||||
#define __ASM_SH7757_H__
|
||||
|
||||
enum {
|
||||
/* PTA */
|
||||
GPIO_PTA7, GPIO_PTA6, GPIO_PTA5, GPIO_PTA4,
|
||||
GPIO_PTA3, GPIO_PTA2, GPIO_PTA1, GPIO_PTA0,
|
||||
|
||||
/* PTB */
|
||||
GPIO_PTB7, GPIO_PTB6, GPIO_PTB5, GPIO_PTB4,
|
||||
GPIO_PTB3, GPIO_PTB2, GPIO_PTB1, GPIO_PTB0,
|
||||
|
||||
/* PTC */
|
||||
GPIO_PTC7, GPIO_PTC6, GPIO_PTC5, GPIO_PTC4,
|
||||
GPIO_PTC3, GPIO_PTC2, GPIO_PTC1, GPIO_PTC0,
|
||||
|
||||
/* PTD */
|
||||
GPIO_PTD7, GPIO_PTD6, GPIO_PTD5, GPIO_PTD4,
|
||||
GPIO_PTD3, GPIO_PTD2, GPIO_PTD1, GPIO_PTD0,
|
||||
|
||||
/* PTE */
|
||||
GPIO_PTE7, GPIO_PTE6, GPIO_PTE5, GPIO_PTE4,
|
||||
GPIO_PTE3, GPIO_PTE2, GPIO_PTE1, GPIO_PTE0,
|
||||
|
||||
/* PTF */
|
||||
GPIO_PTF7, GPIO_PTF6, GPIO_PTF5, GPIO_PTF4,
|
||||
GPIO_PTF3, GPIO_PTF2, GPIO_PTF1, GPIO_PTF0,
|
||||
|
||||
/* PTG */
|
||||
GPIO_PTG7, GPIO_PTG6, GPIO_PTG5, GPIO_PTG4,
|
||||
GPIO_PTG3, GPIO_PTG2, GPIO_PTG1, GPIO_PTG0,
|
||||
|
||||
/* PTH */
|
||||
GPIO_PTH7, GPIO_PTH6, GPIO_PTH5, GPIO_PTH4,
|
||||
GPIO_PTH3, GPIO_PTH2, GPIO_PTH1, GPIO_PTH0,
|
||||
|
||||
/* PTI */
|
||||
GPIO_PTI7, GPIO_PTI6, GPIO_PTI5, GPIO_PTI4,
|
||||
GPIO_PTI3, GPIO_PTI2, GPIO_PTI1, GPIO_PTI0,
|
||||
|
||||
/* PTJ */
|
||||
GPIO_PTJ7, GPIO_PTJ6, GPIO_PTJ5, GPIO_PTJ4,
|
||||
GPIO_PTJ3, GPIO_PTJ2, GPIO_PTJ1, GPIO_PTJ0,
|
||||
|
||||
/* PTK */
|
||||
GPIO_PTK7, GPIO_PTK6, GPIO_PTK5, GPIO_PTK4,
|
||||
GPIO_PTK3, GPIO_PTK2, GPIO_PTK1, GPIO_PTK0,
|
||||
|
||||
/* PTL */
|
||||
GPIO_PTL7, GPIO_PTL6, GPIO_PTL5, GPIO_PTL4,
|
||||
GPIO_PTL3, GPIO_PTL2, GPIO_PTL1, GPIO_PTL0,
|
||||
|
||||
/* PTM */
|
||||
GPIO_PTM6, GPIO_PTM5, GPIO_PTM4,
|
||||
GPIO_PTM3, GPIO_PTM2, GPIO_PTM1, GPIO_PTM0,
|
||||
|
||||
/* PTN */
|
||||
GPIO_PTN7, GPIO_PTN6, GPIO_PTN5, GPIO_PTN4,
|
||||
GPIO_PTN3, GPIO_PTN2, GPIO_PTN1, GPIO_PTN0,
|
||||
|
||||
/* PTO */
|
||||
GPIO_PTO7, GPIO_PTO6, GPIO_PTO5, GPIO_PTO4,
|
||||
GPIO_PTO3, GPIO_PTO2, GPIO_PTO1, GPIO_PTO0,
|
||||
|
||||
/* PTP */
|
||||
GPIO_PTP6, GPIO_PTP5, GPIO_PTP4,
|
||||
GPIO_PTP3, GPIO_PTP2, GPIO_PTP1, GPIO_PTP0,
|
||||
|
||||
/* PTQ */
|
||||
GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4,
|
||||
GPIO_PTQ3, GPIO_PTQ2, GPIO_PTQ1, GPIO_PTQ0,
|
||||
|
||||
/* PTR */
|
||||
GPIO_PTR7, GPIO_PTR6, GPIO_PTR5, GPIO_PTR4,
|
||||
GPIO_PTR3, GPIO_PTR2, GPIO_PTR1, GPIO_PTR0,
|
||||
|
||||
/* PTS */
|
||||
GPIO_PTS7, GPIO_PTS6, GPIO_PTS5, GPIO_PTS4,
|
||||
GPIO_PTS3, GPIO_PTS2, GPIO_PTS1, GPIO_PTS0,
|
||||
|
||||
/* PTT */
|
||||
GPIO_PTT5, GPIO_PTT4,
|
||||
GPIO_PTT3, GPIO_PTT2, GPIO_PTT1, GPIO_PTT0,
|
||||
|
||||
/* PTU */
|
||||
GPIO_PTU7, GPIO_PTU6, GPIO_PTU5, GPIO_PTU4,
|
||||
GPIO_PTU3, GPIO_PTU2, GPIO_PTU1, GPIO_PTU0,
|
||||
|
||||
/* PTV */
|
||||
GPIO_PTV7, GPIO_PTV6, GPIO_PTV5, GPIO_PTV4,
|
||||
GPIO_PTV3, GPIO_PTV2, GPIO_PTV1, GPIO_PTV0,
|
||||
|
||||
/* PTW */
|
||||
GPIO_PTW7, GPIO_PTW6, GPIO_PTW5, GPIO_PTW4,
|
||||
GPIO_PTW3, GPIO_PTW2, GPIO_PTW1, GPIO_PTW0,
|
||||
|
||||
/* PTX */
|
||||
GPIO_PTX7, GPIO_PTX6, GPIO_PTX5, GPIO_PTX4,
|
||||
GPIO_PTX3, GPIO_PTX2, GPIO_PTX1, GPIO_PTX0,
|
||||
|
||||
/* PTY */
|
||||
GPIO_PTY7, GPIO_PTY6, GPIO_PTY5, GPIO_PTY4,
|
||||
GPIO_PTY3, GPIO_PTY2, GPIO_PTY1, GPIO_PTY0,
|
||||
|
||||
/* PTZ */
|
||||
GPIO_PTZ7, GPIO_PTZ6, GPIO_PTZ5, GPIO_PTZ4,
|
||||
GPIO_PTZ3, GPIO_PTZ2, GPIO_PTZ1, GPIO_PTZ0,
|
||||
|
||||
|
||||
/* PTA (mobule: LBSC, CPG, LPC) */
|
||||
GPIO_FN_BS, GPIO_FN_RDWR, GPIO_FN_WE1, GPIO_FN_RDY,
|
||||
GPIO_FN_MD10, GPIO_FN_MD9, GPIO_FN_MD8,
|
||||
GPIO_FN_LGPIO7, GPIO_FN_LGPIO6, GPIO_FN_LGPIO5, GPIO_FN_LGPIO4,
|
||||
GPIO_FN_LGPIO3, GPIO_FN_LGPIO2, GPIO_FN_LGPIO1, GPIO_FN_LGPIO0,
|
||||
|
||||
/* PTB (mobule: LBSC, EtherC, SIM, LPC) */
|
||||
GPIO_FN_D15, GPIO_FN_D14, GPIO_FN_D13, GPIO_FN_D12,
|
||||
GPIO_FN_D11, GPIO_FN_D10, GPIO_FN_D9, GPIO_FN_D8,
|
||||
GPIO_FN_ET0_MDC, GPIO_FN_ET0_MDIO,
|
||||
GPIO_FN_ET1_MDC, GPIO_FN_ET1_MDIO,
|
||||
GPIO_FN_SIM_D, GPIO_FN_SIM_CLK, GPIO_FN_SIM_RST,
|
||||
GPIO_FN_WPSZ1, GPIO_FN_WPSZ0, GPIO_FN_FWID, GPIO_FN_FLSHSZ,
|
||||
GPIO_FN_LPC_SPIEN, GPIO_FN_BASEL,
|
||||
|
||||
/* PTC (mobule: SD) */
|
||||
GPIO_FN_SD_WP, GPIO_FN_SD_CD, GPIO_FN_SD_CLK, GPIO_FN_SD_CMD,
|
||||
GPIO_FN_SD_D3, GPIO_FN_SD_D2, GPIO_FN_SD_D1, GPIO_FN_SD_D0,
|
||||
|
||||
/* PTD (mobule: INTC, SPI0, LBSC, CPG, ADC) */
|
||||
GPIO_FN_IRQ7, GPIO_FN_IRQ6, GPIO_FN_IRQ5, GPIO_FN_IRQ4,
|
||||
GPIO_FN_IRQ3, GPIO_FN_IRQ2, GPIO_FN_IRQ1, GPIO_FN_IRQ0,
|
||||
GPIO_FN_MD6, GPIO_FN_MD5, GPIO_FN_MD3, GPIO_FN_MD2,
|
||||
GPIO_FN_MD1, GPIO_FN_MD0, GPIO_FN_ADTRG1, GPIO_FN_ADTRG0,
|
||||
|
||||
/* PTE (mobule: EtherC) */
|
||||
GPIO_FN_ET0_CRS_DV, GPIO_FN_ET0_TXD1,
|
||||
GPIO_FN_ET0_TXD0, GPIO_FN_ET0_TX_EN,
|
||||
GPIO_FN_ET0_REF_CLK, GPIO_FN_ET0_RXD1,
|
||||
GPIO_FN_ET0_RXD0, GPIO_FN_ET0_RX_ER,
|
||||
|
||||
/* PTF (mobule: EtherC) */
|
||||
GPIO_FN_ET1_CRS_DV, GPIO_FN_ET1_TXD1,
|
||||
GPIO_FN_ET1_TXD0, GPIO_FN_ET1_TX_EN,
|
||||
GPIO_FN_ET1_REF_CLK, GPIO_FN_ET1_RXD1,
|
||||
GPIO_FN_ET1_RXD0, GPIO_FN_ET1_RX_ER,
|
||||
|
||||
/* PTG (mobule: SYSTEM, PWMX, LPC) */
|
||||
GPIO_FN_STATUS0, GPIO_FN_STATUS1,
|
||||
GPIO_FN_PWX0, GPIO_FN_PWX1, GPIO_FN_PWX2, GPIO_FN_PWX3,
|
||||
GPIO_FN_SERIRQ, GPIO_FN_CLKRUN, GPIO_FN_LPCPD, GPIO_FN_LDRQ,
|
||||
|
||||
/* PTH (mobule: TMU, SCIF234, SPI1, SPI0) */
|
||||
GPIO_FN_TCLK, GPIO_FN_RXD4, GPIO_FN_TXD4,
|
||||
GPIO_FN_SP1_MOSI, GPIO_FN_SP1_MISO,
|
||||
GPIO_FN_SP1_SCK, GPIO_FN_SP1_SCK_FB,
|
||||
GPIO_FN_SP1_SS0, GPIO_FN_SP1_SS1,
|
||||
GPIO_FN_SP0_SS1,
|
||||
|
||||
/* PTI (mobule: INTC) */
|
||||
GPIO_FN_IRQ15, GPIO_FN_IRQ14, GPIO_FN_IRQ13, GPIO_FN_IRQ12,
|
||||
GPIO_FN_IRQ11, GPIO_FN_IRQ10, GPIO_FN_IRQ9, GPIO_FN_IRQ8,
|
||||
|
||||
/* PTJ (mobule: SCIF234, SERMUX) */
|
||||
GPIO_FN_RXD3, GPIO_FN_TXD3, GPIO_FN_RXD2, GPIO_FN_TXD2,
|
||||
GPIO_FN_COM1_TXD, GPIO_FN_COM1_RXD,
|
||||
GPIO_FN_COM1_RTS, GPIO_FN_COM1_CTS,
|
||||
|
||||
/* PTK (mobule: SERMUX) */
|
||||
GPIO_FN_COM2_TXD, GPIO_FN_COM2_RXD,
|
||||
GPIO_FN_COM2_RTS, GPIO_FN_COM2_CTS,
|
||||
GPIO_FN_COM2_DTR, GPIO_FN_COM2_DSR,
|
||||
GPIO_FN_COM2_DCD, GPIO_FN_COM2_RI,
|
||||
|
||||
/* PTL (mobule: SERMUX) */
|
||||
GPIO_FN_RAC_TXD, GPIO_FN_RAC_RXD,
|
||||
GPIO_FN_RAC_RTS, GPIO_FN_RAC_CTS,
|
||||
GPIO_FN_RAC_DTR, GPIO_FN_RAC_DSR,
|
||||
GPIO_FN_RAC_DCD, GPIO_FN_RAC_RI,
|
||||
|
||||
/* PTM (mobule: IIC, LPC) */
|
||||
GPIO_FN_SDA6, GPIO_FN_SCL6, GPIO_FN_SDA7, GPIO_FN_SCL7,
|
||||
GPIO_FN_WP, GPIO_FN_FMS0, GPIO_FN_FMS1,
|
||||
|
||||
/* PTN (mobule: SCIF234, EVC) */
|
||||
GPIO_FN_SCK2, GPIO_FN_RTS4, GPIO_FN_RTS3, GPIO_FN_RTS2,
|
||||
GPIO_FN_CTS4, GPIO_FN_CTS3, GPIO_FN_CTS2,
|
||||
GPIO_FN_EVENT7, GPIO_FN_EVENT6, GPIO_FN_EVENT5, GPIO_FN_EVENT4,
|
||||
GPIO_FN_EVENT3, GPIO_FN_EVENT2, GPIO_FN_EVENT1, GPIO_FN_EVENT0,
|
||||
|
||||
/* PTO (mobule: SGPIO) */
|
||||
GPIO_FN_SGPIO0_CLK, GPIO_FN_SGPIO0_LOAD,
|
||||
GPIO_FN_SGPIO0_DI, GPIO_FN_SGPIO0_DO,
|
||||
GPIO_FN_SGPIO1_CLK, GPIO_FN_SGPIO1_LOAD,
|
||||
GPIO_FN_SGPIO1_DI, GPIO_FN_SGPIO1_DO,
|
||||
|
||||
/* PTP (mobule: JMC, SCIF234) */
|
||||
GPIO_FN_JMCTCK, GPIO_FN_JMCTMS, GPIO_FN_JMCTDO, GPIO_FN_JMCTDI,
|
||||
GPIO_FN_JMCRST, GPIO_FN_SCK4, GPIO_FN_SCK3,
|
||||
|
||||
/* PTQ (mobule: LPC) */
|
||||
GPIO_FN_LAD3, GPIO_FN_LAD2, GPIO_FN_LAD1, GPIO_FN_LAD0,
|
||||
GPIO_FN_LFRAME, GPIO_FN_LRESET, GPIO_FN_LCLK,
|
||||
|
||||
/* PTR (mobule: GRA, IIC) */
|
||||
GPIO_FN_DDC3, GPIO_FN_DDC2,
|
||||
GPIO_FN_SDA8, GPIO_FN_SCL8, GPIO_FN_SDA2, GPIO_FN_SCL2,
|
||||
GPIO_FN_SDA1, GPIO_FN_SCL1, GPIO_FN_SDA0, GPIO_FN_SCL0,
|
||||
|
||||
/* PTS (mobule: GRA, IIC) */
|
||||
GPIO_FN_DDC1, GPIO_FN_DDC0,
|
||||
GPIO_FN_SDA9, GPIO_FN_SCL9, GPIO_FN_SDA5, GPIO_FN_SCL5,
|
||||
GPIO_FN_SDA4, GPIO_FN_SCL4, GPIO_FN_SDA3, GPIO_FN_SCL3,
|
||||
|
||||
/* PTT (mobule: SYSTEM, PWMX) */
|
||||
GPIO_FN_AUDSYNC, GPIO_FN_AUDCK,
|
||||
GPIO_FN_AUDATA3, GPIO_FN_AUDATA2,
|
||||
GPIO_FN_AUDATA1, GPIO_FN_AUDATA0,
|
||||
GPIO_FN_PWX7, GPIO_FN_PWX6, GPIO_FN_PWX5, GPIO_FN_PWX4,
|
||||
|
||||
/* PTU (mobule: LBSC, DMAC) */
|
||||
GPIO_FN_CS6, GPIO_FN_CS5, GPIO_FN_CS4, GPIO_FN_CS0,
|
||||
GPIO_FN_RD, GPIO_FN_WE0, GPIO_FN_A25, GPIO_FN_A24,
|
||||
GPIO_FN_DREQ0, GPIO_FN_DACK0,
|
||||
|
||||
/* PTV (mobule: LBSC, DMAC) */
|
||||
GPIO_FN_A23, GPIO_FN_A22, GPIO_FN_A21, GPIO_FN_A20,
|
||||
GPIO_FN_A19, GPIO_FN_A18, GPIO_FN_A17, GPIO_FN_A16,
|
||||
GPIO_FN_TEND0, GPIO_FN_DREQ1, GPIO_FN_DACK1, GPIO_FN_TEND1,
|
||||
|
||||
/* PTW (mobule: LBSC) */
|
||||
GPIO_FN_A15, GPIO_FN_A14, GPIO_FN_A13, GPIO_FN_A12,
|
||||
GPIO_FN_A11, GPIO_FN_A10, GPIO_FN_A9, GPIO_FN_A8,
|
||||
|
||||
/* PTX (mobule: LBSC) */
|
||||
GPIO_FN_A7, GPIO_FN_A6, GPIO_FN_A5, GPIO_FN_A4,
|
||||
GPIO_FN_A3, GPIO_FN_A2, GPIO_FN_A1, GPIO_FN_A0,
|
||||
|
||||
/* PTY (mobule: LBSC) */
|
||||
GPIO_FN_D7, GPIO_FN_D6, GPIO_FN_D5, GPIO_FN_D4,
|
||||
GPIO_FN_D3, GPIO_FN_D2, GPIO_FN_D1, GPIO_FN_D0,
|
||||
};
|
||||
|
||||
#endif /* __ASM_SH7757_H__ */
|
|
@ -1,33 +0,0 @@
|
|||
#ifndef __ASM_SH_CPU_SH5_CACHEFLUSH_H
|
||||
#define __ASM_SH_CPU_SH5_CACHEFLUSH_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
struct vm_area_struct;
|
||||
struct page;
|
||||
struct mm_struct;
|
||||
|
||||
extern void flush_cache_all(void);
|
||||
extern void flush_cache_mm(struct mm_struct *mm);
|
||||
extern void flush_cache_sigtramp(unsigned long vaddr);
|
||||
extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
|
||||
unsigned long end);
|
||||
extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn);
|
||||
extern void flush_dcache_page(struct page *pg);
|
||||
extern void flush_icache_range(unsigned long start, unsigned long end);
|
||||
extern void flush_icache_user_range(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long addr,
|
||||
int len);
|
||||
|
||||
#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
|
||||
|
||||
#define flush_dcache_mmap_lock(mapping) do { } while (0)
|
||||
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
|
||||
|
||||
#define flush_icache_page(vma, page) do { } while (0)
|
||||
void p3_cache_init(void);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __ASM_SH_CPU_SH5_CACHEFLUSH_H */
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
#ifndef __ASM_SH_MIGOR_H
|
||||
#define __ASM_SH_MIGOR_H
|
||||
|
||||
/*
|
||||
* linux/include/asm-sh/migor.h
|
||||
*
|
||||
* Copyright (C) 2008 Renesas Solutions
|
||||
*
|
||||
* Portions 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 <asm/addrspace.h>
|
||||
|
||||
/* GPIO */
|
||||
#define PORT_PACR 0xa4050100
|
||||
#define PORT_PDCR 0xa4050106
|
||||
#define PORT_PECR 0xa4050108
|
||||
#define PORT_PHCR 0xa405010e
|
||||
#define PORT_PJCR 0xa4050110
|
||||
#define PORT_PKCR 0xa4050112
|
||||
#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
|
||||
#define PORT_HIZCRC 0xa405015c
|
||||
|
||||
#define PORT_MSELCRB 0xa4050182
|
||||
|
||||
#define PORT_PSELA 0xa405014e
|
||||
#define PORT_PSELB 0xa4050150
|
||||
#define PORT_PSELC 0xa4050152
|
||||
#define PORT_PSELD 0xa4050154
|
||||
#define PORT_PSELE 0xa4050156
|
||||
|
||||
#define PORT_HIZCRA 0xa4050158
|
||||
#define PORT_HIZCRB 0xa405015a
|
||||
#define PORT_HIZCRC 0xa405015c
|
||||
|
||||
#define BSC_CS4BCR 0xfec10010
|
||||
#define BSC_CS6ABCR 0xfec1001c
|
||||
#define BSC_CS4WCR 0xfec10030
|
||||
|
||||
#include <video/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 */
|
1
arch/sh/include/mach-common/mach/romimage.h
Normal file
1
arch/sh/include/mach-common/mach/romimage.h
Normal file
|
@ -0,0 +1 @@
|
|||
/* do nothing here by default */
|
|
@ -35,6 +35,8 @@
|
|||
#define PCA9564_ADDR 0x06000000 /* I2C */
|
||||
#define PCA9564_SIZE 0x00000100
|
||||
|
||||
#define PCA9564_PROTO_32BIT_ADDR 0x14000000
|
||||
|
||||
#define SM107_MEM_ADDR 0x10000000
|
||||
#define SM107_MEM_SIZE 0x00e00000
|
||||
#define SM107_REG_ADDR 0x13e00000
|
||||
|
|
82
arch/sh/include/mach-ecovec24/mach/partner-jet-setup.txt
Normal file
82
arch/sh/include/mach-ecovec24/mach/partner-jet-setup.txt
Normal file
|
@ -0,0 +1,82 @@
|
|||
LIST "partner-jet-setup.txt"
|
||||
LIST "(C) Copyright 2009 Renesas Solutions Corp"
|
||||
LIST "Kuninori Morimoto <morimoto.kuninori@renesas.com>"
|
||||
LIST "--------------------------------"
|
||||
LIST "zImage (RAM boot)"
|
||||
LIST "This script can be used to boot the kernel from RAM via JTAG:"
|
||||
LIST "> < partner-jet-setup.txt"
|
||||
LIST "> RD zImage, 0xa8800000"
|
||||
LIST "> G=0xa8800000"
|
||||
LIST "--------------------------------"
|
||||
LIST "romImage (Flash boot)"
|
||||
LIST "Use the following command to burn the zImage to flash via JTAG:"
|
||||
LIST "> RD romImage, 0"
|
||||
LIST "--------------------------------"
|
||||
|
||||
LIST "disable watchdog"
|
||||
EW 0xa4520004, 0xa507
|
||||
|
||||
LIST "MMU"
|
||||
ED 0xff000010, 0x00000004
|
||||
|
||||
LIST "setup clocks"
|
||||
ED 0xa4150024, 0x00004000
|
||||
ED 0xa4150000, 0x8E003508
|
||||
ED 0xa4150004, 0x00000000
|
||||
|
||||
WAIT 1
|
||||
|
||||
LIST "BSC"
|
||||
ED 0xff800020, 0xa5a50000
|
||||
ED 0xfec10000, 0x00000013
|
||||
ED 0xfec10004, 0x11110400
|
||||
ED 0xfec10024, 0x00000440
|
||||
|
||||
WAIT 1
|
||||
|
||||
LIST "setup sdram"
|
||||
ED 0xfd000108, 0x00000181
|
||||
ED 0xfd000020, 0x015B0002
|
||||
ED 0xfd000030, 0x03061502
|
||||
ED 0xfd000034, 0x02020102
|
||||
ED 0xfd000038, 0x01090305
|
||||
ED 0xfd00003c, 0x00000002
|
||||
ED 0xfd000008, 0x00000005
|
||||
ED 0xfd000018, 0x00000001
|
||||
|
||||
WAIT 1
|
||||
|
||||
ED 0xfd000014, 0x00000002
|
||||
ED 0xfd000060, 0x00020000
|
||||
ED 0xfd000060, 0x00030000
|
||||
ED 0xfd000060, 0x00010040
|
||||
ED 0xfd000060, 0x00000532
|
||||
ED 0xfd000014, 0x00000002
|
||||
ED 0xfd000014, 0x00000004
|
||||
ED 0xfd000014, 0x00000004
|
||||
ED 0xfd000060, 0x00000432
|
||||
ED 0xfd000060, 0x000103C0
|
||||
ED 0xfd000060, 0x00010040
|
||||
|
||||
WAIT 1
|
||||
|
||||
ED 0xfd000010, 0x00000001
|
||||
ED 0xfd000044, 0x00000613
|
||||
ED 0xfd000048, 0x238C003A
|
||||
ED 0xfd000014, 0x00000002
|
||||
|
||||
LIST "Dummy read"
|
||||
DD 0x0c400000, 0x0c400000
|
||||
|
||||
ED 0xfd000014, 0x00000002
|
||||
ED 0xfd000014, 0x00000004
|
||||
ED 0xfd000108, 0x00000080
|
||||
ED 0xfd000040, 0x00010000
|
||||
|
||||
WAIT 1
|
||||
|
||||
LIST "setup cache"
|
||||
ED 0xff00001c, 0x0000090b
|
||||
|
||||
LIST "disable USB"
|
||||
EW 0xA4D80000, 0x0000
|
20
arch/sh/include/mach-ecovec24/mach/romimage.h
Normal file
20
arch/sh/include/mach-ecovec24/mach/romimage.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* EcoVec board specific boot code:
|
||||
* converts the "partner-jet-script.txt" script into assembly
|
||||
* the assembly code is the first code to be executed in the romImage
|
||||
*/
|
||||
|
||||
#include <asm/romimage-macros.h>
|
||||
#include "partner-jet-setup.txt"
|
||||
|
||||
/* execute icbi after enabling cache */
|
||||
mov.l 1f, r0
|
||||
icbi @r0
|
||||
|
||||
/* jump to cached area */
|
||||
mova 2f, r0
|
||||
jmp @r0
|
||||
nop
|
||||
|
||||
.align 2
|
||||
1 : .long 0xa8000000
|
||||
2 :
|
21
arch/sh/include/mach-kfr2r09/mach/kfr2r09.h
Normal file
21
arch/sh/include/mach-kfr2r09/mach/kfr2r09.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef __ASM_SH_KFR2R09_H
|
||||
#define __ASM_SH_KFR2R09_H
|
||||
|
||||
#include <video/sh_mobile_lcdc.h>
|
||||
|
||||
#ifdef CONFIG_FB_SH_MOBILE_LCDC
|
||||
void kfr2r09_lcd_on(void *board_data);
|
||||
void kfr2r09_lcd_off(void *board_data);
|
||||
int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
|
||||
#else
|
||||
static inline void kfr2r09_lcd_on(void *board_data) {}
|
||||
static inline void kfr2r09_lcd_off(void *board_data) {}
|
||||
static inline int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle,
|
||||
struct sh_mobile_lcdc_sys_bus_ops *sys_ops)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_SH_KFR2R09_H */
|
143
arch/sh/include/mach-kfr2r09/mach/partner-jet-setup.txt
Normal file
143
arch/sh/include/mach-kfr2r09/mach/partner-jet-setup.txt
Normal file
|
@ -0,0 +1,143 @@
|
|||
LIST "partner-jet-setup.txt - 20090729 Magnus Damm"
|
||||
LIST "set up enough of the kfr2r09 hardware to boot the kernel"
|
||||
|
||||
LIST "zImage (RAM boot)"
|
||||
LIST "This script can be used to boot the kernel from RAM via JTAG:"
|
||||
LIST "> < partner-jet-setup.txt"
|
||||
LIST "> RD zImage, 0xa8800000"
|
||||
LIST "> G=0xa8800000"
|
||||
|
||||
LIST "romImage (Flash boot)"
|
||||
LIST "Use the following command to burn the zImage to flash via JTAG:"
|
||||
LIST "> RD romImage, 0"
|
||||
|
||||
LIST "--------------------------------"
|
||||
|
||||
LIST "disable watchdog"
|
||||
EW 0xa4520004, 0xa507
|
||||
|
||||
LIST "invalidate instruction cache"
|
||||
ED 0xff00001c, 0x00000800
|
||||
|
||||
LIST "invalidate TLBs"
|
||||
ED 0xff000010, 0x00000004
|
||||
|
||||
LIST "select mode for cs5 + cs6"
|
||||
ED 0xff800020, 0xa5a50001
|
||||
ED 0xfec10000, 0x0000001b
|
||||
|
||||
LIST "setup clocks"
|
||||
LIST "The PLL and FLL values are updated here for the optimal"
|
||||
LIST "RF frequency and improved reception sensitivity."
|
||||
ED 0xa4150004, 0x00000050
|
||||
ED 0xa4150000, 0x91053508
|
||||
WAIT 1
|
||||
ED 0xa4150050, 0x00000340
|
||||
ED 0xa4150024, 0x00005000
|
||||
|
||||
LIST "setup pins"
|
||||
EB 0xa4050120, 0x00
|
||||
EB 0xa4050122, 0x00
|
||||
EB 0xa4050124, 0x00
|
||||
EB 0xa4050126, 0x00
|
||||
EB 0xa4050128, 0xA0
|
||||
EB 0xa405012A, 0x10
|
||||
EB 0xa405012C, 0x00
|
||||
EB 0xa405012E, 0x00
|
||||
EB 0xa4050130, 0x00
|
||||
EB 0xa4050132, 0x00
|
||||
EB 0xa4050134, 0x01
|
||||
EB 0xa4050136, 0x40
|
||||
EB 0xa4050138, 0x00
|
||||
EB 0xa405013A, 0x00
|
||||
EB 0xa405013C, 0x00
|
||||
EB 0xa405013E, 0x20
|
||||
EB 0xa4050160, 0x00
|
||||
EB 0xa4050162, 0x40
|
||||
EB 0xa4050164, 0x03
|
||||
EB 0xa4050166, 0x00
|
||||
EB 0xa4050168, 0x00
|
||||
EB 0xa405016A, 0x00
|
||||
EB 0xa405016C, 0x00
|
||||
|
||||
EW 0xa405014E, 0x5660
|
||||
EW 0xa4050150, 0x0145
|
||||
EW 0xa4050152, 0x1550
|
||||
EW 0xa4050154, 0x0200
|
||||
EW 0xa4050156, 0x0040
|
||||
|
||||
EW 0xa4050158, 0x0000
|
||||
EW 0xa405015a, 0x0000
|
||||
EW 0xa405015c, 0x0000
|
||||
EW 0xa405015e, 0x0000
|
||||
|
||||
EW 0xa4050180, 0x0000
|
||||
EW 0xa4050182, 0x8002
|
||||
EW 0xa4050184, 0x0000
|
||||
|
||||
EW 0xa405018a, 0x9991
|
||||
EW 0xa405018c, 0x8011
|
||||
EW 0xa405018e, 0x9550
|
||||
|
||||
EW 0xa4050100, 0x0000
|
||||
EW 0xa4050102, 0x5540
|
||||
EW 0xa4050104, 0x0000
|
||||
EW 0xa4050106, 0x0000
|
||||
EW 0xa4050108, 0x4550
|
||||
EW 0xa405010a, 0x0130
|
||||
EW 0xa405010c, 0x0555
|
||||
EW 0xa405010e, 0x0000
|
||||
EW 0xa4050110, 0x0000
|
||||
EW 0xa4050112, 0xAAA8
|
||||
EW 0xa4050114, 0x8305
|
||||
EW 0xa4050116, 0x10F0
|
||||
EW 0xa4050118, 0x0F50
|
||||
EW 0xa405011a, 0x0000
|
||||
EW 0xa405011c, 0x0000
|
||||
EW 0xa405011e, 0x0555
|
||||
EW 0xa4050140, 0x0000
|
||||
EW 0xa4050142, 0x5141
|
||||
EW 0xa4050144, 0x5005
|
||||
EW 0xa4050146, 0xAAA9
|
||||
EW 0xa4050148, 0xFAA9
|
||||
EW 0xa405014a, 0x3000
|
||||
EW 0xa405014c, 0x0000
|
||||
|
||||
LIST "setup sdram"
|
||||
ED 0xFD000108, 0x40000301
|
||||
ED 0xFD000020, 0x011B0002
|
||||
ED 0xFD000030, 0x03060E02
|
||||
ED 0xFD000034, 0x01020102
|
||||
ED 0xFD000038, 0x01090406
|
||||
ED 0xFD000008, 0x00000004
|
||||
ED 0xFD000040, 0x00000001
|
||||
ED 0xFD000040, 0x00000000
|
||||
ED 0xFD000018, 0x00000001
|
||||
|
||||
WAIT 1
|
||||
|
||||
ED 0xFD000014, 0x00000002
|
||||
ED 0xFD000060, 0x00000032
|
||||
ED 0xFD000060, 0x00020000
|
||||
ED 0xFD000014, 0x00000004
|
||||
ED 0xFD000014, 0x00000004
|
||||
ED 0xFD000010, 0x00000001
|
||||
ED 0xFD000044, 0x000004AF
|
||||
ED 0xFD000048, 0x20CF0037
|
||||
|
||||
LIST "read 16 bytes from sdram"
|
||||
DD 0xa8000000, 0xa8000000, 1
|
||||
DD 0xa8000004, 0xa8000004, 1
|
||||
DD 0xa8000008, 0xa8000008, 1
|
||||
DD 0xa800000c, 0xa800000c, 1
|
||||
|
||||
ED 0xFD000014, 0x00000002
|
||||
ED 0xFD000014, 0x00000004
|
||||
ED 0xFD000108, 0x40000300
|
||||
ED 0xFD000040, 0x00010000
|
||||
|
||||
LIST "write to internal ram"
|
||||
ED 0xfd8007fc, 0
|
||||
|
||||
LIST "setup cache"
|
||||
ED 0xff00001c, 0x0000090b
|
20
arch/sh/include/mach-kfr2r09/mach/romimage.h
Normal file
20
arch/sh/include/mach-kfr2r09/mach/romimage.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* kfr2r09 board specific boot code:
|
||||
* converts the "partner-jet-script.txt" script into assembly
|
||||
* the assembly code is the first code to be executed in the romImage
|
||||
*/
|
||||
|
||||
#include <asm/romimage-macros.h>
|
||||
#include "partner-jet-setup.txt"
|
||||
|
||||
/* execute icbi after enabling cache */
|
||||
mov.l 1f, r0
|
||||
icbi @r0
|
||||
|
||||
/* jump to cached area */
|
||||
mova 2f, r0
|
||||
jmp @r0
|
||||
nop
|
||||
|
||||
.align 2
|
||||
1: .long 0xa8000000
|
||||
2:
|
14
arch/sh/include/mach-migor/mach/migor.h
Normal file
14
arch/sh/include/mach-migor/mach/migor.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef __ASM_SH_MIGOR_H
|
||||
#define __ASM_SH_MIGOR_H
|
||||
|
||||
#define PORT_MSELCRB 0xa4050182
|
||||
#define BSC_CS4BCR 0xfec10010
|
||||
#define BSC_CS6ABCR 0xfec1001c
|
||||
#define BSC_CS4WCR 0xfec10030
|
||||
|
||||
#include <video/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 */
|
|
@ -1,5 +1,41 @@
|
|||
ifeq ($(CONFIG_SUPERH32),y)
|
||||
include ${srctree}/arch/sh/kernel/Makefile_32
|
||||
else
|
||||
include ${srctree}/arch/sh/kernel/Makefile_64
|
||||
#
|
||||
# Makefile for the Linux/SuperH kernel.
|
||||
#
|
||||
|
||||
extra-y := head_$(BITS).o init_task.o vmlinux.lds
|
||||
|
||||
ifdef CONFIG_FUNCTION_TRACER
|
||||
# Do not profile debug and lowlevel utilities
|
||||
CFLAGS_REMOVE_ftrace.o = -pg
|
||||
endif
|
||||
|
||||
obj-y := debugtraps.o dumpstack.o idle.o io.o io_generic.o irq.o \
|
||||
machvec.o nmi_debug.o process_$(BITS).o ptrace_$(BITS).o \
|
||||
setup.o signal_$(BITS).o sys_sh.o sys_sh$(BITS).o \
|
||||
syscalls_$(BITS).o time.o topology.o traps.o \
|
||||
traps_$(BITS).o unwinder.o
|
||||
|
||||
obj-y += cpu/
|
||||
obj-$(CONFIG_VSYSCALL) += vsyscall/
|
||||
obj-$(CONFIG_SMP) += smp.o
|
||||
obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o
|
||||
obj-$(CONFIG_KGDB) += kgdb.o
|
||||
obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o
|
||||
obj-$(CONFIG_MODULES) += sh_ksyms_$(BITS).o module.o
|
||||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
||||
obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
|
||||
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
|
||||
obj-$(CONFIG_STACKTRACE) += stacktrace.o
|
||||
obj-$(CONFIG_IO_TRAPPED) += io_trapped.o
|
||||
obj-$(CONFIG_KPROBES) += kprobes.o
|
||||
obj-$(CONFIG_GENERIC_GPIO) += gpio.o
|
||||
obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
|
||||
obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o
|
||||
obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
|
||||
obj-$(CONFIG_DUMP_CODE) += disassemble.o
|
||||
obj-$(CONFIG_HIBERNATION) += swsusp.o
|
||||
obj-$(CONFIG_DWARF_UNWINDER) += dwarf.o
|
||||
|
||||
obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += localtimer.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
#
|
||||
# Makefile for the Linux/SuperH kernel.
|
||||
#
|
||||
|
||||
extra-y := head_32.o init_task.o vmlinux.lds
|
||||
|
||||
ifdef CONFIG_FUNCTION_TRACER
|
||||
# Do not profile debug and lowlevel utilities
|
||||
CFLAGS_REMOVE_ftrace.o = -pg
|
||||
endif
|
||||
|
||||
obj-y := debugtraps.o idle.o io.o io_generic.o irq.o \
|
||||
machvec.o process_32.o ptrace_32.o setup.o signal_32.o \
|
||||
sys_sh.o sys_sh32.o syscalls_32.o time.o topology.o \
|
||||
traps.o traps_32.o
|
||||
|
||||
obj-y += cpu/
|
||||
obj-$(CONFIG_VSYSCALL) += vsyscall/
|
||||
obj-$(CONFIG_SMP) += smp.o
|
||||
obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o
|
||||
obj-$(CONFIG_KGDB) += kgdb.o
|
||||
obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o
|
||||
obj-$(CONFIG_MODULES) += sh_ksyms_32.o module.o
|
||||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
||||
obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
|
||||
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
|
||||
obj-$(CONFIG_STACKTRACE) += stacktrace.o
|
||||
obj-$(CONFIG_IO_TRAPPED) += io_trapped.o
|
||||
obj-$(CONFIG_KPROBES) += kprobes.o
|
||||
obj-$(CONFIG_GENERIC_GPIO) += gpio.o
|
||||
obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
|
||||
obj-$(CONFIG_DUMP_CODE) += disassemble.o
|
||||
obj-$(CONFIG_HIBERNATION) += swsusp.o
|
||||
|
||||
obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += localtimer.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
|
@ -1,19 +0,0 @@
|
|||
extra-y := head_64.o init_task.o vmlinux.lds
|
||||
|
||||
obj-y := debugtraps.o idle.o io.o io_generic.o irq.o machvec.o process_64.o \
|
||||
ptrace_64.o setup.o signal_64.o sys_sh.o sys_sh64.o \
|
||||
syscalls_64.o time.o topology.o traps.o traps_64.o
|
||||
|
||||
obj-y += cpu/
|
||||
obj-$(CONFIG_SMP) += smp.o
|
||||
obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o
|
||||
obj-$(CONFIG_MODULES) += sh_ksyms_64.o module.o
|
||||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
||||
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
|
||||
obj-$(CONFIG_STACKTRACE) += stacktrace.o
|
||||
obj-$(CONFIG_IO_TRAPPED) += io_trapped.o
|
||||
obj-$(CONFIG_GENERIC_GPIO) += gpio.o
|
||||
|
||||
obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += localtimer.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue