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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-gemini/board-nas4220b.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  *  Support for Raidsonic NAS-4220-B
  3  *
  4  *  Copyright (C) 2009 Janos Laube <janos.dev@gmail.com>
  5  *
  6  * based on rut1xx.c
  7  *  Copyright (C) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
  8  *
  9  * This program is free software; you can redistribute it and/or modify
 10  * it under the terms of the GNU General Public License as published by
 11  * the Free Software Foundation; either version 2 of the License, or
 12  * (at your option) any later version.
 13  */
 14 
 15 #include <linux/kernel.h>
 16 #include <linux/init.h>
 17 #include <linux/platform_device.h>
 18 #include <linux/leds.h>
 19 #include <linux/input.h>
 20 #include <linux/gpio_keys.h>
 21 #include <linux/mdio-gpio.h>
 22 #include <linux/io.h>
 23 
 24 #include <asm/setup.h>
 25 #include <asm/mach-types.h>
 26 #include <asm/mach/arch.h>
 27 #include <asm/mach/time.h>
 28 
 29 #include <mach/hardware.h>
 30 #include <mach/global_reg.h>
 31 
 32 #include "common.h"
 33 
 34 static struct gpio_led ib4220b_leds[] = {
 35         {
 36                 .name                   = "nas4220b:orange:hdd",
 37                 .default_trigger        = "none",
 38                 .gpio                   = 60,
 39         },
 40         {
 41                 .name                   = "nas4220b:green:os",
 42                 .default_trigger        = "heartbeat",
 43                 .gpio                   = 62,
 44         },
 45 };
 46 
 47 static struct gpio_led_platform_data ib4220b_leds_data = {
 48         .num_leds       = ARRAY_SIZE(ib4220b_leds),
 49         .leds           = ib4220b_leds,
 50 };
 51 
 52 static struct platform_device ib4220b_led_device = {
 53         .name   = "leds-gpio",
 54         .id     = -1,
 55         .dev    = {
 56                 .platform_data = &ib4220b_leds_data,
 57         },
 58 };
 59 
 60 static struct gpio_keys_button ib4220b_keys[] = {
 61         {
 62                 .code           = KEY_SETUP,
 63                 .gpio           = 61,
 64                 .active_low     = 1,
 65                 .desc           = "Backup Button",
 66                 .type           = EV_KEY,
 67         },
 68         {
 69                 .code           = KEY_RESTART,
 70                 .gpio           = 63,
 71                 .active_low     = 1,
 72                 .desc           = "Softreset Button",
 73                 .type           = EV_KEY,
 74         },
 75 };
 76 
 77 static struct gpio_keys_platform_data ib4220b_keys_data = {
 78         .buttons        = ib4220b_keys,
 79         .nbuttons       = ARRAY_SIZE(ib4220b_keys),
 80 };
 81 
 82 static struct platform_device ib4220b_key_device = {
 83         .name   = "gpio-keys",
 84         .id     = -1,
 85         .dev    = {
 86                 .platform_data = &ib4220b_keys_data,
 87         },
 88 };
 89 
 90 static void __init ib4220b_init(void)
 91 {
 92         gemini_gpio_init();
 93         platform_register_uart();
 94         platform_register_pflash(SZ_16M, NULL, 0);
 95         platform_device_register(&ib4220b_led_device);
 96         platform_device_register(&ib4220b_key_device);
 97         platform_register_rtc();
 98 }
 99 
100 MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")
101         .atag_offset    = 0x100,
102         .map_io         = gemini_map_io,
103         .init_irq       = gemini_init_irq,
104         .init_time      = gemini_timer_init,
105         .init_machine   = ib4220b_init,
106         .restart        = gemini_restart,
107 MACHINE_END
108 

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