天嵌 ARM开发社区

 找回密码
 注册
查看: 1986|回复: 3

2.6.35.7内核中关于S3C2410_GPH的定义请教

[复制链接]
vanlos 发表于 2010-10-23 14:44:38 | 显示全部楼层 |阅读模式
/* Port H consists of11 GPIO/serial/Misc pins
583  *
584  * GPGCON has 2 bits for each of the input pins on port F
585  *   00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 special func
586  *
587  * pull up works like all other ports.
588 */
589
590 #define S3C2410_GPHCON     S3C2410_GPIOREG(0x70)
591 #define S3C2410_GPHDAT     S3C2410_GPIOREG(0x74)
592 #define S3C2410_GPHUP      S3C2410_GPIOREG(0x78)
593
594 #define S3C2410_GPH0_nCTS0  (0x02 << 0)
595 #define S3C2416_GPH0_TXD0  (0x02 << 0)
596
597 #define S3C2410_GPH1_nRTS0  (0x02 << 2)
598 #define S3C2416_GPH1_RXD0  (0x02 << 2)
599
600 #define S3C2410_GPH2_TXD0   (0x02 << 4)
601 #define S3C2416_GPH2_TXD1   (0x02 << 4)
602 #define S3C2410_GPH3_RXD0   (0x02 << 6)
604 #define S3C2416_GPH3_RXD1   (0x02 << 6)
605
606 #define S3C2410_GPH4_TXD1   (0x02 << 8)
607 #define S3C2416_GPH4_TXD2   (0x02 << 8)
608
609 #define S3C2410_GPH5_RXD1   (0x02 << 10)
610 #define S3C2416_GPH5_RXD2   (0x02 << 10)
611
612 #define S3C2410_GPH6_TXD2   (0x02 << 12)
613 #define S3C2416_GPH6_TXD3   (0x02 << 12)
614 #define S3C2410_GPH6_nRTS1  (0x03 << 12)
615 #define S3C2416_GPH6_nRTS2  (0x03 << 12)
616
617 #define S3C2410_GPH7_RXD2   (0x02  << 14)
618 #define S3C2416_GPH7_RXD3   (0x02 << 14)
619 #define S3C2410_GPH7_nCTS1  (0x03 << 14)
620 #define S3C2416_GPH7_nCTS2  (0x03 << 14)
621
622 #define S3C2410_GPH8_UCLK   (0x02 << 16)
623 #define S3C2416_GPH8_nCTS0  (0x02 << 16)   

622 #define S3C2410_GPH9_CLKOUT0  (0x02 << 18)
626 #define S3C2442_GPH9_nSPICS0  (0x03 << 18)
627 #define S3C2416_GPH9_nRTS0    (0x02 << 18)
628
629 #define S3C2410_GPH10_CLKOUT1 (0x02 << 20)
630 #define S3C2416_GPH10_nCTS1   (0x02 << 20)
631
632 #define S3C2416_GPH11_nRTS1   (0x02 << 22)
633
634 #define S3C2416_GPH12_EXTUARTCLK (0x02 << 24)
635
636 #define S3C2416_GPH13_CLKOUT0 (0x02 << 26)
637
638 #define S3C2416_GPH14_CLKOUT1 (0x02 << 28)



其中
590 #define S3C2410_GPHCON     S3C2410_GPIOREG(0x70)
591 #define S3C2410_GPHDAT     S3C2410_GPIOREG(0x74)
592 #define S3C2410_GPHUP      S3C2410_GPIOREG(0x78)
作用是?
其中
617 #define S3C2410_GPH7_RXD2   (0x02  << 14)
618 #define S3C2416_GPH7_RXD3   (0x02 << 14)
如何将S3C2410_GPH7置高?使用下面的程序段能否实现?下面的程序段中S3C2410_GPH6和S3C2410_GPH7在2.6.35.7中没有定义。
/* the port reset code should have done the correct
         * register setup for the port controls */
        if (port->line == 2) {
            s3c2410_gpio_cfgpin(S3C2410_GPH6, S3C2410_GPH6_TXD2);
            s3c2410_gpio_pullup(S3C2410_GPH6, 1);
            s3c2410_gpio_cfgpin(S3C2410_GPH7, S3C2410_GPH7_RXD2);
            s3c2410_gpio_pullup(S3C2410_GPH7, 1);
        }
 楼主| vanlos 发表于 2010-10-26 14:59:18 | 显示全部楼层
问题已解决。
天嵌_support1 发表于 2010-10-26 15:05:04 | 显示全部楼层
1# vanlos

2.6.35中没有定义,你可以从2.6.30中搬过去的。
解决了就好。
解决了就表明一下自己的解决的办法哦。
你需要答案,或许其他网友也需要答案,分享才能进步
 楼主| vanlos 发表于 2010-10-30 14:13:12 | 显示全部楼层
嗯,就是从2.6.30中搬过去的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-9-12 18:31 , Processed in 1.022501 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表