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

TOMOYO Linux Cross Reference
Linux/arch/sh/boards/mach-se/7206/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  *
  4  * linux/arch/sh/boards/se/7206/setup.c
  5  *
  6  * Copyright (C) 2006  Yoshinori Sato
  7  * Copyright (C) 2007 - 2008  Paul Mundt
  8  *
  9  * Hitachi 7206 SolutionEngine Support.
 10  */
 11 #include <linux/init.h>
 12 #include <linux/platform_device.h>
 13 #include <linux/smc91x.h>
 14 #include <mach-se/mach/se7206.h>
 15 #include <asm/io.h>
 16 #include <asm/machvec.h>
 17 #include <asm/heartbeat.h>
 18 
 19 static struct resource smc91x_resources[] = {
 20         [0] = {
 21                 .name           = "smc91x-regs",
 22                 .start          = PA_SMSC + 0x300,
 23                 .end            = PA_SMSC + 0x300 + 0x020 - 1,
 24                 .flags          = IORESOURCE_MEM,
 25         },
 26         [1] = {
 27                 .start          = 64,
 28                 .end            = 64,
 29                 .flags          = IORESOURCE_IRQ,
 30         },
 31 };
 32 
 33 static struct smc91x_platdata smc91x_info = {
 34         .flags  = SMC91X_USE_16BIT,
 35 };
 36 
 37 static struct platform_device smc91x_device = {
 38         .name           = "smc91x",
 39         .id             = -1,
 40         .dev            = {
 41                 .dma_mask               = NULL,
 42                 .coherent_dma_mask      = 0xffffffff,
 43                 .platform_data          = &smc91x_info,
 44         },
 45         .num_resources  = ARRAY_SIZE(smc91x_resources),
 46         .resource       = smc91x_resources,
 47 };
 48 
 49 static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
 50 
 51 static struct heartbeat_data heartbeat_data = {
 52         .bit_pos        = heartbeat_bit_pos,
 53         .nr_bits        = ARRAY_SIZE(heartbeat_bit_pos),
 54 };
 55 
 56 static struct resource heartbeat_resource = {
 57         .start  = PA_LED,
 58         .end    = PA_LED,
 59         .flags  = IORESOURCE_MEM | IORESOURCE_MEM_32BIT,
 60 };
 61 
 62 static struct platform_device heartbeat_device = {
 63         .name           = "heartbeat",
 64         .id             = -1,
 65         .dev    = {
 66                 .platform_data  = &heartbeat_data,
 67         },
 68         .num_resources  = 1,
 69         .resource       = &heartbeat_resource,
 70 };
 71 
 72 static struct platform_device *se7206_devices[] __initdata = {
 73         &smc91x_device,
 74         &heartbeat_device,
 75 };
 76 
 77 static int __init se7206_devices_setup(void)
 78 {
 79         return platform_add_devices(se7206_devices, ARRAY_SIZE(se7206_devices));
 80 }
 81 device_initcall(se7206_devices_setup);
 82 
 83 static int se7206_mode_pins(void)
 84 {
 85         return MODE_PIN1 | MODE_PIN2;
 86 }
 87 
 88 /*
 89  * The Machine Vector
 90  */
 91 
 92 static struct sh_machine_vector mv_se __initmv = {
 93         .mv_name                = "SolutionEngine",
 94         .mv_init_irq            = init_se7206_IRQ,
 95         .mv_mode_pins           = se7206_mode_pins,
 96 };
 97 

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