1.1 --- a/stage2/board-nanonote.c Tue Jan 26 16:57:26 2016 +0100
1.2 +++ b/stage2/board-nanonote.c Tue Jan 26 21:34:25 2016 +0100
1.3 @@ -4,7 +4,7 @@
1.4 * Copyright (C) 2000-2009 Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
1.5 * Copyright (C) 2006 Ingenic Semiconductor, <jlwei@ingenic.cn>
1.6 * Copyright (C) Xiangfu Liu <xiangfu.z@gmail.com>
1.7 - * Copyright (C) 2015 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2015, 2016 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software: you can redistribute it and/or modify
1.11 * it under the terms of the GNU General Public License as published by
1.12 @@ -41,10 +41,6 @@
1.13 * Initialize Other pins
1.14 */
1.15 unsigned int i;
1.16 - for (i = 0; i < 7; i++){
1.17 - __gpio_as_input(GPIO_KEYIN_BASE + i);
1.18 - __gpio_enable_pull(GPIO_KEYIN_BASE + i);
1.19 - }
1.20
1.21 for (i = 0; i < 8; i++) {
1.22 __gpio_as_output(GPIO_KEYOUT_BASE + i);
1.23 @@ -144,6 +140,20 @@
1.24 __intc_unmask_irq(TIMER_CHAN_IRQ);
1.25 }
1.26
1.27 +/* GPIO interrupt activation. */
1.28 +
1.29 +void gpio_init_irq(void)
1.30 +{
1.31 +/*
1.32 + unsigned int i;
1.33 + for (i = 0; i < 7; i++) {
1.34 + __gpio_as_irq_rise_edge(GPIO_KEYIN_BASE + i);
1.35 + }
1.36 +*/
1.37 + __gpio_as_irq_rise_edge(GPIO_POWER);
1.38 + __intc_unmask_irq(GPIO_IRQ);
1.39 +}
1.40 +
1.41 /* Board startup detection. */
1.42
1.43 int is_started(void)