···158158159159# SH-2A Processor Support160160161161+config CPU_SUBTYPE_SH7203162162+ bool "Support SH7203 processor"163163+ select CPU_SH2A164164+161165config CPU_SUBTYPE_SH7206162166 bool "Support SH7206 processor"163167 select CPU_SH2A···560556 default "32000000" if CPU_SUBTYPE_SH7722561557 default "33333333" if CPU_SUBTYPE_SH7770 || \562558 CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \563563- CPU_SUBTYPE_SH7206559559+ CPU_SUBTYPE_SH7203 || CPU_SUBTYPE_SH7206564560 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R565561 default "66000000" if CPU_SUBTYPE_SH4_202566562 default "50000000"···571567572568config SH_CLK_MD573569 int "CPU Mode Pin Setting"574574- depends on CPU_SUBTYPE_SH7619 || CPU_SUBTYPE_SH7206570570+ depends on CPU_SH2575571 default 6 if CPU_SUBTYPE_SH7206576572 default 5 if CPU_SUBTYPE_SH7619577573 default 0
+1
arch/sh/Kconfig.debug
···3232 depends on EARLY_SCIF_CONSOLE3333 default "0xffe00000" if CPU_SUBTYPE_SH77803434 default "0xffea0000" if CPU_SUBTYPE_SH77853535+ default "0xfffe8000" if CPU_SUBTYPE_SH72033536 default "0xfffe9800" if CPU_SUBTYPE_SH72063637 default "0xf8420000" if CPU_SUBTYPE_SH76193738 default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705
···11+/*22+ * arch/sh/kernel/cpu/sh2a/clock-sh7203.c33+ *44+ * SH7203 support for the clock framework55+ *66+ * Copyright (C) 2007 Kieran Bingham (MPC-Data Ltd)77+ *88+ * Based on clock-sh7263.c99+ * Copyright (C) 2006 Yoshinori Sato1010+ *1111+ * Based on clock-sh4.c1212+ * Copyright (C) 2005 Paul Mundt1313+ *1414+ * This file is subject to the terms and conditions of the GNU General Public1515+ * License. See the file "COPYING" in the main directory of this archive1616+ * for more details.1717+ */1818+#include <linux/init.h>1919+#include <linux/kernel.h>2020+#include <asm/clock.h>2121+#include <asm/freq.h>2222+#include <asm/io.h>2323+2424+const static int pll1rate[]={8,12,16,0};2525+const static int pfc_divisors[]={1,2,3,4,6,8,12};2626+#define ifc_divisors pfc_divisors2727+2828+#if (CONFIG_SH_CLK_MD == 0)2929+#define PLL2 (1)3030+#elif (CONFIG_SH_CLK_MD == 1)3131+#define PLL2 (2)3232+#elif (CONFIG_SH_CLK_MD == 2)3333+#define PLL2 (4)3434+#elif (CONFIG_SH_CLK_MD == 3)3535+#define PLL2 (4)3636+#else3737+#error "Illegal Clock Mode!"3838+#endif3939+4040+static void master_clk_init(struct clk *clk)4141+{4242+ clk->rate *= pll1rate[(ctrl_inw(FREQCR) >> 8) & 0x0003] * PLL2 ;4343+}4444+4545+static struct clk_ops sh7203_master_clk_ops = {4646+ .init = master_clk_init,4747+};4848+4949+static void module_clk_recalc(struct clk *clk)5050+{5151+ int idx = (ctrl_inw(FREQCR) & 0x0007);5252+ clk->rate = clk->parent->rate / pfc_divisors[idx];5353+}5454+5555+static struct clk_ops sh7203_module_clk_ops = {5656+ .recalc = module_clk_recalc,5757+};5858+5959+static void bus_clk_recalc(struct clk *clk)6060+{6161+ int idx = (ctrl_inw(FREQCR) & 0x0007);6262+ clk->rate = clk->parent->rate / pfc_divisors[idx-2];6363+}6464+6565+static struct clk_ops sh7203_bus_clk_ops = {6666+ .recalc = bus_clk_recalc,6767+};6868+6969+static void cpu_clk_recalc(struct clk *clk)7070+{7171+ clk->rate = clk->parent->rate;7272+}7373+7474+static struct clk_ops sh7203_cpu_clk_ops = {7575+ .recalc = cpu_clk_recalc,7676+};7777+7878+static struct clk_ops *sh7203_clk_ops[] = {7979+ &sh7203_master_clk_ops,8080+ &sh7203_module_clk_ops,8181+ &sh7203_bus_clk_ops,8282+ &sh7203_cpu_clk_ops,8383+};8484+8585+void __init arch_init_clk_ops(struct clk_ops **ops, int idx)8686+{8787+ if (idx < ARRAY_SIZE(sh7203_clk_ops))8888+ *ops = sh7203_clk_ops[idx];8989+}
+13-6
arch/sh/kernel/cpu/sh2a/probe.c
···33 *44 * CPU Subtype Probing for SH-2A.55 *66- * Copyright (C) 2004, 2005 Paul Mundt66+ * Copyright (C) 2004 - 2007 Paul Mundt77 *88 * This file is subject to the terms and conditions of the GNU General Public99 * License. See the file "COPYING" in the main directory of this archive1010 * for more details.1111 */1212-1312#include <linux/init.h>1413#include <asm/processor.h>1514#include <asm/cache.h>16151716int __init detect_cpu_and_cache_system(void)1817{1919- /* Just SH7206 for now .. */2020- boot_cpu_data.type = CPU_SH7206;1818+ /* All SH-2A CPUs have support for 16 and 32-bit opcodes.. */2119 boot_cpu_data.flags |= CPU_HAS_OP32;22202121+#if defined(CONFIG_CPU_SUBTYPE_SH7203)2222+ boot_cpu_data.type = CPU_SH7203;2323+ /* SH7203 has an FPU.. */2424+ boot_cpu_data.flags |= CPU_HAS_FPU;2525+#elif defined(CONFIG_CPU_SUBTYPE_SH7206)2626+ boot_cpu_data.type = CPU_SH7206;2727+ /* While SH7206 has a DSP.. */2828+ boot_cpu_data.flags |= CPU_HAS_DSP;2929+#endif3030+2331 boot_cpu_data.dcache.ways = 4;2424- boot_cpu_data.dcache.way_incr = (1 << 11);3232+ boot_cpu_data.dcache.way_incr = (1 << 11);2533 boot_cpu_data.dcache.sets = 128;2634 boot_cpu_data.dcache.entry_shift = 4;2735 boot_cpu_data.dcache.linesz = L1_CACHE_BYTES;···45374638 return 0;4739}4848-