|
/* 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);
} |
|