cpu_sh4.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * (C) Copyright 2007 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of
  7. * the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  17. * MA 02111-1307 USA
  18. */
  19. #ifndef _ASM_CPU_SH4_H_
  20. #define _ASM_CPU_SH4_H_
  21. /* cache control */
  22. #define CCR_CACHE_STOP 0x00000808
  23. #define CCR_CACHE_ENABLE 0x00000101
  24. #define CCR_CACHE_ICI 0x00000800
  25. #define CACHE_OC_ADDRESS_ARRAY 0xf4000000
  26. #define CACHE_OC_WAY_SHIFT 14
  27. #define CACHE_OC_NUM_ENTRIES 512
  28. #define CACHE_OC_ENTRY_SHIFT 5
  29. //#define CACHE_OC_NUM_WAYS 1
  30. #if defined (CONFIG_CPU_SH7750)
  31. #include <asm/cpu_sh7750.h>
  32. //#ifdef CONFIG_CPU_TYPE_R
  33. //#define CCR_CACHE_INIT 0x8000090d /* EMODE,ICI,ICE(16k),OCI,P1-wb,OCE(32k) */
  34. //#else
  35. //#define CCR_CACHE_INIT 0x0000090b
  36. //#endif
  37. #elif defined (CONFIG_CPU_SH7722)
  38. #include <asm/cpu_sh7722.h>
  39. //#define CCR_CACHE_INIT 0x0000090d
  40. #else
  41. #error "Unknown SH4 variant"
  42. #endif
  43. #endif /* _ASM_CPU_SH4_H_ */