Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
setup.c
Go to the documentation of this file.
1 /*
2  * s6105 control routines
3  *
4  * Copyright (c) 2009 emlix GmbH
5  */
6 #include <linux/irq.h>
7 #include <linux/io.h>
8 #include <linux/gpio.h>
9 
10 #include <asm/bootparam.h>
11 
12 #include <variant/hardware.h>
13 #include <variant/gpio.h>
14 
15 #include <platform/gpio.h>
16 
17 void platform_halt(void)
18 {
20  while (1)
21  ;
22 }
23 
25 {
26  platform_halt();
27 }
28 
29 void platform_restart(void)
30 {
31  platform_halt();
32 }
33 
35 {
36  unsigned long reg;
37 
44 
46  reg &= ~(1 << S6_GREG1_BLOCK_SB);
47  reg &= ~(1 << S6_GREG1_BLOCK_GMAC);
49 
51  reg |= 1 << S6_GREG1_BLOCK_SB;
52  reg |= 1 << S6_GREG1_BLOCK_GMAC;
54 
55  printk(KERN_NOTICE "S6105 on Stretch S6000 - "
56  "Copyright (C) 2009 emlix GmbH <[email protected]>\n");
57 }
58 
60 {
61  s6_gpio_init(0);
62  gpio_request(GPIO_LED1_NGREEN, "led1_green");
63  gpio_request(GPIO_LED1_RED, "led1_red");
65 }
66 
68 {
69  static unsigned int c;
70 
71  if (!(++c & 0x4F))
73 }