18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci * 38c2ecf20Sopenharmony_ci * include/asm-sh/cpu-sh4/freq.h 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2002, 2003 Paul Mundt 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci#ifndef __ASM_CPU_SH4_FREQ_H 88c2ecf20Sopenharmony_ci#define __ASM_CPU_SH4_FREQ_H 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#if defined(CONFIG_CPU_SUBTYPE_SH7722) || \ 118c2ecf20Sopenharmony_ci defined(CONFIG_CPU_SUBTYPE_SH7723) || \ 128c2ecf20Sopenharmony_ci defined(CONFIG_CPU_SUBTYPE_SH7343) || \ 138c2ecf20Sopenharmony_ci defined(CONFIG_CPU_SUBTYPE_SH7366) 148c2ecf20Sopenharmony_ci#define FRQCR 0xa4150000 158c2ecf20Sopenharmony_ci#define VCLKCR 0xa4150004 168c2ecf20Sopenharmony_ci#define SCLKACR 0xa4150008 178c2ecf20Sopenharmony_ci#define SCLKBCR 0xa415000c 188c2ecf20Sopenharmony_ci#define IrDACLKCR 0xa4150010 198c2ecf20Sopenharmony_ci#define MSTPCR0 0xa4150030 208c2ecf20Sopenharmony_ci#define MSTPCR1 0xa4150034 218c2ecf20Sopenharmony_ci#define MSTPCR2 0xa4150038 228c2ecf20Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SH7757) 238c2ecf20Sopenharmony_ci#define FRQCR 0xffc80000 248c2ecf20Sopenharmony_ci#define OSCCR 0xffc80018 258c2ecf20Sopenharmony_ci#define PLLCR 0xffc80024 268c2ecf20Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \ 278c2ecf20Sopenharmony_ci defined(CONFIG_CPU_SUBTYPE_SH7780) 288c2ecf20Sopenharmony_ci#define FRQCR 0xffc80000 298c2ecf20Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SH7724) 308c2ecf20Sopenharmony_ci#define FRQCRA 0xa4150000 318c2ecf20Sopenharmony_ci#define FRQCRB 0xa4150004 328c2ecf20Sopenharmony_ci#define VCLKCR 0xa4150048 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#define FCLKACR 0xa4150008 358c2ecf20Sopenharmony_ci#define FCLKBCR 0xa415000c 368c2ecf20Sopenharmony_ci#define FRQCR FRQCRA 378c2ecf20Sopenharmony_ci#define SCLKACR FCLKACR 388c2ecf20Sopenharmony_ci#define SCLKBCR FCLKBCR 398c2ecf20Sopenharmony_ci#define FCLKACR 0xa4150008 408c2ecf20Sopenharmony_ci#define FCLKBCR 0xa415000c 418c2ecf20Sopenharmony_ci#define IrDACLKCR 0xa4150018 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#define MSTPCR0 0xa4150030 448c2ecf20Sopenharmony_ci#define MSTPCR1 0xa4150034 458c2ecf20Sopenharmony_ci#define MSTPCR2 0xa4150038 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SH7734) 488c2ecf20Sopenharmony_ci#define FRQCR0 0xffc80000 498c2ecf20Sopenharmony_ci#define FRQCR2 0xffc80008 508c2ecf20Sopenharmony_ci#define FRQMR1 0xffc80014 518c2ecf20Sopenharmony_ci#define FRQMR2 0xffc80018 528c2ecf20Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SH7785) 538c2ecf20Sopenharmony_ci#define FRQCR0 0xffc80000 548c2ecf20Sopenharmony_ci#define FRQCR1 0xffc80004 558c2ecf20Sopenharmony_ci#define FRQMR1 0xffc80014 568c2ecf20Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SH7786) 578c2ecf20Sopenharmony_ci#define FRQCR0 0xffc40000 588c2ecf20Sopenharmony_ci#define FRQCR1 0xffc40004 598c2ecf20Sopenharmony_ci#define FRQMR1 0xffc40014 608c2ecf20Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SHX3) 618c2ecf20Sopenharmony_ci#define FRQCR0 0xffc00000 628c2ecf20Sopenharmony_ci#define FRQCR1 0xffc00004 638c2ecf20Sopenharmony_ci#define FRQMR1 0xffc00014 648c2ecf20Sopenharmony_ci#else 658c2ecf20Sopenharmony_ci#define FRQCR 0xffc00000 668c2ecf20Sopenharmony_ci#define FRQCR_PSTBY 0x0200 678c2ecf20Sopenharmony_ci#define FRQCR_PLLEN 0x0400 688c2ecf20Sopenharmony_ci#define FRQCR_CKOEN 0x0800 698c2ecf20Sopenharmony_ci#endif 708c2ecf20Sopenharmony_ci#define MIN_DIVISOR_NR 0 718c2ecf20Sopenharmony_ci#define MAX_DIVISOR_NR 3 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci#endif /* __ASM_CPU_SH4_FREQ_H */ 748c2ecf20Sopenharmony_ci 75