@@ -825,8 +825,7 @@ static void lcd_write_cmd_s(int cmd)
825
825
lcd_send_serial (0x1F ); /* R/W=W, RS=0 */
826
826
lcd_send_serial (cmd & 0x0F );
827
827
lcd_send_serial ((cmd >> 4 ) & 0x0F );
828
- /* the shortest command takes at least 40 us */
829
- usleep_range (40 , 100 );
828
+ udelay (40 ); /* the shortest command takes at least 40 us */
830
829
spin_unlock_irq (& pprt_lock );
831
830
}
832
831
@@ -837,8 +836,7 @@ static void lcd_write_data_s(int data)
837
836
lcd_send_serial (0x5F ); /* R/W=W, RS=1 */
838
837
lcd_send_serial (data & 0x0F );
839
838
lcd_send_serial ((data >> 4 ) & 0x0F );
840
- /* the shortest data takes at least 40 us */
841
- usleep_range (40 , 100 );
839
+ udelay (40 ); /* the shortest data takes at least 40 us */
842
840
spin_unlock_irq (& pprt_lock );
843
841
}
844
842
@@ -848,20 +846,19 @@ static void lcd_write_cmd_p8(int cmd)
848
846
spin_lock_irq (& pprt_lock );
849
847
/* present the data to the data port */
850
848
w_dtr (pprt , cmd );
851
- /* maintain the data during 20 us before the strobe */
852
- usleep_range (20 , 100 );
849
+ udelay (20 ); /* maintain the data during 20 us before the strobe */
853
850
854
851
bits .e = BIT_SET ;
855
852
bits .rs = BIT_CLR ;
856
853
bits .rw = BIT_CLR ;
857
854
set_ctrl_bits ();
858
855
859
- usleep_range (40 , 100 ); /* maintain the strobe during 40 us */
856
+ udelay (40 ); /* maintain the strobe during 40 us */
860
857
861
858
bits .e = BIT_CLR ;
862
859
set_ctrl_bits ();
863
860
864
- usleep_range (120 , 500 ); /* the shortest command takes at least 120 us */
861
+ udelay (120 ); /* the shortest command takes at least 120 us */
865
862
spin_unlock_irq (& pprt_lock );
866
863
}
867
864
@@ -871,20 +868,19 @@ static void lcd_write_data_p8(int data)
871
868
spin_lock_irq (& pprt_lock );
872
869
/* present the data to the data port */
873
870
w_dtr (pprt , data );
874
- /* maintain the data during 20 us before the strobe */
875
- usleep_range (20 , 100 );
871
+ udelay (20 ); /* maintain the data during 20 us before the strobe */
876
872
877
873
bits .e = BIT_SET ;
878
874
bits .rs = BIT_SET ;
879
875
bits .rw = BIT_CLR ;
880
876
set_ctrl_bits ();
881
877
882
- usleep_range (40 , 100 ); /* maintain the strobe during 40 us */
878
+ udelay (40 ); /* maintain the strobe during 40 us */
883
879
884
880
bits .e = BIT_CLR ;
885
881
set_ctrl_bits ();
886
882
887
- usleep_range (45 , 100 ); /* the shortest data takes at least 45 us */
883
+ udelay (45 ); /* the shortest data takes at least 45 us */
888
884
spin_unlock_irq (& pprt_lock );
889
885
}
890
886
@@ -894,7 +890,7 @@ static void lcd_write_cmd_tilcd(int cmd)
894
890
spin_lock_irq (& pprt_lock );
895
891
/* present the data to the control port */
896
892
w_ctr (pprt , cmd );
897
- usleep_range (60 , 120 );
893
+ udelay (60 );
898
894
spin_unlock_irq (& pprt_lock );
899
895
}
900
896
@@ -904,7 +900,7 @@ static void lcd_write_data_tilcd(int data)
904
900
spin_lock_irq (& pprt_lock );
905
901
/* present the data to the data port */
906
902
w_dtr (pprt , data );
907
- usleep_range (60 , 120 );
903
+ udelay (60 );
908
904
spin_unlock_irq (& pprt_lock );
909
905
}
910
906
@@ -947,7 +943,7 @@ static void lcd_clear_fast_s(void)
947
943
lcd_send_serial (0x5F ); /* R/W=W, RS=1 */
948
944
lcd_send_serial (' ' & 0x0F );
949
945
lcd_send_serial ((' ' >> 4 ) & 0x0F );
950
- usleep_range (40 , 100 ); /* the shortest data takes at least 40 us */
946
+ udelay (40 ); /* the shortest data takes at least 40 us */
951
947
}
952
948
spin_unlock_irq (& pprt_lock );
953
949
@@ -971,21 +967,21 @@ static void lcd_clear_fast_p8(void)
971
967
w_dtr (pprt , ' ' );
972
968
973
969
/* maintain the data during 20 us before the strobe */
974
- usleep_range (20 , 100 );
970
+ udelay (20 );
975
971
976
972
bits .e = BIT_SET ;
977
973
bits .rs = BIT_SET ;
978
974
bits .rw = BIT_CLR ;
979
975
set_ctrl_bits ();
980
976
981
977
/* maintain the strobe during 40 us */
982
- usleep_range (40 , 100 );
978
+ udelay (40 );
983
979
984
980
bits .e = BIT_CLR ;
985
981
set_ctrl_bits ();
986
982
987
983
/* the shortest data takes at least 45 us */
988
- usleep_range (45 , 100 );
984
+ udelay (45 );
989
985
}
990
986
spin_unlock_irq (& pprt_lock );
991
987
@@ -1007,7 +1003,7 @@ static void lcd_clear_fast_tilcd(void)
1007
1003
for (pos = 0 ; pos < lcd .height * lcd .hwidth ; pos ++ ) {
1008
1004
/* present the data to the data port */
1009
1005
w_dtr (pprt , ' ' );
1010
- usleep_range (60 , 120 );
1006
+ udelay (60 );
1011
1007
}
1012
1008
1013
1009
spin_unlock_irq (& pprt_lock );
0 commit comments