diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-05-31 09:04:14 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-08-29 09:21:53 -0400 |
commit | c1e4535d431927a440e658dcafae58e309f4add7 (patch) | |
tree | 8b1526e9d8a9c286e0f7c5d7a40ac95b5aa8d401 | |
parent | 09d2e7cdebd53b7572380a215008b334ff6321a5 (diff) |
OMAPDSS: RFBI: remove code related to old panel model
Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.
This patch removes the code from the RFBI driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 135 | ||||
-rw-r--r-- | include/video/omapdss.h | 26 |
2 files changed, 19 insertions, 142 deletions
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index fdfe6e6f25df..c8a81a2b879c 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c | |||
@@ -151,19 +151,17 @@ static void rfbi_runtime_put(void) | |||
151 | WARN_ON(r < 0 && r != -ENOSYS); | 151 | WARN_ON(r < 0 && r != -ENOSYS); |
152 | } | 152 | } |
153 | 153 | ||
154 | void rfbi_bus_lock(void) | 154 | static void rfbi_bus_lock(void) |
155 | { | 155 | { |
156 | down(&rfbi.bus_lock); | 156 | down(&rfbi.bus_lock); |
157 | } | 157 | } |
158 | EXPORT_SYMBOL(rfbi_bus_lock); | ||
159 | 158 | ||
160 | void rfbi_bus_unlock(void) | 159 | static void rfbi_bus_unlock(void) |
161 | { | 160 | { |
162 | up(&rfbi.bus_lock); | 161 | up(&rfbi.bus_lock); |
163 | } | 162 | } |
164 | EXPORT_SYMBOL(rfbi_bus_unlock); | ||
165 | 163 | ||
166 | void omap_rfbi_write_command(const void *buf, u32 len) | 164 | static void rfbi_write_command(const void *buf, u32 len) |
167 | { | 165 | { |
168 | switch (rfbi.parallelmode) { | 166 | switch (rfbi.parallelmode) { |
169 | case OMAP_DSS_RFBI_PARALLELMODE_8: | 167 | case OMAP_DSS_RFBI_PARALLELMODE_8: |
@@ -189,9 +187,8 @@ void omap_rfbi_write_command(const void *buf, u32 len) | |||
189 | BUG(); | 187 | BUG(); |
190 | } | 188 | } |
191 | } | 189 | } |
192 | EXPORT_SYMBOL(omap_rfbi_write_command); | ||
193 | 190 | ||
194 | void omap_rfbi_read_data(void *buf, u32 len) | 191 | static void rfbi_read_data(void *buf, u32 len) |
195 | { | 192 | { |
196 | switch (rfbi.parallelmode) { | 193 | switch (rfbi.parallelmode) { |
197 | case OMAP_DSS_RFBI_PARALLELMODE_8: | 194 | case OMAP_DSS_RFBI_PARALLELMODE_8: |
@@ -221,9 +218,8 @@ void omap_rfbi_read_data(void *buf, u32 len) | |||
221 | BUG(); | 218 | BUG(); |
222 | } | 219 | } |
223 | } | 220 | } |
224 | EXPORT_SYMBOL(omap_rfbi_read_data); | ||
225 | 221 | ||
226 | void omap_rfbi_write_data(const void *buf, u32 len) | 222 | static void rfbi_write_data(const void *buf, u32 len) |
227 | { | 223 | { |
228 | switch (rfbi.parallelmode) { | 224 | switch (rfbi.parallelmode) { |
229 | case OMAP_DSS_RFBI_PARALLELMODE_8: | 225 | case OMAP_DSS_RFBI_PARALLELMODE_8: |
@@ -250,9 +246,8 @@ void omap_rfbi_write_data(const void *buf, u32 len) | |||
250 | 246 | ||
251 | } | 247 | } |
252 | } | 248 | } |
253 | EXPORT_SYMBOL(omap_rfbi_write_data); | ||
254 | 249 | ||
255 | void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, | 250 | static void rfbi_write_pixels(const void __iomem *buf, int scr_width, |
256 | u16 x, u16 y, | 251 | u16 x, u16 y, |
257 | u16 w, u16 h) | 252 | u16 w, u16 h) |
258 | { | 253 | { |
@@ -305,7 +300,6 @@ void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, | |||
305 | BUG(); | 300 | BUG(); |
306 | } | 301 | } |
307 | } | 302 | } |
308 | EXPORT_SYMBOL(omap_rfbi_write_pixels); | ||
309 | 303 | ||
310 | static int rfbi_transfer_area(struct omap_dss_device *dssdev, | 304 | static int rfbi_transfer_area(struct omap_dss_device *dssdev, |
311 | void (*callback)(void *data), void *data) | 305 | void (*callback)(void *data), void *data) |
@@ -574,7 +568,7 @@ static int rfbi_convert_timings(struct rfbi_timings *t) | |||
574 | } | 568 | } |
575 | 569 | ||
576 | /* xxx FIX module selection missing */ | 570 | /* xxx FIX module selection missing */ |
577 | int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, | 571 | static int rfbi_setup_te(enum omap_rfbi_te_mode mode, |
578 | unsigned hs_pulse_time, unsigned vs_pulse_time, | 572 | unsigned hs_pulse_time, unsigned vs_pulse_time, |
579 | int hs_pol_inv, int vs_pol_inv, int extif_div) | 573 | int hs_pol_inv, int vs_pol_inv, int extif_div) |
580 | { | 574 | { |
@@ -613,10 +607,9 @@ int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, | |||
613 | 607 | ||
614 | return 0; | 608 | return 0; |
615 | } | 609 | } |
616 | EXPORT_SYMBOL(omap_rfbi_setup_te); | ||
617 | 610 | ||
618 | /* xxx FIX module selection missing */ | 611 | /* xxx FIX module selection missing */ |
619 | int omap_rfbi_enable_te(bool enable, unsigned line) | 612 | static int rfbi_enable_te(bool enable, unsigned line) |
620 | { | 613 | { |
621 | u32 l; | 614 | u32 l; |
622 | 615 | ||
@@ -636,9 +629,8 @@ int omap_rfbi_enable_te(bool enable, unsigned line) | |||
636 | 629 | ||
637 | return 0; | 630 | return 0; |
638 | } | 631 | } |
639 | EXPORT_SYMBOL(omap_rfbi_enable_te); | ||
640 | 632 | ||
641 | static int rfbi_configure(int rfbi_module, int bpp, int lines) | 633 | static int rfbi_configure_bus(int rfbi_module, int bpp, int lines) |
642 | { | 634 | { |
643 | u32 l; | 635 | u32 l; |
644 | int cycle1 = 0, cycle2 = 0, cycle3 = 0; | 636 | int cycle1 = 0, cycle2 = 0, cycle3 = 0; |
@@ -770,45 +762,39 @@ static int rfbi_configure(int rfbi_module, int bpp, int lines) | |||
770 | return 0; | 762 | return 0; |
771 | } | 763 | } |
772 | 764 | ||
773 | int omap_rfbi_configure(struct omap_dss_device *dssdev) | 765 | static int rfbi_configure(struct omap_dss_device *dssdev) |
774 | { | 766 | { |
775 | return rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, | 767 | return rfbi_configure_bus(dssdev->phy.rfbi.channel, rfbi.pixel_size, |
776 | rfbi.data_lines); | 768 | rfbi.data_lines); |
777 | } | 769 | } |
778 | EXPORT_SYMBOL(omap_rfbi_configure); | ||
779 | 770 | ||
780 | int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), | 771 | static int rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), |
781 | void *data) | 772 | void *data) |
782 | { | 773 | { |
783 | return rfbi_transfer_area(dssdev, callback, data); | 774 | return rfbi_transfer_area(dssdev, callback, data); |
784 | } | 775 | } |
785 | EXPORT_SYMBOL(omap_rfbi_update); | ||
786 | 776 | ||
787 | void omapdss_rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h) | 777 | static void rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h) |
788 | { | 778 | { |
789 | rfbi.timings.x_res = w; | 779 | rfbi.timings.x_res = w; |
790 | rfbi.timings.y_res = h; | 780 | rfbi.timings.y_res = h; |
791 | } | 781 | } |
792 | EXPORT_SYMBOL(omapdss_rfbi_set_size); | ||
793 | 782 | ||
794 | void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size) | 783 | static void rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size) |
795 | { | 784 | { |
796 | rfbi.pixel_size = pixel_size; | 785 | rfbi.pixel_size = pixel_size; |
797 | } | 786 | } |
798 | EXPORT_SYMBOL(omapdss_rfbi_set_pixel_size); | ||
799 | 787 | ||
800 | void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) | 788 | static void rfbi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) |
801 | { | 789 | { |
802 | rfbi.data_lines = data_lines; | 790 | rfbi.data_lines = data_lines; |
803 | } | 791 | } |
804 | EXPORT_SYMBOL(omapdss_rfbi_set_data_lines); | ||
805 | 792 | ||
806 | void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev, | 793 | static void rfbi_set_interface_timings(struct omap_dss_device *dssdev, |
807 | struct rfbi_timings *timings) | 794 | struct rfbi_timings *timings) |
808 | { | 795 | { |
809 | rfbi.intf_timings = *timings; | 796 | rfbi.intf_timings = *timings; |
810 | } | 797 | } |
811 | EXPORT_SYMBOL(omapdss_rfbi_set_interface_timings); | ||
812 | 798 | ||
813 | static void rfbi_dump_regs(struct seq_file *s) | 799 | static void rfbi_dump_regs(struct seq_file *s) |
814 | { | 800 | { |
@@ -888,7 +874,7 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) | |||
888 | dss_mgr_set_timings(mgr, &rfbi.timings); | 874 | dss_mgr_set_timings(mgr, &rfbi.timings); |
889 | } | 875 | } |
890 | 876 | ||
891 | int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) | 877 | static int rfbi_display_enable(struct omap_dss_device *dssdev) |
892 | { | 878 | { |
893 | struct omap_dss_device *out = &rfbi.output; | 879 | struct omap_dss_device *out = &rfbi.output; |
894 | int r; | 880 | int r; |
@@ -911,7 +897,7 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) | |||
911 | 897 | ||
912 | rfbi_config_lcd_manager(dssdev); | 898 | rfbi_config_lcd_manager(dssdev); |
913 | 899 | ||
914 | rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, | 900 | rfbi_configure_bus(dssdev->phy.rfbi.channel, rfbi.pixel_size, |
915 | rfbi.data_lines); | 901 | rfbi.data_lines); |
916 | 902 | ||
917 | rfbi_set_timings(dssdev->phy.rfbi.channel, &rfbi.intf_timings); | 903 | rfbi_set_timings(dssdev->phy.rfbi.channel, &rfbi.intf_timings); |
@@ -921,9 +907,8 @@ err1: | |||
921 | rfbi_runtime_put(); | 907 | rfbi_runtime_put(); |
922 | return r; | 908 | return r; |
923 | } | 909 | } |
924 | EXPORT_SYMBOL(omapdss_rfbi_display_enable); | ||
925 | 910 | ||
926 | void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev) | 911 | static void rfbi_display_disable(struct omap_dss_device *dssdev) |
927 | { | 912 | { |
928 | struct omap_dss_device *out = &rfbi.output; | 913 | struct omap_dss_device *out = &rfbi.output; |
929 | 914 | ||
@@ -932,7 +917,6 @@ void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev) | |||
932 | 917 | ||
933 | rfbi_runtime_put(); | 918 | rfbi_runtime_put(); |
934 | } | 919 | } |
935 | EXPORT_SYMBOL(omapdss_rfbi_display_disable); | ||
936 | 920 | ||
937 | static int rfbi_init_display(struct omap_dss_device *dssdev) | 921 | static int rfbi_init_display(struct omap_dss_device *dssdev) |
938 | { | 922 | { |
@@ -940,77 +924,6 @@ static int rfbi_init_display(struct omap_dss_device *dssdev) | |||
940 | return 0; | 924 | return 0; |
941 | } | 925 | } |
942 | 926 | ||
943 | static struct omap_dss_device *rfbi_find_dssdev(struct platform_device *pdev) | ||
944 | { | ||
945 | struct omap_dss_board_info *pdata = pdev->dev.platform_data; | ||
946 | const char *def_disp_name = omapdss_get_default_display_name(); | ||
947 | struct omap_dss_device *def_dssdev; | ||
948 | int i; | ||
949 | |||
950 | def_dssdev = NULL; | ||
951 | |||
952 | for (i = 0; i < pdata->num_devices; ++i) { | ||
953 | struct omap_dss_device *dssdev = pdata->devices[i]; | ||
954 | |||
955 | if (dssdev->type != OMAP_DISPLAY_TYPE_DBI) | ||
956 | continue; | ||
957 | |||
958 | if (def_dssdev == NULL) | ||
959 | def_dssdev = dssdev; | ||
960 | |||
961 | if (def_disp_name != NULL && | ||
962 | strcmp(dssdev->name, def_disp_name) == 0) { | ||
963 | def_dssdev = dssdev; | ||
964 | break; | ||
965 | } | ||
966 | } | ||
967 | |||
968 | return def_dssdev; | ||
969 | } | ||
970 | |||
971 | static int rfbi_probe_pdata(struct platform_device *rfbidev) | ||
972 | { | ||
973 | struct omap_dss_device *plat_dssdev; | ||
974 | struct omap_dss_device *dssdev; | ||
975 | int r; | ||
976 | |||
977 | plat_dssdev = rfbi_find_dssdev(rfbidev); | ||
978 | |||
979 | if (!plat_dssdev) | ||
980 | return 0; | ||
981 | |||
982 | dssdev = dss_alloc_and_init_device(&rfbidev->dev); | ||
983 | if (!dssdev) | ||
984 | return -ENOMEM; | ||
985 | |||
986 | dss_copy_device_pdata(dssdev, plat_dssdev); | ||
987 | |||
988 | r = rfbi_init_display(dssdev); | ||
989 | if (r) { | ||
990 | DSSERR("device %s init failed: %d\n", dssdev->name, r); | ||
991 | dss_put_device(dssdev); | ||
992 | return r; | ||
993 | } | ||
994 | |||
995 | r = omapdss_output_set_device(&rfbi.output, dssdev); | ||
996 | if (r) { | ||
997 | DSSERR("failed to connect output to new device: %s\n", | ||
998 | dssdev->name); | ||
999 | dss_put_device(dssdev); | ||
1000 | return r; | ||
1001 | } | ||
1002 | |||
1003 | r = dss_add_device(dssdev); | ||
1004 | if (r) { | ||
1005 | DSSERR("device %s register failed: %d\n", dssdev->name, r); | ||
1006 | omapdss_output_unset_device(&rfbi.output); | ||
1007 | dss_put_device(dssdev); | ||
1008 | return r; | ||
1009 | } | ||
1010 | |||
1011 | return 0; | ||
1012 | } | ||
1013 | |||
1014 | static void rfbi_init_output(struct platform_device *pdev) | 927 | static void rfbi_init_output(struct platform_device *pdev) |
1015 | { | 928 | { |
1016 | struct omap_dss_device *out = &rfbi.output; | 929 | struct omap_dss_device *out = &rfbi.output; |
@@ -1085,16 +998,8 @@ static int omap_rfbihw_probe(struct platform_device *pdev) | |||
1085 | 998 | ||
1086 | rfbi_init_output(pdev); | 999 | rfbi_init_output(pdev); |
1087 | 1000 | ||
1088 | if (pdev->dev.platform_data) { | ||
1089 | r = rfbi_probe_pdata(pdev); | ||
1090 | if (r) | ||
1091 | goto err_probe; | ||
1092 | } | ||
1093 | |||
1094 | return 0; | 1001 | return 0; |
1095 | 1002 | ||
1096 | err_probe: | ||
1097 | rfbi_uninit_output(pdev); | ||
1098 | err_runtime_get: | 1003 | err_runtime_get: |
1099 | pm_runtime_disable(&pdev->dev); | 1004 | pm_runtime_disable(&pdev->dev); |
1100 | return r; | 1005 | return r; |
@@ -1102,8 +1007,6 @@ err_runtime_get: | |||
1102 | 1007 | ||
1103 | static int __exit omap_rfbihw_remove(struct platform_device *pdev) | 1008 | static int __exit omap_rfbihw_remove(struct platform_device *pdev) |
1104 | { | 1009 | { |
1105 | dss_unregister_child_devices(&pdev->dev); | ||
1106 | |||
1107 | rfbi_uninit_output(pdev); | 1010 | rfbi_uninit_output(pdev); |
1108 | 1011 | ||
1109 | pm_runtime_disable(&pdev->dev); | 1012 | pm_runtime_disable(&pdev->dev); |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 33958045a406..ca04b56c8f9d 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -250,19 +250,6 @@ struct rfbi_timings { | |||
250 | int converted; | 250 | int converted; |
251 | }; | 251 | }; |
252 | 252 | ||
253 | void omap_rfbi_write_command(const void *buf, u32 len); | ||
254 | void omap_rfbi_read_data(void *buf, u32 len); | ||
255 | void omap_rfbi_write_data(const void *buf, u32 len); | ||
256 | void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, | ||
257 | u16 x, u16 y, | ||
258 | u16 w, u16 h); | ||
259 | int omap_rfbi_enable_te(bool enable, unsigned line); | ||
260 | int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, | ||
261 | unsigned hs_pulse_time, unsigned vs_pulse_time, | ||
262 | int hs_pol_inv, int vs_pol_inv, int extif_div); | ||
263 | void rfbi_bus_lock(void); | ||
264 | void rfbi_bus_unlock(void); | ||
265 | |||
266 | /* DSI */ | 253 | /* DSI */ |
267 | 254 | ||
268 | enum omap_dss_dsi_trans_mode { | 255 | enum omap_dss_dsi_trans_mode { |
@@ -987,19 +974,6 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, | |||
987 | #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) | 974 | #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) |
988 | #define to_dss_device(x) container_of((x), struct omap_dss_device, old_dev) | 975 | #define to_dss_device(x) container_of((x), struct omap_dss_device, old_dev) |
989 | 976 | ||
990 | int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev); | ||
991 | void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev); | ||
992 | int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), | ||
993 | void *data); | ||
994 | int omap_rfbi_configure(struct omap_dss_device *dssdev); | ||
995 | void omapdss_rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h); | ||
996 | void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev, | ||
997 | int pixel_size); | ||
998 | void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev, | ||
999 | int data_lines); | ||
1000 | void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev, | ||
1001 | struct rfbi_timings *timings); | ||
1002 | |||
1003 | int omapdss_compat_init(void); | 977 | int omapdss_compat_init(void); |
1004 | void omapdss_compat_uninit(void); | 978 | void omapdss_compat_uninit(void); |
1005 | 979 | ||