.. | .. |
---|
29 | 29 | #include <linux/clk.h> |
---|
30 | 30 | #include <linux/cpufreq.h> |
---|
31 | 31 | #include <linux/io.h> |
---|
| 32 | +#include <linux/platform_data/fb-s3c2410.h> |
---|
32 | 33 | |
---|
33 | 34 | #include <asm/div64.h> |
---|
34 | 35 | |
---|
35 | 36 | #include <asm/mach/map.h> |
---|
36 | | -#include <mach/regs-lcd.h> |
---|
37 | | -#include <mach/regs-gpio.h> |
---|
38 | | -#include <mach/fb.h> |
---|
39 | 37 | |
---|
40 | 38 | #ifdef CONFIG_PM |
---|
41 | 39 | #include <linux/pm.h> |
---|
42 | 40 | #endif |
---|
43 | 41 | |
---|
44 | 42 | #include "s3c2410fb.h" |
---|
| 43 | +#include "s3c2410fb-regs-lcd.h" |
---|
45 | 44 | |
---|
46 | 45 | /* Debugging stuff */ |
---|
47 | | -#ifdef CONFIG_FB_S3C2410_DEBUG |
---|
48 | | -static int debug = 1; |
---|
49 | | -#else |
---|
50 | | -static int debug; |
---|
51 | | -#endif |
---|
| 46 | +static int debug = IS_BUILTIN(CONFIG_FB_S3C2410_DEBUG); |
---|
52 | 47 | |
---|
53 | 48 | #define dprintk(msg...) \ |
---|
54 | 49 | do { \ |
---|
.. | .. |
---|
618 | 613 | |
---|
619 | 614 | static DEVICE_ATTR(debug, 0664, s3c2410fb_debug_show, s3c2410fb_debug_store); |
---|
620 | 615 | |
---|
621 | | -static struct fb_ops s3c2410fb_ops = { |
---|
| 616 | +static const struct fb_ops s3c2410fb_ops = { |
---|
622 | 617 | .owner = THIS_MODULE, |
---|
623 | 618 | .fb_check_var = s3c2410fb_check_var, |
---|
624 | 619 | .fb_set_par = s3c2410fb_set_par, |
---|
.. | .. |
---|
676 | 671 | { |
---|
677 | 672 | unsigned long tmp; |
---|
678 | 673 | |
---|
| 674 | + if (!reg) |
---|
| 675 | + return; |
---|
| 676 | + |
---|
679 | 677 | tmp = readl(reg) & ~mask; |
---|
680 | 678 | writel(tmp | set, reg); |
---|
681 | 679 | } |
---|
.. | .. |
---|
706 | 704 | |
---|
707 | 705 | /* modify the gpio(s) with interrupts set (bjd) */ |
---|
708 | 706 | |
---|
709 | | - modify_gpio(S3C2410_GPCUP, mach_info->gpcup, mach_info->gpcup_mask); |
---|
710 | | - modify_gpio(S3C2410_GPCCON, mach_info->gpccon, mach_info->gpccon_mask); |
---|
711 | | - modify_gpio(S3C2410_GPDUP, mach_info->gpdup, mach_info->gpdup_mask); |
---|
712 | | - modify_gpio(S3C2410_GPDCON, mach_info->gpdcon, mach_info->gpdcon_mask); |
---|
| 707 | + modify_gpio(mach_info->gpcup_reg, mach_info->gpcup, mach_info->gpcup_mask); |
---|
| 708 | + modify_gpio(mach_info->gpccon_reg, mach_info->gpccon, mach_info->gpccon_mask); |
---|
| 709 | + modify_gpio(mach_info->gpdup_reg, mach_info->gpdup, mach_info->gpdup_mask); |
---|
| 710 | + modify_gpio(mach_info->gpdcon_reg, mach_info->gpdcon, mach_info->gpdcon_mask); |
---|
713 | 711 | |
---|
714 | 712 | local_irq_restore(flags); |
---|
715 | 713 | |
---|
.. | .. |
---|
777 | 775 | long delta_f; |
---|
778 | 776 | |
---|
779 | 777 | info = container_of(nb, struct s3c2410fb_info, freq_transition); |
---|
780 | | - fbinfo = platform_get_drvdata(to_platform_device(info->dev)); |
---|
| 778 | + fbinfo = dev_get_drvdata(info->dev); |
---|
781 | 779 | |
---|
782 | 780 | /* work out change, <0 for speed-up */ |
---|
783 | 781 | delta_f = info->clk_rate - clk_get_rate(info->clk); |
---|