Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346836
b: refs/heads/master
c: 6baf119
h: refs/heads/master
v: v3
  • Loading branch information
Timur Tabi authored and Anatolij Gustschin committed Dec 3, 2012
1 parent 5fd50b8 commit 3fc651a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c27b20395d21235b73771a2bcf5325ece94c4c8
refs/heads/master: 6baf11906e7687ad517567f6b93b94a90f0db3f9
1 change: 0 additions & 1 deletion trunk/arch/powerpc/platforms/512x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ config PPC_MPC512x
bool "512x-based boards"
depends on 6xx
select FSL_SOC
select FB_FSL_DIU
select IPIC
select PPC_CLOCK
select PPC_PCI_CHOICE
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/powerpc/platforms/512x/mpc5121_ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ static void __init mpc5121_ads_setup_arch(void)
for_each_compatible_node(np, "pci", "fsl,mpc5121-pci")
mpc83xx_add_bridge(np);
#endif

#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
mpc512x_setup_diu();
#endif
}

static void __init mpc5121_ads_init_IRQ(void)
Expand Down
11 changes: 9 additions & 2 deletions trunk/arch/powerpc/platforms/512x/mpc512x.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ extern void __init mpc512x_init(void);
extern int __init mpc5121_clk_init(void);
void __init mpc512x_declare_of_platform_devices(void);
extern void mpc512x_restart(char *cmd);
extern void mpc512x_init_diu(void);
extern void mpc512x_setup_diu(void);

#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
void mpc512x_init_diu(void);
void mpc512x_setup_diu(void);
#else
#define mpc512x_init_diu NULL
#define mpc512x_setup_diu NULL
#endif

#endif /* __MPC512X_H__ */
25 changes: 4 additions & 21 deletions trunk/arch/powerpc/platforms/512x/mpc512x_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ void mpc512x_restart(char *cmd)
;
}

#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)

struct fsl_diu_shared_fb {
u8 gamma[0x300]; /* 32-bit aligned! */
struct diu_ad ad0; /* 32-bit aligned! */
Expand All @@ -66,25 +68,6 @@ struct fsl_diu_shared_fb {
bool in_use;
};

u32 mpc512x_get_pixel_format(enum fsl_diu_monitor_port port,
unsigned int bits_per_pixel)
{
switch (bits_per_pixel) {
case 32:
return 0x88883316;
case 24:
return 0x88082219;
case 16:
return 0x65053118;
}
return 0x00000400;
}

void mpc512x_set_gamma_table(enum fsl_diu_monitor_port port,
char *gamma_table_base)
{
}

void mpc512x_set_monitor_port(enum fsl_diu_monitor_port port)
{
}
Expand Down Expand Up @@ -320,14 +303,14 @@ void __init mpc512x_setup_diu(void)
}
}

diu_ops.get_pixel_format = mpc512x_get_pixel_format;
diu_ops.set_gamma_table = mpc512x_set_gamma_table;
diu_ops.set_monitor_port = mpc512x_set_monitor_port;
diu_ops.set_pixel_clock = mpc512x_set_pixel_clock;
diu_ops.valid_monitor_port = mpc512x_valid_monitor_port;
diu_ops.release_bootmem = mpc512x_release_bootmem;
}

#endif

void __init mpc512x_init_IRQ(void)
{
struct device_node *np;
Expand Down

0 comments on commit 3fc651a

Please sign in to comment.