aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 16:35:12 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 16:35:12 -0500
commit84b7290cca16c61a167c7e1912cd84a479852165 (patch)
tree8ecdd0ac8519cf5f38032db0f87ee1640b488efa /arch
parent9858a38ea3a940762ae3028cce88f686d0e0c28b (diff)
parent1928e87bcf185f56008d0746f887b691c1cb8c4a (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6: (55 commits) video: udlfb: Kill off special printk wrappers, use pr_fmt(). video: udlfb: Kill off some magic constants for EDID sizing. video: udlfb: deifdefify (yes, that's a word). fbdev: modedb: Add a new mode for 864x480 TAAL panels. drivers/video/i810/i810-i2c.c: fix i2c bus handling video: Fix the HGA framebuffer driver drivers/video/carminefb.c: improve error handling video: imxfb: Fix the maximum value for yres fbdev: sh_mobile_lcdcfb: Enable 32 bpp and 24 bpp support fbdev: sh_mipi_dsi: use platform provided register layout and values ARM: mach-shmobile: specify sh7372 MIPI DSI register layout fbdev: sh_mipi_dsi: support different register layouts ARM: mach-shmobile: improve MIPI DSI clock configuration fbdev: sh-mobile: implement MIPI DSI runtime PM support sisfb: eliminate compiler warnings sisfb: delete unused register I/O macros sisfb: replace setSISIDXREG with SiS_SetRegANDOR sisfb: replace andSISIDXREG with SiS_SetRegAND sisfb: replace orSISIDXREG with SiS_SetRegOR sisfb: replace outSISIDXREG with SiS_SetReg ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c70
-rw-r--r--arch/arm/mach-shmobile/clock-sh7372.c13
2 files changed, 39 insertions, 44 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index d440e5f456ad..b1222dc43380 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -501,7 +501,12 @@ static struct platform_device keysc_device = {
501static struct resource mipidsi0_resources[] = { 501static struct resource mipidsi0_resources[] = {
502 [0] = { 502 [0] = {
503 .start = 0xffc60000, 503 .start = 0xffc60000,
504 .end = 0xffc68fff, 504 .end = 0xffc63073,
505 .flags = IORESOURCE_MEM,
506 },
507 [1] = {
508 .start = 0xffc68000,
509 .end = 0xffc680ef,
505 .flags = IORESOURCE_MEM, 510 .flags = IORESOURCE_MEM,
506 }, 511 },
507}; 512};
@@ -509,6 +514,7 @@ static struct resource mipidsi0_resources[] = {
509static struct sh_mipi_dsi_info mipidsi0_info = { 514static struct sh_mipi_dsi_info mipidsi0_info = {
510 .data_format = MIPI_RGB888, 515 .data_format = MIPI_RGB888,
511 .lcd_chan = &lcdc_info.ch[0], 516 .lcd_chan = &lcdc_info.ch[0],
517 .vsynw_offset = 17,
512}; 518};
513 519
514static struct platform_device mipidsi0_device = { 520static struct platform_device mipidsi0_device = {
@@ -521,44 +527,6 @@ static struct platform_device mipidsi0_device = {
521 }, 527 },
522}; 528};
523 529
524/* This function will disappear when we switch to (runtime) PM */
525static int __init ap4evb_init_display_clk(void)
526{
527 struct clk *lcdc_clk;
528 struct clk *dsitx_clk;
529 int ret;
530
531 lcdc_clk = clk_get(&lcdc_device.dev, "sh_mobile_lcdc_fb.0");
532 if (IS_ERR(lcdc_clk))
533 return PTR_ERR(lcdc_clk);
534
535 dsitx_clk = clk_get(&mipidsi0_device.dev, "sh-mipi-dsi.0");
536 if (IS_ERR(dsitx_clk)) {
537 ret = PTR_ERR(dsitx_clk);
538 goto eclkdsitxget;
539 }
540
541 ret = clk_enable(lcdc_clk);
542 if (ret < 0)
543 goto eclklcdcon;
544
545 ret = clk_enable(dsitx_clk);
546 if (ret < 0)
547 goto eclkdsitxon;
548
549 return 0;
550
551eclkdsitxon:
552 clk_disable(lcdc_clk);
553eclklcdcon:
554 clk_put(dsitx_clk);
555eclkdsitxget:
556 clk_put(lcdc_clk);
557
558 return ret;
559}
560device_initcall(ap4evb_init_display_clk);
561
562static struct platform_device *qhd_devices[] __initdata = { 530static struct platform_device *qhd_devices[] __initdata = {
563 &mipidsi0_device, 531 &mipidsi0_device,
564 &keysc_device, 532 &keysc_device,
@@ -764,10 +732,15 @@ static struct platform_device lcdc1_device = {
764 }, 732 },
765}; 733};
766 734
735static long ap4evb_clk_optimize(unsigned long target, unsigned long *best_freq,
736 unsigned long *parent_freq);
737
738
767static struct sh_mobile_hdmi_info hdmi_info = { 739static struct sh_mobile_hdmi_info hdmi_info = {
768 .lcd_chan = &sh_mobile_lcdc1_info.ch[0], 740 .lcd_chan = &sh_mobile_lcdc1_info.ch[0],
769 .lcd_dev = &lcdc1_device.dev, 741 .lcd_dev = &lcdc1_device.dev,
770 .flags = HDMI_SND_SRC_SPDIF, 742 .flags = HDMI_SND_SRC_SPDIF,
743 .clk_optimize_parent = ap4evb_clk_optimize,
771}; 744};
772 745
773static struct resource hdmi_resources[] = { 746static struct resource hdmi_resources[] = {
@@ -794,6 +767,25 @@ static struct platform_device hdmi_device = {
794 }, 767 },
795}; 768};
796 769
770static long ap4evb_clk_optimize(unsigned long target, unsigned long *best_freq,
771 unsigned long *parent_freq)
772{
773 struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick");
774 long error;
775
776 if (IS_ERR(hdmi_ick)) {
777 int ret = PTR_ERR(hdmi_ick);
778 pr_err("Cannot get HDMI ICK: %d\n", ret);
779 return ret;
780 }
781
782 error = clk_round_parent(hdmi_ick, target, best_freq, parent_freq, 1, 64);
783
784 clk_put(hdmi_ick);
785
786 return error;
787}
788
797static struct gpio_led ap4evb_leds[] = { 789static struct gpio_led ap4evb_leds[] = {
798 { 790 {
799 .name = "led4", 791 .name = "led4",
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index 3aa026069435..66663adb21f8 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -507,7 +507,7 @@ enum { MSTP001,
507 MSTP223, 507 MSTP223,
508 MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, 508 MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
509 MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312, 509 MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312,
510 MSTP415, MSTP413, MSTP411, MSTP410, MSTP406, MSTP403, 510 MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP406, MSTP403,
511 MSTP_NR }; 511 MSTP_NR };
512 512
513#define MSTP(_parent, _reg, _bit, _flags) \ 513#define MSTP(_parent, _reg, _bit, _flags) \
@@ -543,6 +543,7 @@ static struct clk mstp_clks[MSTP_NR] = {
543 [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */ 543 [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */
544 [MSTP313] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */ 544 [MSTP313] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */
545 [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMC */ 545 [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMC */
546 [MSTP423] = MSTP(&div4_clks[DIV4_B], SMSTPCR4, 23, 0), /* DSITX1 */
546 [MSTP415] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 15, 0), /* SDHI2 */ 547 [MSTP415] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 15, 0), /* SDHI2 */
547 [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */ 548 [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */
548 [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */ 549 [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */
@@ -596,9 +597,10 @@ static struct clk_lookup lookups[] = {
596 CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), 597 CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]),
597 CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), 598 CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]),
598 CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), 599 CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]),
599 CLKDEV_CON_ID("dsit_clk", &div6_clks[DIV6_DSIT]), 600 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]),
600 CLKDEV_CON_ID("dsi0p_clk", &div6_clks[DIV6_DSI0P]), 601 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]),
601 CLKDEV_CON_ID("dsi1p_clk", &div6_clks[DIV6_DSI1P]), 602 CLKDEV_ICK_ID("dsi0p_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]),
603 CLKDEV_ICK_ID("dsi1p_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]),
602 604
603 /* MSTP32 clocks */ 605 /* MSTP32 clocks */
604 CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ 606 CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */
@@ -610,7 +612,7 @@ static struct clk_lookup lookups[] = {
610 CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2 */ 612 CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2 */
611 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */ 613 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */
612 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */ 614 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */
613 CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX */ 615 CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX0 */
614 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */ 616 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */
615 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */ 617 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */
616 CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[MSTP106]), /* JPU */ 618 CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[MSTP106]), /* JPU */
@@ -633,6 +635,7 @@ static struct clk_lookup lookups[] = {
633 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ 635 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */
634 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ 636 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
635 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMC */ 637 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMC */
638 CLKDEV_DEV_ID("sh-mipi-dsi.1", &mstp_clks[MSTP423]), /* DSITX1 */
636 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), /* SDHI2 */ 639 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), /* SDHI2 */
637 CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */ 640 CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */
638 CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */ 641 CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */