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

TOMOYO Linux Cross Reference
Linux/arch/sh/boards/mach-rsk/setup.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 /*
  3  * Renesas Technology Europe RSK+ Support.
  4  *
  5  * Copyright (C) 2008 Paul Mundt
  6  * Copyright (C) 2008 Peter Griffin <pgriffin@mpc-data.co.uk>
  7  */
  8 #include <linux/init.h>
  9 #include <linux/types.h>
 10 #include <linux/platform_device.h>
 11 #include <linux/interrupt.h>
 12 #include <linux/mtd/mtd.h>
 13 #include <linux/mtd/partitions.h>
 14 #include <linux/mtd/physmap.h>
 15 #include <linux/mtd/map.h>
 16 #include <linux/regulator/fixed.h>
 17 #include <linux/regulator/machine.h>
 18 #include <asm/machvec.h>
 19 #include <asm/io.h>
 20 
 21 /* Dummy supplies, where voltage doesn't matter */
 22 static struct regulator_consumer_supply dummy_supplies[] = {
 23         REGULATOR_SUPPLY("vddvario", "smsc911x"),
 24         REGULATOR_SUPPLY("vdd33a", "smsc911x"),
 25 };
 26 
 27 static struct mtd_partition rsk_partitions[] = {
 28         {
 29                 .name           = "Bootloader",
 30                 .offset         = 0x00000000,
 31                 .size           = 0x00040000,
 32                 .mask_flags     = MTD_WRITEABLE,
 33         }, {
 34                 .name           = "Kernel",
 35                 .offset         = MTDPART_OFS_NXTBLK,
 36                 .size           = 0x001c0000,
 37         }, {
 38                 .name           = "Flash_FS",
 39                 .offset         = MTDPART_OFS_NXTBLK,
 40                 .size           = MTDPART_SIZ_FULL,
 41         }
 42 };
 43 
 44 static struct physmap_flash_data flash_data = {
 45         .parts                  = rsk_partitions,
 46         .nr_parts               = ARRAY_SIZE(rsk_partitions),
 47         .width                  = 2,
 48 };
 49 
 50 static struct resource flash_resource = {
 51         .start          = 0x20000000,
 52         .end            = 0x20400000,
 53         .flags          = IORESOURCE_MEM,
 54 };
 55 
 56 static struct platform_device flash_device = {
 57         .name           = "physmap-flash",
 58         .id             = -1,
 59         .resource       = &flash_resource,
 60         .num_resources  = 1,
 61         .dev            = {
 62                 .platform_data = &flash_data,
 63         },
 64 };
 65 
 66 static struct platform_device *rsk_devices[] __initdata = {
 67         &flash_device,
 68 };
 69 
 70 static int __init rsk_devices_setup(void)
 71 {
 72         regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
 73 
 74         return platform_add_devices(rsk_devices,
 75                                     ARRAY_SIZE(rsk_devices));
 76 }
 77 device_initcall(rsk_devices_setup);
 78 
 79 /*
 80  * The Machine Vector
 81  */
 82 static struct sh_machine_vector mv_rsk __initmv = {
 83         .mv_name        = "RSK+",
 84 };
 85 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php