File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55#include <linux/of_gpio.h>
66#include <linux/proc_fs.h>
77
8+ #define RK3288_GRF_GPIO2A_P 0x0150
9+
810static int hw_id0 , hw_id1 , hw_id2 ;
911static int pid_id0 , pid_id1 , pid_id2 ;
1012static int ddr_id0 , ddr_id1 , ddr_id2 ;
@@ -163,6 +165,18 @@ static int board_info_probe(struct platform_device *pdev)
163165 int ret ;
164166 struct proc_dir_entry * file ;
165167
168+ void * regs ;
169+ /* Pull up GPIO2 A1 A2 A3*/
170+ regs = ioremap (0xff770000 , 64 * 1024 );
171+ if (regs == NULL ) {
172+ printk ("[boardinfo] ioremap failed" );
173+ return - ENODEV ;
174+ }
175+ writel ((readl (regs + RK3288_GRF_GPIO2A_P ) & ~(0x3f << 18 ) & ~(0x3f << 2 ))
176+ | (0x3f << 18 ) | (0x15 << 2 ), regs + RK3288_GRF_GPIO2A_P );
177+
178+ iounmap (regs );
179+
166180 hw_id0 = of_get_named_gpio (dev -> of_node , "hw-id0" , 0 );
167181 if (!gpio_is_valid (hw_id0 )) {
168182 printk ("No hw-id0 pin available in board-info\n" );
You can’t perform that action at this time.
0 commit comments