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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-ks8695/board-sg.c

Version: ~ [ linux-5.9-rc6 ] ~ [ linux-5.8.10 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.66 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.146 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.198 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.236 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.236 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ 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-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  * board-sg.c -- support for the SnapGear KS8695 based boards
  3  *
  4  * This program is free software; you can redistribute it and/or modify
  5  * it under the terms of the GNU General Public License version 2 as
  6  * published by the Free Software Foundation.
  7  */
  8 
  9 #include <linux/kernel.h>
 10 #include <linux/types.h>
 11 #include <linux/init.h>
 12 #include <linux/platform_device.h>
 13 #include <linux/mtd/mtd.h>
 14 #include <linux/mtd/map.h>
 15 #include <linux/mtd/physmap.h>
 16 #include <linux/mtd/partitions.h>
 17 #include <asm/mach-types.h>
 18 #include <asm/mach/arch.h>
 19 #include <mach/devices.h>
 20 #include "generic.h"
 21 
 22 /*
 23  * The SG310 machine type is fitted with a conventional 8MB Strataflash
 24  * device. Define its partitioning.
 25  */
 26 #define FL_BASE         0x02000000
 27 #define FL_SIZE         SZ_8M
 28 
 29 static struct mtd_partition sg_mtd_partitions[] = {
 30         [0] = {
 31                 .name   = "SnapGear Boot Loader",
 32                 .size   = SZ_128K,
 33         },
 34         [1] = {
 35                 .name   = "SnapGear non-volatile configuration",
 36                 .size   = SZ_512K,
 37                 .offset = SZ_256K,
 38         },
 39         [2] = {
 40                 .name   = "SnapGear image",
 41                 .offset = SZ_512K + SZ_256K,
 42         },
 43         [3] = {
 44                 .name   = "SnapGear StrataFlash",
 45         },
 46         [4] = {
 47                 .name   = "SnapGear Boot Tags",
 48                 .size   = SZ_128K,
 49                 .offset = SZ_128K,
 50         },
 51 };
 52 
 53 static struct physmap_flash_data sg_mtd_pdata = {
 54         .width          = 1,
 55         .nr_parts       = ARRAY_SIZE(sg_mtd_partitions),
 56         .parts          = sg_mtd_partitions,
 57 };
 58 
 59 
 60 static struct resource sg_mtd_resource[] = {
 61         [0] = {
 62                 .start = FL_BASE,
 63                 .end   = FL_BASE + FL_SIZE - 1,
 64                 .flags = IORESOURCE_MEM,
 65         },
 66 };
 67 
 68 static struct platform_device sg_mtd_device = {
 69         .name           = "physmap-flash",
 70         .id             = 0,
 71         .num_resources  = ARRAY_SIZE(sg_mtd_resource),
 72         .resource       = sg_mtd_resource,
 73         .dev            = {
 74                 .platform_data = &sg_mtd_pdata,
 75         },
 76 };
 77 
 78 static void __init sg_init(void)
 79 {
 80         ks8695_add_device_lan();
 81         ks8695_add_device_wan();
 82 
 83         if (machine_is_sg310())
 84                 platform_device_register(&sg_mtd_device);
 85 }
 86 
 87 #ifdef CONFIG_MACH_LITE300
 88 MACHINE_START(LITE300, "SecureComputing/SG300")
 89         /* SnapGear */
 90         .atag_offset    = 0x100,
 91         .map_io         = ks8695_map_io,
 92         .init_irq       = ks8695_init_irq,
 93         .init_machine   = sg_init,
 94         .init_time      = ks8695_timer_init,
 95         .restart        = ks8695_restart,
 96 MACHINE_END
 97 #endif
 98 
 99 #ifdef CONFIG_MACH_SG310
100 MACHINE_START(SG310, "McAfee/SG310")
101         /* SnapGear */
102         .atag_offset    = 0x100,
103         .map_io         = ks8695_map_io,
104         .init_irq       = ks8695_init_irq,
105         .init_machine   = sg_init,
106         .init_time      = ks8695_timer_init,
107         .restart        = ks8695_restart,
108 MACHINE_END
109 #endif
110 
111 #ifdef CONFIG_MACH_SE4200
112 MACHINE_START(SE4200, "SecureComputing/SE4200")
113         /* SnapGear */
114         .atag_offset    = 0x100,
115         .map_io         = ks8695_map_io,
116         .init_irq       = ks8695_init_irq,
117         .init_machine   = sg_init,
118         .init_time      = ks8695_timer_init,
119         .restart        = ks8695_restart,
120 MACHINE_END
121 #endif
122 

~ [ 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