1.1 --- a/stage2/board-minipc.c Sat May 14 22:47:06 2016 +0200
1.2 +++ b/stage2/board-minipc.c Sat May 14 23:46:35 2016 +0200
1.3 @@ -4,7 +4,7 @@
1.4 * Copyright (C) 2000-2009 Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
1.5 * Copyright (C) 2005-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 @@ -95,6 +95,25 @@
1.13 __ost_clear_uf(TIMER_CHAN);
1.14 }
1.15
1.16 +/* GPIO interrupt activation. */
1.17 +
1.18 +void gpio_init_irq()
1.19 +{
1.20 +/*
1.21 + unsigned int i;
1.22 + for (i = 0; i < 7; i++) {
1.23 + __gpio_as_irq_rise_edge(GPIO_KEYIN_BASE + i);
1.24 + }
1.25 +*/
1.26 + __gpio_as_irq_low_level(GPIO_POWER);
1.27 + __intc_unmask_irq(GPIO_IRQ);
1.28 +}
1.29 +
1.30 +int gpio_have_irq(u8 gpio)
1.31 +{
1.32 + return (REG_GPIO_GPFR(gpio / 32) & (1 << (gpio % 32)));
1.33 +}
1.34 +
1.35 /* Board startup detection. */
1.36
1.37 int is_started()