Commit c1e4535d authored by Tomi Valkeinen's avatar Tomi Valkeinen

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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarArchit Taneja <archit@ti.com>
parent 09d2e7cd
...@@ -151,19 +151,17 @@ static void rfbi_runtime_put(void) ...@@ -151,19 +151,17 @@ static void rfbi_runtime_put(void)
WARN_ON(r < 0 && r != -ENOSYS); WARN_ON(r < 0 && r != -ENOSYS);
} }
void rfbi_bus_lock(void) static void rfbi_bus_lock(void)
{ {
down(&rfbi.bus_lock); down(&rfbi.bus_lock);
} }
EXPORT_SYMBOL(rfbi_bus_lock);
void rfbi_bus_unlock(void) static void rfbi_bus_unlock(void)
{ {
up(&rfbi.bus_lock); up(&rfbi.bus_lock);
} }
EXPORT_SYMBOL(rfbi_bus_unlock);
void omap_rfbi_write_command(const void *buf, u32 len) static void rfbi_write_command(const void *buf, u32 len)
{ {
switch (rfbi.parallelmode) { switch (rfbi.parallelmode) {
case OMAP_DSS_RFBI_PARALLELMODE_8: case OMAP_DSS_RFBI_PARALLELMODE_8:
...@@ -189,9 +187,8 @@ void omap_rfbi_write_command(const void *buf, u32 len) ...@@ -189,9 +187,8 @@ void omap_rfbi_write_command(const void *buf, u32 len)
BUG(); BUG();
} }
} }
EXPORT_SYMBOL(omap_rfbi_write_command);
void omap_rfbi_read_data(void *buf, u32 len) static void rfbi_read_data(void *buf, u32 len)
{ {
switch (rfbi.parallelmode) { switch (rfbi.parallelmode) {
case OMAP_DSS_RFBI_PARALLELMODE_8: case OMAP_DSS_RFBI_PARALLELMODE_8:
...@@ -221,9 +218,8 @@ void omap_rfbi_read_data(void *buf, u32 len) ...@@ -221,9 +218,8 @@ void omap_rfbi_read_data(void *buf, u32 len)
BUG(); BUG();
} }
} }
EXPORT_SYMBOL(omap_rfbi_read_data);
void omap_rfbi_write_data(const void *buf, u32 len) static void rfbi_write_data(const void *buf, u32 len)
{ {
switch (rfbi.parallelmode) { switch (rfbi.parallelmode) {
case OMAP_DSS_RFBI_PARALLELMODE_8: case OMAP_DSS_RFBI_PARALLELMODE_8:
...@@ -250,9 +246,8 @@ void omap_rfbi_write_data(const void *buf, u32 len) ...@@ -250,9 +246,8 @@ void omap_rfbi_write_data(const void *buf, u32 len)
} }
} }
EXPORT_SYMBOL(omap_rfbi_write_data);
void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, static void rfbi_write_pixels(const void __iomem *buf, int scr_width,
u16 x, u16 y, u16 x, u16 y,
u16 w, u16 h) u16 w, u16 h)
{ {
...@@ -305,7 +300,6 @@ void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, ...@@ -305,7 +300,6 @@ void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width,
BUG(); BUG();
} }
} }
EXPORT_SYMBOL(omap_rfbi_write_pixels);
static int rfbi_transfer_area(struct omap_dss_device *dssdev, static int rfbi_transfer_area(struct omap_dss_device *dssdev,
void (*callback)(void *data), void *data) void (*callback)(void *data), void *data)
...@@ -574,7 +568,7 @@ static int rfbi_convert_timings(struct rfbi_timings *t) ...@@ -574,7 +568,7 @@ static int rfbi_convert_timings(struct rfbi_timings *t)
} }
/* xxx FIX module selection missing */ /* xxx FIX module selection missing */
int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, static int rfbi_setup_te(enum omap_rfbi_te_mode mode,
unsigned hs_pulse_time, unsigned vs_pulse_time, unsigned hs_pulse_time, unsigned vs_pulse_time,
int hs_pol_inv, int vs_pol_inv, int extif_div) int hs_pol_inv, int vs_pol_inv, int extif_div)
{ {
...@@ -613,10 +607,9 @@ int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, ...@@ -613,10 +607,9 @@ int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode,
return 0; return 0;
} }
EXPORT_SYMBOL(omap_rfbi_setup_te);
/* xxx FIX module selection missing */ /* xxx FIX module selection missing */
int omap_rfbi_enable_te(bool enable, unsigned line) static int rfbi_enable_te(bool enable, unsigned line)
{ {
u32 l; u32 l;
...@@ -636,9 +629,8 @@ int omap_rfbi_enable_te(bool enable, unsigned line) ...@@ -636,9 +629,8 @@ int omap_rfbi_enable_te(bool enable, unsigned line)
return 0; return 0;
} }
EXPORT_SYMBOL(omap_rfbi_enable_te);
static int rfbi_configure(int rfbi_module, int bpp, int lines) static int rfbi_configure_bus(int rfbi_module, int bpp, int lines)
{ {
u32 l; u32 l;
int cycle1 = 0, cycle2 = 0, cycle3 = 0; int cycle1 = 0, cycle2 = 0, cycle3 = 0;
...@@ -770,45 +762,39 @@ static int rfbi_configure(int rfbi_module, int bpp, int lines) ...@@ -770,45 +762,39 @@ static int rfbi_configure(int rfbi_module, int bpp, int lines)
return 0; return 0;
} }
int omap_rfbi_configure(struct omap_dss_device *dssdev) static int rfbi_configure(struct omap_dss_device *dssdev)
{ {
return rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, return rfbi_configure_bus(dssdev->phy.rfbi.channel, rfbi.pixel_size,
rfbi.data_lines); rfbi.data_lines);
} }
EXPORT_SYMBOL(omap_rfbi_configure);
int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), static int rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *),
void *data) void *data)
{ {
return rfbi_transfer_area(dssdev, callback, data); return rfbi_transfer_area(dssdev, callback, data);
} }
EXPORT_SYMBOL(omap_rfbi_update);
void omapdss_rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h) static void rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h)
{ {
rfbi.timings.x_res = w; rfbi.timings.x_res = w;
rfbi.timings.y_res = h; rfbi.timings.y_res = h;
} }
EXPORT_SYMBOL(omapdss_rfbi_set_size);
void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size) static void rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size)
{ {
rfbi.pixel_size = pixel_size; rfbi.pixel_size = pixel_size;
} }
EXPORT_SYMBOL(omapdss_rfbi_set_pixel_size);
void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) static void rfbi_set_data_lines(struct omap_dss_device *dssdev, int data_lines)
{ {
rfbi.data_lines = data_lines; rfbi.data_lines = data_lines;
} }
EXPORT_SYMBOL(omapdss_rfbi_set_data_lines);
void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev, static void rfbi_set_interface_timings(struct omap_dss_device *dssdev,
struct rfbi_timings *timings) struct rfbi_timings *timings)
{ {
rfbi.intf_timings = *timings; rfbi.intf_timings = *timings;
} }
EXPORT_SYMBOL(omapdss_rfbi_set_interface_timings);
static void rfbi_dump_regs(struct seq_file *s) static void rfbi_dump_regs(struct seq_file *s)
{ {
...@@ -888,7 +874,7 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) ...@@ -888,7 +874,7 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev)
dss_mgr_set_timings(mgr, &rfbi.timings); dss_mgr_set_timings(mgr, &rfbi.timings);
} }
int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) static int rfbi_display_enable(struct omap_dss_device *dssdev)
{ {
struct omap_dss_device *out = &rfbi.output; struct omap_dss_device *out = &rfbi.output;
int r; int r;
...@@ -911,7 +897,7 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) ...@@ -911,7 +897,7 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev)
rfbi_config_lcd_manager(dssdev); rfbi_config_lcd_manager(dssdev);
rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, rfbi_configure_bus(dssdev->phy.rfbi.channel, rfbi.pixel_size,
rfbi.data_lines); rfbi.data_lines);
rfbi_set_timings(dssdev->phy.rfbi.channel, &rfbi.intf_timings); rfbi_set_timings(dssdev->phy.rfbi.channel, &rfbi.intf_timings);
...@@ -921,9 +907,8 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) ...@@ -921,9 +907,8 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev)
rfbi_runtime_put(); rfbi_runtime_put();
return r; return r;
} }
EXPORT_SYMBOL(omapdss_rfbi_display_enable);
void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev) static void rfbi_display_disable(struct omap_dss_device *dssdev)
{ {
struct omap_dss_device *out = &rfbi.output; struct omap_dss_device *out = &rfbi.output;
...@@ -932,7 +917,6 @@ void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev) ...@@ -932,7 +917,6 @@ void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev)
rfbi_runtime_put(); rfbi_runtime_put();
} }
EXPORT_SYMBOL(omapdss_rfbi_display_disable);
static int rfbi_init_display(struct omap_dss_device *dssdev) static int rfbi_init_display(struct omap_dss_device *dssdev)
{ {
...@@ -940,77 +924,6 @@ static int rfbi_init_display(struct omap_dss_device *dssdev) ...@@ -940,77 +924,6 @@ static int rfbi_init_display(struct omap_dss_device *dssdev)
return 0; return 0;
} }
static struct omap_dss_device *rfbi_find_dssdev(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
const char *def_disp_name = omapdss_get_default_display_name();
struct omap_dss_device *def_dssdev;
int i;
def_dssdev = NULL;
for (i = 0; i < pdata->num_devices; ++i) {
struct omap_dss_device *dssdev = pdata->devices[i];
if (dssdev->type != OMAP_DISPLAY_TYPE_DBI)
continue;
if (def_dssdev == NULL)
def_dssdev = dssdev;
if (def_disp_name != NULL &&
strcmp(dssdev->name, def_disp_name) == 0) {
def_dssdev = dssdev;
break;
}
}
return def_dssdev;
}
static int rfbi_probe_pdata(struct platform_device *rfbidev)
{
struct omap_dss_device *plat_dssdev;
struct omap_dss_device *dssdev;
int r;
plat_dssdev = rfbi_find_dssdev(rfbidev);
if (!plat_dssdev)
return 0;
dssdev = dss_alloc_and_init_device(&rfbidev->dev);
if (!dssdev)
return -ENOMEM;
dss_copy_device_pdata(dssdev, plat_dssdev);
r = rfbi_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
dss_put_device(dssdev);
return r;
}
r = omapdss_output_set_device(&rfbi.output, dssdev);
if (r) {
DSSERR("failed to connect output to new device: %s\n",
dssdev->name);
dss_put_device(dssdev);
return r;
}
r = dss_add_device(dssdev);
if (r) {
DSSERR("device %s register failed: %d\n", dssdev->name, r);
omapdss_output_unset_device(&rfbi.output);
dss_put_device(dssdev);
return r;
}
return 0;
}
static void rfbi_init_output(struct platform_device *pdev) static void rfbi_init_output(struct platform_device *pdev)
{ {
struct omap_dss_device *out = &rfbi.output; struct omap_dss_device *out = &rfbi.output;
...@@ -1085,16 +998,8 @@ static int omap_rfbihw_probe(struct platform_device *pdev) ...@@ -1085,16 +998,8 @@ static int omap_rfbihw_probe(struct platform_device *pdev)
rfbi_init_output(pdev); rfbi_init_output(pdev);
if (pdev->dev.platform_data) {
r = rfbi_probe_pdata(pdev);
if (r)
goto err_probe;
}
return 0; return 0;
err_probe:
rfbi_uninit_output(pdev);
err_runtime_get: err_runtime_get:
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return r; return r;
...@@ -1102,8 +1007,6 @@ static int omap_rfbihw_probe(struct platform_device *pdev) ...@@ -1102,8 +1007,6 @@ static int omap_rfbihw_probe(struct platform_device *pdev)
static int __exit omap_rfbihw_remove(struct platform_device *pdev) static int __exit omap_rfbihw_remove(struct platform_device *pdev)
{ {
dss_unregister_child_devices(&pdev->dev);
rfbi_uninit_output(pdev); rfbi_uninit_output(pdev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
......
...@@ -250,19 +250,6 @@ struct rfbi_timings { ...@@ -250,19 +250,6 @@ struct rfbi_timings {
int converted; int converted;
}; };
void omap_rfbi_write_command(const void *buf, u32 len);
void omap_rfbi_read_data(void *buf, u32 len);
void omap_rfbi_write_data(const void *buf, u32 len);
void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width,
u16 x, u16 y,
u16 w, u16 h);
int omap_rfbi_enable_te(bool enable, unsigned line);
int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode,
unsigned hs_pulse_time, unsigned vs_pulse_time,
int hs_pol_inv, int vs_pol_inv, int extif_div);
void rfbi_bus_lock(void);
void rfbi_bus_unlock(void);
/* DSI */ /* DSI */
enum omap_dss_dsi_trans_mode { 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,19 +974,6 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
#define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver)
#define to_dss_device(x) container_of((x), struct omap_dss_device, old_dev) #define to_dss_device(x) container_of((x), struct omap_dss_device, old_dev)
int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev);
void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev);
int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *),
void *data);
int omap_rfbi_configure(struct omap_dss_device *dssdev);
void omapdss_rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h);
void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev,
int pixel_size);
void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev,
int data_lines);
void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev,
struct rfbi_timings *timings);
int omapdss_compat_init(void); int omapdss_compat_init(void);
void omapdss_compat_uninit(void); void omapdss_compat_uninit(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment