Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9109a30e authored by Magnus Damm's avatar Magnus Damm Committed by Paul Mundt
Browse files

sh: add support for sh7366 processor



This patch adds sh7366 cpu supports. Just the most basic things like interrupt
controller, clocks and serial port are included at this point.

Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent d847afe7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -315,6 +315,13 @@ config CPU_SUBTYPE_SH7722
	select ARCH_SPARSEMEM_ENABLE
	select SYS_SUPPORTS_NUMA

config CPU_SUBTYPE_SH7366
	bool "Support SH7366 processor"
	select CPU_SH4AL_DSP
	select CPU_SHX2
	select ARCH_SPARSEMEM_ENABLE
	select SYS_SUPPORTS_NUMA

# SH-5 Processor Support

config CPU_SUBTYPE_SH5_101
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ config EARLY_SCIF_CONSOLE_PORT
	hex
	depends on EARLY_SCIF_CONSOLE
 	default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763
 	default "0xffe00000" if CPU_SUBTYPE_SH7722
 	default "0xffe00000" if CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366
	default "0xffea0000" if CPU_SUBTYPE_SH7785
	default "0xfffe8000" if CPU_SUBTYPE_SH7203
	default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263
+6 −0
Original line number Diff line number Diff line
@@ -132,6 +132,12 @@ int __init detect_cpu_and_cache_system(void)
			boot_cpu_data.dcache.ways = 4;
			boot_cpu_data.flags |= CPU_HAS_LLSC;
		}
		else if (prr == 0x70) {
			boot_cpu_data.type = CPU_SH7366;
			boot_cpu_data.icache.ways = 4;
			boot_cpu_data.dcache.ways = 4;
			boot_cpu_data.flags |= CPU_HAS_LLSC;
		}
		break;
	case 0x4000:	/* 1st cut */
	case 0x4001:	/* 2nd cut */
+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o
obj-$(CONFIG_CPU_SUBTYPE_SH7785)	+= setup-sh7785.o
obj-$(CONFIG_CPU_SUBTYPE_SH7343)	+= setup-sh7343.o
obj-$(CONFIG_CPU_SUBTYPE_SH7722)	+= setup-sh7722.o
obj-$(CONFIG_CPU_SUBTYPE_SH7366)	+= setup-sh7366.o
obj-$(CONFIG_CPU_SUBTYPE_SHX3)		+= setup-shx3.o

# SMP setup
@@ -21,6 +22,7 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o
clock-$(CONFIG_CPU_SUBTYPE_SH7785)	:= clock-sh7785.o
clock-$(CONFIG_CPU_SUBTYPE_SH7343)	:= clock-sh7343.o
clock-$(CONFIG_CPU_SUBTYPE_SH7722)	:= clock-sh7722.o
clock-$(CONFIG_CPU_SUBTYPE_SH7366)	:= clock-sh7722.o
clock-$(CONFIG_CPU_SUBTYPE_SHX3)	:= clock-shx3.o

obj-y			+= $(clock-y)
+9 −1
Original line number Diff line number Diff line
/*
 * arch/sh/kernel/cpu/sh4a/clock-sh7722.c
 *
 * SH7722 support for the clock framework
 * SH7722 & SH7366 support for the clock framework
 *
 * Copyright (c) 2006-2007 Nomad Global Solutions Inc
 * Based on code for sh7343 by Paul Mundt
@@ -417,15 +417,19 @@ static int sh7722_siu_which(struct clk *clk)
		return 0;
	if (!strcmp(clk->name, "siu_b_clk"))
		return 1;
#if defined(CONFIG_CPU_SUBTYPE_SH7722)
	if (!strcmp(clk->name, "irda_clk"))
		return 2;
#endif
	return -EINVAL;
}

static unsigned long sh7722_siu_regs[] = {
	[0] = SCLKACR,
	[1] = SCLKBCR,
#if defined(CONFIG_CPU_SUBTYPE_SH7722)
	[2] = IrDACLKCR,
#endif
};

static int sh7722_siu_start_stop(struct clk *clk, int enable)
@@ -571,10 +575,12 @@ static struct clk sh7722_siu_b_clock = {
	.ops = &sh7722_siu_clk_ops,
};

#if defined(CONFIG_CPU_SUBTYPE_SH7722)
static struct clk sh7722_irda_clock = {
	.name = "irda_clk",
	.ops = &sh7722_siu_clk_ops,
};
#endif

static struct clk sh7722_video_clock = {
	.name = "video_clk",
@@ -588,7 +594,9 @@ static struct clk *sh7722_clocks[] = {
	&sh7722_sdram_clock,
	&sh7722_siu_a_clock,
	&sh7722_siu_b_clock,
#if defined(CONFIG_CPU_SUBTYPE_SH7722)
	&sh7722_irda_clock,
#endif
	&sh7722_video_clock,
};

Loading