mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-05 05:24:20 +00:00
ca7f9638d5
I recently picked up a WNDR3700 to put OpenWRT on, and only after tearing into the box did I find it was one of the v3 boards, with poor OpenWRT support. This patch should add the board detection and LED/button control to the broadcom-diag module, and should generate a netgear .chk image that the bootloader and stock firmware will accept. The changes to the broadcom-diag module are more than a few lines because the WNDR3700v3 is driving its LEDs through an HC164 8-bit shift register. Signed-off-by: Owen Kirby <osk@exegin.com> SVN-Revision: 36482
23 lines
554 B
C
23 lines
554 B
C
#ifndef __DIAG_GPIO_H
|
|
#define __DIAG_GPIO_H
|
|
|
|
#include <linux/interrupt.h>
|
|
#include <linux/ssb/ssb_embedded.h>
|
|
#include <linux/gpio.h>
|
|
#include <bcm47xx.h>
|
|
|
|
#define EXTIF_ADDR 0x1f000000
|
|
#define EXTIF_UART (EXTIF_ADDR + 0x00800000)
|
|
|
|
/* GPIO pins driving LEDs through a shift register */
|
|
#define SHIFTREG_DATA (1 << 6)
|
|
#define SHIFTREG_CLK (1 << 7)
|
|
#define SHIFTREG_MAX_BITS 8
|
|
|
|
#define GPIO_TYPE_NORMAL (0x0 << 24)
|
|
#define GPIO_TYPE_EXTIF (0x1 << 24)
|
|
#define GPIO_TYPE_SHIFT (0x2 << 24)
|
|
#define GPIO_TYPE_MASK (0xf << 24)
|
|
|
|
#endif /* __DIAG_GPIO_H */
|