BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openwrt-zsun
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Forest Godfrey
openwrt-zsun
Commits
6aef476c
Commit
6aef476c
authored
Jan 12, 2016
by
Andrzej Surowiec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GPIO init and sd reader reset script.
parent
c2e59aee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
BTN_1
target/linux/ar71xx/base-files/etc/rc.button/BTN_1
+5
-0
mach-zsun-sdreader.c
...t/linux/ar71xx/files/arch/mips/ath79/mach-zsun-sdreader.c
+5
-0
No files found.
target/linux/ar71xx/base-files/etc/rc.button/BTN_1
0 → 100755
View file @
6aef476c
#!/bin/sh
logger Resetting the SD card reader
echo
"0"
>
/sys/class/gpio/gpio18/value
echo
"1"
>
/sys/class/gpio/gpio18/value
target/linux/ar71xx/files/arch/mips/ath79/mach-zsun-sdreader.c
View file @
6aef476c
...
...
@@ -9,6 +9,7 @@
* by the Free Software Foundation.
*/
#include <linux/gpio.h>
#include <asm/mach-ath79/ath79.h>
#include <asm/mach-ath79/ar71xx_regs.h>
#include "common.h"
...
...
@@ -24,6 +25,8 @@
#define ZSUN_SDREADER_GPIO_LED_SYSTEM 0
#define ZSUN_SDREADER_GPIO_SW_SD 22
#define ZSUN_SDREADER_GPIO_USB_SWITCH 21
#define ZSUN_SDREADER_GPIO_SD_RESET 18
#define ZSUN_SDREADER_MAC0_OFFSET 0x0000
#define ZSUN_SDREADER_MAC1_OFFSET 0x0006
...
...
@@ -88,6 +91,8 @@ static void __init zsun_sdreader_setup(void)
ath79_register_gpio_keys_polled
(
-
1
,
ZSUN_SDREADER_KEYS_POLL_INTERVAL
,
ARRAY_SIZE
(
zsun_sdreader_gpio_keys
),
zsun_sdreader_gpio_keys
);
gpio_request_one
(
ZSUN_SDREADER_GPIO_USB_SWITCH
,
GPIOF_OUT_INIT_LOW
|
GPIOF_EXPORT_DIR_FIXED
,
"USB switch"
);
gpio_request_one
(
ZSUN_SDREADER_GPIO_SD_RESET
,
GPIOF_OUT_INIT_HIGH
|
GPIOF_EXPORT_DIR_CHANGEABLE
,
"SD reader reset"
);
ath79_register_usb
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment