~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-omap1/sram-init.c

Version: ~ [ linux-5.1-rc5 ] ~ [ linux-5.0.7 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.34 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.111 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.168 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.178 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.138 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.65 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * OMAP SRAM detection and management
  3  *
  4  * Copyright (C) 2005 Nokia Corporation
  5  * Written by Tony Lindgren <tony@atomide.com>
  6  *
  7  * This program is free software; you can redistribute it and/or modify
  8  * it under the terms of the GNU General Public License version 2 as
  9  * published by the Free Software Foundation.
 10  */
 11 
 12 #include <linux/module.h>
 13 #include <linux/kernel.h>
 14 #include <linux/init.h>
 15 #include <linux/io.h>
 16 
 17 #include <asm/fncpy.h>
 18 #include <asm/tlb.h>
 19 #include <asm/cacheflush.h>
 20 
 21 #include <asm/mach/map.h>
 22 
 23 #include "soc.h"
 24 #include "sram.h"
 25 
 26 #define OMAP1_SRAM_PA           0x20000000
 27 #define SRAM_BOOTLOADER_SZ      0x80
 28 
 29 /*
 30  * The amount of SRAM depends on the core type.
 31  * Note that we cannot try to test for SRAM here because writes
 32  * to secure SRAM will hang the system. Also the SRAM is not
 33  * yet mapped at this point.
 34  */
 35 static void __init omap_detect_and_map_sram(void)
 36 {
 37         unsigned long omap_sram_skip = SRAM_BOOTLOADER_SZ;
 38         unsigned long omap_sram_start = OMAP1_SRAM_PA;
 39         unsigned long omap_sram_size;
 40 
 41         if (cpu_is_omap7xx())
 42                 omap_sram_size = 0x32000;       /* 200K */
 43         else if (cpu_is_omap15xx())
 44                 omap_sram_size = 0x30000;       /* 192K */
 45         else if (cpu_is_omap1610() || cpu_is_omap1611() ||
 46                         cpu_is_omap1621() || cpu_is_omap1710())
 47                 omap_sram_size = 0x4000;        /* 16K */
 48         else {
 49                 pr_err("Could not detect SRAM size\n");
 50                 omap_sram_size = 0x4000;
 51         }
 52 
 53         omap_map_sram(omap_sram_start, omap_sram_size,
 54                 omap_sram_skip, 1);
 55 }
 56 
 57 static void (*_omap_sram_reprogram_clock)(u32 dpllctl, u32 ckctl);
 58 
 59 void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl)
 60 {
 61         BUG_ON(!_omap_sram_reprogram_clock);
 62         /* On 730, bit 13 must always be 1 */
 63         if (cpu_is_omap7xx())
 64                 ckctl |= 0x2000;
 65         _omap_sram_reprogram_clock(dpllctl, ckctl);
 66 }
 67 
 68 int __init omap_sram_init(void)
 69 {
 70         omap_detect_and_map_sram();
 71         _omap_sram_reprogram_clock =
 72                         omap_sram_push(omap1_sram_reprogram_clock,
 73                                         omap1_sram_reprogram_clock_sz);
 74 
 75         return 0;
 76 }
 77 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp