Skip to content

Commit

Permalink
video: atmel_lcdfb: fix platform data struct
Browse files Browse the repository at this point in the history
Today we mix pdata and drivers data in the struct atmel_lcdfb_info
Fix it and introduce a new struct atmel_lcdfb_pdata for platform data only

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Jean-Christophe PLAGNIOL-VILLARD authored and Tomi Valkeinen committed Sep 27, 2013
1 parent 090fd59 commit 8af2c28
Show file tree
Hide file tree
Showing 21 changed files with 109 additions and 101 deletions.
6 changes: 3 additions & 3 deletions arch/arm/mach-at91/at91sam9261_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)

#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
static u64 lcdc_dmamask = DMA_BIT_MASK(32);
static struct atmel_lcdfb_info lcdc_data;
static struct atmel_lcdfb_pdata lcdc_data;

static struct resource lcdc_resources[] = {
[0] = {
Expand Down Expand Up @@ -498,7 +498,7 @@ static struct platform_device at91_lcdc_device = {
.num_resources = ARRAY_SIZE(lcdc_resources),
};

void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data)
{
if (!data) {
return;
Expand Down Expand Up @@ -559,7 +559,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
platform_device_register(&at91_lcdc_device);
}
#else
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
#endif


Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-at91/at91sam9263_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ void __init at91_add_device_can(struct at91_can_data *data) {}

#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
static u64 lcdc_dmamask = DMA_BIT_MASK(32);
static struct atmel_lcdfb_info lcdc_data;
static struct atmel_lcdfb_pdata lcdc_data;

static struct resource lcdc_resources[] = {
[0] = {
Expand All @@ -859,7 +859,7 @@ static struct platform_device at91_lcdc_device = {
.num_resources = ARRAY_SIZE(lcdc_resources),
};

void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data)
{
if (!data)
return;
Expand Down Expand Up @@ -891,7 +891,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
platform_device_register(&at91_lcdc_device);
}
#else
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
#endif


Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-at91/at91sam9g45_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ void __init at91_add_device_isi(struct isi_platform_data *data,

#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
static u64 lcdc_dmamask = DMA_BIT_MASK(32);
static struct atmel_lcdfb_info lcdc_data;
static struct atmel_lcdfb_pdata lcdc_data;

static struct resource lcdc_resources[] = {
[0] = {
Expand All @@ -991,7 +991,7 @@ static struct platform_device at91_lcdc_device = {
.num_resources = ARRAY_SIZE(lcdc_resources),
};

void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data)
{
if (!data)
return;
Expand Down Expand Up @@ -1037,7 +1037,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
platform_device_register(&at91_lcdc_device);
}
#else
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
#endif


Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-at91/at91sam9rl_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}

#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
static u64 lcdc_dmamask = DMA_BIT_MASK(32);
static struct atmel_lcdfb_info lcdc_data;
static struct atmel_lcdfb_pdata lcdc_data;

static struct resource lcdc_resources[] = {
[0] = {
Expand All @@ -525,7 +525,7 @@ static struct platform_device at91_lcdc_device = {
.num_resources = ARRAY_SIZE(lcdc_resources),
};

void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data)
{
if (!data) {
return;
Expand Down Expand Up @@ -557,7 +557,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
platform_device_register(&at91_lcdc_device);
}
#else
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
#endif


Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-at91/board-sam9261ek.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static void at91_lcdc_stn_power_control(int on)
}
}

static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data = {
.default_bpp = 1,
.default_dmacon = ATMEL_LCDC_DMAEN,
.default_lcdcon2 = AT91SAM9261_DEFAULT_STN_LCDCON2,
Expand Down Expand Up @@ -453,7 +453,7 @@ static void at91_lcdc_tft_power_control(int on)
at91_set_gpio_value(AT91_PIN_PA12, 1); /* power down */
}

static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data = {
.lcdcon_is_backlight = true,
.default_bpp = 16,
.default_dmacon = ATMEL_LCDC_DMAEN,
Expand All @@ -465,7 +465,7 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
#endif

#else
static struct atmel_lcdfb_info __initdata ek_lcdc_data;
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data;
#endif


Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-at91/board-sam9263ek.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ static void at91_lcdc_power_control(int on)
}

/* Driver datas */
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data = {
.lcdcon_is_backlight = true,
.default_bpp = 16,
.default_dmacon = ATMEL_LCDC_DMAEN,
Expand All @@ -292,7 +292,7 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
};

#else
static struct atmel_lcdfb_info __initdata ek_lcdc_data;
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data;
#endif


Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-at91/board-sam9m10g45ek.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static struct fb_monspecs at91fb_default_monspecs = {
| ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)

/* Driver datas */
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data = {
.lcdcon_is_backlight = true,
.default_bpp = 32,
.default_dmacon = ATMEL_LCDC_DMAEN,
Expand All @@ -295,7 +295,7 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
};

#else
static struct atmel_lcdfb_info __initdata ek_lcdc_data;
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data;
#endif


Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-at91/board-sam9rlek.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static void at91_lcdc_power_control(int on)
}

/* Driver datas */
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data = {
.lcdcon_is_backlight = true,
.default_bpp = 16,
.default_dmacon = ATMEL_LCDC_DMAEN,
Expand All @@ -191,7 +191,7 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
};

#else
static struct atmel_lcdfb_info __initdata ek_lcdc_data;
static struct atmel_lcdfb_pdata __initdata ek_lcdc_data;
#endif


Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-at91/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ extern void __init at91_add_device_pwm(u32 mask);
extern void __init at91_add_device_ssc(unsigned id, unsigned pins);

/* LCD Controller */
struct atmel_lcdfb_info;
extern void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data);
struct atmel_lcdfb_pdata;
extern void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data);

/* AC97 */
extern void __init at91_add_device_ac97(struct ac97c_platform_data *data);
Expand Down
6 changes: 3 additions & 3 deletions arch/avr32/boards/atngw100/evklcd10x.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static struct fb_monspecs __initdata atevklcd10x_default_monspecs = {
.dclkmax = 28330000,
};

static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = {
static struct atmel_lcdfb_pdata __initdata atevklcd10x_lcdc_data = {
.default_bpp = 16,
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
Expand Down Expand Up @@ -96,7 +96,7 @@ static struct fb_monspecs __initdata atevklcd10x_default_monspecs = {
.dclkmax = 7000000,
};

static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = {
static struct atmel_lcdfb_pdata __initdata atevklcd10x_lcdc_data = {
.default_bpp = 16,
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
Expand Down Expand Up @@ -134,7 +134,7 @@ static struct fb_monspecs __initdata atevklcd10x_default_monspecs = {
.dclkmax = 6400000,
};

static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = {
static struct atmel_lcdfb_pdata __initdata atevklcd10x_lcdc_data = {
.default_bpp = 16,
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
Expand Down
4 changes: 2 additions & 2 deletions arch/avr32/boards/atngw100/mrmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static struct fb_monspecs __initdata lcd_fb_default_monspecs = {
.dclkmax = 9260000,
};

static struct atmel_lcdfb_info __initdata rmt_lcdc_data = {
static struct atmel_lcdfb_pdata __initdata rmt_lcdc_data = {
.default_bpp = 24,
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
Expand Down Expand Up @@ -126,7 +126,7 @@ static struct fb_monspecs __initdata lcd_fb_default_monspecs = {
.dclkmax = 9260000,
};

static struct atmel_lcdfb_info __initdata rmt_lcdc_data = {
static struct atmel_lcdfb_pdata __initdata rmt_lcdc_data = {
.default_bpp = 24,
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
Expand Down
2 changes: 1 addition & 1 deletion arch/avr32/boards/atstk1000/atstk1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifndef __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H
#define __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H

extern struct atmel_lcdfb_info atstk1000_lcdc_data;
extern struct atmel_lcdfb_pdata atstk1000_lcdc_data;

void atstk1000_setup_j2_leds(void);

Expand Down
2 changes: 1 addition & 1 deletion arch/avr32/boards/atstk1000/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static struct fb_monspecs __initdata atstk1000_default_monspecs = {
.dclkmax = 30000000,
};

struct atmel_lcdfb_info __initdata atstk1000_lcdc_data = {
struct atmel_lcdfb_pdata __initdata atstk1000_lcdc_data = {
.default_bpp = 24,
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
Expand Down
2 changes: 1 addition & 1 deletion arch/avr32/boards/favr-32/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static struct fb_monspecs __initdata favr32_default_monspecs = {
.dclkmax = 28000000,
};

struct atmel_lcdfb_info __initdata favr32_lcdc_data = {
struct atmel_lcdfb_pdata __initdata favr32_lcdc_data = {
.default_bpp = 16,
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
Expand Down
2 changes: 1 addition & 1 deletion arch/avr32/boards/hammerhead/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static struct fb_monspecs __initdata hammerhead_hda350t_monspecs = {
.dclkmax = 10000000,
};

struct atmel_lcdfb_info __initdata hammerhead_lcdc_data = {
struct atmel_lcdfb_pdata __initdata hammerhead_lcdc_data = {
.default_bpp = 24,
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
Expand Down
2 changes: 1 addition & 1 deletion arch/avr32/boards/merisc/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static struct fb_monspecs merisc_fb_monspecs = {
.dclkmax = 30000000,
};

struct atmel_lcdfb_info merisc_lcdc_data = {
struct atmel_lcdfb_pdata merisc_lcdc_data = {
.default_bpp = 24,
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
Expand Down
4 changes: 2 additions & 2 deletions arch/avr32/boards/mimc200/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* published by the Free Software Foundation.
*/

extern struct atmel_lcdfb_info mimc200_lcdc_data;
extern struct atmel_lcdfb_pdata mimc200_lcdc_data;

#include <linux/clk.h>
#include <linux/etherdevice.h>
Expand Down Expand Up @@ -71,7 +71,7 @@ static struct fb_monspecs __initdata mimc200_default_monspecs = {
.dclkmax = 25200000,
};

struct atmel_lcdfb_info __initdata mimc200_lcdc_data = {
struct atmel_lcdfb_pdata __initdata mimc200_lcdc_data = {
.default_bpp = 16,
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
Expand Down
8 changes: 4 additions & 4 deletions arch/avr32/mach-at32ap/at32ap700x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
* LCDC
* -------------------------------------------------------------------- */
#if defined(CONFIG_CPU_AT32AP7000) || defined(CONFIG_CPU_AT32AP7002)
static struct atmel_lcdfb_info atmel_lcdfb0_data;
static struct atmel_lcdfb_pdata atmel_lcdfb0_data;
static struct resource atmel_lcdfb0_resource[] = {
{
.start = 0xff000000,
Expand Down Expand Up @@ -1467,12 +1467,12 @@ static struct clk atmel_lcdfb0_pixclk = {
};

struct platform_device *__init
at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,
at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_pdata *data,
unsigned long fbmem_start, unsigned long fbmem_len,
u64 pin_mask)
{
struct platform_device *pdev;
struct atmel_lcdfb_info *info;
struct atmel_lcdfb_pdata *info;
struct fb_monspecs *monspecs;
struct fb_videomode *modedb;
unsigned int modedb_size;
Expand Down Expand Up @@ -1529,7 +1529,7 @@ at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,
}

info = pdev->dev.platform_data;
memcpy(info, data, sizeof(struct atmel_lcdfb_info));
memcpy(info, data, sizeof(struct atmel_lcdfb_pdata));
info->default_monspecs = monspecs;

pdev->name = "at32ap-lcdfb";
Expand Down
4 changes: 2 additions & 2 deletions arch/avr32/mach-at32ap/include/mach/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ struct platform_device *
at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n);
void at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b, unsigned int n);

struct atmel_lcdfb_info;
struct atmel_lcdfb_pdata;
struct platform_device *
at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,
at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_pdata *data,
unsigned long fbmem_start, unsigned long fbmem_len,
u64 pin_mask);

Expand Down
Loading

0 comments on commit 8af2c28

Please sign in to comment.