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

TOMOYO Linux Cross Reference
Linux/arch/sh/boards/mach-se/7721/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  * linux/arch/sh/boards/se/7721/setup.c
  4  *
  5  * Copyright (C) 2008 Renesas Solutions Corp.
  6  *
  7  * Hitachi UL SolutionEngine 7721 Support.
  8  */
  9 #include <linux/init.h>
 10 #include <linux/platform_device.h>
 11 #include <mach-se/mach/se7721.h>
 12 #include <mach-se/mach/mrshpc.h>
 13 #include <asm/machvec.h>
 14 #include <asm/io.h>
 15 #include <asm/heartbeat.h>
 16 
 17 static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
 18 
 19 static struct heartbeat_data heartbeat_data = {
 20         .bit_pos        = heartbeat_bit_pos,
 21         .nr_bits        = ARRAY_SIZE(heartbeat_bit_pos),
 22 };
 23 
 24 static struct resource heartbeat_resource = {
 25         .start  = PA_LED,
 26         .end    = PA_LED,
 27         .flags  = IORESOURCE_MEM | IORESOURCE_MEM_16BIT,
 28 };
 29 
 30 static struct platform_device heartbeat_device = {
 31         .name           = "heartbeat",
 32         .id             = -1,
 33         .dev    = {
 34                 .platform_data  = &heartbeat_data,
 35         },
 36         .num_resources  = 1,
 37         .resource       = &heartbeat_resource,
 38 };
 39 
 40 static struct resource cf_ide_resources[] = {
 41         [0] = {
 42                 .start  = PA_MRSHPC_IO + 0x1f0,
 43                 .end    = PA_MRSHPC_IO + 0x1f0 + 8 ,
 44                 .flags  = IORESOURCE_IO,
 45         },
 46         [1] = {
 47                 .start  = PA_MRSHPC_IO + 0x1f0 + 0x206,
 48                 .end    = PA_MRSHPC_IO + 0x1f0 + 8 + 0x206 + 8,
 49                 .flags  = IORESOURCE_IO,
 50         },
 51         [2] = {
 52                 .start  = MRSHPC_IRQ0,
 53                 .flags  = IORESOURCE_IRQ,
 54         },
 55 };
 56 
 57 static struct platform_device cf_ide_device = {
 58         .name           = "pata_platform",
 59         .id             = -1,
 60         .num_resources  = ARRAY_SIZE(cf_ide_resources),
 61         .resource       = cf_ide_resources,
 62 };
 63 
 64 static struct platform_device *se7721_devices[] __initdata = {
 65         &cf_ide_device,
 66         &heartbeat_device
 67 };
 68 
 69 static int __init se7721_devices_setup(void)
 70 {
 71         mrshpc_setup_windows();
 72         return platform_add_devices(se7721_devices, ARRAY_SIZE(se7721_devices));
 73 }
 74 device_initcall(se7721_devices_setup);
 75 
 76 static void __init se7721_setup(char **cmdline_p)
 77 {
 78         /* for USB */
 79         __raw_writew(0x0000, 0xA405010C);       /* PGCR */
 80         __raw_writew(0x0000, 0xA405010E);       /* PHCR */
 81         __raw_writew(0x00AA, 0xA4050118);       /* PPCR */
 82         __raw_writew(0x0000, 0xA4050124);       /* PSELA */
 83 }
 84 
 85 /*
 86  * The Machine Vector
 87  */
 88 struct sh_machine_vector mv_se7721 __initmv = {
 89         .mv_name                = "Solution Engine 7721",
 90         .mv_setup               = se7721_setup,
 91         .mv_init_irq            = init_se7721_IRQ,
 92 };
 93 

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